generated from proofoftom/buidler-waffle-typechain-quasar
-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop' into cohort/clrfund
- Loading branch information
Showing
10 changed files
with
286 additions
and
17 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,40 @@ | ||
name: Mantle testnet - Cancel current round | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
branch_name: | ||
description: 'Clrfund branch name' | ||
required: true | ||
default: 'cohort/EthSingapore' | ||
factory: | ||
description: 'Clrfund factory address' | ||
required: true | ||
default: '0x006f39E6a6D15323334Be1db34C73088550BB20a' | ||
network: | ||
description: 'Network' | ||
required: true | ||
default: 'mantle-testnet' | ||
|
||
|
||
env: | ||
NODE_VERSION: 16.x | ||
WALLET_PRIVATE_KEY: ${{ secrets.MANTLE_TESTNET_COORDINATOR_WALLET_PRIVATE_KEY }} | ||
|
||
jobs: | ||
cancel-round: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Use Node.js ${{ env.NODE_VERSION }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- name: Checkout source code | ||
uses: actions/checkout@v3 | ||
- name: Build CLR | ||
run: | | ||
yarn && yarn build | ||
- name: Run the cancel round script | ||
run: | | ||
cd contracts | ||
yarn hardhat cancel-round --factory "${{ github.event.inputs.factory }}" --network "${{ github.event.inputs.network }}" |
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,40 @@ | ||
name: Mantle testnet - Create new round | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
branch_name: | ||
description: 'Clrfund branch name' | ||
required: true | ||
default: 'cohort/EthSingapore' | ||
factory: | ||
description: 'Clrfund factory address' | ||
required: true | ||
default: '0x006f39E6a6D15323334Be1db34C73088550BB20a' | ||
network: | ||
description: 'Network' | ||
required: true | ||
default: 'mantle-testnet' | ||
|
||
env: | ||
NODE_VERSION: 16.x | ||
WALLET_PRIVATE_KEY: ${{ secrets.MANTLE_TESTNET_COORDINATOR_WALLET_PRIVATE_KEY }} | ||
|
||
jobs: | ||
create-new-round: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Use Node.js ${{ env.NODE_VERSION }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- name: Checkout source code | ||
uses: actions/checkout@v3 | ||
- name: Build CLR | ||
run: | | ||
yarn && yarn build | ||
- name: Run create new round script | ||
run: | | ||
cd contracts | ||
export FACTORY_ADDRESS="${{ github.event.inputs.factory }}" | ||
yarn hardhat run scripts/newRound.ts --network "${{ github.event.inputs.network }}" |
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,76 @@ | ||
name: Mantle testnet - Finalize round | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
branch_name: | ||
description: 'Clrfund branch name' | ||
required: true | ||
default: 'cohort/EthSingapore' | ||
maci_start_block: | ||
description: 'MACI contract creation block' | ||
required: true | ||
default: '1' | ||
subgraph_url: | ||
description: 'Clrfund subgraph url' | ||
required: true | ||
default: 'https://graph.testnet.mantle.xyz/subgraphs/name/clrfund-ethsingapore-test' | ||
network: | ||
description: 'Network' | ||
required: true | ||
default: 'mantle-testnet' | ||
|
||
env: | ||
NODE_VERSION: 16.x | ||
NETWORK: "arbitrum-goerli" | ||
COORDINATOR_ETH_PK: ${{ secrets.MANTLE_TESTNET_COORDINATOR_WALLET_PRIVATE_KEY }} | ||
COORDINATOR_PK: ${{ secrets.MANTLE_TESTNET_COORDINATOR_MACI_PRIVATE_KEY }} | ||
|
||
jobs: | ||
finalize: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Use Node.js ${{ env.NODE_VERSION }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- name: Install g++ library dependencies | ||
run: | | ||
sudo apt update | ||
sudo apt-get install build-essential libgmp-dev libsodium-dev nlohmann-json3-dev nasm g++ curl | ||
- name: Install rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
- name: Install zkutil | ||
run: | | ||
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 | ||
$GITHUB_WORKSPACE/.github/scripts/download-batch64-params.sh | ||
- name: Build | ||
run: | | ||
yarn && yarn build | ||
- name: Run finalize scripts | ||
run: | | ||
export SUBGRPAH_URL="${{ github.event.inputs.subgraph_url }}" | ||
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)') | ||
export ROUND_ADDRESS=$(node -e 'console.log(JSON.parse(process.env.ROUND).data.fundingRoundFactories[0].currentRound.id)') | ||
export MACI_ADDRESS=$(node -e 'console.log(JSON.parse(process.env.ROUND).data.fundingRoundFactories[0].currentRound.maci)') | ||
export MACI_START_BLOCK="${{ github.event.inputs.maci_start_block }}" | ||
echo "MACI_START_BLOCK:" $MACI_START_BLOCK | ||
# tally and finalize | ||
cd contracts | ||
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"' | ||
yarn hardhat run --network "${NETWORK}" scripts/finalize.ts |
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,43 @@ | ||
name: Mantle testnet - Set voting duration | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
voting_period: | ||
description: 'Voting period in minutes' | ||
required: true | ||
default: '120' | ||
reallocation_period: | ||
description: 'Reallocation period in minutes' | ||
required: true | ||
default: '1' | ||
factory: | ||
description: 'Clrfund factory address' | ||
required: true | ||
default: '0x006f39E6a6D15323334Be1db34C73088550BB20a' | ||
network: | ||
description: 'Network' | ||
required: true | ||
default: 'mantle-testnet' | ||
|
||
env: | ||
NODE_VERSION: 16.x | ||
WALLET_PRIVATE_KEY: ${{ secrets.MANTLE_TESTNET_COORDINATOR_WALLET_PRIVATE_KEY }} | ||
|
||
jobs: | ||
set-durations: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Use Node.js ${{ env.NODE_VERSION }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- name: Checkout source code | ||
uses: actions/checkout@v3 | ||
- name: Build CLR | ||
run: | | ||
yarn && yarn build | ||
- name: Run the set duration script | ||
run: | | ||
cd contracts | ||
yarn hardhat set-durations --factory "${{ github.event.inputs.factory }}" --signup "${{ github.event.inputs.voting_period }}" --voting "${{ github.event.inputs.reallocation_period }}" --network "${{ github.event.inputs.network }}" |
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
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
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
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
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
Oops, something went wrong.