eth-cache

Ethereum chain data caching tools
Info | Log | Files | Refs | LICENSE

tx.py (569B)


      1 # external imports
      2 from chainlib.eth.tx import (
      3         unpack,
      4         Tx,
      5         )
      6 from hexathon import strip_0x
      7 
      8 
      9 def apply(c, context, result, chain_spec, signed_tx, conn=None, block=None):
     10     signed_tx_bytes = bytes.fromhex(strip_0x(signed_tx))
     11     tx_src = unpack(signed_tx_bytes, chain_spec)
     12     tx = Tx(tx_src)
     13     if conn != None:
     14         raise NotImplementedError('retrieval of receipt from RPC connection not yet implemented')       
     15     if block != None:
     16         raise NotImplementedError('application of block for tx not yet implemented')
     17     return tx