chainlib-eth

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

__init__.py (679B)


      1 # external imports
      2 
      3 # local imports
      4 from chainlib.eth.error import EthException
      5 from chainlib.dialect import DialectFilter as BaseDialectFilter
      6 
      7 
      8 class DefaultErrorParser:
      9     """Generate eth specific exception for the default json-rpc query error parser.
     10     """
     11     def translate(self, error):
     12         return EthException('default parser codeĀ {}'.format(error))
     13 
     14 
     15 class DialectFilter(BaseDialectFilter):
     16 
     17     def apply_tx(self, src):
     18 #        try:
     19 #            inpt = src['input']
     20 #        except KeyError:
     21 #            try:
     22 #                inpt = src['data']
     23 #                src['input'] = src['data']
     24 #            except KeyError:
     25 #                pass
     26         return src