specVersion: 0.0.5
schema:
    file: ./schema.graphql
dataSources:
    - kind: ethereum
      name: Semaphore
      network: {{ network }}
      source:
          address: "{{ address }}"
          abi: Semaphore
          startBlock: {{ startBlock }}
      mapping:
          kind: ethereum/events
          apiVersion: 0.0.7
          language: wasm/assemblyscript
          entities:
              - Group
              - Member
          abis:
              - name: Semaphore
                file: ../../node_modules/@semaphore-protocol/utils/src/semaphore-interface.json
          eventHandlers:
              - event: GroupCreated(indexed uint256)
                handler: createGroup
              - event: GroupAdminUpdated(indexed uint256,indexed address,indexed address)
                handler: updateGroupAdmin
              - event: MemberAdded(indexed uint256,uint256,uint256,uint256)
                handler: addMember
              - event: MemberUpdated(indexed uint256,uint256,uint256,uint256,uint256)
                handler: updateMember
              - event: MemberRemoved(indexed uint256,uint256,uint256,uint256)
                handler: removeMember
              - event: MembersAdded(indexed uint256,uint256,uint256[],uint256)
                handler: addMembers
              - event: ProofValidated(indexed uint256,uint256,indexed uint256,uint256,uint256,indexed uint256,uint256[8])
                handler: addValidatedProof
          file: ./src/semaphore.ts
