IOkrw.getParams
getParams() external view returns (OkrwParams memory params) 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.
Parameters
This method has no parameters.
Returns
OkrwParams An OkrwParams tuple with two fields: address minter (the single address authorized to call IOkrw.mint) and string mintDenom (the base denom, which on Maroo is aokrw).
Examples
Read the authorized minter from Solidity
Import the OkrwParams struct from the interface. The OKRW_CONTRACT constant binds to the precompile at 0x1000000000000000000000000000000000000001.
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.18;
import { IOkrw, OkrwParams, OKRW_CONTRACT } from "@maroo-chain/contracts/precompiles/okrw/IOkrw.sol";
contract MinterCheck {
function authorizedMinter() external view returns (address) {
OkrwParams memory p = OKRW_CONTRACT.getParams();
return p.minter;
}
function mintDenom() external view returns (string memory) {
OkrwParams memory p = OKRW_CONTRACT.getParams();
return p.mintDenom; // "aokrw"
}
} Read OKRW params via ethers v6
On the client side the rename is transparent — the ABI describes an anonymous tuple. Use this read to confirm the authorized minter before attempting a mint call against IOkrw.
import { JsonRpcProvider, Contract } from "ethers";
const OKRW = "0x1000000000000000000000000000000000000001";
const abi = [
"function getParams() view returns (tuple(address minter, string mintDenom) params)"
];
const provider = new JsonRpcProvider("https://rpc-testnet.maroo.io");
const okrw = new Contract(OKRW, abi, provider);
const params = await okrw.getParams();
console.log("minter:", params.minter);
console.log("mintDenom:", params.mintDenom); // "aokrw"