ወደ ዋና ይዘት ዝለል
iCute Financeዲጂታል ንብረቶች · የገበያ ምልከታ
አማርኛ
የምርምር ማውጫ
iCute Finance

ዋና አሰሳ

ዋና አሰሳ

ዲጂታል ንብረቶች · የገበያ ምልከታ

Why do these two Ethereum transactions have different gas usages? Can't explain it from the GETH EVM debug traces

One of the reason for the gas cost not being the same would be that one account did not have any usdc before the transaction and the other already had some. It cost more gas to set a 0 value to non zero than non zero to non zero. For instance. The new account does not have his address written in the usdc balance mapping. So the contract would have to record the address and set the balance. The other account already have his address written and we just updated the balance. See; Why does zero to non-zero in storage take higher gas?

ምንጭ ተመልከት CC BY-SA 4.0