How to deploy the ICP Ledger locally?

I have been trying to deploy the ICP Ledger locally; But it seems I might do something wrong.

Reproduce step:

    "ledger": {
      "type": "custom",
      "candid": "/Users/unknown/nns-ifaces/ledger.did",
      "wasm": "/Users/unknown/ic/rs/rosetta-api/ledger_canister/wasm/ledger-archive-node-canister.wasm",
      "build": ""

# previously executed: dfx canister create ledger
% dfx canister install --argument 'record {minting_account="15a32831331d752b5c4cff5b9351bea8015d90f2c3831c6f3fca9c5287a4dbff"; initial_values=vec {record{"15a32831331d752b5c4cff5b9351bea8015d90f2c3831c6f3fca9c5287a4dbff";record{e8s=1000000000;}}}; max_message_size_bytes=null;transaction_window=null;archive_options=null;send_whitelist=vec{};}' --mode=reinstall ledger
Reinstalling code for canister ledger, with canister_id rkp4c-7iaaa-aaaaa-aaaca-cai
The invocation to the wallet call forward method failed with the error: An error happened during the call: 5: Canister rkp4c-7iaaa-aaaaa-aaaca-cai trapped explicitly: Panicked at 'Deserialization Failed: "Deserialize error: bytes only takes principal or vec nat8"', /Users/lifted/Projects/dfinity/rs/rust_canisters/dfn_core/src/

I don’t think my argument are wrong (I actually used didc random to check how to write HashMap in Candid)

1 Like

Let me know if you get this working and what you did, so I can give it a jam when I get home. I had asked somewhere else how to launch a local ledger canister was told not possible so happy to see this!

What are you guys working on @flyq @dpdp ? Would be cool to collab where possible.

In dfx.json β†’ ledger β†’ wasm, you are using the archive node wasm, you should use the ledger canister wasm.