Open aknowel opened 1 year ago
You need to provide the type structure, like
# transfer 100 token to blackhole address `aaaaa-aa`
params = [
{'type': Types.Principal, 'value': 'aaaaa-aa'},
{'type': Types.Nat, 'value': 10000000000}
]
result = agent.update_raw("gvbup-jyaaa-aaaah-qcdwa-cai", "transfer", encode(params))
For ur code, set params like this:
params = [{
'type': Types.Record({
"memo": Types.Nat64,
"amont": Types.Record({"e8s": Types.Nat64}),
......
}),
'value': {
"memo": 0,
"amount": { "e8s": 100 },
"fee": { "e8s": 0 },
"from_subaccount": None,
"to": ["${TOKENS_TRANSFER_ACCOUNT_ID_BYTES}"],
"created_at_time": [], # None is empty array
}
}]
Better to use Canister
to parse the did file. Pls refer to here
Hi I have a problem using ic-py library.
I would like to mint canister tokens and send request similar to
But I am not sure how to use ic-py params to fulfill my needs. It would be ideal to do something similar to
If you have any idea what approach could I take, please share. Library documentation has only few simple examples and so I couldn't get it done yet