def getTransactionByBlock(self, block_identifier, transaction_index): """ `platon_getTransactionByBlockHashAndIndex` `platon_getTransactionByBlockNumberAndIndex` """ method = select_method_for_block_identifier( block_identifier, if_predefined='platon_getTransactionByBlockNumberAndIndex', if_hash='platon_getTransactionByBlockHashAndIndex', if_number='platon_getTransactionByBlockNumberAndIndex', ) return self.web3.manager.request_blocking( method, [block_identifier, transaction_index], )
def getBlockTransactionCount(self, block_identifier): """ `platon_getBlockTransactionCountByHash` `platon_getBlockTransactionCountByNumber` """ method = select_method_for_block_identifier( block_identifier, if_predefined='platon_getBlockTransactionCountByNumber', if_hash='platon_getBlockTransactionCountByHash', if_number='platon_getBlockTransactionCountByNumber', ) return self.web3.manager.request_blocking( method, [block_identifier], )