lessmore92 / php-erc20

The simple way to interact with Ethereum ERC20 token.
MIT License
26 stars 26 forks source link

TX fee (XX ether) exceeds the configured cap (1.00 ether) #16

Open 27078566 opened 2 years ago

27078566 commented 2 years ago

Ask for help on how to set parameters. Use the default gaslimits (50000) and real-time gas (76044395808) to prompt me TX fee (XX ether) exceeds the configured cap (1.00 ether)

lessmore92 commented 2 years ago

Hi, Please describe more about your problem.

Have a look at https://ethereum.org/en/developers/docs/gas/ to know how to find the right value for Gas Price and Gas Limit.

27078566 commented 2 years ago

$approve_tx = $token->approve($owner_address, $myapp_address, 1000,50000,76044395808); $approve_tx_id = $approve_tx->sign($owner_private)->send(); ERROR TX fee (XX ether) exceeds the configured cap (1.00 ether)

27078566 commented 2 years ago

I calculated that only 0.0038022197904eth is needed. After using sendrawtransaction, it reminds me that I have exceeded 1eth. Brother, please tell me what's wrong with the code. I've doubted my life-.-

lessmore92 commented 2 years ago

Please test again and try the default value for gas price and gas limit $token->approve($owner_address, $myapp_address, 1000);

27078566 commented 2 years ago

I tried the same, suggesting that I made the same mistake and was desperate

zhousan2021 commented 1 year ago

insufficient funds for gas * price + value

lucaslee129 commented 8 months ago

I have same problem. And I'd like to know the reason. It works well before 20min, but for now it is working like that. What is the reason and how to solve that?