Reputation: 6029
It looks like the useLedgerKey
flag has been deprecated in near-cli
version 4+ but it's not clear what the replacement syntax is.
For example, how would I run the equivalent of this in the new cli:
near call some_contract.near some_method '{"key":"value"}' --accountId=my_account.near --useLedgerKey="44'/397'/0'/0'/8'"
Note that I'm using an arbitrary Ledger HD Path, not the default 44'/397'/0'/0'/1'
References:
useLedgerKey
optionUpvotes: -1
Views: 51
Reputation: 7756
The recommended path forward is to use the new near.cli.rs, which has much more features. Just install it using the instructions in the readme and run near
command to trigger interactive mode or paste your command as is to see how it will suggest to transform it.
Pro tip: If you want to use both old and new CLIs side-by-side, use npx
. Here is the command to run the new CLI without installing it as a replacement for near
command:
npx near-cli-rs
npx near-cli-rs contract \
call-function as-transaction some_contract.near some_method \
json-args '{"key":"value"}' \
prepaid-gas '30 TeraGas' \
attached-deposit '0 NEAR' \
sign-as my_account.near
Upvotes: 0