testnet
GitHub

Msg/UpdateParams

UpdateParams(authority: string, params: Params) → MsgUpdateParamsResponse

Updates the parameters for the x/okrw module. This is a privileged transaction that can only be executed by the module's authority, which defaults to the x/gov module. This is typically done by submitting a governance proposal.

Parameters

Name Type Required Description
authority string The Bech32 address of the module's authority. By default, this is the x/gov module account address.
params Params The complete set of new parameters for the module. All fields (minter_address, mint_denom) must be provided, even if they are not being changed.

Returns

Type: MsgUpdateParamsResponse

Returns an empty response on success.

Errors

Code Name Description
sdkerrors.ErrUnauthorized Unauthorized Occurs if the transaction signer is not the module's configured authority.
sdkerrors.ErrInvalidRequest InvalidRequest Occurs if the provided `params` are invalid (e.g., malformed minter address or invalid denom).

Examples

Submit a proposal to update params via CLI

This two-step process shows how to create a JSON file for a governance proposal and then submit it to the chain. The proposal's message is a `MsgUpdateParams` call that sets a new `minter_address`.

# 1. Create the proposal JSON file (proposal.json)
cat <<EOF > proposal.json
{
  "title": "Set OKRW Minter Address",
  "summary": "Authorize a new address to mint OKRW tokens.",
  "messages": [
    {
      "@type": "/maroo.okrw.v1.MsgUpdateParams",
      "authority": "maroo10d07y265gmmuvt4z0w9aw880jnsr700j8k2m34",
      "params": {
        "minter_address": "maroo1...new-minter-address...",
        "mint_denom": "aokrw"
      }
    }
  ],
  "deposit": "10000000aokrw"
}
EOF

# 2. Submit the proposal
marood tx gov submit-proposal proposal.json --from my-validator-key --chain-id maroo-testnet -y
ESC
Type to search