pax_global_header00006660000000000000000000000064147772711660014534gustar00rootroot0000000000000052 comment=22cd9dcba21f033cdc464b0108d80599b97bbc62 eth-typing-5.2.1/000077500000000000000000000000001477727116600136315ustar00rootroot00000000000000eth-typing-5.2.1/.circleci/000077500000000000000000000000001477727116600154645ustar00rootroot00000000000000eth-typing-5.2.1/.circleci/config.yml000066400000000000000000000173761477727116600174720ustar00rootroot00000000000000version: 2.1 # heavily inspired by https://raw.githubusercontent.com/pinax/pinax-wiki/6bd2a99ab6f702e300d708532a6d1d9aa638b9f8/.circleci/config.yml common: &common working_directory: ~/repo steps: - checkout - run: name: merge pull request base command: ./.circleci/merge_pr.sh - run: name: merge pull request base (2nd try) command: ./.circleci/merge_pr.sh when: on_fail - run: name: merge pull request base (3rd try) command: ./.circleci/merge_pr.sh when: on_fail - restore_cache: keys: - cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }} - run: name: install dependencies command: | python -m pip install --upgrade pip python -m pip install tox - run: name: run tox command: python -m tox run -r - save_cache: paths: - .hypothesis - .tox - ~/.cache/pip - ~/.local key: cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }} orbs: win: circleci/windows@5.0.0 windows-wheel-steps: windows-wheel-setup: &windows-wheel-setup executor: name: win/default shell: bash.exe working_directory: C:\Users\circleci\project\eth-typing environment: TOXENV: windows-wheel restore-cache-step: &restore-cache-step restore_cache: keys: - cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }} install-pyenv-step: &install-pyenv-step run: name: install pyenv command: | pip install pyenv-win --target $HOME/.pyenv echo 'export PYENV="$HOME/.pyenv/pyenv-win/"' >> $BASH_ENV echo 'export PYENV_ROOT="$HOME/.pyenv/pyenv-win/"' >> $BASH_ENV echo 'export PYENV_USERPROFILE="$HOME/.pyenv/pyenv-win/"' >> $BASH_ENV echo 'export PATH="$PATH:$HOME/.pyenv/pyenv-win/bin"' >> $BASH_ENV echo 'export PATH="$PATH:$HOME/.pyenv/pyenv-win/shims"' >> $BASH_ENV source $BASH_ENV pyenv update install-latest-python-step: &install-latest-python-step run: name: install latest python version and tox command: | LATEST_VERSION=$(pyenv install --list | grep -E "${MINOR_VERSION}\.[0-9]+$" | tail -1) echo "installing python version $LATEST_VERSION" pyenv install $LATEST_VERSION pyenv global $LATEST_VERSION python3 -m pip install --upgrade pip python3 -m pip install tox run-tox-step: &run-tox-step run: name: run tox command: | echo 'running tox with' $(python3 --version) python3 -m tox run -r save-cache-step: &save-cache-step save_cache: paths: - .tox key: cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }} docs: &docs working_directory: ~/repo steps: - checkout - restore_cache: keys: - cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }} - run: name: install dependencies command: | python -m pip install --upgrade pip python -m pip install tox - run: name: install latexpdf dependencies command: | sudo apt-get update sudo apt-get install latexmk tex-gyre texlive-fonts-extra texlive-xetex xindy - run: name: run tox command: python -m tox run -r - store_artifacts: path: /home/circleci/repo/docs/_build - save_cache: paths: - .tox - ~/.cache/pip - ~/.local key: cache-v1-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "setup.py" }}-{{ checksum "tox.ini" }} resource_class: xlarge jobs: docs: <<: *docs docker: - image: cimg/python:3.10 environment: TOXENV: docs py38-core: <<: *common docker: - image: cimg/python:3.8 environment: TOXENV: py38-core py39-core: <<: *common docker: - image: cimg/python:3.9 environment: TOXENV: py39-core py310-core: <<: *common docker: - image: cimg/python:3.10 environment: TOXENV: py310-core py311-core: <<: *common docker: - image: cimg/python:3.11 environment: TOXENV: py311-core py312-core: <<: *common docker: - image: cimg/python:3.12 environment: TOXENV: py312-core py313-core: <<: *common docker: - image: cimg/python:3.13 environment: TOXENV: py313-core py38-lint: <<: *common docker: - image: cimg/python:3.8 environment: TOXENV: py38-lint py39-lint: <<: *common docker: - image: cimg/python:3.9 environment: TOXENV: py39-lint py310-lint: <<: *common docker: - image: cimg/python:3.10 environment: TOXENV: py310-lint py311-lint: <<: *common docker: - image: cimg/python:3.11 environment: TOXENV: py311-lint py312-lint: <<: *common docker: - image: cimg/python:3.12 environment: TOXENV: py312-lint py313-lint: <<: *common docker: - image: cimg/python:3.13 environment: TOXENV: py313-lint py38-wheel: <<: *common docker: - image: cimg/python:3.8 environment: TOXENV: py38-wheel py39-wheel: <<: *common docker: - image: cimg/python:3.9 environment: TOXENV: py39-wheel py310-wheel: <<: *common docker: - image: cimg/python:3.10 environment: TOXENV: py310-wheel py311-wheel: <<: *common docker: - image: cimg/python:3.11 environment: TOXENV: py311-wheel py312-wheel: <<: *common docker: - image: cimg/python:3.12 environment: TOXENV: py312-wheel py313-wheel: <<: *common docker: - image: cimg/python:3.13 environment: TOXENV: py313-wheel py311-windows-wheel: <<: *windows-wheel-setup steps: - checkout - <<: *restore-cache-step - <<: *install-pyenv-step - run: name: set minor version command: echo "export MINOR_VERSION='3.11'" >> $BASH_ENV - <<: *install-latest-python-step - <<: *run-tox-step - <<: *save-cache-step py312-windows-wheel: <<: *windows-wheel-setup steps: - checkout - <<: *restore-cache-step - <<: *install-pyenv-step - run: name: set minor version command: echo "export MINOR_VERSION='3.12'" >> $BASH_ENV - <<: *install-latest-python-step - <<: *run-tox-step - <<: *save-cache-step py313-windows-wheel: <<: *windows-wheel-setup steps: - checkout - <<: *restore-cache-step - <<: *install-pyenv-step - run: name: set minor version command: echo "export MINOR_VERSION='3.13'" >> $BASH_ENV - <<: *install-latest-python-step - <<: *run-tox-step - <<: *save-cache-step define: &all_jobs - docs - py38-core - py39-core - py310-core - py311-core - py312-core - py313-core - py38-lint - py39-lint - py310-lint - py311-lint - py312-lint - py313-lint - py38-wheel - py39-wheel - py310-wheel - py311-wheel - py312-wheel - py313-wheel - py311-windows-wheel - py312-windows-wheel - py313-windows-wheel workflows: version: 2 test: jobs: *all_jobs nightly: triggers: - schedule: # Weekdays 12:00p UTC cron: "0 12 * * 1,2,3,4,5" filters: branches: only: - main jobs: *all_jobs eth-typing-5.2.1/.circleci/merge_pr.sh000077500000000000000000000011271477727116600176240ustar00rootroot00000000000000#!/usr/bin/env bash if [[ -n "${CIRCLE_PR_NUMBER}" ]]; then PR_INFO_URL=https://api.github.com/repos/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pulls/$CIRCLE_PR_NUMBER PR_BASE_BRANCH=$(curl -L "$PR_INFO_URL" | python -c 'import json, sys; obj = json.load(sys.stdin); sys.stdout.write(obj["base"]["ref"])') git fetch origin +"$PR_BASE_BRANCH":circleci/pr-base # We need these config values or git complains when creating the # merge commit git config --global user.name "Circle CI" git config --global user.email "circleci@example.com" git merge --no-edit circleci/pr-base fi eth-typing-5.2.1/.github/000077500000000000000000000000001477727116600151715ustar00rootroot00000000000000eth-typing-5.2.1/.github/ISSUE_TEMPLATE/000077500000000000000000000000001477727116600173545ustar00rootroot00000000000000eth-typing-5.2.1/.github/ISSUE_TEMPLATE/bug_report.yml000066400000000000000000000035521477727116600222540ustar00rootroot00000000000000name: Bug Report description: File a bug report labels: ["bug"] body: - type: markdown attributes: value: "## What was wrong" - type: textarea id: what-happened attributes: label: What happened? description: Also tell us what you expected to happen validations: required: true - type: textarea id: code-that-caused attributes: label: Code that produced the error description: Formats to Python, no backticks needed render: python validations: required: false - type: textarea id: error-output attributes: label: Full error output description: Formats to shell, no backticks needed render: shell validations: required: false - type: markdown attributes: value: "## Potential Solutions" - type: textarea id: how-to-fix attributes: label: Fill this section in if you know how this could or should be fixed description: Include any relevant examples or reference material validations: required: false - type: input id: lib-version attributes: label: eth-typing Version description: Which version of eth-typing are you using? placeholder: x.x.x validations: required: false - type: input id: py-version attributes: label: Python Version description: Which version of Python are you using? placeholder: x.x.x validations: required: false - type: input id: os attributes: label: Operating System description: Which operating system are you using? placeholder: osx/linux/win validations: required: false - type: textarea id: pip-freeze attributes: label: Output from `pip freeze` description: Run `python -m pip freeze` and paste the output below render: shell validations: required: false eth-typing-5.2.1/.github/ISSUE_TEMPLATE/config.yml000066400000000000000000000003301477727116600213400ustar00rootroot00000000000000blank_issues_enabled: true contact_links: - name: Questions about using eth-typing? url: https://discord.gg/GHryRvPB84 about: You can ask and answer usage questions on the Ethereum Python Community Discord eth-typing-5.2.1/.github/ISSUE_TEMPLATE/feature_request.yml000066400000000000000000000004601477727116600233020ustar00rootroot00000000000000name: Feature Request description: Request a new feature labels: ["feature_request"] body: - type: textarea id: feature-description attributes: label: What feature should we add? description: Include any relevant examples or reference material validations: required: true eth-typing-5.2.1/.github/pull_request_template.md000066400000000000000000000005761477727116600221420ustar00rootroot00000000000000### What was wrong? Related to Issue # Closes # ### How was it fixed? ### Todo: - [ ] Clean up commit history - [ ] Add or update documentation related to these changes - [ ] Add entry to the [release notes](https://github.com/ethereum/eth-typing/blob/main/newsfragments/README.md) #### Cute Animal Picture ![Put a link to a cute animal picture inside the parenthesis-->](<>) eth-typing-5.2.1/.gitignore000066400000000000000000000026031477727116600156220ustar00rootroot00000000000000*.py[cod] # C extensions *.so # Packages *.egg *.egg-info dist build .build eggs .eggs parts bin var sdist develop-eggs .installed.cfg lib lib64 pip-wheel-metadata venv* .venv* # Installer logs pip-log.txt # Unit test / coverage reports .coverage .tox nosetests.xml # Translations *.mo # Mr Developer .mr.developer.cfg .project .pydevproject # Complexity output/*.html output/*/index.html # Sphinx docs/_build docs/modules.rst docs/update_network_chain_ids.rst docs/*.internal.rst docs/*.utils.rst docs/*._utils.* # Blockchain chains # Hypothesis Property base testing .hypothesis # tox/pytest cache .pytest_cache .cache .pytest_cache # pycache __pycache__/ # Test output logs logs # VIM temp files *.sw[op] # mypy .mypy_cache # macOS .DS_Store # pyenv .python-version # vs-code .vscode # jupyter notebook files *.ipynb # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm # For a more precise, explicit template, see: # https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 ## General .idea/* .idea_modules/* ## File-based project format: *.iws ## IntelliJ out/ ## Plugin-specific files: ### JIRA plugin atlassian-ide-plugin.xml ### Crashlytics plugin (for Android Studio and IntelliJ) com_crashlytics_export_strings.xml crashlytics.properties crashlytics-build.properties fabric.properties # END JetBrains section eth-typing-5.2.1/.pre-commit-config.yaml000066400000000000000000000035141477727116600201150ustar00rootroot00000000000000exclude: '.project-template|docs/conf.py' repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.5.0 hooks: - id: check-yaml - id: check-toml - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/asottile/pyupgrade rev: v3.15.0 hooks: - id: pyupgrade args: [--py38-plus] - repo: https://github.com/psf/black rev: 23.9.1 hooks: - id: black - repo: https://github.com/PyCQA/flake8 rev: 6.1.0 hooks: - id: flake8 additional_dependencies: - flake8-bugbear==23.9.16 exclude: setup.py - repo: https://github.com/PyCQA/autoflake rev: v2.2.1 hooks: - id: autoflake - repo: https://github.com/pycqa/isort rev: 5.12.0 hooks: - id: isort - repo: https://github.com/pycqa/pydocstyle rev: 6.3.0 hooks: - id: pydocstyle additional_dependencies: - tomli # required until >= python311 - repo: https://github.com/executablebooks/mdformat rev: 0.7.17 hooks: - id: mdformat additional_dependencies: - mdformat-gfm - repo: local hooks: - id: mypy-local name: run mypy with all dev dependencies present entry: python -m mypy -p eth_typing language: system always_run: true pass_filenames: false - repo: https://github.com/PrincetonUniversity/blocklint rev: v0.2.5 hooks: - id: blocklint exclude: 'docs/Makefile|docs/release_notes.rst|tox.ini' - repo: local hooks: - id: check-rst-files name: Check for .rst files in the top-level directory entry: sh -c 'ls *.rst 1>/dev/null 2>&1 && { echo "found .rst file in top-level folder"; exit 1; } || exit 0' language: system always_run: true pass_filenames: false eth-typing-5.2.1/.project-template/000077500000000000000000000000001477727116600171665ustar00rootroot00000000000000eth-typing-5.2.1/.project-template/fill_template_vars.py000066400000000000000000000044151477727116600234200ustar00rootroot00000000000000#!/usr/bin/env python3 import os import sys import re from pathlib import Path def _find_files(project_root): path_exclude_pattern = r"\.git($|\/)|venv|_build" file_exclude_pattern = r"fill_template_vars\.py|\.swp$" filepaths = [] for dir_path, _dir_names, file_names in os.walk(project_root): if not re.search(path_exclude_pattern, dir_path): for file in file_names: if not re.search(file_exclude_pattern, file): filepaths.append(str(Path(dir_path, file))) return filepaths def _replace(pattern, replacement, project_root): print(f"Replacing values: {pattern}") for file in _find_files(project_root): try: with open(file) as f: content = f.read() content = re.sub(pattern, replacement, content) with open(file, "w") as f: f.write(content) except UnicodeDecodeError: pass def main(): project_root = Path(os.path.realpath(sys.argv[0])).parent.parent module_name = input("What is your python module name? ") pypi_input = input(f"What is your pypi package name? (default: {module_name}) ") pypi_name = pypi_input or module_name repo_input = input(f"What is your github project name? (default: {pypi_name}) ") repo_name = repo_input or pypi_name rtd_input = input( f"What is your readthedocs.org project name? (default: {pypi_name}) " ) rtd_name = rtd_input or pypi_name project_input = input( f"What is your project name (ex: at the top of the README)? (default: {repo_name}) " ) project_name = project_input or repo_name short_description = input("What is a one-liner describing the project? ") _replace("", module_name, project_root) _replace("", pypi_name, project_root) _replace("", repo_name, project_root) _replace("", rtd_name, project_root) _replace("", project_name, project_root) _replace("", short_description, project_root) os.makedirs(project_root / module_name, exist_ok=True) Path(project_root / module_name / "__init__.py").touch() Path(project_root / module_name / "py.typed").touch() if __name__ == "__main__": main() eth-typing-5.2.1/.project-template/refill_template_vars.py000066400000000000000000000015771477727116600237550ustar00rootroot00000000000000#!/usr/bin/env python3 import os import sys from pathlib import Path import subprocess def main(): template_dir = Path(os.path.dirname(sys.argv[0])) template_vars_file = template_dir / "template_vars.txt" fill_template_vars_script = template_dir / "fill_template_vars.py" with open(template_vars_file, "r") as input_file: content_lines = input_file.readlines() process = subprocess.Popen( [sys.executable, str(fill_template_vars_script)], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, ) for line in content_lines: process.stdin.write(line) process.stdin.flush() stdout, stderr = process.communicate() if process.returncode != 0: print(f"Error occurred: {stderr}") sys.exit(1) print(stdout) if __name__ == "__main__": main() eth-typing-5.2.1/.project-template/template_vars.txt000066400000000000000000000001541477727116600225750ustar00rootroot00000000000000eth_typing eth-typing eth-typing eth-typing eth-typing Common type annotations for ethereum python packages eth-typing-5.2.1/.readthedocs.yaml000066400000000000000000000004471477727116600170650ustar00rootroot00000000000000version: 2 build: os: ubuntu-22.04 tools: python: "3.10" sphinx: configuration: docs/conf.py fail_on_warning: true python: install: - method: pip path: . extra_requirements: - docs # Build all formats for RTD Downloads - htmlzip, pdf, epub formats: all eth-typing-5.2.1/LICENSE000066400000000000000000000021071477727116600146360ustar00rootroot00000000000000The MIT License (MIT) Copyright (c) 2018-2025 The Ethereum Foundation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. eth-typing-5.2.1/MANIFEST.in000066400000000000000000000003041477727116600153640ustar00rootroot00000000000000include LICENSE include README.md recursive-include scripts * recursive-include tests * global-include *.pyi recursive-exclude * __pycache__ recursive-exclude * *.py[co] prune .tox prune venv* eth-typing-5.2.1/Makefile000066400000000000000000000067171477727116600153040ustar00rootroot00000000000000CURRENT_SIGN_SETTING := $(shell git config commit.gpgSign) .PHONY: clean-pyc clean-build docs help: @echo "clean-build - remove build artifacts" @echo "clean-pyc - remove Python file artifacts" @echo "clean - run clean-build and clean-pyc" @echo "dist - build package and cat contents of the dist directory" @echo "lint - fix linting issues with pre-commit" @echo "test - run tests quickly with the default Python" @echo "docs - generate docs and open in browser (linux-docs for version on linux)" @echo "autobuild-docs - live update docs when changes are saved" @echo "package-test - build package and install it in a venv for manual testing" @echo "notes - consume towncrier newsfragments and update release notes in docs - requires bump to be set" @echo "release - package and upload a release (does not run notes target) - requires bump to be set" clean-build: rm -fr build/ rm -fr dist/ rm -fr *.egg-info clean-pyc: find . -name '*.pyc' -exec rm -f {} + find . -name '*.pyo' -exec rm -f {} + find . -name '*~' -exec rm -f {} + find . -name '__pycache__' -exec rm -rf {} + clean: clean-build clean-pyc dist: clean python -m build ls -l dist lint: @pre-commit run --all-files --show-diff-on-failure || ( \ echo "\n\n\n * pre-commit should have fixed the errors above. Running again to make sure everything is good..." \ && pre-commit run --all-files --show-diff-on-failure \ ) test: python -m pytest tests # docs commands docs: check-docs open docs/_build/html/index.html linux-docs: check-docs xdg-open docs/_build/html/index.html autobuild-docs: sphinx-autobuild --open-browser docs docs/_build/html # docs helpers validate-newsfragments: python ./newsfragments/validate_files.py towncrier build --draft --version preview check-docs: build-docs validate-newsfragments build-docs: sphinx-apidoc -o docs/ . setup.py "*conftest*" $(MAKE) -C docs clean $(MAKE) -C docs html $(MAKE) -C docs doctest check-docs-ci: build-docs build-docs-ci validate-newsfragments build-docs-ci: $(MAKE) -C docs latexpdf $(MAKE) -C docs epub # release commands package-test: clean python -m build python scripts/release/test_package.py notes: check-bump # Let UPCOMING_VERSION be the version that is used for the current bump $(eval UPCOMING_VERSION=$(shell bump-my-version bump --dry-run $(bump) -v | awk -F"'" '/New version will be / {print $$2}')) # Now generate the release notes to have them included in the release commit towncrier build --yes --version $(UPCOMING_VERSION) # Before we bump the version, make sure that the towncrier-generated docs will build make build-docs git commit -m "Compile release notes for v$(UPCOMING_VERSION)" release: check-bump check-git clean # verify that notes command ran correctly ./newsfragments/validate_files.py is-empty CURRENT_SIGN_SETTING=$(git config commit.gpgSign) git config commit.gpgSign true bump-my-version bump $(bump) python -m build git config commit.gpgSign "$(CURRENT_SIGN_SETTING)" git push upstream && git push upstream --tags twine upload dist/* # release helpers check-bump: ifndef bump $(error bump must be set, typically: major, minor, patch, or devnum) endif check-git: # require that upstream is configured for ethereum/eth-typing @if ! git remote -v | grep "upstream[[:space:]]git@github.com:ethereum/eth-typing.git (push)\|upstream[[:space:]]https://github.com/ethereum/eth-typing (push)"; then \ echo "Error: You must have a remote named 'upstream' that points to 'eth-typing'"; \ exit 1; \ fi eth-typing-5.2.1/README.md000066400000000000000000000016441477727116600151150ustar00rootroot00000000000000# eth-typing [![Join the conversation on Discord](https://img.shields.io/discord/809793915578089484?color=blue&label=chat&logo=discord&logoColor=white)](https://discord.gg/GHryRvPB84) [![Build Status](https://circleci.com/gh/ethereum/eth-typing.svg?style=shield)](https://circleci.com/gh/ethereum/eth-typing) [![PyPI version](https://badge.fury.io/py/eth-typing.svg)](https://badge.fury.io/py/eth-typing) [![Python versions](https://img.shields.io/pypi/pyversions/eth-typing.svg)](https://pypi.python.org/pypi/eth-typing) [![Docs build](https://readthedocs.org/projects/eth-typing/badge/?version=latest)](https://eth-typing.readthedocs.io/en/latest/?badge=latest) Common type annotations for ethereum python packages. Read the [documentation](https://eth-typing.readthedocs.io/). View the [change log](https://eth-typing.readthedocs.io/en/latest/release_notes.html). ## Installation ```sh python -m pip install eth-typing ``` eth-typing-5.2.1/docs/000077500000000000000000000000001477727116600145615ustar00rootroot00000000000000eth-typing-5.2.1/docs/Makefile000066400000000000000000000151721477727116600162270ustar00rootroot00000000000000# Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build # User-friendly check for sphinx-build ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) endif # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext help: @echo "Please use \`make ' where is one of" @echo " html to make standalone HTML files" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" @echo " pickle to make pickle files" @echo " json to make JSON files" @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" @echo " devhelp to make HTML files and a Devhelp project" @echo " epub to make an epub" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " latexpdf to make LaTeX files and run them through pdflatex" @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" @echo " text to make text files" @echo " man to make manual pages" @echo " texinfo to make Texinfo files" @echo " info to make Texinfo files and run them through makeinfo" @echo " gettext to make PO message catalogs" @echo " changes to make an overview of all changed/added/deprecated items" @echo " xml to make Docutils-native XML files" @echo " pseudoxml to make pseudoxml-XML files for display purposes" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" clean: rm -rf $(BUILDDIR)/* html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." singlehtml: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." pickle: $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." json: $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." htmlhelp: $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." qthelp: $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/eth_typing.qhcp" @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/eth_typing.qhc" devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" @echo "# mkdir -p $$HOME/.local/share/devhelp/eth_typing" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/eth_typing" @echo "# devhelp" epub: $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." latex: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." latexpdf: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." latexpdfja: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through platex and dvipdfmx..." $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." text: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." man: $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." texinfo: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." @echo "Run \`make' in that directory to run these through makeinfo" \ "(use \`make info' here to do that automatically)." info: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." gettext: $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." changes: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." linkcheck: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." xml: $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml @echo @echo "Build finished. The XML files are in $(BUILDDIR)/xml." pseudoxml: $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml @echo @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." eth-typing-5.2.1/docs/code_of_conduct.rst000066400000000000000000000062771477727116600204440ustar00rootroot00000000000000Code of Conduct --------------- Our Pledge ~~~~~~~~~~ In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. Our Standards ~~~~~~~~~~~~~ Examples of behavior that contributes to creating a positive environment include: * Using welcoming and inclusive language * Being respectful of differing viewpoints and experiences * Gracefully accepting constructive criticism * Focusing on what is best for the community * Showing empathy towards other community members Examples of unacceptable behavior by participants include: * The use of sexualized language or imagery and unwelcome sexual attention or advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or electronic address, without explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting Our Responsibilities ~~~~~~~~~~~~~~~~~~~~ Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. Scope ~~~~~ This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. Enforcement ~~~~~~~~~~~ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at snakecharmers@ethereum.org. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. Attribution ~~~~~~~~~~~ This Code of Conduct is adapted from the `Contributor Covenant `_, version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html eth-typing-5.2.1/docs/conf.py000066400000000000000000000220671477727116600160670ustar00rootroot00000000000000# eth-typing documentation build configuration file, created by # sphinx-quickstart on Thu Oct 16 20:43:24 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # sys.path.insert(0, os.path.abspath('.')) import os DIR = os.path.dirname(__file__) with open(os.path.join(DIR, "../setup.py"), "r") as f: for line in f: if "version=" in line: setup_version = line.split('"')[1] break # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. # needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ "sphinx.ext.autodoc", "sphinx.ext.doctest", "sphinx.ext.intersphinx", "sphinx_rtd_theme", ] # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] # The suffix of source filenames. source_suffix = ".rst" # The encoding of source files. # source_encoding = 'utf-8-sig' # The master toctree document. master_doc = "index" # General information about the project. project = "eth-typing" copyright = "2018-2023, The Ethereum Foundation" __version__ = setup_version # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = ".".join(__version__.split(".")[:2]) # The full version, including alpha/beta/rc tags. release = __version__ # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: # today = '' # Else, today_fmt is used as the format for a strftime call. # today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = [ "_build", "modules.rst", "update_network_chain_ids.rst", ] # The reST default role (used for this markup: `text`) to use for all # documents. # default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. # add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). # add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. # show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = "sphinx" # A list of ignored prefixes for module index sorting. # modindex_common_prefix = [] # If true, keep warnings as "system message" paragraphs in the built documents. # keep_warnings = False # -- Options for HTML output ---------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. html_theme = "sphinx_rtd_theme" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". # html_title = None # A shorter title for the navigation bar. Default is the same as html_title. # html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. # html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. # html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". # html_static_path = ["_static"] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied # directly to the root of the documentation. # html_extra_path = [] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. # html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. # html_use_smartypants = True # Custom sidebar templates, maps document names to template names. # html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. # html_additional_pages = {} # If false, no module index is generated. # html_domain_indices = True # If false, no index is generated. # html_use_index = True # If true, the index is split into individual pages for each letter. # html_split_index = False # If true, links to the reST sources are added to the pages. # html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. # html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. # html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. # html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). # html_file_suffix = None # Output file base name for HTML help builder. htmlhelp_basename = "eth_typingdocs" # -- Options for LaTeX output --------------------------------------------- latex_engine = "xelatex" latex_elements = { # The paper size ('letterpaper' or 'a4paper'). #'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). #'pointsize': '10pt', # Additional stuff for the LaTeX preamble. #'preamble': '', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ ( "index", "eth_typing.tex", "eth-typing Documentation", "The Ethereum Foundation", "manual", ), ] # The name of an image file (relative to this directory) to place at the top of # the title page. # latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. # latex_use_parts = False # If true, show page references after internal links. # latex_show_pagerefs = False # If true, show URL addresses after external links. # latex_show_urls = False # Documents to append as an appendix to all manuals. # latex_appendices = [] # If false, no module index is generated. # latex_domain_indices = True # -- Options for manual page output --------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ ( "index", "eth_typing", "eth-typing Documentation", ["The Ethereum Foundation"], 1, ) ] # If true, show URL addresses after external links. # man_show_urls = False # -- Options for Texinfo output ------------------------------------------- # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ ( "index", "eth-typing", "eth-typing Documentation", "The Ethereum Foundation", "eth-typing", "Common type annotations for ethereum python packages", "Miscellaneous", ), ] # Documents to append as an appendix to all manuals. # texinfo_appendices = [] # If false, no module index is generated. # texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. # texinfo_show_urls = 'footnote' # If true, do not generate a @detailmenu in the "Top" node's menu. # texinfo_no_detailmenu = False # -- Intersphinx configuration ------------------------------------------------ intersphinx_mapping = { "python": ("https://docs.python.org/3.10", None), } # -- Doctest configuration ---------------------------------------- import doctest doctest_default_flags = ( 0 | doctest.DONT_ACCEPT_TRUE_FOR_1 | doctest.ELLIPSIS | doctest.IGNORE_EXCEPTION_DETAIL | doctest.NORMALIZE_WHITESPACE ) eth-typing-5.2.1/docs/contributing.rst000066400000000000000000000132101477727116600200170ustar00rootroot00000000000000Contributing ------------ Thank you for your interest in contributing! We welcome all contributions no matter their size. Please read along to learn how to get started. If you get stuck, feel free to ask for help in `Ethereum Python Discord server `_. Setting the stage ~~~~~~~~~~~~~~~~~ To get started, fork the repository to your own github account, then clone it to your development machine: .. code:: sh git clone git@github.com:your-github-username/eth-typing.git Next, install the development dependencies. We recommend using a virtual environment, such as `virtualenv `_. .. code:: sh cd eth-typing virtualenv -p python venv . venv/bin/activate python -m pip install -e ".[dev]" pre-commit install Running the tests ~~~~~~~~~~~~~~~~~ A great way to explore the code base is to run the tests. We can run all tests with: .. code:: sh pytest tests Code Style ~~~~~~~~~~ We use `pre-commit `_ to enforce a consistent code style across the library. This tool runs automatically with every commit, but you can also run it manually with: .. code:: sh make lint If you need to make a commit that skips the ``pre-commit`` checks, you can do so with ``git commit --no-verify``. This library uses type hints, which are enforced by the ``mypy`` tool (part of the ``pre-commit`` checks). All new code is required to land with type hints, with the exception of code within the ``tests`` directory. Documentation ~~~~~~~~~~~~~ Good documentation will lead to quicker adoption and happier users. Please check out our guide on `how to create documentation for the Python Ethereum ecosystem `_. Pull Requests ~~~~~~~~~~~~~ It's a good idea to make pull requests early on. A pull request represents the start of a discussion, and doesn't necessarily need to be the final, finished submission. GitHub's documentation for working on pull requests is `available here `_. Once you've made a pull request, take a look at the Circle CI build status in the GitHub interface and make sure all tests are passing. In general pull requests that do not pass the CI build yet won't get reviewed unless explicitly requested. If the pull request introduces changes that should be reflected in the release notes, please add a `newsfragment` file as explained `here `_. If possible, the change to the release notes file should be included in the commit that introduces the feature or bugfix. Network ChainIds ~~~~~~~~~~~~~~~~ A list of `ChainId` constants reside in the eth-typing/networks.py file. This list should be kept in sync with the network list available on [chainid.network](https://chainid.network/chains_mini.json). To keep the list up to date, run the following command: .. code:: sh python update_network_chain_ids.py This will remove the original networks file and output a new file with the new networks added. Check that the output file is correct and that constants are defined as expected. If the shortName contains special characters it may not work as a constant variable name. The script should be updated to transform names into valid constants as new cases occur. Releasing ~~~~~~~~~ Releases are typically done from the ``main`` branch, except when releasing a beta (in which case the beta is released from ``main``, and the previous stable branch is released from said branch). Final test before each release ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Before releasing a new version, build and test the package that will be released: .. code:: sh git checkout main && git pull make package-test This will build the package and install it in a temporary virtual environment. Follow the instructions to activate the venv and test whatever you think is important. You can also preview the release notes: .. code:: sh towncrier --draft Build the release notes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Before bumping the version number, build the release notes. You must include the part of the version to bump (see below), which changes how the version number will show in the release notes. .. code:: sh make notes bump=$$VERSION_PART_TO_BUMP$$ If there are any errors, be sure to re-run make notes until it works. Push the release to github & pypi ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ After confirming that the release package looks okay, release a new version: .. code:: sh make release bump=$$VERSION_PART_TO_BUMP$$ This command will: - Bump the version number as specified in ``.pyproject.toml`` and ``setup.py``. - Create a git commit and tag for the new version. - Build the package. - Push the commit and tag to github. - Push the new package files to pypi. Which version part to bump ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``$$VERSION_PART_TO_BUMP$$`` must be one of: ``major``, ``minor``, ``patch``, ``stage``, or ``devnum``. The version format for this repo is ``{major}.{minor}.{patch}`` for stable, and ``{major}.{minor}.{patch}-{stage}.{devnum}`` for unstable (``stage`` can be alpha or beta). If you are in a beta version, ``make release bump=stage`` will switch to a stable. To issue an unstable version when the current version is stable, specify the new version explicitly, like ``make release bump="--new-version 4.0.0-alpha.1"`` You can see what the result of bumping any particular version part would be with ``bump-my-version show-bump`` eth-typing-5.2.1/docs/eth_typing.rst000066400000000000000000000015231477727116600174660ustar00rootroot00000000000000Types ===== The following types are available from the ``eth_typing`` module. i.e. .. code-block:: python from eth_typing import TypeStr Application Binary Interface ---------------------------- .. automodule:: eth_typing.abi :members: :undoc-members: BLS --- .. automodule:: eth_typing.bls :members: :undoc-members: Discovery --------- .. automodule:: eth_typing.discovery :members: :undoc-members: Encoding -------- .. automodule:: eth_typing.encoding :members: :undoc-members: Enums ----- .. automodule:: eth_typing.enums :members: :undoc-members: EVM --- .. automodule:: eth_typing.evm :members: :undoc-members: Exceptions ---------- .. automodule:: eth_typing.exceptions :members: :undoc-members: Networks -------- .. automodule:: eth_typing.networks :members: eth-typing-5.2.1/docs/index.rst000066400000000000000000000005641477727116600164270ustar00rootroot00000000000000eth-typing ============================== Common type annotations for ethereum python packages. Installation ------------ .. code-block:: bash python -m pip install eth-typing .. toctree:: :maxdepth: 1 :caption: General Usage release_notes .. toctree:: :maxdepth: 1 :caption: Community contributing code_of_conduct eth-typing-5.2.1/docs/release_notes.rst000066400000000000000000000275251477727116600201560ustar00rootroot00000000000000Release Notes ============= .. towncrier release notes start eth-typing v5.2.1 (2025-04-14) ------------------------------ Bugfixes ~~~~~~~~ - Set name as optional for ``ABIComponent`` type. (`#95 `__) eth-typing v5.2.0 (2025-02-20) ------------------------------ Features ~~~~~~~~ - Add Prague to ForkName enum (`#94 `__) eth-typing v5.1.0 (2025-01-08) ------------------------------ Features ~~~~~~~~ - Add py313 support, drop ``bumpmyversion`` in favor of ``bump-my-version`` (`#93 `__) eth-typing v5.0.1 (2024-10-14) ------------------------------ Bugfixes ~~~~~~~~ - ``ABIEvent`` should use ``ABIComponentIndexed`` instead of ``ABIComponent`` as the type for ``inputs``. (`#92 `__) eth-typing v5.0.0 (2024-08-14) ------------------------------ Internal Changes - for eth-typing Contributors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Run ``mypy`` locally rather than in a ``pre-commit`` container (`#90 `__) eth-typing v5.0.0-beta.3 (2024-06-27) ------------------------------------- Features ~~~~~~~~ - Replace ``ABIFunctionInfo`` type with ``ABIElementInfo`` to encompass all ``ABIElement`` types. ``ABIElementInfo`` includes the function ``abi`` (``ABIElement``), ``selector`` (``HexStr``) and ``args`` (``Tuple``). (`#85 `__) Internal Changes - for eth-typing Contributors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Cleanup references to ABI types that have been removed. (`#87 `__) eth-typing v5.0.0-beta.2 (2024-06-18) ------------------------------------- Improved Documentation ~~~~~~~~~~~~~~~~~~~~~~ - Updates all modules and types with docstrings. Docs are now generated through ``autodoc``. (`#81 `__) Features ~~~~~~~~ - Move `URI` type from EthPM module to networks. (`#65 `__) Removals ~~~~~~~~ - Remove types related to the EthPM module which has been removed from ``web3.py`` (`#65 `__) - Remove deprecated ABI types ``ABIEventComponent``, ``ABIEventParam``, ``ABIFunctionComponent``, ``ABIFunctionParam``. (`#82 `__) eth-typing v5.0.0-beta.1 (2024-06-17) ------------------------------------- Breaking changes ~~~~~~~~~~~~~~~~ - Mark ABI types with optional attributes. * ``ABIFunction`` requires ``type`` and ``name`` but ``inputs`` and ``outputs`` are optional. * ``ABIEvent`` requires ``type`` and ``name`` but ``inputs`` and ``anonymous`` are optional. * All attributes of ``ABIFunctionInfo`` are required. * ``ABIFallback`` and ``ABIReceive`` now require the ``type`` attribute. * ``ABIConstructor`` requires a ``type`` but ``inputs`` are optional. * ``ABIError`` requires ``type`` and ``name`` but ``inputs`` is optional. * ``ABIComponent`` requires ``type`` and ``name`` but ``components`` may be omitted so that ``inputs`` may use either ``primitive`` or ``tuple`` types. (`#76 `__) (`#79 `__) eth-typing v4.3.1 (2024-06-17) ------------------------------ Bugfixes ~~~~~~~~ - Update ``typing_extensions`` to ``4.5.0`` which supposrts ``deprecated`` decorator. (`#80 `__) eth-typing v4.3.0 (2024-06-10) ------------------------------ Deprecations ~~~~~~~~~~~~ - Mark ``EthPM`` types as deprecated in the docs. (`#67 `__) - Deprecated ``ABIEventComponent``, ``ABIEventParam``, ``ABIFunctionComponent`` and ``ABIFunctionParam`` for removal in v5. (`#74 `__) Features ~~~~~~~~ - Add ``ABIError`` TypedDict for ``ABI`` error messages and ``ABIComponent`` TypedDict for ``ABI`` type components. (`#73 `__) - ``ABIComponentIndexed`` now extends ``ABIComponent`` to support the ``indexed`` property. (`#74 `__) - Added ``ABIError``, ``ABIFallback`` and ``ABIReceive`` types to ``ABIFunctionInfo.abi`` types. ``ABICallable`` is now a type alias for ``Union[ABIFunctionInfo, ABIError, ABIFallback, ABIReceive]``. (`#77 `__) eth-typing v4.2.3 (2024-05-06) ------------------------------ Features ~~~~~~~~ - Update networks types with the latest. (`#72 `__) eth-typing v4.2.2 (2024-04-29) ------------------------------ Bugfixes ~~~~~~~~ - Fixes types that were incorrectly defined for ``ABI`` utils. (`#62 `__) Features ~~~~~~~~ - Update network type mappings. (`#70 `__) Miscellaneous Changes ~~~~~~~~~~~~~~~~~~~~~ - `#68 `__ eth-typing v4.2.1 (2024-04-16) ------------------------------ Bugfixes ~~~~~~~~ - Put back types used for `EthPM`: `ContractName`, `Manifest`, and `URI`. (`#64 `__) eth-typing v4.2.0 (2024-04-15) ------------------------------ Features ~~~~~~~~ - Add type definitions to represent contract ``ABI`` s. (`#61 `__) Removals ~~~~~~~~ - Remove types related to the EthPM module which has been removed from ``web3.py`` (`#60 `__) eth-typing v4.1.0 (2024-04-01) ------------------------------ Features ~~~~~~~~ - Add python3.12 support (`#57 `__) Internal Changes - for eth-typing Contributors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Merge template updates, adding build tests for all docs formats, add ``blocklint`` to lint tools (`#57 `__) eth-typing v4.0.0 (2024-01-09) ------------------------------ Breaking changes ~~~~~~~~~~~~~~~~ - Drop python 3.7 support (`#55 `__) Internal Changes - for eth-typing Contributors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Merge updates from the project template, notably: use ``pre-commit`` for linting and change the name of the ``master`` branch to ``main`` (`#55 `__) - Fixed booleans in ``pyproject.toml`` and added a test for the presence of the ``eth_typing.__version__`` attribute (`#56 `__) eth-typing v3.5.2 (2023-11-07) ------------------------------ Miscellaneous Changes ~~~~~~~~~~~~~~~~~~~~~ - `#54 `__ eth-typing v3.5.1 (2023-10-20) ------------------------------ Internal Changes - for eth-typing Contributors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Add script to maintain Network constants listed in the networks module. (`#51 `__) - Add ``types-setuptools`` to support pkg_resources and __version__ (`#52 `__) eth-typing v3.5.0 (2023-09-29) ------------------------------ Features ~~~~~~~~ - Borrowing from the typing in web3.py, open up ``BlockIdentifier`` to include ``BlockParams`` (e.g. "latest", "finalized", etc..) as well as other valid values. (`#47 `__) - Add an ``IntEnum`` class, ``ChainId``, defining EVM-compatible network name enums as their respective chain id ``int`` values. (`#49 `__) Internal Changes - for eth-typing Contributors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Add the tests/ directory to the distributed tarball (`#46 `__) - Added ``build.os`` config for readthedocs (`#48 `__) - Fix release command by checking the git remote upstream configuration and merge other minor template updates. (`#50 `__) eth-typing v3.4.0 (2023-06-07) ------------------------------ Improved Documentation ~~~~~~~~~~~~~~~~~~~~~~ - pull in ethereum-python-project-template updates (`#44 `__) Features ~~~~~~~~ - Add ``Cancun`` to ``ForkName`` enum. (`#45 `__) Internal Changes - for eth-typing Contributors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - remove unused docs deps, bump version of remaining (`#43 `__) - pull in ethereum-python-project-template updates (`#44 `__) - For CircleCI builds, update ``pip`` and pip install ``tox`` under sys instead of ``--user`` to avoid ``virtualenv`` versioning issues. (`#45 `__) v3.3.0 (2023-03-08) ------------------- Features ~~~~~~~~ - Add ``Shanghai`` to ``ForkName`` enum. (`#39 `__) - Add support for python ``3.11``. (`#40 `__) Internal Changes - for eth-typing Contributors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ``tox`` related updates for ``make docs`` to work properly. Remove some old references to python ``3.5`` and ``3.6``. (`#39 `__) - Bump ``mypy`` version to ``0.910`` to avoid issues installing the "[dev]" extra on Python 3.10. Update test suite to require installing the full dependency suite to help catch these errors. (`#41 `__) v3.2.0 (2022-09-14) ------------------- Features ~~~~~~~~ - Add ``Merge`` to ``ForkName`` enum (`#34 `__) Bugfixes ~~~~~~~~ - Pin Python version to <4 instead of <3.11 (`#37 `__) - Rename ``Merge`` to ``Paris`` in ``ForkNameEnum`` (`#38 `__) v3.1.0 (2022-06-22) ------------------- Features ~~~~~~~~ - Setup towncrier to generate release notes from fragment files to ensure a higher standard for release notes. (`#16 `__) - Add new ``BLSPrivateKey`` type for BLS private key (`#23 `__) - Add ``__all__`` property to ``__init__.py`` with appropriate types to explicitly export (`#28 `__) - Add ``GrayGlacier`` to ``ForkName`` enum (`#30 `__) Miscellaneous changes ~~~~~~~~~~~~~~~~~~~~~ - `#32 `__ v3.0.0 (2021-11-15) ------------------- - Update ``ForkName`` enum to include ``Berlin``, ``London``, and ``ArrowGlacier`` - Update Python support to include python 3.8-3.10 - Remove Python 3.5 support v2.2.0 (2019-10-31) ------------------- - Update ``ForkName`` enum to include ``ConstantinopleFix`` and ``Istanbul`` v2.1.0 (2019-10-31) ------------------- - Add BLS types v2.0.0 (2019-10-31) ------------------- - Expose Type Hints as per PEP 561 v1.0.0 (2018-06-08) ------------------- - Added annotations from ``py-evm``. v0.3.1 (2018-06-07) ------------------- - Removed ``eth-utils`` requirement. v0.3.0 (2018-06-07) ------------------- - Updated ``eth-utils`` requirement. v0.2.0 (2018-06-07) ------------------- - Launched repository, claimed names for pip, RTD, github, etc. eth-typing-5.2.1/eth_typing/000077500000000000000000000000001477727116600160035ustar00rootroot00000000000000eth-typing-5.2.1/eth_typing/__init__.py000066400000000000000000000025731477727116600201230ustar00rootroot00000000000000from importlib.metadata import ( version as __version, ) from .abi import ( ABI, ABICallable, ABIComponent, ABIComponentIndexed, ABIConstructor, ABIElement, ABIElementInfo, ABIError, ABIEvent, ABIFallback, ABIFunction, ABIReceive, Decodable, TypeStr, ) from .bls import ( BLSPrivateKey, BLSPubkey, BLSSignature, ) from .discovery import ( NodeID, ) from .encoding import ( HexStr, Primitives, ) from .enums import ( ForkName, ) from .evm import ( Address, AnyAddress, BlockIdentifier, BlockNumber, ChecksumAddress, Hash32, HexAddress, ) from .exceptions import ( MismatchedABI, ValidationError, ) from .networks import ( URI, ChainId, ) __all__ = ( "ABI", "ABICallable", "ABIComponent", "ABIComponentIndexed", "ABIConstructor", "ABIElement", "ABIElementInfo", "ABIError", "ABIEvent", "ABIFallback", "ABIFunction", "ABIReceive", "Decodable", "TypeStr", "BLSPrivateKey", "BLSPubkey", "BLSSignature", "NodeID", "HexStr", "Primitives", "ForkName", "Address", "AnyAddress", "BlockIdentifier", "BlockNumber", "ChecksumAddress", "Hash32", "HexAddress", "MismatchedABI", "ValidationError", "URI", "ChainId", ) __version__ = __version("eth-typing") eth-typing-5.2.1/eth_typing/abi.py000066400000000000000000000100121477727116600171020ustar00rootroot00000000000000""" Types for Contract ABIs and related components. """ from typing import ( Any, Literal, Sequence, Tuple, TypedDict, Union, ) from typing_extensions import ( NotRequired, ) from eth_typing.encoding import ( HexStr, ) TypeStr = str """String representation of a data type.""" Decodable = Union[bytes, bytearray] """Binary data to be decoded.""" class ABIComponent(TypedDict): """ TypedDict representing an `ABIElement` component. """ type: str """Type of the component.""" name: NotRequired[str] """Name of the component.""" components: NotRequired[Sequence["ABIComponent"]] """List of nested `ABI` components for ABI types.""" class ABIComponentIndexed(ABIComponent): """ TypedDict representing an indexed `ABIElement` component. """ indexed: bool """If True, component can be used as a topic filter.""" class ABIEvent(TypedDict): """ TypedDict to represent the `ABI` for an event. """ name: str """Event name identifier.""" type: Literal["event"] """Event ABI type.""" anonymous: NotRequired[bool] """If True, event is anonymous. Cannot filter the event by name.""" inputs: NotRequired[Sequence["ABIComponentIndexed"]] """Input components for the event.""" class ABIFunctionType(TypedDict, total=False): """ TypedDict representing the `ABI` for all function types. This is the base type for functions. Please use ABIFunction, ABIConstructor, ABIFallback or ABIReceive instead. """ stateMutability: Literal["pure", "view", "nonpayable", "payable"] """State mutability of the constructor.""" payable: bool """ Contract is payable to receive ether on deployment. Deprecated in favor of stateMutability payable and nonpayable. """ constant: bool """ Function is constant and does not change state. Deprecated in favor of stateMutability pure and view. """ class ABIFunction(ABIFunctionType): """ TypedDict representing the `ABI` for a function. """ type: Literal["function"] """Type of the function.""" name: str """Name of the function.""" inputs: NotRequired[Sequence["ABIComponent"]] """Function input components.""" outputs: NotRequired[Sequence["ABIComponent"]] """Function output components.""" class ABIConstructor(ABIFunctionType): """ TypedDict representing the `ABI` for a constructor function. """ type: Literal["constructor"] """Type of the constructor function.""" inputs: NotRequired[Sequence["ABIComponent"]] """Function input components.""" class ABIFallback(ABIFunctionType): """ TypedDict representing the `ABI` for a fallback function. """ type: Literal["fallback"] """Type of the fallback function.""" class ABIReceive(ABIFunctionType): """ TypedDict representing the `ABI` for a receive function. """ type: Literal["receive"] """Type of the receive function.""" class ABIError(TypedDict): """ TypedDict representing the `ABI` for an error. """ type: Literal["error"] """Type of the error.""" name: str """Name of the error.""" inputs: NotRequired[Sequence["ABIComponent"]] """Error input components.""" ABICallable = Union[ABIFunction, ABIConstructor, ABIFallback, ABIReceive] """ A `Union` type consisting of `ABIFunction`, `ABIConstructor`, `ABIFallback` and `ABIReceive` types. """ ABIElement = Union[ABICallable, ABIEvent, ABIError] """A `Union` type consisting of `ABICallable`, `ABIEvent`, and `ABIError` types.""" class ABIElementInfo(TypedDict): """ TypedDict to represent properties of an `ABIElement`, including the abi, selector and arguments. """ abi: ABIElement """ABI for any `ABIElement` type.""" selector: HexStr """Solidity `ABIElement` selector sighash.""" arguments: Tuple[Any, ...] """`ABIElement` input components.""" ABI = Sequence[ABIElement] """ List of components representing function and event interfaces (elements of an ABI). """ eth-typing-5.2.1/eth_typing/bls.py000066400000000000000000000005431477727116600171370ustar00rootroot00000000000000""" Types used for BLS Signatures. """ from typing import ( NewType, ) BLSPubkey = NewType("BLSPubkey", bytes) """ A BLS public key that is 48 bytes in length. """ BLSPrivateKey = NewType("BLSPrivateKey", int) """ A BLS private key integer value. """ BLSSignature = NewType("BLSSignature", bytes) """ A BLS signature that is 96 bytes in length. """ eth-typing-5.2.1/eth_typing/discovery.py000066400000000000000000000006131477727116600203640ustar00rootroot00000000000000""" Types for the Discovery Protocol. """ from typing import ( NewType, ) NodeID = NewType("NodeID", bytes) r""" A 32-byte identifier for a node in the Discovery DHT. .. doctest:: >>> from eth_typing import NodeID >>> NodeID(b'\x01' * 32) b'\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01\x01' """ eth-typing-5.2.1/eth_typing/encoding.py000066400000000000000000000004351477727116600201450ustar00rootroot00000000000000""" Types for encoding and decoding data. """ from typing import ( NewType, Union, ) HexStr = NewType("HexStr", str) """ A string that represents a hex encoded value. """ Primitives = Union[bytes, int, bool] """ A type that represents bytes, int or bool primitive types. """ eth-typing-5.2.1/eth_typing/enums.py000066400000000000000000000012671477727116600175120ustar00rootroot00000000000000""" Fork names for Ethereum network upgrades. """ class ForkName: """ Constants for each fork name. .. doctest:: >>> from eth_typing import ForkName >>> ForkName.Frontier 'Frontier' """ Frontier = "Frontier" Homestead = "Homestead" EIP150 = "EIP150" EIP158 = "EIP158" Byzantium = "Byzantium" Constantinople = "Constantinople" Metropolis = "Metropolis" ConstantinopleFix = "ConstantinopleFix" Istanbul = "Istanbul" Berlin = "Berlin" London = "London" ArrowGlacier = "ArrowGlacier" GrayGlacier = "GrayGlacier" Paris = "Paris" Shanghai = "Shanghai" Cancun = "Cancun" Prague = "Prague" eth-typing-5.2.1/eth_typing/evm.py000066400000000000000000000031741477727116600171510ustar00rootroot00000000000000""" Type definitions for the Ethereum Virtual Machine (EVM). """ from typing import ( Literal, NewType, TypeVar, Union, ) from .encoding import ( HexStr, ) Hash32 = NewType("Hash32", bytes) """ A 32-byte hash value. """ BlockNumber = NewType("BlockNumber", int) """ Any integer that represents a valid block number on a chain. """ BlockParams = Literal["latest", "earliest", "pending", "safe", "finalized"] """ A type which specifies the block reference parameter. - ``"latest"``: The latest block. - ``"earliest"``: The earliest block. - ``"pending"``: The pending block. - ``"safe"``: The safe block. - ``"finalized"``: The finalized block. """ BlockIdentifier = Union[BlockParams, BlockNumber, Hash32, HexStr, int] """ A type that represents a block identifier value. - ``BlockParams``: A block reference parameter. - ``BlockNumber``: A block number integer value. - ``Hash32``: A 32-byte hash value. - ``HexStr``: A string that represents a hex value. - ``int``: An integer value. """ Address = NewType("Address", bytes) """ A type that contains a 32-byte canonical address. """ HexAddress = NewType("HexAddress", HexStr) """ A type that contains a hex encoded address. This is a 32-byte hex string with a prefix of "0x". """ ChecksumAddress = NewType("ChecksumAddress", HexAddress) """ A type that contains a eth_typing.evm.HexAddress that is formatted according to `ERC55 `_. This is a 40 character hex string with a prefix of "0x" and mixed case letters. """ AnyAddress = TypeVar("AnyAddress", Address, HexAddress, ChecksumAddress) """ A type that represents any type of address. """ eth-typing-5.2.1/eth_typing/exceptions.py000066400000000000000000000005661477727116600205450ustar00rootroot00000000000000""" Exception types raised in web3's libraries. """ class ValidationError(Exception): """ Raised when something does not pass a validation check. """ class MismatchedABI(ValidationError): """ Raised when an ABI does not match with supplied parameters, or when an attempt is made to access a function/event that does not exist in the ABI. """ eth-typing-5.2.1/eth_typing/networks.py000066400000000000000000000732771477727116600202510ustar00rootroot00000000000000""" Types for Ethereum network identifiers. """ from enum import ( IntEnum, ) from typing import ( NewType, ) URI = NewType("URI", str) """Any string that represents a URI.""" class ChainId(IntEnum): """ IntEnum class defining EVM-compatible network name enums as their respective ``ChainID`` int values. To learn more about chain ids, see `CAIP-2 `_ for details. The list of chain ids is available from the `ethereum-lists/chains `_ repository. For a complete list of supported enums, see `eth_typing/networks.py `_. .. doctest:: >>> from eth_typing import ChainId >>> ChainId(1) >>> ChainId(10) """ # noqa: E501 ETH = 1 """Ethereum Mainnet""" EXP = 2 """Expanse""" ROP = 3 """Ropsten""" RIN = 4 """Rinkeby""" GOR = 5 """Görli""" KOT = 6 TCH = 7 UBQ = 8 TUBQ = 9 OETH = 10 """OP Mainnet""" META = 11 KAL = 12 DSTG = 13 FLR = 14 DIODE = 15 CFLR = 16 TFI = 17 TST = 18 SGB = 19 ESC = 20 ESCT = 21 ELADID = 22 ELADIDT = 23 KARDIACHAIN = 24 CRO = 25 L1TEST = 26 SHIB = 27 BOBARINKEBY = 28 L1 = 29 RSK = 30 TRSK = 31 GOODT = 32 GOOD = 33 SCAI = 34 TBWG = 35 DX = 36 XPLA = 37 VAL = 38 U2U = 39 TELOSEVM = 40 TELOSEVMTESTNET = 41 LUKSO = 42 PANGOLIN = 43 CRAB = 44 PANGORO = 45 DARWINIA = 46 AIC = 47 ETMP = 48 ETMPTEST = 49 XDC = 50 TXDC = 51 CET = 52 TCET = 53 OP = 54 ZYX = 55 BNB = 56 SYS = 57 ONTOLOGYMAINNET = 58 EOS_LEGACY = 59 GO = 60 ETC = 61 TETC = 62 METC = 63 ELLAISM = 64 TOKT = 65 OKT = 66 DBM = 67 SO1 = 68 OKOV = 69 HSC = 70 CFXTEST = 71 DXC = 72 FNCY = 73 IDCHAIN = 74 DSC = 75 MIX = 76 SPOA = 77 PRIMUSCHAIN = 78 ZENITH = 79 GENECHAIN = 80 JOC = 81 METER = 82 METERTEST = 83 LINQTO_DEVNET = 84 GTTEST = 85 GT = 86 NNW = 87 VIC = 88 VICT = 89 GAR_S0 = 90 GAR_S1 = 91 GAR_S2 = 92 GAR_S3 = 93 SDLT = 94 CAMDL = 95 BKC = 96 BNBT = 97 SIX = 98 POA = 99 GNO = 100 """Gnosis""" ETI = 101 TW3G = 102 WLC = 103 TKLC = 104 DW3G = 105 VLX = 106 NTN = 107 TT = 108 SHIBARIUMECOSYSTEM = 109 XPR = 110 ETL = 111 COINBIT = 112 DEH = 113 C2FLR = 114 DEBANK_TESTNET = 115 DEBANK_MAINNET = 116 AUPTICK = 117 ARCOLOGY = 118 ENULS = 119 ENULST = 120 REAL = 121 FUSE = 122 SPARK = 123 DWU = 124 OYCHAINTESTNET = 125 OYCHAINMAINNET = 126 FETH = 127 HECO = 128 INNOVATOR = 129 TGRAM = 131 HSKT = 133 RLC = 134 ALYXTESTNET = 135 DEAM = 136 MATIC = 137 DFIO_META_MAIN = 138 WOOP = 139 OPTEST = 141 DAX = 142 PHI = 144 SETH = 145 SHIMMEREVM = 148 SIXT = 150 RBN = 151 RBN_DEVNET = 152 RBN_TESTNET = 153 RBN_TGE = 154 TENET_TESTNET = 155 OBE = 156 PUPPYNET = 157 RBA = 158 RBAT = 159 EVA = 160 WALL_E = 161 TPHT = 162 PHT = 163 OMNI_TESTNET_164 = 164 OMNI_TESTNET = 165 OMNI = 166 ATOSHI = 167 AIOZ = 168 MANTA = 169 HOOSMARTCHAIN = 170 RESIL = 172 AME = 180 SEELE = 186 BMC = 188 BMCT = 189 FFG = 191 CEM = 193 TOKB = 195 OKB = 196 NEUTR = 197 BIT = 198 BTT = 199 AOX = 200 MOACTEST = 201 EDGELESS_TESTNET = 202 OBNB = 204 VCTEST = 206 VC = 207 UTX = 208 BTN = 210 EDI = 211 MAKALU = 212 B2HUB_MAINNET = 213 SHINARIUM = 214 SIN2 = 217 SO1_OLD = 218 SEPSCAL = 220 ASK = 222 B2_MAINNET = 223 VRD_TESTNET = 224 LA = 225 TLA = 226 FHE = 228 SDX = 230 PROTOJUMBO = 234 DEAMTEST = 236 BLAST = 238 PLGCHAIN = 242 EWT = 246 OAS = 248 FTM = 250 FRAXTAL = 252 KROMA = 255 HECOT = 256 SETM = 258 NEON = 259 SUR = 262 NEURA = 266 TNEURA = 267 DNEURA = 268 HPB = 269 EGONM = 271 LACHAIN = 274 FAI = 278 BPX = 279 ZKSYNC_GOERLI = 280 ZKTCRO = 282 BOBA = 288 ORDERLY = 291 HEDERA_MAINNET = 295 HEDERA_TESTNET = 296 HEDERA_PREVIEWNET = 297 HEDERA_LOCALNET = 298 ZKSYNC_SEPOLIA = 300 BOBAOPERA = 301 ZKCANDY_SEPOLIA = 302 NCNT = 303 ZKSATS_MAINNET = 305 LOVELY_TESTNET = 307 FURTHEON = 308 WYZ = 309 OMAX = 311 NCN = 313 FILECOIN = 314 KCS = 321 KCST = 322 CVM = 323 ZKSYNC = 324 W3Q = 333 DFKTEST = 335 SDN = 336 TCRO = 338 THETA_MAINNET = 361 THETA_SAPPHIRE = 363 THETA_AMBER = 364 THETA_TESTNET = 365 PLS = 369 TCNT = 371 ZKAMOEBA_TEST = 380 ZKAMOEBA = 381 LISINSKI = 385 CAMDL_TESTNET = 395 NEAR = 397 NEAR_TESTNET = 398 N3 = 399 HPN = 400 OZO_TST = 401 SYNDR_L3 = 404 PEPE = 411 SX = 416 LATESTNET = 418 OGOR = 420 VRD = 422 PGN = 424 ZEETH = 427 GSV = 428 BYC = 434 TEN_TESTNET = 443 SYNAPSE_SEPOLIA = 444 ARZIO = 456 TAREA = 462 AREA = 463 RUPX = 499 CAMINO = 500 COLUMBUS = 501 SYNDICATE_CHAIN_MAINNET = 510 AAC = 512 AACT = 513 GZ_MAINNET = 516 XT = 520 FIRE = 529 FXCORE = 530 CNDL = 534 OPTRUST = 537 PAW = 542 FLOW_TESTNET = 545 CLASS = 555 TAO = 558 DCT = 568 SYS_ROLLUX = 570 METATIME = 571 FILENOVA = 579 METIS_STARDUST = 588 ASTR = 592 MACA = 595 TKAR = 596 TACA = 597 METIS_GOERLI = 599 MESH_CHAIN_TESTNET = 600 VINE = 601 EIOB = 612 GLQ = 614 AVOCADO = 634 FLOW_PREVIEWNET = 646 SX_TESTNET = 647 ACE = 648 KALICHAIN = 653 KALICHAINMAINNET = 654 ULTRONSMARTCHAIN = 662 PIXIE_CHAIN_TESTNET = 666 LAOS = 667 JUNCA = 668 JUNCAT = 669 KAR = 686 REDSTONE = 690 SNS = 700 BCS = 707 TBCS = 708 FURY = 710 VRC = 713 SHIBARIUM = 719 LYC = 721 BLU = 727 LOVELY = 730 TCANTO = 740 VSCT = 741 SPAY = 742 FLOW_MAINNET = 747 QOM = 766 OPC = 776 CTH = 777 MAAL = 786 ACA = 787 TAERO = 788 PETH = 789 RUPAYATESTNET = 799 LUCID = 800 HAIC = 803 PFTEST = 808 H1 = 810 MEER = 813 FIRECHAN_ZKEVM = 814 BOC = 818 CLO = 820 TCLO = 821 RUNIC_TESTNET = 822 CDT = 831 TARA = 841 TARATEST = 842 ZEETHDEV = 859 FSCMAINNET = 868 BNKEN = 876 DXT = 877 AMBROS = 880 WAN = 888 MAXI_TESTNET = 898 GAR_TEST_S0 = 900 GAR_TEST_S1 = 901 GAR_TEST_S2 = 902 GAR_TEST_S3 = 903 PF = 909 DBONE = 910 TAPROOT_MAINNET = 911 TFIRE = 917 MODESEP = 919 YDK = 927 TPLS = 940 T2BPLS = 941 T3PLS = 942 T4PLS = 943 MUNODE = 956 LYRA = 957 BTC20 = 963 CCN = 970 HUYGENS = 971 ASCRAEUS = 972 YETI = 977 SEXYTESTNET = 979 TOP_EVM = 980 MEMOCHAIN = 985 TOP = 989 ELM = 990 _5IRE = 997 LN = 998 TWAN = 999 GTON = 1000 BAOBAB = 1001 TET = 1003 T_EKTA = 1004 TNEW = 1007 EUN = 1008 JUMBOSCAN = 1009 EVC = 1010 REBUS = 1011 NEW = 1012 SKU = 1022 TCLV = 1023 CLV = 1024 TBTT = 1028 CFX = 1030 PRX = 1031 BRONOS_TESTNET = 1038 BRONOS_MAINNET = 1039 SHIMMEREVM_TESTNET_DEPRECATED = 1071 SHIMMEREVM_TESTNET_DEPRECATED_1072 = 1072 SHIMMEREVM_TESTNET = 1073 IOTAEVM_TESTNET = 1075 MINTARA_TESTNET = 1079 MINTARA = 1080 METIS_ANDROMEDA = 1088 HUMANS = 1089 MOAC = 1099 DYMENSION = 1100 ZKEVM = 1101 TBLXQ = 1107 BLXQ = 1108 WEMIX = 1111 TWEMIX = 1112 B2HUB_TESTNET = 1113 TCORE = 1115 CORE = 1116 DOGSM = 1117 B2_TESTNET = 1123 DFI = 1130 DFI_T = 1131 CHANGI = 1133 LISK = 1135 ASART = 1138 MATH = 1139 TMATH = 1140 PLEXCHAIN = 1149 AUOC = 1170 SHT = 1177 MOS = 1188 IORA = 1197 AVIS = 1201 WTT = 1202 SBC = 1209 POPCAT = 1213 ENTER = 1214 CYCLE = 1221 HYB = 1224 XZO = 1229 ULTRONTESTNET = 1230 UTRONMAINNET = 1231 STEP = 1234 ARC = 1243 TARC = 1244 OM = 1246 DOGETHER = 1248 CICT = 1252 HO = 1280 MBEAM = 1284 MRIVER = 1285 MROCK_OLD = 1286 MBASE = 1287 MROCK = 1288 SWTR = 1291 BOBABEAM = 1294 BOBABASE = 1297 TDOS = 1311 ALYX = 1314 AIA = 1319 AIATESTNET = 1320 GETH = 1337 ELST = 1338 ELSM = 1339 BLITZ = 1343 CIC = 1353 ZAFIC = 1369 KLC = 1379 ASAR = 1388 MUN = 1392 ZKEVMTEST = 1402 TESTNET_ZKEVM_MANGO_PRE_AUDIT_UPGRADED = 1422 RIK = 1433 LAS = 1440 TESTNET_ZKEVM_MANGO = 1442 GIL = 1452 METATIMEISTANBUL = 1453 CTEX = 1455 VITRUVEO = 1490 IGC = 1499 CHAINX = 1501 SHERPAX = 1506 SHERPAXTESTNET = 1507 BEAGLE = 1515 TENET = 1559 ETINS = 1617 CATE = 1618 ATH = 1620 BTA = 1657 LIQUICHAIN = 1662 GOBI = 1663 MINTTEST = 1686 MINTSEPOLIATEST = 1687 LUDAN = 1688 ANYTYPECHAIN = 1701 TBSI = 1707 TTBSI = 1708 DRC = 1717 PCM = 1718 REYA = 1729 TEAPARTY = 1773 GAUSS = 1777 KERLEANO = 1804 RANA = 1807 CUBE = 1818 CUBET = 1819 RUBY = 1821 TSF = 1856 WBT = 1875 GITSHOCKCHAIN = 1881 LIGHTLINK_PHOENIX = 1890 LIGHTLINK_PEGASUS = 1891 BOYA = 1898 SCN = 1904 BITCI = 1907 TBITCI = 1908 MRK = 1909 SCAL = 1911 TRUBY = 1912 UPBETH = 1918 ONUS_TESTNET = 1945 DCHAIN_MAINNET = 1951 TSEL = 1953 DEXILLA = 1954 SEL = 1961 MTC = 1967 TSCS = 1969 SCS = 1970 ATLR = 1971 REDE = 1972 ONUS_MAINNET = 1975 EUNTEST = 1984 SATOSHIE = 1985 SATOSHIE_TESTNET = 1986 EGEM = 1987 HUBBLENET = 1992 EKTA = 1994 EDX = 1995 KYOTO_TESTNET = 1998 DC = 2000 MILKADA = 2001 MILKALGO = 2002 CLOUDWALK_TESTNET = 2008 CLOUDWALK_MAINNET = 2009 NETZ = 2016 TEL = 2017 PMINT_DEV = 2018 PMINT_TEST = 2019 PMINT = 2020 EDG = 2021 EDGT = 2022 TAYCAN_TESTNET = 2023 SWAN = 2024 RPG = 2025 EDGELESS = 2026 CFG = 2031 NCFG = 2032 PHA = 2035 KIWI = 2037 SHRAPTEST = 2038 VANAR = 2040 OTP = 2043 SHRAPNEL = 2044 STOS_TESTNET = 2047 STOS_MAINNET = 2048 MOVO = 2049 QKA = 2077 AIR = 2088 ALGL = 2089 ECO = 2100 ESP = 2101 EXN = 2109 CMCX = 2121 METAD = 2122 MEU = 2124 BIGSB_TESTNET = 2136 BIGSB = 2137 DFIO_META_TEST = 2138 ONENESS = 2140 ONENESS_TESTNET = 2141 BOA = 2151 FRA = 2152 FINDORA_TESTNET = 2153 FINDORA_FORGE = 2154 MSN = 2199 ABNM = 2202 BTC = 2203 EVANESCO = 2213 TKAVA = 2221 KAVA = 2222 VCHAIN = 2223 KRST = 2241 BOMB = 2300 EBRO = 2306 AREVIA = 2309 SMA = 2323 ALT = 2330 RSS3_TESTNET = 2331 SMAM = 2332 ATLA = 2340 OMNIA = 2342 DEPRECATED_KROMA_SEPOLIA = 2357 KROMA_SEPOLIA = 2358 NZT = 2370 BOMBT = 2399 TCGV = 2400 KARAK_MAINNET = 2410 XODEX = 2415 KOL = 2425 ZKEVM_TESTNET_CARDONA = 2442 THRC = 2458 HRC = 2468 U2U_NEBULAS = 2484 KARAK_GOERLI = 2511 FRAXTAL_TESTNET = 2522 INEVM = 2525 KTOC = 2559 TPC = 2569 POCRNET = 2606 REDLC = 2611 EZCHAIN = 2612 FUJI_EZCHAIN = 2613 TWBT = 2625 APEXMAINNET = 2662 TMORPH = 2710 K_LAOS = 2718 TXR = 2730 TIME = 2731 NANON = 2748 HMORPH = 2810 BOBAGOERLI = 2888 ELUX = 2907 HYCHAIN = 2911 XENON = 2941 BTY = 2999 CENNZ_R = 3000 CENNZ_N = 3001 CAU = 3003 _3ULL = 3011 ORL = 3031 REBUS_TESTNET = 3033 BFC = 3068 MOVE = 3073 IMMU3 = 3100 VFI = 3102 SAVM = 3109 TSAVM = 3110 FILECOIN_HYPERSPACE = 3141 DUBX = 3269 TESTDUBX = 3270 DEBOUNCE_DEVNET = 3306 ZCRBEACH = 3331 ES_T = 3333 W3Q_G = 3334 PRB = 3400 EVOM = 3424 SCAIT = 3434 PRBTESTNET = 3500 JFIN = 3501 PANDO_MAINNET = 3601 PANDO_TESTNET = 3602 BTNX = 3636 BTCM = 3637 ISLAMI = 3639 JOULEVERSE = 3666 BTX = 3690 EMPIRE = 3693 SPCT = 3698 SPCM = 3699 XPLATEST = 3701 CSB = 3737 ASTRZK = 3776 ALV = 3797 TTANGLE = 3799 FIRECHAIN_ZKEVM_TESTNET = 3885 KALYMAINNET = 3888 KALYTESTNET = 3889 DRAC = 3912 DOST = 3939 DYNO = 3966 TDYNO = 3967 APEXSEP = 3993 YCC = 3999 OZO = 4000 PERIUM = 4001 TFTM = 4002 X1_FASTNET = 4003 GANTESTNET = 4048 BOBAOPERATESTNET = 4051 NAHMII3MAINNET = 4061 NAHMII3TESTNET = 4062 MUSTER = 4078 OASIS = 4090 BNIT = 4096 BNIM = 4099 AIOZ_TESTNET = 4102 HUMANS_TESTNET = 4139 TPBXT = 4141 CROSSFI_TESTNET = 4157 PHIV1 = 4181 MERLIN_MAINNET = 4200 LUKSO_TESTNET = 4201 LISKSEP = 4202 NEXI = 4242 NEXIV2 = 4243 BOBAFUJITESTNET = 4328 BEAM = 4337 CREDITEDGE = 4400 HTML = 4444 ORDERLYL2 = 4460 EMONEY = 4544 VERY = 4613 GOLD = 4653 IOTEX_MAINNET = 4689 IOTEX_TESTNET = 4690 TESTMEV = 4759 TBXN = 4777 GC = 4893 TXVM = 4918 XVM = 4919 BXN = 4999 MANTLE = 5000 MANTLE_TESTNET = 5001 TREASURENET = 5002 MNT_SEP = 5003 TNTEST = 5005 ONIGIRI = 5039 NOLLIE_TESTNET = 5051 SYNDICATE_CHAIN_TESTNET = 5100 SYNDICATE_CHAIN_FRAME = 5101 SIC_TESTNET = 5102 COORDINAPE_TESTNET = 5103 CHARMVERSE_TESTNET = 5104 SUPERLOYALTY_TESTNET = 5105 AZRA_TESTNET = 5106 FTN = 5165 SLN = 5169 TLC = 5177 ES = 5197 HMND = 5234 _OLD_FIRE = 5290 UZMI = 5315 TOPTRUST = 5317 TTRN = 5353 EDEXA = 5424 EGAX = 5439 VEX = 5522 NAHMII = 5551 NAHMIITESTNET = 5553 CVERSE = 5555 OBNBT = 5611 ARCTURUS_TESTNET = 5615 ARCT = 5616 QIE = 5656 TFILENOVA = 5675 TANGO = 5678 TSYS = 5700 HIK = 5729 SATST = 5758 GGUI = 5777 TANGLE = 5845 ONTOLOGYTESTNET = 5851 RBD = 5869 BOUNCEBIT_TESTNET = 6000 BOUNCEBIT_MAINNET = 6001 TRESTEST = 6065 TRESMAIN = 6066 CASCADIA = 6102 UPTN_TEST = 6118 UPTN = 6119 EAURA = 6321 DGS = 6363 PEERPAY = 6502 SRC_TEST = 6552 FOX = 6565 PIXIE_CHAIN = 6626 LATESTT = 6660 CYBA = 6661 TCYBA = 6666 IRIS = 6688 PAXB = 6701 COMPVERSE = 6779 STANDM = 6789 TOMBCHAIN = 6969 PSC = 6999 ZETACHAIN_MAINNET = 7000 ZETACHAIN_ATHENS = 7001 BSTC = 7007 ELLA = 7027 PLANQ = 7070 PLANQ_ATLAS_TESTNET = 7077 NUME = 7100 HTH = 7118 BITROCK = 7171 KLY = 7331 EON = 7332 SHYFT = 7341 RABA = 7484 MEV = 7518 CYETH = 7560 TADIL = 7575 ADIL = 7576 TRN_MAINNET = 7668 TRN_PORCINI = 7672 CANTO = 7700 TESTNETCANTO = 7701 TBITROCK = 7771 GDCC = 7775 RISEOFTHEWARBOTSTESTNET = 7777 ORE = 7778 OEX = 7798 MAAL_TEST = 7860 TSCAS = 7878 KINTOMAINNET = 7887 ARD = 7895 DTBX = 7923 DOS = 7979 TELEPORT = 8000 TELEPORT_TESTNET = 8001 MDGL = 8029 KARAK_SEPOLIA = 8054 LIBERTY10 = 8080 LIBERTY20 = 8081 SPHINX10 = 8082 BITCOIN = 8086 E_DOLLAR = 8087 STREAMUX = 8098 MEERTEST = 8131 MEERMIX = 8132 MEERPRIV = 8133 AMANA = 8134 FLANA = 8135 MIZANA = 8136 TBOC = 8181 TQF = 8192 TTQF = 8194 CYPRESS = 8217 BTON = 8272 KORTHO = 8285 FUCK = 8387 BASE = 8453 TOKI = 8654 TOKI_TESTNET = 8655 HELA = 8668 OLO = 8723 TOLO = 8724 STOR = 8726 TSTOR = 8727 ALPH = 8738 TMY = 8768 IOTAEVM = 8822 MARO = 8848 SUPERLUMIO = 8866 UNQ = 8880 QTZ = 8881 OPL = 8882 SPH = 8883 XANACHAIN = 8888 VSC = 8889 TORE = 8890 MMT = 8898 JBC = 8899 GMMT = 8989 BERG = 8995 EVMOS_TESTNET = 9000 EVMOS = 9001 SHIDOTESTNET = 9007 SHIDO = 9008 BRB = 9012 NEXATESTNET = 9024 NEXA = 9025 GENEC = 9100 _OLD_TFIRE = 9170 COF = 9223 DOGST = 9339 DELASEP = 9393 MTHN = 9395 TRPG = 9527 QETTEST = 9528 TESTNEON = 9559 MAINNETDEV = 9700 BOBABNBTESTNET = 9728 NETZT = 9768 PN = 9779 CARBON = 9790 CARBON_TESTNET = 9792 TIMP = 9818 IMP = 9819 DOGELAYER = 9888 LRS = 9898 SPENT = 9911 TMIND = 9977 COMBO_MAINNET = 9980 AGNG = 9990 MIND = 9996 ALT_TESTNET = 9997 ZTC = 9998 MYN = 9999 SMARTBCH = 10000 SMARTBCHTEST = 10001 GON = 10024 JOCT = 10081 SJ = 10086 GEN = 10101 CHI = 10200 PWR = 10201 AA = 10242 AAT = 10243 _0XT = 10248 TWLC = 10395 JADE = 10507 SNOW = 10508 CCP = 10823 QUADRANS = 10946 QUADRANSTESTNET = 10947 ASTRA = 11110 WAGMI = 11111 ASTRA_TESTNET = 11115 HBIT = 11119 SC20 = 11221 ISLM = 11235 SHYFTT = 11437 BEVM = 11501 BEVM_TEST = 11503 SRDXT = 11612 SAN = 11888 ARIANEE = 11891 SATS = 12009 ATR = 12020 TZERO = 12051 ZERO = 12052 BRC = 12123 FIBO = 12306 BLGCHAIN = 12321 STEPTEST = 12345 RSS3 = 12553 TRIK = 12715 TQNET = 12890 SPS = 13000 CREDIT = 13308 BEAM_TESTNET = 13337 IMX = 13371 PHOENIX = 13381 MASA = 13396 IMX_TESTNET = 13473 KNB = 13600 SUS = 13812 SPS_TEST = 14000 EVO = 14324 VITRUVEO_TEST = 14333 HMND_T5 = 14853 IMX_DEVNET = 15003 LOOP = 15551 TRUSTTESTNET = 15555 EOS_TESTNET = 15557 MTT = 16000 MTTTEST = 16001 GENESYS = 16507 NYANCAT = 16688 AIRDAO = 16718 TIVAR = 16888 HOLESKY = 17000 REDSTONE_HOLESKY = 17001 GARNET = 17069 G8CM = 17171 ECLIPSE = 17172 PCT = 17180 KONET = 17217 EOS = 17777 ZKST = 18000 STN = 18122 POM = 18159 G8CT = 18181 UNREAL_OLD = 18231 UNREAL = 18233 MXCZKEVM = 18686 TITAN_TKX = 18888 TITAN_TKX_TESTNET = 18889 HMV = 19011 DCSMS = 19224 MGT = 19527 LBRY = 19600 BTCIX = 19845 CAMELARK = 20001 CLOTESTNET = 20729 P12 = 20736 JONO11 = 20765 C4EI = 21004 AAH = 21133 CENNZ_A = 21337 OMC = 21816 ONF = 21912 SFL = 22023 AIRDAO_TEST = 22040 NAUTCHAIN = 22222 GOLDX_TESTNET = 22324 MAPO = 22776 ABNT = 23006 OPSIDE = 23118 SAPPHIRE = 23294 SAPPHIRE_TESTNET = 23295 DREYERX = 23451 DREYERX_TESTNET = 23452 BLASTT = 23888 WEB = 24484 MINTME = 24734 LILA = 25186 TALV = 25839 GOLDT = 25888 BKCT = 25925 FRM = 26026 HTZ = 26600 OAC = 26863 KLAOSNOVA = 27181 NANON_TESTNET = 27483 ZEROONEMAI = 27827 VIZING_TESTNET = 28516 VIZING = 28518 OBGOR = 28528 BOBASEPOLIA = 28882 HYCHAIN_TESTNET = 29112 TKEC = 29536 MCHV = 29548 PIECE = 30067 MIYOU = 30088 CERI = 30103 MOVELEG = 30730 MOVEDEV = 30731 MOVETEST = 30732 ESN = 31102 CLDTX = 31223 CLD = 31224 GOT = 31337 TMTHN = 31414 FILECOIN_WALLABY = 31415 W3GAMEZ = 32001 BRISE = 32520 FSN = 32659 ZIL = 32769 ZIL_ISOLATED_SERVER = 32990 ZIL_TESTNET = 33101 CLOUDVERSE = 33210 AVS = 33333 ZIL_DEVNET = 33385 ZQ2_DEVNET = 33469 MODE = 34443 J2O = 35011 Q = 35441 Q_TESTNET = 35443 CMRPG = 38400 TTRPG = 38401 NRG = 39797 OHO = 39815 OX_BETA = 41500 PC = 42069 ARB1 = 42161 ARB_NOVA = 42170 CELO = 42220 EMERALD_TESTNET = 42261 EMERALD = 42262 GOLDX = 42355 ZKFAIR_MAINNET = 42766 GST = 42801 KETH = 42888 AVAETH = 43110 HEMI = 43111 FUJI = 43113 AVAX = 43114 BOBAAVAX = 43288 ZKFAIR_TESTNET = 43851 FREN = 44444 QTM = 44445 ALFA = 44787 AUTOBAHNNETWORK = 45000 SWP = 45454 DEE = 45510 TFSN = 46688 REI = 47805 FLORIPA = 49049 TBFC = 49088 STORK = 49321 TNRG = 49797 LOE = 50001 YVM = 50005 YVT = 50006 TGTON = 50021 LUMOZ_TESTNET = 51178 SRDXM = 51712 ETN_MAINNET = 52014 DOID = 53277 DODOCHAIN = 53457 DFK = 53935 ISLMT = 54211 TORONETTESTNET = 54321 PTON = 54555 TETH = 55004 REICHAIN = 55555 TREI = 55556 LAMBDA = 56026 BOBABNB = 56288 TESTNETZER = 56400 VELO = 56789 DOIDTESTNET = 56797 TSYS_ROLLUX = 57000 SEPPGN = 58008 LINEA_GOERLI = 59140 LINEA_SEPOLIA = 59141 LINEA = 59144 GCODE = 59971 TKM_TEST0 = 60000 TKM_TEST1 = 60001 TKM_TEST2 = 60002 TKM_TEST103 = 60103 BOB = 60808 KEC = 61406 AIUM_DEV = 61800 ETICA = 61803 DOKEN = 61916 OPTOPIA_TESTNET = 62049 OPTOPIA = 62050 BKLV = 62320 MTV = 62621 ECS = 63000 ECS_TESTNET = 63001 SRC = 65450 JANUSNETWORK_TESTNET = 66988 MCL = 67390 COSMIC = 67588 DM2 = 68770 CNDR = 69420 TKM0 = 70000 TKM1 = 70001 TKM2 = 70002 TKM103 = 70103 POP_APEX = 70700 GUAPX = 71111 CKB = 71393 GW_TESTNET_V1 = 71401 GW_MAINNET_V1 = 71402 CAGA = 72778 GROKCHAIN = 72992 ICBT = 73114 ICBX = 73115 VT = 73799 MVM = 73927 RESIN = 75000 BORACHAIN = 77001 FNC = 77238 VSCM = 77612 TORONET = 77777 FIRENZE = 78110 DFLY = 78281 AMPLIFY = 78430 BULLETIN = 78431 CONDUIT = 78432 VANGUARD = 78600 STANDT = 79879 MATICMUM = 80001 POLYGONAMOY = 80002 BERACHAINARTIO = 80085 HZC = 80096 NORDEK = 81041 AMANATEST = 81341 AMANAMIX = 81342 AMANAPRIV = 81343 FLANATEST = 81351 FLANAMIX = 81352 FLANAPRIV = 81353 MIZANATEST = 81361 MIZANAMIX = 81362 MIZANAPRIV = 81363 BLASTMAINNET = 81457 QNET = 81720 TSLN = 82459 ZEDX = 83872 BASEGOR = 84531 BASESEP = 84532 AERIE = 84886 CYBER = 85449 NAUTTEST = 88002 UNIT0_TESTNET = 88817 UNIT0_STAGENET = 88819 CHZ = 88880 IVAR = 88888 DHOBYGHAUT = 90001 BVHL = 90210 CAMP = 90354 NAUT = 91002 METADAP = 91120 COMBO_TESTNET = 91715 LAMBDA_TESTNET = 92001 TLILA = 93572 MANTIS = 96970 BOBABNBOLD = 97288 ELT = 99099 USCTEST = 99998 USC = 99999 QKC_R = 100000 QKC_S0 = 100001 QKC_S1 = 100002 QKC_S2 = 100003 QKC_S3 = 100004 QKC_S4 = 100005 QKC_S5 = 100006 QKC_S6 = 100007 QKC_S7 = 100008 VECHAIN = 100009 VECHAIN_TESTNET = 100010 CHI1 = 100100 STABILITYPROTOCOL = 101010 CTCTEST = 102031 CRFI = 103090 MASATEST = 103454 CAS = 104566 STRATIS = 105105 BRO = 108801 QKC_D_R = 110000 QKC_D_S0 = 110001 QKC_D_S1 = 110002 QKC_D_S2 = 110003 QKC_D_S3 = 110004 QKC_D_S4 = 110005 QKC_D_S5 = 110006 QKC_D_S6 = 110007 QKC_D_S7 = 110008 TESTSBR = 111000 SBR = 111111 RE_AL = 111188 METAO = 112358 METADAP_T = 119139 DADIL = 123456 ETLT = 128123 DIONE = 131313 ETND = 131419 MAG = 141319 ICPLAZA = 142857 PLAYFI = 161212 TKO_MAINNET = 167000 TAIKO_A2 = 167004 TAIKO_L2 = 167005 TAIKO_L3 = 167006 TKO_JOLNIR = 167007 TKO_KATLA = 167008 TKO_HEKLA = 167009 BDCC = 188710 CONDOR = 188881 FHET = 192940 FAIT = 200000 MILKTADA = 200101 MILKTALGO = 200202 AKA = 200625 BTRT = 200810 BTR = 200901 ALAYA = 201018 ALAYADEV = 201030 MYTH = 201804 TDSC = 202020 X1_DEVNET = 202212 YMTECH_BESU = 202401 TWL_JELLIE = 202624 X1_TESTNET = 204005 AURORIA = 205205 ATLAS = 210049 PLATON = 210425 MAS = 220315 REAP = 221230 REAP_TESTNET = 221231 HDX = 222222 DEEPL = 222555 TDEEPL = 222666 TAFECO = 224168 CONET_SEBOLIA = 224422 CONET_HOLESKY = 224433 HSKTEST = 230315 HYM = 234666 ATS = 246529 ATSTAU = 246785 SAAKURU_TESTNET = 247253 CMP_MAINNET = 256256 GZ_TESTNET = 266256 EGONT = 271271 SOCHAIN = 281121 ZILLSEP = 282828 SAHARATEST = 313313 FILECOIN_CALIBRATION = 314159 PAREX = 322202 BGBC_TESTNET = 323213 TC = 330844 BGBC = 333313 AVST = 333331 N3_TEST = 333333 OONETEST = 333666 OONEDEV = 333777 SPARTA = 333888 OLYMPUS = 333999 UPCHAIN_TESTNET = 336655 UPCHAIN_MAINNET = 336666 BITFINITY = 355113 DS2 = 363636 HAP_TESTNET = 373737 METAL = 381931 TAHOE = 381932 TPBXM = 404040 AIET = 413413 KEK = 420420 TKEK = 420666 ALTERIUM = 420692 ARB_RINKEBY = 421611 ARB_GOERLI = 421613 ARB_SEP = 421614 FASTEXTESTNET = 424242 MARKR_GO = 431140 DEXALOT_TESTNET = 432201 DEXALOT = 432204 SYNDR = 444444 WLKT = 444900 PSEP = 471100 ULTRAPRO = 473861 OC = 474142 CMP = 512512 DIS = 513100 DOCOIN = 526916 SCR_SEPOLIA = 534351 SCR = 534352 SCR_ALPHA = 534353 SCR_PREALPHA = 534354 SHI = 534849 BESC = 535037 ECLIPSET = 555666 HYP = 622277 BRNKC = 641230 ALL = 651940 XAI = 660279 VPIONEER = 666666 HELA_TESTNET = 666888 WONCHAIN = 686868 GALADRIEL_DEVNET = 696969 TILTYARDMAINNET = 710420 SEI_DEVNET = 713715 HEMI_SEP = 743111 BRNKCTEST = 751230 MIEXS = 761412 MDLRM = 776877 OCTA = 800001 BIZT_TESTNET = 808080 ZKLINK_NOVA = 810180 ZKLINK_NOVA_SEPOLIA = 810181 ZKLINK_NOVA_GOERLI = 810182 CURVEM = 827431 BLOQS4GOOD = 846000 DODAO = 855456 BLX = 879151 REXX = 888882 VISION = 888888 PSC_S0 = 900000 PSC_T_S0 = 910000 RIA_DEV = 912559 PSC_D_S0 = 920000 PSC_D_S1 = 920001 TFNCY = 923018 JONO12 = 955081 ELV = 955305 ECROX = 988207 AMC = 999999 NMTTEST = 1100789 TILTYARD = 1127469 AZKTN = 1261120 ETHO = 1313114 XERO = 1313500 KINTSUGI = 1337702 KILN = 1337802 ZHEJIANG = 1337803 ALBERIO = 1612127 TDD = 1731313 DBK = 2021398 PLIAN_MAINNET = 2099156 PLATONDEV = 2203181 PLATONDEV2 = 2206132 DPU = 2611555 SAHARA = 3132023 FILECOIN_BUTTERFLY = 3141592 MANTATESTNET = 3441005 MANTASEPOLIATESTNET = 3441006 ALT_ZEROGAS = 4000003 WORLDSCAL = 4281033 MXCDISCONTINUED = 5167003 MXC = 5167004 ETN_TESTNET = 5201420 KREACT = 5318008 IMVERSED = 5555555 IMVERSED_TESTNET = 5555558 AZKYT = 6038361 SAFEMAINNET = 6666665 SAFETESTNET = 6666666 SAAKURU = 7225878 VSL = 7355310 TQOM = 7668378 MUSIC = 7762959 ZORA = 7777777 PLIAN_MAINNET_L2 = 8007736 HOKUM = 8080808 HAP = 8794598 QUARIX_TESTNET = 8888881 QUARIX = 8888888 XCAP = 9322252 MILV = 9322253 PLIAN_TESTNET_L2 = 10067275 SVRNM = 10101010 SEP = 11155111 OPSEP = 11155420 TPEP = 13371337 ANDUSCHAIN_MAINNET = 14288640 PLIAN_TESTNET = 16658437 TLAMBDA = 17000920 ILT = 18289463 STABILITYTESTNET = 20180427 SPECTRUM = 20180430 QKI = 20181205 PG = 20201022 DBKSE = 20240324 HOKUM_TESTNET = 20482050 XLON = 22052002 EXLVOLTA = 27082017 EXL = 27082022 A8 = 28122024 AUXI = 28945486 FLA = 29032022 FILECOIN_LOCAL = 31415926 JOYS = 35855456 NEBULA_TESTNET = 37084624 KCHAIN = 39916801 MAIS = 43214913 AQUA = 61717561 BAKERLOO_0 = 65010000 BAKERLOO_01 = 65010001 BAKERLOO_02 = 65010002 PICCADILLY_0 = 65100000 PICCADILLY_01 = 65100001 PICCADILLY_02 = 65100002 FRAMETEST = 68840142 HETH = 77787778 TEAM = 88888888 POLYGON_BLACKBERRY = 94204209 TOYS = 99415706 CYSEP = 111557560 OPCELESTIA_RASPBERRY = 123420111 PLUME_TESTNET = 161221135 BLASTSEPOLIA = 168587773 GTH = 192837465 KANAZAWA = 222000222 NEONEVM_DEVNET = 245022926 NEONEVM_MAINNET = 245022934 NEONEVM_TESTNET = 245022940 RAZOR = 278611351 ONELEDGER = 311752642 MELD = 333000333 DEPRECTED_CALYPSO_TESTNET = 344106930 TGTH = 356256156 DEPRECATED_EUROPA_TESTNET = 476158412 DGTH = 486217935 DEPRECATED_NEBULA_TESTNET = 503129905 DEGEN_CHAIN = 666666666 ANCIENT8 = 888888888 PTCE = 889910245 POLYTECH = 889910246 CALYPSO_TESTNET = 974399131 ZSEP = 999999999 TITAN_TESTNET = 1020352220 IPOS = 1122334455 CYB = 1146703430 HUMAN_MAINNET = 1273227453 AURORA = 1313161554 AURORA_TESTNET = 1313161555 AURORA_BETANET = 1313161556 POWERGOLD = 1313161560 TITAN_MAINNET = 1350216234 CHAOS_TENET = 1351057110 RARI_MAINNET = 1380012617 RPTR = 1380996178 EUROPA_TESTNET = 1444673419 NEBULA_MAINNET = 1482601649 DEPRECATED_TITAN_TESTNET = 1517929550 CALYPSO_MAINNET = 1564830818 HMY_S0 = 1666600000 HMY_S1 = 1666600001 HMY_S2 = 1666600002 HMY_S3 = 1666600003 HMY_B_S0 = 1666700000 HMY_B_S1 = 1666700001 HMY_PS_S0 = 1666900000 HMY_PS_S1 = 1666900001 KKRT_SEPOLIA = 1802203764 RARI_TESTNET = 1918988905 HOP = 2021121117 EUROPA = 2046399126 A8OLD = 2863311531 PIRL = 3125659152 FRANKENSTEIN = 4216137055 TPALM = 11297108099 PALM = 11297108109 GS_ETH = 28872323069 XAITESTNET = 37714555429 ARB_BLUEBERRY = 88153591557 KKRT_SEPOLIA_DEPRECATED = 107107114116 ALPHABET = 111222333444 NTT = 197710212030 NTT_HARADEV = 197710212031 ZENIQ = 383414847825 IPDC = 666301171999 MOLE = 6022140761023 GW_TESTNET_V1_DEPRECATED = 868455272153094 DCHAINT = 2713017997578000 eth-typing-5.2.1/eth_typing/py.typed000066400000000000000000000000001477727116600174700ustar00rootroot00000000000000eth-typing-5.2.1/newsfragments/000077500000000000000000000000001477727116600165145ustar00rootroot00000000000000eth-typing-5.2.1/newsfragments/README.md000066400000000000000000000020221477727116600177670ustar00rootroot00000000000000This directory collects "newsfragments": short files that each contain a snippet of ReST-formatted text that will be added to the next release notes. This should be a description of aspects of the change (if any) that are relevant to users. (This contrasts with the commit message and PR description, which are a description of the change as relevant to people working on the code itself.) Each file should be named like `..rst`, where `` is an issue number, and `` is one of: - `breaking` - `bugfix` - `deprecation` - `docs` - `feature` - `internal` - `misc` - `performance` - `removal` So for example: `123.feature.rst`, `456.bugfix.rst` If the PR fixes an issue, use that number here. If there is no issue, then open up the PR first and use the PR number for the newsfragment. Note that the `towncrier` tool will automatically reflow your text, so don't try to do any fancy formatting. Run `towncrier build --draft` to get a preview of what the release notes entry will look like in the final release notes. eth-typing-5.2.1/newsfragments/validate_files.py000077500000000000000000000022721477727116600220470ustar00rootroot00000000000000#!/usr/bin/env python3 # Towncrier silently ignores files that do not match the expected ending. # We use this script to ensure we catch these as errors in CI. import pathlib import sys from eth_typing.exceptions import ( ValidationError, ) ALLOWED_EXTENSIONS = { ".breaking.rst", ".bugfix.rst", ".deprecation.rst", ".docs.rst", ".feature.rst", ".internal.rst", ".misc.rst", ".performance.rst", ".removal.rst", } ALLOWED_FILES = { "validate_files.py", "README.md", } THIS_DIR = pathlib.Path(__file__).parent num_args = len(sys.argv) - 1 assert num_args in {0, 1} if num_args == 1: assert sys.argv[1] in ("is-empty",) for fragment_file in THIS_DIR.iterdir(): if fragment_file.name in ALLOWED_FILES: continue elif num_args == 0: full_extension = "".join(fragment_file.suffixes) if full_extension not in ALLOWED_EXTENSIONS: raise ValidationError(f"Unexpected file: {fragment_file}") elif sys.argv[1] == "is-empty": raise ValidationError(f"Unexpected file: {fragment_file}") else: raise RuntimeError( f"Strange: arguments {sys.argv} were validated, but not found" ) eth-typing-5.2.1/pyproject.toml000066400000000000000000000104041477727116600165440ustar00rootroot00000000000000[tool.autoflake] exclude = "__init__.py" remove_all_unused_imports = true [tool.isort] combine_as_imports = true extra_standard_library = "pytest" force_grid_wrap = 1 force_sort_within_sections = true force_to_top = "pytest" honor_noqa = true known_first_party = "eth_typing" known_third_party = "hypothesis" multi_line_output = 3 profile = "black" use_parentheses = true [tool.mypy] check_untyped_defs = true disallow_any_generics = true disallow_incomplete_defs = true disallow_subclassing_any = true disallow_untyped_calls = true disallow_untyped_decorators = true disallow_untyped_defs = true ignore_missing_imports = true strict_equality = true strict_optional = true warn_redundant_casts = true warn_return_any = true warn_unused_configs = true warn_unused_ignores = true [tool.pydocstyle] # All error codes found here: # http://www.pydocstyle.org/en/3.0.0/error_codes.html # # Ignored: # D1 - Missing docstring error codes # # Selected: # D2 - Whitespace error codes # D3 - Quote error codes # D4 - Content related error codes select = "D2,D3,D4" # Extra ignores: # D200 - One-line docstring should fit on one line with quotes # D203 - 1 blank line required before class docstring # D204 - 1 blank line required after class docstring # D205 - 1 blank line required between summary line and description # D212 - Multi-line docstring summary should start at the first line # D302 - Use u""" for Unicode docstrings # D400 - First line should end with a period # D401 - First line should be in imperative mood # D412 - No blank lines allowed between a section header and its content # D415 - First line should end with a period, question mark, or exclamation point add-ignore = "D200,D203,D204,D205,D212,D302,D400,D401,D412,D415" # Explanation: # D400 - Enabling this error code seems to make it a requirement that the first # sentence in a docstring is not split across two lines. It also makes it a # requirement that no docstring can have a multi-sentence description without a # summary line. Neither one of those requirements seem appropriate. [tool.pytest.ini_options] addopts = "-v --showlocals --durations 10" log_date_format = "%m-%d %H:%M:%S" log_format = "%(levelname)8s %(asctime)s %(filename)20s %(message)s" xfail_strict = true [tool.towncrier] # Read https://github.com/ethereum/eth-typing/blob/main/newsfragments/README.md for instructions directory = "newsfragments" filename = "docs/release_notes.rst" issue_format = "`#{issue} `__" package = "eth_typing" title_format = "eth-typing v{version} ({project_date})" underlines = ["-", "~", "^"] [[tool.towncrier.type]] directory = "breaking" name = "Breaking changes" showcontent = true [[tool.towncrier.type]] directory = "bugfix" name = "Bugfixes" showcontent = true [[tool.towncrier.type]] directory = "deprecation" name = "Deprecations" showcontent = true [[tool.towncrier.type]] directory = "docs" name = "Improved Documentation" showcontent = true [[tool.towncrier.type]] directory = "feature" name = "Features" showcontent = true [[tool.towncrier.type]] directory = "internal" name = "Internal Changes - for eth-typing Contributors" showcontent = true [[tool.towncrier.type]] directory = "misc" name = "Miscellaneous Changes" showcontent = false [[tool.towncrier.type]] directory = "performance" name = "Performance Improvements" showcontent = true [[tool.towncrier.type]] directory = "removal" name = "Removals" showcontent = true [tool.bumpversion] current_version = "5.2.1" parse = """ (?P\\d+) \\.(?P\\d+) \\.(?P\\d+) (- (?P[^.]*) \\.(?P\\d+) )? """ serialize = [ "{major}.{minor}.{patch}-{stage}.{devnum}", "{major}.{minor}.{patch}", ] search = "{current_version}" replace = "{new_version}" regex = false ignore_missing_version = false tag = true sign_tags = true tag_name = "v{new_version}" tag_message = "Bump version: {current_version} → {new_version}" allow_dirty = false commit = true message = "Bump version: {current_version} → {new_version}" [tool.bumpversion.parts.stage] optional_value = "stable" first_value = "stable" values = [ "alpha", "beta", "stable", ] [tool.bumpversion.part.devnum] [[tool.bumpversion.files]] filename = "setup.py" search = "version=\"{current_version}\"" replace = "version=\"{new_version}\"" eth-typing-5.2.1/scripts/000077500000000000000000000000001477727116600153205ustar00rootroot00000000000000eth-typing-5.2.1/scripts/release/000077500000000000000000000000001477727116600167405ustar00rootroot00000000000000eth-typing-5.2.1/scripts/release/test_package.py000066400000000000000000000025071477727116600217500ustar00rootroot00000000000000from pathlib import ( Path, ) import subprocess from tempfile import ( TemporaryDirectory, ) import venv def create_venv(parent_path: Path) -> Path: venv_path = parent_path / "package-smoke-test" venv.create(venv_path, with_pip=True) subprocess.run( [venv_path / "bin" / "pip", "install", "-U", "pip", "setuptools"], check=True ) return venv_path def find_wheel(project_path: Path) -> Path: wheels = list(project_path.glob("dist/*.whl")) if len(wheels) != 1: raise Exception( f"Expected one wheel. Instead found: {wheels} " f"in project {project_path.absolute()}" ) return wheels[0] def install_wheel(venv_path: Path, wheel_path: Path) -> None: subprocess.run( [venv_path / "bin" / "pip", "install", f"{wheel_path}"], check=True, ) def test_install_local_wheel() -> None: with TemporaryDirectory() as tmpdir: venv_path = create_venv(Path(tmpdir)) wheel_path = find_wheel(Path(".")) install_wheel(venv_path, wheel_path) print("Installed", wheel_path.absolute(), "to", venv_path) print(f"Activate with `source {venv_path}/bin/activate`") input("Press enter when the test has completed. The directory will be deleted.") if __name__ == "__main__": test_install_local_wheel() eth-typing-5.2.1/setup.py000066400000000000000000000041261477727116600153460ustar00rootroot00000000000000#!/usr/bin/env python from setuptools import ( find_packages, setup, ) extras_require = { "dev": [ "build>=0.9.0", "bump_my_version>=0.19.0", "ipython", "mypy==1.10.0", "pre-commit>=3.4.0", "tox>=4.0.0", "twine", "wheel", ], "docs": [ "sphinx>=6.0.0", "sphinx-autobuild>=2021.3.14", "sphinx_rtd_theme>=1.0.0", "towncrier>=24,<25", ], "test": [ "pytest>=7.0.0", "pytest-xdist>=2.4.0", ], } extras_require["dev"] = ( extras_require["dev"] + extras_require["docs"] + extras_require["test"] ) with open("./README.md") as readme: long_description = readme.read() setup( name="eth-typing", # *IMPORTANT*: Don't manually change the version here. See Contributing docs for the release process. version="5.2.1", description="""eth-typing: Common type annotations for ethereum python packages""", long_description=long_description, long_description_content_type="text/markdown", author="The Ethereum Foundation", author_email="snakecharmers@ethereum.org", url="https://github.com/ethereum/eth-typing", include_package_data=True, install_requires=[ "typing_extensions>=4.5.0", ], python_requires=">=3.8, <4", extras_require=extras_require, py_modules=["eth_typing"], license="MIT", zip_safe=False, keywords="ethereum", packages=find_packages(exclude=["scripts", "scripts.*", "tests", "tests.*"]), package_data={"eth_typing": ["py.typed"]}, classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", ], ) eth-typing-5.2.1/tests/000077500000000000000000000000001477727116600147735ustar00rootroot00000000000000eth-typing-5.2.1/tests/core/000077500000000000000000000000001477727116600157235ustar00rootroot00000000000000eth-typing-5.2.1/tests/core/test_import_and_version.py000066400000000000000000000001511477727116600232320ustar00rootroot00000000000000def test_import_and_version(): import eth_typing assert isinstance(eth_typing.__version__, str) eth-typing-5.2.1/tox.ini000066400000000000000000000030521477727116600151440ustar00rootroot00000000000000[tox] envlist= py{38,39,310,311,312,313}-core py{38,39,310,311,312,313}-lint py{38,39,310,311,312,313}-wheel windows-wheel docs [flake8] exclude=venv*,.tox,docs,build extend-ignore=E203 max-line-length=88 per-file-ignores=__init__.py:F401 [blocklint] max_issue_threshold=1 [testenv] usedevelop=True commands= core: pytest {posargs:tests/core} docs: make check-docs-ci basepython= docs: python windows-wheel: python py38: python3.8 py39: python3.9 py310: python3.10 py311: python3.11 py312: python3.12 py313: python3.13 extras= test docs allowlist_externals=make,pre-commit [testenv:py{38,39,310,311,312,313}-lint] deps=pre-commit extras=dev commands= pre-commit install pre-commit run --all-files --show-diff-on-failure [testenv:py{38,39,310,311,312,313}-wheel] deps= wheel build[virtualenv] allowlist_externals= /bin/rm /bin/bash commands= python -m pip install --upgrade pip /bin/rm -rf build dist python -m build /bin/bash -c 'python -m pip install --upgrade "$(ls dist/eth_typing-*-py3-none-any.whl)" --progress-bar off' python -c "import eth_typing" skip_install=true [testenv:windows-wheel] deps= wheel build[virtualenv] allowlist_externals= bash.exe commands= python --version python -m pip install --upgrade pip bash.exe -c "rm -rf build dist" python -m build bash.exe -c 'python -m pip install --upgrade "$(ls dist/eth_typing-*-py3-none-any.whl)" --progress-bar off' python -c "import eth_typing" skip_install=true eth-typing-5.2.1/update_network_chain_ids.py000066400000000000000000000026411477727116600212420ustar00rootroot00000000000000""" Script that syncs Network ChainId constants in eth_typing/networks.py with the current list of networks from chainid.network. To run the script: .. code-block:: shell $ python update_network_chain_ids.py After running the command, check the output in eth_typing/networks.py If all looks good, open a PR with the changes. """ import json import os import urllib.request networks_file = "eth_typing/networks.py" # Just replace the file entirely os.remove(networks_file) # Open and begin writing the Networks python module f = open(networks_file, "w") f.write( "from enum import (\n" + " IntEnum,\n" + ")\n\n\n" + "class ChainId(IntEnum):\n" ) # Load the latest JSON from chainid.network and loop over each Network. # Each constant consists of the Network shortName and chainId, where the # shortName is capitalized and used as the constant name and the chainId is # the value. i.e. for name "eth" and chainId "1", the constant would be ETH = 1 with urllib.request.urlopen("https://chainid.network/chains_mini.json") as url: data = json.load(url) for d in data: name, chainId = d["shortName"], d["chainId"] if name[0].isdigit(): name = "_" + name enum = ( "".join(["_" if i == "-" else i.upper() for i in name]).lstrip("-") + " = " + str(chainId) + "\n" ) enum = f" {enum}" f.write(enum) f.close()