Documentation
¶
Index ¶
- func NewQueryServer(keeper Keeper) types.QueryServer
- type Keeper
- func (k Keeper) AcceptAssetsLocked(ctx sdk.Context, events types.AssetsLockedEvents) error
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) GetAssetsLockedSequenceTip(ctx sdk.Context) math.Int
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewQueryServer ¶
func NewQueryServer(keeper Keeper) types.QueryServer
NewQueryServer returns an implementation of the QueryServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.Codec, storeKey storetypes.StoreKey, bankKeeper types.BankKeeper, ) Keeper
func (Keeper) AcceptAssetsLocked ¶
AcceptAssetsLocked processes the given AssetsLocked events sequence by minting the corresponding amount of coins for each event and sending them to the recipient address.
Requirements:
- The AssetsLocked sequence must not be empty.
- The AssetsLocked sequence must be valid (i.e. all events in the slice pass the AssetsLockedEvent.IsValid test AND sequence numbers of events form a sequence strictly increasing by 1).
- The sequence number of the first event in the slice must be exactly one greater than the current sequence tip held in the state.
The function returns an error if any of the requirements is not met. Checking the mentioned requirements is crucial to ensure state consistency regardless of the guarantees provided by the upstream code.
If all requirements are met and x/bank interactions are all successful, the current sequence tip in the state is updated to the sequence number of the last event in the slice.
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns the module's exported genesis
func (Keeper) GetAssetsLockedSequenceTip ¶
GetAssetsLockedSequenceTip returns the current sequence tip for the AssetsLocked events. The tip denotes the sequence number of the last event processed by the x/bridge module.
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState)
InitGenesis initializes the module's state from a provided genesis state.