Documentation ¶
Index ¶
Constants ¶
const ( FlagSymbolTranslatorFile = "symbol-translator-file" FlagRelayerDbPath = "relayerdb-path" )
Variables ¶
var EventRecords = make(map[string]EthereumEvent)
EventRecords map of transaction hashes to EthereumEvent structs
Functions ¶
func NewEventWrite ¶
func NewEventWrite(txHash string, event EthereumEvent)
NewEventWrite add a validator's address to the official claims list
Types ¶
type CosmosMsg ¶
type CosmosMsg struct { CosmosSender []byte CosmosSenderSequence *big.Int Symbol string Amount sdk.Int EthereumReceiver common.Address ClaimType Event }
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 // CosmosSenderSequence sender's sequence on Cosmos network CosmosSenderSequence // EthereumReceiver receiver's address on Ethereum network EthereumReceiver // Amount is coin's value Amount // Symbol is the coin type Symbol // EthereumSender is ethereum sender address EthereumSender // EthereumSenderNonce is ethereum sender nonce EthereumSenderNonce )
func (CosmosMsgAttributeKey) String ¶
func (d CosmosMsgAttributeKey) String() string
String returns the event type as a string
type EthereumBridgeClaim ¶
type EthereumBridgeClaim struct { EthereumSender common.Address CosmosSender sdk.ValAddress Nonce sdk.Int }
EthereumBridgeClaim for store the EventTypeCreateClaim from cosmos
type EthereumEvent ¶
type EthereumEvent struct { To []byte Symbol string EthereumChainID *big.Int Value *big.Int Nonce *big.Int ClaimType ethbridge.ClaimType ID [32]byte BridgeContractAddress common.Address From common.Address Token common.Address }
EthereumEvent struct is used by LogLock and LogBurn
func (EthereumEvent) Equal ¶
func (e EthereumEvent) Equal(other EthereumEvent) bool
Equal two events
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 // NewProphecyClaim for newProphecyClaim method in smart contract NewProphecyClaim // CreateEthBridgeClaim is a Cosmos msg of type MsgCreateEthBridgeClaim CreateEthBridgeClaim )
type ProphecyClaimEvent ¶
type ProphecyClaimEvent struct { CosmosSender []byte Symbol string ProphecyID *big.Int Amount sdk.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 *big.Int, amount sdk.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
type ProphecyClaimUnique ¶
ProphecyClaimUnique for data part of ProphecyClaim transaction in Ethereum