Documentation ¶
Index ¶
- func BuyCoinCalculateAmounts(ctx sdk.Context, coinToBuy types.Coin, coinToSell types.Coin, wantsBuy sdk.Int, ...) (amountBuy sdk.Int, amountSell sdk.Int, err *sdkerrors.Error)
- func ExistsCoin(cliCtx clientctx.CLIContext, symbol string) (bool, error)
- func GetAccount(cliCtx ctx.CLIContext, addr sdk.AccAddress) (exported.Account, error)
- func GetCoin(cliCtx clientctx.CLIContext, symbol string) (types.Coin, error)
- func SellCoinCalculateAmounts(ctx sdk.Context, coinToBuy types.Coin, coinToSell types.Coin, wantsBuy sdk.Int, ...) (amountBuy sdk.Int, amountSell sdk.Int, err *sdkerrors.Error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuyCoinCalculateAmounts ¶
func BuyCoinCalculateAmounts(ctx sdk.Context, coinToBuy types.Coin, coinToSell types.Coin, wantsBuy sdk.Int, wantsSell sdk.Int) (amountBuy sdk.Int, amountSell sdk.Int, err *sdkerrors.Error)
Calculate amountToSell and amountToBuy for BuyCoin TX In CLI part amountToSell is maxAmountToSell
func ExistsCoin ¶
func ExistsCoin(cliCtx clientctx.CLIContext, symbol string) (bool, error)
Check if coin exists
func GetAccount ¶
func GetAccount(cliCtx ctx.CLIContext, addr sdk.AccAddress) (exported.Account, error)
Returns account for given address if exists
func SellCoinCalculateAmounts ¶
func SellCoinCalculateAmounts(ctx sdk.Context, coinToBuy types.Coin, coinToSell types.Coin, wantsBuy sdk.Int, wantsSell sdk.Int) (amountBuy sdk.Int, amountSell sdk.Int, err *sdkerrors.Error)
Calculate amountToSell and amountToBuy for SellCoin TX In CLI part amountToBuy is minAmountToBuy
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.