Just tried to send a usdc transfer transaction on Eth and it resulted in a $17 gas fee (at a price of 324 gwei) :(
gas related stuff in the rawTransaction:
const gasPrice = parseInt(await web3.eth.getGasPrice()); let gasLimit = latestBlock && latestBlock.transactions.length ? Math.ceil(latestBlock.gasLimit / latestBlock.transactions.length) : 0; const gasestimate = await web3.eth.estimateGas({ from: fromAddress, to: tokenConfig.contractAddress, value: weiBN !== null ? Web3.utils.toHex(weiBN) : "0x0", data: Web3.utils.toHex(abi), nonce: nonce }); gas: Web3.utils.toHex(Web3.utils.toBN(gasestimate)), // amount of gas to process the transaction gasPrice: Web3.utils.toHex(Web3.utils.toBN(gasPrice)), gasLimit: Web3.utils.toHex(Web3.utils.toBN(gasLimit)), // upper limit to pay in gas
[link] [comments]
You can get bonuses upto $100 FREE BONUS when you:
π° Install these recommended apps:
π² SocialGood - 100% Crypto Back on Everyday Shopping
π² xPortal - The DeFi For The Next Billion
π² CryptoTab Browser - Lightweight, fast, and ready to mine!
π° Register on these recommended exchanges:
π‘ Binanceπ‘ Bitfinexπ‘ Bitmartπ‘ Bittrexπ‘ Bitget
π‘ CoinExπ‘ Crypto.comπ‘ Gate.ioπ‘ Huobiπ‘ Kucoin.
Comments