MultiversX Tracker is Live!

What is the correct way to send a web3 token transaction on eth now?

Etherum Reddit

More / Etherum Reddit 165 Views

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 
submitted by /u/MegaManSE
[link] [comments]
Get BONUS $200 for FREE!

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