IPcl · Policy management

Register, query, and change policy templates and per-contract policy configurations.

IPcl.registerPolicyTemplate / removePolicyTemplate

Chain-wide policy admin operations that add or remove one of the built-in PCL policy templates from the active registry. registerPolicyTemplate makes a template ID available for instantiation inside a PolicySet; removePolicyTemplate withdraws it. Only the address returned by IPcl.policyAdmin() may call these — other callers revert with Unauthorized(). Both calls, when made by the admin against the PCL precompile, bypass PCL policy evaluation via the admin recovery path, so they cannot be blocked by a misconfigured global policy that would otherwise reject the admin's own address.

IPcl.contractPolicies / removeContractPolicies

Two operations against the contract-scoped policy binding. contractPolicies(address) is a view returning the currently bound ContractPolicyConfig (or a zeroed struct if none is bound). removeContractPolicies(address) clears the PolicySet[] on a PCL-wrapped proxy — it does NOT remove the contract-admin binding itself, so the admin retains authority to re-attach policies later via changeContractPolicies. Two guardrails: (1) only the current contract admin can remove; (2) policy-aware precompiles (addresses listed in PclParams.PolicyAwarePrecompiles) cannot be cleared this way — the call reverts with CannotEmpty("policy-aware precompile policies"). To relax rules on a policy-aware precompile, use changeContractPolicies with a permissive PolicySet instead.

IPcl.policyTemplate

Returns the descriptor for a registered PCL policy template. The returned PolicyTemplate struct carries only three fields — templateId, name, and description — and is metadata-only: it does not embed a machine-readable parameter schema. To learn a template's parameter shape, consult the template-specific struct in IPcl.sol (for example DenylistPolicy, EasPolicy). If the requested templateId is not currently registered on this network, the call reverts with PolicyTemplateNotFound.

IPcl.changeContractPolicies

Upserts the ContractPolicyConfig for a target address. The target must be either a PCL-registered proxy (deployed via deployPclProxy) OR a binary-supported policy-aware precompile — currently only the Privacy precompile at 0x100000000000000000000000000000000000000b. On the first call for a target, msg.sender may be anyone and the payload's admin becomes the future gatekeeper; on subsequent calls msg.sender must equal the currently stored admin, and the new admin value in the payload replaces the old one atomically with the policy replacement. Passing an empty policies array to a policy-aware precompile is rejected — those targets must always carry at least one PolicySet. Ordinary PCL proxies may carry an empty policies array (equivalent to no contract-scope rules). The chain-wide policyAdmin cannot mutate these configs unless it also happens to be the stored contract admin.

IPcl · Regulated execution

The Regulated Track execution surface: PCL proxies and the preCall / postCall hooks. Policy evaluation runs on the proxy hook path; there is no single-call entry point that both checks policy and executes for you. Use eth_call for pre-flight.

IPcl.deployPclProxy

Deploys a PCL-wrapped proxy of the requested kind using the canonical bytecode embedded in the chain binary, registers it in the on-chain proxy registry, and sets the immediate EVM caller (msg.sender) as its initial policy admin. The returned proxy address is the address dApps should publish as the canonical contract address, because only calls that go through this registered proxy trigger the contract-scoped PCL enforcement path (preCall / postCall). After deployment, IPcl.pclProxy(proxy) returns the registry entry with the proxy's kind, its current admin, and the proxy address itself; that admin field stays in sync when changeContractPolicies rotates the contract admin.

IPcl.postCall

Closes the PCL enforcement session opened by preCall. Given a sessionId returned by preCall, postCall re-runs the post-execution half of the policy evaluation — recording periodic volume, enforcing after-call rules, and emitting PolicyCheckPassed — using the session's stored context. The precompile verifies that the immediate caller (msg.sender of postCall), the target contractAddress, the forwarded principal, and the leading 4-byte selector of data all match the values captured when the session was opened; any divergence reverts with Unauthorized. The PCL-wrapped proxy invokes this hook automatically after the inner call returns; direct callers must ensure the tuple passed to postCall is byte-identical to the tuple passed to preCall, or the session cannot be closed.

IPcl.preCall

Opens a PCL enforcement session for a regulated call. The immediate msg.sender must be one of two authorized caller kinds: a PCL-registered proxy invoking its own target (contractAddress == msg.sender), or a governance-trusted ERC-4337 EntryPoint executing a bundle. In both cases PCL evaluates global and contract-scoped policies against the forwarded principal (the EOA or smart-account that originated the call) with the extracted 4-byte selector and value. If any before-execution policy fails the call reverts with the corresponding PCL ReasonCode; otherwise PCL installs an internal tracer, registers a session keyed by a derived sessionId, and returns it. The paired postCall invocation must present the same sessionId to close the session and run after-execution evaluation. A staticcall (readonly) execution returns the zero bytes32 and does not open a session — policy state is evaluated inside a cached context and discarded.

IPcl.pclProxy

Returns the on-chain registry entry for a PCL-wrapped proxy address. The PclProxyEntry tuple contains the proxy variant (kind), the currently-bound policy admin (admin), and the registered proxy address (proxy). If proxy is not registered, every field of the returned entry is zero (kind = Unspecified, admin = 0x0, proxy = 0x0) — the call does not revert. The admin field is a projection of the canonical contract-admin record: it is set the moment deployPclProxy runs and is kept in sync when a subsequent changeContractPolicies rotates the admin, so a client reading this view sees the current gatekeeper without a second query to contractPolicies.

IPcl · Periodic volume queries

Read the rolling-window volume counters behind periodic volume limit policies.

IPcl.contractPeriodicList

Lists every PERIODIC_VOLUME_POLICY running counter attached to contractAddress that applies to user. Filter by asset and optionally by function selector — pass empty bytes ("0x") to match PolicySets registered without a selector. One entry per distinct reset-period bucket configured on the contract.

IPcl.contractPeriodicVolume

Returns every contract-scoped periodic-volume counter matching the requested (selector, asset, resetPeriodSeconds) tuple for user on contractAddress. A single reset period can back several distinct maxAmount limits (for example, a wallet-tier cap layered under a per-function cap), so callers must fold across the returned array rather than assume a single record. An empty array means no contract policy currently matches the tuple. Pass an empty selector to read counters registered without a function-selector scope; pass resolveAgentOwners = true to aggregate volume across every agent owned by user.

IPcl.globalPeriodicList

Lists every PERIODIC_VOLUME_POLICY running counter for user under the global policy config, one entry per distinct reset-period bucket. Use this when the user is subject to multiple global periodic caps at different window lengths (for example a 24-hour cap and a 30-day cap on the same asset) and you want to render or check all of them at once.

IPcl.globalPeriodicVolume

Returns every global periodic-volume counter that shares the requested (asset, resetPeriodSeconds) pair for user. The array is empty when no global PERIODIC_VOLUME_POLICY matches the (asset, reset-period) tuple; otherwise it contains one PeriodicVolume entry per registered limit — a single reset period can back several distinct maxAmount variants, and each is returned so callers can pick the tightest applicable cap. Set resolveAgentOwners to true to accumulate volume across every agent owned by the queried address.

IPcl · Params

Read PCL module parameters.

OKRW

The OKRW stablecoin precompile — params, minting, and mint events.

IOkrw.getParams

Returns the OKRW module parameters — the authorized minter address and the mint denom. The return struct is named OkrwParams (the un-namespaced Params name was renamed so multiple precompile interfaces can be imported together without struct-name collisions). The minter address rotation is a consortium-governance action; clients should treat this as a read-only discovery endpoint.

IOkrw.mint

Mints amount of OKRW (in aokrw, the 18-decimal base denom) and credits it to recipient. Only the authorized minter address configured in the x/okrw module parameters can call this successfully; any other caller reverts with the module-owned UnauthorizedMinter(address caller, address authorizedMinter) custom error. Zero-address recipients and zero amounts revert with the shared IPrecompile.InvalidAddress(string bad) and IPrecompile.InvalidAmount(string amount) typed errors respectively (note: both carry a string payload — the offending address or amount rendered as text — not the raw address/uint256). Nil or negative amount inputs (only reachable through low-level ABI abuse) surface as plain string reverts, "amount must not be nil" and "amount must not be negative"; these are not decodable typed errors.

OKRW.Mint (event)

Emitted by the OKRW precompile upon a successful call to the mint function. This event provides a verifiable, on-chain record of all OKRW minting activity originating from the EVM. Indexers and client applications can subscribe to this event to track the OKRW supply and distribution.

EAS

Attestation queries against the EAS precompile.

IEas.getParams

Returns the canonical Ethereum Attestation Service addresses for this chain: the schemaRegistry, eas, and indexer preinstall addresses. Call this at startup so your dApp resolves the addresses at runtime instead of hard-coding per-network values. The precompile inherits the shared IPrecompile error surface — argument-shape failures revert with typed errors, while a not-yet-initialized keeper still surfaces as a plain string revert "eas keeper is not initialized".

EAS.getAttestation

Returns the full Attestation struct for a given UID, or an Attestation with uid == 0x00.. if the UID is unknown. This is the canonical read on the EAS contract preinstall — every other surface (@ethereum-attestation-service/eas-sdk, the Indexer, PCL's EAS_POLICY evaluator) ultimately calls this. dApp code should validate revocationTime == 0 and (expirationTime == 0 || expirationTime > now) before treating an attestation as valid.

Indexer.getReceivedAttestationUIDCount

Returns the number of attestations issued to recipient under schemaUid. A cheap existence check — call this before paginating with getReceivedAttestationUIDs. The count tracks issuance only; revoked or expired attestations still increment it, so use the count as a search bound rather than a validity gate.

Indexer.getReceivedAttestationUIDs

Paginated reverse-lookup: returns up to length attestation UIDs issued to recipient under schemaUid. Use reverseOrder = true to start from the most recent. Each returned UID feeds EAS.getAttestation(uid) to fetch the actual struct and check revocation/expiration.

Agent

ERC-8004 agent registry queries.

IPrivacy · Shielded value flow

Move value into, within, and out of the shielded pool: deposit commits funds, transfer spends a note to new commitments, withdraw returns value to a transparent recipient. The caller submits and pays gas.

IPrivacy · Authorized relay

The same actions submitted by someone else. The effective sender signs an EIP-712 authorization binding the request to one executor, a nonce, and a deadline; the executor pays gas while balances, policy, and event attribution still read as the effective sender.

IPrivacy · Batch transfers

Many shielded transfers in one call. batchTransfer carries a proof per item; singleProofBatchTransfer proves the whole batch once, which is cheaper but constrains batch shape. Both have authorized-relay variants.

IPrivacy.batchTransfer

Applies multiple independently-proved shielded transfers atomically inside a single transaction, all keyed by batchId. Each element is preflighted for duplicate nullifiers, duplicate commitments, and Merkle capacity against the whole batch — a single failure reverts the entire call. Failures surface as typed custom errors on IPrivacy or inherited on IPrecompile.

IPrivacy.batchTransferWithAuthorization

Submits a multi-proof batch on behalf of one or more effective senders — each items[i] carries a PrivacyTransferRequest and a PrivacyActionAuthorization whose signature covers that specific item's request under the shared batchId and per-item batchItemIndex. The caller (msg.sender) is recorded as the executor on every authorization; a mismatch between the recovered signer and authorization.effectiveSender, an expired deadline, or a reused nonce reverts the entire batch. The 20-item protocol limit (MaxPrivacyMultiProofBatchItems) is enforced identically to the direct batchTransfer path.

IPrivacy.singleProofBatchTransfer

Applies a batch join-split (multiple inputs, multiple outputs) validated by a single Groth16 proof. Input count must be in 1..BatchJoinSplitV1MaxInputs, output count must be in 1..BatchJoinSplitV1MaxOutputs; out-of-range counts revert with PrivacyBatchSizeOutOfRange(count, max). Failures surface as typed custom errors on IPrivacy or inherited on IPrecompile.

IPrivacy.singleProofBatchTransferWithAuthorization

Meta-transaction variant of singleProofBatchTransfer: a relayer submits the batch on behalf of authorization.effectiveSender, who signed an off-chain authorization binding the request hash to a specific executor, nonce, and deadline. Supports EOA signatures, ERC-1271 smart-account signatures, and EIP-7702 delegated-EOA signatures, chosen via authorization.authorizationKind. The request-hash domain is dedicated to the single-proof batch method — it will not collide with authorizations for other privacy calls. Failures revert with a typed custom error: IPrivacy declares its own, and inherits the shared protocol errors from IPrecompile, so a client decodes the 4-byte selector rather than matching reason text. One case is still a plain string — an EOA signature that is not exactly 65 bytes is rejected before any typed error is built.

ESC
Type to search