Skip to main content

Module IPolicyRegistry

Module IPolicyRegistry 

Source
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§

AllowlistUpdated
Event with signature AllowlistUpdated(uint64,address,bool,address[]) and selector 0x18c46532f90187ba11e436e21da087b684801d7f0787f2043f26f079c91e9ef0.
BatchSizeTooLarge
Custom error with signature BatchSizeTooLarge(uint256) and selector 0x083e2f67.
BlocklistUpdated
Event with signature BlocklistUpdated(uint64,address,bool,address[]) and selector 0x2ff63c102b1b9fd7f5d39f83039c5d6aaf50a414a4f2def2704e41be2628f1e3.
ChildPoliciesOutsideOfRange
Custom error with signature ChildPoliciesOutsideOfRange() and selector 0x697ec868.
CompositePolicyUpdated
Event with signature CompositePolicyUpdated(uint64,address,uint64[]) and selector 0x4ff6adaab31b0df87aa7b8b7320c52b8b3b5eede3bf28a6baaaa8b8b7e1d6363.
IncompatiblePolicyType
Custom error with signature IncompatiblePolicyType() and selector 0xf1011ef5.
InvalidChildPolicy
Custom error with signature InvalidChildPolicy(uint64) and selector 0x46508ef6.
MAX_COMPOSITE_CHILD_POLICIESCall
Function with signature MAX_COMPOSITE_CHILD_POLICIES() and selector 0x54309870.
MAX_COMPOSITE_CHILD_POLICIESReturn
Container type for the return parameters of the MAX_COMPOSITE_CHILD_POLICIES() function.
MIN_COMPOSITE_CHILD_POLICIESCall
Function with signature MIN_COMPOSITE_CHILD_POLICIES() and selector 0xb3ae29f7.
MIN_COMPOSITE_CHILD_POLICIESReturn
Container type for the return parameters of the MIN_COMPOSITE_CHILD_POLICIES() function.
NoPendingAdmin
Custom error with signature NoPendingAdmin() and selector 0xb4539afa.
NonPayable
Custom error with signature NonPayable() and selector 0x6fb1b0e9.
PolicyAdminStaged
Event with signature PolicyAdminStaged(uint64,address,address) and selector 0xdbf3b34a4c956c56ca05cd4b8f9293a4347ad61994445a4b89817d4a19561136.
PolicyAdminUpdated
Event with signature PolicyAdminUpdated(uint64,address,address) and selector 0x98925cfb1bc09c5b43dd0dd56d3d95aa04fb3300927580cc588c3f5dd58c15e1.
PolicyCreated
Event with signature PolicyCreated(uint64,address,uint8) and selector 0x718d87917f0c4cfd1263707ef0e77c656ed8d8bfaca06152bdb0b8094142ec27.
PolicyNotFound
Custom error with signature PolicyNotFound() and selector 0x720caa4f.
Unauthorized
Custom error with signature Unauthorized() and selector 0x82b42900.
ZeroAddress
Custom error with signature ZeroAddress() and selector 0xd92e233d.
compositePolicyChildIdsCall
Function with signature compositePolicyChildIds(uint64) and selector 0x7c40df74.
compositePolicyChildIdsReturn
Container type for the return parameters of the compositePolicyChildIds(uint64) function.
createCompositePolicyCall
Function with signature createCompositePolicy(address,uint8,uint64[]) and selector 0x6fdd1491.
createCompositePolicyReturn
Container type for the return parameters of the createCompositePolicy(address,uint8,uint64[]) function.
createPolicyCall
Function with signature createPolicy(address,uint8) and selector 0xca5d55f6.
createPolicyReturn
Container type for the return parameters of the createPolicy(address,uint8) function.
createPolicyWithAccountsCall
Function with signature createPolicyWithAccounts(address,uint8,address[]) and selector 0xa2d3044f.
createPolicyWithAccountsReturn
Container type for the return parameters of the createPolicyWithAccounts(address,uint8,address[]) function.
finalizeUpdateAdminCall
Function with signature finalizeUpdateAdmin(uint64) and selector 0x33031a9c.
finalizeUpdateAdminReturn
Container type for the return parameters of the finalizeUpdateAdmin(uint64) function.
isAuthorizedCall
Function with signature isAuthorized(uint64,address) and selector 0x55a1179e.
isAuthorizedReturn
Container type for the return parameters of the isAuthorized(uint64,address) function.
pendingPolicyAdminCall
Function with signature pendingPolicyAdmin(uint64) and selector 0x017548b7.
pendingPolicyAdminReturn
Container type for the return parameters of the pendingPolicyAdmin(uint64) function.
policyAdminCall
Function with signature policyAdmin(uint64) and selector 0x09dd0a47.
policyAdminReturn
Container type for the return parameters of the policyAdmin(uint64) function.
policyExistsCall
Function with signature policyExists(uint64) and selector 0x330f5637.
policyExistsReturn
Container type for the return parameters of the policyExists(uint64) function.
renounceAdminCall
Function with signature renounceAdmin(uint64) and selector 0xefdb7fa3.
renounceAdminReturn
Container type for the return parameters of the renounceAdmin(uint64) function.
stageUpdateAdminCall
Function with signature stageUpdateAdmin(uint64,address) and selector 0x1d7ae695.
stageUpdateAdminReturn
Container type for the return parameters of the stageUpdateAdmin(uint64,address) function.
updateAllowlistCall
Function with signature updateAllowlist(uint64,bool,address[]) and selector 0x3388fb5b.
updateAllowlistReturn
Container type for the return parameters of the updateAllowlist(uint64,bool,address[]) function.
updateBlocklistCall
Function with signature updateBlocklist(uint64,bool,address[]) and selector 0x5c4e51b8.
updateBlocklistReturn
Container type for the return parameters of the updateBlocklist(uint64,bool,address[]) function.
updateCompositeCall
Function with signature updateComposite(uint64,uint64[]) and selector 0xbfe142c0.
updateCompositeReturn
Container type for the return parameters of the updateComposite(uint64,uint64[]) function.

Enums§

IPolicyRegistryCalls
Container for all the IPolicyRegistry function calls.
IPolicyRegistryErrors
Container for all the IPolicyRegistry custom errors.
IPolicyRegistryEvents
Container for all the IPolicyRegistry events.
PolicyType