Skip to content

Commit

Permalink
Merge pull request #105 from VenusProtocol/support-sepolia-deployment
Browse files Browse the repository at this point in the history
feat: support isolated pool subgraph on sepolia
  • Loading branch information
coreyar authored Sep 4, 2023
2 parents 240c654 + a04a3ad commit 3b741e9
Show file tree
Hide file tree
Showing 9 changed files with 2,097 additions and 1,919 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

- uses: actions/setup-node@v2
with:
node-version: 14
node-version: 18
cache: "yarn"

- name: Install deps
Expand All @@ -32,7 +32,7 @@ jobs:

- uses: actions/setup-node@v2
with:
node-version: 14
node-version: 18
cache: "yarn"

- name: Install deps
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"postinstall": "patch-package && ./copy_contracts.sh"
},
"devDependencies": {
"@graphprotocol/client-cli": "^2.2.16",
"@graphprotocol/graph-cli": "0.33.0",
"@graphprotocol/client-cli": "^3.0.0",
"@graphprotocol/graph-cli": "0.55.0",
"@graphprotocol/graph-ts": "0.27.0",
"@nomicfoundation/hardhat-chai-matchers": "^1.0.3",
"@nomicfoundation/hardhat-network-helpers": "^1.0.4",
Expand All @@ -48,6 +48,7 @@
"@types/mustache": "^4.2.1",
"@typescript-eslint/eslint-plugin": "^5.40.1",
"@typescript-eslint/parser": "^5.40.1",
"@venusprotocol/governance-contracts": "^1.0.0",
"@venusprotocol/isolated-pools": "1.0.0",
"@venusprotocol/oracle": "^1.4.1",
"@venusprotocol/venus-protocol": "^0.6.0",
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions subgraphs/isolated-pools/config/sepolia.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"network": "sepolia",
"poolRegistryAddress": "0xe7CE0296D5B0a26fB183ceBf800ECC918eBBD738",
"poolLensAddress": "0x57E0b52dBcC63F5c23fEd947e634aF06Fc20C70b",
"startBlock": "3930059"
}
14 changes: 8 additions & 6 deletions subgraphs/isolated-pools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@
"build:local": "LOCAL=true npx graph build --ipfs http://127.0.0.1:5001",
"create:docker": "npx graph create venusprotocol/venus-isolated-pools --node http://graph-node:8020/",
"build:docker": "npx graph build --ipfs http://ipfs:5001",
"build:mainnet": "npx graph build --ipfs https://api.thegraph.com/ipfs/ ",
"build:bsc": "npx graph build --ipfs https://api.thegraph.com/ipfs/ ",
"deploy:local": "LOCAL=true npx mustache config/local.json template.yaml > subgraph.yaml && npx graph deploy venusprotocol/venus-isolated-pools --debug --ipfs http://127.0.0.1:5001 --node http://127.0.0.1:8020/",
"deploy:docker": "npx mustache config/local.json template.yaml > subgraph.yaml && npx graph deploy venusprotocol/venus-isolated-pools --debug --ipfs http://ipfs:5001 --node http://graph-node:8020/",
"deploy:testnet": "npx mustache config/testnet.json template.yaml > subgraph.yaml && npx graph deploy venusprotocol/venus-isolated-pools-chapel --debug --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy:mainnet": "npx mustache config/mainnet.json template.yaml > subgraph.yaml && npx graph deploy venusprotocol/venus-isolated-pools --debug --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy:chapel": "npx mustache config/chapel.json template.yaml > subgraph.yaml && npx graph deploy venusprotocol/venus-isolated-pools-chapel --debug --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy:bsc": "npx mustache config/bsc.json template.yaml > subgraph.yaml && npx graph deploy venusprotocol/venus-isolated-pools --debug --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/",
"deploy:sepolia": "yarn prepare:sepolia && npx graph deploy --studio venus-isolated-pools-sepolia",
"prepare:local": "npx mustache config/local.json template.yaml > subgraph.yaml && npx mustache config/local.json src/constants/config-template > src/constants/config.ts",
"prepare:testnet": "npx mustache config/testnet.json template.yaml > subgraph.yaml && npx mustache config/testnet.json src/constants/config-template > src/constants/config.ts",
"prepare:mainnet": "npx mustache config/mainnet.json template.yaml > subgraph.yaml && npx mustache config/mainnet.json src/constants/config-template > src/constants/config.ts",
"prepare:chapel": "npx mustache config/chapel.json template.yaml > subgraph.yaml && npx mustache config/chapel.json src/constants/config-template > src/constants/config.ts",
"prepare:bsc": "npx mustache config/bsc.json template.yaml > subgraph.yaml && npx mustache config/bsc.json src/constants/config-template > src/constants/config.ts",
"prepare:sepolia": "npx mustache config/sepolia.json template.yaml > subgraph.yaml && npx mustache config/sepolia.json src/constants/config-template > src/constants/config.ts",
"remove:local": "npx graph remove --node http://127.0.0.1:8020/ venusprotocol/venus-isolated-pools",
"remove:docker": "npx graph remove --node http://graph-node:8020/ venusprotocol/venus-isolated-pools",
"generate-subgraph-types": "rm -rf /subgraph-client/.graphclient && yarn graphclient build --dir ./subgraph-client",
Expand All @@ -34,7 +36,7 @@
"devDependencies": {
"@babel/preset-env": "^7.19.3",
"@babel/preset-typescript": "^7.18.6",
"@graphprotocol/client-cli": "^2.2.16",
"@graphprotocol/client-cli": "^3.0.0",
"@openzeppelin/contracts": "^4.7.3",
"@openzeppelin/contracts-upgradeable": "^4.7.3",
"apollo-fetch": "^0.7.0",
Expand Down
2 changes: 1 addition & 1 deletion subgraphs/venus-governance/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"test:integration": "NETWORK=mainnet PACKAGE=venus-governance hardhat test tests/integration/index.ts --network localhost"
},
"devDependencies": {
"@graphprotocol/client-cli": "^2.2.16",
"@graphprotocol/client-cli": "^3.0.0",
"apollo-fetch": "^0.7.0",
"hardhat": "^2.10.2",
"urql": "^3.0.3",
Expand Down
2 changes: 1 addition & 1 deletion subgraphs/venus-governance/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ dataSources:
- Permission
abis:
- name: AccessControlManger
file: ../../node_modules/@venusprotocol/isolated-pools/artifacts/@venusprotocol/governance-contracts/contracts/Governance/AccessControlManager.sol/AccessControlManager.json
file: ../../node_modules/@venusprotocol/governance-contracts/artifacts/contracts/Governance/AccessControlManager.sol/AccessControlManager.json
eventHandlers:
- event: PermissionGranted(address,address,string)
handler: handlePermissionGranted
Expand Down
Loading

0 comments on commit 3b741e9

Please sign in to comment.