Example #1
0
 def verify_addr(cls, addr, hex_width, return_dict=False):
     from mmgen.util import is_hex_str_lc
     if is_hex_str_lc(addr) and len(addr) == cls.addr_width:
         return {
             'hex': addr,
             'format': 'ethereum',
             'width': cls.addr_width
         } if return_dict else True
     if g.debug: Msg("Invalid address '{}'".format(addr))
     return False
Example #2
0
	def verify_addr(cls,addr,hex_width,return_dict=False):
		from mmgen.util import is_hex_str_lc
		if is_hex_str_lc(addr) and len(addr) == cls.addr_width:
			return { 'hex': addr, 'format': 'ethereum' } if return_dict else True
		if g.debug: Msg("Invalid address '{}'".format(addr))
		return False