From c07595781cefbfce0c8b43bdd3b2704ab2b1a7c9 Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Thu, 3 Feb 2022 20:40:42 +0000 Subject: [PATCH] altcoins.eth -> base_proto.ethereum --- mmgen/{altcoins => base_proto}/__init__.py | 0 .../{altcoins/eth => base_proto/ethereum}/__init__.py | 0 .../{altcoins/eth => base_proto/ethereum}/contract.py | 2 +- .../eth => base_proto/ethereum}/pyethereum/LICENSE | 0 .../eth => base_proto/ethereum}/pyethereum/__init__.py | 0 .../ethereum}/pyethereum/transactions.py | 0 .../eth => base_proto/ethereum}/pyethereum/utils.py | 0 .../{altcoins/eth => base_proto/ethereum}/rlp/LICENSE | 0 .../eth => base_proto/ethereum}/rlp/__init__.py | 0 .../eth => base_proto/ethereum}/rlp/atomic.py | 0 .../{altcoins/eth => base_proto/ethereum}/rlp/codec.py | 0 .../eth => base_proto/ethereum}/rlp/exceptions.py | 0 .../eth => base_proto/ethereum}/rlp/sedes/__init__.py | 0 .../ethereum}/rlp/sedes/big_endian_int.py | 0 .../eth => base_proto/ethereum}/rlp/sedes/binary.py | 0 .../eth => base_proto/ethereum}/rlp/sedes/boolean.py | 0 .../eth => base_proto/ethereum}/rlp/sedes/lists.py | 0 .../eth => base_proto/ethereum}/rlp/sedes/raw.py | 0 .../ethereum}/rlp/sedes/serializable.py | 0 .../eth => base_proto/ethereum}/rlp/sedes/text.py | 0 mmgen/{altcoins/eth => base_proto/ethereum}/tw.py | 2 +- mmgen/{altcoins/eth => base_proto/ethereum}/twaddrs.py | 2 +- mmgen/{altcoins/eth => base_proto/ethereum}/twbal.py | 2 +- mmgen/{altcoins/eth => base_proto/ethereum}/twctl.py | 2 +- mmgen/{altcoins/eth => base_proto/ethereum}/twuo.py | 2 +- mmgen/{altcoins/eth => base_proto/ethereum}/tx.py | 2 +- mmgen/util.py | 4 ++-- setup.cfg | 10 +++++----- test/overlay/__init__.py | 10 +++++----- test/test_py_d/ts_ethdev.py | 4 ++-- 30 files changed, 21 insertions(+), 21 deletions(-) rename mmgen/{altcoins => base_proto}/__init__.py (100%) rename mmgen/{altcoins/eth => base_proto/ethereum}/__init__.py (100%) rename mmgen/{altcoins/eth => base_proto/ethereum}/contract.py (98%) rename mmgen/{altcoins/eth => base_proto/ethereum}/pyethereum/LICENSE (100%) rename mmgen/{altcoins/eth => base_proto/ethereum}/pyethereum/__init__.py (100%) rename mmgen/{altcoins/eth => base_proto/ethereum}/pyethereum/transactions.py (100%) rename mmgen/{altcoins/eth => base_proto/ethereum}/pyethereum/utils.py (100%) rename mmgen/{altcoins/eth => base_proto/ethereum}/rlp/LICENSE (100%) rename mmgen/{altcoins/eth => base_proto/ethereum}/rlp/__init__.py (100%) rename mmgen/{altcoins/eth => base_proto/ethereum}/rlp/atomic.py (100%) rename mmgen/{altcoins/eth => base_proto/ethereum}/rlp/codec.py (100%) rename mmgen/{altcoins/eth => base_proto/ethereum}/rlp/exceptions.py (100%) rename mmgen/{altcoins/eth => base_proto/ethereum}/rlp/sedes/__init__.py (100%) rename mmgen/{altcoins/eth => base_proto/ethereum}/rlp/sedes/big_endian_int.py (100%) rename mmgen/{altcoins/eth => base_proto/ethereum}/rlp/sedes/binary.py (100%) rename mmgen/{altcoins/eth => base_proto/ethereum}/rlp/sedes/boolean.py (100%) rename mmgen/{altcoins/eth => base_proto/ethereum}/rlp/sedes/lists.py (100%) rename mmgen/{altcoins/eth => base_proto/ethereum}/rlp/sedes/raw.py (100%) rename mmgen/{altcoins/eth => base_proto/ethereum}/rlp/sedes/serializable.py (100%) rename mmgen/{altcoins/eth => base_proto/ethereum}/rlp/sedes/text.py (100%) rename mmgen/{altcoins/eth => base_proto/ethereum}/tw.py (94%) rename mmgen/{altcoins/eth => base_proto/ethereum}/twaddrs.py (95%) rename mmgen/{altcoins/eth => base_proto/ethereum}/twbal.py (95%) rename mmgen/{altcoins/eth => base_proto/ethereum}/twctl.py (98%) rename mmgen/{altcoins/eth => base_proto/ethereum}/twuo.py (97%) rename mmgen/{altcoins/eth => base_proto/ethereum}/tx.py (99%) diff --git a/mmgen/altcoins/__init__.py b/mmgen/base_proto/__init__.py similarity index 100% rename from mmgen/altcoins/__init__.py rename to mmgen/base_proto/__init__.py diff --git a/mmgen/altcoins/eth/__init__.py b/mmgen/base_proto/ethereum/__init__.py similarity index 100% rename from mmgen/altcoins/eth/__init__.py rename to mmgen/base_proto/ethereum/__init__.py diff --git a/mmgen/altcoins/eth/contract.py b/mmgen/base_proto/ethereum/contract.py similarity index 98% rename from mmgen/altcoins/eth/contract.py rename to mmgen/base_proto/ethereum/contract.py index be73be1e..345681e9 100755 --- a/mmgen/altcoins/eth/contract.py +++ b/mmgen/base_proto/ethereum/contract.py @@ -17,7 +17,7 @@ # along with this program. If not, see . """ -altcoins.eth.contract: Ethereum contract and token classes for the MMGen suite +altcoins.base_proto.ethereum.contract: Ethereum contract and token classes """ from decimal import Decimal diff --git a/mmgen/altcoins/eth/pyethereum/LICENSE b/mmgen/base_proto/ethereum/pyethereum/LICENSE similarity index 100% rename from mmgen/altcoins/eth/pyethereum/LICENSE rename to mmgen/base_proto/ethereum/pyethereum/LICENSE diff --git a/mmgen/altcoins/eth/pyethereum/__init__.py b/mmgen/base_proto/ethereum/pyethereum/__init__.py similarity index 100% rename from mmgen/altcoins/eth/pyethereum/__init__.py rename to mmgen/base_proto/ethereum/pyethereum/__init__.py diff --git a/mmgen/altcoins/eth/pyethereum/transactions.py b/mmgen/base_proto/ethereum/pyethereum/transactions.py similarity index 100% rename from mmgen/altcoins/eth/pyethereum/transactions.py rename to mmgen/base_proto/ethereum/pyethereum/transactions.py diff --git a/mmgen/altcoins/eth/pyethereum/utils.py b/mmgen/base_proto/ethereum/pyethereum/utils.py similarity index 100% rename from mmgen/altcoins/eth/pyethereum/utils.py rename to mmgen/base_proto/ethereum/pyethereum/utils.py diff --git a/mmgen/altcoins/eth/rlp/LICENSE b/mmgen/base_proto/ethereum/rlp/LICENSE similarity index 100% rename from mmgen/altcoins/eth/rlp/LICENSE rename to mmgen/base_proto/ethereum/rlp/LICENSE diff --git a/mmgen/altcoins/eth/rlp/__init__.py b/mmgen/base_proto/ethereum/rlp/__init__.py similarity index 100% rename from mmgen/altcoins/eth/rlp/__init__.py rename to mmgen/base_proto/ethereum/rlp/__init__.py diff --git a/mmgen/altcoins/eth/rlp/atomic.py b/mmgen/base_proto/ethereum/rlp/atomic.py similarity index 100% rename from mmgen/altcoins/eth/rlp/atomic.py rename to mmgen/base_proto/ethereum/rlp/atomic.py diff --git a/mmgen/altcoins/eth/rlp/codec.py b/mmgen/base_proto/ethereum/rlp/codec.py similarity index 100% rename from mmgen/altcoins/eth/rlp/codec.py rename to mmgen/base_proto/ethereum/rlp/codec.py diff --git a/mmgen/altcoins/eth/rlp/exceptions.py b/mmgen/base_proto/ethereum/rlp/exceptions.py similarity index 100% rename from mmgen/altcoins/eth/rlp/exceptions.py rename to mmgen/base_proto/ethereum/rlp/exceptions.py diff --git a/mmgen/altcoins/eth/rlp/sedes/__init__.py b/mmgen/base_proto/ethereum/rlp/sedes/__init__.py similarity index 100% rename from mmgen/altcoins/eth/rlp/sedes/__init__.py rename to mmgen/base_proto/ethereum/rlp/sedes/__init__.py diff --git a/mmgen/altcoins/eth/rlp/sedes/big_endian_int.py b/mmgen/base_proto/ethereum/rlp/sedes/big_endian_int.py similarity index 100% rename from mmgen/altcoins/eth/rlp/sedes/big_endian_int.py rename to mmgen/base_proto/ethereum/rlp/sedes/big_endian_int.py diff --git a/mmgen/altcoins/eth/rlp/sedes/binary.py b/mmgen/base_proto/ethereum/rlp/sedes/binary.py similarity index 100% rename from mmgen/altcoins/eth/rlp/sedes/binary.py rename to mmgen/base_proto/ethereum/rlp/sedes/binary.py diff --git a/mmgen/altcoins/eth/rlp/sedes/boolean.py b/mmgen/base_proto/ethereum/rlp/sedes/boolean.py similarity index 100% rename from mmgen/altcoins/eth/rlp/sedes/boolean.py rename to mmgen/base_proto/ethereum/rlp/sedes/boolean.py diff --git a/mmgen/altcoins/eth/rlp/sedes/lists.py b/mmgen/base_proto/ethereum/rlp/sedes/lists.py similarity index 100% rename from mmgen/altcoins/eth/rlp/sedes/lists.py rename to mmgen/base_proto/ethereum/rlp/sedes/lists.py diff --git a/mmgen/altcoins/eth/rlp/sedes/raw.py b/mmgen/base_proto/ethereum/rlp/sedes/raw.py similarity index 100% rename from mmgen/altcoins/eth/rlp/sedes/raw.py rename to mmgen/base_proto/ethereum/rlp/sedes/raw.py diff --git a/mmgen/altcoins/eth/rlp/sedes/serializable.py b/mmgen/base_proto/ethereum/rlp/sedes/serializable.py similarity index 100% rename from mmgen/altcoins/eth/rlp/sedes/serializable.py rename to mmgen/base_proto/ethereum/rlp/sedes/serializable.py diff --git a/mmgen/altcoins/eth/rlp/sedes/text.py b/mmgen/base_proto/ethereum/rlp/sedes/text.py similarity index 100% rename from mmgen/altcoins/eth/rlp/sedes/text.py rename to mmgen/base_proto/ethereum/rlp/sedes/text.py diff --git a/mmgen/altcoins/eth/tw.py b/mmgen/base_proto/ethereum/tw.py similarity index 94% rename from mmgen/altcoins/eth/tw.py rename to mmgen/base_proto/ethereum/tw.py index 66bd3e57..9308a4b9 100755 --- a/mmgen/altcoins/eth/tw.py +++ b/mmgen/base_proto/ethereum/tw.py @@ -17,7 +17,7 @@ # along with this program. If not, see . """ -altcoins.eth.tw: Ethereum tracking wallet dependency classes for the MMGen suite +altcoins.base_proto.ethereum.tw: Ethereum tracking wallet dependency classes """ from ...addrdata import AddrData,TwAddrData diff --git a/mmgen/altcoins/eth/twaddrs.py b/mmgen/base_proto/ethereum/twaddrs.py similarity index 95% rename from mmgen/altcoins/eth/twaddrs.py rename to mmgen/base_proto/ethereum/twaddrs.py index bd9204e3..f5b29221 100755 --- a/mmgen/altcoins/eth/twaddrs.py +++ b/mmgen/base_proto/ethereum/twaddrs.py @@ -17,7 +17,7 @@ # along with this program. If not, see . """ -altcoins.eth.twaddrs: Ethereum tracking wallet listaddresses class for the MMGen suite +altcoins.base_proto.ethereum.twaddrs: Ethereum tracking wallet listaddresses class """ from ...twaddrs import TwAddrList diff --git a/mmgen/altcoins/eth/twbal.py b/mmgen/base_proto/ethereum/twbal.py similarity index 95% rename from mmgen/altcoins/eth/twbal.py rename to mmgen/base_proto/ethereum/twbal.py index 07e3a76c..02f949d1 100755 --- a/mmgen/altcoins/eth/twbal.py +++ b/mmgen/base_proto/ethereum/twbal.py @@ -17,7 +17,7 @@ # along with this program. If not, see . """ -altcoins.eth.twbal: Ethereum tracking wallet getbalance class for the MMGen suite +altcoins.base_proto.ethereum.twbal: Ethereum tracking wallet getbalance class """ from ...twctl import TrackingWallet diff --git a/mmgen/altcoins/eth/twctl.py b/mmgen/base_proto/ethereum/twctl.py similarity index 98% rename from mmgen/altcoins/eth/twctl.py rename to mmgen/base_proto/ethereum/twctl.py index 1cb6d630..6214895e 100755 --- a/mmgen/altcoins/eth/twctl.py +++ b/mmgen/base_proto/ethereum/twctl.py @@ -17,7 +17,7 @@ # along with this program. If not, see . """ -altcoins.eth.twctl: Ethereum tracking wallet control class for the MMGen suite +altcoins.base_proto.ethereum.twctl: Ethereum tracking wallet control class """ from ...util import msg,ymsg,write_mode diff --git a/mmgen/altcoins/eth/twuo.py b/mmgen/base_proto/ethereum/twuo.py similarity index 97% rename from mmgen/altcoins/eth/twuo.py rename to mmgen/base_proto/ethereum/twuo.py index 7c453aec..470e0af1 100755 --- a/mmgen/altcoins/eth/twuo.py +++ b/mmgen/base_proto/ethereum/twuo.py @@ -17,7 +17,7 @@ # along with this program. If not, see . """ -altcoins.eth.twuo: Ethereum tracking wallet unspent outputs class for the MMGen suite +altcoins.base_proto.ethereum.twuo: Ethereum tracking wallet unspent outputs class """ from ...tw import TwLabel diff --git a/mmgen/altcoins/eth/tx.py b/mmgen/base_proto/ethereum/tx.py similarity index 99% rename from mmgen/altcoins/eth/tx.py rename to mmgen/base_proto/ethereum/tx.py index dce2875e..9ff027ea 100755 --- a/mmgen/altcoins/eth/tx.py +++ b/mmgen/base_proto/ethereum/tx.py @@ -17,7 +17,7 @@ # along with this program. If not, see . """ -altcoins.eth.tx: Ethereum transaction classes for the MMGen suite +altcoins.base_proto.ethereum.tx: Ethereum transaction classes """ import json diff --git a/mmgen/util.py b/mmgen/util.py index a193facd..a194b7c6 100755 --- a/mmgen/util.py +++ b/mmgen/util.py @@ -677,10 +677,10 @@ def altcoin_subclass(cls,proto,mod_dir): magic module loading and class retrieval """ - if proto.base_coin != 'ETH': + if proto.base_proto != 'Ethereum': return cls - modname = f'mmgen.altcoins.{proto.base_coin.lower()}.{mod_dir}' + modname = f'mmgen.base_proto.{proto.base_proto.lower()}.{mod_dir}' import importlib if mod_dir == 'tx': # nested classes diff --git a/setup.cfg b/setup.cfg index 6aecfb8e..a8bc151d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -44,11 +44,11 @@ packages = mmgen.share mmgen.proto mmgen.tool - mmgen.altcoins - mmgen.altcoins.eth - mmgen.altcoins.eth.pyethereum - mmgen.altcoins.eth.rlp - mmgen.altcoins.eth.rlp.sedes + mmgen.base_proto + mmgen.base_proto.ethereum + mmgen.base_proto.ethereum.pyethereum + mmgen.base_proto.ethereum.rlp + mmgen.base_proto.ethereum.rlp.sedes scripts = cmds/mmgen-addrgen diff --git a/test/overlay/__init__.py b/test/overlay/__init__.py index f174ae73..7ddaa588 100644 --- a/test/overlay/__init__.py +++ b/test/overlay/__init__.py @@ -41,11 +41,11 @@ def overlay_setup(repo_root): 'mmgen.share', 'mmgen.tool', 'mmgen.proto', - 'mmgen.altcoins', - 'mmgen.altcoins.eth', - 'mmgen.altcoins.eth.pyethereum', - 'mmgen.altcoins.eth.rlp', - 'mmgen.altcoins.eth.rlp.sedes' ): + 'mmgen.base_proto', + 'mmgen.base_proto.ethereum', + 'mmgen.base_proto.ethereum.pyethereum', + 'mmgen.base_proto.ethereum.rlp', + 'mmgen.base_proto.ethereum.rlp.sedes' ): process_srcdir(d) return overlay_dir diff --git a/test/test_py_d/ts_ethdev.py b/test/test_py_d/ts_ethdev.py index c5c1a569..4eeca45b 100755 --- a/test/test_py_d/ts_ethdev.py +++ b/test/test_py_d/ts_ethdev.py @@ -841,8 +841,8 @@ class TestSuiteEthdev(TestSuiteBase,TestSuiteShared): usr_mmaddrs = [f'{sid}:E:{i}' for i in (11,21)] usr_addrs = [tool_cmd(cmdname='gen_addr',proto=self.proto).gen_addr(addr,dfl_words_file) for addr in usr_mmaddrs] - from mmgen.altcoins.eth.contract import TokenResolve - from mmgen.altcoins.eth.tx import EthereumMMGenTX as etx + from mmgen.base_proto.ethereum.contract import TokenResolve + from mmgen.base_proto.ethereum.tx import EthereumMMGenTX as etx async def do_transfer(rpc): for i in range(2): tk = await TokenResolve(