specVersion: 0.0.2
schema:
  file: ./schema.graphql
dataSources:
  - name: CountdownGriefingEscrowFactory
    kind: ethereum/contract
    network: mainnet
    source:
      address: '0x6eD79Aa1c71FD7BdBC515EfdA3Bd4e26394435cC'
      abi: CountdownGriefingEscrowFactory
    mapping:
      kind: ethereum/events
      apiVersion: 0.0.3
      language: wasm/assemblyscript
      entities:
        - InstanceCreatedCountdownGriefingEscrowFactory
      abis:
        - name: CountdownGriefingEscrowFactory
          file: ./node_modules/@erasure/abis/src/v1.3.0/abis/CountdownGriefingEscrow_Factory.json
      eventHandlers:
        - event: InstanceCreated(indexed address,indexed address,bytes)
          handler: handleInstanceCreated
      file: ./src/CountdownGriefingEscrow.ts
  - name: CountdownGriefingFactory
    kind: ethereum/contract
    network: mainnet
    source:
      address: '0xA57B8a5584442B467b4689F1144D269d096A3daF'
      abi: CountdownGriefingFactory
    mapping:
      kind: ethereum/events
      apiVersion: 0.0.3
      language: wasm/assemblyscript
      entities:
        - InstanceCreatedCountdownGriefingFactory
      abis:
        - name: CountdownGriefingFactory
          file: ./node_modules/@erasure/abis/src/v1.3.0/abis/CountdownGriefing_Factory.json
      eventHandlers:
        - event: InstanceCreated(indexed address,indexed address,bytes)
          handler: handleInstanceCreated
      file: ./src/CountdownGriefing.ts
  - name: SimpleGriefingFactory
    kind: ethereum/contract
    network: mainnet
    source:
      address: '0x9b1f7F645351AF3631a656421eD2e40f2802E6c0'
      abi: SimpleGriefingFactory
    mapping:
      kind: ethereum/events
      apiVersion: 0.0.3
      language: wasm/assemblyscript
      entities:
        - InstanceCreatedSimpleGriefingFactory
      abis:
        - name: SimpleGriefingFactory
          file: ./node_modules/@erasure/abis/src/v1.3.0/abis/SimpleGriefing_Factory.json
      eventHandlers:
        - event: InstanceCreated(indexed address,indexed address,bytes)
          handler: handleInstanceCreated
      file: ./src/SimpleGriefing.ts
  - name: FeedFactory
    kind: ethereum/contract
    network: mainnet
    source:
      address: '0x0E696947A06550DEf604e82C26fd9E493e576337'
      abi: FeedFactory
    mapping:
      kind: ethereum/events
      apiVersion: 0.0.3
      language: wasm/assemblyscript
      entities:
        - InstanceCreatedFeedFactory
      abis:
        - name: FeedFactory
          file: ./node_modules/@erasure/abis/src/v1.3.0/abis/Feed_Factory.json
      eventHandlers:
        - event: InstanceCreated(indexed address,indexed address,bytes)
          handler: handleInstanceCreated
      file: ./src/Feed.ts
