Predicate Types
The supported operators are
<, <=, =, !=, >, and >=. Predicate values use 0x-prefixed hexadecimal strings.
Evaluation
Base evaluates predicates against the state immediately before the transaction would execute. If any predicate is false, the transaction remains pending. An earlier transaction can change the balance, nonce, or storage value that a pending transaction watches. The pending transaction can then become eligible in the same Flashblock.Balance Example
Balance predicate
Nonce Example
Nonce predicate
nonce predicate compares the account’s protocol nonce with value. It does not read EIP-8130 channel nonces. If the account does not exist or was deleted, Base reads its nonce as 0. The example requires a nonce of at least 5. Use it to wait for an account’s nonce to advance. It does not identify which earlier transaction advanced the nonce, or whether that transaction succeeded.
A nonce mismatch does not expire the transaction, even after the nonce passes a <, <=, or = bound. Base checks the predicate again when the watched nonce changes. The required block_number upper bound limits the transaction’s lifetime, and a flashblock_index upper bound can end it earlier within the last allowed block.
Storage Example
Storage predicate
(storage[address][slot] & mask) with value. Omit mask to compare the full storage word.
Block and Flashblock Position
Useblock_number to target a block and flashblock_index to target a position within that Flashblock. Add separate predicates when both conditions must match. Valid flashblock_index values range from 1 through 10, inclusive; the corresponding hexadecimal values are 0x1 through 0xa.