Skip to content

How are intrinsic gas and up-front cost related? #19

Answered by siladu
siladu asked this question in Q&A
Discussion options

You must be logged in to vote

Answer from @ajsutton:

Intrinsic gas is the minimum cost of the transaction (might be exact cost if it's a transfer).
For contract execution you always pay more since op codes are paid for on top of intrinsic.

Intrinsic gas is the minimum amount the tx bound to use and is a combination of a flat rate (depending on the kind of tx) and the size of the tx's payload.

$G_{\mathrm{transaction}}$ = 21,000 gas, a base cost for every tx
$G_{\mathrm{txcreate}}$ = 32,000 gas, an extra cost for contract creation
$G_{\mathrm{txdatazero}}$ = 4 gas, paid for every zero byte contained in the tx payload (literally, count the number of zeros in the payload)
$G_{\mathrm{txdatanonzero}}$ = 16 gas, paid for e…

Replies: 1 comment

Comment options

siladu
Jul 17, 2022
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by siladu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment