I’m having a very hard time getting the ckbtc
canister deployed with the appropriate did file and arguments. I’m not sure which did file is correct nor why this isn’t working.
Here is my deploy command:
dfx deploy ckbtc --specified-id=be2us-64aaa-aaaaa-qaabq-cai --argument='(variant { Init = record { minting_account = record { owner = principal "bd3sg-teaaa-aaaaa-qaaba-cai" }; transfer_fee = 0 : nat64; token_symbol = "ckBTC"; token_name = "ckBTC"; metadata = vec {}; initial_balances = vec {}; archive_options = record { num_blocks_to_archive = 0 : nat64; trigger_threshold = 0 : nat64; controller_id = principal "aaaaa-aa" } } })'
Here’s the did file I am using: ic/ledger.did at master · dfinity/ic · GitHub
I am using the Wasm file from curl -o ledger.wasm.gz “https://download.dfinity.systems/ic/d6d395a480cd6986b4788f4aafffc5c03a07e46e/canisters/ic-icrc1-ledger.wasm.gz”
I am getting this error:
Deploying: ckbtc
All canisters have already been created.
Building canisters...
Installing canisters...
Installing code for canister ckbtc, with canister ID be2us-64aaa-aaaaa-qaabq-cai
Error: Failed while trying to deploy canisters.
Caused by: Failed while trying to deploy canisters.
Failed while trying to install all canisters.
Failed to install wasm module to canister 'ckbtc'.
Failed during wasm installation call: The Replica returned an error: code 5, message: "Canister be2us-64aaa-aaaaa-qaabq-cai trapped explicitly: Panicked at 'Deserialization Failed: "Fail to decode argument 0 from table0 to record {\n send_whitelist : vec principal;\n token_symbol : opt text;\n transfer_fee : opt record { e8s : nat64 };\n minting_account : text;\n transaction_window : opt record { secs : nat64; nanos : nat32 };\n max_message_size_bytes : opt nat64;\n icrc1_minting_account : opt record {\n owner : principal;\n subaccount : opt vec nat8;\n };\n archive_options : opt record {\n num_blocks_to_archive : nat64;\n max_transactions_per_response : opt nat64;\n trigger_threshold : nat64;\n max_message_size_bytes : opt nat64;\n cycles_for_archive_creation : opt nat64;\n node_max_memory_size_bytes : opt nat64;\n controller_id : principal;\n };\n initial_values : vec record { text; record { e8s : nat64 } };\n token_name : opt text;\n}"', rs/rust_canisters/dfn_core/src/endpoint.rs:49:41"
The Candid file and the arguments in the command seem to match up fine, because when I leave something out I get an error about that. So there seems to be something wrong inside of the canister. Have I downloaded the incorrect Wasm somehow? Which is the correct Wasm and did file for the ckBTC canister?