Based on web3.js, web3.py and Parity Ethereum.
Primary: Pietro Danzi (@danzipie)
Adam Nagy (@ngyam), Heiko Burkhardt (@hai-ko), Jonas Bentke (@jbentke)
- node 8
- npm
npm install
This pulls some dependency repos, such as the contracts repo and the chainspec generator.
npm run compile
This compiles the contracts with a local truffle in order to obtain their ABI.
Since these tests run on a live chain, some unlocked accounts with ethers are needed for testing.
The tests expect the test accounts to be in the accounts/testaccounts.json
file. Use the template snippet below to paste your private keys and place it there.
Important:
- This file must not be commited.
- You need to add at least 3 addresses.
- The first two addresses must be
VALIDATOR_NETOPS
andCOMMUNITY_FUND
multisig contract owners. These accounts also need to be funded before the tests can be executed. - This means that the
VALIDATOR_NETOPS
andCOMMUNITY_FUND
multisig must to have a confirmation threshold of 2 to run the tests successfully. - The third address can be an address of your choosing.
accounts/testaccounts.json
template:
[
{
"privateKey": "0xaddhere",
"address": "0xaddhere"
},
{
"privateKey": "0xaddhere",
"address": "0xaddhere"
},
{
"privateKey": "0xaddhere",
"address": "0xaddhere"
}
]
Download an EWF chain spec file, e.g. for Volta and run:
parity --chain ./Volta.json --jsonrpc-apis=all --jsonrpc-cors=all --ipc-apis=all --ws-apis=all --ws-origins=all --no-persistent-txqueue --no-warp --pruning=archive
Important: leave the rpc and ws interfaces at their default setting: local
. The default ports 8545 for rpc and 8546 for ws are used by the tests.
To run the tests, execute:
npm test
Important: Do not stop the tests before they are completed. Stopping the tests may lead to an unclean state which needs to be cleand manually.
- Scripts: the folder utils contains useful Python scripts
- Sanity (integration) tests: Mocha tests (inspired by the unit tests)
- Security tests: Mocha tests
Please read our CONTRIBUTING guide for our code of conduct and for the process of submitting pull requests to us.
We use SemVer for versioning.
This project is licensed under the GPLv3 License - see the LICENSE file for details.