Documentation ¶
Index ¶
Constants ¶
const ( // ModuleName defines the interchain price module name ModuleName = "interchainprice" // PortID is the default port id that the interchain price module binds to PortID = "interchain-price" // VersionPrefix defines the current version for interchain accounts VersionPrefix = "ics27-1" // Delimiter is the delimiter used for the interchain price version string Delimiter = "." )
const ( // ControllerPortFormat is the expected port identifier format to which controller chains must conform // See (TODO: Link to spec when updated) ControllerPortFormat = "<app-version>.<controller-conn-seq>.<host-conn-seq>.<owner>" )
Variables ¶
var ( ErrUnknownDataType = sdkerrors.Register(ModuleName, 2, "unknown data type") ErrAccountAlreadyExist = sdkerrors.Register(ModuleName, 3, "account already exist") ErrPortAlreadyBound = sdkerrors.Register(ModuleName, 4, "port is already bound") ErrInvalidChannelFlow = sdkerrors.Register(ModuleName, 5, "invalid message sent to channel end") ErrInvalidOutgoingData = sdkerrors.Register(ModuleName, 6, "invalid outgoing data") ErrInvalidRoute = sdkerrors.Register(ModuleName, 7, "invalid route") ErrInterchainAccountNotFound = sdkerrors.Register(ModuleName, 8, "interchain account not found") ErrInterchainAccountAlreadySet = sdkerrors.Register(ModuleName, 9, "interchain account is already set") ErrActiveChannelNotFound = sdkerrors.Register(ModuleName, 10, "no active channel for this owner") ErrInvalidVersion = sdkerrors.Register(ModuleName, 11, "invalid interchain accounts version") ErrInvalidAccountAddress = sdkerrors.Register(ModuleName, 12, "invalid account address") ErrUnsupported = sdkerrors.Register(ModuleName, 13, "interchain account does not support this action") )
Functions ¶
func ParseControllerConnSequence ¶
ParseControllerConnSequence attempts to parse the controller connection sequence from the provided port identifier The port identifier must match the controller chain format outlined in (TODO: link spec), otherwise an empty string is returned
func ParseHostConnSequence ¶
ParseHostConnSequence attempts to parse the host connection sequence from the provided port identifier The port identifier must match the controller chain format outlined in (TODO: link spec), otherwise an empty string is returned
func ValidateVersion ¶
ValidateVersion performs basic validation of the provided ics27 version string. An ics27 version string may include an optional account address as per [TODO: Add spec when available] ValidateVersion first attempts to split the version string using the standard delimiter, then asserts a supported version prefix is included, followed by additional checks which enforce constraints on the account address.
Types ¶
type ChannelKeeper ¶
type ChannelKeeper interface { GetChannel(ctx sdk.Context, srcPort, srcChan string) (channel channeltypes.Channel, found bool) GetNextSequenceSend(ctx sdk.Context, portID, channelID string) (uint64, bool) CounterpartyHops(ctx sdk.Context, channel channeltypes.Channel) ([]string, bool) }
ChannelKeeper defines the expected IBC channel keeper
type PortKeeper ¶
type PortKeeper interface { BindPort(ctx sdk.Context, portID string) *capabilitytypes.Capability IsBound(ctx sdk.Context, portID string) bool }
PortKeeper defines the expected IBC port keeper