From c5d26ff2631a2586c1f710c60d6c513373d3f1d9 Mon Sep 17 00:00:00 2001 From: yuetloo Date: Mon, 17 Jul 2023 18:07:26 -0400 Subject: [PATCH 1/2] add input parameters for the finalize action --- .github/workflows/finalize-round.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/finalize-round.yml b/.github/workflows/finalize-round.yml index 27d9c3c39..4183c5a45 100644 --- a/.github/workflows/finalize-round.yml +++ b/.github/workflows/finalize-round.yml @@ -1,10 +1,19 @@ name: Finalize a test round -on: workflow_dispatch +on: + workflow_dispatch: + inputs: + branch_name: + description: 'Clrfund branch name' + required: true + default: 'develop' + subgraph_name: + description: 'Clrfund subgraph name' + required: true + default: 'yuetloo/clrfund-dev' env: NODE_VERSION: 16.x - SUBGRPAH_URL: "https://api.thegraph.com/subgraphs/name/clrfund/clrfund-arbitrum-goerli" NETWORK: "arbitrum-goerli" COORDINATOR_ETH_PK: ${{ secrets.ARBITRUM_GOERLI_COORDINATOR_WALLET_PRIVATE_KEY }} COORDINATOR_PK: ${{ secrets.ARBITRUM_GOERLI_COORDINATOR_MACI_PRIVATE_KEY }} @@ -33,6 +42,8 @@ jobs: cargo install zkutil --version 0.3.2 - name: Checkout source code uses: actions/checkout@v3 + with: + ref: ${{ github.event.inputs.branch_name }} - name: Download batch 64 params run: | ls -la $GITHUB_WORKSPACE @@ -42,6 +53,8 @@ jobs: yarn && yarn build - name: Run finalize scripts run: | + export SUBGRPAH_URL="https://api.thegraph.com/subgraphs/name/${{ github.event.inputs.subgraph_name }}" + echo $SUBGRAPH_URL export NODE_CONFIG=$(node -e "const snarkParamsPath=process.env.GITHUB_WORKSPACE + '/params'; console.log(JSON.stringify({ snarkParamsPath }));") export ROUND=$(curl -X POST -d '{"query":"{fundingRoundFactories {id currentRound {id maci}}}"}' $SUBGRPAH_URL) export FACTORY_ADDRESS=$(node -e 'console.log(JSON.parse(process.env.ROUND).data.fundingRoundFactories[0].id)') From a4f3846500880f1e2afec08949f66746b26caa80 Mon Sep 17 00:00:00 2001 From: yuetloo Date: Thu, 20 Jul 2023 21:58:14 -0400 Subject: [PATCH 2/2] add missing operator parameter in the fetch-round task --- docs/tally-verify.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/tally-verify.md b/docs/tally-verify.md index 7c9bc9810..e62ecce4d 100644 --- a/docs/tally-verify.md +++ b/docs/tally-verify.md @@ -243,9 +243,10 @@ After finalizing the round, enable the leaderboard view in the vue-app by export ```sh cd contracts -yarn hardhat fetch-round --output-dir ../vue-app/src/rounds --network xdai --round-address +yarn hardhat fetch-round --output-dir ../vue-app/src/rounds --network xdai --round-address --operator ``` +3) Build and deploy the app