sudo apt install software-properties-common
sudo add-apt-repository ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install solc
brew update
brew upgrade
brew tap ethereum/ethereum
brew install solidity
python3.7 -m pip install virtualenv
python3.7 -m virtualenv .venv
. .venv/bin/activate
python3.7 -m pip install https://github.com/learnforpractice/pyeoskit/releases/download/v0.7.0/pyeoskit-0.7.0-cp37-cp37m-linux_x86_64.whl
python3.7 -m pip install https://github.com/learnforpractice/pyeoskit/releases/download/v0.7.0/pyeoskit-0.7.0-cp37-cp37m-macosx_10_9_x86_64.whl
python3.7 -m pip install notebook
python3.7 -m pip install py-solc-x
python3.7 -m pip install --pre web3[tester]==5.5.0
python3.7 -m pip install base58
rm -r dd
nodeos --verbose-http-errors --http-max-response-time-ms 100 --data-dir dd --config-dir cd --wasm-runtime eos-vm-jit --contracts-console -p eosio -e --plugin eosio::producer_plugin --plugin eosio::chain_api_plugin --plugin eosio::producer_api_plugin
In order to pass test_ecrecover
and test_sign_with_eth_private_key
testcase in evm_test.py, start nodeos with --eos-vm-oc-enable
option as show below:
rm -r dd
nodeos --eos-vm-oc-enable --verbose-http-errors --http-max-response-time-ms 100 --data-dir dd --config-dir cd --wasm-runtime eos-vm-jit --contracts-console -p eosio -e --plugin eosio::producer_plugin --plugin eosio::chain_api_plugin --plugin eosio::producer_api_plugin
In the same directory, run the following command:
python3.7 testnet-init.py http://127.0.0.1:8888
modify http://127.0.0.1:8888 to the right url if nodeos's http server is not listening at the default ip and port
In the same directory, run the following command:
python3.7 evm_test.py http://127.0.0.1:8888
modify http://127.0.0.1:8888 to the right url if nodeos's http server is not listening at the default ip and port
python3.7 testsrunner.py -- --http-server-address http://127.0.0.1:8888 -d VMTests -v 0
Notes:
There are 609 evm tests in VMTests directory, 123 vm tests will throw exceptions from evm as expected, other tests will not throw exceptions as pass the result checking.
Refer to test script in testsrunner.py for how it works.
Python script eth2eosbridge.py enables applications to interact with EVM smart contract on EOSIO through the Ethereum RPC Interface, so that Dapp on Ethereum can be easily ported to the EOSIO platform.
To use this tool run the following command to install required Python packages.
python3.7 -m pip install plyvel
python3.7 -m pip install flask
python3.7 -m pip install flask_cors
Run the following command to start this tool
python3.7 eth2eosbridge.py