Web3 estimate gas example. You'll need to multiply that by fee per gas to get eth.