Module 0xa5::events
use 0x1::ascii;
use 0x1::option;
use 0x1::string;
use 0x2::address;
use 0x2::event;
use 0x2::hash;
use 0x2::object;
use 0xa1::bytes32;
use 0xa1::channel;
use 0xa5::token_id;
use 0xa5::token_manager_type;
Struct CoinRegistered
struct CoinRegistered<T> has copy, drop
Fields
-
token_id: token_id::TokenId
-
Struct InterchainTransfer
struct InterchainTransfer<T> has copy, drop
Fields
-
token_id: token_id::TokenId
-
-
source_address: address
-
-
destination_chain: ascii::String
-
-
destination_address: vector<u8>
-
-
amount: u64
-
-
data_hash: bytes32::Bytes32
-
Struct InterchainTokenDeploymentStarted
struct InterchainTokenDeploymentStarted<T> has copy, drop
Fields
-
token_id: token_id::TokenId
-
-
name: string::String
-
-
symbol: ascii::String
-
-
decimals: u8
-
-
destination_chain: ascii::String
-
Struct InterchainTransferReceived
struct InterchainTransferReceived<T> has copy, drop
Fields
-
message_id: ascii::String
-
-
token_id: token_id::TokenId
-
-
source_chain: ascii::String
-
-
source_address: vector<u8>
-
-
destination_address: address
-
-
amount: u64
-
-
data_hash: bytes32::Bytes32
-
Struct UnregisteredCoinReceived
struct UnregisteredCoinReceived<T> has copy, drop
Fields
-
token_id: token_id::UnregisteredTokenId
-
-
symbol: ascii::String
-
-
decimals: u8
-
Struct UnlinkedCoinReceived
struct UnlinkedCoinReceived<T> has copy, drop
Fields
-
unlinked_token_id: token_id::UnlinkedTokenId
-
-
token_id: token_id::TokenId
-
-
token_manager_type: token_manager_type::TokenManagerType
-
Struct TrustedChainAdded
struct TrustedChainAdded has copy, drop
Fields
-
chain_name: ascii::String
-
Struct TrustedChainRemoved
struct TrustedChainRemoved has copy, drop
Fields
-
chain_name: ascii::String
-
Struct FlowLimitSet
struct FlowLimitSet<T> has copy, drop
Fields
-
token_id: token_id::TokenId
-
-
flow_limit: option::Option<u64>
-
Struct DistributorshipTransfered
struct DistributorshipTransfered<T> has copy, drop
Fields
-
token_id: token_id::TokenId
-
-
new_distributor: option::Option<address>
-
Struct OperatorshipTransfered
struct OperatorshipTransfered<T> has copy, drop
Fields
-
token_id: token_id::TokenId
-
-
new_operator: option::Option<address>
-
Struct InterchainTokenIdClaimed
struct InterchainTokenIdClaimed<T> has copy, drop
Fields
-
token_id: token_id::TokenId
-
-
deployer: object::ID
-
-
salt: bytes32::Bytes32
-
Struct LinkTokenStarted
struct LinkTokenStarted has copy, drop
Fields
-
token_id: token_id::TokenId
-
-
destination_chain: ascii::String
-
-
source_token_address: vector<u8>
-
-
destination_token_address: vector<u8>
-
-
token_manager_type: token_manager_type::TokenManagerType
-
-
link_params: vector<u8>
-
Struct LinkTokenReceived
struct LinkTokenReceived<T> has copy, drop
Fields
-
token_id: token_id::TokenId
-
-
source_chain: ascii::String
-
-
source_token_address: vector<u8>
-
-
token_manager_type: token_manager_type::TokenManagerType
-
-
link_params: vector<u8>
-
struct CoinMetadataRegistered<T> has copy, drop
Fields
-
decimals: u8
-
Function coin_registered
public(friend) fun coin_registered<T>(token_id: token_id::TokenId)
Implementation
public(package) fun coin_registered<T>(token_id: TokenId) {
event::emit(CoinRegistered<T> {
token_id,
});
}
Function interchain_transfer
public(friend) fun interchain_transfer<T>(token_id: token_id::TokenId, source_address: address, destination_chain: ascii::String, destination_address: vector<u8>, amount: u64, data: &vector<u8>)
Implementation
public(package) fun interchain_transfer<T>(
token_id: TokenId,
source_address: address,
destination_chain: String,
destination_address: vector<u8>,
amount: u64,
data: &vector<u8>,
) {
let data_hash = if (data.length() == 0) {
bytes32::new(@0x0)
} else {
bytes32::new(address::from_bytes(keccak256(data)))
};
event::emit(InterchainTransfer<T> {
token_id,
source_address,
destination_chain,
destination_address,
amount,
data_hash,
});
}
Function interchain_token_deployment_started
public(friend) fun interchain_token_deployment_started<T>(token_id: token_id::TokenId, name: string::String, symbol: ascii::String, decimals: u8, destination_chain: ascii::String)
Implementation
public(package) fun interchain_token_deployment_started<T>(
token_id: TokenId,
name: string::String,
symbol: String,
decimals: u8,
destination_chain: String,
) {
event::emit(InterchainTokenDeploymentStarted<T> {
token_id,
name,
symbol,
decimals,
destination_chain,
});
}
Function interchain_transfer_received
public(friend) fun interchain_transfer_received<T>(message_id: ascii::String, token_id: token_id::TokenId, source_chain: ascii::String, source_address: vector<u8>, destination_address: address, amount: u64, data: &vector<u8>)
Implementation
public(package) fun interchain_transfer_received<T>(
message_id: String,
token_id: TokenId,
source_chain: String,
source_address: vector<u8>,
destination_address: address,
amount: u64,
data: &vector<u8>,
) {
let data_hash = bytes32::new(address::from_bytes(keccak256(data)));
event::emit(InterchainTransferReceived<T> {
message_id,
token_id,
source_chain,
source_address,
destination_address,
amount,
data_hash,
});
}
Function unregistered_coin_received
public(friend) fun unregistered_coin_received<T>(token_id: token_id::UnregisteredTokenId, symbol: ascii::String, decimals: u8)
Implementation
public(package) fun unregistered_coin_received<T>(token_id: UnregisteredTokenId, symbol: String, decimals: u8) {
event::emit(UnregisteredCoinReceived<T> {
token_id,
symbol,
decimals,
});
}
Function unlinked_coin_received
public(friend) fun unlinked_coin_received<T>(unlinked_token_id: token_id::UnlinkedTokenId, token_id: token_id::TokenId, token_manager_type: token_manager_type::TokenManagerType)
Implementation
public(package) fun unlinked_coin_received<T>(
unlinked_token_id: UnlinkedTokenId,
token_id: TokenId,
token_manager_type: TokenManagerType,
) {
event::emit(UnlinkedCoinReceived<T> {
unlinked_token_id,
token_id,
token_manager_type,
});
}
Function trusted_chain_added
public(friend) fun trusted_chain_added(chain_name: ascii::String)
Implementation
public(package) fun trusted_chain_added(chain_name: String) {
event::emit(TrustedChainAdded {
chain_name,
});
}
Function trusted_chain_removed
public(friend) fun trusted_chain_removed(chain_name: ascii::String)
Implementation
public(package) fun trusted_chain_removed(chain_name: String) {
event::emit(TrustedChainRemoved {
chain_name,
});
}
Function flow_limit_set
public(friend) fun flow_limit_set<T>(token_id: token_id::TokenId, flow_limit: option::Option<u64>)
Implementation
public(package) fun flow_limit_set<T>(token_id: TokenId, flow_limit: Option<u64>) {
event::emit(FlowLimitSet<T> {
token_id,
flow_limit,
});
}
Function distributorship_transfered
public(friend) fun distributorship_transfered<T>(token_id: token_id::TokenId, new_distributor: option::Option<address>)
Implementation
public(package) fun distributorship_transfered<T>(token_id: TokenId, new_distributor: Option<address>) {
event::emit(DistributorshipTransfered<T> {
token_id,
new_distributor,
});
}
Function operatorship_transfered
public(friend) fun operatorship_transfered<T>(token_id: token_id::TokenId, new_operator: option::Option<address>)
Implementation
public(package) fun operatorship_transfered<T>(token_id: TokenId, new_operator: Option<address>) {
event::emit(OperatorshipTransfered<T> {
token_id,
new_operator,
});
}
Function interchain_token_id_claimed
public(friend) fun interchain_token_id_claimed<T>(token_id: token_id::TokenId, deployer: &channel::Channel, salt: bytes32::Bytes32)
Implementation
public(package) fun interchain_token_id_claimed<T>(token_id: TokenId, deployer: &Channel, salt: Bytes32) {
event::emit(InterchainTokenIdClaimed<T> {
token_id,
deployer: deployer.id(),
salt,
});
}
Function link_token_started
public(friend) fun link_token_started(token_id: token_id::TokenId, destination_chain: ascii::String, source_token_address: vector<u8>, destination_token_address: vector<u8>, token_manager_type: token_manager_type::TokenManagerType, link_params: vector<u8>)
Implementation
public(package) fun link_token_started(
token_id: TokenId,
destination_chain: String,
source_token_address: vector<u8>,
destination_token_address: vector<u8>,
token_manager_type: TokenManagerType,
link_params: vector<u8>,
) {
event::emit(LinkTokenStarted {
token_id,
destination_chain,
source_token_address,
destination_token_address,
token_manager_type,
link_params,
});
}
public(friend) fun coin_metadata_registered<T>(decimals: u8)
Implementation
public(package) fun coin_metadata_registered<T>(decimals: u8) {
event::emit(CoinMetadataRegistered<T> {
decimals,
});
}
Function link_token_received
public(friend) fun link_token_received<T>(token_id: token_id::TokenId, source_chain: ascii::String, source_token_address: vector<u8>, token_manager_type: token_manager_type::TokenManagerType, link_params: vector<u8>)
Implementation
public(package) fun link_token_received<T>(
token_id: TokenId,
source_chain: String,
source_token_address: vector<u8>,
token_manager_type: TokenManagerType,
link_params: vector<u8>,
) {
event::emit(LinkTokenReceived<T> {
token_id,
source_chain,
source_token_address,
token_manager_type,
link_params,
});
}