Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) uibc.MsgServer
- type Keeper
- func (k Keeper) CheckAndUpdateQuota(ctx sdk.Context, denom string, newOutflow sdkmath.Int) error
- func (k Keeper) ExportGenesis(ctx sdk.Context) *uibc.GenesisState
- func (k Keeper) GetAllOutflows(ctx sdk.Context) (sdk.DecCoins, error)
- func (k Keeper) GetAppVersion(ctx sdk.Context, portID, channelID string) (string, bool)
- func (k Keeper) GetExpire(ctx sdk.Context) (*time.Time, error)
- func (k Keeper) GetParams(ctx sdk.Context) (params uibc.Params)
- func (k Keeper) GetTokenOutflows(ctx sdk.Context, denom string) (sdk.DecCoin, error)
- func (k Keeper) GetTotalOutflow(ctx sdk.Context) sdk.Dec
- func (k Keeper) InitGenesis(ctx sdk.Context, genState uibc.GenesisState)
- func (k Keeper) PrefixStore(ctx *sdk.Context, prefix []byte) store.KVStore
- func (k Keeper) ResetAllQuotas(ctx sdk.Context) error
- func (k Keeper) SendPacket(ctx sdk.Context, chanCap *capabilitytypes.Capability, sourcePort string, ...) (uint64, error)
- func (k Keeper) SetExpire(ctx sdk.Context, expires time.Time) error
- func (k Keeper) SetIBCStatus(ctx sdk.Context, ibcStatus uibc.IBCTransferStatus) error
- func (k Keeper) SetParams(ctx sdk.Context, params uibc.Params) error
- func (k Keeper) SetTokenOutflow(ctx sdk.Context, outflow sdk.DecCoin)
- func (k Keeper) SetTokenOutflows(ctx sdk.Context, outflows sdk.DecCoins)
- func (k Keeper) SetTotalOutflowSum(ctx sdk.Context, amount sdk.Dec)
- func (k Keeper) UndoUpdateQuota(ctx sdk.Context, denom string, amount sdkmath.Int) error
- func (k Keeper) UpdateQuotaParams(ctx sdk.Context, totalQuota, quotaPerDenom sdk.Dec, ...) error
- func (k Keeper) WriteAcknowledgement(ctx sdk.Context, chanCap *capabilitytypes.Capability, ...) error
- type Querier
- func (q Querier) AllOutflows(goCtx context.Context, _ *uibc.QueryAllOutflows) (*uibc.QueryAllOutflowsResponse, error)
- func (q Querier) Outflows(goCtx context.Context, req *uibc.QueryOutflows) (*uibc.QueryOutflowsResponse, error)
- func (q Querier) Params(goCtx context.Context, _ *uibc.QueryParams) (*uibc.QueryParamsResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of MsgServer for the x/uibc module.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, key storetypes.StoreKey, ics4Wrapper porttypes.ICS4Wrapper, leverageKeeper uibc.LeverageKeeper, oracleKeeper uibc.Oracle, ) Keeper
func (Keeper) CheckAndUpdateQuota ¶
CheckAndUpdateQuota checks if adding a newOutflow doesn't exceed the max quota and updates the current quota metrics.
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *uibc.GenesisState
ExportGenesis returns the x/uibc module's exported genesis state.
func (Keeper) GetAllOutflows ¶
GetAllOutflows returns sum of outflows of all tokens in USD value.
func (Keeper) GetAppVersion ¶
GetAppVersion returns the underlying application version.
func (Keeper) GetTokenOutflows ¶ added in v4.3.0
GetTokenOutflows returns sum of denom outflows in USD value in the DecCoin structure.
func (Keeper) GetTotalOutflow ¶
GetTotalOutflow returns the total outflow of ibc-transfer amount.
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, genState uibc.GenesisState)
InitGenesis initializes the x/uibc module's state from a provided genesis state.
func (Keeper) PrefixStore ¶
PrefixStore creates an new prefix store. It will automatically remove provided prefix from keys when using with the iterator.
func (Keeper) ResetAllQuotas ¶
ResetAllQuotas will zero the ibc-transfer quotas
func (Keeper) SendPacket ¶
func (k Keeper) SendPacket(ctx sdk.Context, chanCap *capabilitytypes.Capability, sourcePort string, sourceChannel string, timeoutHeight clienttypes.Height, timeoutTimestamp uint64, data []byte) (uint64, error)
SendPacket wraps IBC ChannelKeeper's SendPacket function to record quota outflows.
func (Keeper) SetIBCStatus ¶
SetIBCStatus update the ibc pause status in module params.
func (Keeper) SetTokenOutflow ¶ added in v4.3.0
SetTokenOutflow save the outflows of denom into store.
func (Keeper) SetTokenOutflows ¶ added in v4.3.0
SetTokenOutflows saves provided updated IBC outflows as a pair: USD value, denom name in the DecCoin structure.
func (Keeper) SetTotalOutflowSum ¶
SetTotalOutflowSum save the total outflow of ibc-transfer amount.
func (Keeper) UndoUpdateQuota ¶
UndoUpdateQuota subtracts `amount` from quota metric of the ibc denom.
func (Keeper) UpdateQuotaParams ¶
func (k Keeper) UpdateQuotaParams(ctx sdk.Context, totalQuota, quotaPerDenom sdk.Dec, quotaDuration time.Duration, ) error
UpdateQuotaParams update the ibc-transfer quota params for ibc denoms
func (Keeper) WriteAcknowledgement ¶
func (k Keeper) WriteAcknowledgement(ctx sdk.Context, chanCap *capabilitytypes.Capability, packet ibcexported.PacketI, acknowledgement ibcexported.Acknowledgement, ) error
WriteAcknowledgement wraps IBC ChannelKeeper's WriteAcknowledgement function ICS29 WriteAcknowledgement is used for asynchronous acknowledgements
type Querier ¶
type Querier struct {
Keeper
}
Querier implements a QueryServer for the x/uibc module.
func NewQuerier ¶
func (Querier) AllOutflows ¶
func (q Querier) AllOutflows(goCtx context.Context, _ *uibc.QueryAllOutflows) ( *uibc.QueryAllOutflowsResponse, error, )
AllOutflows queries outflows for all denom in the current period.
func (Querier) Outflows ¶
func (q Querier) Outflows(goCtx context.Context, req *uibc.QueryOutflows) ( *uibc.QueryOutflowsResponse, error, )
Outflows queries denom outflows in the current period. If req.Denom is not set, then we return total outflows.
func (Querier) Params ¶
func (q Querier) Params(goCtx context.Context, _ *uibc.QueryParams) ( *uibc.QueryParamsResponse, error, )
Params returns params of the x/uibc module.