Skip to content

Commit

Permalink
feat: Add v2 prediction subgraph for arbitrum one
Browse files Browse the repository at this point in the history
  • Loading branch information
chef-cannoli committed Jan 15, 2024
1 parent 67c4015 commit 274f7f3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
4 changes: 4 additions & 0 deletions config/arbitrum.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,8 @@ module.exports = {
masterChefAddress: "0x5e09acf80c0296740ec5d6f643005a4ef8daa694",
startBlock: 105053701,
},
predictionV2: {
startBlock: 158927648,
address: "0xF2F90E718a3BFaCb430c1818cB962f05A2631998",
},
};
4 changes: 4 additions & 0 deletions config/zksync-era.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,8 @@ module.exports = {
masterChefAddress: "0x4c615e78c5fca1ad31e4d66eb0d8688d84307463",
startBlock: 8792225,
},
predictionV2: {
startBlock: 22038753,
address: "0x43c7771DEB958A2e3198ED98772056ba70DaA84c",
},
};
6 changes: 4 additions & 2 deletions subgraphs/prediction/v2-generic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
"author": "PancakeSwap",
"license": "GPL-3.0-or-later",
"scripts": {
"template": "mustache ../../../config/arbitrum-goerli.js subgraph.template.yaml > subgraph.yaml",
"template": "mustache ../../config/$NETWORK.js subgraph.template.yaml > subgraph.yaml && mustache ../../config/$NETWORK.js mappings/utils/index.template.ts > mappings/utils/index.ts && mustache ../../config/$NETWORK.js mappings/pricing.template.ts > mappings/pricing.ts",
"codegen": "graph codegen subgraph.yaml",
"build": "graph build subgraph.yaml",
"deploy:bsc": "graph deploy --product hosted-service --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ chef-cannoli/playground-subgraph subgraph.yaml",
"deploy:arbitrum-goerli": "graph deploy --product hosted-service chef-cannoli/prediction-v2-arbitrum-goerli"
"deploy:arbitrum-goerli": "graph deploy --product hosted-service chef-cannoli/prediction-v2-arbitrum-goerli",
"deploy:arbitrum-one": "graph deploy --product hosted-service chef-cannoli/prediction-v2-arbitrum-one",
"deploy:zksync-era": "graph deploy --studio prediction-v2-zksync-era"
}
}
6 changes: 3 additions & 3 deletions subgraphs/prediction/v2-generic/subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ schema:
dataSources:
- kind: ethereum/contract
name: PredictionV2
network: arbitrum-goerli
network: arbitrum-one
source:
address: "0xd5330586c035a67bd32A6FD8e390c72DB9372861"
address: "0xF2F90E718a3BFaCb430c1818cB962f05A2631998"
abi: PredictionV2
startBlock: 52492780
startBlock: 158927648
mapping:
kind: ethereum/events
apiVersion: 0.0.4
Expand Down

0 comments on commit 274f7f3

Please sign in to comment.