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
| Node | What It Provides | Solidity Equivalent |
|---|---|---|
| The wallet address that called the function | msg.sender | |
| The amount of native token sent with the transaction | msg.value | |
| The current block’s timestamp | block.timestamp | |
| The chain ID of the current network | block.chainid |
Try It Yourself
Task 1 of 1 Use Blockchain Data
Wire a context node into another node to use live blockchain information.
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 orrequire 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 addressmsgValue tells you how much native token was sentblockTimestamp provides the current block timestampblockChainId identifies the current blockchain network
How hard was this?
Easy Hard