Skip to main content

EVMTransaction

Information about an Ethereum Virtual Machine (EVM) transaction, including details on associated events if specified.

Supported chains

Network TypeSupported Chains
MainnetETH (Ethereum), FLR (Flare Mainnet), SGB (Songbird Canary-Network)
TestnettestETH (Ethereum Sepolia), testFLR (Flare Testnet Coston2), testSGB (Songbird Testnet Coston)

Request

FieldSolidity TypeDescription
transactionHashbytes32The hash of the transaction.
requiredConfirmationsuint16The number of confirmations required for the block containing the transaction to be considered final by the requestor.
provideInputboolIf set to true, the input data field of the transaction will be included in the response.
listEventsboolIf true, events specified by logIndices will be included in the response. If false, no events are included.
logIndicesuint32[]A list of event indices (logIndex) to be relayed if listEvents is true. Should be sorted by the requestor. Maximum of 50 indices allowed. An empty list indicates all events up to a maximum of 50. If listEvents is false, this field must be empty.
Using Event Logs Correctly
  • Events (logs) are indexed at the block level, not at the transaction level.
  • The contract using this attestation should define the order of event logs, and the requestor should ensure logIndices are sorted according to these specifications.

Response

The response fields align with EVM's JSON-RPC API:

FieldSolidity TypeDescription
blockNumberuint64The block number in which the transaction is included.
timestampuint64The timestamp of the block in which the transaction is included.
sourceAddressaddressThe address (from) that signed the transaction.
isDeploymentboolIndicates whether the transaction is a contract creation (true) or a regular transaction (false).
receivingAddressaddressThe address (to) receiving the transaction. Zero address if isDeployment is true.
valueuint256The value transferred in the transaction, in wei.
inputbytesTransaction input data if provideInput is true; otherwise, returns 0x00.
statusuint8Transaction status: 1 for success, 0 for failure.
eventsEvent[]An array of requested events if listEvents is true; otherwise, an empty array.

Event Struct

Each Event struct represents a log entry similar to EVM event logs:

FieldSolidity TypeDescription
logIndexuint32The index of the event within the block.
emitterAddressaddressThe address of the contract that emitted the event.
topicsbytes32[]An array of up to four 32-byte strings representing indexed log arguments.
databytesNon-indexed log data, concatenated as 32-byte strings. Must be at least 32 bytes long.
removedbooltrue if the log was removed due to a chain reorganization; false if it is still valid.

Verification process

  1. The function checks if the transaction with the given transactionHash is included in a block on the main chain with at least the specified requiredConfirmations.
  2. If the block has insufficient confirmations or if the transaction is not found, the request is rejected.
  3. If listEvents is enabled and an event specified by logIndices does not exist, the request is also rejected.
  4. The specified data (transaction details, input data, and events) is retrieved and relayed based on the request parameters.
Event handling
  • Ensure logIndices are sorted as required by the consuming contract.
  • If logIndices is not empty while listEvents is set to false, the request will be rejected.
  • Events are capped at a maximum of 50 entries to optimize performance.

Contract Interface

For the complete interface definition, see IEVMTransaction.