keeper

package
v6.0.0-...-d56d304 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInterchainLiquidityPoolKey

func GetInterchainLiquidityPoolKey(count uint64) []byte

func HandleMarketFeeUpdateProposal

func HandleMarketFeeUpdateProposal(ctx sdk.Context, k Keeper, p *types.MarketFeeUpdateProposal) error

HandleMarketFeeUpdateProposal is a handler for executing a passed community spend proposal

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

Types

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey storetypes.StoreKey,
	ps paramtypes.Subspace,
	ics4Wrapper porttypes.ICS4Wrapper,
	channelKeeper types.ChannelKeeper,
	portKeeper types.PortKeeper,
	bankKeeper types.BankKeeper,
	authKeeper types.AccountKeeper,
	scopedKeeper capabilitykeeper.ScopedKeeper,
	msgRouter types.MessageRouter,

) *Keeper

func (Keeper) AppendInterchainLiquidityPool

func (k Keeper) AppendInterchainLiquidityPool(ctx sdk.Context, interchainLiquidityPool types.InterchainLiquidityPool)

Modified SetInterchainLiquidityPool

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

func (k Keeper) BindPort(ctx sdk.Context, portID string) error

BindPort defines a wrapper function for the port Keeper's function in order to expose it to module's InitGenesis function

func (Keeper) BurnTokens

func (k Keeper) BurnTokens(ctx sdk.Context, sender sdk.AccAddress, tokens sdk.Coin) error

func (Keeper) ChanCloseInit

func (k Keeper) ChanCloseInit(ctx sdk.Context, portID, channelID string) error

ChanCloseInit defines a wrapper function for the channel Keeper's function.

func (Keeper) ClaimCapability

func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error

ClaimCapability allows the IBC app module to claim a capability that core IBC passes to it

func (Keeper) EmitEvent

func (k Keeper) EmitEvent(ctx sdk.Context,
	action, poolID, sender string, attr ...sdk.Attribute,
)

func (Keeper) EscrowAddress

You may need to adjust the function signature, return types, and parameter types based on your module's implementation

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) GetAllInterchainLiquidityPool

func (k Keeper) GetAllInterchainLiquidityPool(ctx sdk.Context) (list []types.InterchainLiquidityPool)

GetAllInterchainLiquidityPool returns all interchainLiquidityPool

func (Keeper) GetAllInterchainMarketMaker

func (k Keeper) GetAllInterchainMarketMaker(ctx sdk.Context) (list []types.InterchainMarketMaker)

GetAllInterchainMarketMaker returns all interchainMarketMaker

func (Keeper) GetAllMultiDepositOrder

func (k Keeper) GetAllMultiDepositOrder(ctx sdk.Context, poolId string) (list []types.MultiAssetDepositOrder)

GetAllMultiDepositOrder returns all multiDepositOrder

func (Keeper) GetBalance

func (k Keeper) GetBalance(ctx sdk.Context, sender sdk.AccAddress) sdk.Coin

func (Keeper) GetCountByPoolId

func (k Keeper) GetCountByPoolId(ctx sdk.Context, poolId string) (count uint64, found bool)

Gets the count index of the poolId

func (Keeper) GetCounterPartyChainID

func (k Keeper) GetCounterPartyChainID(ctx sdk.Context, portID, channelID string) (string, bool)

func (Keeper) GetInitialPoolAssets

func (k Keeper) GetInitialPoolAssets(ctx sdk.Context, poolId string) sdk.Coins

func (Keeper) GetInterchainLiquidityPool

func (k Keeper) GetInterchainLiquidityPool(ctx sdk.Context, poolId string) (val types.InterchainLiquidityPool, found bool)

Modified GetInterchainLiquidityPool

func (Keeper) GetInterchainMarketMaker

func (k Keeper) GetInterchainMarketMaker(
	ctx sdk.Context,
	poolId string,

) (val types.InterchainMarketMaker, found bool)

GetInterchainMarketMaker returns a interchainMarketMaker from its index

func (Keeper) GetLatestMultiDepositOrderId

func (k Keeper) GetLatestMultiDepositOrderId(
	ctx sdk.Context,
	poolId,
	sourceMaker string,

) (val string, found bool)

GetMultiDepositOrder returns a multiDepositOrder from its index

func (Keeper) GetMultiDepositOrder

func (k Keeper) GetMultiDepositOrder(
	ctx sdk.Context,
	poolId,
	orderId string,

) (val types.MultiAssetDepositOrder, found bool)

GetMultiDepositOrder returns a multiDepositOrder from its index

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) types.Params

GetParams get all parameters as types.Params

func (Keeper) GetPoolCount

func (k Keeper) GetPoolCount(ctx sdk.Context) uint64

func (Keeper) GetPort

func (k Keeper) GetPort(ctx sdk.Context) string

GetPort returns the portID for the IBC app module. Used in ExportGenesis

func (Keeper) GetSwapEnabled

func (k Keeper) GetSwapEnabled(ctx sdk.Context) bool

GetSwapEnabled retrieves the send enabled boolean from the paramstore

func (Keeper) GetSwapFeeRate

