2

In Ethereum one can get the gas price using web3.eth.gasPrice.

In Tezos, does any RPC provide the gas price, or is there a formula to calculate the gas price?

3

In Tezos, gas does not have a monetary translation. It does not "cost" you anything to execute a contract with 10 gas vs 1M gas. Gas is simply an internal limitation to prevent contracts from running amok.

https://forum.tezosagora.org/t/psa-do-not-quote-gas-cost-in-tez/1618

| improve this answer | |
2

After asking, there is no equivalent of a gas price in Tezos. You pay a transaction fee, and this fee should include everything. Doing some stats on the fees you may get an upper-bound on the gas price.

| improve this answer | |
  • How do you actually find this price through either an API call to a block explorer or an RPC call to a Tezos node? – Thorkil Værge Sep 4 at 7:49
  • tzstats provides an API that will give you statistics on created blocks. They provide for example an average gas price which is just total_paid_fees_in_the_block / total_used_gas_in_the_block. This means that this average gas price depends on what people proposed as fees what bakers accepted. – J.M. Kenny Sep 29 at 7:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.