Documentation ¶
Overview ¶
Package bridge provides types for Bridge events.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventLog ¶
type EventLog interface { // GetContractAddress returns the contract address of the log. GetContractAddress() common.Address // GetBlockNumber returns the block number of the log. GetBlockNumber() uint64 // GetTxHash returns the transaction hash of the log. GetTxHash() common.Hash // GetToken returns the token of the event. GetToken() common.Address // GetAmount returns the amount of the event. GetAmount() *big.Int // GetEventType returns the event type of the log. GetEventType() EventType // GetEventIndex returns the index of the log. GetEventIndex() uint64 // GetRecipient returns the recipient of the event. GetRecipient() *common.Address // GetDestinationChainID returns the chain id of the token deposit. GetDestinationChainID() *big.Int // GetTokenIndexFrom returns the token index of the token deposit and swap. GetTokenIndexFrom() *uint8 // GetTokenIndexTo returns the token index of the token deposit and swap. GetTokenIndexTo() *uint8 // GetMinDy returns the min dy of the token deposit and swap. GetMinDy() *big.Int // GetDeadline returns the deadline of the token deposit and swap. GetDeadline() *big.Int // GetSwapTokenIndex returns the swap token index of the token redeem and remove. GetSwapTokenIndex() *uint8 // GetSwapMinAmount returns the swap min amount of the token redeem and remove. GetSwapMinAmount() *big.Int // GetSwapDeadline returns the swap deadline of the token redeem and remove. GetSwapDeadline() *big.Int // GetRecipientBytes returns the recipient of the event. GetRecipientBytes() *[32]byte // GetFee returns the fee of the token withdraw. GetFee() *big.Int // GetKappa returns the kappa of the token withdraw. GetKappa() *[32]byte // GetSwapSuccess returns the swap success of the token withdraw and remove. GetSwapSuccess() *bool }
EventLog is the interface for all bridge events.
type EventType ¶
type EventType uint8
EventType is the type of the bridge event.
const ( // DepositEvent is the token deposit event. DepositEvent EventType = iota // RedeemEvent is the token redeem event. RedeemEvent // WithdrawEvent is the token withdraw event. WithdrawEvent // MintEvent is the token mint event. MintEvent // DepositAndSwapEvent is the token deposit and swap event. DepositAndSwapEvent // MintAndSwapEvent is the token mint and swap event. MintAndSwapEvent // RedeemAndSwapEvent is the token redeem and swap event. RedeemAndSwapEvent // RedeemAndRemoveEvent is the token redeem and remove event. RedeemAndRemoveEvent // WithdrawAndRemoveEvent is the token withdraw and remove event. WithdrawAndRemoveEvent // RedeemV2Event is the token redeem v2 event. RedeemV2Event )
func (EventType) BridgeInitiated ¶
BridgeInitiated determines whether or not the event type is initiated by the bridge (as opposed to the user).
func (EventType) GormDataType ¶
GormDataType gets the data type to use for gorm.
Click to show internal directories.
Click to hide internal directories.