v1.67.2 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2022 License: BSD-3-Clause Imports: 8 Imported by: 0




View Source
const (
	ClaimTypeUnknown  = ClaimType(0)
	ClaimTypeBurn     = ClaimType(1)
	ClaimTypeLock     = ClaimType(2)
	ClaimTypeWithdraw = ClaimType(3)


This section is empty.


This section is empty.


type BurnEvent

type BurnEvent struct {
	Token           common.Address
	Symbol          string
	Amount          *big.Int
	OwnerFrom       common.Address
	Chain33Receiver []byte
	Nonce           *big.Int

BurnEvent : struct which represents a BurnEvent event

func UnpackLogBurn

func UnpackLogBurn(contractAbi abi.ABI, eventName string, eventData []byte) (burnEvent *BurnEvent, err error)

UnpackLogBurn ...

type BurnEventOnChain33

type BurnEventOnChain33 struct {
	Token            chain33EvmCommon.Hash160Address
	Symbol           string
	Amount           *big.Int
	OwnerFrom        chain33EvmCommon.Hash160Address
	EthereumReceiver []byte
	Nonce            *big.Int


func UnpackChain33LogBurn

func UnpackChain33LogBurn(contractAbi abi.ABI, eventName string, eventData []byte) (burnEvent *BurnEventOnChain33, err error)

type Chain33EvmEvent

type Chain33EvmEvent int
const (
	UnsupportedEvent Chain33EvmEvent = iota

func (Chain33EvmEvent) String

func (d Chain33EvmEvent) String() string

String : returns the event type as a string

type Chain33Msg

type Chain33Msg struct {
	ClaimType            ClaimType
	Chain33Sender        chain33EvmCommon.Address
	EthereumReceiver     common.Address
	TokenContractAddress chain33EvmCommon.Address
	Symbol               string
	Amount               *big.Int
	TxHash               []byte
	Nonce                int64
	ForwardTimes         int32
	ForwardIndex         int64

Chain33Msg : contains data from MsgBurn and MsgLock events

func ParseBurnLock4chain33

func ParseBurnLock4chain33(evmEventType Chain33EvmEvent, data []byte, bridgeBankAbi abi.ABI, chain33TxHash []byte) (*Chain33Msg, error)

ParseBurnLock4chain33 ParseBurnLockTxReceipt : parses data from a Burn/Lock/Withdraw event witnessed on chain33 into a Chain33Msg struct

type ClaimType

type ClaimType int32

func (ClaimType) String

func (d ClaimType) String() string

type Event

type Event int
const (
	// Unsupported : unsupported Chain33 or Ethereum event
	Unsupported Event = iota
	// LogLockFromETH : Ethereum event 'LogLock'
	// LogBurnFromETH : Ethereum event 'LogChain33TokenBurn'

func (Event) String

func (d Event) String() string


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

func UnpackLogLock

func UnpackLogLock(contractAbi abi.ABI, eventName string, eventData []byte) (lockEvent *LockEvent, err error)

UnpackLogLock : Handles new LogLock events

type LockEventOnChain33

type LockEventOnChain33 struct {
	From   chain33EvmCommon.Hash160Address
	To     []byte
	Token  chain33EvmCommon.Hash160Address
	Symbol string
	Value  *big.Int
	Nonce  *big.Int


func UnpackChain33LogLock

func UnpackChain33LogLock(contractAbi abi.ABI, eventName string, eventData []byte) (lockEvent *LockEventOnChain33, err error)

type LogNewBridgeToken

type LogNewBridgeToken struct {
	Token  common.Address
	Symbol string

LogNewBridgeToken ...

type NewProphecyClaimEvent

type NewProphecyClaimEvent struct {
	ProphecyID       *big.Int
	ClaimType        uint8
	Chain33Sender    []byte
	EthereumReceiver common.Address
	ValidatorAddress common.Address
	TokenAddress     common.Address
	Symbol           string
	Amount           *big.Int

NewProphecyClaimEvent : struct which represents a LogNewProphecyClaim event

type WithdrawEventOnChain33 added in v1.66.0

type WithdrawEventOnChain33 struct {
	BridgeToken      chain33EvmCommon.Hash160Address
	Symbol           string
	Amount           *big.Int
	OwnerFrom        chain33EvmCommon.Hash160Address
	EthereumReceiver []byte
	ProxyReceiver    chain33EvmCommon.Hash160Address
	Nonce            *big.Int

发生在chain33 evm上的withdraw事件,当用户发起通过代理人提币交易时,则弹射出该事件信息

func UnpackLogWithdraw added in v1.66.0

func UnpackLogWithdraw(contractAbi abi.ABI, eventName string, eventData []byte) (withdrawEvent *WithdrawEventOnChain33, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL