Browse Source

altcoins.eth -> base_proto.ethereum

The MMGen Project 3 years ago
parent
commit
c07595781c

+ 0 - 0
mmgen/altcoins/__init__.py → mmgen/base_proto/__init__.py


+ 0 - 0
mmgen/altcoins/eth/__init__.py → mmgen/base_proto/ethereum/__init__.py


+ 1 - 1
mmgen/altcoins/eth/contract.py → mmgen/base_proto/ethereum/contract.py

@@ -17,7 +17,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 """
-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

+ 0 - 0
mmgen/altcoins/eth/pyethereum/LICENSE → mmgen/base_proto/ethereum/pyethereum/LICENSE


+ 0 - 0
mmgen/altcoins/eth/pyethereum/__init__.py → mmgen/base_proto/ethereum/pyethereum/__init__.py


+ 0 - 0
mmgen/altcoins/eth/pyethereum/transactions.py → mmgen/base_proto/ethereum/pyethereum/transactions.py


+ 0 - 0
mmgen/altcoins/eth/pyethereum/utils.py → mmgen/base_proto/ethereum/pyethereum/utils.py


+ 0 - 0
mmgen/altcoins/eth/rlp/LICENSE → mmgen/base_proto/ethereum/rlp/LICENSE


+ 0 - 0
mmgen/altcoins/eth/rlp/__init__.py → mmgen/base_proto/ethereum/rlp/__init__.py


+ 0 - 0
mmgen/altcoins/eth/rlp/atomic.py → mmgen/base_proto/ethereum/rlp/atomic.py


+ 0 - 0
mmgen/altcoins/eth/rlp/codec.py → mmgen/base_proto/ethereum/rlp/codec.py


+ 0 - 0
mmgen/altcoins/eth/rlp/exceptions.py → mmgen/base_proto/ethereum/rlp/exceptions.py


+ 0 - 0
mmgen/altcoins/eth/rlp/sedes/__init__.py → mmgen/base_proto/ethereum/rlp/sedes/__init__.py


+ 0 - 0
mmgen/altcoins/eth/rlp/sedes/big_endian_int.py → mmgen/base_proto/ethereum/rlp/sedes/big_endian_int.py


+ 0 - 0
mmgen/altcoins/eth/rlp/sedes/binary.py → mmgen/base_proto/ethereum/rlp/sedes/binary.py


+ 0 - 0
mmgen/altcoins/eth/rlp/sedes/boolean.py → mmgen/base_proto/ethereum/rlp/sedes/boolean.py


+ 0 - 0
mmgen/altcoins/eth/rlp/sedes/lists.py → mmgen/base_proto/ethereum/rlp/sedes/lists.py


+ 0 - 0
mmgen/altcoins/eth/rlp/sedes/raw.py → mmgen/base_proto/ethereum/rlp/sedes/raw.py


+ 0 - 0
mmgen/altcoins/eth/rlp/sedes/serializable.py → mmgen/base_proto/ethereum/rlp/sedes/serializable.py


+ 0 - 0
mmgen/altcoins/eth/rlp/sedes/text.py → mmgen/base_proto/ethereum/rlp/sedes/text.py


+ 1 - 1
mmgen/altcoins/eth/tw.py → mmgen/base_proto/ethereum/tw.py

@@ -17,7 +17,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 """
-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

+ 1 - 1
mmgen/altcoins/eth/twaddrs.py → mmgen/base_proto/ethereum/twaddrs.py

@@ -17,7 +17,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 """
-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

+ 1 - 1
mmgen/altcoins/eth/twbal.py → mmgen/base_proto/ethereum/twbal.py

@@ -17,7 +17,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 """
-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

+ 1 - 1
mmgen/altcoins/eth/twctl.py → mmgen/base_proto/ethereum/twctl.py

@@ -17,7 +17,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 """
-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

+ 1 - 1
mmgen/altcoins/eth/twuo.py → mmgen/base_proto/ethereum/twuo.py

@@ -17,7 +17,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 """
-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

+ 1 - 1
mmgen/altcoins/eth/tx.py → mmgen/base_proto/ethereum/tx.py

@@ -17,7 +17,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 """
-altcoins.eth.tx: Ethereum transaction classes for the MMGen suite
+altcoins.base_proto.ethereum.tx: Ethereum transaction classes
 """
 
 import json

+ 2 - 2
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

+ 5 - 5
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

+ 5 - 5
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

+ 2 - 2
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(