EDIT: if you’re a scammer, skip this one and don’t waste your time
-
I have a wallet with 1 MATIC.
-
There is a contract which has a solidity payable method which requires 10 MATIC in value to run.
I use Truffle to interact with the contract. Before broadcasting the transaction I’m calling eth_estimateGas
to estimate the gas. But I receive the following error:
Error: Internal JSON-RPC error.
{
"code": -32000,
"message": "err: insufficient funds for gas * price + value: address 0xbf337198a81A1c0af6A8342c0e220137804b38bb have 1575618996177023627 want 10000000000000000000 (supplied gas 10010499)"
}
I find it peculiar because when I use Ganache network, and the fee from that contract is set to 200,000,000ETH, the gas is being estimated with no errors.
Can I estimate the gas required by a transaction on Polygon Network even if I don’t have the actual amount of funds? How should I approach this?