1

I want to know something about GAS...can you please explain...

  1. What is the relationship between Gas and Wei / Ether? Can you please give an example of how much the execution of a contract will cost?

  2. What is maximum GAS amount for a contract. I want to mean is there any restriction for the the amount of GAS in a contract?

  3. How much will the execution of a contract cost in real world (just estimation)?

TAMIM HAIDER
  • 325
  • 1
  • 3
  • 12
  • Hi Tamim, these are all good questions but need to be answered separately. Can you break them apart and post them one by one? – Jeff Coleman Jun 15 '17 at 02:53

1 Answers1

2
  1. Gas is paid for by ether and used to compensate the network for verifying your transaction. Wei is a multiple ETH.

  2. The gas spent on a transaction is (gas used * gas price). The maximum gas amount for a transaction is the maximum amount of gas which a transaction is allowed to use. If more gas is required, the transaction will fail.

  3. It depends on the contract. You can check by using web3.

0xcaff
  • 2,477
  • 1
  • 14
  • 29