1

I'm trying to create a subgraph using callHandlers. It doesn't seem to index function calls that come from a smart contract, only EOAs. Is there a way I can ensure these are included in the subgraph?

Here's my subgraph.yaml

specVersion: 0.0.2
schema:
  file: ./schema.graphql
dataSources:
  - kind: ethereum
    name: Vesting
    network: mainnet
    source:
      address: "0x2B79E11984514Ece5B2Db561F49c0466cC7659EA"
      abi: Vesting
      startBlock: 13369330
    mapping:
      kind: ethereum/events
      apiVersion: 0.0.5
      language: wasm/assemblyscript
      entities:
        - Claim
      abis:
        - name: Vesting
          file: ./abis/Vesting.json
      callHandlers:
        - function: setVestingSchedule(address,uint256,bool) 
          handler: handleSetVestingSchedule
        - function: claim()
          handler: handleClaim
        - function: cancelVesting(address)
          handler: handleCancel
      file: ./src/mapping.ts

I know that the setVestingSchedule function was called from a smart contract, but none of those events are being indexed

1 Answer 1

1

Try adding the 'calling contract' to your yaml file. I know that only the events emitted by the two contracts I added to my subgraph have their entities tracked. Less actually as I removed one event for one contract from my yaml.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.