@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:
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 callgetTransaction() because it detects the runtime encoding and transaction variant. If you already have a decoded raw Frontier transaction, the package exports the underlying normalizers: