Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

v0.11.0

Compare
Choose a tag to compare
@Jannis Jannis released this 09 May 08:38

EthereumCall type for transaction/call handlers

This is part of the added support for handling transactions/calls made to contracts, in addition to events. The EthereumCall type serves as the base type for the function types that are generated as part of graph codegen.

It has the following structure:

export class EthereumCall {
  address: Address
  block: EthereumBlock
  transaction: EthereumTransaction
  inputValues: Array<EthereumEventParam>
  outputValues: Array<EthereumEventParam>
}

The address is the address of the contract that was called or to which a transaction was made. The block and transaction fields are the block and transaction that the call was made in. The inputValues and outputValues are dynamically typed function parameters and return values.

When defining call handlers in a subgraph, subclasses are generated with typed inputs and outputs properties.