Documentation ¶
Index ¶
- func Difference[T comparable](a, b []T) []T
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func NewQueryServerImpl(keeper Keeper) types.QueryServer
- type ChangeAssetStatusResult
- type Keeper
- func (k Keeper) ChangeAssetStatus(ctx sdk.Context, assetID types.AssetID, newStatus types.AssetStatus) (ChangeAssetStatusResult, error)
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) GetInboundTransfer(ctx sdk.Context, externalID string, externalHeight uint64) (types.InboundTransfer, error)
- func (k Keeper) GetLastTransferHeight(ctx sdk.Context, assetID types.AssetID) (uint64, error)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) InboundTransfer(ctx sdk.Context, externalID string, externalHeight uint64, sender string, ...) error
- func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState)
- func (k Keeper) IsTransferFinalized(ctx sdk.Context, externalID string) bool
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) OutboundTransfer(ctx sdk.Context, sourceAddr string, assetID types.AssetID, amount math.Int) error
- func (k Keeper) SaveFinalizedTransfer(ctx sdk.Context, externalID string)
- func (k Keeper) SetParam(ctx sdk.Context, key []byte, value interface{})
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) UpdateLastAssetHeight(ctx sdk.Context, assetID types.AssetID, height uint64)
- func (k Keeper) UpdateParams(ctx sdk.Context, newParams types.Params) (UpdateParamsResult, error)
- func (k Keeper) UpsertInboundTransfer(ctx sdk.Context, t types.InboundTransfer) error
- type UpdateParamsResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Difference ¶
func Difference[T comparable](a, b []T) []T
Difference returns the slice of elements that are elements of a but not elements of b. TODO: Placed here temporarily. Delete after releasing the new osmoutils version.
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
func NewQueryServerImpl ¶
func NewQueryServerImpl(keeper Keeper) types.QueryServer
NewQueryServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type ChangeAssetStatusResult ¶
type ChangeAssetStatusResult struct { OldStatus types.AssetStatus NewStatus types.AssetStatus }
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( storeKey storetypes.StoreKey, cdc codec.BinaryCodec, paramSpace paramtypes.Subspace, router *baseapp.MsgServiceRouter, accountKeeper types.AccountKeeper, govModuleAddr string, ) Keeper
NewKeeper returns a new instance of the x/bridge keeper.
func (Keeper) ChangeAssetStatus ¶
func (k Keeper) ChangeAssetStatus( ctx sdk.Context, assetID types.AssetID, newStatus types.AssetStatus, ) (ChangeAssetStatusResult, error)
ChangeAssetStatus changes the status of the provided asset to newStatus. Returns error if the provided asset is not found in the module params.
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns the bridge module's exported genesis.
func (Keeper) GetInboundTransfer ¶
func (k Keeper) GetInboundTransfer(ctx sdk.Context, externalID string, externalHeight uint64) (types.InboundTransfer, error)
GetInboundTransfer returns the transfer by the external id and height.
func (Keeper) GetLastTransferHeight ¶
GetLastTransferHeight returns the last transfer height for the given asset.
func (Keeper) InboundTransfer ¶
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState)
InitGenesis initializes the bridge module's state from a provided genesis state.
func (Keeper) IsTransferFinalized ¶
IsTransferFinalized returns true if the transfer was found in the finalized transfers set.
func (Keeper) OutboundTransfer ¶
func (Keeper) SaveFinalizedTransfer ¶
SaveFinalizedTransfer creates a new finalized transfer with the given external id.
func (Keeper) SetParam ¶
SetParam sets a specific bridge module's parameter with the provided parameter.
func (Keeper) UpdateLastAssetHeight ¶
UpdateLastAssetHeight properly updates the last transfer height of the asset. If the height of the asset is not found, then create it. Set the height as a maximum of the currently saved height and the provided one since the latest height can't decrease.
func (Keeper) UpdateParams ¶
UpdateParams properly updates params of the module.
func (Keeper) UpsertInboundTransfer ¶
UpsertInboundTransfer updates or inserts the value depending on whether it is already presented in the store or not.
type UpdateParamsResult ¶
type UpdateParamsResult struct {
// contains filtered or unexported fields
}