energywebfoundation / volta-system-tests

GNU General Public License v3.0
1 stars 2 forks source link

Volta system level tests

Based on web3.js, web3.py and Parity Ethereum.

Maintainers

Primary: Pietro Danzi (@danzipie)

Adam Nagy (@ngyam), Heiko Burkhardt (@hai-ko), Jonas Bentke (@jbentke)

Pre-requisites

Installation

1. NPM Scripts

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.

2. Test Accounts

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:

accounts/testaccounts.json template:

[
    {
        "privateKey": "0xaddhere",
        "address": "0xaddhere"
    },
    {
        "privateKey": "0xaddhere",
        "address": "0xaddhere"
    },
    {
        "privateKey": "0xaddhere",
        "address": "0xaddhere"
    }
]

3. Run Local Client

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.

Test Execution

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.

Guidelines

Contributing

Please read our CONTRIBUTING guide for our code of conduct and for the process of submitting pull requests to us.

Versioning

We use SemVer for versioning.

License

This project is licensed under the GPLv3 License - see the LICENSE file for details.

FAQ