Skip to content

Commit

Permalink
fix finalize action and add recipient registry task
Browse files Browse the repository at this point in the history
  • Loading branch information
yuetloo committed Dec 5, 2023
1 parent fb3b0ae commit 65dc298
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/mantle_finalize_round.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ on:

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 }}

Expand Down Expand Up @@ -69,8 +68,8 @@ jobs:
echo "MACI_START_BLOCK:" $MACI_START_BLOCK
# tally and finalize
cd contracts
yarn hardhat tally --round-address "${ROUND_ADDRESS}" --network "${NETWORK}"
yarn hardhat tally --round-address "${ROUND_ADDRESS}" --network "${{ github.event.inputs.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
yarn hardhat run --network "${{ github.event.inputs.network }}" scripts/finalize.ts
43 changes: 43 additions & 0 deletions .github/workflows/mantle_new_recipient_registry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
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 deploy-recipient-registry \
--network "${{ github.event.inputs.network }}" \
--factory "${{ github.event.inputs.factory }}" \
--type "optimistic"
1 change: 1 addition & 0 deletions contracts/tasks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ import './tally'
import './findStorageSlot'
import './setStorageRoot'
import './loadMerkleUsers'
import './deployRecipientRegistry'

0 comments on commit 65dc298

Please sign in to comment.