Documentation ¶
Index ¶
- func GetProviderDenom(denom string, packet channeltypes.Packet) (providerDenom string)
- func NewHandler(k *keeper.Keeper) baseapp.MsgServiceHandler
- func NewProviderProposalHandler(k keeper.Keeper) govv1beta1.Handler
- func UnmarshalConsumerPacket(packet channeltypes.Packet) (consumerPacket ccv.ConsumerPacketData, err error)
- func UnmarshalConsumerPacketData(packetData []byte) (consumerPacket ccv.ConsumerPacketData, err error)
- type AppModule
- func (am AppModule) BeginBlock(ctx context.Context) error
- func (AppModule) ConsensusVersion() uint64
- func (am AppModule) EndBlock(ctx context.Context) error
- func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage
- func (AppModule) GenerateGenesisState(simState *module.SimulationState)
- func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, data json.RawMessage)
- func (am AppModule) IsAppModule()
- func (am AppModule) IsOnePerModuleType()
- func (am AppModule) OnAcknowledgementPacket(ctx sdk.Context, packet channeltypes.Packet, acknowledgement []byte, ...) error
- func (am AppModule) OnChanCloseConfirm(ctx sdk.Context, portID, channelID string) error
- func (am AppModule) OnChanCloseInit(ctx sdk.Context, portID, channelID string) error
- func (am AppModule) OnChanOpenAck(ctx sdk.Context, portID, channelID string, counterpartyChannelID string, ...) error
- func (am AppModule) OnChanOpenConfirm(ctx sdk.Context, portID, channelID string) error
- func (am AppModule) OnChanOpenInit(ctx sdk.Context, order channeltypes.Order, connectionHops []string, ...) (string, error)
- func (am AppModule) OnChanOpenTry(ctx sdk.Context, order channeltypes.Order, connectionHops []string, ...) (metadata string, err error)
- func (am AppModule) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet, _ sdk.AccAddress) ibcexported.Acknowledgement
- func (am AppModule) OnTimeoutPacket(ctx sdk.Context, packet channeltypes.Packet, _ sdk.AccAddress) error
- func (AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
- func (am AppModule) RegisterServices(cfg module.Configurator)
- func (am AppModule) RegisterStoreDecoder(sdr simtypes.StoreDecoderRegistry)
- func (am AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation
- type AppModuleBasic
- func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage
- func (AppModuleBasic) GetQueryCmd() *cobra.Command
- func (AppModuleBasic) GetTxCmd() *cobra.Command
- func (AppModuleBasic) Name() string
- func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux)
- func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry)
- func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
- func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error
- type IBCMiddleware
- func (im IBCMiddleware) GetAppVersion(ctx sdk.Context, portID, channelID string) (string, bool)
- func (im IBCMiddleware) OnAcknowledgementPacket(ctx sdk.Context, packet channeltypes.Packet, acknowledgement []byte, ...) error
- func (im IBCMiddleware) OnChanCloseConfirm(ctx sdk.Context, portID, channelID string) error
- func (im IBCMiddleware) OnChanCloseInit(ctx sdk.Context, portID, channelID string) error
- func (im IBCMiddleware) OnChanOpenAck(ctx sdk.Context, portID, channelID string, counterpartyChannelID string, ...) error
- func (im IBCMiddleware) OnChanOpenConfirm(ctx sdk.Context, portID, channelID string) error
- func (im IBCMiddleware) OnChanOpenInit(ctx sdk.Context, order channeltypes.Order, connectionHops []string, ...) (string, error)
- func (im IBCMiddleware) OnChanOpenTry(ctx sdk.Context, order channeltypes.Order, connectionHops []string, ...) (string, error)
- func (im IBCMiddleware) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress) exported.Acknowledgement
- func (im IBCMiddleware) OnTimeoutPacket(ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress) error
- func (im IBCMiddleware) SendPacket(sdk.Context, *capabilitytypes.Capability, string, string, clienttypes.Height, ...) (uint64, error)
- func (im IBCMiddleware) WriteAcknowledgement(ctx sdk.Context, chanCap *capabilitytypes.Capability, packet exported.PacketI, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetProviderDenom ¶ added in v5.1.0
func GetProviderDenom(denom string, packet channeltypes.Packet) (providerDenom string)
GetProviderDenom returns the updated given denom according to the given IBC packet It follows the same logic than the OnRecvPacket method of the IBC transfer module see https://github.com/cosmos/ibc-go/blob/v7.3.2/modules/apps/transfer/keeper/relay.go#L162
func NewHandler ¶
func NewHandler(k *keeper.Keeper) baseapp.MsgServiceHandler
func NewProviderProposalHandler ¶
func NewProviderProposalHandler(k keeper.Keeper) govv1beta1.Handler
NewProviderProposalHandler defines the handler for consumer addition, consumer removal, and consumer reward denom proposals. Passed proposals are executed during EndBlock.
func UnmarshalConsumerPacket ¶
func UnmarshalConsumerPacket(packet channeltypes.Packet) (consumerPacket ccv.ConsumerPacketData, err error)
func UnmarshalConsumerPacketData ¶
func UnmarshalConsumerPacketData(packetData []byte) (consumerPacket ccv.ConsumerPacketData, err error)
Types ¶
type AppModule ¶
type AppModule struct { AppModuleBasic // contains filtered or unexported fields }
AppModule represents the AppModule for this module
func NewAppModule ¶
func NewAppModule(k *keeper.Keeper, paramSpace paramtypes.Subspace) AppModule
NewAppModule creates a new provider module
func (AppModule) BeginBlock ¶
BeginBlock implements the AppModule interface
func (AppModule) ConsensusVersion ¶
ConsensusVersion implements AppModule/ConsensusVersion.
func (AppModule) ExportGenesis ¶
ExportGenesis returns the exported genesis state as raw bytes for the provider module.
func (AppModule) GenerateGenesisState ¶
func (AppModule) GenerateGenesisState(simState *module.SimulationState)
GenerateGenesisState creates a randomized GenState of the transfer module.
func (AppModule) InitGenesis ¶
InitGenesis performs genesis initialization for the provider module. It returns no validator updates. Note: This method along with ValidateGenesis satisfies the CCV spec: https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/methods.md#ccv-pcf-initg1
func (AppModule) IsAppModule ¶
func (am AppModule) IsAppModule()
IsAppModule implements the appmodule.AppModule interface.
func (AppModule) IsOnePerModuleType ¶
func (am AppModule) IsOnePerModuleType()
IsOnePerModuleType implements the depinject.OnePerModuleType interface.
func (AppModule) OnAcknowledgementPacket ¶
func (am AppModule) OnAcknowledgementPacket( ctx sdk.Context, packet channeltypes.Packet, acknowledgement []byte, _ sdk.AccAddress, ) error
OnAcknowledgementPacket implements the IBCModule interface
func (AppModule) OnChanCloseConfirm ¶
OnChanCloseConfirm implements the IBCModule interface
func (AppModule) OnChanCloseInit ¶
OnChanCloseInit implements the IBCModule interface
func (AppModule) OnChanOpenAck ¶
func (am AppModule) OnChanOpenAck( ctx sdk.Context, portID, channelID string, counterpartyChannelID string, counterpartyVersion string, ) error
OnChanOpenAck implements the IBCModule interface
See: https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/methods.md#ccv-pcf-coack1 Spec tag: [CCV-PCF-COACK.1]
func (AppModule) OnChanOpenConfirm ¶
OnChanOpenConfirm implements the IBCModule interface
See: https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/methods.md#ccv-pcf-coconfirm1 Spec tag: [CCV-PCF-COCONFIRM.1]
func (AppModule) OnChanOpenInit ¶
func (am AppModule) OnChanOpenInit( ctx sdk.Context, order channeltypes.Order, connectionHops []string, portID string, channelID string, channelCap *capabilitytypes.Capability, counterparty channeltypes.Counterparty, version string, ) (string, error)
OnChanOpenInit implements the IBCModule interface
See: https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/methods.md#ccv-pcf-coinit1 Spec Tag: [CCV-PCF-COINIT.1]
func (AppModule) OnChanOpenTry ¶
func (am AppModule) OnChanOpenTry( ctx sdk.Context, order channeltypes.Order, connectionHops []string, portID, channelID string, chanCap *capabilitytypes.Capability, counterparty channeltypes.Counterparty, counterpartyVersion string, ) (metadata string, err error)
OnChanOpenTry implements the IBCModule interface
See: https://github.com/cosmos/ibc/blob/main/spec/app/ics-028-cross-chain-validation/methods.md#ccv-pcf-cotry1 Spec tag: [CCV-PCF-COTRY.1]
func (AppModule) OnRecvPacket ¶
func (am AppModule) OnRecvPacket( ctx sdk.Context, packet channeltypes.Packet, _ sdk.AccAddress, ) ibcexported.Acknowledgement
OnRecvPacket implements the IBCModule interface. A successful acknowledgement is returned if the packet data is successfully decoded and the receive application logic returns without error.
func (AppModule) OnTimeoutPacket ¶
func (am AppModule) OnTimeoutPacket( ctx sdk.Context, packet channeltypes.Packet, _ sdk.AccAddress, ) error
OnTimeoutPacket implements the IBCModule interface
func (AppModule) RegisterInvariants ¶
func (AppModule) RegisterInvariants(ir sdk.InvariantRegistry)
RegisterInvariants implements the AppModule interface
func (AppModule) RegisterServices ¶
func (am AppModule) RegisterServices(cfg module.Configurator)
RegisterServices registers module services.
func (AppModule) RegisterStoreDecoder ¶
func (am AppModule) RegisterStoreDecoder(sdr simtypes.StoreDecoderRegistry)
RegisterStoreDecoder registers a decoder for provider module's types
func (AppModule) WeightedOperations ¶
func (am AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation
WeightedOperations returns the all the provider module operations with their respective weights.
type AppModuleBasic ¶
type AppModuleBasic struct{}
AppModuleBasic is the IBC Provider AppModuleBasic
func (AppModuleBasic) DefaultGenesis ¶
func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage
DefaultGenesis returns default genesis state as raw bytes for the ibc provider module.
func (AppModuleBasic) GetQueryCmd ¶
func (AppModuleBasic) GetQueryCmd() *cobra.Command
GetQueryCmd implements AppModuleBasic interface
func (AppModuleBasic) GetTxCmd ¶
func (AppModuleBasic) GetTxCmd() *cobra.Command
GetTxCmd implements AppModuleBasic interface
func (AppModuleBasic) Name ¶
func (AppModuleBasic) Name() string
Name implements AppModuleBasic interface
func (AppModuleBasic) RegisterGRPCGatewayRoutes ¶
func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux)
RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the ibc-provider module.
func (AppModuleBasic) RegisterInterfaces ¶
func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry)
RegisterInterfaces registers module concrete types into protobuf Any.
func (AppModuleBasic) RegisterLegacyAminoCodec ¶
func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
RegisterLegacyAminoCodec implements AppModuleBasic interface
func (AppModuleBasic) ValidateGenesis ¶
func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error
ValidateGenesis performs genesis state validation for the ibc provider module.
type IBCMiddleware ¶ added in v5.1.0
type IBCMiddleware struct {
// contains filtered or unexported fields
}
IBCMiddleware implements the callbacks for the IBC transfer middleware given the provider keeper and the underlying application.
func NewIBCMiddleware ¶ added in v5.1.0
func NewIBCMiddleware(app porttypes.IBCModule, k keeper.Keeper) IBCMiddleware
NewIBCMiddleware creates a new IBCMiddlware given the keeper and underlying application
func (IBCMiddleware) GetAppVersion ¶ added in v5.1.0
GetAppVersion returns the application version of the underlying application
func (IBCMiddleware) OnAcknowledgementPacket ¶ added in v5.1.0
func (im IBCMiddleware) OnAcknowledgementPacket( ctx sdk.Context, packet channeltypes.Packet, acknowledgement []byte, relayer sdk.AccAddress, ) error
OnAcknowledgementPacket implements the IBCMiddleware interface If fees are not enabled, this callback will default to the ibc-core packet callback
func (IBCMiddleware) OnChanCloseConfirm ¶ added in v5.1.0
func (im IBCMiddleware) OnChanCloseConfirm( ctx sdk.Context, portID, channelID string, ) error
OnChanCloseConfirm implements the IBCMiddleware interface
func (IBCMiddleware) OnChanCloseInit ¶ added in v5.1.0
func (im IBCMiddleware) OnChanCloseInit( ctx sdk.Context, portID, channelID string, ) error
OnChanCloseInit implements the IBCMiddleware interface
func (IBCMiddleware) OnChanOpenAck ¶ added in v5.1.0
func (im IBCMiddleware) OnChanOpenAck( ctx sdk.Context, portID, channelID string, counterpartyChannelID string, counterpartyVersion string, ) error
OnChanOpenAck implements the IBCMiddleware interface
func (IBCMiddleware) OnChanOpenConfirm ¶ added in v5.1.0
func (im IBCMiddleware) OnChanOpenConfirm( ctx sdk.Context, portID, channelID string, ) error
OnChanOpenConfirm implements the IBCMiddleware interface
func (IBCMiddleware) OnChanOpenInit ¶ added in v5.1.0
func (im IBCMiddleware) OnChanOpenInit( ctx sdk.Context, order channeltypes.Order, connectionHops []string, portID string, channelID string, chanCap *capabilitytypes.Capability, counterparty channeltypes.Counterparty, version string, ) (string, error)
OnChanOpenInit implements the IBCMiddleware interface
func (IBCMiddleware) OnChanOpenTry ¶ added in v5.1.0
func (im IBCMiddleware) OnChanOpenTry( ctx sdk.Context, order channeltypes.Order, connectionHops []string, portID, channelID string, chanCap *capabilitytypes.Capability, counterparty channeltypes.Counterparty, counterpartyVersion string, ) (string, error)
OnChanOpenTry implements the IBCMiddleware interface
func (IBCMiddleware) OnRecvPacket ¶ added in v5.1.0
func (im IBCMiddleware) OnRecvPacket( ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress, ) exported.Acknowledgement
OnRecvPacket executes the IBC transfer. In case of success, it verifies if the packet sender is a consumer chain and if the received IBC coin is whitelisted. In such instances, it appends the coin to the consumer's chain allocation record
func (IBCMiddleware) OnTimeoutPacket ¶ added in v5.1.0
func (im IBCMiddleware) OnTimeoutPacket( ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress, ) error
OnTimeoutPacket implements the IBCMiddleware interface If fees are not enabled, this callback will default to the ibc-core packet callback
func (IBCMiddleware) SendPacket ¶ added in v5.1.0
func (im IBCMiddleware) SendPacket( sdk.Context, *capabilitytypes.Capability, string, string, clienttypes.Height, uint64, []byte, ) (uint64, error)
SendPacket implements the ICS4 Wrapper interface
func (IBCMiddleware) WriteAcknowledgement ¶ added in v5.1.0
func (im IBCMiddleware) WriteAcknowledgement( ctx sdk.Context, chanCap *capabilitytypes.Capability, packet exported.PacketI, ack exported.Acknowledgement, ) error
WriteAcknowledgement implements the ICS4 Wrapper interface