What is a Policy Admin?

A Policy Admin is a special role that has complete control over a specific policy within the Rules Engine. Think of them as the “owner” of that policy - they decide what rules apply, which contracts can use the policy, and how everything is configured.

Key Responsibilities

The Policy Admin can:
  • Configure the policy rules - Decide what conditions must be met
  • Set up trackers - Configure what data to monitor and track
  • Manage calling functions - Control which functions can be called
  • Configure foreign calls - Set up interactions with external contracts
  • Limit access - Decide which calling contracts are eligible to use this policy

How Policy Admins Are Assigned

  • Automatic assignment: When someone creates a new policy using createPolicy(), they automatically become the Policy Admin for that policy
  • One admin per policy: Each policy can have exactly one Policy Admin
  • Multiple policies: One address can be a Policy Admin for multiple different policies
  • Transferable role: The Policy Admin role can be transferred to another address, but the new recipient must accept the role before the transfer is complete

Important Notes

  • Exclusive control: Only the Policy Admin can configure their policy - no one else can modify it
  • Eligibility vs enforcement: Setting which contracts are “eligible” to use a policy doesn’t force them to actually use it - it just determines whether they’re allowed to enable it
  • Foreign call permissions: If a Policy Admin wants to use a permissioned foreign call in their policy, they must first be granted permission to use that specific foreign call