Skip to main content
Use StdPrecompiles.sol and B20Constants.sol from base-std as the canonical Solidity source. This page lists the same values for quick reference.

Precompile addresses

These addresses are identical on every network where B20 is active.

Roles

Policy scopes

Policy IDs

Custom policy IDs use this layout:
Simple and composite policies share the same global counter. The counter starts at 2 because 0 and 1 are reserved for ALWAYS_ALLOW and ALWAYS_BLOCK. Policy type bytes: UNION and INTERSECT are composite policy types. A UNION policy authorizes an account if any child policy authorizes it. An INTERSECT policy authorizes an account only if every child policy authorizes it. Each composite references two to four existing simple (ALLOWLIST or BLOCKLIST) policies. Composite policies cannot reference other composites.
A well-formed but never-created INTERSECT policy ID returns true for every account (vacuously authorized). Always call policyExists(policyId) before storing a composite policy ID; an invalid INTERSECT ID behaves like ALWAYS_ALLOW.

Variant bytes

Supply and decimals

Imports