Documentation ¶
Index ¶
- Variables
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) CapacityByDenom(ctx context.Context, req *types.QueryCapacityByDenomRequest) (*types.QueryCapacityByDenomResponse, error)
- func (k Keeper) GetBaseline(ctx sdk.Context, denom string, limiter types.Limiter) *big.Int
- func (k Keeper) GetDenomCapacity(ctx sdk.Context, denom string) (val types.DenomCapacity)
- func (k Keeper) GetLimitParams(ctx sdk.Context, denom string) (val types.LimitParams)
- func (k Keeper) HasAuthority(authority string) bool
- func (k Keeper) InitializeForGenesis(ctx sdk.Context)
- func (k Keeper) ListLimitParams(ctx context.Context, req *types.ListLimitParamsRequest) (*types.ListLimitParamsResponse, error)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) ProcessDeposit(ctx sdk.Context, denom string, amount *big.Int)
- func (k Keeper) ProcessWithdrawal(ctx sdk.Context, denom string, amount *big.Int) error
- func (k Keeper) SetDenomCapacity(ctx sdk.Context, denomCapacity types.DenomCapacity)
- func (k Keeper) SetLimitParams(ctx sdk.Context, limitParams types.LimitParams)
Constants ¶
This section is empty.
Variables ¶
var ( // TempTVLPlacerholder is a placeholder value for TVL. // TODO(CORE-836): Remove this after `GetBaseline` is fully implemented. TempTVLPlacerholder = big.NewInt(20_000_000_000_000) )
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey storetypes.StoreKey, authorities []string, ) *Keeper
func (Keeper) CapacityByDenom ¶
func (k Keeper) CapacityByDenom( ctx context.Context, req *types.QueryCapacityByDenomRequest, ) (*types.QueryCapacityByDenomResponse, error)
func (Keeper) GetBaseline ¶
GetBaseline returns the current capacity baseline for the given limiter. `baseline` formula:
baseline = max(baseline_minimum, baseline_tvl_ppm * current_tvl)
func (Keeper) GetDenomCapacity ¶
GetDenomCapacity returns `DenomCapacity` for the given denom.
func (Keeper) GetLimitParams ¶
GetLimitParams returns `LimitParams` for the given denom.
func (Keeper) HasAuthority ¶
func (Keeper) InitializeForGenesis ¶
func (Keeper) ListLimitParams ¶
func (k Keeper) ListLimitParams( ctx context.Context, req *types.ListLimitParamsRequest, ) (*types.ListLimitParamsResponse, error)
func (Keeper) ProcessDeposit ¶
ProcessDeposit processes a inbound IBC transfer, by updating the capacity lists for the denom.
func (Keeper) ProcessWithdrawal ¶
ProcessWithdrawal processes an outbound IBC transfer, by updating the capacity lists for the denom.
func (Keeper) SetDenomCapacity ¶
func (k Keeper) SetDenomCapacity( ctx sdk.Context, denomCapacity types.DenomCapacity, )
SetDenomCapacity sets `DenomCapacity` for the given denom.
func (Keeper) SetLimitParams ¶
func (k Keeper) SetLimitParams( ctx sdk.Context, limitParams types.LimitParams, )
SetLimitParams sets `LimitParams` for the given denom. Also overwrites the existing `DenomCapacity` object for the denom with a default `capacity_list` of the same length as the `limiters` list. Each `capacity` is initialized to the current baseline.