func (k Keeper) GetSwapFeeRate(ctx sdk.Context) uint32

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) InterchainLatestMultiDepositOrderByCreator

You may need to adjust the function signature, return types, and parameter types based on your module's implementation

func (Keeper) InterchainMultiDepositOrder

You may need to adjust the function signature, return types, and parameter types based on your module's implementation

func (Keeper) InterchainMultiDepositOrdersAll

You may need to adjust the function signature, return types, and parameter types based on your module's implementation

func (Keeper) IsBound

func (k Keeper) IsBound(ctx sdk.Context, portID string) bool

IsBound checks if the IBC app module is already bound to the desired port

func (Keeper) LockTokens

func (k Keeper) LockTokens(ctx sdk.Context, sourcePort string, sourceChannel string, sender sdk.AccAddress, tokens sdk.Coins) error

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

func (Keeper) MintTokens

func (k Keeper) MintTokens(ctx sdk.Context, receiver sdk.AccAddress, tokens sdk.Coin) error

func (Keeper) OnAcknowledgementPacket

func (k Keeper) OnAcknowledgementPacket(ctx sdk.Context, packet channeltypes.Packet, data *types.IBCSwapPacketData, ack channeltypes.Acknowledgement) error

OnAcknowledgementPacket processes the packet acknowledgement and performs actions based on the acknowledgement type

func (Keeper) OnCancelMultiAssetDepositAcknowledged

func (k Keeper) OnCancelMultiAssetDepositAcknowledged(ctx sdk.Context, req *types.MsgCancelMultiAssetDepositRequest) error

OnMultiAssetDepositAcknowledged processes a double deposit acknowledgement, mints voucher tokens, and updates the liquidity pool.

func (Keeper) OnCancelMultiAssetDepositReceived

func (k Keeper) OnCancelMultiAssetDepositReceived(ctx sdk.Context, msg *types.MsgCancelMultiAssetDepositRequest) (*types.MsgCancelMultiAssetDepositResponse, error)

OnMultiAssetDepositReceived processes a double deposit request and returns a response or an error.

func (Keeper) OnCancelPoolAcknowledged

func (k Keeper) OnCancelPoolAcknowledged(ctx sdk.Context, msg *types.MsgCancelPoolRequest) error

OnCreatePoolAcknowledged processes the create pool acknowledgement, mints LP tokens, and saves the liquidity pool.

func (Keeper) OnCancelPoolReceived

func (k Keeper) OnCancelPoolReceived(ctx sdk.Context, msg *types.MsgCancelPoolRequest) (*types.MsgCancelPoolResponse, error)

func (Keeper) OnMakeMultiAssetDepositReceived

func (k Keeper) OnMakeMultiAssetDepositReceived(ctx sdk.Context, msg *types.MsgMakeMultiAssetDepositRequest, stateChange *types.StateChange) (*types.MsgMultiAssetDepositResponse, error)

OnMultiAssetDepositReceived processes a double deposit request and returns a response or an error.

func (Keeper) OnMakePoolAcknowledged

func (k Keeper) OnMakePoolAcknowledged(ctx sdk.Context, msg *types.MsgMakePoolRequest, poolId string) error

OnCreatePoolAcknowledged processes the create pool acknowledgement, mints LP tokens, and saves the liquidity pool.

func (Keeper) OnMakePoolReceived

func (k Keeper) OnMakePoolReceived(ctx sdk.Context, msg *types.MsgMakePoolRequest, poolID, sourceChainId string) (*string, error)

onReceive

func (Keeper) OnMultiAssetWithdrawAcknowledged

func (k Keeper) OnMultiAssetWithdrawAcknowledged(ctx sdk.Context, req *types.MsgMultiAssetWithdrawRequest, stateChange types.StateChange) error

func (Keeper) OnMultiAssetWithdrawReceived

func (k Keeper) OnMultiAssetWithdrawReceived(ctx sdk.Context, msg *types.MsgMultiAssetWithdrawRequest, stateChange *types.StateChange) (*types.MsgMultiAssetWithdrawResponse, error)

OnMultiAssetWithdrawReceived processes a withdrawal request and returns a response or an error.

func (Keeper) OnRecvPacket

func (k Keeper) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet, data types.IBCSwapPacketData) ([]byte, error)

func (Keeper) OnSingleAssetDepositAcknowledged

func (k Keeper) OnSingleAssetDepositAcknowledged(ctx sdk.Context, req *types.MsgSingleAssetDepositRequest, res *types.MsgSingleAssetDepositResponse) error

OnSingleAssetDepositAcknowledged processes a single deposit acknowledgement, mints voucher tokens, and updates the liquidity pool.

func (Keeper) OnSingleAssetDepositReceived

func (k Keeper) OnSingleAssetDepositReceived(ctx sdk.Context, msg *types.MsgSingleAssetDepositRequest, stateChange *types.StateChange) (*types.MsgSingleAssetDepositResponse, error)

func (Keeper) OnSwapAcknowledged

func (k Keeper) OnSwapAcknowledged(ctx sdk.Context, req *types.MsgSwapRequest, res *types.MsgSwapResponse) error

