Skip to content

feat: add subgraph schema for FlatPriceSaleFactory_v_2_1 #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: good-main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions packages/subgraph/src/subgraph.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@ specVersion: 0.0.3
schema:
file: ./src/schema.graphql
dataSources:
{{#PriceTierVestingSale_2_0.[0]}}
- kind: ethereum/contract
name: PriceTierVestingSale_2_0
network: {{../SubgraphNetwork}}
source:
address: '{{Address}}'
abi: PriceTierVestingSale_2_0
startBlock: {{BlockNumber}}
mapping:
kind: ethereum/events
apiVersion: 0.0.6
language: wasm/assemblyscript
file: ./src/sale/v2.0/priceTierVestingSaleMapping.ts
entities:
- Sale
abis:
- name: PriceTierVestingSale_2_0
file: ./abis/contracts/sale/v2/PriceTierVestingSale.sol/PriceTierVestingSale_2_0.json
eventHandlers:
- event: NewSale(indexed address,indexed address,(address,bytes32,uint256,uint256,uint256,uint256,uint256,uint256,string),string,address,bool)
handler: handleNewSale
{{/PriceTierVestingSale_2_0.[0]}}
{{#TrancheVestingSale_2_0.[0]}}
- kind: ethereum/contract
name: TrancheVestingSale_2_0
Expand Down Expand Up @@ -47,6 +69,8 @@ dataSources:
eventHandlers:
- event: NewSale(indexed address,indexed address,(address,bytes32,uint256,uint256,uint256,uint256,uint256,uint256,string),string,address,bool)
handler: handleNewSale
- event: claim(address)
handler: handleClaim
{{/FlatPriceSaleFactory_v_2_1.[0]}}
{{#FlatPriceSale_v_2_1.[0]}}
- kind: ethereum/contract
Expand Down