Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into cohort/spaghetteth
Browse files Browse the repository at this point in the history
  • Loading branch information
yuetloo committed Aug 3, 2023
2 parents 82d4937 + e8cdd41 commit 998d072
Show file tree
Hide file tree
Showing 39 changed files with 597 additions and 232 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/finalize-round.yml
Original file line number Diff line number Diff line change
@@ -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 }}
Expand Down Expand Up @@ -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
Expand All @@ -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)')
Expand All @@ -53,7 +66,7 @@ jobs:
echo "MACI_START_BLOCK:" $MACI_START_BLOCK
# tally and finalize
cd contracts
yarn hardhat run --network "${NETWORK}" scripts/tally.ts
yarn hardhat tally --round-address "${ROUND_ADDRESS}" --network "${NETWORK}"
curl --location --request POST 'https://api.pinata.cloud/pinning/pinFileToIPFS' \
--header "Authorization: Bearer ${{ secrets.PINATA_JWT }}" \
--form 'file=@"tally.json"'
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ In a future version, we plan to address this by routing ETH and token contributi
- [Deployment](docs/deployment.md)
- [Providing matching funds](docs/funding-source.md)
- [How to tally votes and verify results](docs/tally-verify.md)
- [How to donate to projects](docs/howto-use-app.md)
- [Running the subgraph](docs/subgraph.md)
- [Sitemap](docs/sitemap.md)
- [Website theme and customization](docs/theme.md)
Expand Down
4 changes: 2 additions & 2 deletions contracts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@clrfund/contracts",
"version": "4.2.3",
"version": "4.2.5",
"license": "GPL-3.0",
"scripts": {
"hardhat": "hardhat",
Expand All @@ -11,7 +11,7 @@
"deployTestRound:local": "hardhat run --network localhost scripts/deployTestRound.ts",
"contribute:local": "hardhat run --network localhost scripts/contribute.ts",
"vote:local": "hardhat run --network localhost scripts/vote.ts",
"tally:local": "hardhat run --network localhost scripts/tally.ts",
"tally:local": "hardhat --network localhost tally",
"finalize:local": "hardhat run --network localhost scripts/finalize.ts",
"claim:local": "hardhat run --network localhost scripts/claim.ts",
"test": "hardhat test",
Expand Down
123 changes: 0 additions & 123 deletions contracts/scripts/tally.ts

This file was deleted.

1 change: 1 addition & 0 deletions contracts/tasks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ import './mergeAllocations'
import './setDurations'
import './deploySponsor'
import './loadUsers'
import './tally'
Loading

0 comments on commit 998d072

Please sign in to comment.