keeper

package
v0.0.0-...-fb8f645 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LabelSubmitTx                  = "submit_tx"
	LabelHandleAcknowledgment      = "handle_ack"
	LabelLabelHandleChanOpenAck    = "handle_chan_open_ack"
	LabelRegisterInterchainAccount = "register_interchain_account"
	LabelHandleTimeout             = "handle_timeout"
)
View Source
const (
	// GasReserve is the amount of gas on the context gas meter we need to reserve in order to add contract failure to keeper
	GasReserve = 15000
)

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,
	paramstore paramtypes.Subspace,
	channelKeeper types.ChannelKeeper,
	icaControllerKeeper types.ICAControllerKeeper,
	scopedKeeper types.ScopedKeeper,
	contractManagerKeeper types.ContractManagerKeeper,
	feeKeeper types.FeeRefunderKeeper,
) *Keeper

func (*Keeper) ClaimCapability

func (k *Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error

ClaimCapability claims the channel capability passed via the OnOpenChanInit callback

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. The affected zone should be paused after a timeout.

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)

SetParams set the params

func (Keeper) SubmitTx

Jump to

Keyboard shortcuts

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