Skip to main content
V2 gateway requests require an API key. Set SQD_API_KEY in .env before running gateway-based examples, or pass apiKey: process.env.SQD_API_KEY in GatewaySettings.

@subsquid/frontier

The way the Frontier EVM pallet exposes EVM logs and transactions may change across runtime upgrades. @subsquid/frontier provides helpers that account for those changes.

getEvmLog(event: Event): EvmLog

Extract the EVM log data from EVM.Log event.

getTransaction(call: Call): LegacyTransaction | EIP2930Transaction | EIP1559Transaction

Extract the transaction data from Ethereum.transact call with additional fields depending on the EVM transaction type.

getTransactionResult(ethereumExecuted: Event): {from: string, to: string, transactionHash: string, status: 'Succeed' | 'Error' | 'Revert' | 'Fatal', statusReason: string}

Extract transaction result from an Ethereum.Executed event.

Transaction types

getTransaction() returns the Transaction discriminated union. Check its type field with the exported TransactionType enum to narrow the result:
The package exports these transaction interfaces: All three include hash, from, optional to, nonce, gasLimit, input, value, signature fields r, s, and v, and the type discriminator. The package also exports the Transaction union and AccessListItem interface.

Transaction normalizers

Most handlers should call getTransaction() because it detects the runtime encoding and transaction variant. If you already have a decoded raw Frontier transaction, the package exports the underlying normalizers:
Each normalizer reconstructs canonical fields such as the transaction hash and sender address from the raw payload and signature. See also the Frontier EVM guide.

Complete processor example