Gas - Reading
-
The total gas cost for a transaction is calculated by first determining the price of gas.Then calculate the maximum amount of gas you want to spend on performing the transaction PLUS the amount to execute any fall-back option if it is sent to the smart contract.This will give you the total gas. Multiply the total gas by the cost price of gas , the result will give you the total gas cost.
-
Gas Limit is the maximum amount we are willing to spend on a transaction.
-
If we specify a gas limit that is too low, a transaction will start to be executed but will not be completed and will stop the transaction. You will not get ether spent but the incomplete of the transaction will not be reflected as a transfer on the blockchain. As a result, your main wallet amount will still remain the same ie no deduction in your wallet.
-
If we specify a gas limit that is too high and therefore not consumed fully, the miner of the block will not process your transaction as the miner has a maximum limit that is allowed for its blocks. The miner is only paid for the amount of actual gas that is consumed by a transaction in a block. So, putting up a high value of the gas limit only fills up his block gas limit. This will not be computational dense enough for the miner to want it.
-
GWEI is the unit use for gas price - one amount of gwei is 1000000000 wei