Skip to content

Commit

Permalink
Migrate subgraph to base-sepolia
Browse files Browse the repository at this point in the history
  • Loading branch information
kovart committed May 27, 2024
1 parent 6adbe84 commit bbc5a45
Show file tree
Hide file tree
Showing 8 changed files with 96 additions and 440 deletions.
4 changes: 2 additions & 2 deletions subgraph/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Forta Subgraph
The Forta subgraph is currently hosted on chainstack (both dev and production enviornments) and provides visibility to on-chain events around the forta protocol such as staking, rewards, node pools, etc.
The Forta subgraph is currently hosted on TheGraph and Chainstack and provides visibility to on-chain events around the forta protocol such as staking, rewards, node pools, etc.

## Deployment

Expand All @@ -17,4 +17,4 @@ There are two production subgraphs which we follow a [blue/green deployment patt

Forta-a subgraph url: `https://polygon-mainnet.graph-eu.p2pify.com/49e5eba171ac70bd41578331e4d65cfc/forta-a`

Forta-b subgraph url: `https://polygon-mainnet.graph-eu.p2pify.com/62563b45923ea9d259c5c16d1f73f804/forta-b`
Forta-b subgraph url: `https://polygon-mainnet.graph-eu.p2pify.com/62563b45923ea9d259c5c16d1f73f804/forta-b`
104 changes: 61 additions & 43 deletions subgraph/networks.json
Original file line number Diff line number Diff line change
@@ -1,62 +1,80 @@
{
"matic": {
"ScannerRegistry": {
"address": "0xbF2920129f83d75DeC95D97A879942cCe3DcD387",
"startBlock": 20187154
},
"AgentRegistry": {
"address": "0x61447385B019187daa48e91c55c02AF1F1f3F863",
"startBlock": 20187154
},
"Dispatcher": {
"address": "0xd46832F3f8EA8bDEFe5316696c0364F01b31a573",
"startBlock": 20187154
},
"FortaStaking": {
"address": "0xd2863157539b1D11F39ce23fC4834B62082F6874",
"startBlock": 20187154
},
"ScannerPoolRegistry": {
"address": "0x90ff9c193d6714e0e7a923b2bd481fb73fec731d",
"startBlock": 20187154
},
"RewardsDistributor": {
"address": "0xf7239f26b79145297737166b0c66f4919af9c507",
"startBlock": 20187154
},
"StakeAllocator": {
"address": "0x5B73756e637A77Fa52e5Ce71EC6189A4C775c6FA",
"startBlock": 20187154
}
"AgentRegistry": {
"address": "0x61447385B019187daa48e91c55c02AF1F1f3F863",
"startBlock": 20187154
},
"Dispatcher": {
"address": "0xd46832F3f8EA8bDEFe5316696c0364F01b31a573",
"startBlock": 20187154
},
"FortaStaking": {
"address": "0xd2863157539b1D11F39ce23fC4834B62082F6874",
"startBlock": 20187154
},
"ScannerPoolRegistry": {
"address": "0x90ff9c193d6714e0e7a923b2bd481fb73fec731d",
"startBlock": 20187154
},
"RewardsDistributor": {
"address": "0xf7239f26b79145297737166b0c66f4919af9c507",
"startBlock": 20187154
},
"StakeAllocator": {
"address": "0x5B73756e637A77Fa52e5Ce71EC6189A4C775c6FA",
"startBlock": 20187154
}
},
"mumbai": {
"ScannerRegistry": {
"address": "0x569c785b4744E582c65A12827726FC03C8D08A4a",
"AgentRegistry": {
"address": "0x4519Eaeb9A5c1a9d870Fe35452E54AD04E6e8428",
"startBlock": 21300000
},
"Dispatcher": {
"address": "0x485F9c35d90E639f5B591DA5281199Ae59A9794F",
"startBlock": 21300000
},
"FortaStaking": {
"address": "0x64d5192F03bD98dB1De2AA8B4abAC5419eaC32CE",
"startBlock": 21300000
},
"ScannerPoolRegistry": {
"address": "0x9BBEBf9CB94666464D8a5978363B4943D36A05E4",
"startBlock": 29281360
},
"RewardsDistributor": {
"address": "0x404afc59Cacd74A28d0D5651460Cc950b42FAf08",
"startBlock": 21300000
},
"StakeAllocator": {
"address": "0x698A6400dE3865fC9E8A6dB22302AAb3372Cebd9",
"startBlock": 21300000
}
},
"base-sepolia": {
"AgentRegistry": {
"address": "0x4519Eaeb9A5c1a9d870Fe35452E54AD04E6e8428",
"startBlock": 21300000
"address": "0x0C8B8DeC21Aa72179e8C4703a9B55d9Db061D423",
"startBlock": 8150713
},
"Dispatcher": {
"address": "0x485F9c35d90E639f5B591DA5281199Ae59A9794F",
"startBlock": 21300000
"address": "0x452C7044B9977de45ed7621ba0Bb77E312663157",
"startBlock": 8150713
},
"FortaStaking": {
"address": "0x64d5192F03bD98dB1De2AA8B4abAC5419eaC32CE",
"startBlock": 21300000
"address": "0x1ed86971E4C4f3d13b6b8030D80C7D609de7139c",
"startBlock": 8150713
},
"ScannerPoolRegistry": {
"address": "0x9BBEBf9CB94666464D8a5978363B4943D36A05E4",
"startBlock": 29281360
"address": "0x786e4446bB39F5480310FE98c48d2d5e6129A4cC",
"startBlock": 8150713
},
"RewardsDistributor": {
"address": "0x404afc59Cacd74A28d0D5651460Cc950b42FAf08",
"startBlock": 21300000
"address": "0x414E8777Df3e3Af4Ed3e4bA9A2266779F86558e4",
"startBlock": 8150713
},
"StakeAllocator": {
"address": "0x698A6400dE3865fC9E8A6dB22302AAb3372Cebd9",
"startBlock": 21300000
"address": "0xc054a3DABfFEb0279E62669FB699a33D4cC5fC62",
"startBlock": 8150713
}
}
}
}
7 changes: 4 additions & 3 deletions subgraph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"prepare:codegen": "graph codegen subgraph.yaml",
"prepare:compile": "graph build subgraph.yaml --network matic",
"prepare-dev:codegen": "graph codegen subgraph.yaml",
"prepare-dev:compile": "graph build subgraph.yaml --network mumbai",
"prepare-dev:compile": "graph build subgraph.yaml --network base-sepolia",
"prepare": "yarn prepare:codegen && yarn prepare:compile",
"prepare-dev": "yarn prepare-dev:codegen && yarn prepare-dev:compile",
"deploy-dev": "graph deploy --node https://api.graph-eu.p2pify.com/765768b776199f59bb7f1bf37253e73f/deploy --ipfs https://api.graph-eu.p2pify.com/765768b776199f59bb7f1bf37253e73f/ipfs forta-dev",
"deploy-dev": "graph build subgraph.yaml --network base-sepolia",
"deploy": "graph deploy -l v0.0.1 --node https://api.graph-eu.p2pify.com/3e3485fa2703678549290ce52f45ef9c/deploy --ipfs https://api.graph-eu.p2pify.com/3e3485fa2703678549290ce52f45ef9c/ipfs forta-b",
"deploy-theGraph-a": "graph deploy --network matic --node https://api.thegraph.com/deploy/ forta-network/forta-network-a",
"deploy-theGraph-b": "graph deploy --network matic --node https://api.thegraph.com/deploy/ forta-network/forta-network-b",
Expand All @@ -22,7 +22,8 @@
"@graphprotocol/graph-cli": "0.49.0",
"@graphprotocol/graph-ts": "0.27.0",
"matchstick-as": "^0.5.0",
"source-map-support": "^0.5.21"
"source-map-support": "^0.5.21",
"yaml": "^2.4.1"
},
"devDependencies": {
"typescript": "^4.9.5"
Expand Down
221 changes: 0 additions & 221 deletions subgraph/src/datasources/ScannerRegistry.ts

This file was deleted.

4 changes: 2 additions & 2 deletions subgraph/src/tests/.latest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "0.5.0",
"timestamp": 1655722304335
"version": "0.6.0",
"timestamp": 1707758824876
}
Loading

0 comments on commit bbc5a45

Please sign in to comment.