bbb
August 8, 2023, 5:14am
1
Hi everyone!
I am new in Internet Computer.
I am making own token using ICRC-1 standard.
But I don’t know how to do it.
I have experience in other blockchain platforms such as ethereum, binance, solana.
Who know the way to make own token on Internet Computer.
I already read all posts related with this but can’t find perfect solution. Maybe I don’t have deep knowledge of Internet Computer?
Also I found some github repository for ICRC-1 standard.
Please help me with this.
If possible, I want to do it using rust programming language.
Best Regards
No need to code anything - you can simply follow this guide
2 Likes
bbb
August 8, 2023, 7:56am
3
Hi, @Severin .
Thanks for your help.
I followed this tutorial , but while deploying custom tokens on local IC, I got this error.
I tried to fix it but can’t.
administrator@administrator-virtual-machine:~/Desktop/customToken$ dfx deploy --network ${NETWORK} icrc1-ledger --argument '(variant { Init =
record {
token_name = "'${TOKEN_NAME}'";
token_symbol = "'${TOKEN_SYMBOL}'";
minting_account = record { owner = principal "'${MINTER_PRINCIPAL}'";};
initial_balances = vec {};
initial_mints = vec record { { owner = principal "'${MINTER_PRINCIPAL}'" }; 1_000_000_000; };
metadata = vec {};
transfer_fee = 10;
archive_options = record {
trigger_threshold = 2000;
num_blocks_to_archive = 1000;
controller_id = principal "'${ARCHIVE_CONTROLLER}'";
}
}})'
error: unexpected argument 'Token";
token_symbol = "ABC";
minting_account = record { owner = principal "7sozg-mk7m5-3u2tn-tvtl5-ejqsx-xfs2l-rpcng-h22sv-65ol4-xmrxj-4qe";};
initial_balances = vec {};
initial_mints = vec record { { owner = principal "7sozg-mk7m5-3u2tn-tvtl5-ejqsx-xfs2l-rpcng-h22sv-65ol4-xmrxj-4qe" }; 1_000_000_000; };
metadata = vec {};
transfer_fee = 10;
archive_options = record {
trigger_threshold = 2000;
num_blocks_to_archive = 1000;
controller_id = principal "7sozg-mk7m5-3u2tn-tvtl5-ejqsx-xfs2l-rpcng-h22sv-65ol4-xmrxj-4qe";
}
}})' found
How can I fix it?
The quotes look weird. Can you check if TOKEN_NAME
and TOKEN_SYMBOL
are what you’d expect them to be?
bbb
August 8, 2023, 8:53am
5
Hi, @Severin .
I solved problem. It’s because of this: export TOKEN_NAME="My Token"
If we input token name directly, we can put whitespace, but if we use above method, we can’t use whitespace.
I am not sure if it happens only on my side.
Thanks again!
1 Like
If you want to find out why it behaves that way, read up on bash string interpolation and how arguments are separated
1 Like
bbb
August 8, 2023, 9:10am
7
Okay, thanks for your kind guide.
As it is working using the CLI , but as we approved new token to be included than how to call the icrc method to add new token like below .
minting_account_owner: Principal,
fee_collector_account_owner: Option<Principal>,
initial_balances: Vec<(Principal, u128)>, // (owner, balance)
transfer_fee: u128,
decimals: Option<u8>,
token_name: String,
token_symbol: String,
canister_id: Principal,
logo: Option<String>, // New parameter for logo
) -> Result<(), String> {```