mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-14 03:55:19 +00:00
27 lines
755 B
Go
27 lines
755 B
Go
|
package keeper
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
|
||
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||
|
"github.com/kava-labs/kava/x/kavamint/types"
|
||
|
)
|
||
|
|
||
|
var _ types.QueryServer = Keeper{}
|
||
|
|
||
|
// Params returns params of the mint module.
|
||
|
func (k Keeper) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error) {
|
||
|
ctx := sdk.UnwrapSDKContext(c)
|
||
|
params := k.GetParams(ctx)
|
||
|
|
||
|
return &types.QueryParamsResponse{Params: params}, nil
|
||
|
}
|
||
|
|
||
|
// Inflation returns minter.Inflation of the mint module.
|
||
|
func (k Keeper) Inflation(c context.Context, _ *types.QueryInflationRequest) (*types.QueryInflationResponse, error) {
|
||
|
ctx := sdk.UnwrapSDKContext(c)
|
||
|
inflation := k.CumulativeInflation(ctx)
|
||
|
|
||
|
return &types.QueryInflationResponse{Inflation: inflation}, nil
|
||
|
}
|