Documentation ¶
Index ¶
- func NewMsgServerImpl(kb KeeperBuilder) uibc.MsgServer
- type Keeper
- func (k Keeper) CheckAndUpdateQuota(denom string, newOutflow sdkmath.Int) error
- func (k Keeper) GetAllInflows() (sdk.DecCoins, error)
- func (k Keeper) GetAllOutflows() (sdk.DecCoins, error)
- func (k Keeper) GetExpire() (*time.Time, error)
- func (k Keeper) GetInflowSum() sdk.Dec
- func (k Keeper) GetOutflowSum() sdk.Dec
- func (k Keeper) GetParams() (params uibc.Params)
- func (k Keeper) GetTokenInflow(denom string) sdk.DecCoin
- func (k Keeper) GetTokenOutflows(denom string) sdk.DecCoin
- func (k Keeper) IBCOnRecvPacket(ft ics20types.FungibleTokenPacketData, packet channeltypes.Packet) exported.Acknowledgement
- func (k Keeper) IBCOnSendPacket(packet []byte) error
- func (k Keeper) IBCRevertQuotaUpdate(amount, denom string)
- func (k Keeper) PrefixStore(prefix []byte) store.KVStore
- func (k Keeper) RecordIBCInflow(packet channeltypes.Packet, denom, amount string) exported.Acknowledgement
- func (k Keeper) ResetAllQuotas() error
- func (k Keeper) SetExpire(expires time.Time) error
- func (k Keeper) SetIBCStatus(ibcStatus uibc.IBCTransferStatus) error
- func (k Keeper) SetICS20HooksStatus(enabled bool) error
- func (k Keeper) SetInflowSum(amount sdk.Dec)
- func (k Keeper) SetOutflowSum(amount sdk.Dec)
- func (k Keeper) SetParams(params uibc.Params) error
- func (k Keeper) SetTokenInflow(inflow sdk.DecCoin)
- func (k Keeper) SetTokenInflows(inflows sdk.DecCoins)
- func (k Keeper) SetTokenOutflow(outflow sdk.DecCoin)
- func (k Keeper) SetTokenOutflows(outflows sdk.DecCoins)
- func (k Keeper) UndoUpdateQuota(denom string, amount sdkmath.Int) error
- func (k Keeper) UpdateQuotaParams(msg *uibc.MsgGovUpdateQuota, byEmergencyGroup bool) error
- type KeeperBuilder
- type Querier
- func (q Querier) AllOutflows(goCtx context.Context, _ *uibc.QueryAllOutflows) (*uibc.QueryAllOutflowsResponse, error)
- func (q Querier) Inflows(goCtx context.Context, req *uibc.QueryInflows) (*uibc.QueryInflowsResponse, 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)
- func (q Querier) QuotaExpires(goCtx context.Context, _ *uibc.QueryQuotaExpires) (*uibc.QueryQuotaExpiresResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶ added in v6.3.0
func NewMsgServerImpl(kb KeeperBuilder) uibc.MsgServer
NewMsgServerImpl returns an implementation of uibc.MsgServer
Types ¶
type Keeper ¶ added in v6.3.0
type Keeper struct {
// contains filtered or unexported fields
}
func (Keeper) CheckAndUpdateQuota ¶ added in v6.3.0
CheckAndUpdateQuota checks if adding a newOutflow doesn't exceed the max quota and updates the current quota metrics.
func (Keeper) GetAllInflows ¶ added in v6.3.0
GetAllInflows returns inflows of all registered tokens in USD value.
func (Keeper) GetAllOutflows ¶ added in v6.3.0
GetAllOutflows returns sum of outflows of all tokens in USD value.
func (Keeper) GetInflowSum ¶ added in v6.3.0
GetInflowSum returns the total inflow of ibc-transfer amount.
func (Keeper) GetOutflowSum ¶ added in v6.3.0
GetOutflowSum returns the total outflow of ibc-transfer amount.
func (Keeper) GetTokenInflow ¶ added in v6.3.0
GetTokenInflow returns the inflow of denom from store.
func (Keeper) GetTokenOutflows ¶ added in v6.3.0
GetTokenOutflows returns sum of denom outflows in USD value in the DecCoin structure.
func (Keeper) IBCOnRecvPacket ¶ added in v6.3.0
func (k Keeper) IBCOnRecvPacket(ft ics20types.FungibleTokenPacketData, packet channeltypes.Packet, ) exported.Acknowledgement
func (Keeper) IBCOnSendPacket ¶ added in v6.3.0
func (Keeper) IBCRevertQuotaUpdate ¶ added in v6.3.0
IBCRevertQuotaUpdate must be called on packet acknnowledgemenet error or timeout to revert necessary changes.
func (Keeper) PrefixStore ¶ added in v6.3.0
PrefixStore creates an new prefix store. It will automatically remove provided prefix from keys when using with the iterator.
func (Keeper) RecordIBCInflow ¶ added in v6.3.0
func (k Keeper) RecordIBCInflow(packet channeltypes.Packet, denom, amount string, ) exported.Acknowledgement
RecordIBCInflow will save the inflow amount if token is registered otherwise it will skip
func (Keeper) ResetAllQuotas ¶ added in v6.3.0
ResetAllQuotas will zero the ibc-transfer quotas
func (Keeper) SetIBCStatus ¶ added in v6.3.0
func (k Keeper) SetIBCStatus(ibcStatus uibc.IBCTransferStatus) error
SetIBCStatus update the ibc-transfer status in module params.
func (Keeper) SetICS20HooksStatus ¶ added in v6.4.0
func (Keeper) SetInflowSum ¶ added in v6.3.0
SetInflowSum save the total inflow of ibc-transfer amount.
func (Keeper) SetOutflowSum ¶ added in v6.3.0
SetOutflowSum save the total outflow of ibc-transfer amount.
func (Keeper) SetTokenInflow ¶ added in v6.3.0
SetTokenInflow save the inflow of denom into store.
func (Keeper) SetTokenInflows ¶ added in v6.3.0
SetTokenInflows saves provided updated IBC inflows as a pair: USD value, denom name in the DecCoin structure.
func (Keeper) SetTokenOutflow ¶ added in v6.3.0
SetTokenOutflow save the outflows of denom into store.
func (Keeper) SetTokenOutflows ¶ added in v6.3.0
SetTokenOutflows saves provided updated IBC outflows as a pair: USD value, denom name in the DecCoin structure.
func (Keeper) UndoUpdateQuota ¶ added in v6.3.0
UndoUpdateQuota subtracts `amount` from quota metric of the ibc denom.
func (Keeper) UpdateQuotaParams ¶ added in v6.3.0
func (k Keeper) UpdateQuotaParams(msg *uibc.MsgGovUpdateQuota, byEmergencyGroup bool) error
UpdateQuotaParams update the ibc-transfer quota params for ibc denoms
type KeeperBuilder ¶ added in v6.3.0
type KeeperBuilder struct {
// contains filtered or unexported fields
}
KeeperBuilder constructs Keeper by perparing all related dependencies (notably the store).
func NewKeeperBuilder ¶ added in v6.3.0
func NewKeeperBuilder( cdc codec.BinaryCodec, key storetypes.StoreKey, leverage uibc.Leverage, oracle uibc.Oracle, ugov ugov.EmergencyGroupBuilder, ) KeeperBuilder
func (KeeperBuilder) ExportGenesis ¶ added in v6.3.0
func (kb KeeperBuilder) ExportGenesis(ctx sdk.Context) *uibc.GenesisState
ExportGenesis returns the x/uibc module's exported genesis state.
func (KeeperBuilder) InitGenesis ¶ added in v6.3.0
func (kb KeeperBuilder) InitGenesis(ctx sdk.Context, genState uibc.GenesisState)
InitGenesis initializes the x/uibc module's state from a provided genesis state.
type Querier ¶ added in v6.3.0
type Querier struct {
KeeperBuilder
}
Querier implements a QueryServer for the x/uibc module.
func NewQuerier ¶ added in v6.3.0
func NewQuerier(kb KeeperBuilder) Querier
func (Querier) AllOutflows ¶ added in v6.3.0
func (q Querier) AllOutflows(goCtx context.Context, _ *uibc.QueryAllOutflows) ( *uibc.QueryAllOutflowsResponse, error, )
AllOutflows queries outflows for all denom in the current period.
func (Querier) Inflows ¶ added in v6.3.0
func (q Querier) Inflows(goCtx context.Context, req *uibc.QueryInflows) (*uibc.QueryInflowsResponse, error)
Inflows returns sum of inflows and registered IBC denoms inflows in the current quota period.
func (Querier) Outflows ¶ added in v6.3.0
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 ¶ added in v6.3.0
func (q Querier) Params(goCtx context.Context, _ *uibc.QueryParams) ( *uibc.QueryParamsResponse, error, )
Params returns params of the x/uibc module.
func (Querier) QuotaExpires ¶ added in v6.3.0
func (q Querier) QuotaExpires(goCtx context.Context, _ *uibc.QueryQuotaExpires) (*uibc.QueryQuotaExpiresResponse, error, )
QuotaExpires returns the current ibc quota expire time.