This project provides a light, standalone eos-vm testing environment, which can be used for contracts testing without deploying on a testnet. For now this tool is designated for the challenge, to execute evm transactions. See 1 for more deails.
1. jsoncpp
sudo apt-get install libjsoncpp-dev
brew install jsoncpp
sudo apt-get install libssl-dev
brew install openssl
3. eos-vm
4. evmc
5. secp256k1
- Clone the repo and create a
build
directory:
git clone --recursive https://github.com/eosiosg/vm-test
cd vm-test
mkdir build
cd build
- Build the source:
cmake ..
cmake --build . -- -j
- Include the library in other evmc compatible test schemes:
lib/libeosevm.so
lib/libeosevm.dylib
example:
using testeth
from aleth:
testeth -t VMTests -- --all --vm /path_to_build/lib/libeosevm.dylib
- Run supplementary tests:
test/EOSEVMTest
supplementary tests cover cases that require states check, which are likely to fail on some eth tests. Therefore, these cases were integrated explicitly in this project.
5. Run custom eos contract tests:
refer to test/eosio_token_test.cpp
to write custom tests.