Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor/hardhat #381

Open
wants to merge 158 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
158 commits
Select commit Hold shift + click to select a range
1c9f6ef
fix: docker build error
wanseob Mar 2, 2022
f94de13
fix: use parent block's utxo root for the inclusion reference logic
wanseob Feb 22, 2022
640c29a
refactor(babyjubjub): use ethersjs & bignumber instead of BN
wanseob Mar 14, 2022
c12dbcc
refactor(transaction): use refactored babyjubjub
wanseob Mar 15, 2022
0de1830
refactor(account): use refactored transaction pacakge and ethersjs
wanseob Mar 15, 2022
d626ec5
fix(babyjubjub): typo strictFpom => strictFrom
wanseob Mar 15, 2022
c1394f9
refactor(tree): use updated babyjubjub package
wanseob Mar 15, 2022
d357489
refactor(contracts): use ethersjs and hardhat insead of truffle
wanseob Apr 6, 2022
3bcf049
refactor(zk-wizard): use ethersjs instead of web3
wanseob Apr 6, 2022
1aa88b0
fix(babyjubjub): constructor
wanseob Apr 6, 2022
b3c0abd
refactor(account): use ethersjs instead of web3
wanseob Apr 6, 2022
607cdc1
refactor(tree): use updated babyjubjub package
wanseob Apr 6, 2022
39089f8
refactor(core): use ethersjs instead of web3
wanseob Apr 6, 2022
6a5519e
refactor(coordinator): use a updated core package
wanseob Apr 6, 2022
1e16bb9
chore: lint
wanseob Apr 6, 2022
9e47aa5
refactor(cli): use updated core pacakge
wanseob Apr 6, 2022
d9d22bf
refactor(client): use updated core pacakge
wanseob Apr 6, 2022
0a9fbe6
fix(transaction): public key computation bug
wanseob Apr 6, 2022
803cc5a
refactor(database): use ethersjs
wanseob Apr 6, 2022
c64a08c
refactor(dataset): use ethersjs
wanseob Apr 6, 2022
a9af6b1
fix(utils): task runner
wanseob Apr 6, 2022
d072702
refactor(integration-test): update integration test with the refactor…
wanseob Apr 6, 2022
5d57d51
chore: update config files
wanseob Apr 6, 2022
e38e913
feat: use 'effectiveGasPrce' term intead 'gasPrice' for fee calculataion
sifnoc May 9, 2022
2a13c64
feat: coordinator generate type 2 tx
sifnoc May 23, 2022
ee8ee5e
Merge remote-tracking 'zkopru-network' branch 'upstream/sync-fix' int…
sifnoc Apr 6, 2022
11186d3
Merge remote-tracking 'sifnoc' branch 'fix/auction-bidding' into 'fix…
sifnoc Apr 6, 2022
96987d4
fix: rollback, getting massDeposits
sifnoc Mar 22, 2022
6672881
fix: limit massDeposits for including propose tx
sifnoc Mar 22, 2022
15540ef
fix: lint
sifnoc Mar 23, 2022
7471240
fix: connect auctionContract to signer
sifnoc May 10, 2022
5e3ec21
feat: added new coordinator as bid competitor
sifnoc Apr 21, 2022
124d638
feat: create auction test cases
sifnoc Apr 23, 2022
06a23d5
fix: maxBid configuration figures to wei
sifnoc May 4, 2022
3318f07
fix: test number and indent
sifnoc May 8, 2022
fb94aad
fix: does not support todo method in test
sifnoc May 10, 2022
86a8dd7
refactor: split test cases
sifnoc May 23, 2022
8d7dc5c
fix: account connect to provider
sifnoc May 24, 2022
938cf50
feat: add index to deposit table
sifnoc Aug 14, 2022
57832ae
refactor: replace web3 with ethers and update package.json
KimiWu123 Aug 16, 2022
28c29f8
fix: incorrect usage of ethers components
KimiWu123 Aug 16, 2022
ccea63b
fix: add zero padding when calc. the hash of merged deposits
KimiWu123 Aug 17, 2022
201872c
refactor: replace web3-eth-abi with ethers
KimiWu123 Aug 17, 2022
7c7b222
chore: refine error messages and test desc. with web3
KimiWu123 Aug 17, 2022
5ddcdb7
fix: rename encryptedKeystore back to keystore for compatibility
KimiWu123 Aug 24, 2022
b06eb15
fix(core): remove toHexString when creating proofId
KimiWu123 Aug 24, 2022
bcfc5fc
chore(cli): update provider info under coordinator and wallet config …
KimiWu123 Aug 24, 2022
199e4a4
fix: incorrect using of BigNumber
KimiWu123 Aug 24, 2022
7ff74ba
fix(account): incorrect usage of encrypting keystore files with ether…
KimiWu123 Aug 26, 2022
990b300
chore(coordinator): remove sleep bcs not using docker anymore
KimiWu123 Aug 29, 2022
30c4f72
chore: remove trail space in coordinator.dev.json
KimiWu123 Aug 29, 2022
a3d72cf
fix(cli): select ERC20 to deposit but operate ERC721 balance
KimiWu123 Aug 31, 2022
9380bb3
chore: remove web3-utils
KimiWu123 Aug 31, 2022
7ffcf20
chore: add jest-mock dep. and hardhat config
KimiWu123 Aug 31, 2022
bf3605a
fix(cli): should ask password if creating a new wallet
KimiWu123 Sep 2, 2022
3417f7c
test(cli): add test cases for cli/wallet/configurator
KimiWu123 Sep 2, 2022
62af162
test(cli): refactor mock objects
KimiWu123 Sep 6, 2022
52024bb
fix(cli): set default provider if no input provider when calling HDwa…
KimiWu123 Sep 7, 2022
fd0a5a9
fix(zk-wizard): add zero check in depositEther
KimiWu123 Sep 7, 2022
8f430fe
test(cli): add test cases for cli/wallet/prompts(draft)
KimiWu123 Sep 7, 2022
b8a7eaa
fix(zk-wizard): fix where clause when status is undefined
KimiWu123 Sep 9, 2022
7ebdcec
fix(cli): using string as input for parseEther
KimiWu123 Sep 9, 2022
d0b858f
test(cli): finish eth transfer
KimiWu123 Sep 9, 2022
f77be47
test(cli): finish cli/wallet test cases
KimiWu123 Sep 13, 2022
ebfdfca
test(cli): test cases for cli/coordinator/config-prompts done
KimiWu123 Sep 21, 2022
0a8afd5
test(cli): completed test cases for cli/coordinator/example-config
KimiWu123 Sep 22, 2022
f746e30
fix(cli/test): force covert config type
KimiWu123 Sep 25, 2022
12ab6bc
test(cli): test cases for cli/coordinator/prompts were done
KimiWu123 Sep 25, 2022
35e42ec
test(cli): completed the test of loading a light node under wallet/co…
KimiWu123 Sep 28, 2022
1853e61
chore(cli): enhance some error handling
KimiWu123 Sep 30, 2022
11ab0e6
test(cli): remove reigisterVK and completeSetup, both were done in de…
KimiWu123 Sep 30, 2022
71b4aa2
fix(coordinator): add missed await in registerVk
KimiWu123 Sep 30, 2022
6fa2c9d
chore(cli): make cli test serially
KimiWu123 Sep 30, 2022
84f8413
test(cli): add cases for deposit ERC20 and ERC721
KimiWu123 Sep 30, 2022
90c795f
CI(cli): add cli testing in CI
KimiWu123 Oct 1, 2022
899697e
refactor(cli): move START_CODE and EXIT_CODE to another file for testing
KimiWu123 Oct 2, 2022
3df687b
test(cli): run tests on hardhat node
KimiWu123 Oct 3, 2022
4cbdf9d
test(cli): fix Jest error: an unexpected token
KimiWu123 Oct 3, 2022
8969780
test(cli): decrease testing time for some cases and make testing para…
KimiWu123 Oct 5, 2022
1f00f59
Merge pull request #4 from KimiWu123/test/add-CICD-for-CLI
KimiWu123 Oct 7, 2022
eb66c6d
ci: recover circleci/config.yml
KimiWu123 Oct 7, 2022
940d34d
fix: workaround for undefined error in cli test
KimiWu123 Oct 16, 2022
aee9502
fix(cli): apply web3-provider-ws to prevent from connection lost
KimiWu123 Oct 16, 2022
396fccb
fix: add 0x prefixe check
KimiWu123 Oct 16, 2022
594163f
fix: decimal() is not a function of IERC20(standard ERC20)
KimiWu123 Oct 16, 2022
e5260f6
chore(cli): move config files and cleanup
KimiWu123 Oct 17, 2022
935c71b
feat: added database name for supporting multiple network
sifnoc Jun 4, 2022
80c0c42
fix: coordinator mark invalid block which following uncle
sifnoc Aug 15, 2022
802825d
fix: database schema only for fix deposit
sifnoc Aug 27, 2022
425dcca
fix: refine database schema for deposit
KimiWu123 Oct 18, 2022
3a5f266
feat: added more reliable provider
sifnoc Oct 19, 2022
b604e56
chore: add and remove comments
sifnoc Oct 19, 2022
668ca8d
fix: add depositTx and depositErc20Tx back and some minor refine
KimiWu123 Oct 24, 2022
1ba6b6e
feat: add contract deploy:local
KimiWu123 Oct 24, 2022
2c99a4a
fix: using note as Deposit primaryKey in DB
KimiWu123 Oct 24, 2022
833af3b
fix: remove BLOCK_CONFIRMATION gap when checking events, deposit/depo…
KimiWu123 Oct 24, 2022
9c7f029
fix: not to check inflow and outflow equavilent if outflow is empty
KimiWu123 Oct 25, 2022
508ad4f
fix: url update event handler scope error
sifnoc Oct 25, 2022
1332a1c
fix: variable name following contract
sifnoc Oct 25, 2022
12da771
fix(transaction): incorrect outflow when building a tx. Happened when…
KimiWu123 Oct 31, 2022
e6a9a74
Revert "fix: remove BLOCK_CONFIRMATION gap when checking events, depo…
KimiWu123 Oct 31, 2022
5c734b0
config(cli): comment out auto-mining
KimiWu123 Oct 31, 2022
1ca5b76
chore: rename network to testnet in contract deploy:local command
KimiWu123 Nov 2, 2022
218d870
feat(cli): add a L2 account which is the same as the one generated by…
KimiWu123 Nov 1, 2022
ad7747d
feat: store l2 private key instead of l1 private key in ZkAccount
KimiWu123 Nov 5, 2022
ab7a905
fix: generate id from uuid to hash
sifnoc Nov 28, 2022
9fb7221
refactor: replace web3 with ethers and update package.json
KimiWu123 Aug 16, 2022
85a4ecd
fix: incorrect usage of ethers components
KimiWu123 Aug 16, 2022
614cc4f
fix: add zero padding when calc. the hash of merged deposits
KimiWu123 Aug 17, 2022
cddcc63
refactor: replace web3-eth-abi with ethers
KimiWu123 Aug 17, 2022
792b151
chore: refine error messages and test desc. with web3
KimiWu123 Aug 17, 2022
a27b2f7
fix: rename encryptedKeystore back to keystore for compatibility
KimiWu123 Aug 24, 2022
df10357
fix(core): remove toHexString when creating proofId
KimiWu123 Aug 24, 2022
3c4ff4a
Merge branch 'refactor/hardhat' into fix/working-cli
sifnoc Dec 5, 2022
45d33d4
Merge pull request #11 from KimiWu123/fix/working-cli
sifnoc Dec 5, 2022
bfb53ee
feat: added database name for supporting multiple network
sifnoc Jun 4, 2022
2aeab87
fix: coordinator mark invalid block which following uncle
sifnoc Aug 15, 2022
92c350d
fix: database schema only for fix deposit
sifnoc Aug 27, 2022
82abdab
fix: refine database schema for deposit
KimiWu123 Oct 18, 2022
e507ecf
fix: add depositTx and depositErc20Tx back and some minor refine
KimiWu123 Oct 24, 2022
cd8bc01
feat: add contract deploy:local
KimiWu123 Oct 24, 2022
3ff1f36
fix: using note as Deposit primaryKey in DB
KimiWu123 Oct 24, 2022
81c16a8
fix: remove BLOCK_CONFIRMATION gap when checking events, deposit/depo…
KimiWu123 Oct 24, 2022
f7a86be
fix: not to check inflow and outflow equavilent if outflow is empty
KimiWu123 Oct 25, 2022
d1cf6ef
fix(transaction): incorrect outflow when building a tx. Happened when…
KimiWu123 Oct 31, 2022
4283992
Revert "fix: remove BLOCK_CONFIRMATION gap when checking events, depo…
KimiWu123 Oct 31, 2022
a714d85
config(cli): comment out auto-mining
KimiWu123 Oct 31, 2022
fed7330
chore: rename network to testnet in contract deploy:local command
KimiWu123 Nov 2, 2022
5d4e9ee
Merge pull request #16 from KimiWu123/feat/add-metamask-aligned-L2Acc…
sifnoc Dec 5, 2022
40515df
test(tx): add test description for tx-builder first
KimiWu123 Nov 7, 2022
0705bc4
test(tx): impl. test cases for txBuilder.build()
KimiWu123 Nov 8, 2022
acc9d3a
refactor(tx): refactor txBuilder.build()
KimiWu123 Nov 11, 2022
22954f7
fix(tx): add inflow limit, it's 4 now
KimiWu123 Nov 15, 2022
6ba7d6f
test(tx): fix test cases for nft
KimiWu123 Nov 16, 2022
cb0242c
fix(tx): fix the calculation of eth changes to support sending all ETH
KimiWu123 Nov 17, 2022
e1e40da
fix(tx): set the arg, ethChanges, as optional
KimiWu123 Nov 18, 2022
3efabce
chore: remove *.bak files on contract package
sifnoc Jun 28, 2022
5a23b95
chore: remove unnecessary log
sifnoc Jun 28, 2022
1abe7e4
Merge pull request #13 from sifnoc/fix/updateUrl-handler
sifnoc Dec 5, 2022
fa280fe
Merge branch 'refactor/hardhat' into feat/sturdy_provider
sifnoc Dec 5, 2022
d3a6161
Merge pull request #12 from sifnoc/feat/sturdy_provider
sifnoc Dec 5, 2022
1d0a019
feat: added method name as argument for logging
sifnoc Jun 28, 2022
a933dc9
fix: hardhat config and set automine for testnet in local
sifnoc Oct 31, 2022
bba266e
fix: using defualt port
sifnoc Oct 31, 2022
2c141d9
chore: add some doc for local dev
sifnoc Oct 31, 2022
4541d14
fix: restore 'yarn.lock' file from latest merged branch
sifnoc Dec 5, 2022
ed64038
Merge branch 'refactor/hardhat' into fix/overwritten-deposit-note
sifnoc Dec 5, 2022
d0b75dd
Merge pull request #9 from sifnoc/fix/overwritten-deposit-note
sifnoc Dec 5, 2022
092c6ca
Fix `test-cli` and chores (#18)
sifnoc Dec 18, 2022
5aaf5e3
fix: type in wsporivder
sifnoc Dec 19, 2022
5af4367
Merge branch 'main' into refactor/hardhat
sifnoc Jan 3, 2023
bd7199d
add depositERC721Tx method
tkmct Dec 21, 2022
30210a1
modify generateSwapTx method
tkmct Dec 21, 2022
feffdd0
fix: fix transaction builder flow for NFT swap
saleel Dec 31, 2022
01baa3a
fix: revert Merge 5af436
sifnoc Jan 4, 2023
9445d33
fix: input type in depositERC721Tx
sifnoc Jan 4, 2023
516a852
Merge branch 'main' into refactor/hardhat
sifnoc Jan 5, 2023
8360a88
fix: remove duplicate method
sifnoc Jan 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
64 changes: 33 additions & 31 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ workflows:
test_app:
jobs:
- build
- lint:
requires:
- build
# - lint:
# requires:
# - build
- load_keys:
requires:
- build
Expand Down Expand Up @@ -39,10 +39,13 @@ workflows:
- test_utils:
requires:
- build
- test_cli:
requires:
- build
jobs:
build:
machine:
image: ubuntu-2004:202111-01
docker:
- image: cimg/node:12.22
steps:
- checkout
- run:
Expand All @@ -51,9 +54,6 @@ jobs:
- run:
name: Install
command: yarn
- run:
name: Build Contract
command: yarn build:contract
- run:
name: Build TS
command: yarn build:ts:serial
Expand All @@ -62,7 +62,7 @@ jobs:
paths: project
lint:
machine:
image: ubuntu-2004:202111-01
image: ubuntu-2204:2022.07.1
steps:
- attach_workspace:
at: ~/
Expand All @@ -71,7 +71,7 @@ jobs:
command: yarn lint .
load_keys:
machine:
image: ubuntu-2004:202111-01
image: ubuntu-2204:2022.07.1
steps:
- attach_workspace:
at: ~/
Expand All @@ -85,7 +85,7 @@ jobs:
paths: project
test_circuits:
machine:
image: ubuntu-2004:202111-01
image: ubuntu-2204:2022.07.1
steps:
- attach_workspace:
at: ~/
Expand All @@ -95,25 +95,19 @@ jobs:
no_output_timeout: 120m
test_coordinator:
machine:
image: ubuntu-2004:202111-01
image: ubuntu-2204:2022.07.1
steps:
- attach_workspace:
at: ~/
- run:
name: Build Testnet
command: docker-compose -f compose/docker-compose.yml build contracts
- run:
name: Coordinator Tests
command: yarn test --scope=@zkopru/coordinator
test_contracts:
machine:
image: ubuntu-2004:202111-01
image: ubuntu-2204:2022.07.1
steps:
- attach_workspace:
at: ~/
- run:
name: Build Testnet
command: docker-compose -f compose/docker-compose.yml build contracts-for-integration-test
- run:
name: Generate Block Data
command: |
Expand All @@ -124,7 +118,7 @@ jobs:
command: yarn test --scope=@zkopru/contracts
test_accounts:
machine:
image: ubuntu-2004:202111-01
image: ubuntu-2204:2022.07.1
steps:
- attach_workspace:
at: ~/
Expand All @@ -133,7 +127,7 @@ jobs:
command: yarn test --scope=@zkopru/account
test_tree:
machine:
image: ubuntu-2004:202111-01
image: ubuntu-2204:2022.07.1
steps:
- attach_workspace:
at: ~/
Expand All @@ -142,7 +136,7 @@ jobs:
command: yarn test --scope=@zkopru/tree
test_zkwizard:
machine:
image: ubuntu-2004:202111-01
image: ubuntu-2204:2022.07.1
steps:
- attach_workspace:
at: ~/
Expand All @@ -151,7 +145,7 @@ jobs:
command: yarn test --scope=@zkopru/zk-wizard
test_client:
machine:
image: ubuntu-2004:202111-01
image: ubuntu-2204:2022.07.1
steps:
- attach_workspace:
at: ~/
Expand All @@ -160,7 +154,7 @@ jobs:
command: yarn test --scope=@zkopru/client
test_database:
machine:
image: ubuntu-2004:202111-01
image: ubuntu-2204:2022.07.1
steps:
- attach_workspace:
at: ~/
Expand All @@ -169,7 +163,7 @@ jobs:
command: yarn test --scope=@zkopru/database
test_babyjubjub:
machine:
image: ubuntu-2004:202111-01
image: ubuntu-2204:2022.07.1
steps:
- attach_workspace:
at: ~/
Expand All @@ -178,7 +172,7 @@ jobs:
command: yarn test --scope=@zkopru/babyjubjub
test_utils:
machine:
image: ubuntu-2004:202111-01
image: ubuntu-2204:2022.07.1
steps:
- attach_workspace:
at: ~/
Expand All @@ -187,13 +181,21 @@ jobs:
command: yarn test --scope=@zkopru/utils
test_integration:
machine:
image: ubuntu-2004:202111-01
image: ubuntu-2204:2022.07.1
steps:
- attach_workspace:
at: ~/
- run:
name: Build Testnet
command: docker-compose -f compose/docker-compose.yml build contracts-for-integration-test
- run:
name: Integration Tests
command: DEBUG=1 yarn test --scope=@zkopru/integration-test
command: LOG_LEVEL=debug yarn test --scope=@zkopru/integration-test
test_cli:
machine:
image: ubuntu-2204:2022.07.1
steps:
- attach_workspace:
at: ~/
- run:
name: Cli Tests
command: |
cd packages/cli
yarn test
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const common = {
'jest/no-focused-tests': 'error',
'jest/no-identical-title': 'error',
'jest/prefer-to-have-length': 'warn',
'jest/valid-expect': 'error',
'jest/valid-expect': 'off',
'jest/expect-expect': 'off',
'jest/prefer-expect-assertions': 'off',
'jest/no-test-return-statement': 'off',
Expand All @@ -35,6 +35,7 @@ const common = {
'no-shadow': 'off',
'no-bitwise': 'off',
'no-unused-vars': 'off',
'no-underscore-dangle': 'off',
},
}

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ junit.xml
dist
browser
.build-cache
**/*/cache
**/*/artifacts
**/*/typechain
keys.tgz
keys/
# Created by https://www.gitignore.io/api/node,intellij+all,visualstudiocode
Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
"[solidity]": {
"editor.defaultFormatter": "JuanBlanco.solidity"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
},
"editor.formatOnSave": true
}
2 changes: 1 addition & 1 deletion compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
contracts:
image: zkoprunet/contracts:2.0.0-beta.0
build:
context: ../packages/contracts/
context: ../
Copy link
Member

@sifnoc sifnoc Jun 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not works for me with this command on root
docker-compose -f compose/docker-compose.yml build contracts

dockerfile: ../../dockerfiles/Contract.dockerfile
contracts-for-integration-test:
image: zkoprunet/contracts-integration-test:2.0.0-beta.0
Expand Down
9 changes: 4 additions & 5 deletions dockerfiles/Contract.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@ RUN apk add --no-cache --virtual .gyp \
python3 \
make \
g++ \
&& yarn global add truffle ganache-cli \
&& yarn global add ganache-cli \
&& yarn install \
&& apk del .gyp

COPY ./contracts /proj/contracts
COPY ./utils /proj/utils
COPY ./migrations /proj/migrations
COPY ./truffle-config.js /proj/truffle-config.js
RUN truffle compile
COPY ./hardhat.config.ts /proj/hardhat.config.ts
RUN yarn compile
EXPOSE 5000
COPY ./keys /proj/keys
RUN ganache-cli --db=/data -i 20200406 -p 5000 --gasLimit 12000000 --deterministic --host 0.0.0.0 & sleep 5 && truffle migrate --network testnet
RUN ganache-cli --db=/data -i 20200406 -p 5000 --gasLimit 12000000 --deterministic --host 0.0.0.0 & sleep 5 && yarn hardhat run scripts/deploy.ts --network testnet
CMD ganache-cli --db=/data -b 5 -i 20200406 -p 5000 --gasLimit 12000000 --deterministic --host 0.0.0.0 --gasPrice 2000000000
4 changes: 2 additions & 2 deletions dockerfiles/Playground.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.10/m
make \
g++ \
chromium \
&& yarn global add truffle ganache-cli \
&& yarn global add hardhat ganache-cli \
&& yarn \
&& yarn install \
&& npx lerna run build --scope=@zkopru/cli \
Expand All @@ -22,7 +22,7 @@ RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.10/m
WORKDIR /proj/zkopru/packages/cli

RUN ganache-cli --db=/proj/data -i 20200406 -p 5000 --gasLimit 12000000 --deterministic --host 0.0.0.0 & \
sleep 5 && cd /proj/zkopru/packages/contracts && truffle migrate --network testnet
sleep 5 && cd /proj/zkopru/packages/contracts && hardhat run --network testnet
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need hardhat.config.ts to run this command


COPY ./packages/circuits/keys /proj/zkopru/packages/cli/keys

Expand Down
3 changes: 2 additions & 1 deletion jest.config.base.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
module.exports = {
roots: ['<rootDir>/src', '<rootDir>/tests'],
transform: {
'^.+\\.ts$': 'ts-jest',
'^.+\\.ts$': 'ts-jest'
},
setupFilesAfterEnv: ['jest-expect-message'],
testRegex: '(/tests/.*.(test|spec)).(jsx?|tsx?)$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
collectCoverage: true,
Expand Down
Loading