Fix missing conflict resolution in eth-encode, non-0x address fallthrough in eth-info
This commit is contained in:
parent
b51e5dc408
commit
31e75f60de
@ -16,10 +16,12 @@ class CLIEncoder(ABIContractEncoder):
|
||||
__re_uint = r'^([uU])[int]*([0-9]+)?$'
|
||||
__re_bytes = r'^([bB])[ytes]*([0-9]+)?$'
|
||||
__re_string = r'^([sS])[tring]*$'
|
||||
__re_address = r'^([aA])[ddress]*?$'
|
||||
__translations = [
|
||||
'to_uint',
|
||||
'to_bytes',
|
||||
'to_string',
|
||||
'to_address',
|
||||
]
|
||||
|
||||
def __init__(self, signature=None):
|
||||
@ -58,6 +60,18 @@ class CLIEncoder(ABIContractEncoder):
|
||||
return (s, a)
|
||||
|
||||
|
||||
def to_address(self, typ):
|
||||
s = None
|
||||
a = None
|
||||
m = re.match(self.__re_address, typ)
|
||||
if m == None:
|
||||
return None
|
||||
|
||||
s = 'ADDRESS'
|
||||
a = getattr(ABIContractType, s)
|
||||
return (s, a)
|
||||
|
||||
|
||||
def to_string(self, typ):
|
||||
m = re.match(self.__re_string, typ)
|
||||
if m == None:
|
||||
|
@ -13,7 +13,7 @@ import sha3
|
||||
# external imports
|
||||
import chainlib.eth.cli
|
||||
from chainlib.eth.cli.encode import CLIEncoder
|
||||
from funga.eth.signer import ReferenceSigner as EIP155Signer
|
||||
from funga.eth.signer import EIP155Signer
|
||||
from funga.eth.keystore.dict import DictKeystore
|
||||
from hexathon import (
|
||||
add_0x,
|
||||
@ -45,10 +45,7 @@ from chainlib.error import SignerMissingException
|
||||
from chainlib.chain import ChainSpec
|
||||
from chainlib.eth.runnable.util import decode_for_puny_humans
|
||||
from chainlib.eth.jsonrpc import to_blockheight_param
|
||||
<<<<<<< HEAD
|
||||
from chainlib.eth.address import to_checksum_address
|
||||
=======
|
||||
>>>>>>> d6b258f2140f5ce555f765a90c14a65a5f3fc6de
|
||||
|
||||
logging.basicConfig(level=logging.WARNING)
|
||||
logg = logging.getLogger()
|
||||
|
@ -51,7 +51,11 @@ args = argparser.parse_args()
|
||||
|
||||
config = chainlib.eth.cli.Config.from_args(args, arg_flags, extra_args={'long': None}, default_config_dir=config_dir)
|
||||
|
||||
holder_address = args.address
|
||||
holder_address = None
|
||||
try:
|
||||
holder_address = add_0x(args.address)
|
||||
except ValueError:
|
||||
pass
|
||||
wallet = chainlib.eth.cli.Wallet()
|
||||
wallet.from_config(config)
|
||||
if wallet.get_signer_address() == None and holder_address != None:
|
||||
|
Loading…
Reference in New Issue
Block a user