Based on the above, along with this section of the Candid guide, I would try initial_mints = vec record { { owner = principal \"$PRINCIPAL\" }; 1_000_000_000; };
dfx deploy icrc1 --argument "( record {\
name = \"<Token name>\"; \
symbol = \"<Token>\"; \
decimals = 6; \
fee = 100; \
max_supply = 1_000_000_000; \
initial_balances =vec { record { owner = principal \"$PRINCIPAL\" ; 1_000_000_000}}; \
advanced_settings = null; \
})"
Everytime this error is coming up
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 'icrc1'.
Failed to create argument blob.
Invalid data: Unable to serialize Candid values: record field 0 not found
It is probably due to the line with initial_balances. What am I doing wrong? @skilesare
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 'icrc1'.
Failed to create argument blob.
Invalid argument: Invalid Candid values: Candid parser error: Unrecognized token `Semi` found at 302:303
Expected one of ")" or ","
After that I tried it with a curly bracket at the end less but I get:
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 'icrc1'.
Failed to create argument blob.
Invalid data: Unable to serialize Candid values: type mismatch: 10000000 can not be of type opt Balance
I just added another field to Types.mo, Token.mo and lib.mo called logo and I initialized the canister again with the new field logo and the base64 code of the logo as a parameter.
It looks like you have the account signature wrong. Iâm not at my desk, but I think if you fix that you might be good. Each account should have an owner and a sub account. The sub account can be no. The owner is a principal. Quotes go around the text to the principal but thereâs a modifier before that text, that does not have quotes around it.
Right, I have now changed that principal is outside the quote. Since âfromâ is optional, I thought I might as well take it out. I keep getting the error
dfx canister --network ic call icrc1 icrc1_transfer '(record{
record{
to= principal "abcd-...";
subaccount=null;
};
amount = 10_000_000;
},)'
Error: Failed to create argument blob.
Caused by: Failed to create argument blob.
Invalid data: Unable to serialize Candid values: record field to not found
Not sure this will help, but you can call get_metadata on the SNS-1 Governance canister using the IC dashboard, and see how it sets the logo string (âdata:image/png;base64,âŚâ)
icrc1_logo isnât part of the spec, so Iâm not sure if it expects the same Base64 representation that SNS does, or if there are any limits to the image dimensions or size in bytes.
Other functions work, such as the transfer, so I am confused. Could you explain me how to specify a path to the candid file for this canister? @paulyoung