From 8833c5f66f9d82cfbcf033219139463b45575bd0 Mon Sep 17 00:00:00 2001 From: fabrizio Date: Wed, 16 Nov 2022 17:03:27 -0300 Subject: [PATCH] Replace Rinkeby for Goerli --- .github/workflows/deploy_testnet.yml | 24 ++++++++++++------------ README.md | 9 +++++++-- blacklisted-modules.js | 7 +++---- package.json | 8 ++++---- scripts/build-manifest.sh | 10 +++++----- 5 files changed, 31 insertions(+), 27 deletions(-) diff --git a/.github/workflows/deploy_testnet.yml b/.github/workflows/deploy_testnet.yml index 5b38917..2b2a235 100644 --- a/.github/workflows/deploy_testnet.yml +++ b/.github/workflows/deploy_testnet.yml @@ -3,7 +3,7 @@ name: Deploy Testnets on: push: branches: - - 'master' + - "master" env: GRAPHKEY: ${{secrets.GRAPHKEY}} @@ -12,14 +12,14 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Install - run: npm install - - name: Authenticate - run: .github/scripts/kubectl-config.sh ${{secrets.KUBE_CA}} ${{secrets.KUBE_SERVER}} ${{secrets.KUBE_TOKEN}} - - name: Staging - run: npm run deploy:staging - - name: Rinkeby - run: npm run deploy:rinkeby - - name: Ropsten - run: npm run deploy:ropsten + - uses: actions/checkout@v2 + - name: Install + run: npm install + - name: Authenticate + run: .github/scripts/kubectl-config.sh ${{secrets.KUBE_CA}} ${{secrets.KUBE_SERVER}} ${{secrets.KUBE_TOKEN}} + - name: Staging + run: npm run deploy:staging + - name: Goerli + run: npm run deploy:goerli + - name: Ropsten + run: npm run deploy:ropsten diff --git a/README.md b/README.md index 6d764d1..8cff37d 100644 --- a/README.md +++ b/README.md @@ -11,13 +11,14 @@ ### Remotes 1. [Xdai](https://thegraph.com/explorer/subgraph/1hive/celeste) -2. [Rinkeby](https://thegraph.com/explorer/subgraph/1hive/celeste-rinkeby) +2. [Goerli](https://thegraph.com/explorer/subgraph/1hive/celeste-goerli) ### Local To test the subgraph locally please do the following tasks ##### 1. Install Ganache and The Graph and local dependencies + First make sure you have both Ganache and Graph CLIs, and install project dependencies: ```bash @@ -27,6 +28,7 @@ First make sure you have both Ganache and Graph CLIs, and install project depend ``` ##### 2. Start Ganache node + Start a local ganache in a separate terminal with the following params: ```bash @@ -34,6 +36,7 @@ Start a local ganache in a separate terminal with the following params: ``` ##### 3. Start Graph node + In another terminal, clone the graph node and start it: ```bash @@ -46,9 +49,10 @@ In another terminal, clone the graph node and start it: (See [this issue](https://github.com/graphprotocol/graph-node/issues/1132) about the `setup.sh` script) > If docker prompts you with the error `The reorg threshold 50 is larger than the size of the chain 7, you probably want to set the ETHEREUM_REORG_THRESHOLD environment variable to 0`, - simply add a new env variable in `docker-compose.yml` named `ETHEREUM_REORG_THRESHOLD` assigning it to 0 and start it again. +> simply add a new env variable in `docker-compose.yml` named `ETHEREUM_REORG_THRESHOLD` assigning it to 0 and start it again. ##### 4. Deploy local Aragon Court instance + To deploy a local instance run the following commands on a separate terminal: ```bash @@ -59,6 +63,7 @@ To deploy a local instance run the following commands on a separate terminal: ``` ##### 5. Deploy Aragon Court subgraph + You can use the provided deployment script to create a manifest file, providing the court deployed address as follows: ```bash diff --git a/blacklisted-modules.js b/blacklisted-modules.js index 4f9cfd3..3b11c1d 100644 --- a/blacklisted-modules.js +++ b/blacklisted-modules.js @@ -1,8 +1,7 @@ - module.exports = { xdai: [ "0x41ab49872ed459c840d0caecd47fcdc201c48307", // Subscriptions v1.0 ], - rinkeby: [], - polygon: [] -} \ No newline at end of file + goerli: [], + polygon: [], +}; diff --git a/package.json b/package.json index 2bc6069..2bd99d9 100644 --- a/package.json +++ b/package.json @@ -6,26 +6,26 @@ "build:graph": "./scripts/build-graph.sh", "build:graph:rpc": "NETWORK=rpc npm run build:graph", "build:graph:staging": "NETWORK=staging npm run build:graph", - "build:graph:rinkeby": "NETWORK=rinkeby npm run build:graph", + "build:graph:goerli": "NETWORK=goerli npm run build:graph", "build:graph:xdai": "NETWORK=xdai npm run build:graph", "build:graph:polygon": "NETWORK=polygon npm run build:graph", "build:manifest": "./scripts/build-manifest.sh", "build:manifest:rpc": "NETWORK=rpc npm run build:manifest", "build:manifest:staging": "NETWORK=staging npm run build:manifest", - "build:manifest:rinkeby": "NETWORK=rinkeby npm run build:manifest", + "build:manifest:goerli": "NETWORK=goerli npm run build:manifest", "build:manifest:xdai": "NETWORK=xdai npm run build:manifest", "build:manifest:polygon": "NETWORK=polygon npm run build:manifest", "codegen": "./scripts/codegen.sh", "codegen:rpc": "NETWORK=rpc npm run codegen", "codegen:ropsten": "NETWORK=ropsten npm run codegen", "codegen:staging": "NETWORK=staging npm run codegen", - "codegen:rinkeby": "NETWORK=rinkeby npm run codegen", + "codegen:goerli": "NETWORK=goerli npm run codegen", "codegen:xdai": "NETWORK=xdai npm run codegen", "codegen:polygon": "NETWORK=polygon npm run codegen", "deploy": "./scripts/deploy.sh", "deploy:rpc": "NETWORK=rpc npm run deploy", "deploy:staging": "NETWORK=staging npm run deploy", - "deploy:rinkeby": "NETWORK=rinkeby npm run deploy", + "deploy:goerli": "NETWORK=goerli npm run deploy", "deploy:xdai": "NETWORK=xdai npm run deploy", "deploy:polygon": "NETWORK=polygon npm run deploy" }, diff --git a/scripts/build-manifest.sh b/scripts/build-manifest.sh index 856215c..62a3ae4 100755 --- a/scripts/build-manifest.sh +++ b/scripts/build-manifest.sh @@ -5,20 +5,20 @@ set -o errexit # Court known addresses court_staging= -court_rinkeby=0xC2224D785D4e4bc92D5be6767A82d026ca2813fD +court_goerli= court_xdai=0x44E4fCFed14E1285c9e0F6eae77D5fDd0F196f85 court_polygon=0xf0C8376065fadfACB706caFbaaC96B321069C015 # Known block numbers start_block_staging= -start_block_rinkeby=8250225 +start_block_goerli= start_block_xdai=14861364 start_block_polygon=21936374 # Validate network -networks=(rpc staging rinkeby xdai polygon) +networks=(rpc staging goerli xdai polygon) if [[ -z $NETWORK || ! " ${networks[@]} " =~ " ${NETWORK} " ]]; then - echo 'Please make sure the network provided is either rpc, staging, rinkeby, xdai or polygon' + echo 'Please make sure the network provided is either rpc, staging, goerli, xdai or polygon' exit 1 fi @@ -26,7 +26,7 @@ fi if [[ "$NETWORK" = "rpc" ]]; then ENV='mainnet' elif [[ "$NETWORK" = "staging" ]]; then - ENV='rinkeby' + ENV='goerli' elif [[ "$NETWORK" = "polygon" ]]; then ENV='matic' else