Ethereum Asked on December 26, 2020
I need help on how to charge a transaction fee in ethereum smart contract using web3? Also which web3 API can be used to check the validation of enough gas on the frontend of smart contract?
Do you want to estimate the fee of the transaction?
let gasPrice = new BigNumber(15).times(1000000000);
let gasLimit = new BigNumber(21000);
let estimateFee = new BigNumber(gasPrice.times(gasLimit)).dividedBy(1000000000000000000).toString();
Answered by HelioWallet.com on December 26, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP