mirror of
https://github.com/tornadocash/tornado-core.git
synced 2024-12-22 09:13:28 +01:00
add sol-coverage
This commit is contained in:
parent
896fc224ff
commit
10aeb05417
2
.gitignore
vendored
2
.gitignore
vendored
@ -96,3 +96,5 @@ typings/
|
||||
|
||||
ERC20Tornado_flat.sol
|
||||
ETHTornado_flat.sol
|
||||
|
||||
coverage.json
|
@ -5,3 +5,5 @@ contracts/Verifier.sol
|
||||
scripts/ganacheHelper.js
|
||||
cli.js
|
||||
index.js
|
||||
coverage
|
||||
coverage.json
|
||||
|
24
README.md
24
README.md
@ -143,6 +143,30 @@ and @jbaylina for awesome [Circom](https://github.com/iden3/circom) & [Websnark]
|
||||
1. `npm run migrate:dev`
|
||||
1. `node minimal-demo.js`
|
||||
|
||||
## Run tests/coverage
|
||||
|
||||
Prepare test environment:
|
||||
|
||||
```
|
||||
yarn install
|
||||
yarn download
|
||||
cp .env.example .env
|
||||
npx ganache-cli > /dev/null &
|
||||
npm run migrate:dev
|
||||
```
|
||||
|
||||
Run tests:
|
||||
|
||||
```
|
||||
yarn test
|
||||
```
|
||||
|
||||
Run coverage:
|
||||
|
||||
```
|
||||
yarn coverage
|
||||
```
|
||||
|
||||
## Emulate MPC trusted setup ceremony
|
||||
|
||||
```bash
|
||||
|
@ -24,7 +24,8 @@
|
||||
"prettier:fix": "prettier --write . --config .prettierrc",
|
||||
"lint": "yarn eslint && yarn prettier:check",
|
||||
"flat": "npx truffle-flattener contracts/ETHTornado.sol > ETHTornado_flat.sol && npx truffle-flattener contracts/ERC20Tornado.sol > ERC20Tornado_flat.sol",
|
||||
"download": "node scripts/downloadKeys.js"
|
||||
"download": "node scripts/downloadKeys.js",
|
||||
"coverage": "yarn truffle run coverage"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
@ -57,6 +58,7 @@
|
||||
"truffle-flattener": "^1.4.2",
|
||||
"web3": "^1.3.4",
|
||||
"web3-utils": "^1.3.4",
|
||||
"websnark": "git+https://github.com/tornadocash/websnark.git#4c0af6a8b65aabea3c09f377f63c44e7a58afa6d"
|
||||
"websnark": "git+https://github.com/tornadocash/websnark.git#4c0af6a8b65aabea3c09f377f63c44e7a58afa6d",
|
||||
"solidity-coverage": "^0.7.20"
|
||||
}
|
||||
}
|
||||
|
@ -93,4 +93,6 @@ module.exports = {
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
plugins: ['solidity-coverage'],
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user