but it did not work.
(base) autumnlqerfa@AutumndeMacBook-Pro ledger % dfx canister install ledger --argument "(variant {Init = record { token_name = \"NAME\"; token_symbol = \"SYMB\"; transfer_fee = 1000000; metadata = vec {}; minting_account = record {owner = principal \"$(dfx --identity minter identity get-principal)\";}; initial_balances = vec {}; archive_options = record {num_blocks_to_archive = 1000000; trigger_threshold = 1000000; controller_id = principal \"$(dfx identity get-principal)\"}; }})"
Installing code for canister ledger, with canister ID bkyz2-fmaaa-aaaaa-qaaaq-cai
Error: Failed to install wasm module to canister 'ledger'.
Caused by: Failed to install wasm module to canister 'ledger'.
Failed during wasm installation call: The replica returned a replica error: Replica Error: reject code CanisterError, reject message Canister bkyz2-fmaaa-aaaaa-qaaaq-cai trapped explicitly: failed to decode call arguments: Custom(Fail to decode argument 0 from table0 to variant {
Upgrade : opt record {
token_symbol : opt text;
transfer_fee : opt nat64;
metadata : opt vec record {
text;
variant { Int : int; Nat : nat; Blob : vec nat8; Text : text };
};
change_fee_collector : opt variant {
SetTo : record { owner : principal; subaccount : opt vec nat8 };
Unset;
};
max_memo_length : opt nat16;
token_name : opt text;
feature_flags : opt record { icrc2 : bool };
};
Init : record {
token_symbol : text;
transfer_fee : nat64;
metadata : vec record {
text;
variant { Int : int; Nat : nat; Blob : vec nat8; Text : text };
};
minting_account : record { owner : principal; subaccount : opt vec nat8 };
initial_balances : vec record {
record { owner : principal; subaccount : opt vec nat8 };
nat64;
};
fee_collector_account : opt record {
owner : principal;
subaccount : opt vec nat8;
};
archive_options : record {
num_blocks_to_archive : nat64;
max_transactions_per_response : opt nat64;
trigger_threshold : nat64;
max_message_size_bytes : opt nat64;
cycles_for_archive_creation : opt nat64;
node_max_memory_size_bytes : opt nat64;
controller_id : principal;
};
max_memo_length : opt nat16;
token_name : text;
feature_flags : opt record { icrc2 : bool };
};
}
Caused by:
0: input: 4449444c056b01b0ced18403016c079efeb9a40371f2c794ae037cefcee7800402aecbeb880403b2a4dab20502a1e5f7a10a0491c9aafe0d716d6f6c01b3b0dac303686c039ea581d2017ca495a5e9067cdec5d8ae0e680100_000453594d42c0843d00011dc83fcebd02e452135c5c6911631ea208149477a1afe81e0a5763e81e0200c0843dc0843d011d819d3561ef06a117fa387994139e6a51d31f8a84b60988672370c33202044e414d45
table: type table0 = variant { 815_032_112 : table1 }
type table1 = record {
881_753_886 : text;
902_112_242 : int;
1_075_439_471 : table2;
1_092_281_774 : table3;
1_448_514_098 : table2;
2_755_523_233 : table4;
3_754_599_569 : text;
}
type table2 = vec empty
type table3 = record { 947_296_307 : principal }
type table4 = record { 440_423_070 : int; 1_831_422_628 : int; 3_856_016_094 : principal }
wire_type: table0, expect_type: variant {
Upgrade : opt record {
token_symbol : opt text;
transfer_fee : opt nat64;
metadata : opt vec record {
text;
variant { Int : int; Nat : nat; Blob : vec nat8; Text : text };
};
change_fee_collector : opt variant {
SetTo : record { owner : principal; subaccount : opt vec nat8 };
Unset;
};
max_memo_length : opt nat16;
token_name : opt text;
feature_flags : opt record { icrc2 : bool };
};
Init : record {
token_symbol : text;
transfer_fee : nat64;
metadata : vec record {
text;
variant { Int : int; Nat : nat; Blob : vec nat8; Text : text };
};
minting_account : record { owner : principal; subaccount : opt vec nat8 };
initial_balances : vec record {
record { owner : principal; subaccount : opt vec nat8 };
nat64;
};
fee_collector_account : opt record {
owner : principal;
subaccount : opt vec nat8;
};
archive_options : record {
num_blocks_to_archive : nat64;
max_transactions_per_response : opt nat64;
trigger_threshold : nat64;
max_message_size_bytes : opt nat64;
cycles_for_archive_creation : opt nat64;
node_max_memory_size_bytes : opt nat64;
controller_id : principal;
};
max_memo_length : opt nat16;
token_name : text;
feature_flags : opt record { icrc2 : bool };
};
}
1: table0 is not a subtype of variant {
Upgrade : opt record {
token_symbol : opt text;
transfer_fee : opt nat64;
metadata : opt vec record {
text;
variant { Int : int; Nat : nat; Blob : vec nat8; Text : text };
};
change_fee_collector : opt variant {
SetTo : record { owner : principal; subaccount : opt vec nat8 };
Unset;
};
max_memo_length : opt nat16;
token_name : opt text;
feature_flags : opt record { icrc2 : bool };
};
Init : record {
token_symbol : text;
transfer_fee : nat64;
metadata : vec record {
text;
variant { Int : int; Nat : nat; Blob : vec nat8; Text : text };
};
minting_account : record { owner : principal; subaccount : opt vec nat8 };
initial_balances : vec record {
record { owner : principal; subaccount : opt vec nat8 };
nat64;
};
fee_collector_account : opt record {
owner : principal;
subaccount : opt vec nat8;
};
archive_options : record {
num_blocks_to_archive : nat64;
max_transactions_per_response : opt nat64;
trigger_threshold : nat64;
max_message_size_bytes : opt nat64;
cycles_for_archive_creation : opt nat64;
node_max_memory_size_bytes : opt nat64;
controller_id : principal;
};
max_memo_length : opt nat16;
token_name : text;
feature_flags : opt record { icrc2 : bool };
};
}
2: Variant field 815_032_112: table1 is not a subtype of record {
token_symbol : text;
transfer_fee : nat64;
metadata : vec record {
text;
variant { Int : int; Nat : nat; Blob : vec nat8; Text : text };
};
minting_account : record { owner : principal; subaccount : opt vec nat8 };
initial_balances : vec record {
record { owner : principal; subaccount : opt vec nat8 };
nat64;
};
fee_collector_account : opt record {
owner : principal;
subaccount : opt vec nat8;
};
archive_options : record {
num_blocks_to_archive : nat64;
max_transactions_per_response : opt nat64;
trigger_threshold : nat64;
max_message_size_bytes : opt nat64;
cycles_for_archive_creation : opt nat64;
node_max_memory_size_bytes : opt nat64;
controller_id : principal;
};
max_memo_length : opt nat16;
token_name : text;
feature_flags : opt record { icrc2 : bool };
}
3: Record field transfer_fee: int is not a subtype of nat64
4: int is not a subtype of nat64), error code None
(base) autumnlqerfa@AutumndeMacBook-Pro ledger % dfx canister install ledger --argument "(variant {Init = record { token_name = \"NAME\"; token_symbol = \"SYMB\"; transfer_fee = 1000000; metadata = vec {}; minting_account = record {owner = principal \"$(dfx --identity minter identity get-principal)\";}; initial_balances = vec {}; archive_options = record {num_blocks_to_archive = 1000000; trigger_threshold = 1000000; controller_id = principal \"$(dfx identity get-principal)\"}; }})"
Installing code for canister ledger, with canister ID bkyz2-fmaaa-aaaaa-qaaaq-cai
Error: Failed to install wasm module to canister 'ledger'.
Caused by: Failed to install wasm module to canister 'ledger'.
Failed during wasm installation call: The replica returned a replica error: Replica Error: reject code CanisterError, reject message Canister bkyz2-fmaaa-aaaaa-qaaaq-cai trapped explicitly: failed to decode call arguments: Custom(Fail to decode argument 0 from table0 to variant {
Upgrade : opt record {
token_symbol : opt text;
transfer_fee : opt nat64;
metadata : opt vec record {
text;
variant { Int : int; Nat : nat; Blob : vec nat8; Text : text };
};
change_fee_collector : opt variant {
SetTo : record { owner : principal; subaccount : opt vec nat8 };
Unset;
};
max_memo_length : opt nat16;
token_name : opt text;
feature_flags : opt record { icrc2 : bool };
};
Init : record {
token_symbol : text;
transfer_fee : nat64;
metadata : vec record {
text;
variant { Int : int; Nat : nat; Blob : vec nat8; Text : text };
};
minting_account : record { owner : principal; subaccount : opt vec nat8 };
initial_balances : vec record {
record { owner : principal; subaccount : opt vec nat8 };
nat64;
};
fee_collector_account : opt record {
owner : principal;
subaccount : opt vec nat8;
};
archive_options : record {
num_blocks_to_archive : nat64;
max_transactions_per_response : opt nat64;
trigger_threshold : nat64;
max_message_size_bytes : opt nat64;
cycles_for_archive_creation : opt nat64;
node_max_memory_size_bytes : opt nat64;
controller_id : principal;
};
max_memo_length : opt nat16;
token_name : text;
feature_flags : opt record { icrc2 : bool };
};
}
Caused by:
0: input: 4449444c056b01b0ced18403016c079efeb9a40371f2c794ae037cefcee7800402aecbeb880403b2a4dab20502a1e5f7a10a0491c9aafe0d716d6f6c01b3b0dac303686c039ea581d2017ca495a5e9067cdec5d8ae0e680100_000453594d42c0843d00011dc83fcebd02e452135c5c6911631ea208149477a1afe81e0a5763e81e0200c0843dc0843d011d819d3561ef06a117fa387994139e6a51d31f8a84b60988672370c33202044e414d45
table: type table0 = variant { 815_032_112 : table1 }
type table1 = record {
881_753_886 : text;
902_112_242 : int;
1_075_439_471 : table2;
1_092_281_774 : table3;
1_448_514_098 : table2;
2_755_523_233 : table4;
3_754_599_569 : text;
}
type table2 = vec empty
type table3 = record { 947_296_307 : principal }
type table4 = record { 440_423_070 : int; 1_831_422_628 : int; 3_856_016_094 : principal }
wire_type: table0, expect_type: variant {
Upgrade : opt record {
token_symbol : opt text;
transfer_fee : opt nat64;
metadata : opt vec record {
text;
variant { Int : int; Nat : nat; Blob : vec nat8; Text : text };
};
change_fee_collector : opt variant {
SetTo : record { owner : principal; subaccount : opt vec nat8 };
Unset;
};
max_memo_length : opt nat16;
token_name : opt text;
feature_flags : opt record { icrc2 : bool };
};
Init : record {
token_symbol : text;
transfer_fee : nat64;
metadata : vec record {
text;
variant { Int : int; Nat : nat; Blob : vec nat8; Text : text };
};
minting_account : record { owner : principal; subaccount : opt vec nat8 };
initial_balances : vec record {
record { owner : principal; subaccount : opt vec nat8 };
nat64;
};
fee_collector_account : opt record {
owner : principal;
subaccount : opt vec nat8;
};
archive_options : record {
num_blocks_to_archive : nat64;
max_transactions_per_response : opt nat64;
trigger_threshold : nat64;
max_message_size_bytes : opt nat64;
cycles_for_archive_creation : opt nat64;
node_max_memory_size_bytes : opt nat64;
controller_id : principal;
};
max_memo_length : opt nat16;
token_name : text;
feature_flags : opt record { icrc2 : bool };
};
}
1: table0 is not a subtype of variant {
Upgrade : opt record {
token_symbol : opt text;
transfer_fee : opt nat64;
metadata : opt vec record {
text;
variant { Int : int; Nat : nat; Blob : vec nat8; Text : text };
};
change_fee_collector : opt variant {
SetTo : record { owner : principal; subaccount : opt vec nat8 };
Unset;
};
max_memo_length : opt nat16;
token_name : opt text;
feature_flags : opt record { icrc2 : bool };
};
Init : record {
token_symbol : text;
transfer_fee : nat64;
metadata : vec record {
text;
variant { Int : int; Nat : nat; Blob : vec nat8; Text : text };
};
minting_account : record { owner : principal; subaccount : opt vec nat8 };
initial_balances : vec record {
record { owner : principal; subaccount : opt vec nat8 };
nat64;
};
fee_collector_account : opt record {
owner : principal;
subaccount : opt vec nat8;
};
archive_options : record {
num_blocks_to_archive : nat64;
max_transactions_per_response : opt nat64;
trigger_threshold : nat64;
max_message_size_bytes : opt nat64;
cycles_for_archive_creation : opt nat64;
node_max_memory_size_bytes : opt nat64;
controller_id : principal;
};
max_memo_length : opt nat16;
token_name : text;
feature_flags : opt record { icrc2 : bool };
};
}
2: Variant field 815_032_112: table1 is not a subtype of record {
token_symbol : text;
transfer_fee : nat64;
metadata : vec record {
text;
variant { Int : int; Nat : nat; Blob : vec nat8; Text : text };
};
minting_account : record { owner : principal; subaccount : opt vec nat8 };
initial_balances : vec record {
record { owner : principal; subaccount : opt vec nat8 };
nat64;
};
fee_collector_account : opt record {
owner : principal;
subaccount : opt vec nat8;
};
archive_options : record {
num_blocks_to_archive : nat64;
max_transactions_per_response : opt nat64;
trigger_threshold : nat64;
max_message_size_bytes : opt nat64;
cycles_for_archive_creation : opt nat64;
node_max_memory_size_bytes : opt nat64;
controller_id : principal;
};
max_memo_length : opt nat16;
token_name : text;
feature_flags : opt record { icrc2 : bool };
}
3: Record field transfer_fee: int is not a subtype of nat64
4: int is not a subtype of nat64), error code None