smart contract containing Payable function is not working when deployed using new version of metamask. can anyone please resolve this issue?

  • You will need to provide more information, such as the relevant code, and sample transaction call. Aug 13, 2018 at 12:54
  • solidity code: pragma solidity ^0.4.21; contract test1{ mapping(address=>uint) public balances; function ()public payable{ balances[msg.sender]+=msg.value; } } and this is deployed in ropsten Test Network contract address is 0x737843b00794aebe122420a6e2f8b99586ce8806 try sending test ethers to this contract and transaction fails always Aug 13, 2018 at 13:04
  • and same contract's fallback function works when deployed using old version of metamask and sending ethers using old version of metamask to this contract Aug 13, 2018 at 13:09
  • @HarshaSunny Please, edit your own question and add the code, so it more easy to read.
    – Ismael
    Aug 13, 2018 at 15:41

1 Answer 1


I just sent some ether to your contract and it fails. The issue seems to be that metamask is making a wrong estimation of the required gas. It asks for a gas limit of about 39500 gas, but looking at your contract the limit should be at least 41000 gas.

I set a gas limit of 100000 gas and it works, consuming 41325 gas.

here is the successful transaction: https://ropsten.etherscan.io/tx/0x631762aed20ac432fe82d4fc8521c0c7af370a3d34f64f3dd778017854bc37d6

Hope this helps.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.