-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add SubgraphAvailabilityManager graph (#1)
- Loading branch information
Showing
13 changed files
with
4,493 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Tests | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
# Install commands | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '20' | ||
registry-url: https://registry.npmjs.org | ||
- name: yarn add ts-node | ||
run: yarn add ts-node | ||
- name: yarn install | ||
run: yarn install | ||
|
||
# Run scripts | ||
- name: Test | ||
run: yarn test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Ignore truffle stuff | ||
build/ | ||
|
||
subgraph.yaml | ||
generated/ | ||
node_modules/ | ||
src/types/ | ||
src/mappings/helpers/metadata.ts | ||
.DS_STORE | ||
yarn-error.log | ||
subgraph.yaml | ||
config/addresses.ts | ||
config/generatedAddresses.json | ||
tests/.bin | ||
.vscode | ||
.latest.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,276 @@ | ||
[ | ||
{ | ||
"inputs": [ | ||
{ "internalType": "address", "name": "_governor", "type": "address" }, | ||
{ | ||
"internalType": "address", | ||
"name": "_rewardsManager", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "_executionThreshold", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "_voteTimeLimit", | ||
"type": "uint256" | ||
}, | ||
{ "internalType": "address[5]", "name": "_oracles", "type": "address[5]" } | ||
], | ||
"stateMutability": "nonpayable", | ||
"type": "constructor" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "from", | ||
"type": "address" | ||
}, | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "to", | ||
"type": "address" | ||
} | ||
], | ||
"name": "NewOwnership", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "from", | ||
"type": "address" | ||
}, | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "to", | ||
"type": "address" | ||
} | ||
], | ||
"name": "NewPendingOwnership", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": true, | ||
"internalType": "uint256", | ||
"name": "index", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "oracle", | ||
"type": "address" | ||
} | ||
], | ||
"name": "OracleSet", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": true, | ||
"internalType": "bytes32", | ||
"name": "subgraphDeploymentID", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "bool", | ||
"name": "deny", | ||
"type": "bool" | ||
}, | ||
{ | ||
"indexed": true, | ||
"internalType": "uint256", | ||
"name": "oracleIndex", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "uint256", | ||
"name": "timestamp", | ||
"type": "uint256" | ||
} | ||
], | ||
"name": "OracleVote", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": false, | ||
"internalType": "uint256", | ||
"name": "voteTimeLimit", | ||
"type": "uint256" | ||
} | ||
], | ||
"name": "VoteTimeLimitSet", | ||
"type": "event" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "NUM_ORACLES", | ||
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "acceptOwnership", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "bytes32", | ||
"name": "_subgraphDeploymentID", | ||
"type": "bytes32" | ||
}, | ||
{ "internalType": "bool", "name": "_deny", "type": "bool" } | ||
], | ||
"name": "checkVotes", | ||
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "currentNonce", | ||
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "executionThreshold", | ||
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "governor", | ||
"outputs": [{ "internalType": "address", "name": "", "type": "address" }], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ "internalType": "uint256", "name": "", "type": "uint256" }, | ||
{ "internalType": "bytes32", "name": "", "type": "bytes32" }, | ||
{ "internalType": "uint256", "name": "", "type": "uint256" } | ||
], | ||
"name": "lastAllowVote", | ||
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ "internalType": "uint256", "name": "", "type": "uint256" }, | ||
{ "internalType": "bytes32", "name": "", "type": "bytes32" }, | ||
{ "internalType": "uint256", "name": "", "type": "uint256" } | ||
], | ||
"name": "lastDenyVote", | ||
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], | ||
"name": "oracles", | ||
"outputs": [{ "internalType": "address", "name": "", "type": "address" }], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "pendingGovernor", | ||
"outputs": [{ "internalType": "address", "name": "", "type": "address" }], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ "internalType": "uint256", "name": "_index", "type": "uint256" }, | ||
{ "internalType": "address", "name": "_oracle", "type": "address" } | ||
], | ||
"name": "setOracle", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ "internalType": "uint256", "name": "_voteTimeLimit", "type": "uint256" } | ||
], | ||
"name": "setVoteTimeLimit", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ "internalType": "address", "name": "_newGovernor", "type": "address" } | ||
], | ||
"name": "transferOwnership", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "bytes32", | ||
"name": "_subgraphDeploymentID", | ||
"type": "bytes32" | ||
}, | ||
{ "internalType": "bool", "name": "_deny", "type": "bool" }, | ||
{ "internalType": "uint256", "name": "_oracleIndex", "type": "uint256" } | ||
], | ||
"name": "vote", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "bytes32[]", | ||
"name": "_subgraphDeploymentID", | ||
"type": "bytes32[]" | ||
}, | ||
{ "internalType": "bool[]", "name": "_deny", "type": "bool[]" }, | ||
{ "internalType": "uint256", "name": "_oracleIndex", "type": "uint256" } | ||
], | ||
"name": "voteMany", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "voteTimeLimit", | ||
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], | ||
"stateMutability": "view", | ||
"type": "function" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"arbitrum-sepolia": { | ||
"SubgraphAvailabilityManager": { | ||
"address": "0x9bDC3264596850E7F5d141A8D898dFA7001355CC", | ||
"startBlock": 22552633 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"name": "network-monitoring-subgraph", | ||
"license": "UNLICENSED", | ||
"scripts": { | ||
"codegen": "graph codegen", | ||
"build": "graph build", | ||
"deploy": "graph deploy --node https://api.studio.thegraph.com/deploy/ network-monitoring-subgraph", | ||
"create-local": "graph create --node http://localhost:8020/ network-monitoring-subgraph", | ||
"remove-local": "graph remove --node http://localhost:8020/ network-monitoring-subgraph", | ||
"deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 network-monitoring-subgraph", | ||
"test": "yarn && yarn prep:test && yarn codegen && graph test", | ||
"prep:test": "mustache ./config/test.json subgraph.template.yaml > subgraph.yaml" | ||
}, | ||
"dependencies": { | ||
"@graphprotocol/graph-cli": "0.61.0", | ||
"@graphprotocol/graph-ts": "0.30.0" | ||
}, | ||
"devDependencies": { | ||
"matchstick-as": "0.5.0", | ||
"mustache": "^4.2.0" | ||
} | ||
} |
Oops, something went wrong.