Documentation ¶
Index ¶
- Variables
- type Keeper
- func (k Keeper) AuthenticateCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) bool
- func (k Keeper) BindPort(ctx sdk.Context, portID string) error
- func (k Keeper) CancelSwap(goCtx context.Context, msg *types.MsgCancelSwapRequest) (*types.MsgCancelSwapResponse, error)
- func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error
- func (q Keeper) EscrowAddress(c context.Context, req *types.QueryEscrowAddressRequest) (*types.QueryEscrowAddressResponse, error)
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) GetAllLimitOrders(ctx sdk.Context) []types.LimitOrder
- func (k Keeper) GetAllOTCOrders(ctx sdk.Context) []types.OTCOrder
- func (k Keeper) GetLimitOrder(ctx sdk.Context, orderId string) (types.LimitOrder, bool)
- func (k Keeper) GetOTCOrder(ctx sdk.Context, orderId string) (types.OTCOrder, bool)
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) GetPort(ctx sdk.Context) string
- func (k Keeper) GetSwapEnabled(ctx sdk.Context) bool
- func (k Keeper) GetSwapMaxFeeRate(ctx sdk.Context) uint32
- func (k Keeper) HasLimitOrder(ctx sdk.Context, orderId string) bool
- func (k Keeper) HasOTCOrder(ctx sdk.Context, orderId string) bool
- func (k Keeper) InitGenesis(ctx sdk.Context, state types.GenesisState)
- func (k Keeper) IsBound(ctx sdk.Context, portID string) bool
- func (k Keeper) IterateLimitOrders(ctx sdk.Context, cb func(order types.LimitOrder) bool)
- func (k Keeper) IterateOTCOrders(ctx sdk.Context, cb func(order types.OTCOrder) bool)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MakeSwap(goCtx context.Context, msg *types.MsgMakeSwapRequest) (*types.MsgMakeSwapResponse, error)
- func (k Keeper) MarshalLimitOrder(order types.LimitOrder) ([]byte, error)
- func (k Keeper) MarshalOTCOrder(order types.OTCOrder) ([]byte, error)
- func (k Keeper) MustMarshalLimitOrder(order types.LimitOrder) []byte
- func (k Keeper) MustMarshalOTCOrder(order types.OTCOrder) []byte
- func (k Keeper) MustUnmarshalLimitOrder(bz []byte) types.LimitOrder
- func (k Keeper) MustUnmarshalOTCOrder(bz []byte) types.OTCOrder
- func (k Keeper) OnAcknowledgementPacket(ctx sdk.Context, packet channeltypes.Packet, data *types.AtomicSwapPacketData, ...) error
- func (k Keeper) OnReceivedCancel(ctx sdk.Context, packet channeltypes.Packet, msg *types.MsgCancelSwapRequest) error
- func (k Keeper) OnReceivedMake(ctx sdk.Context, packet channeltypes.Packet, msg *types.MsgMakeSwapRequest) error
- func (k Keeper) OnReceivedTake(ctx sdk.Context, packet channeltypes.Packet, msg *types.MsgTakeSwapRequest) error
- func (k Keeper) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet, data types.AtomicSwapPacketData) error
- func (k Keeper) OnTimeoutPacket(ctx sdk.Context, packet channeltypes.Packet, data *types.AtomicSwapPacketData) error
- func (q Keeper) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) SendSwapPacket(ctx sdk.Context, sourcePort, sourceChannel string, ...) error
- func (k Keeper) SetLimitOrder(ctx sdk.Context, order types.LimitOrder)
- func (k Keeper) SetOTCOrder(ctx sdk.Context, order types.OTCOrder)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetPort(ctx sdk.Context, portID string)
- func (k Keeper) TakeSwap(goCtx context.Context, msg *types.MsgTakeSwapRequest) (*types.MsgTakeSwapResponse, error)
- func (k Keeper) UnmarshalLimitOrder(bz []byte) (types.LimitOrder, error)
- func (k Keeper) UnmarshalOTCOrder(bz []byte) (types.OTCOrder, error)
Constants ¶
This section is empty.
Variables ¶
var ( StepSend = 1 StepReceive = 2 StepAcknowledgement = 3 )
Functions ¶
This section is empty.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper defines the IBC Swap keeper
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, key sdk.StoreKey, paramSpace paramtypes.Subspace, ics4Wrapper types.ICS4Wrapper, channelKeeper types.ChannelKeeper, portKeeper types.PortKeeper, authKeeper types.AccountKeeper, bankKeeper types.BankKeeper, scopedKeeper capabilitykeeper.ScopedKeeper, ) Keeper
NewKeeper creates a new IBC transfer 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) BindPort ¶
BindPort defines a wrapper function for the ort Keeper's function in order to expose it to module's InitGenesis function
func (Keeper) CancelSwap ¶
func (k Keeper) CancelSwap(goCtx context.Context, msg *types.MsgCancelSwapRequest) (*types.MsgCancelSwapResponse, error)
func (Keeper) ClaimCapability ¶
func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error
ClaimCapability allows the swap module that can claim a capability that IBC module passes to it
func (Keeper) EscrowAddress ¶
func (q Keeper) EscrowAddress(c context.Context, req *types.QueryEscrowAddressRequest) (*types.QueryEscrowAddressResponse, error)
EscrowAddress implements the EscrowAddress gRPC method
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis exports ibc-transfer module's portID and denom trace info into its genesis state.
func (Keeper) GetAllLimitOrders ¶
func (k Keeper) GetAllLimitOrders(ctx sdk.Context) []types.LimitOrder
GetAllLimitOrders returns the information for all the limit orders.
func (Keeper) GetAllOTCOrders ¶
GetAllOTCOrders returns the information for all the limit orders.
func (Keeper) GetLimitOrder ¶
GetLimitOrder returns the LimitOrder for the swap module.
func (Keeper) GetOTCOrder ¶
GetOTCOrder returns the OTCOrder for the swap module.
func (Keeper) GetSwapEnabled ¶
GetSwapEnabled retrieves the send enabled boolean from the paramstore
func (Keeper) HasLimitOrder ¶
HasLimitOrder checks if a the key with the given id exists on the store.
func (Keeper) HasOTCOrder ¶
HasOTCOrder checks if a the key with the given id exists on the store.
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, state types.GenesisState)
InitGenesis initializes the ibc-transfer state and binds to PortID.
func (Keeper) IterateLimitOrders ¶
IterateLimitOrders iterates over the limit orders in the store and performs a callback function.
func (Keeper) IterateOTCOrders ¶
IterateOTCOrders iterates over the limit orders in the store and performs a callback function.
func (Keeper) MakeSwap ¶
func (k Keeper) MakeSwap(goCtx context.Context, msg *types.MsgMakeSwapRequest) (*types.MsgMakeSwapResponse, error)
func (Keeper) MarshalLimitOrder ¶
func (k Keeper) MarshalLimitOrder(order types.LimitOrder) ([]byte, error)
MarshalLimitOrder attempts to encode an LimitOrder object and returns the raw encoded bytes.
func (Keeper) MarshalOTCOrder ¶
MarshalOTCOrder attempts to encode an OTCOrder object and returns the raw encoded bytes.
func (Keeper) MustMarshalLimitOrder ¶
func (k Keeper) MustMarshalLimitOrder(order types.LimitOrder) []byte
MustMarshalLimitOrder attempts to encode an LimitOrder object and returns the raw encoded bytes. It panics on error.
func (Keeper) MustMarshalOTCOrder ¶
MustMarshalOTCOrder attempts to encode an OTCOrder object and returns the raw encoded bytes. It panics on error.
func (Keeper) MustUnmarshalLimitOrder ¶
func (k Keeper) MustUnmarshalLimitOrder(bz []byte) types.LimitOrder
MustUnmarshalLimitOrder attempts to decode and return an LimitOrder object from raw encoded bytes. It panics on error.
func (Keeper) MustUnmarshalOTCOrder ¶
MustUnmarshalOTCOrder attempts to decode and return an OTCOrder object from raw encoded bytes. It panics on error.
func (Keeper) OnAcknowledgementPacket ¶
func (k Keeper) OnAcknowledgementPacket(ctx sdk.Context, packet channeltypes.Packet, data *types.AtomicSwapPacketData, ack channeltypes.Acknowledgement) error
func (Keeper) OnReceivedCancel ¶
func (k Keeper) OnReceivedCancel(ctx sdk.Context, packet channeltypes.Packet, msg *types.MsgCancelSwapRequest) error
func (Keeper) OnReceivedMake ¶
func (k Keeper) OnReceivedMake(ctx sdk.Context, packet channeltypes.Packet, msg *types.MsgMakeSwapRequest) error
func (Keeper) OnReceivedTake ¶
func (k Keeper) OnReceivedTake(ctx sdk.Context, packet channeltypes.Packet, msg *types.MsgTakeSwapRequest) error
func (Keeper) OnRecvPacket ¶
func (k Keeper) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet, data types.AtomicSwapPacketData) error
func (Keeper) OnTimeoutPacket ¶
func (k Keeper) OnTimeoutPacket(ctx sdk.Context, packet channeltypes.Packet, data *types.AtomicSwapPacketData) error
func (Keeper) Params ¶
func (q Keeper) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Params implements the Query/Params gRPC method
func (Keeper) SendSwapPacket ¶
func (k Keeper) SendSwapPacket( ctx sdk.Context, sourcePort, sourceChannel string, timeoutHeight clienttypes.Height, timeoutTimestamp uint64, swapPacket types.AtomicSwapPacketData, ) error
func (Keeper) SetLimitOrder ¶
func (k Keeper) SetLimitOrder(ctx sdk.Context, order types.LimitOrder)
SetLimitOrder sets a new LimitOrder to the store.
func (Keeper) SetOTCOrder ¶
SetOTCOrder sets a new OTCOrder to the store.
func (Keeper) TakeSwap ¶
func (k Keeper) TakeSwap(goCtx context.Context, msg *types.MsgTakeSwapRequest) (*types.MsgTakeSwapResponse, error)
func (Keeper) UnmarshalLimitOrder ¶
func (k Keeper) UnmarshalLimitOrder(bz []byte) (types.LimitOrder, error)
UnmarshalLimitOrder attempts to decode and return an LimitOrder object from raw encoded bytes.