Skip to content

@safe:threshold

Signature threshold of a Safe.

⚗️ Experimental — available at next.evmcrispr.com.

Returns: number

@safe:threshold(safe?)
NameTypeDescription
[safe]addressSafe address (defaults to the context Safe or connected account)
# TODO: add examples

Read getThreshold() at assertion time. A Safe given as an address, or left to the enclosing propose/exec block or the connected account, is fixed when the script is built.

The Safe may also be a ::! call that returns its address, such as @safe:threshold!($registry::!{safe()(address)}): the read is then made against whatever address that call returns when the assertion runs.

load safe
set $safe 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
assert @safe:threshold!($safe) >= 3 "threshold lowered"