templates:
  - name: CountdownGriefingEscrow
    kind: ethereum/contract
    network: mainnet
    source:
      abi: CountdownGriefingEscrow
    mapping:
      kind: ethereum/events
      apiVersion: 0.0.3
      language: wasm/assemblyscript
      entities:
        - CountdownGriefingEscrow
        - CancelledCountdownGriefingEscrow
        - DataSubmittedCountdownGriefingEscrow
        - DeadlineSetCountdownGriefingEscrow
        - DepositDecreasedCountdownGriefingEscrow
        - DepositIncreasedCountdownGriefingEscrow
        - FinalizedCountdownGriefingEscrow
        - InitializedCountdownGriefingEscrow
        - LengthSetCountdownGriefingEscrow
        - MetadataSetCountdownGriefingEscrow
        - OperatorUpdatedCountdownGriefingEscrow
        - PaymentDepositedCountdownGriefingEscrow
        - StakeBurnedCountdownGriefingEscrow
        - StakeDepositedCountdownGriefingEscrow
      file: ./src/CountdownGriefingEscrow.ts
      abis:
        - name: CountdownGriefingEscrow
          file: ./node_modules/@erasure/abis/src/v1.3.0/abis/CountdownGriefingEscrow.json
      eventHandlers:
        - event: Cancelled()
          handler: handleCancelled
        - event: DataSubmitted(bytes)
          handler: handleDataSubmitted
        - event: DeadlineSet(uint256)
          handler: handleDeadlineSet
        - event: DepositDecreased(uint8,address,uint256,uint256)
          handler: handleDepositDecreased
        - event: DepositIncreased(uint8,address,uint256,uint256)
          handler: handleDepositIncreased
        - event: Finalized(address)
          handler: handleFinalized
        - event: Initialized(address,address,address,uint8,uint256,uint256,uint256,bytes,bytes)
          handler: handleInitialized
        - event: LengthSet(uint256)
          handler: handleLengthSet
        - event: MetadataSet(bytes)
          handler: handleMetadataSet
        - event: OperatorUpdated(address)
          handler: handleOperatorUpdated
        - event: PaymentDeposited(address,uint256)
          handler: handlePaymentDeposited
        - event: StakeDeposited(address,uint256)
          handler: handleStakeDeposited
        - event: StakeBurned(uint8,address,uint256)
          handler: handleStakeBurned

  - name: CountdownGriefing
    kind: ethereum/contract
    network: mainnet
    source:
      abi: CountdownGriefing
    mapping:
      kind: ethereum/events
      apiVersion: 0.0.3
      language: wasm/assemblyscript
      entities:
        - CountDownGriefing
        - InitializedCountdownGriefing
        - DeadlineSetCountdownGriefing
        - LengthSetCountdownGriefing
        - RatioSetCountdownGriefing
        #        - DepositDecreasedCountdownGriefing
        #        - DepositIncreasedCountdownGriefing
        - GriefCountdownGriefing
        - MetadataSetCountdownGriefing
        - OperatorUpdatedCountdownGriefing
        - StakeBurnedCountdownGriefing
      file: ./src/CountdownGriefing.ts
      abis:
        - name: CountdownGriefing
          file: ./node_modules/@erasure/abis/src/v1.3.0/abis/CountdownGriefing.json
      eventHandlers:
        - event: Initialized(address,address,address,uint8,uint256,uint8,uint256,bytes)
          handler: handleInitialized
        - event: DeadlineSet(uint256)
          handler: handleDeadlineSet
        - event: LengthSet(uint256)
          handler: handleLengthSet
        #        - event: DepositDecreased(uint8,address,uint256,uint256)
        #          handler: handleDepositDecreased
        #        - event: DepositIncreased(uint8,address,uint256,uint256)
        #          handler: handleDepositIncreased
        - event: Griefed(address,address,uint256,uint256,bytes)
          handler: handleGriefed
        - event: MetadataSet(bytes)
          handler: handleMetadataSet
        - event: OperatorUpdated(address)
          handler: handleOperatorUpdated
        - event: RatioSet(address,uint8,uint256,uint8)
          handler: handleRatioSet
        - event: StakeBurned(uint8,address,uint256)
          handler: handleStakeBurned

  - name: SimpleGriefing
    kind: ethereum/contract
    network: mainnet
    source:
      abi: SimpleGriefing
    mapping:
      kind: ethereum/events
      apiVersion: 0.0.3
      language: wasm/assemblyscript
      entities:
        - SimpleGriefing
        - DepositDecreasedSimpleGriefing
        - DepositIncreasedSimpleGriefing
        - GriefedSimpleGriefing
        - InitializedSimpleGriefing
        - MetadataSetSimpleGriefing
        - OperatorUpdatedSimpleGriefing
        - RatioSetSimpleGriefing
        - StakeBurnedSimpleGriefing
      file: ./src/SimpleGriefing.ts
      abis:
        - name: SimpleGriefing
          file: ./node_modules/@erasure/abis/src/v1.3.0/abis/SimpleGriefing.json
      eventHandlers:
        - event: DepositDecreased(uint8,address,uint256,uint256)
          handler: handleDepositDecreased
        - event: DepositIncreased(uint8,address,uint256,uint256)
          handler: handleDepositIncreased
        - event: Griefed(address,address,uint256,uint256,bytes)
          handler: handleGriefed
        - event: Initialized(address,address,address,uint8,uint256,uint8,bytes)
          handler: handleInitialized
        - event: MetadataSet(bytes)
          handler: handleMetadataSet
        - event: OperatorUpdated(address)
          handler: handleOperatorUpdated
        - event: RatioSet(address,uint8,uint256,uint8)
          handler: handleRatioSet
        - event: StakeBurned(uint8,address,uint256)
          handler: handleStakeBurned

  - name: Feed
    kind: ethereum/contract
    network: mainnet
    source:
      abi: Feed
    mapping:
      kind: ethereum/events
      apiVersion: 0.0.3
      language: wasm/assemblyscript
      entities:
        - Feed
        - DepositDecreasedFeed
        - DepositIncreasedFeed
        - InitializedFeed
        - HashSubmittedFeed
        - MetadataSetFeed
        - OperatorUpdatedFeed
      file: ./src/Feed.ts
      abis:
        - name: Feed
          file: ./node_modules/@erasure/abis/src/v1.3.0/abis/Feed.json
      eventHandlers:
        - event: Initialized(address,bytes)
          handler: handleInitialized
        - event: DepositDecreased(uint8,address,uint256,uint256)
          handler: handleDepositDecreased
        - event: DepositIncreased(uint8,address,uint256,uint256)
          handler: handleDepositIncreased
        - event: HashSubmitted(bytes32)
          handler: handleHashSubmitted
        - event: MetadataSet(bytes)
          handler: handleMetadataSet
        - event: OperatorUpdated(address)
          handler: handleOperatorUpdated
        - event: StakeBurned(uint8,address,uint256)
          handler: handleStakeBurned
