Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) BurnPoolShareFromAccount(ctx sdk.Context, pool types.PoolI, addr sdk.AccAddress, amount sdk.Int) error
- func (k Keeper) CalculateSpotPrice(ctx sdk.Context, poolId uint64, tokenInDenom, tokenOutDenom string) (sdk.Dec, error)
- func (k Keeper) CalculateSpotPriceWithSwapFee(ctx sdk.Context, poolId uint64, tokenInDenom, tokenOutDenom string) (sdk.Dec, error)
- func (k Keeper) CreatePool(ctx sdk.Context, sender sdk.AccAddress, poolParams types.PoolParams, ...) (uint64, error)
- func (k Keeper) EstimateSwapExactAmountIn(ctx context.Context, req *types.QuerySwapExactAmountInRequest) (*types.QuerySwapExactAmountInResponse, error)
- func (k Keeper) EstimateSwapExactAmountOut(ctx context.Context, req *types.QuerySwapExactAmountOutRequest) (*types.QuerySwapExactAmountOutResponse, error)
- func (k Keeper) ExitPool(ctx sdk.Context, sender sdk.AccAddress, poolId uint64, shareInAmount sdk.Int, ...) (err error)
- func (k Keeper) ExitSwapExternAmountOut(ctx sdk.Context, sender sdk.AccAddress, poolId uint64, tokenOut sdk.Coin, ...) (shareInAmount sdk.Int, err error)
- func (k Keeper) ExitSwapShareAmountIn(ctx sdk.Context, sender sdk.AccAddress, poolId uint64, tokenOutDenom string, ...) (tokenOutAmount sdk.Int, err error)
- func (k Keeper) GetPool(ctx sdk.Context, poolId uint64) (types.PoolI, error)
- func (k Keeper) JoinPool(ctx sdk.Context, sender sdk.AccAddress, poolId uint64, shareOutAmount sdk.Int, ...) (err error)
- func (k Keeper) JoinSwapExternAmountIn(ctx sdk.Context, sender sdk.AccAddress, poolId uint64, tokenIn sdk.Coin, ...) (shareOutAmount sdk.Int, err error)
- func (k Keeper) JoinSwapShareAmountOut(ctx sdk.Context, sender sdk.AccAddress, poolId uint64, tokenInDenom string, ...) (tokenInAmount sdk.Int, err error)
- func (k Keeper) MarshalPool(pool types.PoolI) ([]byte, error)
- func (k Keeper) MintPoolShareToAccount(ctx sdk.Context, pool types.PoolI, addr sdk.AccAddress, amount sdk.Int) error
- func (k Keeper) MultihopSwapExactAmountIn(ctx sdk.Context, sender sdk.AccAddress, routes []types.SwapAmountInRoute, ...) (tokenOutAmount sdk.Int, err error)
- func (k Keeper) MultihopSwapExactAmountOut(ctx sdk.Context, sender sdk.AccAddress, routes []types.SwapAmountOutRoute, ...) (tokenInAmount sdk.Int, err error)
- func (k Keeper) Pool(ctx context.Context, req *types.QueryPoolRequest) (*types.QueryPoolResponse, error)
- func (k Keeper) PoolAssets(ctx context.Context, req *types.QueryPoolAssetsRequest) (*types.QueryPoolAssetsResponse, error)
- func (k Keeper) PoolParams(ctx context.Context, req *types.QueryPoolParamsRequest) (*types.QueryPoolParamsResponse, error)
- func (k Keeper) Pools(ctx context.Context, req *types.QueryPoolsRequest) (*types.QueryPoolsResponse, error)
- func (k *Keeper) SetHooks(gh types.GammHooks) *Keeper
- func (k Keeper) SetPool(ctx sdk.Context, pool types.PoolI) error
- func (k Keeper) SpotPrice(ctx context.Context, req *types.QuerySpotPriceRequest) (*types.QuerySpotPriceResponse, error)
- func (k Keeper) SwapExactAmountIn(ctx sdk.Context, sender sdk.AccAddress, poolId uint64, tokenIn sdk.Coin, ...) (tokenOutAmount sdk.Int, spotPriceAfter sdk.Dec, err error)
- func (k Keeper) SwapExactAmountOut(ctx sdk.Context, sender sdk.AccAddress, poolId uint64, tokenInDenom string, ...) (tokenInAmount sdk.Int, spotPriceAfter sdk.Dec, err error)
- func (k Keeper) TotalPools(ctx context.Context, req *types.QueryTotalPoolsRequest) (*types.QueryTotalPoolsResponse, error)
- func (k Keeper) TotalShare(ctx context.Context, req *types.QueryTotalShareRequest) (*types.QueryTotalShareResponse, error)
- func (k Keeper) UnmarshalPool(bz []byte) (types.PoolI, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper(cdc codec.BinaryMarshaler, storeKey sdk.StoreKey, accountKeeper types.AccountKeeper, bankKeeper bankkeeper.Keeper) Keeper
func (Keeper) BurnPoolShareFromAccount ¶
func (Keeper) CalculateSpotPrice ¶
func (Keeper) CalculateSpotPriceWithSwapFee ¶
func (Keeper) CreatePool ¶
func (Keeper) EstimateSwapExactAmountIn ¶
func (k Keeper) EstimateSwapExactAmountIn(ctx context.Context, req *types.QuerySwapExactAmountInRequest) (*types.QuerySwapExactAmountInResponse, error)
func (Keeper) EstimateSwapExactAmountOut ¶
func (k Keeper) EstimateSwapExactAmountOut(ctx context.Context, req *types.QuerySwapExactAmountOutRequest) (*types.QuerySwapExactAmountOutResponse, error)
func (Keeper) ExitSwapExternAmountOut ¶
func (Keeper) ExitSwapShareAmountIn ¶
func (Keeper) JoinSwapExternAmountIn ¶
func (Keeper) JoinSwapShareAmountOut ¶
func (Keeper) MintPoolShareToAccount ¶
func (Keeper) MultihopSwapExactAmountIn ¶
func (k Keeper) MultihopSwapExactAmountIn( ctx sdk.Context, sender sdk.AccAddress, routes []types.SwapAmountInRoute, tokenIn sdk.Coin, tokenOutMinAmount sdk.Int, ) (tokenOutAmount sdk.Int, err error)
MultihopSwapExactAmountIn defines the input denom and input amount for the first pool, the output of the first pool is chained as the input for the next routed pool transaction succeeds when final amount out is greater than tokenOutMinAmount defined
func (Keeper) MultihopSwapExactAmountOut ¶
func (k Keeper) MultihopSwapExactAmountOut( ctx sdk.Context, sender sdk.AccAddress, routes []types.SwapAmountOutRoute, tokenInMaxAmount sdk.Int, tokenOut sdk.Coin, ) (tokenInAmount sdk.Int, err error)
MultihopSwapExactAmountOut defines the output denom and output amount for the last pool. Calculation starts by providing the tokenOutAmount of the final pool to calculate the required tokenInAmount the calculated tokenInAmount is used as defined tokenOutAmount of the previous pool, calculating in reverse order of the swap Transaction succeeds if the calculated tokenInAmount of the first pool is less than the defined tokenInMaxAmount defined.
func (Keeper) Pool ¶
func (k Keeper) Pool( ctx context.Context, req *types.QueryPoolRequest, ) (*types.QueryPoolResponse, error)
func (Keeper) PoolAssets ¶
func (k Keeper) PoolAssets(ctx context.Context, req *types.QueryPoolAssetsRequest) (*types.QueryPoolAssetsResponse, error)
func (Keeper) PoolParams ¶
func (k Keeper) PoolParams(ctx context.Context, req *types.QueryPoolParamsRequest) (*types.QueryPoolParamsResponse, error)
func (Keeper) Pools ¶
func (k Keeper) Pools( ctx context.Context, req *types.QueryPoolsRequest, ) (*types.QueryPoolsResponse, error)
func (Keeper) SpotPrice ¶
func (k Keeper) SpotPrice(ctx context.Context, req *types.QuerySpotPriceRequest) (*types.QuerySpotPriceResponse, error)
func (Keeper) SwapExactAmountIn ¶
func (Keeper) SwapExactAmountOut ¶
func (Keeper) TotalPools ¶
func (k Keeper) TotalPools( ctx context.Context, req *types.QueryTotalPoolsRequest, ) (*types.QueryTotalPoolsResponse, error)
func (Keeper) TotalShare ¶
func (k Keeper) TotalShare(ctx context.Context, req *types.QueryTotalShareRequest) (*types.QueryTotalShareResponse, error)