Skip to content

Commit

Permalink
add back f1 support (deprecated). closes #231
Browse files Browse the repository at this point in the history
  • Loading branch information
juliangruber committed Oct 16, 2023
1 parent 8216893 commit d7647b1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
docker run \
--name station \
--detach \
--env FIL_WALLET_ADDRESS=f410fhgyuvi4k35wnqkvtdpewptt2oihbchvy5bdlmxy \
--env FIL_WALLET_ADDRESS=0x000000000000000000000000000000000000dEaD \
$IMAGEID
env:
IMAGEID: ${{ steps.docker_build.outputs.imageid }}
Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ $ npm install -g @filecoin-station/core
## Usage

```bash
$ FIL_WALLET_ADDRESS=f410/0x... station
$ FIL_WALLET_ADDRESS=... station
```

## Common Configuration
Expand Down Expand Up @@ -70,12 +70,11 @@ the configuration options described in
[Common Configuration](#common-configuration):

- `FIL_WALLET_ADDRESS` _(string; required)_: Address of the Filecoin wallet that
will receive rewards. The value must be a mainnet address starting with `f410`
or `0x`.
will receive rewards. The value must be a mainnet address starting with
`f410`, `0x` (or `f1`, deprecated).

If you just want to give `core` a quick spin, you can use the address
`f410fhgyuvi4k35wnqkvtdpewptt2oihbchvy5bdlmxy` or respectively
`0x39b14aa38adf6cd82aB31BC967Ce7a720E111Eb8`. Please note that any earnings
`0x000000000000000000000000000000000000dEaD`. Please note that any earnings
sent there will be lost.

This command outputs metrics and activity events:
Expand Down Expand Up @@ -150,7 +149,7 @@ Deploy Station with [Docker](https://www.docker.com/). Please replace
$ docker run \
--name station \
--detach \
--env FIL_WALLET_ADDRESS=f410fhgyuvi4k35wnqkvtdpewptt2oihbchvy5bdlmxy \
--env FIL_WALLET_ADDRESS=0x000000000000000000000000000000000000dEaD \
ghcr.io/filecoin-station/core
```

Expand Down
7 changes: 6 additions & 1 deletion commands/station.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ export const station = async ({ json, experimental }) => {
console.error('FIL_WALLET_ADDRESS required')
process.exit(1)
}
if (!FIL_WALLET_ADDRESS.startsWith('f410') && !FIL_WALLET_ADDRESS.startsWith('0x')) {
if (FIL_WALLET_ADDRESS.startsWith('f1')) {
console.error('Warning: f1... addresses are deprecated')
} else if (
!FIL_WALLET_ADDRESS.startsWith('f410') &&
!FIL_WALLET_ADDRESS.startsWith('0x')
) {
console.error('FIL_WALLET_ADDRESS must start with f410 or 0x')
process.exit(1)
}
Expand Down
2 changes: 1 addition & 1 deletion test/util.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { fileURLToPath } from 'node:url'

export const FIL_WALLET_ADDRESS = 'f410fhgyuvi4k35wnqkvtdpewptt2oihbchvy5bdlmxy'
export const FIL_WALLET_ADDRESS = '0x000000000000000000000000000000000000dEaD'

export const station = fileURLToPath(
new URL('../bin/station.js', import.meta.url)
Expand Down

0 comments on commit d7647b1

Please sign in to comment.