From 0780a11b3ec251a89d28696685331447cf5bcc1f Mon Sep 17 00:00:00 2001 From: juanmardefago Date: Wed, 8 Nov 2023 23:41:29 -0300 Subject: [PATCH] feat: add Sepolia and Arbitrum Sepolia configs --- .../subgraph/config/arbitrum-sepolia.json | 27 +++++++++++++++++++ packages/subgraph/config/sepolia.json | 27 +++++++++++++++++++ packages/subgraph/networks.json | 12 +++++++++ packages/subgraph/package.json | 6 ++++- 4 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 packages/subgraph/config/arbitrum-sepolia.json create mode 100644 packages/subgraph/config/sepolia.json diff --git a/packages/subgraph/config/arbitrum-sepolia.json b/packages/subgraph/config/arbitrum-sepolia.json new file mode 100644 index 00000000..479e91dd --- /dev/null +++ b/packages/subgraph/config/arbitrum-sepolia.json @@ -0,0 +1,27 @@ +{ + "eventful": true, + "permissionList": [ + { + "address": "0x76bc183a6d9ac1e4c5ccb27b7d46ddf0d2cc9868", + "permissions": [ + { "entry": "SetBlockNumbersForEpochMessage" }, + { "entry": "CorrectEpochsMessage" }, + { "entry": "ResetStateMessage" }, + { "entry": "UpdateVersionsMessage" }, + { "entry": "RegisterNetworksMessage" }, + { "entry": "ChangePermissionsMessage", "lastEntry": true } + ], + "validThrough": "0" + }, + { + "address": "0x72ee30d43fb5a90b3fe983156c5d2fbe6f6d07b3", + "permissions": [ + { "entry": "UpdateVersionsMessage" }, + { "entry": "RegisterNetworksMessage" }, + { "entry": "ChangePermissionsMessage", "lastEntry": true } + ], + "validThrough": "0" + } + ], + "epochManager": "0x88b3c7f37253baa1a9b95fead69bd5320585826d" +} diff --git a/packages/subgraph/config/sepolia.json b/packages/subgraph/config/sepolia.json new file mode 100644 index 00000000..05ff8ab4 --- /dev/null +++ b/packages/subgraph/config/sepolia.json @@ -0,0 +1,27 @@ +{ + "eventful": true, + "permissionList": [ + { + "address": "0xc9d59d6d2d43105357a1d9c15244751a4517f42c", + "permissions": [ + { "entry": "SetBlockNumbersForEpochMessage" }, + { "entry": "CorrectEpochsMessage" }, + { "entry": "ResetStateMessage" }, + { "entry": "UpdateVersionsMessage" }, + { "entry": "RegisterNetworksMessage" }, + { "entry": "ChangePermissionsMessage", "lastEntry": true } + ], + "validThrough": "0" + }, + { + "address": "0x4ebf30832ec2db76ae228d5d239083b59f530d1f", + "permissions": [ + { "entry": "UpdateVersionsMessage" }, + { "entry": "RegisterNetworksMessage" }, + { "entry": "ChangePermissionsMessage", "lastEntry": true } + ], + "validThrough": "0" + } + ], + "epochManager": "0x3c39036a76104d7c6d3ef13a21477c0fe23a3aa2" +} diff --git a/packages/subgraph/networks.json b/packages/subgraph/networks.json index 56031f12..36667007 100644 --- a/packages/subgraph/networks.json +++ b/packages/subgraph/networks.json @@ -17,6 +17,18 @@ "startBlock": 4075060 } }, + "sepolia": { + "DataEdge": { + "address": "0xEFC8D47673777b899f2FB597C6FC0E87ecce98Cb", + "startBlock": 4650429 + } + }, + "arbitrum-sepolia": { + "DataEdge": { + "address": "0x9b9402939133F27c6eba81a321dfBFa1feE6714E", + "startBlock": 865937 + } + }, "arbitrum-one": { "DataEdge": { "address": "0x633bb9790d7c4c59991cebd377c0ed6501a35ebe", diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index 4ada18b7..ac486e6c 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -10,6 +10,8 @@ "deploy-arbitrum": "yarn && yarn prep:arbitrum && yarn codegen && graph build --network arbitrum-one && graph deploy --node https://api.thegraph.com/deploy/ graphprotocol/arbitrum-epoch-block-oracle", "deploy-goerli": "yarn && yarn prep:goerli && yarn codegen && graph build --network goerli && graph deploy --node https://api.thegraph.com/deploy/ graphprotocol/goerli-epoch-block-oracle", "deploy-arbitrum-goerli": "yarn && yarn prep:arbitrum-goerli && yarn codegen && graph build --network arbitrum-goerli && graph deploy --node https://api.thegraph.com/deploy/ graphprotocol/arb-goerli-epoch-block-oracle", + "deploy-sepolia": "yarn && yarn prep:sepolia && yarn codegen && graph build --network sepolia && graph deploy --node https://api.thegraph.com/deploy/ graphprotocol/sepolia-epoch-block-oracle", + "deploy-arbitrum-sepolia": "yarn && yarn prep:arbitrum-sepolia && yarn codegen && graph build --network arbitrum-sepolia && graph deploy --node https://api.thegraph.com/deploy/ graphprotocol/arbitrum-sepolia-ebo", "create-local": "graph create --node http://127.0.0.1:8020/ edgeandnode/block-oracle", "remove-local": "graph remove --node http://127.0.0.1:8020/ edgeandnode/block-oracle", "deploy-local": "yarn codegen && graph deploy --node http://127.0.0.1:8020/ --ipfs http://localhost:${IPFS_PORT} edgeandnode/block-oracle --version-label 0.1.0", @@ -18,7 +20,9 @@ "prep:mainnet": "mustache ./config/mainnet.json subgraph.template.yaml > subgraph.yaml && mustache ./config/mainnet.json src/constants.template.ts > src/constants.ts", "prep:arbitrum": "mustache ./config/arbitrum.json subgraph.template.yaml > subgraph.yaml && mustache ./config/arbitrum.json src/constants.template.ts > src/constants.ts", "prep:goerli": "mustache ./config/goerli.json subgraph.template.yaml > subgraph.yaml && mustache ./config/goerli.json src/constants.template.ts > src/constants.ts", - "prep:arbitrum-goerli": "mustache ./config/arbitrum-goerli.json subgraph.template.yaml > subgraph.yaml && mustache ./config/arbitrum-goerli.json src/constants.template.ts > src/constants.ts" + "prep:arbitrum-goerli": "mustache ./config/arbitrum-goerli.json subgraph.template.yaml > subgraph.yaml && mustache ./config/arbitrum-goerli.json src/constants.template.ts > src/constants.ts", + "prep:sepolia": "mustache ./config/sepolia.json subgraph.template.yaml > subgraph.yaml && mustache ./config/sepolia.json src/constants.template.ts > src/constants.ts", + "prep:arbitrum-sepolia": "mustache ./config/arbitrum-sepolia.json subgraph.template.yaml > subgraph.yaml && mustache ./config/arbitrum-sepolia.json src/constants.template.ts > src/constants.ts" }, "devDependencies": { "@graphprotocol/graph-cli": "^0.52.0",