Context

Context nodes provide information about the current transaction directly from the blockchain. They have no inputs and no triangle connectors, just a single output circle you can wire wherever you need.

Available Context Nodes

NodeWhat It ProvidesSolidity Equivalent
msgSenderThe wallet address that called the functionmsg.sender
msgValueThe amount of native token sent with the transactionmsg.value
blockTimestampThe current block’s timestampblock.timestamp
blockChainIdThe chain ID of the current networkblock.chainid

Try It Yourself

Task 1 of 1 Use Blockchain Data

Wire a context node into another node to use live blockchain information.

1 Wire the sender
2 Done!
Drag from the output circle on Sender to the Value A circle on Compare.
Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

Common Patterns

  • Access control: compare msgSender to a stored owner address, then use an IF or require node to restrict who can call a function
  • Payment handling: read msgValue to know how much native token the caller sent, then store or forward it
  • Time locks: compare blockTimestamp to a stored deadline, then block actions before or after that point
  • Chain-specific logic: use blockChainId to detect which network the contract is running on, useful for domain separators and multi-chain contracts

What You Learned

  • Context nodes read live blockchain data with no inputs
  • msgSender gives you the caller’s address
  • msgValue tells you how much native token was sent
  • blockTimestamp provides the current block timestamp
  • blockChainId identifies the current blockchain network