IPcl.getParams
getParams() external view returns (PclParams memory) Returns the PCL module's runtime parameters as a PclParams struct with two fields: policyAdmin (the address authorized to register/remove policy templates and to set the global GlobalPolicyConfig) and entrypoints (the addresses recognized as legitimate top-level callers by the PCL evaluator). The set of policy-aware precompiles is no longer part of these parameters — it is fixed in the chain binary and queried via types.IsSupportedPolicyAwarePrecompile internally, so it cannot be reconfigured through module params.
Parameters
This method has no parameters.
Returns
PclParams A struct with address policyAdmin and address[] entrypoints. The previous address[] policyAwarePrecompiles field has been removed; any client ABI that still declares it will decode incorrectly.
Examples
Read PCL params with viem
The tuple has exactly two fields. If you copy an older ABI fragment that still declares policyAwarePrecompiles, readContract throws because the on-chain return no longer matches.
import { createPublicClient, http } from "viem";
const PCL = "0x1000000000000000000000000000000000000005" as const;
const pclAbi = [{
name: "getParams", type: "function", stateMutability: "view",
inputs: [],
outputs: [{
type: "tuple", components: [
{ name: "policyAdmin", type: "address" },
{ name: "entrypoints", type: "address[]" },
],
}],
}] as const;
const client = createPublicClient({ transport: http("https://rpc-testnet.maroo.io") });
const params = await client.readContract({
address: PCL,
abi: pclAbi,
functionName: "getParams",
});
console.log("policyAdmin:", params.policyAdmin);
console.log("entrypoints:", params.entrypoints); Read PCL params from Solidity
PclParams is now a two-field struct. Contracts that assumed a third policyAwarePrecompiles array must be recompiled against the current IPcl.sol.
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.28;
import "@maroo-chain/contracts/precompiles/pcl/IPcl.sol";
contract PclParamsReader {
IPcl constant pcl = IPcl(0x1000000000000000000000000000000000000005);
function currentPolicyAdmin() external view returns (address) {
PclParams memory p = pcl.getParams();
return p.policyAdmin;
}
function currentEntrypoints() external view returns (address[] memory) {
return pcl.getParams().entrypoints;
}
}