eth2-deposit-contract
eth2-deposit-contract copied to clipboard
This is a port of the Vyper Eth 2.0 deposit contract to Solidity.
eth2-deposit-contract
This repository is archived and the project is now maintained within the Eth2.0 specifications repository.
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
- Create the
deposit_contract.jsonby runningmake(this requiressolcto be in the path) - Download eth2.0-specs
- Replace
eth2.0-specs/deposit_contract/contracts/validator_registration.jsonwithdeposit_contract.json - In the
eth2.0-specsdirectory runmake install_deposit_contract_testerto install the tools needed (make sure to have Python 3.7 and pip installed) - Finally in the
eth2.0-specsdirectory runmake test_deposit_contractto 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