Metamask execution changed: the transaction has obtained but the execution failed
As a Metamk user with an active purse is probably not stranger to frustration when interacting with decentralized applications (DAPP). Recently, I have been experiencing a similar issue in the Sepolian test network, where my contract was restored due to incorrectly configured metam. In this article, I will look at you and give you a possible solution.
Failed deal
Let’s say your contract placement and the separation test were successful using remix. You have also checked the contract on another test network or Mainnet, but unfortunately the contract was restored due to a mistake in the Metamask transaction.
Here are the actions involved:
1st place a new contract for Sepolia: “Pragma Solidity version 0.8.10; Import” Sol “; Address => uint256) Social residues;
2 tested for Sepolia: “Pragma Solidity ^0.6.0 <0.8,10; Import" SOL; Import " function Transfer (Summer, UNT256) PUBLIC {MSG.Value> = Amount “Transfer to Super.Transfer);
3rd Metamak in Sepolia: “Pragma Solidity ^0.6.0 <0.8,10; Import" SOL; MyContractwrapp is a Safeerc20 {Completion of events (addressed recipient, Uint256 indexed amount);
- Fulfilled the contract using Metamass: “Pragma Solidity ^0.6.0 <0.8.10; Import" Import " = 10;
Transformed Deal
After the contract is executed, a new transaction was obtained to restore the Transfer function. However, the execution of Metamask failed due to the mistake of Mycontractwrapper.
Here’s what happened:
- The contract performed the “Transfer” function without any questions.
- The new deal was obtained through Metamk, which tried to transfer 10 units from the wallet address owned by the contract.
- However, Metamask failed due to error due to the MyContractwraper agreement, especially since it tried to send a transaction with a different gas restriction than what was set out in the contract.
Possible solution
You can try the following questions to prevent similar problems in the future:
- Check Metamask Settings: Make sure Metamk is set to use the right gas limit for transactions.
- Check the contract placement and check: double check that the contract was placed and properly tested in Sepolia using remix.
- Use another test network or mainnet: Try to execute a contract in another test network or mainnet to see if this problem is characteristic of one of them.
When performing these steps, you should be able to solve the problem with your Metamask execution, which was restored thanks to the error in the MyContractwrapper contract. If you still have problems, feel free to provide details and I will do my best to help!
Leave a Reply