Documentation ¶
Index ¶
- func EmitAcknowledgementEvent(ctx sdk.Context, packet exported.PacketI, ack exported.Acknowledgement, ...)
- func ExportGenesis(ctx sdk.Context, keeper Keeper) genesistypes.ControllerGenesisState
- func InitGenesis(ctx sdk.Context, keeper Keeper, state genesistypes.ControllerGenesisState)
- func NewMsgServerImpl(keeper *Keeper) types.MsgServer
- type Keeper
- func (k Keeper) AuthenticateCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) bool
- func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error
- func (k Keeper) DeleteMiddlewareEnabled(ctx sdk.Context, portID, connectionID string)
- func (k Keeper) GetActiveChannelID(ctx sdk.Context, connectionID, portID string) (string, bool)
- func (k Keeper) GetAllActiveChannels(ctx sdk.Context) []genesistypes.ActiveChannel
- func (k Keeper) GetAllInterchainAccounts(ctx sdk.Context) []genesistypes.RegisteredInterchainAccount
- func (k Keeper) GetAllPorts(ctx sdk.Context) []string
- func (k Keeper) GetAppVersion(ctx sdk.Context, portID, channelID string) (string, bool)
- func (k Keeper) GetAuthority() string
- func (k Keeper) GetConnectionID(ctx sdk.Context, portID, channelID string) (string, error)
- func (k Keeper) GetInterchainAccountAddress(ctx sdk.Context, connectionID, portID string) (string, bool)
- func (k Keeper) GetOpenActiveChannel(ctx sdk.Context, connectionID, portID string) (string, bool)
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) InterchainAccount(goCtx context.Context, req *types.QueryInterchainAccountRequest) (*types.QueryInterchainAccountResponse, error)
- func (k Keeper) IsActiveChannel(ctx sdk.Context, connectionID, portID string) bool
- func (k Keeper) IsActiveChannelClosed(ctx sdk.Context, connectionID, portID string) bool
- func (k Keeper) IsMiddlewareDisabled(ctx sdk.Context, portID, connectionID string) bool
- func (k Keeper) IsMiddlewareEnabled(ctx sdk.Context, portID, connectionID string) bool
- func (Keeper) Logger(ctx sdk.Context) log.Logger
- func (Keeper) OnChanCloseConfirm(ctx sdk.Context, portID, channelID string) error
- func (k Keeper) OnChanOpenAck(ctx sdk.Context, portID, channelID string, counterpartyVersion string) error
- func (k Keeper) OnChanOpenInit(ctx sdk.Context, order channeltypes.Order, connectionHops []string, ...) (string, error)
- func (k Keeper) OnChanUpgradeAck(ctx sdk.Context, portID, channelID, counterpartyVersion string) error
- func (k Keeper) OnChanUpgradeInit(ctx sdk.Context, portID, channelID string, proposedOrder channeltypes.Order, ...) (string, error)
- func (Keeper) OnTimeoutPacket(ctx sdk.Context, packet channeltypes.Packet) error
- func (k Keeper) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) RegisterInterchainAccount(ctx sdk.Context, connectionID, owner, version string) error
- func (k Keeper) RegisterInterchainAccountWithOrdering(ctx sdk.Context, connectionID, owner, version string, ...) error
- func (k Keeper) SendTx(ctx sdk.Context, _ *capabilitytypes.Capability, connectionID, portID string, ...) (uint64, error)deprecated
- func (k Keeper) SetActiveChannelID(ctx sdk.Context, connectionID, portID, channelID string)
- func (k Keeper) SetInterchainAccountAddress(ctx sdk.Context, connectionID, portID, address string)
- func (k Keeper) SetMiddlewareDisabled(ctx sdk.Context, portID, connectionID string)
- func (k Keeper) SetMiddlewareEnabled(ctx sdk.Context, portID, connectionID string)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) UpdateParams(goCtx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error)
- func (k *Keeper) WithICS4Wrapper(wrapper porttypes.ICS4Wrapper)
- type Migrator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EmitAcknowledgementEvent ¶
func EmitAcknowledgementEvent(ctx sdk.Context, packet exported.PacketI, ack exported.Acknowledgement, err error)
EmitAcknowledgementEvent emits an event signalling a successful or failed acknowledgement and including the error details if any.
func ExportGenesis ¶
func ExportGenesis(ctx sdk.Context, keeper Keeper) genesistypes.ControllerGenesisState
ExportGenesis returns the interchain accounts controller exported genesis
func InitGenesis ¶
func InitGenesis(ctx sdk.Context, keeper Keeper, state genesistypes.ControllerGenesisState)
InitGenesis initializes the interchain accounts controller application state from a provided genesis state
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the ICS27 MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper defines the IBC interchain accounts controller keeper
func NewKeeper ¶
func NewKeeper( cdc codec.Codec, key storetypes.StoreKey, legacySubspace icatypes.ParamSubspace, ics4Wrapper porttypes.ICS4Wrapper, channelKeeper icatypes.ChannelKeeper, portKeeper icatypes.PortKeeper, scopedKeeper exported.ScopedKeeper, msgRouter icatypes.MessageRouter, authority string, ) Keeper
NewKeeper creates a new interchain accounts controller Keeper instance
func (Keeper) AuthenticateCapability ¶
func (k Keeper) AuthenticateCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) bool
AuthenticateCapability wraps the scopedKeeper's AuthenticateCapability function
func (Keeper) ClaimCapability ¶
func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error
ClaimCapability wraps the scopedKeeper's ClaimCapability function
func (Keeper) DeleteMiddlewareEnabled ¶
DeleteMiddlewareEnabled deletes the middleware enabled flag stored in state
func (Keeper) GetActiveChannelID ¶
GetActiveChannelID retrieves the active channelID from the store, keyed by the provided connectionID and portID
func (Keeper) GetAllActiveChannels ¶
func (k Keeper) GetAllActiveChannels(ctx sdk.Context) []genesistypes.ActiveChannel
GetAllActiveChannels returns a list of all active interchain accounts controller channels and their associated connection and port identifiers
func (Keeper) GetAllInterchainAccounts ¶
func (k Keeper) GetAllInterchainAccounts(ctx sdk.Context) []genesistypes.RegisteredInterchainAccount
GetAllInterchainAccounts returns a list of all registered interchain account addresses and their associated connection and controller port identifiers
func (Keeper) GetAllPorts ¶
GetAllPorts returns all ports to which the interchain accounts controller module is bound. Used in ExportGenesis
func (Keeper) GetAppVersion ¶
GetAppVersion calls the ICS4Wrapper GetAppVersion function.
func (Keeper) GetAuthority ¶
GetAuthority returns the ica/controller submodule's authority.
func (Keeper) GetConnectionID ¶
GetConnectionID returns the connection id for the given port and channelIDs.
func (Keeper) GetInterchainAccountAddress ¶
func (k Keeper) GetInterchainAccountAddress(ctx sdk.Context, connectionID, portID string) (string, bool)
GetInterchainAccountAddress retrieves the InterchainAccount address from the store associated with the provided connectionID and portID
func (Keeper) GetOpenActiveChannel ¶
GetOpenActiveChannel retrieves the active channelID from the store, keyed by the provided connectionID and portID & checks if the channel in question is in state OPEN
func (Keeper) InterchainAccount ¶
func (k Keeper) InterchainAccount(goCtx context.Context, req *types.QueryInterchainAccountRequest) (*types.QueryInterchainAccountResponse, error)
InterchainAccount implements the Query/InterchainAccount gRPC method
func (Keeper) IsActiveChannel ¶
IsActiveChannel returns true if there exists an active channel for the provided connectionID and portID, otherwise false
func (Keeper) IsActiveChannelClosed ¶
IsActiveChannelClosed retrieves the active channel from the store and returns true if the channel state is CLOSED, otherwise false
func (Keeper) IsMiddlewareDisabled ¶
IsMiddlewareDisabled returns true if the underlying application callbacks are disabled for the given port and connection identifier pair, otherwise false
func (Keeper) IsMiddlewareEnabled ¶
IsMiddlewareEnabled returns true if the underlying application callbacks are enabled for given port and connection identifier pair, otherwise false
func (Keeper) OnChanCloseConfirm ¶
OnChanCloseConfirm removes the active channel stored in state
func (Keeper) OnChanOpenAck ¶
func (k Keeper) OnChanOpenAck( ctx sdk.Context, portID, channelID string, counterpartyVersion string, ) error
OnChanOpenAck sets the active channel for the interchain account/owner pair and stores the associated interchain account address in state keyed by it's corresponding port identifier
func (Keeper) OnChanOpenInit ¶
func (k Keeper) OnChanOpenInit( ctx sdk.Context, order channeltypes.Order, connectionHops []string, portID string, channelID string, chanCap *capabilitytypes.Capability, counterparty channeltypes.Counterparty, version string, ) (string, error)
OnChanOpenInit performs basic validation of channel initialization. The counterparty port identifier must be the host chain representation as defined in the types package, the channel version must be equal to the version in the types package, there must not be an active channel for the specfied port identifier, and the interchain accounts module must be able to claim the channel capability.
func (Keeper) OnChanUpgradeAck ¶ added in v8.1.0
func (k Keeper) OnChanUpgradeAck(ctx sdk.Context, portID, channelID, counterpartyVersion string) error
OnChanUpgradeAck implements the ack setup of the channel upgrade handshake. The upgrade ack callback must verify the proposed changes to the channel version. Within the channel version we have the tx type, encoding, interchain account address, host/controller connectionID's and the ICS27 protocol version.
The following may be changed: - tx type (must be supported) - encoding (must be supported)
The following may not be changed: - controller connectionID - host connectionID - interchain account address - ICS27 protocol version
func (Keeper) OnChanUpgradeInit ¶ added in v8.1.0
func (k Keeper) OnChanUpgradeInit(ctx sdk.Context, portID, channelID string, proposedOrder channeltypes.Order, proposedConnectionHops []string, proposedversion string) (string, error)
OnChanUpgradeInit performs the upgrade init step of the channel upgrade handshake. The upgrade init callback must verify the proposed changes to the order, connectionHops, and version. Within the version we have the tx type, encoding, interchain account address, host/controller connectionID's and the ICS27 protocol version.
The following may be changed: - tx type (must be supported) - encoding (must be supported) - order
The following may not be changed: - connectionHops (and subsequently host/controller connectionIDs) - interchain account address - ICS27 protocol version
func (Keeper) OnTimeoutPacket ¶
OnTimeoutPacket removes the active channel associated with the provided packet, the underlying channel end is closed due to the semantics of ORDERED channels
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Params implements the Query/Params gRPC method
func (Keeper) RegisterInterchainAccount ¶
func (k Keeper) RegisterInterchainAccount(ctx sdk.Context, connectionID, owner, version string) error
Prior to v6.x.x of ibc-go, the controller module was only functional as middleware, with authentication performed by the underlying application. For a full summary of the changes in v6.x.x, please see ADR009. This API will be removed in later releases.
func (Keeper) RegisterInterchainAccountWithOrdering ¶ added in v8.3.0
func (k Keeper) RegisterInterchainAccountWithOrdering(ctx sdk.Context, connectionID, owner, version string, ordering channeltypes.Order) error
Prior to v6.x.x of ibc-go, the controller module was only functional as middleware, with authentication performed by the underlying application. For a full summary of the changes in v6.x.x, please see ADR009. This API will be removed in later releases.
func (Keeper) SendTx
deprecated
func (k Keeper) SendTx(ctx sdk.Context, _ *capabilitytypes.Capability, connectionID, portID string, icaPacketData icatypes.InterchainAccountPacketData, timeoutTimestamp uint64) (uint64, error)
SendTx takes pre-built packet data containing messages to be executed on the host chain from an authentication module and attempts to send the packet. The packet sequence for the outgoing packet is returned as a result. If the base application has the capability to send on the provided portID. An appropriate absolute timeoutTimestamp must be provided. If the packet is timed out, the channel will be closed. In the case of channel closure, a new channel may be reopened to reconnect to the host chain.
Deprecated: this is a legacy API that is only intended to function correctly in workflows where an underlying application has been set. Prior to to v6.x.x of ibc-go, the controller module was only functional as middleware, with authentication performed by the underlying application. For a full summary of the changes in v6.x.x, please see ADR009. This API will be removed in later releases.
func (Keeper) SetActiveChannelID ¶
SetActiveChannelID stores the active channelID, keyed by the provided connectionID and portID
func (Keeper) SetInterchainAccountAddress ¶
SetInterchainAccountAddress stores the InterchainAccount address, keyed by the associated connectionID and portID
func (Keeper) SetMiddlewareDisabled ¶
SetMiddlewareDisabled stores a flag to indicate that the underlying application callbacks should be disabled for the given port and connection identifier pair
func (Keeper) SetMiddlewareEnabled ¶
SetMiddlewareEnabled stores a flag to indicate that the underlying application callbacks should be enabled for the given port and connection identifier pair
func (Keeper) UpdateParams ¶
func (k Keeper) UpdateParams(goCtx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error)
UpdateParams defines an rpc handler method for MsgUpdateParams. Updates the ica/controller submodule's parameters.
func (*Keeper) WithICS4Wrapper ¶
func (k *Keeper) WithICS4Wrapper(wrapper porttypes.ICS4Wrapper)
WithICS4Wrapper sets the ICS4Wrapper. This function may be used after the keepers creation to set the middleware which is above this module in the IBC application stack.
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
Migrator is a struct for handling in-place store migrations.
func NewMigrator ¶
NewMigrator returns Migrator instance for the state migration.
func (Migrator) AssertChannelCapabilityMigrations ¶
AssertChannelCapabilityMigrations checks that all channel capabilities generated using the interchain accounts controller port prefix are owned by the controller submodule and ibc.