0xa1::events
SignersRotated
ChannelCreated
ChannelDestroyed
ContractCall
MessageApproved
MessageExecuted
signers_rotated
channel_created
channel_destroyed
contract_call
message_approved
message_executed
use 0x1::ascii;
use 0x2::event;
use 0xa1::bytes32;
use 0xa1::message;
use 0xa1::weighted_signers;
SignersRotated
Emitted when signers are rotated.
struct SignersRotated has copy, drop
epoch: u64
signers_hash: bytes32::Bytes32
signers: weighted_signers::WeightedSigners
ChannelCreated
Emitted when a new channel is created.
struct ChannelCreated has copy, drop
id: address
ChannelDestroyed
Emitted when a channel is destroyed.
struct ChannelDestroyed has copy, drop
id: address
ContractCall
Emitted when a new message is sent from the SUI network.
struct ContractCall has copy, drop
source_id: address
destination_chain: ascii::String
destination_address: ascii::String
payload: vector<u8>
payload_hash: address
MessageApproved
Emitted when a new message is approved by the gateway.
struct MessageApproved has copy, drop
MessageExecuted
Emitted when a message is taken to be executed by a channel.
struct MessageExecuted has copy, drop
signers_rotated
public(friend) fun signers_rotated(epoch: u64, signers_hash: bytes32::Bytes32, signers: weighted_signers::WeightedSigners)
public(package) fun signers_rotated(
epoch: u64,
signers_hash: Bytes32,
signers: WeightedSigners,
) {
event::emit(SignersRotated {
epoch,
signers_hash,
signers,
});
}
channel_created
public(friend) fun channel_created(id: address)
public(package) fun channel_created(id: address) {
event::emit(ChannelCreated {
id,
});
}
channel_destroyed
public(friend) fun channel_destroyed(id: address)
public(package) fun channel_destroyed(id: address) {
event::emit(ChannelDestroyed {
id,
});
}
contract_call
public(friend) fun contract_call(source_id: address, destination_chain: ascii::String, destination_address: ascii::String, payload: vector<u8>, payload_hash: address)
public(package) fun contract_call(
source_id: address,
destination_chain: String,
destination_address: String,
payload: vector<u8>,
payload_hash: address,
) {
event::emit(ContractCall {
source_id,
destination_chain,
destination_address,
payload,
payload_hash,
});
}
message_approved
public(friend) fun message_approved(message: message::Message)
public(package) fun message_approved(message: Message) {
event::emit(MessageApproved {
message,
});
}
message_executed
public(friend) fun message_executed(message: message::Message)
public(package) fun message_executed(message: Message) {
event::emit(MessageExecuted {
message,
});
}