eth2.0-specs/solidity_deposit_contract
Raw Pong Ghmoa 967af2102f
Update solidity_deposit_contract/README.md
Co-authored-by: Hsiao-Wei Wang <hwwang156@gmail.com>
2020-09-14 15:10:18 +02:00
..
lib Move files 2020-08-17 22:05:05 +08:00
tests Cleaning 2020-08-18 00:35:50 +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
README.md Update solidity_deposit_contract/README.md 2020-09-14 15:10:18 +02: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

Deposit Contract

History

This is a rewrite 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, version r1 of the Solidity deposit contract has been verified and is considered for adoption. See this blog post for more information.

In August 2020, version r2 was released with metadata modifications and relicensed to CC0-1.0. Afterward, this contract has been ported back to from axic/eth2-deposit-contract to this repository and replaced the Vyper deposit contract.

Compiling solidity deposit contract

In the eth2.0-specs directory run:

make compile_deposit_contract

The following parameters were used to generate the bytecode for the DepositContract available in this repository:

  • Contract Name: DepositContract
  • Compiler Version: Solidity v0.6.11+commit.5ef660b1
  • Optimization Enabled: Yes with 5000000 runs
  • Metadata Options: --metadata-literal (to verify metadata hash)
solc --optimize --optimize-runs 5000000 --metadata-literal --bin deposit_contract.sol

Running web3 tests

  1. In the eth2.0-specs directory run make install_deposit_contract_web3_tester to install the tools needed (make sure to have Python 3.7 and pip installed).
  2. In the eth2.0-specs directory run make test_deposit_contract_web3_tests to execute the tests.

Running randomized dapp tests:

Install the latest version of dapp by following the instructions at dapp.tools. Then in the eth2.0-specs directory run:

make test_deposit_contract