I would like to estimate the gas fees for a particular transaction on behalf of my users before sending it.
If I know the current going rate for gas on the Chainweb blockchain, and I know how many units of gas a transaction will consume, then I can multiply them together to provide an estimate of how much it will cost to send a particular transaction.
How do I get those two pieces of information?
First, how can I get the current going rate for gas on Chainweb?
Second, is there a rough way to estimate the number of units of gas a transaction will consume? For example, it costs 21,000 units of gas to transfer Ether from one address to another. How do I determine how many units of gas it will take to transfer KDA from one wallet to another? Or how many units of gas it will take to execute N steps of my contract?