cli

package
v15.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
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 EstimateSwapExactAmountInParseArgs

func EstimateSwapExactAmountInParseArgs(args []string, fs *flag.FlagSet) (proto.Message, error)

func EstimateSwapExactAmountOutParseArgs

func EstimateSwapExactAmountOutParseArgs(args []string, fs *flag.FlagSet) (proto.Message, error)

func FlagSetCreatePool

func FlagSetCreatePool() *flag.FlagSet

func FlagSetCreateRoutes added in v15.8.0

func FlagSetCreateRoutes() *flag.FlagSet

func FlagSetMultihopSwapRoutes

func FlagSetMultihopSwapRoutes() *flag.FlagSet

func FlagSetQuerySwapRoutes

func FlagSetQuerySwapRoutes() *flag.FlagSet

func FlagSetSwapAmountOutRoutes

func FlagSetSwapAmountOutRoutes() *flag.FlagSet

func GetCmdAllPools added in v15.5.0

func GetCmdAllPools() (*osmocli.QueryDescriptor, *queryproto.AllPoolsRequest)

GetCmdAllPools return all pools available across Osmosis modules.

func GetCmdEstimateSinglePoolSwapExactAmountIn added in v15.3.0

func GetCmdEstimateSinglePoolSwapExactAmountIn() (*osmocli.QueryDescriptor, *queryproto.EstimateSinglePoolSwapExactAmountInRequest)

GetCmdEstimateSinglePoolSwapExactAmountIn returns estimation of output coin when amount of x token input.

func GetCmdEstimateSinglePoolSwapExactAmountOut added in v15.3.0

func GetCmdEstimateSinglePoolSwapExactAmountOut() (*osmocli.QueryDescriptor, *queryproto.EstimateSinglePoolSwapExactAmountOutRequest)

GetCmdEstimateSinglePoolSwapExactAmountOut returns estimation of input coin to get exact amount of x token output.

func GetCmdEstimateSwapExactAmountIn

func GetCmdEstimateSwapExactAmountIn() (*osmocli.QueryDescriptor, *queryproto.EstimateSwapExactAmountInRequest)

GetCmdEstimateSwapExactAmountIn returns estimation of output coin when amount of x token input.

func GetCmdEstimateSwapExactAmountOut

func GetCmdEstimateSwapExactAmountOut() (*osmocli.QueryDescriptor, *queryproto.EstimateSwapExactAmountOutRequest)

GetCmdEstimateSwapExactAmountOut returns estimation of input coin to get exact amount of x token output.

func GetCmdNumPools

func GetCmdNumPools() (*osmocli.QueryDescriptor, *queryproto.NumPoolsRequest)

GetCmdNumPools return number of pools available.

func GetCmdPool added in v15.3.0

GetCmdPool returns pool information.

func GetCmdSpotPrice added in v15.3.0

func GetCmdSpotPrice() (*osmocli.QueryDescriptor, *queryproto.SpotPriceRequest)

func GetCmdTotalPoolLiquidity added in v15.5.0

func GetCmdTotalPoolLiquidity() (*osmocli.QueryDescriptor, *queryproto.TotalPoolLiquidityRequest)

func GetQueryCmd

func GetQueryCmd() *cobra.Command

GetQueryCmd returns the cli query commands for this module.

func NewBuildCreateBalancerPoolMsg

func NewBuildCreateBalancerPoolMsg(clientCtx client.Context, txf tx.Factory, fs *flag.FlagSet) (tx.Factory, sdk.Msg, error)

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 NewBuildSwapExactAmountOutMsg

func NewBuildSwapExactAmountOutMsg(clientCtx client.Context, args []string, fs *flag.FlagSet) (sdk.Msg, error)

func NewCreatePoolCmd

func NewCreatePoolCmd() *cobra.Command

func NewMsgNewSplitRouteSwapExactAmountIn added in v15.8.0

func NewMsgNewSplitRouteSwapExactAmountIn(fs *flag.FlagSet) ([]types.SwapAmountInSplitRoute, error)

func NewMsgNewSplitRouteSwapExactAmountOut added in v15.8.0

func NewMsgNewSplitRouteSwapExactAmountOut(fs *flag.FlagSet) ([]types.SwapAmountOutSplitRoute, error)

func NewSplitRouteSwapExactAmountIn added in v15.8.0

func NewSplitRouteSwapExactAmountIn() (*osmocli.TxCliDesc, *types.MsgSplitRouteSwapExactAmountIn)

func NewSplitRouteSwapExactAmountOut added in v15.8.0

func NewSplitRouteSwapExactAmountOut() (*osmocli.TxCliDesc, *types.MsgSplitRouteSwapExactAmountOut)

func NewSwapExactAmountInCmd

func NewSwapExactAmountInCmd() (*osmocli.TxCliDesc, *types.MsgSwapExactAmountIn)

func NewSwapExactAmountOutCmd

func NewSwapExactAmountOutCmd() (*osmocli.TxCliDesc, *types.MsgSwapExactAmountOut)

func NewTxCmd

func NewTxCmd() *cobra.Command

func ParseCoinsNoSort

func ParseCoinsNoSort(coinsStr string) (sdk.Coins, error)

ParseCoinsNoSort parses coins from coinsStr but does not sort them. Returns error if parsing fails.

Types

type RoutesIn added in v15.8.0

type RoutesIn struct {
	Route []SwapAmountInSplitRoute `json:"route"`
}

type RoutesOut added in v15.8.0

type RoutesOut struct {
	Route []SwapAmountOutSplitRoute `json:"route"`
}

type SwapAmountInSplitRoute added in v15.8.0

type SwapAmountInSplitRoute struct {
	Pools         []types.SwapAmountInRoute `json:"swap_amount_in_route"`
	TokenInAmount int64                     `json:"token_in_amount"`
}

type SwapAmountOutSplitRoute added in v15.8.0

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
}

Jump to

Keyboard shortcuts

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