In my transaction: gasPrice: 210000
blockHash: "0x69bd71736f2a5d2c83919a0de81a7de0b6b690bb6bdda3acff254d5c68f634bc",
blockNumber: 3178,
from: "0xc8caa71c16299b40b8579742a27ee53162886040",
gas: 2100000000,
gasPrice: 210000,
And the receipt: gasUsed: 72769
blockHash: "0x69bd71736f2a5d2c83919a0de81a7de0b6b690bb6bdda3acff254d5c68f634bc",
blockNumber: 3178,
contractAddress: null,
cumulativeGasUsed: 72769,
from: "0xc8caa71c16299b40b8579742a27ee53162886040",
gasUsed: 72769,
Is that means my total gas consumed = 72769 x 210000 = 15281490000 or 15GWei?
Can I safely assume gasUsed will remains the same if the execution condition (i.e. input parameters) remain the same? Even when I move my code from test node to the main ETH?
72769but on subsequent calls this may vary. – Prashant Prabhakar Singh Jul 09 '18 at 09:39gasUsedrefers to an entirely different parameter thangasPrice. WhilegasPriceis the price in wei you will pay to the miner for each unit of gas consumed,gasUsedindicates how many gas units were actually consumed by the transaction. You are probably mistakinggasPriceforgasLimit, which indicates the highest allowable gas consumed on your transaction. – Alex Papageorgiou Jul 09 '18 at 12:25