Function coreledger_backend::int_transfer_tokens
pub async fn int_transfer_tokens(
unique_asset_id: UniqueAssetId,
receiver: Principal,
amount: u256
) -> Response
Expand description
Transfers tokens from one account to another.
Can be called by anyone, and the sender is always msg.sender.
§Parameters
unique_asset_id
: The global unique ID of the asset.receiver
: Receiver of the tokens.amount
: Number of tokens.
§Result
tx_id
: Id of the transaction.
§Sample request
UNIQUE_ASSET_ID=0xF94E2AD9DD5CBBC041430001
PRINCIPAL='principal "dimdt-vwpm3-tkwgu-c2nkv-txykr-atn2x-xras5-6xidt-wtti3-i4xr6-vqe"'
TOKENS_TO_TRANSFER=500
dfx canister call coreledger_backend int_transfer_tokens "($UNIQUE_ASSET_ID, $PRINCIPAL, $TOKENS_TO_TRANSFER)"
§Sample response
( record {
tx_id = 64_902_045_878_680_215_161_103_406_576_570_366_475_824_533_393_005_533_149_888_825_789_042_550_227_580 : nat
})