2019-05-30 06:12:05 +00:00
|
|
|
# Deposit contract
|
|
|
|
|
2019-06-08 02:19:11 +00:00
|
|
|
## How to set up the testing environment?
|
2019-05-30 06:12:05 +00:00
|
|
|
|
|
|
|
Under the `eth2.0-specs` directory, execute:
|
|
|
|
|
|
|
|
```sh
|
2020-01-22 17:09:40 +00:00
|
|
|
make install_deposit_contract_tester
|
2019-05-30 06:12:05 +00:00
|
|
|
```
|
|
|
|
|
2019-06-08 02:19:11 +00:00
|
|
|
## How to compile the contract?
|
2019-05-30 06:12:05 +00:00
|
|
|
|
|
|
|
```sh
|
2019-06-08 02:19:11 +00:00
|
|
|
make compile_deposit_contract
|
2019-05-30 06:12:05 +00:00
|
|
|
```
|
|
|
|
|
2020-01-22 17:09:40 +00:00
|
|
|
The compiler dependencies can be installed with:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
make install_deposit_contract_compiler
|
|
|
|
```
|
|
|
|
|
|
|
|
Note that this requires python 3.7 to be installed. The pinned vyper version will not work on 3.8.
|
|
|
|
|
2019-06-08 02:19:11 +00:00
|
|
|
The ABI and bytecode will be updated at [`contracts/validator_registration.json`](./contracts/validator_registration.json).
|
|
|
|
|
|
|
|
|
2019-05-30 06:12:05 +00:00
|
|
|
## How to run tests?
|
|
|
|
|
2020-01-22 17:09:40 +00:00
|
|
|
For running the contract tests:
|
2019-05-30 06:12:05 +00:00
|
|
|
```sh
|
|
|
|
make test_deposit_contract
|
|
|
|
```
|
2020-01-22 17:09:40 +00:00
|
|
|
|
|
|
|
For testing the compiler output against the expected formally-verified bytecode:
|
|
|
|
```sh
|
|
|
|
make test_compile_deposit_contract
|
|
|
|
```
|