forked from ethereum/execution-specs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ab527a2
commit df6ff3c
Showing
23 changed files
with
136 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,38 @@ | ||
.DS_Store | ||
__pycache__ | ||
.AppleDouble | ||
.LSOverride | ||
|
||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
pip-wheel-metadata/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
*.manifest | ||
*.spec | ||
|
||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
.tox/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[mypy] | ||
disallow_incomplete_defs = True | ||
disallow_untyped_defs = True | ||
|
||
warn_unused_ignores = True | ||
warn_unused_configs = True | ||
warn_redundant_casts = True | ||
|
||
ignore_missing_imports = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[build-system] | ||
requires = ["setuptools", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.isort] | ||
profile = "black" | ||
multi_line_output = 3 | ||
|
||
[tool.black] | ||
line-length = 79 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[metadata] | ||
name = eth1spec | ||
description = Ethereum specification, provided as a Python package for tooling | ||
and testing | ||
version = 0.1.0 | ||
url = https://github.com/ethereum/eth2.0-specs | ||
|
||
[options] | ||
packages = eth1spec | ||
package_dir = | ||
=src | ||
|
||
python_requires = >=3.7 | ||
install_requires = | ||
pysha3>=1,<2 | ||
coincurve>=15,<16 | ||
|
||
[options.extras_require] | ||
test = | ||
pytest>=6.2,<7 | ||
pytest-cov>=2.12,<3 | ||
|
||
lint = | ||
isort>=5.8,<6 | ||
mypy==0.812; implementation_name == "cpython" | ||
black==21.5b2; implementation_name == "cpython" | ||
flake8>=3.9,<4 | ||
|
||
# vim: set ft=dosini: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import pathlib | ||
|
||
import setuptools | ||
|
||
here = pathlib.Path(__file__).parent.resolve() | ||
|
||
long_description = (here / "README.md").read_text(encoding="utf-8") | ||
|
||
setuptools.setup( | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
) |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
Submodule fixtures
deleted from
82f6a5
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from eth1spec.spec import Account, State, get_account | ||
|
||
|
||
def test_get_account(): | ||
account = Account( | ||
nonce=0, | ||
balance=1, | ||
code_hash=b"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", | ||
) | ||
|
||
state = State() | ||
state[b"aaaaaaaaaaaaaaaaaaaa"] = account | ||
|
||
actual = get_account(state, b"aaaaaaaaaaaaaaaaaaaa") | ||
|
||
assert actual.nonce == 0 | ||
assert actual.balance == 1 | ||
assert actual.code_hash == b"yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[tox] | ||
envlist = py3,pypy3 | ||
|
||
[testenv] | ||
extras = | ||
test | ||
lint | ||
commands = | ||
isort src tests setup.py --check --diff | ||
black src tests setup.py --check --diff | ||
pyflakes src tests setup.py | ||
mypy src tests setup.py | ||
pytest | ||
|
||
[testenv:pypy3] | ||
extras = | ||
test | ||
lint | ||
commands = | ||
isort src tests setup.py --check --diff | ||
pyflakes src tests setup.py | ||
pytest |