0xa5::interchain_transfer_ticket
use 0x1::ascii;
use 0x2::balance;
use 0xa5::token_id;
InterchainTransferTicket
Types —–
struct InterchainTransferTicket<T>
token_id: token_id::TokenId
balance: balance::Balance<T>
source_address: address
destination_chain: ascii::String
destination_address: vector<u8>
metadata: vector<u8>
version: u64
new
public(friend) fun new<T>(token_id: token_id::TokenId, balance: balance::Balance<T>, source_address: address, destination_chain: ascii::String, destination_address: vector<u8>, metadata: vector<u8>, version: u64): interchain_transfer_ticket::InterchainTransferTicket<T>
public(package) fun new<T>(
token_id: TokenId,
balance: Balance<T>,
source_address: address,
destination_chain: String,
destination_address: vector<u8>,
metadata: vector<u8>,
version: u64,
): InterchainTransferTicket<T> {
InterchainTransferTicket<T> {
token_id,
balance,
source_address,
destination_chain,
destination_address,
metadata,
version,
}
}
destroy
public(friend) fun destroy<T>(self: interchain_transfer_ticket::InterchainTransferTicket<T>): (token_id::TokenId, balance::Balance<T>, address, ascii::String, vector<u8>, vector<u8>, u64)
public(package) fun destroy<T>(
self: InterchainTransferTicket<T>,
): (TokenId, Balance<T>, address, String, vector<u8>, vector<u8>, u64) {
let InterchainTransferTicket<T> {
token_id,
balance,
source_address,
destination_chain,
destination_address,
metadata,
version,
} = self;
(
token_id,
balance,
source_address,
destination_chain,
destination_address,
metadata,
version,
)
}