Skip to main content

Signature

Description

Updates the policy ID assigned to policyScope. Takes effect immediately for the next operation that consults this slot. Emits PolicyUpdated.

Parameters

Reverts

  • AccessControlUnauthorizedAccount when the caller does not hold DEFAULT_ADMIN_ROLE.
  • UnsupportedPolicyType when policyScope is not recognized by this token.
  • PolicyNotFound when newPolicyId is not a built-in sentinel and does not exist in the registry.

Access control

DEFAULT_ADMIN_ROLE gates this call. Factory initCalls bypass the role gate during creation.

Policy interaction

Reads or writes a token policy-scope pointer into the PolicyRegistry.

Example