parent
96237c74e1
commit
5b8cca8314
|
@ -48,15 +48,15 @@ commands:
|
|||
description: "Restore the cache with deposit_contract keys"
|
||||
steps:
|
||||
- restore_cached_venv:
|
||||
venv_name: v2-deposit-contract
|
||||
venv_name: v3-deposit-contract
|
||||
reqs_checksum: cache-{{ checksum "test_libs/pyspec/requirements.txt" }}-{{ checksum "deposit_contract/requirements-testing.txt" }}
|
||||
save_deposit_contract_cached_venv:
|
||||
description: Save a venv into a cache with deposit_contract keys"
|
||||
steps:
|
||||
- save_cached_venv:
|
||||
venv_name: v2-deposit-contract
|
||||
venv_name: v3-deposit-contract
|
||||
reqs_checksum: cache-{{ checksum "test_libs/pyspec/requirements.txt" }}-{{ checksum "deposit_contract/requirements-testing.txt" }}
|
||||
venv_path: ./test_libs/pyspec/venv
|
||||
venv_path: ./deposit_contract/venv
|
||||
jobs:
|
||||
checkout_specs:
|
||||
docker:
|
||||
|
|
15
Makefile
15
Makefile
|
@ -31,6 +31,7 @@ clean:
|
|||
rm -rf $(GENERATOR_VENVS)
|
||||
rm -rf $(PY_SPEC_DIR)/venv $(PY_SPEC_DIR)/.pytest_cache
|
||||
rm -rf $(PY_SPEC_ALL_TARGETS)
|
||||
rm -rf $(DEPOSIT_CONTRACT_DIR)/venv $(DEPOSIT_CONTRACT_DIR)/.pytest_cache
|
||||
|
||||
# "make gen_yaml_tests" to run generators
|
||||
gen_yaml_tests: $(PY_SPEC_ALL_TARGETS) $(YAML_TEST_TARGETS)
|
||||
|
@ -50,19 +51,15 @@ lint: $(PY_SPEC_ALL_TARGETS)
|
|||
cd $(PY_SPEC_DIR); . venv/bin/activate; \
|
||||
flake8 --ignore=E252,W504,W503 --max-line-length=120 ./eth2spec;
|
||||
|
||||
install_deposit_contract_test:
|
||||
cd $(DEPOSIT_CONTRACT_DIR); python3 -m venv venv; . venv/bin/activate; pip3 install -r requirements-testing.txt
|
||||
|
||||
compile_deposit_contract:
|
||||
cd $(PY_SPEC_DIR); python3 -m venv venv; . venv/bin/activate; \
|
||||
cd ../..; cd $(DEPOSIT_CONTRACT_DIR); \
|
||||
cd $(DEPOSIT_CONTRACT_DIR); . venv/bin/activate; \
|
||||
python tool/compile_deposit_contract.py contracts/validator_registration.v.py;
|
||||
|
||||
install_deposit_contract_test:
|
||||
cd $(PY_SPEC_DIR); python3 -m venv venv; . venv/bin/activate; \
|
||||
cd ../..; cd $(DEPOSIT_CONTRACT_DIR); \
|
||||
pip3 install -r requirements-testing.txt
|
||||
|
||||
test_deposit_contract: $(PY_SPEC_ALL_TARGETS)
|
||||
cd $(PY_SPEC_DIR); python3 -m venv venv; . venv/bin/activate; \
|
||||
cd ../.. && cd $(DEPOSIT_CONTRACT_DIR); \
|
||||
cd $(DEPOSIT_CONTRACT_DIR); . venv/bin/activate; \
|
||||
pip3 install -r requirements-testing.txt; \
|
||||
python -m pytest .
|
||||
|
||||
|
|
|
@ -1,20 +1,21 @@
|
|||
# Deposit contract
|
||||
|
||||
## How to compile the contract?
|
||||
## How to set up the testing environment?
|
||||
|
||||
Under the `eth2.0-specs` directory, execute:
|
||||
|
||||
```sh
|
||||
make install_deposit_contract_test
|
||||
```
|
||||
|
||||
## How to compile the contract?
|
||||
|
||||
```sh
|
||||
make compile_deposit_contract
|
||||
```
|
||||
|
||||
The ABI and bytecode will be updated at [`contracts/validator_registration.json`](./contracts/validator_registration.json).
|
||||
|
||||
## How to set up the testing environment?
|
||||
|
||||
```sh
|
||||
make install_deposit_contract_test
|
||||
```
|
||||
|
||||
## How to run tests?
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
tox==3.0.0
|
||||
eth-tester[py-evm]==0.1.0b29
|
||||
eth-tester[py-evm]==0.1.0b39
|
||||
vyper==0.1.0b9
|
||||
web3==4.8.3
|
||||
web3==5.0.0b2
|
||||
pytest==3.6.1
|
||||
../test_libs/pyspec
|
||||
|
|
Loading…
Reference in New Issue