chainlib-eth

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

commit ddca8422877d7d0945b0c0f24383f489c39232ec
parent 206d3d88e5c79beec91e1fea247a4abf0aa3c1c7
Author: lash <dev@holbrook.no>
Date:   Sat, 13 May 2023 21:08:07 +0100

Add roles and contracts index in unittest fixture

Diffstat:
MCHANGELOG | 4++++
MMANIFEST.in | 2+-
MMakefile | 9+++++++++
Mchainlib/eth/unittest/ethtester.py | 7+++++++
Msetup.cfg | 2+-
5 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG @@ -1,3 +1,7 @@ +- 0.4.22 + * Add roles and contracts index in unittest fixture +- 0.4.21 + * Add man pages to installer - 0.4.20 * Enable short 0 value in eth-encode for address and bytes - 0.4.19 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/** diff --git a/Makefile b/Makefile @@ -1,3 +1,4 @@ +PACKAGE=chainlib-eth PREFIX ?= /usr/local BUILD_DIR = man/build/ @@ -14,3 +15,11 @@ man: chainlib-man.py -b `PYTHONPATH=. python chainlib/eth/runnable/flags.py balance` -v -n eth-balance -d $(BUILD_DIR)/ man .PHONY: man + +build: + python setup.py bdist_wheel + +.PHONY clean: + rm -rf build + rm -rf dist + rm -rf $(PACKAGE).egg-info diff --git a/chainlib/eth/unittest/ethtester.py b/chainlib/eth/unittest/ethtester.py @@ -68,6 +68,8 @@ class EthTesterCase(unittest.TestCase): for a in self.keystore.list(): self.accounts.append(add_0x(to_checksum_address(a))) + self.publisher = self.accounts[0] + def rpc_with_tester(chain_spec=self.chain_spec, url=None): return self.rpc @@ -75,6 +77,11 @@ class EthTesterCase(unittest.TestCase): RPCConnection.register_constructor(ConnType.CUSTOM, rpc_with_tester, tag='signer') RPCConnection.register_location('custom', self.chain_spec, tag='default', exist_ok=True) RPCConnection.register_location('custom', self.chain_spec, tag='signer', exist_ok=True) + + self.contracts = {} + self.roles = { + 'publisher': self.publisher, + } def tearDown(self): diff --git a/setup.cfg b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = chainlib-eth -version = 0.4.21 +version = 0.4.22 description = Ethereum implementation of the chainlib interface author = Louis Holbrook author_email = dev@holbrook.no