diff --git a/ape_hardhat/provider.py b/ape_hardhat/provider.py index 0749550..1ab0b94 100644 --- a/ape_hardhat/provider.py +++ b/ape_hardhat/provider.py @@ -417,50 +417,7 @@ def send_transaction(self, txn: TransactionAPI) -> ReceiptAPI: receipt.raise_for_status() else: - try: - txn_hash = self.web3.eth.send_raw_transaction(txn.serialize_transaction()) - except ValueError as err: - vm_err = self.get_virtual_machine_error(err, txn=txn) - - if "nonce too low" in str(vm_err): - # Add additional nonce information - new_err_msg = f"Nonce '{txn.nonce}' is too low" - raise VirtualMachineError( - new_err_msg, base_err=vm_err.base_err, code=vm_err.code - ) - - vm_err.txn = txn - raise vm_err from err - - receipt = self.get_receipt( - txn_hash.hex(), - required_confirmations=( - txn.required_confirmations - if txn.required_confirmations is not None - else self.network.required_confirmations - ), - ) - - if receipt.failed: - txn_dict = receipt.transaction.dict() - if isinstance(txn_dict.get("type"), int): - txn_dict["type"] = HexBytes(txn_dict["type"]).hex() - - txn_params = cast(TxParams, txn_dict) - - # Replay txn to get revert reason - try: - self.web3.eth.call(txn_params) - except Exception as err: - vm_err = self.get_virtual_machine_error(err, txn=txn) - vm_err.txn = txn - raise vm_err from err - - logger.info( - f"Confirmed {receipt.txn_hash} (total fees paid = {receipt.total_fees_paid})" - ) - self.chain_manager.history.append(receipt) - return receipt + receipt = super().send_transaction(txn) return receipt diff --git a/setup.py b/setup.py index c7b2f48..1f4cceb 100644 --- a/setup.py +++ b/setup.py @@ -75,7 +75,7 @@ url="https://github.com/ApeWorX/ape-hardhat", include_package_data=True, install_requires=[ - "eth-ape>=0.6.0,<0.7", + "eth-ape>=0.6.1,<0.7", "evm-trace", # Use same version as eth-ape "hexbytes", # Use same version as eth-ape "web3", # Use same version as eth-ape