From 03ff4d905c9d621cb38537426ef1f8603ef8c1b4 Mon Sep 17 00:00:00 2001 From: Raw Pong Ghmoa <58883403+q9f@users.noreply.github.com> Date: Mon, 14 Sep 2020 11:37:37 +0200 Subject: [PATCH 1/7] deposit contract: add verifying bytecode to readme closes #2052 --- solidity_deposit_contract/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/solidity_deposit_contract/README.md b/solidity_deposit_contract/README.md index 52519eccd..1789829d6 100644 --- a/solidity_deposit_contract/README.md +++ b/solidity_deposit_contract/README.md @@ -23,3 +23,11 @@ Install the latest version of `dapp` by following the instructions at [dapp.tool ```sh make test_deposit_contract ``` +## Verifying bytecode + +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 +* Other Settings: `default evmVersion` From b03d58e5d8555ac57aa81283399462045f6ef8b7 Mon Sep 17 00:00:00 2001 From: Raw Pong Ghmoa <58883403+q9f@users.noreply.github.com> Date: Mon, 14 Sep 2020 11:51:19 +0200 Subject: [PATCH 2/7] add metadata options --- solidity_deposit_contract/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/solidity_deposit_contract/README.md b/solidity_deposit_contract/README.md index 1789829d6..1f17e8df0 100644 --- a/solidity_deposit_contract/README.md +++ b/solidity_deposit_contract/README.md @@ -30,4 +30,5 @@ The following parameters were used to generate the bytecode for the `DepositCont * Contract Name: `DepositContract` * Compiler Version: Solidity `v0.6.11+commit.5ef660b1` * Optimization Enabled: `Yes` with `5000000` runs -* Other Settings: `default evmVersion` +* EVM Version: `default` (Istanbul) +* Metadata Options: `--metadata-literal` (to verify metadata hash) From bb2afbbc471a45cd328b1ef5ccd449a1bfdf0e6b Mon Sep 17 00:00:00 2001 From: Raw Pong Ghmoa <58883403+q9f@users.noreply.github.com> Date: Mon, 14 Sep 2020 13:15:48 +0200 Subject: [PATCH 3/7] add solc cli params --- solidity_deposit_contract/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/solidity_deposit_contract/README.md b/solidity_deposit_contract/README.md index 1f17e8df0..d2549724e 100644 --- a/solidity_deposit_contract/README.md +++ b/solidity_deposit_contract/README.md @@ -32,3 +32,7 @@ The following parameters were used to generate the bytecode for the `DepositCont * Optimization Enabled: `Yes` with `5000000` runs * EVM Version: `default` (Istanbul) * Metadata Options: `--metadata-literal` (to verify metadata hash) + +```sh +solc --optimize --optimize-runs 5000000 --metadata-literal --bin deposit_contract.sol +``` From b734f7d6c97a5561e9086049b8f0f8eee9c792bc Mon Sep 17 00:00:00 2001 From: Raw Pong Ghmoa <58883403+q9f@users.noreply.github.com> Date: Mon, 14 Sep 2020 14:45:07 +0200 Subject: [PATCH 4/7] add make command instructions Co-authored-by: Hsiao-Wei Wang --- solidity_deposit_contract/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/solidity_deposit_contract/README.md b/solidity_deposit_contract/README.md index d2549724e..4de80688e 100644 --- a/solidity_deposit_contract/README.md +++ b/solidity_deposit_contract/README.md @@ -23,7 +23,11 @@ Install the latest version of `dapp` by following the instructions at [dapp.tool ```sh make test_deposit_contract ``` -## Verifying bytecode +## Compiling solidity + +In the `eth2.0-specs` directory run: +```sh +make compile_deposit_contract The following parameters were used to generate the bytecode for the `DepositContract` available in this repository: From 8f5f20b53eb067ecfd673bab28f5155f96e90c27 Mon Sep 17 00:00:00 2001 From: Raw Pong Ghmoa <58883403+q9f@users.noreply.github.com> Date: Mon, 14 Sep 2020 14:46:12 +0200 Subject: [PATCH 5/7] move compiling before web3 tests --- solidity_deposit_contract/README.md | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/solidity_deposit_contract/README.md b/solidity_deposit_contract/README.md index 4de80688e..9383cdda4 100644 --- a/solidity_deposit_contract/README.md +++ b/solidity_deposit_contract/README.md @@ -11,23 +11,12 @@ See this [blog post](https://blog.ethereum.org/2020/06/23/eth2-quick-update-no-1 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`](https://github.com/axic/eth2-deposit-contract) to this repository and replaced the Vyper deposit contract. -## 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](https://dapp.tools/). Then in the `eth2.0-specs` directory run: - -```sh -make test_deposit_contract -``` ## Compiling solidity In the `eth2.0-specs` directory run: ```sh make compile_deposit_contract +``` The following parameters were used to generate the bytecode for the `DepositContract` available in this repository: @@ -40,3 +29,16 @@ The following parameters were used to generate the bytecode for the `DepositCont ```sh 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](https://dapp.tools/). Then in the `eth2.0-specs` directory run: + +```sh +make test_deposit_contract +``` From 5f663c80bc0a92faf987d791b547c9bac6a7fa42 Mon Sep 17 00:00:00 2001 From: Raw Pong Ghmoa <58883403+q9f@users.noreply.github.com> Date: Mon, 14 Sep 2020 15:10:11 +0200 Subject: [PATCH 6/7] Update solidity_deposit_contract/README.md Co-authored-by: Hsiao-Wei Wang --- solidity_deposit_contract/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/solidity_deposit_contract/README.md b/solidity_deposit_contract/README.md index 9383cdda4..285163ff8 100644 --- a/solidity_deposit_contract/README.md +++ b/solidity_deposit_contract/README.md @@ -23,7 +23,6 @@ The following parameters were used to generate the bytecode for the `DepositCont * Contract Name: `DepositContract` * Compiler Version: Solidity `v0.6.11+commit.5ef660b1` * Optimization Enabled: `Yes` with `5000000` runs -* EVM Version: `default` (Istanbul) * Metadata Options: `--metadata-literal` (to verify metadata hash) ```sh From 967af2102f7dc946b298558ac66e817636a49b16 Mon Sep 17 00:00:00 2001 From: Raw Pong Ghmoa <58883403+q9f@users.noreply.github.com> Date: Mon, 14 Sep 2020 15:10:18 +0200 Subject: [PATCH 7/7] Update solidity_deposit_contract/README.md Co-authored-by: Hsiao-Wei Wang --- solidity_deposit_contract/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solidity_deposit_contract/README.md b/solidity_deposit_contract/README.md index 285163ff8..0388d7d2f 100644 --- a/solidity_deposit_contract/README.md +++ b/solidity_deposit_contract/README.md @@ -11,7 +11,7 @@ See this [blog post](https://blog.ethereum.org/2020/06/23/eth2-quick-update-no-1 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`](https://github.com/axic/eth2-deposit-contract) to this repository and replaced the Vyper deposit contract. -## Compiling solidity +## Compiling solidity deposit contract In the `eth2.0-specs` directory run: ```sh