Là Con Gái Phải Xinh
  • Đăng Nhập
No Result
View All Result
  • Trang chủ
  • Mỹ Phẩm
  • Nước hoa
  • Nước hoa hồng
  • Phụ kiện làm đẹp
Là Con Gái Phải Xinh
No Result
View All Result
Home CRYPTOCURRENCY

Metamask: Execution reverted – transaction mined but execution failed

by Thủy Tiên Anna
13 Tháng Hai, 2025
in CRYPTOCURRENCY
Share on FacebookShare on Twitter

Metamask Execution Rerouted: Transaction Mined, But Execution Failed

As a MetaMask user with an active wallet, you’re likely no stranger to the frustrations of interacting with decentralized applications (dApps). Recently, I experienced a similar issue on the Sepolia test net, where my deployed contract execution was reverted due to a misconfigured metamask transaction. In this article, I’ll walk you through what happened and provide a possible solution.

The Failed Transaction

Let’s assume that your contract deployment and verification on Sepolia were successful using Remix. You’ve also verified the contract on another test network or mainnet, but unfortunately, the execution of the contract was reverted due to an error in the metamask transaction.

Here are the steps involved:

  • Deployed a new contract on Sepolia: pragma Solidity version 0.8.10; import " contract MyContract is ERC20 { mapping ( address => uint256 ) public balances ; }

  • Verify the contract on Sepolia: pragma solidity ^0.6.0 < 0.8.10; import " import " contract MyContractWrapper is SafeERC20 { constructor() public { address _owner = msg.sender; } function transfer(recipient address, uint256 amount) public { require(msg.value >= amount, "Transfer amount must be non-zero"); super.transfer(container, amount); } } }

  • Used MetaMask on Sepolia:pragma solidity ^0.6.0 < 0.8.10; import " contract MyContractWrapper is SafeERC20 { event Transfer(address indexed recipient, uint256 indexed amount); }

  • Executed the contract using MetaMask:pragma solidity ^0.6.0 < 0.8.10; import " import " contract MyContractWrapper is SafeERC20 { function () public payable { balances[msg.sender] += 10; } }

The Rerouted Transaction

Metamask: Execution reverted - transaction mined but execution failed

After executing the contract, a new transaction was mined to reverse the execution of thetransferfunction. However, the metamask execution failed due to an error in theMyContractWrappercontract.

Here's what happened:

  • The contract executed thetransferfunction without any issues.

  • A new transaction was mined using MetaMask, which attempted to transfer 10 units from the wallet address that owns the contract.

  • However, the metamask execution failed due to an error in theMyContractWrappercontract, specifically because it tried to send the transaction with a different gas limit than the one set in the contract.

Possible Solution

To prevent similar issues in the future, you can try the following:

  • Check your metamask settings: Make sure that MetaMask is set to use the correct gas limit for transactions.

  • Verify the contract's deployment and verification again: Double-check that the contract was deployed and verified correctly on Sepolia using Remix.

  • Use a different test network or mainnet: Try executing the contract on a different test network or mainnet to see if the issue is specific to one of them.

By following these steps, you should be able to resolve the issue with your metamask execution reverted due to an error in theMyContractWrapper` contract. If you’re still experiencing issues, feel free to provide more details, and I’ll do my best to help!

ETHEREUM BALANCE

Thủy Tiên Anna

Thủy Tiên Anna

Liên quan Posts

CRYPTOCURRENCY

The Importance Of Community Engagement In The Success Of Avalanche (AVAX)

4 Tháng Ba, 2025

Strength of Community Involvement: Unlocking the Full Potential of Avalanche (Avax) In The Rapidly Developing World of Cryptocurrencies, A Successful...

CRYPTOCURRENCY

The Impact Of Hyperliquid (HYPE) On Market Dynamics And Trading Strategies

4 Tháng Ba, 2025

The Rise of Hyperliquid (HEPE): Understanding the Impact of Market Dynamics and Trading Strategies We resent there, a new player...

CRYPTOCURRENCY

How Governance Tokens Impact The Value Of Avalanche (AVAX)

4 Tháng Ba, 2025

The Rise of Governance Tokens and their Impact on Avalanche (AVAX) As the world becomes increasingly digital, cryptocurrencies have gained...

CRYPTOCURRENCY

What To Know About Digital Wallets Before You Start Trading

4 Tháng Ba, 2025

negot to Knw to kowal Walletal Walles Bephtal Yu Stating Cryptocurration * The World of Cryptody has Has Exploded in...

CRYPTOCURRENCY

Market Dynamics And Their Influence On Ethereum Classic (ETC)

4 Tháng Ba, 2025

Cryptocurrency Market Dynamics: Understanding Their Impact on Ethereum Classic (ETC) The world of cryptocurrency has been rapidly evolving in recent...

CRYPTOCURRENCY

The Role Of Smart Contracts In Enhancing Security For Stellar (XLM)

4 Tháng Ba, 2025

Here's a topic summary: Smart Contracts and Star (XLM) Smart contracts are self-exhibited contracts with conditions of agreement written directly...

Next Post

Wallet address, Custodial Services, Ethereum Virtual Machine

Solana: Anchor test error "InstructionDidNotDeserialize"

How to Securely Withdraw Cryptocurrency Using Monero and Zcash

Trả lời Hủy

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *

Là Con Gái Phải Xinh

Cùng Con Gái Phải Xinh làm đẹp và chia sẽ phương pháp làm đẹp của riêng mình các chị em nhé!

© 2019 Con Gai Phai Xinh

No Result
View All Result
  • Trang chủ
  • Mỹ Phẩm
  • Nước hoa
  • Nước hoa hồng
  • Phụ kiện làm đẹp

© 2019 Con Gai Phai Xinh

Welcome Back!

Login to your account below

Forgotten Password?

Create New Account!

Fill the forms below to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Go to mobile version