Documentation ¶
Index ¶
Constants ¶
View Source
const ( ClaimTypeUnknown = ClaimType(0) ClaimTypeBurn = ClaimType(1) ClaimTypeLock = ClaimType(2) ClaimTypeWithdraw = ClaimType(3) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BurnEvent ¶
type BurnEvent struct { Token common.Address Symbol string Amount *big.Int OwnerFrom common.Address ChainReceiver []byte Nonce *big.Int }
BurnEvent : struct which represents a BurnEvent event
type BurnEventOnChain ¶
type BurnEventOnChain struct { Token chainEvmCommon.Hash160Address Symbol string Amount *big.Int OwnerFrom chainEvmCommon.Hash160Address EthereumReceiver []byte Nonce *big.Int }
发生在chainevm上的burn事件,当eth/erc20资产需要提币回到以太坊链上时,会发生该种事件
func UnpackChainLogBurn ¶
type ChainEvmEvent ¶
type ChainEvmEvent int
const ( UnsupportedEvent ChainEvmEvent = iota //在chain的evm合约中产生了lock事件 ChainEventLogLock //在chain的evm合约中产生了burn事件 ChainEventLogBurn //在chain的evm合约中产生了withdraw事件 ChainEventLogWithdraw )
func (ChainEvmEvent) String ¶
func (d ChainEvmEvent) String() string
String : returns the event type as a string
type ChainMsg ¶
type ChainMsg struct { ClaimType ClaimType ChainSender chainEvmCommon.Address EthereumReceiver common.Address TokenContractAddress chainEvmCommon.Address Symbol string Amount *big.Int TxHash []byte Nonce int64 ForwardTimes int32 ForwardIndex int64 }
ChainMsg : contains data from MsgBurn and MsgLock events
func ParseBurnLock4chain ¶
func ParseBurnLock4chain(evmEventType ChainEvmEvent, data []byte, bridgeBankAbi abi.ABI, chainTxHash []byte) (*ChainMsg, error)
ParseBurnLock4chain ParseBurnLockTxReceipt : parses data from a Burn/Lock/Withdraw event witnessed on chain into a ChainMsg struct
type Event ¶
type Event int
const ( // Unsupported : unsupported Chain or Ethereum event Unsupported Event = iota // LogLockFromETH : Ethereum event 'LogLock' LogLockFromETH // LogBurnFromETH : Ethereum event 'LogChainTokenBurn' LogBurnFromETH // LogProphecyProcessed : Ethereum event LogProphecyProcessed LogProphecyProcessed )
type LockEvent ¶
type LockEvent struct { From common.Address To []byte Token common.Address Symbol string Value *big.Int Nonce *big.Int }
LockEvent : struct which represents a LogLock event
type LockEventOnChain ¶
type LockEventOnChain struct { From chainEvmCommon.Hash160Address To []byte Token chainEvmCommon.Hash160Address Symbol string Value *big.Int Nonce *big.Int }
发生在chainevm上的lock事件,当bty跨链转移到eth时会发生该种事件
func UnpackChainLogLock ¶
type LogNewBridgeToken ¶
LogNewBridgeToken ...
type NewProphecyClaimEvent ¶
type NewProphecyClaimEvent struct { ProphecyID *big.Int ClaimType uint8 ChainSender []byte EthereumReceiver common.Address ValidatorAddress common.Address TokenAddress common.Address Symbol string Amount *big.Int }
NewProphecyClaimEvent : struct which represents a LogNewProphecyClaim event
type NewProphecyProcessed ¶
type NewProphecyProcessed struct { ClaimID [32]byte WeightedSignedPower *big.Int WeightedTotalPower *big.Int Submitter common.Address }
NewProphecyProcessed struct which represents a LogProphecyProcessed
type WithdrawEventOnChain ¶
type WithdrawEventOnChain struct { BridgeToken chainEvmCommon.Hash160Address Symbol string Amount *big.Int OwnerFrom chainEvmCommon.Hash160Address EthereumReceiver []byte ProxyReceiver chainEvmCommon.Hash160Address Nonce *big.Int }
发生在chain evm上的withdraw事件,当用户发起通过代理人提币交易时,则弹射出该事件信息
func UnpackLogWithdraw ¶
Click to show internal directories.
Click to hide internal directories.