So once I successfully deployed all canisters with dfx nns install
I get a locally deployed ledger but its balance is 0n.
I guess I am missing a step, how can I set up the tresory initial value so that I can effectively use the ledger?
Note: when I deploy manually the ledger I generally do as following / as in the documentation but don’t know how to provide such info for nns install
cmd.
dfx deploy ledger --argument '(record {minting_account = "'${MINT_ACC}'"; initial_values = vec { record { "'${LEDGER_ACC}'"; record { e8s=100_000_000_000 } }; }; send_whitelist = vec {}})'
1 Like
Afaik there’s not a way to specify those when using dfx nns
command.
That being said it is initialized with two identities having ICP funds:
Two accounts in the local ledger is initialized with ICP that can be used for testing. One uses a secp256k1 key, which is convenient for command line usage, another uses an ed25519 key, which is more convenient in web applications.
You can find the pem content for the secp256k1 identity and Javascript code for ed25519 identity at the dfx nns
cli doc here. These two identities are loaded with ~100000000 ICP each when the nns-ledger is installed by running dfx nns install
.
I believe it is also possible to use this ledger with the ic-js library’s nns package but haven’t tried it yet.
edit: *sorry totally missed the first part of what I meant to quote. Haven’t seen a way to modify the initialization args to specify the minting account.
2 Likes
It seems that the identity part is probably the piece I am missing but, not sure it fits in my use case. I’ll have a look. Thanks for the hint!
Regarding ic-js yes that’s what I use in my NodeJS script to transfer ICP to a canister but, that’s the thing, if there is no ICP at all, there is nothing to transfer .