We all know that gas limit for EOA to EOA transfer is 21000. I am got stuck at a point and unable to get dynamic gas limit estimation for "payable" smart contract using Web3.
When sending Ether from EOA to some external smart contract then facing "out of gas" error, because Web3's function estimateGas()
web3.eth.estimateGas({
to: EOA/Smart Contract address,
value: web3.utils.toHex(ethAmount)
})
always return 21000, regardless of the "to" address whether its EOA or Smart contract.
Could you please help me figure out this issue.
Thanks.