func (Keeper) OnSwapReceived

func (k Keeper) OnSwapReceived(ctx sdk.Context, msg *types.MsgSwapRequest, stateChange *types.StateChange) (*types.MsgSwapResponse, error)

OnSwapReceived processes a swap request and returns a response or an error.

func (Keeper) OnTakeMultiAssetDepositAcknowledged

func (k Keeper) OnTakeMultiAssetDepositAcknowledged(ctx sdk.Context, req *types.MsgTakeMultiAssetDepositRequest, stateChange types.StateChange) error

OnMultiAssetDepositAcknowledged processes a double deposit acknowledgement, mints voucher tokens, and updates the liquidity pool.

func (Keeper) OnTakeMultiAssetDepositReceived

func (k Keeper) OnTakeMultiAssetDepositReceived(ctx sdk.Context, msg *types.MsgTakeMultiAssetDepositRequest, stateChange *types.StateChange) (*types.MsgMultiAssetDepositResponse, error)

OnMultiAssetDepositReceived processes a double deposit request and returns a response or an error.

func (Keeper) OnTakePoolAcknowledged

func (k Keeper) OnTakePoolAcknowledged(ctx sdk.Context, msg *types.MsgTakePoolRequest) error

OnCreatePoolAcknowledged processes the create pool acknowledgement, mints LP tokens, and saves the liquidity pool.

func (Keeper) OnTakePoolReceived

func (k Keeper) OnTakePoolReceived(ctx sdk.Context, msg *types.MsgTakePoolRequest) (*types.MsgTakePoolResponse, error)

func (Keeper) OnTimeoutPacket

func (k Keeper) OnTimeoutPacket(ctx sdk.Context, packet channeltypes.Packet, data *types.IBCSwapPacketData) error

OnTimeoutPacket processes a timeout packet and refunds the tokens

func (Keeper) Params

func (Keeper) RemoveInterchainLiquidityPool

func (k Keeper) RemoveInterchainLiquidityPool(
	ctx sdk.Context,
	poolId string,

)

RemoveInterchainLiquidityPool removes a interchainLiquidityPool from the store

func (Keeper) RemoveInterchainMarketMaker

func (k Keeper) RemoveInterchainMarketMaker(
	ctx sdk.Context,
	poolId string,

)

RemoveInterchainMarketMaker removes a interchainMarketMaker from the store

func (Keeper) RemoveMultiDepositOrder

func (k Keeper) RemoveMultiDepositOrder(
	ctx sdk.Context,
	poolId string,
	orderId string,

)

RemoveMultiDepositOrder removes a multiDepositOrder from the store

func (Keeper) SendIBCSwapPacket

func (k Keeper) SendIBCSwapPacket(
	ctx sdk.Context,
	sourcePort,
	sourceChannel string,
	timeoutHeight clienttypes.Height,
	timeoutTimestamp uint64,
	swapPacket types.IBCSwapPacketData,
) (*uint64, error)

func (Keeper) SetInitialPoolAssets

func (k Keeper) SetInitialPoolAssets(ctx sdk.Context, poolId string, tokens sdk.Coins)

SetInterchainLiquidityPool set a specific interchainLiquidityPool in the store from its index

func (Keeper) SetInterchainLiquidityPool

func (k Keeper) SetInterchainLiquidityPool(ctx sdk.Context, interchainLiquidityPool types.InterchainLiquidityPool)

func (Keeper) SetInterchainMarketMaker

func (k Keeper) SetInterchainMarketMaker(ctx sdk.Context, interchainMarketMaker types.InterchainMarketMaker)

SetInterchainMarketMaker set a specific interchainMarketMaker in the store from its index

func (Keeper) SetLatestOrderId

func (k Keeper) SetLatestOrderId(ctx sdk.Context, poolId, sourceMaker, orderId string)

SetMultiDepositOrder set a specific multiDepositOrder in the store from its index

func (Keeper) SetMultiDepositOrder

func (k Keeper) SetMultiDepositOrder(ctx sdk.Context, multiDepositOrder types.MultiAssetDepositOrder)

SetMultiDepositOrder set a specific multiDepositOrder in the store from its index

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

SetParams set the params

func (Keeper) SetPoolCount

func (k Keeper) SetPoolCount(ctx sdk.Context, count uint64)

func (Keeper) SetPoolIdToCountMapping

func (k Keeper) SetPoolIdToCountMapping(ctx sdk.Context, poolId string, count uint64)

Sets the mapping between poolId and its count index

func (Keeper) SetPort

func (k Keeper) SetPort(ctx sdk.Context, portID string)

SetPort sets the portID for the IBC app module. Used in InitGenesis

func (Keeper) SetSwapFeeRate

func (k Keeper) SetSwapFeeRate(ctx sdk.Context, fee uint32)

func (Keeper) SingleDepositTest

func (k Keeper) SingleDepositTest(ctx sdk.Context, sender sdk.AccAddress) sdk.Coin

func (Keeper) UnlockTokens

func (k Keeper) UnlockTokens(ctx sdk.Context, port string, channel string, receiver sdk.AccAddress, tokens sdk.Coins) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL