4
0
mirror of git://holbrook.no/eth-monitor.git synced 2024-12-22 07:07:32 +01:00
eth-monitor/eth_monitor/chain.py
2023-08-06 14:10:59 +01:00

23 lines
645 B
Python

# external imports
from chainlib.interface import ChainInterface
from chainlib.eth.block import (
block_latest,
block_by_number,
Block,
)
from chainlib.eth.tx import (
receipt,
Tx,
)
class EthChainInterface(ChainInterface):
def __init__(self, dialect_filter=None, batch_limit=1):
self.batch_limit = batch_limit
self._block_latest = block_latest
self._block_by_number = block_by_number
self._block_from_src = Block.from_src
self._tx_receipt = receipt
self._src_normalize = Tx.src_normalize
self._dialect_filter = dialect_filter