keeper

package
v4.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: Apache-2.0 Imports: 20 Imported by: 2

Documentation

Index

Constants

View Source
const (
	LabelSubmitTx                  = "submit_tx"
	LabelHandleAcknowledgment      = "handle_ack"
	LabelLabelHandleChanOpenAck    = "handle_chan_open_ack"
	LabelRegisterInterchainAccount = "register_interchain_account"
	LabelHandleTimeout             = "handle_timeout"
)

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) ictxtypes.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

func SerializeCosmosTx

func SerializeCosmosTx(cdc codec.BinaryCodec, msgs []*codectypes.Any) (bz []byte, err error)

SerializeCosmosTx serializes a slice of *types.Any messages using the CosmosTx type. The proto marshaled CosmosTx bytes are returned. This differs from icatypes.SerializeCosmosTx in that it does not serialize sdk.Msgs, but simply uses the already serialized values.

Types

type Keeper

type Keeper struct {
	Codec codec.BinaryCodec
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey,
	memKey storetypes.StoreKey,
	channelKeeper types.ChannelKeeper,
	icaControllerKeeper types.ICAControllerKeeper,
	icaControllerMsgServer types.ICAControllerMsgServer,
	sudoKeeper types.WasmKeeper,
	feeKeeper types.FeeRefunderKeeper,
	bankKeeper types.BankKeeper,
	getFeeCollectorAddr types.GetFeeCollectorAddr,
	authority string,
) *Keeper

func (Keeper) ChargeFee

func (k Keeper) ChargeFee(ctx sdk.Context, payer sdk.AccAddress, fee sdk.Coins) error

func (Keeper) GetAuthority

func (k Keeper) GetAuthority() string

func (Keeper) GetICARegistrationFeeFirstCodeID

func (k Keeper) GetICARegistrationFeeFirstCodeID(ctx sdk.Context) (codeID uint64)

GetICARegistrationFeeFirstCodeID returns code id, starting from which we charge fee for ICA registration

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)

GetParams get all parameters as types.Params

func (*Keeper) HandleAcknowledgement

func (k *Keeper) HandleAcknowledgement(ctx sdk.Context, packet channeltypes.Packet, acknowledgement []byte, relayer sdk.AccAddress) error

HandleAcknowledgement passes the acknowledgement data to the appropriate contract via a sudo call.

func (*Keeper) HandleChanOpenAck

func (k *Keeper) HandleChanOpenAck(
	ctx sdk.Context,
	portID,
	channelID,
	counterpartyChannelID,
	counterpartyVersion string,
) error

HandleChanOpenAck passes the data about a successfully created channel to the appropriate contract (== the data about a successfully registered interchain account). Notice that in the case of an ICA channel - it is not yet in OPEN state here the last step of channel opening(confirm) happens on the host chain.

func (*Keeper) HandleTimeout

func (k *Keeper) HandleTimeout(ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress) error

HandleTimeout passes the timeout data to the appropriate contract via a sudo call. Since all ICA channels are ORDERED, a single timeout shuts down a channel.

func (*Keeper) Logger

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

func (Keeper) Params

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error

SetParams set the params

func (Keeper) SubmitTx

func (Keeper) UpdateParams

UpdateParams updates the module parameters

Jump to

Keyboard shortcuts

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