Contract API
Solidity-callable precompile interfaces covering OKRW (stablecoin), PCL (compliance), EAS (attestation), and Agent (ERC-8004 indexing).
Agent
Paginated reverse lookup: returns the agent IDs registered to wallet. Maroo's Agent precompile exposes this method because walking IdentityRegistry storage from inside a contract is too expensive — the precompile reads from an x/agent chain-side index that's kept in sync. For everything else (register, attest, metadata), call IdentityRegistry directly.
Returns the addresses of the ERC-8004 IdentityRegistry and ReputationRegistry preinstalls on this Maroo network. Discovery helper — call this once at app startup so your code resolves the right registries on testnet vs mainnet without hard-coding.
EAS
Returns the canonical addresses of the Ethereum Attestation Service deployment on this Maroo network — the SchemaRegistry, the EAS contract, and the Indexer. Call this once at app startup so your code resolves the right addresses on testnet and mainnet without hard-coding. The return struct is named EasParams (the un-namespaced Params name was renamed to avoid collisions when multiple precompile interfaces are imported together).
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.
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.
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.
IPcl
Returns the PCL module parameters — the chain-wide policy admin address and the list of approved regulated-path entrypoint contracts. The return struct is named PclParams (the un-namespaced Params name was renamed so multiple precompile interfaces can be imported together without struct-name collisions).
Registers a built-in policy template into the active PCL template registry by templateId. The seven V1 templates (DENYLIST_POLICY, VOLUME_POLICY, PERIODIC_VOLUME_POLICY, EAS_POLICY, OKRW_EAS_TRANSFER_LIMIT_POLICY, OKRW_EAS_PERIODIC_VOLUME_LIMIT_POLICY, AGENT_OKRW_TRANSFER_LIMIT_POLICY) are shipped with the chain; this call makes one of them available for use in PolicyConfigs. Admin-only: the caller must be the PolicyAdmin (set via consortium governance). External dApp builders do not call this directly — surfaced here for protocol auditability and to clarify how a PolicySet's templateId refers back to a registered template.
View call. Returns the contract-scoped ContractPolicyConfig currently active for the target address — its admin and the full PolicySet[]. If no contract-scoped config has been registered, the call returns a zero-valued struct (empty policies array, zero admin); the chain-wide GlobalPolicyConfig still applies regardless. Used for policy inspector UIs and the read-modify-write loop in changeContractPolicies.
View call. Returns the registration record for one of the seven built-in PCL templates by templateId. Reverts if templateId is unknown. The parameter shape for each template is fixed in IPcl.sol (e.g. DenylistPolicy { address[] addresses; }) — policyTemplate returns the registry metadata only, not a JSON-schema; readers should consult the corresponding template's Solidity struct directly for the parameter layout.
Executes a call to a target contract within the PCL's regulated context. This function is the entry point to the 'Regulated Track'. It first triggers all applicable global and contract-specific policy checks based on the sender, target contract, and call data. If all checks pass, it then executes the provided call data on the target contract using a low-level call. If any check fails, the transaction reverts with a specific error.
Registers a new set of compliance policies for a specific smart contract. This function sets the initial policy configuration. If policies are already registered for the target contract, this call will fail. Use changeContractPolicies to update an existing configuration. The caller must be the designated admin for the contract as defined in the policy struct, or the contract itself.
Updates an existing set of compliance policies for a smart contract. This call completely replaces the old policy configuration with the new one. To add or remove a single policy, read the existing configuration, modify the PolicySet array, then submit the whole new configuration. The caller must be the currently registered admin for the target contract.
OKRW
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.
Mints a specified amount of OKRW tokens and credits them to the recipient address. This function can only be successfully called by the authorized Minter address, which is configured at the chain level in the x/okrw module parameters. Calls from any other address will revert with a custom error.
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.