Constraint
Constraint helpers and builder types.
Functions
arg
Target a calldata argument by path. Each argument is a big-endian uint16 step; multiple steps navigate into nested types.
function arg(p0: number, ...rest: number[]): ConstraintBuilder;Parameters
| Name | Type | Description |
|---|---|---|
p0 | number | - |
rest | number[] | - |
Returns
ConstraintBuilder
msgSender
Target the msg.sender context property.
function msgSender(): ConstraintBuilder<`0x${string}`>;Returns
ConstraintBuilder<`0x${string}`>
msgValue
Target the msg.value context property.
function msgValue(): ConstraintBuilder<bigint>;Returns
ConstraintBuilder<bigint>
blockTimestamp
Target the block.timestamp context property.
function blockTimestamp(): ConstraintBuilder<bigint>;Returns
ConstraintBuilder<bigint>
blockNumber
Target the block.number context property.
function blockNumber(): ConstraintBuilder<bigint>;Returns
ConstraintBuilder<bigint>
chainId
Target the block.chainid context property.
function chainId(): ConstraintBuilder<bigint>;Returns
ConstraintBuilder<bigint>
txOrigin
Target the tx.origin context property.
function txOrigin(): ConstraintBuilder<`0x${string}`>;Returns
ConstraintBuilder<`0x${string}`>
baseFee
Target the block.basefee context property.
function baseFee(): ConstraintBuilder<bigint>;Returns
ConstraintBuilder<bigint>
gasPrice
Target the tx.gasprice context property.
function gasPrice(): ConstraintBuilder<bigint>;Returns
ConstraintBuilder<bigint>
Types
ConstraintBuilder
Mutable builder that accumulates operators targeting a single path.
Implements the Constraint interface so it can be passed directly to policy builders.
ScalarValue
Accepted scalar value types for operator arguments.