Skip to content

Docs: Clarify which private key in what format must be provided to CLI claim --method local #70

@vorburger

Description

@vorburger

I am attempting to follow https://docs.saturn.tech/claim-your-rewards#be5761a498514ee4b78bc15ef3acd7f0 to Claim Earnings.

Need to use --method local as I do not have a Ledger nor running Lotus, so I'm doing:

$ RUSTFLAGS="-Clink-arg=-Wl,--allow-multiple-definition" cargo install --git https://github.com/filecoin-saturn/contracts cli
$ saturn-contracts --addr-to-claim $NODE_FIL_ADDRESS --factory-addr $CONTRACT_FIL_ADDRESS --method local
[*]
 |              _|_|_|              _|
 |              _|          _|_|_|  _|_|_|_|  _|    _|  _|  _|_|  _|_|_|
 |                _|_|    _|    _|    _|      _|    _|  _|_|      _|    _|
 |                    _|  _|    _|    _|      _|    _|  _|        _|    _|
 |              _|_|_|      _|_|_|      _|_|    _|_|_|  _|        _|    _|
 |
 |          -----------------------------------------------------------
 |          Saturn smart contracts 🪐.
 |          -----------------------------------------------------------
 |
[*] current gas price: 488057767
[*] using 10 retries
[*] Insert your private key to sign (it will not be displayed for security reasons):

It's unfortunately not entirely clear to me yet which private key in what format must be typed in here... I'm guessing this is what https://docs.saturn.tech/claim-your-rewards refers to as the Earnings Claiming Address - that one with ~0.5 FIL on it, which has both a 0x ETH account address and a f4 FILE address? I do own such an account, but pasting its 12 words (mnemonic?) to the prompt above fails with:

thread 'main' panicked at 'Error parsing private key: DecodeError(InvalidByte(5, 32))', /home/vorburger/.cargo/git/checkouts/contracts-f6dccc69c922f7ab/229706d/cli/src/utils.rs:320:29

I vaguely understand that the 12 words (mnemonic?) and private key are not the same, so I have tried to import the 12 words (mnemonic?) into Fox Wallet, which had a UI to Export Private Key giving me a 112 characters long String, but pasting that to the prompt above fails similiarly:

thread 'main' panicked at 'Error parsing private key: DecodeError(InvalidLastSymbol(110, 110))', /home/vorburger/.cargo/git/checkouts/contracts-f6dccc69c922f7ab/229706d/cli/src/utils.rs:320:29

BTW what's that --secret <SECRET> argument for a Path to the wallet mnemonic which saturn-contracts --help shows - can that be used for claim, or is that something else? If it can be used, what would that file have to contain? I tried putting the same 12 words (mnemonic?) into a file passed to --secret and add that argument, but it still asked for a "private key", FYI:

$ saturn-contracts -S ~/TEST claim --addr-to-claim $NODE_FIL_ADDRESS --factory-addr $CONTRACT_FIL_ADDRESS --method local
....
[*] Insert your private key to sign (it will not be displayed for security reasons):

I'll try to poke around the source code a bit to see if I can figure it out, but would love some guidance...

@AmeanAsad @aarshkshah1992 @alexander-camuto

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions