- Constants
- Function
transfer_coin
- Function
transfer_coin_to_bitcoin_address
- Function
transfer_coin_to_multichain_address
- Function
transfer_object
- Function
transfer_object_to_bitcoin_address
use 0x1::option;
use 0x1::string;
use 0x2::object;
use 0x3::account_coin_store;
use 0x3::address_mapping;
use 0x3::bitcoin_address;
use 0x3::multichain_address;
const ErrorAddressMappingNotExists: u64 = 1;
Transfer amount
of coins CoinType
from from
to to
.
This public entry function requires the CoinType
to have key
and store
abilities.
public entry fun transfer_coin<CoinType: store, key>(from: &signer, to: address, amount: u256)
Transfer amount
of coins CoinType
from from
to a Bitcoin Address.
public entry fun transfer_coin_to_bitcoin_address<CoinType: store, key>(from: &signer, to: string::String, amount: u256)
Transfer amount
of coins CoinType
from from
to a MultiChainAddress.
The MultiChainAddress is represented by multichain_id
and raw_address
.
This public entry function requires the CoinType
to have key
and store
abilities.
public entry fun transfer_coin_to_multichain_address<CoinType: store, key>(from: &signer, multichain_id: u64, raw_address: vector<u8>, amount: u256)
Transfer from
owned Object<T>
to to
account.
public entry fun transfer_object<T: store, key>(to: address, obj: object::Object<T>)
Transfer from
owned Object<T>
to a Bitcoin Address.
public entry fun transfer_object_to_bitcoin_address<T: store, key>(to: string::String, obj: object::Object<T>)