Client
Clients can interact with the mint module through:
CLI
The command-line interface provides query commands to inspect the mint module state.
History query conventions
Four queries — reduction-factor, reward-mint-history, burn-history, replacement-mint-history — share a unified
shape:
--epoch N(withN > 0) returns the single entry for that epoch as a one-entry list, orNotFoundif the epoch has no record.- Without
--epoch, the command paginates over all stored entries using the standard Cosmos pagination flags:--limit,--offset,--page-key,--count-total,--reverse. The default page limit is 100 entries; setting--limit 0falls back to that same default (it does not mean "unbounded").--epochand pagination flags are mutually exclusive.
Query Commands
Query Params
Get the current mint module parameters:
d q mint params
Example Output:
params:
mint_denom: adt
genesis_epoch_provisions: "76923076923075000000000000.000000000000000000"
epoch_identifier: week
reduction_period_in_epochs: 52
reduction_factor: "0.800000000000000000"
distribution_proportions:
staking: "1.000000000000000000"
community_pool: "0.000000000000000000"
minting_rewards_distribution_start_epoch: 27
max_supply: "100000000000000000.000000000000000000"
burn_replacement_ratio: "0.000000000000000000"
Query Epoch Provisions
Get the current epoch provisions (amount minted per epoch):
d q mint epoch-provisions
Example Output:
epoch_provisions: "76923076923075000000000000.000000000000000000"
This value changes over time as reductions are applied.
History Queries
Four range-capable queries cover reduction factors, reward mints, observed burns, and replacement mints. The
single-epoch case returns a one-entry list; without --epoch, the query paginates over all stored entries.
| CLI | HTTP |
|---|---|
d query mint reduction-factor --epoch N | GET /d/mint/v1/reduction_factor?epoch_number=N |
d query mint reward-mint-history --epoch N | GET /d/mint/v1/reward_mint_history?epoch_number=N |
d query mint burn-history --epoch N | GET /d/mint/v1/burn_history?epoch_number=N |
d query mint replacement-mint-history --epoch N | GET /d/mint/v1/replacement_mint_history?epoch_number=N |
To paginate over all stored entries, omit --epoch and pass pagination flags — e.g.
d query mint <topic> --limit 50 --count-total, equivalent to
GET /d/mint/v1/<topic>?pagination.limit=50&pagination.count_total=true.
Burn and replacement-mint values are stored math.Int decimals as strings. burn-history returns B_n (adt burnt
during epoch n). replacement-mint-history returns the replacement amount recorded at epoch n after
replacement-priority bookkeeping. reward-mint-history returns the amount actually minted in epoch n (capped).
reduction-factor returns the factor applied at each reduction epoch as a LegacyDec.
Last Epoch Supply
A singleton snapshot (not range-capable):
d query mint last-epoch-supply
Returns the snapshot currentSupply + cappedTotal persisted at the end of the most recent AfterEpochEnd call.
Examples:
# Single epoch
d query mint burn-history --epoch 79
d query mint replacement-mint-history --epoch 79
d query mint reward-mint-history --epoch 79
d query mint reduction-factor --epoch 52
# Paginated scan over all entries
d query mint burn-history --limit 20 --count-total
d query mint reduction-factor --reverse
# Continue from a previous page
d query mint burn-history --page-key <next_key_from_previous_response>
Transaction Commands
The mint module does not provide direct transaction commands. Parameter updates must be done through governance proposals using the standard governance module commands.
Example governance proposal to update mint params:
d tx gov submit-proposal /path/to/proposal.json --from=<key>
Where proposal.json contains:
{
"messages": [
{
"@type": "/d.mint.v1.MsgUpdateParams",
"authority": "dchain10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn",
"params": {
"mint_denom": "adt",
"genesis_epoch_provisions": "76923076923075000000000000",
"epoch_identifier": "week",
"reduction_period_in_epochs": 52,
"reduction_factor": "0.8",
"distribution_proportions": {
"staking": "0.9",
"community_pool": "0.1"
},
"minting_rewards_distribution_start_epoch": 27,
"max_supply": "100000000000000000",
"burn_replacement_ratio": "0.500000000000000000"
}
}
],
"metadata": "ipfs://CID",
"deposit": "10000000000000000000adt",
"title": "Update Mint Distribution",
"summary": "Allocate 10% of minted tokens to community pool"
}
gRPC
Query Service
The mint module provides a gRPC query service defined in d/mint/v1/query.proto.
Params
Get module parameters:
grpcurl -plaintext localhost:9090 d.mint.v1.Query/Params
Request:
message QueryParamsRequest {}
Response:
message QueryParamsResponse {
Params params = 1;
}
EpochProvisions
Get current epoch provisions:
grpcurl -plaintext localhost:9090 d.mint.v1.Query/EpochProvisions
Request:
message QueryEpochProvisionsRequest {}
Response:
message QueryEpochProvisionsResponse {
bytes epoch_provisions = 1 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
}
History Queries (ReductionFactor, RewardMintHistory, BurnHistory, ReplacementMintHistory)
All four share a request shape:
message Query<Topic>Request {
int64 epoch_number = 1; // 0 = unset, use pagination
cosmos.base.query.v1beta1.PageRequest pagination = 2; // ignored when epoch_number > 0
}
Response is always a list:
message Query<Topic>Response {
repeated <Entry> entries = 1; // one entry on a single-epoch hit
cosmos.base.query.v1beta1.PageResponse pagination = 2; // populated only on paginated responses
}
epoch_number > 0 together with pagination returns InvalidArgument. A single-epoch miss returns NotFound. Values
are stored math.Int decimals serialized as strings; reduction_factor is a LegacyDec.
Single-epoch example:
grpcurl -plaintext -d '{"epoch_number": 79}' localhost:9090 d.mint.v1.Query/BurnHistory
Paginated example:
grpcurl -plaintext -d '{"pagination": {"limit": 20, "count_total": true}}' \
localhost:9090 d.mint.v1.Query/BurnHistory
LastEpochSupply
Get the singleton snapshot persisted at the end of the most recent AfterEpochEnd:
grpcurl -plaintext localhost:9090 d.mint.v1.Query/LastEpochSupply
REST
Query Endpoints
REST endpoints are available via the gRPC-gateway.
GET /d/mint/v1/params
Get the current mint module parameters.
Example:
curl http://localhost:1317/d/mint/v1/params
Response:
{
"params": {
"mint_denom": "adt",
"genesis_epoch_provisions": "76923076923075000000000000.000000000000000000",
"epoch_identifier": "week",
"reduction_period_in_epochs": "52",
"reduction_factor": "0.800000000000000000",
"distribution_proportions": {
"staking": "1.000000000000000000",
"community_pool": "0.000000000000000000"
},
"minting_rewards_distribution_start_epoch": "27",
"max_supply": "100000000000000000000000000000.000000000000000000"
}
}
GET /d/mint/v1/epoch_provisions
Get the current epoch provisions.
Example:
curl http://localhost:1317/d/mint/v1/epoch_provisions
Response:
{
"epoch_provisions": "76923076923075000000000000.000000000000000000"
}
History Endpoints
All four history endpoints share the same query-parameter contract.
| Endpoint | Description |
|---|---|
GET /d/mint/v1/reduction_factor | Reduction factors applied at reduction epochs |
GET /d/mint/v1/reward_mint_history | Actual amount minted per epoch |
GET /d/mint/v1/burn_history | Observed adt burn per epoch |
GET /d/mint/v1/replacement_mint_history | Replacement-mint amount recorded per epoch |
Query parameters:
epoch_number=N(withN > 0): returns the single entry for that epoch.pagination.limit,pagination.offset,pagination.key,pagination.count_total,pagination.reverse: standard Cosmos pagination (used whenepoch_numberis omitted or0).
Single-epoch:
curl 'http://localhost:1317/d/mint/v1/burn_history?epoch_number=79'
Paginated scan:
curl 'http://localhost:1317/d/mint/v1/burn_history?pagination.limit=20&pagination.count_total=true'
GET /d/mint/v1/last_epoch_supply
Get the singleton snapshot persisted at the end of the most recent AfterEpochEnd.
curl http://localhost:1317/d/mint/v1/last_epoch_supply
Monitoring and Analytics
Useful Queries for Monitoring
Check if max supply is approaching:
# Get current supply
d q bank total --denom=adt
# Get max supply
d q mint params | grep max_supply
# Calculate percentage
# percentage = (current_supply / max_supply) * 100
Track minting history:
# Query events from recent blocks
d q txs --events 'mint_epoch_end.epoch_number=79'
Monitor current minting rate:
# Get current epoch provisions
d q mint epoch-provisions
# Calculate annual minting (assuming weekly epochs)
# annual_minting = epoch_provisions * 52
Check when next reduction occurs:
# Get current epoch
d q epochs current-epoch week
# Get last reduction epoch (from state or events)
# next_reduction = last_reduction + reduction_period_in_epochs
Event Monitoring
Monitor minting events in real-time:
# Subscribe to new blocks and filter for mint events
d q block --height=<height> | jq '.result.events[] | select(.type=="mint_epoch_end")'
Event attributes to monitor:
epoch_number: Track minting epochsepoch_provisions: Monitor current provisions (detects reductions)amount: Actual minted amounttotal_supply_after: Track supply growthlast_reduction_epoch: Identify reduction events
Common Use Cases
1. Check Current Minting Status
# Get all relevant minting info
d q mint params
d q mint epoch-provisions
d q bank total --denom=adt
2. Verify Reduction Applied Correctly
# After a reduction epoch, verify:
# 1. Epoch provisions decreased
d q mint epoch-provisions
# 2. Check event was emitted
d q txs --events 'mint_epoch_end.epoch_number=<reduction_epoch>'
3. Estimate Time Until Max Supply
# Get current supply and provisions
current_supply=$(d q bank total --denom=adt -o json | jq -r '.supply[0].amount')
epoch_provisions=$(d q mint epoch-provisions -o json | jq -r '.epoch_provisions')
max_supply=$(d q mint params -o json | jq -r '.params.max_supply')
# Calculate remaining supply and epochs
# remaining = max_supply - current_supply
# epochs_remaining ≈ remaining / epoch_provisions (simplified, doesn't account for reductions)
4. Propose Parameter Changes
See the governance proposal example in the Transaction Commands section above.