Skip to main content

Overview

This guide explains how to update the gas price on the Wasm rollup. Use validator (admin) account to update the chain parameter.

Prerequisites

Update Chain Parameters

1. Set Up Operator Key

Add your operator key to the local keyring. This key will be used to sign transactions.
minitiad keys add operator --recover --key-type secp256k1 --coin-type 118
  • --recover: Recovers a key from a mnemonic phrase.
  • --key-type secp256k1: Common key type used in Cosmos SDK-based chains.
  • --coin-type 118: Standard coin type for Cosmos-based chains.

2. Create Update Messages

You need to create messages:
  • opchild.v1.MsgUpdateParams
You can get the current opchild parameters by querying:
curl ${REST_ENDPOINT}/opinit/opchild/v1/params

# 📌 Example: https://rest-inertia-1.anvil.asia-southeast.initia.xyz/opinit/opchild/v1/params
# {
#   "params": {
#     "max_validators": 100,
#     "historical_entries": 10000,
#     "min_gas_prices": [
#       {
#         "denom": "GAS",
#         "amount": "30000000.000000000000000000"
#       }
#     ],
#     "bridge_executors": [
#       "init1jaz6hxkn8cx9dxjwrjwy4v2qs2u09pf25ztcam"
#     ],
#     "admin": "init1ppzptg22xx259zzpgpejphzcvjmc7r2ff984c3",
#     "fee_whitelist": [
#       "init1ppzptg22xx259zzpgpejphzcvjmc7r2ff984c3",
#       "init1ppzptg22xx259zzpgpejphzcvjmc7r2ff984c3",
#       "init1jaz6hxkn8cx9dxjwrjwy4v2qs2u09pf25ztcam",
#       "init1fvhhqk3tvv08vd5gmsp45x8tkzhcwv3ly8kn78"
#     ],
#     "hook_max_gas": "3000000"
#   }
# }
Create a JSON file named messages.json with the following content:
// messages.json
{
  "messages": [
    {
      "@type": "/opinit.opchild.v1.MsgUpdateParams",
      "authority": "init1gz9n8jnu9fgqw7vem9ud67gqjk5q4m2w0aejne",
      "params": {
        "max_validators": 100, // Max number of active validators
        "historical_entries": 10000, // Number of historical blocks to retain
        "min_gas_prices": [
          {
            "denom": "umin",         // Native token denomination
            "amount": "1000000000"  // Minimum gas price in smallest unit
          }
        ],
        "bridge_executors": [
          "init1jaz6hxkn8cx9dxjwrjwy4v2qs2u09pf25ztcam" // Allowed bridge executor address
        ],
        "admin": "init10g75rf30pwpkgu68yr8uh4gm824xajg09233xr", // Admin address with authority to update params
        "fee_whitelist": [
          // Addresses exempted from fees
          "init1ppzptg22xx259zzpgpejphzcvjmc7r2ff984c3",
          "init1ppzptg22xx259zzpgpejphzcvjmc7r2ff984c3",
          "init1jaz6hxkn8cx9dxjwrjwy4v2qs2u09pf25ztcam",
          "init1fvhhqk3tvv08vd5gmsp45x8tkzhcwv3ly8kn78"
        ],
        "hook_max_gas": "3000000" // Maximum gas for execution hooks
      }
    }
  ]
}
authority address will be a opchild module account regardless of the field you want to update. To get the authority address, you can use the following command:
curl ${REST_ENDPOINT}/cosmos/auth/v1beta1/module_accounts/opchild

# 📌 Example: https://rest-inertia-1.anvil.asia-southeast.initia.xyz/cosmos/auth/v1beta1/module_accounts/opchild
# {
#   "account": {
#     "@type": "/cosmos.auth.v1beta1.ModuleAccount",
#     "base_account": {
#       "address": "init1gz9n8jnu9fgqw7vem9ud67gqjk5q4m2w0aejne",
#       "pub_key": null,
#       "account_number": "2771",
#       "sequence": "0"
#     },
#     "name": "opchild",
#     "permissions": [
#       "minter",
#       "burner"
#     ]
#   }
# }
If you set empty values on the field, it will be set to the empty value, which may cause issues. Be careful to set any fields you do not wish to change with their existing values. Update your values carefully — especially the admin address.
Save the content above as messages.json.

3. Execute the Update Transaction

Submit the parameter update messages using the CLI:
minitiad tx opchild execute-messages ./messages.json \
  --from operator --chain-id inertia-1 \
  --node https://rpc-inertia-1.anvil.asia-southeast.initia.xyz

4. Verify the Updated Parameters

Once the transaction is successful, verify the updated parameters:
minitiad q opchild params \
  --node https://rpc-inertia-1.anvil.asia-southeast.initia.xyz
These queries will return the live parameter state for both modules.