Skip to content

Commit

Permalink
New subggraph
Browse files Browse the repository at this point in the history
  • Loading branch information
Corantin committed Aug 27, 2023
1 parent c9ebb59 commit 79bafdc
Show file tree
Hide file tree
Showing 7 changed files with 236 additions and 230 deletions.
1 change: 0 additions & 1 deletion packages/hardhat/scripts/deploy-govern_queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export default async function deployGovernQueue(
}),
ethers.constants.HashZero,
{
// from:"0x91B0d67D3F47A30FBEeB159E67209Ad6cb2cE22E",
gasPrice: "110000000",
gasLimit: "10000000",
}
Expand Down
8 changes: 7 additions & 1 deletion packages/subgraphs/govern-subgraph/manifest/data/gnosis.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
"startBlock": 25719047,
"address": "0x6D8189C979bBB6768395A78E2AB8A15133459600",
"customTemplate": "GovernQueueV2"
},
{
"name": "GovernQueueV3",
"startBlock": 29612408,
"address": "0x8A33E3015F1a9aBdFd6822E218Eb725021D73EaC",
"customTemplate": "GovernQueueV2"
}
]
}
}
11 changes: 8 additions & 3 deletions packages/subgraphs/govern-subgraph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
"prepare:gnosis": "node ./scripts/sync-with-last-deploy.js xdai",
"manifest:goerli": "node ./scripts/mustache goerli",
"manifest:gnosis": "node ./scripts/mustache gnosis",
"build": "graph codegen && graph build",
"build": "graph build",
"codegen": "graph codegen",
"deploy:goerli": "dotenv -- cross-var yarn manifest:goerli && graph deploy corantin/govern-goerli --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/ --access-token %THE_GRAPH_ACCESS_TOKEN%",
"deploy:goerli-staging": "dotenv -- cross-var yarn manifest:goerli && graph deploy corantin/govern-goerli-staging --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/ --access-token %THE_GRAPH_ACCESS_TOKEN%",
"deploy:gnosis": "dotenv -- cross-var yarn manifest:gnosis && graph deploy corantin/govern-1hive-xdai --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/ --access-token %THE_GRAPH_ACCESS_TOKEN%",
"deploy:gnosis-staging": "dotenv -- cross-var yarn manifest:gnosis && graph deploy corantin/govern-1hive-gnosis-staging --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/ --access-token %THE_GRAPH_ACCESS_TOKEN%",
"create:local": "graph create corantin/govern-1hive-local --node http://localhost:8020",
"deploy:local": "graph deploy corantin/govern-1hive-local --ipfs http://0.0.0.0:5001 --node http://0.0.0.0:8020"
"deploy:local": "graph deploy corantin/govern-1hive-local --ipfs http://0.0.0.0:5001 --node http://0.0.0.0:8020",
"graph": "graph"
},
"devDependencies": {
"@graphprotocol/graph-cli": "^0.19.0",
Expand All @@ -32,5 +34,8 @@
"inquirer": "^8.2.4",
"js-yaml": "^4.1.0"
},
"resolutions": {
"concat-stream": "maxogden/concat-stream#2.0.0"
},
"gitHead": "aabbf6bd2dac11872ba9bb1f1dc8fffb6044aa7c"
}
}
6 changes: 3 additions & 3 deletions packages/subgraphs/govern-subgraph/src/Govern.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Address, BigDecimal, BigInt } from "@graphprotocol/graph-ts";
import { Address } from "@graphprotocol/graph-ts";
import {
Executed as ExecutedEvent,
Frozen as FrozenEvent,
Expand All @@ -10,14 +10,14 @@ import {
} from "../generated/Govern/Govern";
import { Govern, Deposit, Withdraw } from "../generated/schema";
import { frozenRoles, roleGranted, roleRevoked } from "./lib/MiniACL";
import { loadOrCreateContainer } from "./GovernQueue";
import { loadOrThrowContainer } from "./GovernQueue";
import { handleContainerEventExecute } from "./utils/events";
import { buildId, buildIndexedId } from "./utils/ids";
import { ZERO_ADDRESS } from "./utils/constants";

export function handleExecuted(event: ExecutedEvent): void {
let govern = loadOrCreateGovern(event.address);
let container = loadOrCreateContainer(event.params.memo);
let container = loadOrThrowContainer(event.params.memo);

handleContainerEventExecute(container, event);

Expand Down
Loading

0 comments on commit 79bafdc

Please sign in to comment.