Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var EventRecords = make(map[string]EthereumEvent)
EventRecords map of transaction hashes to EthereumEvent structs
Functions ¶
func IsEventRecorded ¶
IsEventRecorded checks the sessions stored events for this transaction hash
func NewEventWrite ¶
func NewEventWrite(txHash string, event EthereumEvent)
NewEventWrite add a validator's address to the official claims list
func PrintEventByTx ¶
func PrintEventByTx(txHash string)
PrintEventByTx prints any witnessed events associated with a given transaction hash
Types ¶
type CosmosMsg ¶
type CosmosMsg struct { ClaimType Event CosmosSender []byte EthereumReceiver common.Address Symbol string Amount *big.Int }
CosmosMsg contains data from MsgBurn and MsgLock events
type CosmosMsgAttributeKey ¶
type CosmosMsgAttributeKey int
CosmosMsgAttributeKey enum containing supported attribute keys
const ( // UnsupportedAttributeKey unsupported attribute key UnsupportedAttributeKey CosmosMsgAttributeKey = iota // CosmosSender sender's address on Cosmos network CosmosSender // EthereumReceiver receiver's address on Ethereum network EthereumReceiver // Amount is coin's value Amount // Symbol is the coin type Symbol )
func (CosmosMsgAttributeKey) String ¶
func (d CosmosMsgAttributeKey) String() string
String returns the event type as a string
type EthereumEvent ¶
type EthereumEvent struct { EthereumChainID *big.Int BridgeContractAddress common.Address ID [32]byte From common.Address To []byte Token common.Address Symbol string Value *big.Int Nonce *big.Int ClaimType ethbridge.ClaimType }
EthereumEvent struct is used by LogLock and LogBurn
type Event ¶
type Event byte
Event enum containing supported chain events
const ( // Unsupported is an invalid Cosmos or Ethereum event Unsupported Event = iota // MsgBurn is a Cosmos msg of type MsgBurn MsgBurn // MsgLock is a Cosmos msg of type MsgLock MsgLock // LogLock is for Ethereum event LogLock LogLock // LogBurn is for Ethereum event LogBurn LogBurn // LogNewProphecyClaim is an Ethereum event named 'LogNewProphecyClaim' LogNewProphecyClaim )
type ProphecyClaimEvent ¶
type ProphecyClaimEvent struct { CosmosSender []byte Symbol string ProphecyID *big.Int Amount *big.Int EthereumReceiver common.Address ValidatorAddress common.Address TokenAddress common.Address ClaimType uint8 }
ProphecyClaimEvent struct which represents a LogNewProphecyClaim event
func NewProphecyClaimEvent ¶
func NewProphecyClaimEvent(cosmosSender []byte, symbol string, prophecyID, amount *big.Int, ethereumReceiver, validatorAddress, tokenAddress common.Address, claimType uint8) ProphecyClaimEvent
NewProphecyClaimEvent creates a new ProphecyClaimEvent
func (ProphecyClaimEvent) String ¶
func (p ProphecyClaimEvent) String() string
String implements fmt.Stringer