eth2.0-specs/solidity_deposit_contract
Hsiao-Wei Wang 377b2e3f83
Clean up the CI workflow, enable web3.py tests
2020-08-18 00:27:23 +08:00
..
lib Move files 2020-08-17 22:05:05 +08:00
tests Fix typo 2020-08-17 22:13:35 +08:00
web3_tester Clean up the CI workflow, enable web3.py tests 2020-08-18 00:27:23 +08:00
AUTHORS Move files 2020-08-17 22:05:05 +08:00
LICENSE Move files 2020-08-17 22:05:05 +08:00
Makefile Move files 2020-08-17 22:05:05 +08:00
README.md Move files 2020-08-17 22:05:05 +08:00
circle.yml Move files 2020-08-17 22:05:05 +08:00
deposit_contract.json Move files 2020-08-17 22:05:05 +08:00
deposit_contract.sol Move files 2020-08-17 22:05:05 +08:00
shell.nix Move files 2020-08-17 22:05:05 +08:00

README.md

eth2-deposit-contract

This is a port of the Vyper Eth 2.0 deposit contract to Solidity.

The original motivation was to run the SMTChecker and the new Yul IR generator option (--ir) in the compiler.

As of June 2020, this contract (the version tagged as r1) has been verified and is considered for adoption. See this blog post for more information.

Using this with the tests

  1. Create the deposit_contract.json by running make (this requires solc to be in the path)
  2. Download eth2.0-specs
  3. Replace eth2.0-specs/deposit_contract/contracts/validator_registration.json with deposit_contract.json
  4. In the eth2.0-specs directory run make install_deposit_contract_tester to install the tools needed (make sure to have Python 3.7 and pip installed)
  5. Finally in the eth2.0-specs directory run make test_deposit_contract to execute the tests

The Makefile currently compiles the code without optimisations. To enable optimisations add --optimize to the solc line.

Running randomized dapp tests:

Install the latest version of dapp by following the instructions at dapp.tools. Then run

make test