Skip to content

Commit

Permalink
Merge pull request #269 from privacy-scaling-explorations/chore/deplo…
Browse files Browse the repository at this point in the history
…y-tasks

feat(contracts): add deploy scripts
  • Loading branch information
0xmad authored Aug 19, 2024
2 parents 6ba9809 + a7c140d commit 000ad4b
Show file tree
Hide file tree
Showing 11 changed files with 949 additions and 70 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/hardhat-tasks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Hardhat Tasks

on:
push:
branches: [main]
pull_request:

env:
NEXT_PUBLIC_CHAIN_NAME: ${{ vars.NEXT_PUBLIC_CHAIN_NAME }}
NEXT_PUBLIC_ADMIN_ADDRESS: ${{ vars.NEXT_PUBLIC_ADMIN_ADDRESS }}
NEXT_PUBLIC_APPROVAL_SCHEMA: ${{ vars.NEXT_PUBLIC_APPROVAL_SCHEMA }}
NEXT_PUBLIC_METADATA_SCHEMA: ${{ vars.NEXT_PUBLIC_METADATA_SCHEMA }}
NEXT_PUBLIC_ROUND_ID: ${{ vars.NEXT_PUBLIC_ROUND_ID }}
NEXT_PUBLIC_MACI_ADDRESS: ${{ vars.NEXT_PUBLIC_MACI_ADDRESS }}
NEXT_PUBLIC_TALLY_URL: ${{ vars.NEXT_PUBLIC_TALLY_URL }}
NEXT_PUBLIC_WALLETCONNECT_ID: ${{ secrets.NEXT_PUBLIC_WALLETCONNECT_ID }}

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
hardhat-tasks:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"

- name: Install
run: |
pnpm install --frozen-lockfile --prefer-offline
- name: Build
run: |
pnpm run build
working-directory: packages/contracts

- name: Run hardhat fork
run: |
pnpm run hardhat &
sleep 5
working-directory: packages/contracts

- name: Download zkeys
run: |
pnpm download-zkeys:test
- name: hardhat tasks
run: |
cp ./deploy-config-example.json ./deploy-config.json
pnpm deploy:localhost
working-directory: packages/contracts

- name: Stop Hardhat
if: always()
run: kill $(lsof -t -i:8545)
3 changes: 2 additions & 1 deletion packages/contracts/contracts/mocks/Mocker.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
pragma solidity ^0.8.20;

import "maci-contracts/contracts/crypto/Hasher.sol";

Check warning on line 4 in packages/contracts/contracts/mocks/Mocker.sol

View workflow job for this annotation

GitHub Actions / check (lint:sol)

global import of path maci-contracts/contracts/crypto/Hasher.sol is not allowed. Specify names to import individually or bind all exports of the module into a name (import "path" as Name)
import "maci-contracts/contracts/crypto/Verifier.sol";

Check warning on line 5 in packages/contracts/contracts/mocks/Mocker.sol

View workflow job for this annotation

GitHub Actions / check (lint:sol)

global import of path maci-contracts/contracts/crypto/Verifier.sol is not allowed. Specify names to import individually or bind all exports of the module into a name (import "path" as Name)
import "maci-contracts/contracts/crypto/MockVerifier.sol";

Check warning on line 6 in packages/contracts/contracts/mocks/Mocker.sol

View workflow job for this annotation

GitHub Actions / check (lint:sol)

global import of path maci-contracts/contracts/crypto/MockVerifier.sol is not allowed. Specify names to import individually or bind all exports of the module into a name (import "path" as Name)
import "maci-contracts/contracts/gatekeepers/FreeForAllSignUpGatekeeper.sol";
import "maci-contracts/contracts/gatekeepers/FreeForAllGatekeeper.sol";

Check warning on line 7 in packages/contracts/contracts/mocks/Mocker.sol

View workflow job for this annotation

GitHub Actions / check (lint:sol)

global import of path maci-contracts/contracts/gatekeepers/FreeForAllGatekeeper.sol is not allowed. Specify names to import individually or bind all exports of the module into a name (import "path" as Name)
import "maci-contracts/contracts/initialVoiceCreditProxy/ConstantInitialVoiceCreditProxy.sol";

Check warning on line 8 in packages/contracts/contracts/mocks/Mocker.sol

View workflow job for this annotation

GitHub Actions / check (lint:sol)

global import of path maci-contracts/contracts/initialVoiceCreditProxy/ConstantInitialVoiceCreditProxy.sol is not allowed. Specify names to import individually or bind all exports of the module into a name (import "path" as Name)
import "maci-contracts/contracts/VkRegistry.sol";

Check warning on line 9 in packages/contracts/contracts/mocks/Mocker.sol

View workflow job for this annotation

GitHub Actions / check (lint:sol)

global import of path maci-contracts/contracts/VkRegistry.sol is not allowed. Specify names to import individually or bind all exports of the module into a name (import "path" as Name)
import "maci-contracts/contracts/TallyFactory.sol";

Check warning on line 10 in packages/contracts/contracts/mocks/Mocker.sol

View workflow job for this annotation

GitHub Actions / check (lint:sol)

global import of path maci-contracts/contracts/TallyFactory.sol is not allowed. Specify names to import individually or bind all exports of the module into a name (import "path" as Name)
Expand Down
Loading

0 comments on commit 000ad4b

Please sign in to comment.