eth-monitor

Monitor and cache ethereum transactions with match filters
git clone git://git.defalsify.org/eth-monitor.git
Info | Log | Files | Refs | README | LICENSE

chain.py (849B)


      1 # external imports
      2 from chainlib.interface import ChainInterface
      3 from chainlib.eth.block import (
      4         block_latest,
      5         block_by_number,
      6         Block,
      7         )
      8 from chainlib.eth.tx import (
      9         receipt,
     10         Tx,
     11         transaction,
     12         )
     13 
     14 class EthChainInterface(ChainInterface):
     15 
     16     def __init__(self, dialect_filter=None, batch_limit=1):
     17         super(EthChainInterface, self).__init__(dialect_filter=dialect_filter, batch_limit=batch_limit)
     18         self.batch_limit = batch_limit
     19         self._block_latest = block_latest
     20         self._block_by_number = block_by_number
     21         self._block_from_src = Block.from_src
     22         self._tx_from_src = Tx.from_src
     23         self._tx_receipt = receipt
     24         self._src_normalize = Tx.src_normalize
     25         self._dialect_filter = dialect_filter
     26         self._tx_by_hash = transaction