Documentation ¶
Index ¶
- Variables
- func NewMsgServerImpl(k *Keeper) types.MsgServer
- type Keeper
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k *Keeper) ForwardTransferPacket(ctx sdk.Context, inFlightPacket *types.InFlightPacket, ...) error
- func (k *Keeper) GetAndClearInFlightPacket(ctx sdk.Context, channel string, port string, sequence uint64) *types.InFlightPacket
- func (k *Keeper) GetAppVersion(ctx sdk.Context, portID, channelID string) (string, bool)
- func (k Keeper) GetAuthority() string
- func (k Keeper) GetFeePercentage(ctx sdk.Context) sdk.Dec
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) InitGenesis(ctx sdk.Context, state types.GenesisState)
- func (k *Keeper) Logger(ctx sdk.Context) log.Logger
- func (k *Keeper) LookupModuleByChannel(ctx sdk.Context, portID, channelID string) (string, *capabilitytypes.Capability, error)
- func (k Keeper) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k *Keeper) RemoveInFlightPacket(ctx sdk.Context, packet channeltypes.Packet)
- func (k *Keeper) RetryTimeout(ctx sdk.Context, channel, port string, ...) error
- func (k Keeper) SendPacket(ctx sdk.Context, chanCap *capabilitytypes.Capability, sourcePort string, ...) (sequence uint64, err error)
- func (k Keeper) SetParams(ctx sdk.Context, p types.Params) error
- func (k *Keeper) SetTransferKeeper(transferKeeper types.TransferKeeper)
- func (k *Keeper) TimeoutShouldRetry(ctx sdk.Context, packet channeltypes.Packet) (*types.InFlightPacket, error)
- func (k *Keeper) WriteAcknowledgement(ctx sdk.Context, chanCap *capabilitytypes.Capability, ...) error
- func (k *Keeper) WriteAcknowledgementForForwardedPacket(ctx sdk.Context, packet channeltypes.Packet, ...) error
- type Migrator
Constants ¶
This section is empty.
Variables ¶
var ( // DefaultTransferPacketTimeoutHeight is the timeout height following IBC defaults DefaultTransferPacketTimeoutHeight = clienttypes.Height{ RevisionNumber: 0, RevisionHeight: 0, } // DefaultForwardTransferPacketTimeoutTimestamp is the timeout timestamp following IBC defaults DefaultForwardTransferPacketTimeoutTimestamp = time.Duration(transfertypes.DefaultRelativePacketTimeoutTimestamp) * time.Nanosecond // DefaultRefundTransferPacketTimeoutTimestamp is a 28-day timeout for refund packets since funds are stuck in packetforward module otherwise. DefaultRefundTransferPacketTimeoutTimestamp = 28 * 24 * time.Hour )
Functions ¶
func NewMsgServerImpl ¶ added in v7.1.0
NewMsgServerImpl returns an implementation of the x/packetforward MsgServer interface.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper defines the packet forward middleware keeper
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, key storetypes.StoreKey, transferKeeper types.TransferKeeper, channelKeeper types.ChannelKeeper, distrKeeper types.DistributionKeeper, bankKeeper types.BankKeeper, ics4Wrapper porttypes.ICS4Wrapper, authority string, ) *Keeper
NewKeeper creates a new forward Keeper instance
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis
func (*Keeper) ForwardTransferPacket ¶
func (k *Keeper) ForwardTransferPacket( ctx sdk.Context, inFlightPacket *types.InFlightPacket, srcPacket channeltypes.Packet, srcPacketSender string, receiver string, metadata *types.ForwardMetadata, token sdk.Coin, maxRetries uint8, timeout time.Duration, labels []metrics.Label, nonrefundable bool, ) error
func (*Keeper) GetAndClearInFlightPacket ¶
func (k *Keeper) GetAndClearInFlightPacket( ctx sdk.Context, channel string, port string, sequence uint64, ) *types.InFlightPacket
GetAndClearInFlightPacket will fetch an InFlightPacket from the store, remove it if it exists, and return it.
func (*Keeper) GetAppVersion ¶
WriteAcknowledgement wraps IBC ICS4Wrapper GetAppVersion function.
func (Keeper) GetAuthority ¶ added in v7.1.0
GetAuthority returns the module's authority.
func (Keeper) GetFeePercentage ¶
GetFeePercentage retrieves the fee percentage for forwarded packets from the store.
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, state types.GenesisState)
InitGenesis
func (*Keeper) LookupModuleByChannel ¶
func (k *Keeper) LookupModuleByChannel(ctx sdk.Context, portID, channelID string) (string, *capabilitytypes.Capability, error)
LookupModuleByChannel wraps ChannelKeeper LookupModuleByChannel function.
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (*Keeper) RemoveInFlightPacket ¶
func (k *Keeper) RemoveInFlightPacket(ctx sdk.Context, packet channeltypes.Packet)
func (*Keeper) RetryTimeout ¶
func (k *Keeper) RetryTimeout( ctx sdk.Context, channel, port string, data transfertypes.FungibleTokenPacketData, inFlightPacket *types.InFlightPacket, ) error
func (Keeper) SendPacket ¶
func (k Keeper) SendPacket( ctx sdk.Context, chanCap *capabilitytypes.Capability, sourcePort string, sourceChannel string, timeoutHeight clienttypes.Height, timeoutTimestamp uint64, data []byte, ) (sequence uint64, err error)
SendPacket wraps IBC ChannelKeeper's SendPacket function
func (*Keeper) SetTransferKeeper ¶
func (k *Keeper) SetTransferKeeper(transferKeeper types.TransferKeeper)
SetTransferKeeper sets the transferKeeper
func (*Keeper) TimeoutShouldRetry ¶
func (k *Keeper) TimeoutShouldRetry( ctx sdk.Context, packet channeltypes.Packet, ) (*types.InFlightPacket, error)
TimeoutShouldRetry returns inFlightPacket and no error if retry should be attempted. Error is returned if IBC refund should occur.
func (*Keeper) WriteAcknowledgement ¶
func (k *Keeper) WriteAcknowledgement(ctx sdk.Context, chanCap *capabilitytypes.Capability, packet ibcexported.PacketI, acknowledgement ibcexported.Acknowledgement) error
WriteAcknowledgement wraps IBC ICS4Wrapper WriteAcknowledgement function. ICS29 WriteAcknowledgement is used for asynchronous acknowledgements.
func (*Keeper) WriteAcknowledgementForForwardedPacket ¶
func (k *Keeper) WriteAcknowledgementForForwardedPacket( ctx sdk.Context, packet channeltypes.Packet, data transfertypes.FungibleTokenPacketData, inFlightPacket *types.InFlightPacket, ack channeltypes.Acknowledgement, ) error
type Migrator ¶ added in v7.1.0
type Migrator struct {
// contains filtered or unexported fields
}
Migrator is a struct for handling in-place state migrations.
func (Migrator) Migrate1to2 ¶ added in v7.1.0
Migrate1to2 migrates the module state from the consensus version 1 to version 2. Specifically, it takes the parameters that are currently stored and managed by the x/params modules and stores them directly into the module state.