Available on crate feature
base only.Expand description
Mirror of base_common_precompiles::IPolicyRegistry, the canonical Cobalt surface.
Only this surface is mirrored: its call set is a strict superset of Beryl’s V1, so it also
names Beryl-era policy traces. policy_registry_covers_v1_selectors pins that.
interface IPolicyRegistry {
enum PolicyType { BLOCKLIST, ALLOWLIST, UNION, INTERSECT }
error NonPayable();
error Unauthorized();
error PolicyNotFound();
error IncompatiblePolicyType();
error ZeroAddress();
error BatchSizeTooLarge(uint256 maxBatchSize);
error NoPendingAdmin();
error ChildPoliciesOutsideOfRange();
error InvalidChildPolicy(uint64 childPolicyId);
event PolicyCreated(uint64 indexed policyId, address indexed creator, PolicyType policyType);
event PolicyAdminStaged(uint64 indexed policyId, address indexed currentAdmin, address indexed pendingAdmin);
event PolicyAdminUpdated(uint64 indexed policyId, address indexed previousAdmin, address indexed newAdmin);
event AllowlistUpdated(uint64 indexed policyId, address indexed updater, bool allowed, address[] accounts);
event BlocklistUpdated(uint64 indexed policyId, address indexed updater, bool blocked, address[] accounts);
event CompositePolicyUpdated(uint64 indexed policyId, address indexed updater, uint64[] childPolicyIds);
function createPolicy(address admin, PolicyType policyType) external returns (uint64);
function createPolicyWithAccounts(address admin, PolicyType policyType, address[] calldata accounts) external returns (uint64);
function createCompositePolicy(address admin, PolicyType policyType, uint64[] calldata childPolicyIds) external returns (uint64);
function updateComposite(uint64 policyId, uint64[] calldata childPolicyIds) external;
function stageUpdateAdmin(uint64 policyId, address newAdmin) external;
function finalizeUpdateAdmin(uint64 policyId) external;
function renounceAdmin(uint64 policyId) external;
function updateAllowlist(uint64 policyId, bool allowed, address[] calldata accounts) external;
function updateBlocklist(uint64 policyId, bool blocked, address[] calldata accounts) external;
function isAuthorized(uint64 policyId, address account) external view returns (bool);
function MIN_COMPOSITE_CHILD_POLICIES() external view returns (uint256);
function MAX_COMPOSITE_CHILD_POLICIES() external view returns (uint256);
function policyExists(uint64 policyId) external view returns (bool);
function policyAdmin(uint64 policyId) external view returns (address);
function pendingPolicyAdmin(uint64 policyId) external view returns (address);
function compositePolicyChildIds(uint64 policyId) external view returns (uint64[] memory);
}Modules§
- abi
- Contains dynamic ABI definitions for this contract.
Structs§
- Allowlist
Updated - Event with signature
AllowlistUpdated(uint64,address,bool,address[])and selector0x18c46532f90187ba11e436e21da087b684801d7f0787f2043f26f079c91e9ef0. - Batch
Size TooLarge - Custom error with signature
BatchSizeTooLarge(uint256)and selector0x083e2f67. - Blocklist
Updated - Event with signature
BlocklistUpdated(uint64,address,bool,address[])and selector0x2ff63c102b1b9fd7f5d39f83039c5d6aaf50a414a4f2def2704e41be2628f1e3. - Child
Policies Outside OfRange - Custom error with signature
ChildPoliciesOutsideOfRange()and selector0x697ec868. - Composite
Policy Updated - Event with signature
CompositePolicyUpdated(uint64,address,uint64[])and selector0x4ff6adaab31b0df87aa7b8b7320c52b8b3b5eede3bf28a6baaaa8b8b7e1d6363. - Incompatible
Policy Type - Custom error with signature
IncompatiblePolicyType()and selector0xf1011ef5. - Invalid
Child Policy - Custom error with signature
InvalidChildPolicy(uint64)and selector0x46508ef6. - MAX_
COMPOSITE_ CHILD_ POLICIES Call - Function with signature
MAX_COMPOSITE_CHILD_POLICIES()and selector0x54309870. - MAX_
COMPOSITE_ CHILD_ POLICIES Return - Container type for the return parameters of the
MAX_COMPOSITE_CHILD_POLICIES()function. - MIN_
COMPOSITE_ CHILD_ POLICIES Call - Function with signature
MIN_COMPOSITE_CHILD_POLICIES()and selector0xb3ae29f7. - MIN_
COMPOSITE_ CHILD_ POLICIES Return - Container type for the return parameters of the
MIN_COMPOSITE_CHILD_POLICIES()function. - NoPending
Admin - Custom error with signature
NoPendingAdmin()and selector0xb4539afa. - NonPayable
- Custom error with signature
NonPayable()and selector0x6fb1b0e9. - Policy
Admin Staged - Event with signature
PolicyAdminStaged(uint64,address,address)and selector0xdbf3b34a4c956c56ca05cd4b8f9293a4347ad61994445a4b89817d4a19561136. - Policy
Admin Updated - Event with signature
PolicyAdminUpdated(uint64,address,address)and selector0x98925cfb1bc09c5b43dd0dd56d3d95aa04fb3300927580cc588c3f5dd58c15e1. - Policy
Created - Event with signature
PolicyCreated(uint64,address,uint8)and selector0x718d87917f0c4cfd1263707ef0e77c656ed8d8bfaca06152bdb0b8094142ec27. - Policy
NotFound - Custom error with signature
PolicyNotFound()and selector0x720caa4f. - Unauthorized
- Custom error with signature
Unauthorized()and selector0x82b42900. - Zero
Address - Custom error with signature
ZeroAddress()and selector0xd92e233d. - composite
Policy Child IdsCall - Function with signature
compositePolicyChildIds(uint64)and selector0x7c40df74. - composite
Policy Child IdsReturn - Container type for the return parameters of the
compositePolicyChildIds(uint64)function. - create
Composite Policy Call - Function with signature
createCompositePolicy(address,uint8,uint64[])and selector0x6fdd1491. - create
Composite Policy Return - Container type for the return parameters of the
createCompositePolicy(address,uint8,uint64[])function. - create
Policy Call - Function with signature
createPolicy(address,uint8)and selector0xca5d55f6. - create
Policy Return - Container type for the return parameters of the
createPolicy(address,uint8)function. - create
Policy With Accounts Call - Function with signature
createPolicyWithAccounts(address,uint8,address[])and selector0xa2d3044f. - create
Policy With Accounts Return - Container type for the return parameters of the
createPolicyWithAccounts(address,uint8,address[])function. - finalize
Update Admin Call - Function with signature
finalizeUpdateAdmin(uint64)and selector0x33031a9c. - finalize
Update Admin Return - Container type for the return parameters of the
finalizeUpdateAdmin(uint64)function. - isAuthorized
Call - Function with signature
isAuthorized(uint64,address)and selector0x55a1179e. - isAuthorized
Return - Container type for the return parameters of the
isAuthorized(uint64,address)function. - pending
Policy Admin Call - Function with signature
pendingPolicyAdmin(uint64)and selector0x017548b7. - pending
Policy Admin Return - Container type for the return parameters of the
pendingPolicyAdmin(uint64)function. - policy
Admin Call - Function with signature
policyAdmin(uint64)and selector0x09dd0a47. - policy
Admin Return - Container type for the return parameters of the
policyAdmin(uint64)function. - policy
Exists Call - Function with signature
policyExists(uint64)and selector0x330f5637. - policy
Exists Return - Container type for the return parameters of the
policyExists(uint64)function. - renounce
Admin Call - Function with signature
renounceAdmin(uint64)and selector0xefdb7fa3. - renounce
Admin Return - Container type for the return parameters of the
renounceAdmin(uint64)function. - stage
Update Admin Call - Function with signature
stageUpdateAdmin(uint64,address)and selector0x1d7ae695. - stage
Update Admin Return - Container type for the return parameters of the
stageUpdateAdmin(uint64,address)function. - update
Allowlist Call - Function with signature
updateAllowlist(uint64,bool,address[])and selector0x3388fb5b. - update
Allowlist Return - Container type for the return parameters of the
updateAllowlist(uint64,bool,address[])function. - update
Blocklist Call - Function with signature
updateBlocklist(uint64,bool,address[])and selector0x5c4e51b8. - update
Blocklist Return - Container type for the return parameters of the
updateBlocklist(uint64,bool,address[])function. - update
Composite Call - Function with signature
updateComposite(uint64,uint64[])and selector0xbfe142c0. - update
Composite Return - Container type for the return parameters of the
updateComposite(uint64,uint64[])function.
Enums§
- IPolicy
Registry Calls - Container for all the
IPolicyRegistryfunction calls. - IPolicy
Registry Errors - Container for all the
IPolicyRegistrycustom errors. - IPolicy
Registry Events - Container for all the
IPolicyRegistryevents. - Policy
Type