1

Where are contract globals like msg.sender and block.number stored?

It is in memory or storage?

2
  • 1
    I can't really tell what you're asking. Could you clarify your question?
    – natewelch_
    Commented Mar 3, 2018 at 0:36
  • I mean information like the "msg.sender" or "block.number" these are environment variables, we have access to these variables but where they are stored? Commented Mar 3, 2018 at 13:01

1 Answer 1

2

These aren't stored in memory or the storage. There exists special opcodes in the EVM (machine level instructions) that push the equivalent values to the stack. See page 29 of the of the whitepaper to see all of these environment information opcodes.

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.