From 2b98d4066fe31224b3eec071491b3aa5ba42b29c Mon Sep 17 00:00:00 2001 From: chef-cannoli Date: Mon, 15 Jan 2024 20:27:45 +0100 Subject: [PATCH 1/2] feat: Add v2 prediction subgraph for arbitrum one for WBTC --- config/arbitrum.js | 4 ++-- subgraphs/prediction/v2-generic/package.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/arbitrum.js b/config/arbitrum.js index 3673e5b1..e0ee46af 100644 --- a/config/arbitrum.js +++ b/config/arbitrum.js @@ -52,7 +52,7 @@ module.exports = { startBlock: 105053701, }, predictionV2: { - startBlock: 158927648, - address: "0xF2F90E718a3BFaCb430c1818cB962f05A2631998", + startBlock: 170624327, + address: "0x870CBfD72970E6ad146310Dd0EC546Db1Cbbe6F8", }, }; diff --git a/subgraphs/prediction/v2-generic/package.json b/subgraphs/prediction/v2-generic/package.json index 988ecd88..dedfd8f6 100644 --- a/subgraphs/prediction/v2-generic/package.json +++ b/subgraphs/prediction/v2-generic/package.json @@ -9,9 +9,9 @@ "template": "mustache ../../../config/$NETWORK.js subgraph.template.yaml > subgraph.yaml", "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:bsc": "graph deploy --product hosted-service --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ subgraph.yaml", "deploy:arbitrum-goerli": "graph deploy --product hosted-service pancakeswap/prediction-v2-arbitrum-goreli", - "deploy:arbitrum": "graph deploy --product hosted-service pancakeswap/prediction-v2-arbitrum", + "deploy:arbitrum": "graph deploy --product hosted-service pancakeswap/prediction-v2-arbitrum-WBTC", "deploy:zksync-era": "graph deploy --studio prediction-v2-zksync-era" } } From e8c27412fd7f045c2595596afda481de3430d83d Mon Sep 17 00:00:00 2001 From: ChefJoJo <94336009+chef-jojo@users.noreply.github.com> Date: Tue, 16 Jan 2024 11:44:52 +0800 Subject: [PATCH 2/2] feat: Update config --- subgraphs/prediction/v2-generic/README.md | 5 +++++ subgraphs/prediction/v2-generic/config/arb-goerli.js | 7 +++++++ subgraphs/prediction/v2-generic/config/arb-wbtc.js | 7 +++++++ subgraphs/prediction/v2-generic/config/arb.js | 7 +++++++ subgraphs/prediction/v2-generic/package.json | 4 ++-- subgraphs/prediction/v2-generic/subgraph.yaml | 4 ++-- 6 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 subgraphs/prediction/v2-generic/README.md create mode 100644 subgraphs/prediction/v2-generic/config/arb-goerli.js create mode 100644 subgraphs/prediction/v2-generic/config/arb-wbtc.js create mode 100644 subgraphs/prediction/v2-generic/config/arb.js diff --git a/subgraphs/prediction/v2-generic/README.md b/subgraphs/prediction/v2-generic/README.md new file mode 100644 index 00000000..e4ff3eb4 --- /dev/null +++ b/subgraphs/prediction/v2-generic/README.md @@ -0,0 +1,5 @@ +## Template + +see `/v2-generic/config` folder for `$CONFIG` options. + +for arb `CONFIG=arb yarn template` diff --git a/subgraphs/prediction/v2-generic/config/arb-goerli.js b/subgraphs/prediction/v2-generic/config/arb-goerli.js new file mode 100644 index 00000000..f5547909 --- /dev/null +++ b/subgraphs/prediction/v2-generic/config/arb-goerli.js @@ -0,0 +1,7 @@ +module.exports = { + network: "arbitrum-goerli", + predictionV2: { + startBlock: 52492780, + address: "0xd5330586c035a67bd32A6FD8e390c72DB9372861", + }, +}; diff --git a/subgraphs/prediction/v2-generic/config/arb-wbtc.js b/subgraphs/prediction/v2-generic/config/arb-wbtc.js new file mode 100644 index 00000000..1893f4f0 --- /dev/null +++ b/subgraphs/prediction/v2-generic/config/arb-wbtc.js @@ -0,0 +1,7 @@ +module.exports = { + network: "arbitrum-one", + predictionV2: { + startBlock: 170624327, + address: "0x870CBfD72970E6ad146310Dd0EC546Db1Cbbe6F8", + }, +}; diff --git a/subgraphs/prediction/v2-generic/config/arb.js b/subgraphs/prediction/v2-generic/config/arb.js new file mode 100644 index 00000000..7c7e7b57 --- /dev/null +++ b/subgraphs/prediction/v2-generic/config/arb.js @@ -0,0 +1,7 @@ +module.exports = { + network: "arbitrum-one", + predictionV2: { + startBlock: 158927648, + address: "0xF2F90E718a3BFaCb430c1818cB962f05A2631998", + }, +}; diff --git a/subgraphs/prediction/v2-generic/package.json b/subgraphs/prediction/v2-generic/package.json index dedfd8f6..3b061182 100644 --- a/subgraphs/prediction/v2-generic/package.json +++ b/subgraphs/prediction/v2-generic/package.json @@ -6,12 +6,12 @@ "author": "PancakeSwap", "license": "GPL-3.0-or-later", "scripts": { - "template": "mustache ../../../config/$NETWORK.js subgraph.template.yaml > subgraph.yaml", + "template": "mustache ./config/$CONFIG.js subgraph.template.yaml > subgraph.yaml", "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/ subgraph.yaml", "deploy:arbitrum-goerli": "graph deploy --product hosted-service pancakeswap/prediction-v2-arbitrum-goreli", - "deploy:arbitrum": "graph deploy --product hosted-service pancakeswap/prediction-v2-arbitrum-WBTC", + "deploy:arbitrum": "graph deploy --product hosted-service pancakeswap/prediction-v2-arbitrum-wbtc", "deploy:zksync-era": "graph deploy --studio prediction-v2-zksync-era" } } diff --git a/subgraphs/prediction/v2-generic/subgraph.yaml b/subgraphs/prediction/v2-generic/subgraph.yaml index 5d57594e..c9e89dd2 100644 --- a/subgraphs/prediction/v2-generic/subgraph.yaml +++ b/subgraphs/prediction/v2-generic/subgraph.yaml @@ -8,9 +8,9 @@ dataSources: name: PredictionV2 network: arbitrum-one source: - address: "0xF2F90E718a3BFaCb430c1818cB962f05A2631998" + address: "0x870CBfD72970E6ad146310Dd0EC546Db1Cbbe6F8" abi: PredictionV2 - startBlock: 158927648 + startBlock: 170624327 mapping: kind: ethereum/events apiVersion: 0.0.4