0

If I want to read certain state of a contract while performing my transaction (for instance to make sure no other addresses interacted with that contract within the same block as me), do those actions consume gas? I mean, would that make the transaction more expensive in terms of fees than not reading anything?

1 Answer 1

1

Page 25 you have all gas cost :

https://ethereum.github.io/yellowpaper/paper.pdf

Gcall 700 Paid for a CALL operation

So yes it cost gas for every action a smart contract do, but a call is not very expansive. You can read in data to have condition for example.

1
  • Much appreciated, just what I was looking for!
    – Hiperfly
    Commented Jun 2, 2021 at 9:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.