Documentation ¶
Index ¶
- Constants
- func EstimateSwapExactAmountInParseArgs(args []string, fs *flag.FlagSet) (proto.Message, error)
- func EstimateSwapExactAmountOutParseArgs(args []string, fs *flag.FlagSet) (proto.Message, error)
- func FlagSetCreatePool() *flag.FlagSet
- func FlagSetCreateRoutes() *flag.FlagSet
- func FlagSetMultihopSwapRoutes() *flag.FlagSet
- func FlagSetQuerySwapRoutes() *flag.FlagSet
- func FlagSetSwapAmountOutRoutes() *flag.FlagSet
- func GetCmdAllPools() (*percocli.QueryDescriptor, *queryproto.AllPoolsRequest)
- func GetCmdEstimateSinglePoolSwapExactAmountIn() (*percocli.QueryDescriptor, ...)
- func GetCmdEstimateSinglePoolSwapExactAmountOut() (*percocli.QueryDescriptor, ...)
- func GetCmdEstimateSwapExactAmountIn() (*percocli.QueryDescriptor, *queryproto.EstimateSwapExactAmountInRequest)
- func GetCmdEstimateSwapExactAmountOut() (*percocli.QueryDescriptor, *queryproto.EstimateSwapExactAmountOutRequest)
- func GetCmdNumPools() (*percocli.QueryDescriptor, *queryproto.NumPoolsRequest)
- func GetCmdPool() (*percocli.QueryDescriptor, *queryproto.PoolRequest)
- func GetCmdSpotPrice() (*percocli.QueryDescriptor, *queryproto.SpotPriceRequest)
- func GetCmdTotalPoolLiquidity() (*percocli.QueryDescriptor, *queryproto.TotalPoolLiquidityRequest)
- func GetQueryCmd() *cobra.Command
- func NewBuildCreateBalancerPoolMsg(clientCtx client.Context, txf tx.Factory, fs *flag.FlagSet) (tx.Factory, sdk.Msg, error)
- func NewBuildCreateStableswapPoolMsg(clientCtx client.Context, txf tx.Factory, fs *flag.FlagSet) (tx.Factory, sdk.Msg, error)
- func NewBuildSwapExactAmountOutMsg(clientCtx client.Context, args []string, fs *flag.FlagSet) (sdk.Msg, error)
- func NewCreatePoolCmd() *cobra.Command
- func NewMsgNewSplitRouteSwapExactAmountIn(fs *flag.FlagSet) ([]types.SwapAmountInSplitRoute, error)
- func NewMsgNewSplitRouteSwapExactAmountOut(fs *flag.FlagSet) ([]types.SwapAmountOutSplitRoute, error)
- func NewSplitRouteSwapExactAmountIn() (*percocli.TxCliDesc, *types.MsgSplitRouteSwapExactAmountIn)
- func NewSplitRouteSwapExactAmountOut() (*percocli.TxCliDesc, *types.MsgSplitRouteSwapExactAmountOut)
- func NewSwapExactAmountInCmd() (*percocli.TxCliDesc, *types.MsgSwapExactAmountIn)
- func NewSwapExactAmountOutCmd() (*percocli.TxCliDesc, *types.MsgSwapExactAmountOut)
- func NewTxCmd() *cobra.Command
- func ParseCoinsNoSort(coinsStr string) (sdk.Coins, error)
- type RoutesIn
- type RoutesOut
- type SwapAmountInSplitRoute
- type SwapAmountOutSplitRoute
- type XCreatePoolInputs
- type XCreatePoolInputsExceptions
- type XCreateStableswapPoolInputs
- type XCreateStableswapPoolInputsExceptions
Constants ¶
const ( // Names of fields in pool json file. PoolFileWeights = "weights" PoolFileInitialDeposit = "initial-deposit" PoolFileSwapFee = "swap-fee" PoolFileExitFee = "exit-fee" PoolFileFutureGovernor = "future-governor" PoolFileSmoothWeightChangeParams = "lbp-params" PoolFileStartTime = "start-time" PoolFileDuration = "duration" PoolFileTargetPoolWeights = "target-pool-weights" // Will be parsed to string. FlagPoolFile = "pool-file" // Will be parsed to uint64. FlagSwapRoutePoolIds = "swap-route-pool-ids" // Will be parsed to []string. FlagSwapRouteDenoms = "swap-route-denoms" // Will be parsed to string. FlagRoutesFile = "routes-file" )
Variables ¶
This section is empty.
Functions ¶
func FlagSetCreatePool ¶
func FlagSetCreateRoutes ¶
func FlagSetQuerySwapRoutes ¶
func GetCmdAllPools ¶
func GetCmdAllPools() (*percocli.QueryDescriptor, *queryproto.AllPoolsRequest)
GetCmdAllPools return all pools available across Percosis modules.
func GetCmdEstimateSinglePoolSwapExactAmountIn ¶
func GetCmdEstimateSinglePoolSwapExactAmountIn() (*percocli.QueryDescriptor, *queryproto.EstimateSinglePoolSwapExactAmountInRequest)
GetCmdEstimateSinglePoolSwapExactAmountIn returns estimation of output coin when amount of x token input.
func GetCmdEstimateSinglePoolSwapExactAmountOut ¶
func GetCmdEstimateSinglePoolSwapExactAmountOut() (*percocli.QueryDescriptor, *queryproto.EstimateSinglePoolSwapExactAmountOutRequest)
GetCmdEstimateSinglePoolSwapExactAmountOut returns estimation of input coin to get exact amount of x token output.
func GetCmdEstimateSwapExactAmountIn ¶
func GetCmdEstimateSwapExactAmountIn() (*percocli.QueryDescriptor, *queryproto.EstimateSwapExactAmountInRequest)
GetCmdEstimateSwapExactAmountIn returns estimation of output coin when amount of x token input.
func GetCmdEstimateSwapExactAmountOut ¶
func GetCmdEstimateSwapExactAmountOut() (*percocli.QueryDescriptor, *queryproto.EstimateSwapExactAmountOutRequest)
GetCmdEstimateSwapExactAmountOut returns estimation of input coin to get exact amount of x token output.
func GetCmdNumPools ¶
func GetCmdNumPools() (*percocli.QueryDescriptor, *queryproto.NumPoolsRequest)
GetCmdNumPools return number of pools available.
func GetCmdPool ¶
func GetCmdPool() (*percocli.QueryDescriptor, *queryproto.PoolRequest)
GetCmdPool returns pool information.
func GetCmdSpotPrice ¶
func GetCmdSpotPrice() (*percocli.QueryDescriptor, *queryproto.SpotPriceRequest)
func GetCmdTotalPoolLiquidity ¶
func GetCmdTotalPoolLiquidity() (*percocli.QueryDescriptor, *queryproto.TotalPoolLiquidityRequest)
func GetQueryCmd ¶
GetQueryCmd returns the cli query commands for this module.
func NewBuildCreateStableswapPoolMsg ¶
func NewBuildCreateStableswapPoolMsg(clientCtx client.Context, txf tx.Factory, fs *flag.FlagSet) (tx.Factory, sdk.Msg, error)
Apologies to whoever has to touch this next, this code is horrendous
func NewCreatePoolCmd ¶
func NewMsgNewSplitRouteSwapExactAmountIn ¶
func NewMsgNewSplitRouteSwapExactAmountIn(fs *flag.FlagSet) ([]types.SwapAmountInSplitRoute, error)
func NewMsgNewSplitRouteSwapExactAmountOut ¶
func NewMsgNewSplitRouteSwapExactAmountOut(fs *flag.FlagSet) ([]types.SwapAmountOutSplitRoute, error)
func NewSplitRouteSwapExactAmountIn ¶
func NewSplitRouteSwapExactAmountIn() (*percocli.TxCliDesc, *types.MsgSplitRouteSwapExactAmountIn)
func NewSplitRouteSwapExactAmountOut ¶
func NewSplitRouteSwapExactAmountOut() (*percocli.TxCliDesc, *types.MsgSplitRouteSwapExactAmountOut)
func NewSwapExactAmountInCmd ¶
func NewSwapExactAmountInCmd() (*percocli.TxCliDesc, *types.MsgSwapExactAmountIn)
func NewSwapExactAmountOutCmd ¶
func NewSwapExactAmountOutCmd() (*percocli.TxCliDesc, *types.MsgSwapExactAmountOut)
Types ¶
type RoutesIn ¶
type RoutesIn struct {
Route []SwapAmountInSplitRoute `json:"route"`
}
type RoutesOut ¶
type RoutesOut struct {
Route []SwapAmountOutSplitRoute `json:"route"`
}
type SwapAmountInSplitRoute ¶
type SwapAmountInSplitRoute struct { Pools []types.SwapAmountInRoute `json:"swap_amount_in_route"` TokenInAmount int64 `json:"token_in_amount"` }
type SwapAmountOutSplitRoute ¶
type SwapAmountOutSplitRoute struct { Pools []types.SwapAmountOutRoute `json:"swap_amount_out_route"` TokenOutAmount int64 `json:"token_out_amount"` }
type XCreatePoolInputs ¶
type XCreatePoolInputs createBalancerPoolInputs
TODO: move these to exported types within an internal package
type XCreatePoolInputsExceptions ¶
type XCreatePoolInputsExceptions struct { XCreatePoolInputs Other *string // Other won't raise an error }
type XCreateStableswapPoolInputs ¶
type XCreateStableswapPoolInputs createStableswapPoolInputs
type XCreateStableswapPoolInputsExceptions ¶
type XCreateStableswapPoolInputsExceptions struct { XCreateStableswapPoolInputs Other *string // Other won't raise an error }