@gluwa/evm-network-test
v0.1.5
Published
empowers developers to rapidly assess both the compatibility and usability of EVM
Downloads
400
Keywords
Readme
Welcome to Gluwa-EVM-Network-Evaluation
How to install?
- run
npm i -g
to install this repo
Run basic test
- run
basicTest --rpc rpc-string
. For examplebasicTest --rpc http://4.246.123.154:21010
will run the test at RPC urlhttp://4.246.123.154:21010
- You can provide a private key string to run the test. For example:
basicTest --rpc http://4.246.123.154:21010 --private-key your-private-key
. This will use your wallet to deploy and run the tests. - If you are running in a network that requires fee to send transaction, you must provide a private key which has ETH in wallet
Run gas consummation test
- run
gasTest --rpc rpc-string
- The test will run inside the provided rpc and the hardhat vm, record the gas usage in each transaction and write into a csv file
- Finally, compare both csv file and check if gas used difference. If difference is < 2% is considered success
- Remove all written files once test finished
Run state override test
- run
npx hardhat test ./test/stateOverride.test.js
- The test will help to check if the network support state overidding which is useful for simulating transaction
- You can test your desired network by adding the network in hardhat.config.js and run with
npx hardhat test ./test/stateOverride.test.js --network {network-name}
Note
- Be careful that this code will write your input json rpc and private key into
hardhat.config.json
. It will remove the data once test is completed but if you force terminate the program your sensitive will last in thehardhat.config.json
. Be careful your data to be exposed.