Skip to content
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

feat: Improve plugin template manifest data #51

Merged
merged 5 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
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
10 changes: 4 additions & 6 deletions packages/subgraph/manifest/data/arbitrum.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{
"info": "# Do not edit subgraph.yaml,this is a generated file. \n# Instead, edit subgraph.placeholder.yaml and run: yarn manifest",
"network": "arbitrum-one",
"PluginRepo": {
"address": null
},
"dataSources": {
"PluginSetupProcessors": [
{
"name": "PluginSetupProcessor",
"address": "0x308a1DC5020c4B5d992F5543a7236c465997fecB",
"startBlock": 145462184
}
],
"Plugin": {
"name": "MyPlugin",
"address": null,
"startBlock": 7727664
}
]
}
}
10 changes: 4 additions & 6 deletions packages/subgraph/manifest/data/arbitrumGoerli.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{
"info": "# Do not edit subgraph.yaml,this is a generated file. \n# Instead, edit subgraph.placeholder.yaml and run: yarn manifest",
"network": "arbitrum-goerli",
"PluginRepo": {
"address": null
},
"dataSources": {
"PluginSetupProcessors": [
{
"name": "PluginSetupProcessor",
"address": "0x308a1DC5020c4B5d992F5543a7236c465997fecB",
"startBlock": 51930460
}
],
"Plugin": {
"name": "MyPlugin",
"address": null,
"startBlock": 7727664
}
]
}
}
10 changes: 4 additions & 6 deletions packages/subgraph/manifest/data/arbitrumSepolia.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{
"info": "# Do not edit subgraph.yaml,this is a generated file. \n# Instead, edit subgraph.placeholder.yaml and run: yarn manifest",
"network": "arbitrum-sepolia",
"PluginRepo": {
"address": null
},
"dataSources": {
"PluginSetupProcessors": [
{
"name": "PluginSetupProcessor",
"address": "0xC24188a73dc09aA7C721f96Ad8857B469C01dC9f",
"startBlock": 2827173
}
],
"Plugin": {
"name": "MyPlugin",
"address": null,
"startBlock": 7727664
}
]
}
}
10 changes: 4 additions & 6 deletions packages/subgraph/manifest/data/baseGoerli.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{
"info": "# Do not edit subgraph.yaml,this is a generated file. \n# Instead, edit subgraph.placeholder.yaml and run: yarn manifest",
"network": "base-testnet",
"PluginRepo": {
"address": null
},
"dataSources": {
"PluginSetupProcessors": [
{
"name": "PluginSetupProcessor",
"address": "0x6095b5004c59301f8Bb98768Bd395d0bc637C893",
"startBlock": 7890981
}
],
"Plugin": {
"name": "MyPlugin",
"address": null,
"startBlock": 7727664
}
]
}
}
10 changes: 4 additions & 6 deletions packages/subgraph/manifest/data/baseMainnet.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{
"info": "# Do not edit subgraph.yaml,this is a generated file. \n# Instead, edit subgraph.placeholder.yaml and run: yarn manifest",
"network": "base",
"PluginRepo": {
"address": null
},
"dataSources": {
"PluginSetupProcessors": [
{
"name": "PluginSetupProcessor",
"address": "0x91a851E9Ed7F2c6d41b15F76e4a88f5A37067cC9",
"startBlock": 2094737
}
],
"Plugin": {
"name": "MyPlugin",
"address": null,
"startBlock": 7727664
}
]
}
}
10 changes: 4 additions & 6 deletions packages/subgraph/manifest/data/baseSepolia.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{
"info": "# Do not edit subgraph.yaml,this is a generated file. \n# Instead, edit subgraph.placeholder.yaml and run: yarn manifest",
"network": "base-sepolia",
"PluginRepo": {
"address": null
},
"dataSources": {
"PluginSetupProcessors": [
{
"name": "PluginSetupProcessor",
"address": "0xC24188a73dc09aA7C721f96Ad8857B469C01dC9f",
"startBlock": 3654401
}
],
"Plugin": {
"name": "MyPlugin",
"address": null,
"startBlock": 7727664
}
]
}
}
10 changes: 4 additions & 6 deletions packages/subgraph/manifest/data/goerli.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{
"info": "# Do not edit subgraph.yaml,this is a generated file. \n# Instead, edit subgraph.placeholder.yaml and run: yarn manifest",
"network": "goerli",
"PluginRepo": {
"address": null
},
"dataSources": {
"PluginSetupProcessors": [
{
"name": "PluginSetupProcessor",
"address": "0xE8B5d8D66a02CD1b9Bd32a4064D7ABa45F51305e",
"startBlock": 8548226
}
],
"Plugin": {
"name": "MyPlugin",
"address": null,
"startBlock": 7727664
}
]
}
}
12 changes: 5 additions & 7 deletions packages/subgraph/manifest/data/localhost.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{
"info": "# Do not edit subgraph.yaml,this is a generated file. \n# Instead, edit subgraph.placeholder.yaml and run: yarn manifest",
"network": "rinkeby",
"network": "sepolia",
"PluginRepo": {
"address": null
},
"dataSources": {
"PluginSetupProcessors": [
{
"name": "PluginSetupProcessor",
"address": "0x2B8C4DD137104d1E869105cd0106e7D9EF955BfE",
"startBlock": 7727664
}
],
"Plugin": {
"name": "MyPlugin",
"address": null,
"startBlock": 7727664
}
]
}
}
10 changes: 4 additions & 6 deletions packages/subgraph/manifest/data/mainnet.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{
"info": "# Do not edit subgraph.yaml,this is a generated file. \n# Instead, edit subgraph.placeholder.yaml and run: yarn manifest",
"network": "mainnet",
"PluginRepo": {
"address": null
},
"dataSources": {
"PluginSetupProcessors": [
{
"name": "PluginSetupProcessor",
"address": "0xE978942c691e43f65c1B7c7F8f1dc8cDF061B13f",
"startBlock": 16721812
}
],
"Plugin": {
"name": "MyPlugin",
"address": null,
"startBlock": 7727664
}
]
}
}
10 changes: 4 additions & 6 deletions packages/subgraph/manifest/data/mumbai.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{
"info": "# Do not edit subgraph.yaml,this is a generated file. \n# Instead, edit subgraph.placeholder.yaml and run: yarn manifest",
"network": "mumbai",
"PluginRepo": {
"address": null
},
"dataSources": {
"PluginSetupProcessors": [
{
"name": "PluginSetupProcessor",
"address": "0x9227b311C5cecB416707F1C8B7Ca1b52649AabEc",
"startBlock": 33514164
}
],
"Plugin": {
"name": "MyPlugin",
"address": null,
"startBlock": 7727664
}
]
}
}
10 changes: 4 additions & 6 deletions packages/subgraph/manifest/data/polygon.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{
"info": "# Do not edit subgraph.yaml,this is a generated file. \n# Instead, edit subgraph.placeholder.yaml and run: yarn manifest",
"network": "matic",
"PluginRepo": {
"address": null
},
"dataSources": {
"PluginSetupProcessors": [
{
"name": "PluginSetupProcessor",
"address": "0x879D9dfe3F36d7684BeC1a2bB4Aa8E8871A7245B",
"startBlock": 40817440
}
],
"Plugin": {
"name": "MyPlugin",
"address": null,
"startBlock": 7727664
}
]
}
}
10 changes: 4 additions & 6 deletions packages/subgraph/manifest/data/sepolia.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{
"info": "# Do not edit subgraph.yaml,this is a generated file. \n# Instead, edit subgraph.placeholder.yaml and run: yarn manifest",
"network": "sepolia",
"PluginRepo": {
"address": null
},
"dataSources": {
"PluginSetupProcessors": [
{
"name": "PluginSetupProcessor",
"address": "0xC24188a73dc09aA7C721f96Ad8857B469C01dC9f",
"startBlock": 4415294
}
],
"Plugin": {
"name": "MyPlugin",
"address": null,
"startBlock": 7727664
}
]
}
}
2 changes: 1 addition & 1 deletion packages/subgraph/scripts/deploy-subgraph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ echo '> Subgraph version: '$SUBGRAPH_VERSION
# check if the repo address is null or zero address
FILE=manifest/data/$SUBGRAPH_NETWORK_NAME'.json'

address=$(jq -r '.dataSources.Plugin.address' "$FILE")
address=$(jq -r '.PluginRepo.address' "$FILE")

if [ "$address" = "null" ] || [ "$address" = "0x0000000000000000000000000000000000000000" ];
then
Expand Down
2 changes: 1 addition & 1 deletion packages/subgraph/scripts/import-plugin-repo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function extractAndWriteAddressToTS(): void {
const networkManifestPath = path.join(manifestsPath, `${network}.json`);
let networkRepoAddress = JSON.parse(
fs.readFileSync(networkManifestPath, 'utf8')
).dataSources.Plugin.address;
).PluginRepo.address;

// check if address is null and throw warning and continue with zero address
if (!networkRepoAddress) {
Expand Down
Loading