chainlib-eth

Ethereum implementation of the chainlib interface
Log | Files | Refs | README | LICENSE

commit 79c535f4caa18c2d612cdfe8bfff92332feb69b9
parent 84493792db2e9b2a0c610c70d6b097c84fb921d1
Author: lash <dev@holbrook.no>
Date:   Sat,  3 Jun 2023 12:41:17 +0100

Base docs (cli tools), auto generate readme

Diffstat:
MMANIFEST.in | 2+-
MMakefile | 10++++++++++
MREADME.md | 72++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
Adoc/texinfo/Makefile | 5+++++
Adoc/texinfo/cli.texi | 32++++++++++++++++++++++++++++++++
Adoc/texinfo/index.texi | 4++++
Adoc/texinfo/intro.texi | 15+++++++++++++++
Msetup.cfg | 2+-
Msetup.py | 6++++++
9 files changed, 144 insertions(+), 4 deletions(-)

diff --git a/MANIFEST.in b/MANIFEST.in @@ -1 +1 @@ -include *requirements.txt LICENSE WAIVER WAIVER.asc CHANGELOG chainlib/eth/data/config/** man/build/** +include *requirements.txt LICENSE WAIVER WAIVER.asc CHANGELOG chainlib/eth/data/config/** man/build/** README* diff --git a/Makefile b/Makefile @@ -23,3 +23,13 @@ build: rm -rf build rm -rf dist rm -rf $(PACKAGE).egg-info + +readme: + make -C doc/texinfo readme + pandoc -f docbook -t gfm doc/texinfo/build/docbook.xml > README.md + +python: build + +doc: + make -C doc/texinfo + diff --git a/README.md b/README.md @@ -1,5 +1,73 @@ # chainlib-eth -Ethereum implementation of the chainlib blockchain interface tooling +# Overview -See https://git.defalsify.org/chainlib for more information +This is the Ethereum (EVM) implementation of the `chainlib` block +interface. + +It contains implementations for: + +- RPC client implementation. + +- Nonce and fee generators. + +- Transaction and block objects. + +- EVM ABI encoding and decoding. + +- CLI tool suite for common operations. + +Please refer to the documentation for the `chainlib` package to achieve +a broader context of what `chainlib-eth implements`. + +# CLI tooling + +When installed, the python package `chainlib-eth` will install a +selection of CLI tools in the python executable script path. + +It will also install man pages for each tool in the man path. The man +pages describe arguments, configurations and environment variables +relevant for each tool. They will not be repeated here. + +The man pages have been generated using the `chainlib-man.py` script +from the `chainlib` package. Please refer to the `chainlib` package +documentation for further details on the logical structure of the +applicable arguments. + +`eth-balance` +Gas token balance of a specific address. + +`eth-block` +Retrieve a block by number or hash. + +`eth-checksum` +Transform an ethereum address to a checksummed address. + +`eth-count` +Get the amount of confirmed transactions on network for an account. +Corresponds to the nonce of the next future transaction. + +`eth-decode` +Decode a transaction from its serialized (wire) format. + +`eth-encode` +Sncode method calls and/or individual arguments for the EVM ABI. Can be +used to interface with smart contracts and generate constructor +arguments. + +`eth-gas` +Generate transactions for private accounts and smart contracts, with or +without gas token value. + +`eth-get` +Retrieve a transaction, or bytecode for an address. + +`eth-info` +Retrieve general stats for a blockchain network. + +`eth-raw` +Covert a signed wire format transaction to raw transaction for RPC. + +`eth-wait` +Block until transaction has been completed (transaction "receipt" +exists). diff --git a/doc/texinfo/Makefile b/doc/texinfo/Makefile @@ -0,0 +1,5 @@ +all: + makeinfo --html -o build index.texi + +readme: + makeinfo --docbook --no-split -o build/docbook.xml index.texi diff --git a/doc/texinfo/cli.texi b/doc/texinfo/cli.texi @@ -0,0 +1,32 @@ +@chapter CLI tooling + +When installed, the python package @code{chainlib-eth} will install a selection of CLI tools in the python executable script path. + +It will also install man pages for each tool in the man path. The man pages describe arguments, configurations and environment variables relevant for each tool. They will not be repeated here. + +The man pages have been generated using the @code{chainlib-man.py} script from the @code{chainlib} package. Please refer to the @code{chainlib} package documentation for further details on the logical structure of the applicable arguments. + +@table @command +@item eth-balance +Gas token balance of a specific address. +@item eth-block +Retrieve a block by number or hash. +@item eth-checksum +Transform an ethereum address to a checksummed address. +@item eth-count +Get the amount of confirmed transactions on network for an account. Corresponds to the nonce of the next future transaction. +@item eth-decode +Decode a transaction from its serialized (wire) format. +@item eth-encode +Sncode method calls and/or individual arguments for the EVM ABI. Can be used to interface with smart contracts and generate constructor arguments. +@item eth-gas +Generate transactions for private accounts and smart contracts, with or without gas token value. +@item eth-get +Retrieve a transaction, or bytecode for an address. +@item eth-info +Retrieve general stats for a blockchain network. +@item eth-raw +Covert a signed wire format transaction to raw transaction for RPC. +@item eth-wait +Block until transaction has been completed (transaction "receipt" exists). +@end table diff --git a/doc/texinfo/index.texi b/doc/texinfo/index.texi @@ -0,0 +1,4 @@ +@top chainlib-eth + +@include intro.texi +@include cli.texi diff --git a/doc/texinfo/intro.texi b/doc/texinfo/intro.texi @@ -0,0 +1,15 @@ +@chapter Overview + +This is the Ethereum (EVM) implementation of the @code{chainlib} block interface. + +It contains implementations for: + +@itemize +@item RPC client implementation. +@item Nonce and fee generators. +@item Transaction and block objects. +@item EVM ABI encoding and decoding. +@item CLI tool suite for common operations. +@end itemize + +Please refer to the documentation for the @code{chainlib} package to achieve a broader context of what @code{chainlib-eth implements}. diff --git a/setup.cfg b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = chainlib-eth -version = 0.4.23 +version = 0.4.24 description = Ethereum implementation of the chainlib interface author = Louis Holbrook author_email = dev@holbrook.no diff --git a/setup.py b/setup.py @@ -20,6 +20,10 @@ while True: test_requirements.append(l.rstrip()) f.close() +f = open('README.md', 'r') +description = f.read() +f.close() + man_dir = 'man/build' mans = [ 'eth-balance', @@ -39,4 +43,6 @@ setup( install_requires=requirements, tests_require=test_requirements, data_files=[("man/man1", mans)], + long_description=description, + long_description_content_type='text/markdown', )