Skip to content

Commit

Permalink
Merge branch 'main' into add/scheduled-rewards
Browse files Browse the repository at this point in the history
  • Loading branch information
juliangruber committed Nov 17, 2023
2 parents 9297e01 + c595ee2 commit aa85e0a
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 64 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ the configuration options described in
will receive rewards. The value must be a mainnet address starting with
`f410`, `0x`.

Addresses starting with `f1` are deprecated. We allow them for now but will
start rejecting them in an upcoming version.
`f1` addresses currently are not supported. Rewards for Station operators are
administered by a FEVM smart contract. It is currently technically complex to
make payments to f1 addresses.

If you just want to give `core` a quick spin, you can use the address
`0x000000000000000000000000000000000000dEaD`. Please note that any earnings
Expand Down
15 changes: 10 additions & 5 deletions commands/station.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,21 @@ const panic = msg => {
export const station = async ({ json, experimental }) => {
if (!FIL_WALLET_ADDRESS) panic('FIL_WALLET_ADDRESS required')
if (FIL_WALLET_ADDRESS.startsWith('f1')) {
console.error('Warning: f1... addresses are deprecated and will not receive any rewards.')
console.error('Please use an address starting with f410 or 0x')
} else if (
panic('f1 addresses are currently not supported. Please use an f4 or 0x address')
}
if (
!FIL_WALLET_ADDRESS.startsWith('f410') &&
!FIL_WALLET_ADDRESS.startsWith('0x')
) {
panic('FIL_WALLET_ADDRESS must start with f410 or 0x')
}
const fetchRes = await fetch(
`https://station-wallet-screening.fly.dev/${FIL_WALLET_ADDRESS}`
const fetchRes = await pRetry(
() => fetch(`https://station-wallet-screening.fly.dev/${FIL_WALLET_ADDRESS}`),
{
retries: 1000,
onFailedAttempt: () =>
console.error('Failed to check FIL_WALLET_ADDRESS address. Retrying...')
}
)
if (fetchRes.status === 403) panic('Invalid FIL_WALLET_ADDRESS address')
if (!fetchRes.ok) panic('Failed to check FIL_WALLET_ADDRESS address')
Expand Down
110 changes: 55 additions & 55 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@filecoin-station/core",
"version": "14.4.2",
"version": "15.0.0",
"description": "Filecoin Station Core",
"license": "(Apache-2.0 AND MIT)",
"repository": "filecoin-station/core",
Expand Down Expand Up @@ -47,7 +47,7 @@
"ethers": "^6.8.1",
"execa": "^8.0.1",
"gunzip-maybe": "^1.4.2",
"p-retry": "^6.0.0",
"p-retry": "^6.1.0",
"tar-fs": "^3.0.3",
"undici": "^5.20.0",
"unzip-stream": "^0.3.1",
Expand Down

0 comments on commit aa85e0a

Please sign in to comment.