Constants
MIN_FLOW_SENTINELS
The number of sentinels required by FlowCommon
. An evaluable can never
have fewer minimum outputs than required sentinels.
uint256 constant MIN_FLOW_SENTINELS = 3;
SENTINEL_HIGH_BITS
Sets the high bits of all flow sentinels to guarantee that the numeric value of the sentinel will never collide with a token amount or address. This guarantee holds as long as the token supply is less than 2^252, and the that token IDs have no specific reason to collide with the sentinel. i.e. There won't be random collisions because the space of token IDs is too large.
bytes32 constant SENTINEL_HIGH_BITS = bytes32(0xF000000000000000000000000000000000000000000000000000000000000000);
RAIN_FLOW_SENTINEL
*We want a sentinel with the following properties:
- Won't collide with token amounts (| with very large number)
- Won't collide with token addresses
- Won't collide with common values like
type(uint256).max
andtype(uint256).min
- Won't collide with other sentinels from unrelated contexts*
Sentinel constant RAIN_FLOW_SENTINEL =
Sentinel.wrap(uint256(keccak256(bytes("RAIN_FLOW_SENTINEL")) | SENTINEL_HIGH_BITS));