payable function not working

by Nik Loladze   Last Updated August 01, 2020 08:28 AM

function() payable external {
    eth_balance[msg.sender] += msg.value;  
}

This is not working. The execution is reverted and uses about 21,000 gas. No matter if I set the gas crazy high like 800,000 it still fails. This is on rinkeby network. Any ideas? I'm using Remix IDE.

Tags : payable


Answers 1


It turns out the contract is fine. The gas during certain times, no matter how high it's set will not allow the transaction to go through. I believe a lot of it has ethereum congestion. If you run into similar situations I would set the contract gas to something like 800,000 gas on the test network and try a different time of day.

Nik Loladze
Nik Loladze
October 26, 2019 02:30 AM

Related Questions


Make function payable for a specific ERC20 token?

Updated August 23, 2018 16:28 PM



I NEED HELP ..!! Sth Wrong with erc20 source

Updated May 04, 2018 06:28 AM