keeper

package
v0.26.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMigrationHandler added in v0.14.0

func GetMigrationHandler(k Keeper) func(_ sdk.Context) error

GetMigrationHandler returns the handler that performs in-place store migrations from v0.24 to v0.25 The migration includes - add transfer limit - add end blocker limit

func NewAddressValidator added in v0.9.0

func NewAddressValidator(keeper types.BaseKeeper, bank types.BankKeeper) nexus.AddressValidator

NewAddressValidator returns the callback for validating cosmos SDK addresses

func NewMsgServerImpl

NewMsgServerImpl returns an implementation of the axelarnet MsgServiceServer interface for the provided Keeper.

Types

type IBCKeeper added in v0.23.0

type IBCKeeper struct {
	// contains filtered or unexported fields
}

IBCKeeper provides function to send IBC transfer

func NewIBCKeeper added in v0.23.0

func NewIBCKeeper(k Keeper, ibcTransferK types.IBCTransferKeeper, channelK types.ChannelKeeper) IBCKeeper

NewIBCKeeper returns a new IBCKeeper

func (IBCKeeper) SendIBCTransfer added in v0.23.0

func (i IBCKeeper) SendIBCTransfer(ctx sdk.Context, transfer types.IBCTransfer) error

SendIBCTransfer inits an IBC transfer

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

Keeper provides access to all state changes regarding the Axelarnet module

func NewKeeper

func NewKeeper(cdc codec.BinaryCodec, storeKey sdk.StoreKey, paramSpace params.Subspace, channelK types.ChannelKeeper) Keeper

NewKeeper returns a new axelarnet keeper

func (Keeper) DeleteSeqIDMapping added in v0.23.0

func (k Keeper) DeleteSeqIDMapping(ctx sdk.Context, portID, channelID string, seq uint64)

DeleteSeqIDMapping deletes (port, channel, packet seq) -> transfer ID mapping

func (Keeper) EnqueueIBCTransfer added in v0.23.0

func (k Keeper) EnqueueIBCTransfer(ctx sdk.Context, transfer types.IBCTransfer) error

EnqueueIBCTransfer stores the pending ibc transfer in the queue

func (Keeper) ExportGenesis added in v0.9.0

func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState

ExportGenesis returns the reward module's genesis state.

func (Keeper) GetCosmosChainByName added in v0.9.0

func (k Keeper) GetCosmosChainByName(ctx sdk.Context, chain nexus.ChainName) (types.CosmosChain, bool)

GetCosmosChainByName gets the address prefix of the given cosmos chain

func (Keeper) GetCosmosChains

func (k Keeper) GetCosmosChains(ctx sdk.Context) []nexus.ChainName

GetCosmosChains retrieves all registered cosmos chain names

func (Keeper) GetEndBlockerLimit added in v0.25.0

func (k Keeper) GetEndBlockerLimit(ctx sdk.Context) uint64

GetEndBlockerLimit returns the transfer limit for IBC transfers routed in the end blocker by axelarnet

func (Keeper) GetFailedTransfer added in v0.21.0

func (k Keeper) GetFailedTransfer(ctx sdk.Context, id nexus.TransferID) (transfer types.IBCTransfer, ok bool)

GetFailedTransfer returns the failed transfer for the given transfer ID

func (Keeper) GetFeeCollector

func (k Keeper) GetFeeCollector(ctx sdk.Context) (sdk.AccAddress, bool)

GetFeeCollector gets axelarnet fee collector

func (Keeper) GetIBCPath

func (k Keeper) GetIBCPath(ctx sdk.Context, chain nexus.ChainName) (string, bool)

GetIBCPath retrieves the IBC path associated to the specified chain

func (Keeper) GetIBCTransferQueue added in v0.21.0

func (k Keeper) GetIBCTransferQueue(ctx sdk.Context) utils.KVQueue

GetIBCTransferQueue returns the queue of IBC transfers

func (Keeper) GetRouteTimeoutWindow

func (k Keeper) GetRouteTimeoutWindow(ctx sdk.Context) uint64

GetRouteTimeoutWindow returns the timeout window for IBC transfers routed by axelarnet

func (Keeper) GetSeqIDMapping added in v0.23.0

func (k Keeper) GetSeqIDMapping(ctx sdk.Context, portID, channelID string, seq uint64) (nexus.TransferID, bool)

GetSeqIDMapping gets transfer ID by port, channel and packet seq

func (Keeper) GetTransfer added in v0.23.0

func (k Keeper) GetTransfer(ctx sdk.Context, id nexus.TransferID) (transfer types.IBCTransfer, ok bool)

GetTransfer returns the ibc transfer for the given transfer ID

func (Keeper) GetTransferLimit added in v0.25.0

func (k Keeper) GetTransferLimit(ctx sdk.Context) uint64

GetTransferLimit returns the transfer limit for transfers processed by axelarnet

func (Keeper) InitGenesis added in v0.9.0

func (k Keeper) InitGenesis(ctx sdk.Context, genState *types.GenesisState)

InitGenesis initializes the axelarnet module's state from a given genesis state.

func (Keeper) IsCosmosChain added in v0.12.0

func (k Keeper) IsCosmosChain(ctx sdk.Context, chain nexus.ChainName) bool

IsCosmosChain returns true if the given chain name is for a cosmos chain

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

Logger returns a module-specific logger.

func (Keeper) SetCosmosChain added in v0.9.0

func (k Keeper) SetCosmosChain(ctx sdk.Context, chain types.CosmosChain)

SetCosmosChain sets the address prefix for the given cosmos chain

func (Keeper) SetFeeCollector

func (k Keeper) SetFeeCollector(ctx sdk.Context, address sdk.AccAddress) error

SetFeeCollector sets axelarnet fee collector

func (Keeper) SetIBCPath added in v0.23.0

func (k Keeper) SetIBCPath(ctx sdk.Context, chain nexus.ChainName, path string) error

SetIBCPath set an IBC path for a cosmos chain. Path can only be set once.

func (Keeper) SetSeqIDMapping added in v0.23.0

func (k Keeper) SetSeqIDMapping(ctx sdk.Context, t types.IBCTransfer) error

SetSeqIDMapping sets transfer ID by port, channel and packet seq

func (Keeper) SetTransferCompleted added in v0.23.0

func (k Keeper) SetTransferCompleted(ctx sdk.Context, transferID nexus.TransferID) error

SetTransferCompleted sets the transfer as completed

func (Keeper) SetTransferFailed added in v0.23.0

func (k Keeper) SetTransferFailed(ctx sdk.Context, transferID nexus.TransferID) error

SetTransferFailed sets the transfer as failed

func (Keeper) SetTransferPending added in v0.23.0

func (k Keeper) SetTransferPending(ctx sdk.Context, transferID nexus.TransferID) error

SetTransferPending sets the transfer as pending

type Querier added in v0.17.0

type Querier struct {
	// contains filtered or unexported fields
}

Querier implements the grpc querier

func NewGRPCQuerier added in v0.17.0

func NewGRPCQuerier(k types.BaseKeeper, n types.Nexus) Querier

NewGRPCQuerier returns a new Querier

func (Querier) PendingIBCTransferCount added in v0.17.0

PendingIBCTransferCount returns the number of pending IBC transfers per Cosmos chain, upto the transfer limit

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL