def new_filter( self, contract_address: Address, topics: List[str] = None, from_block: BlockSpecification = 0, to_block: BlockSpecification = 'latest', ) -> Filter: """ Create a filter in the ethereum node. """ return StatelessFilter( self.web3, { 'fromBlock': from_block, 'toBlock': to_block, 'address': to_checksum_address(contract_address), 'topics': topics, }, )
def new_filter( self, contract_address: Address, topics: List[str] = None, from_block: BlockSpecification = 0, to_block: BlockSpecification = "latest", ) -> StatelessFilter: """ Create a filter in the ethereum node. """ logs_blocks_sanity_check(from_block, to_block) return StatelessFilter( self.web3, { "fromBlock": from_block, "toBlock": to_block, "address": to_checksum_address(contract_address), "topics": topics, }, )