Documentation ¶
Index ¶
- type Keeper
- func (k Keeper) GetAppVersion(ctx sdk.Context, portID, channelID string) (string, bool)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) RefundPacketToken(ctx sdk.Context, packet channeltypes.Packet, ...) error
- func (k Keeper) SendCoins(ctx sdk.Context, fromAddr, toAddr string, amt sdk.Coins) error
- func (k Keeper) SendPacket(ctx sdk.Context, chanCap *capabilitytypes.Capability, sourcePort string, ...) (sequence uint64, err error)
- func (k Keeper) Swap(ctx sdk.Context, originalCreator string, msg *dextypes.MsgPlaceLimitOrder) (*dextypes.MsgPlaceLimitOrderResponse, error)
- func (k Keeper) WriteAcknowledgement(ctx sdk.Context, chanCap *capabilitytypes.Capability, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper defines the swap middleware keeper.
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, msgServiceRouter *baseapp.MsgServiceRouter, ics4Wrapper porttypes.ICS4Wrapper, bankKeeper types.BankKeeper, ) Keeper
NewKeeper creates a new swap Keeper instance.
func (Keeper) GetAppVersion ¶
func (Keeper) RefundPacketToken ¶
func (k Keeper) RefundPacketToken( ctx sdk.Context, packet channeltypes.Packet, data transfertypes.FungibleTokenPacketData, metadata *types.SwapMetadata, ) error
RefundPacketToken handles the burning or escrow lock up of vouchers when an asset should be refunded. This is only used in the case where we call into the transfer modules OnRecvPacket callback but then the swap fails.
func (Keeper) SendCoins ¶
SendCoins wraps the BankKeepers SendCoins function so it can be invoked from the middleware.
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) Swap ¶
func (k Keeper) Swap( ctx sdk.Context, originalCreator string, msg *dextypes.MsgPlaceLimitOrder, ) (*dextypes.MsgPlaceLimitOrderResponse, error)
Swap calls into the base app's msg service router so that the appropriate handler is called when sending the swap msg.
func (Keeper) WriteAcknowledgement ¶
func (k Keeper) WriteAcknowledgement( ctx sdk.Context, chanCap *capabilitytypes.Capability, packet ibcexported.PacketI, acknowledgement ibcexported.Acknowledgement, ) error
WriteAcknowledgement wraps IBC ChannelKeeper's WriteAcknowledgement function.