Documentation ¶
Index ¶
Constants ¶
const ( EventTypeBlockExecuted flow.EventType = "EVM.BlockExecuted" EventTypeTransactionExecuted flow.EventType = "EVM.TransactionExecuted" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BlockEventPayload ¶
type BlockEventPayload struct { Height uint64 `cadence:"height"` Hash gethCommon.Hash `cadence:"hash"` Timestamp uint64 `cadence:"timestamp"` TotalSupply cadence.Int `cadence:"totalSupply"` TotalGasUsed uint64 `cadence:"totalGasUsed"` ParentBlockHash gethCommon.Hash `cadence:"parentHash"` ReceiptRoot gethCommon.Hash `cadence:"receiptRoot"` TransactionHashRoot gethCommon.Hash `cadence:"transactionHashRoot"` }
func DecodeBlockEventPayload ¶
func DecodeBlockEventPayload(event cadence.Event) (*BlockEventPayload, error)
DecodeBlockEventPayload decodes Cadence event into block event payload.
type Event ¶
type Event struct { Etype flow.EventType Payload EventPayload }
func NewBlockEvent ¶
NewBlockEvent creates a new block event with the given block as payload.
func NewTransactionEvent ¶
NewTransactionEvent creates a new transaction event with the given parameters - result: the result of the transaction execution - payload: the RLP-encoded payload of the transaction - blockHeight: the height of the block where the transaction is included
type EventPayload ¶
type FLOWTokensDepositedEventPayload ¶
type FLOWTokensDepositedEventPayload struct { Address string `cadence:"address"` Amount cadence.UFix64 `cadence:"amount"` DepositedUUID uint64 `cadence:"depositedUUID"` BalanceAfterInAttoFlow cadence.Int `cadence:"balanceAfterInAttoFlow"` }
FLOWTokensDepositedEventPayload captures payloads for a FlowTokenDeposited event
func DecodeFLOWTokensDepositedEventPayload ¶
func DecodeFLOWTokensDepositedEventPayload(event cadence.Event) (*FLOWTokensDepositedEventPayload, error)
DecodeFLOWTokensDepositedEventPayload decodes a flow FLOWTokenDeposited events into a FLOWTokensEventDepositedPayload
type FLOWTokensWithdrawnEventPayload ¶
type FLOWTokensWithdrawnEventPayload struct { Address string `cadence:"address"` Amount cadence.UFix64 `cadence:"amount"` WithdrawnUUID uint64 `cadence:"withdrawnUUID"` BalanceAfterInAttoFlow cadence.Int `cadence:"balanceAfterInAttoFlow"` }
FLOWTokensWithdrawnEventPayload captures payloads for a FlowTokensWithdrawn event
func DecodeFLOWTokensWithdrawnEventPayload ¶
func DecodeFLOWTokensWithdrawnEventPayload(event cadence.Event) (*FLOWTokensWithdrawnEventPayload, error)
DecodeFLOWTokensWithdrawnEventPayload decodes a flow FLOWTokensWithdrawn events into a FLOWTokensEventDepositedPayload
type TransactionEventPayload ¶
type TransactionEventPayload struct { Hash gethCommon.Hash `cadence:"hash"` Index uint16 `cadence:"index"` TransactionType uint8 `cadence:"type"` Payload []byte `cadence:"payload"` ErrorCode uint16 `cadence:"errorCode"` GasConsumed uint64 `cadence:"gasConsumed"` ContractAddress string `cadence:"contractAddress"` Logs []byte `cadence:"logs"` BlockHeight uint64 `cadence:"blockHeight"` ErrorMessage string `cadence:"errorMessage"` ReturnedData []byte `cadence:"returnedData"` PrecompiledCalls []byte `cadence:"precompiledCalls"` }
func DecodeTransactionEventPayload ¶
func DecodeTransactionEventPayload(event cadence.Event) (*TransactionEventPayload, error)
DecodeTransactionEventPayload decodes Cadence event into transaction event payload.