Documentation ¶
Index ¶
- Constants
- Variables
- func AccAddressesToString(addresses []sdk.AccAddress) (result string)
- func AdjustFees(fees sdk.Coins, maxFees sdk.Coins) sdk.Coins
- func CheckCoinDenom(denom string) (err error)
- func CheckNoOfReserveTokens(resTokens []string, fnType string) error
- func CheckReserveTokenNames(resTokens []string, token string) error
- func DivideDecCoinByDec(dc sdk.DecCoin, scale sdk.Dec) sdk.DecCoin
- func DivideDecCoinsByDec(dcs sdk.DecCoins, scale sdk.Dec) (scaled sdk.DecCoins)
- func GetBatchKey(token string) []byte
- func GetBondKey(token string) []byte
- func GetLastBatchKey(token string) []byte
- func GetRequiredParamsForFunctionType(fnType string) (fnParams []string, err error)
- func Invariant(R, S sdk.Dec, kappa int64) sdk.Dec
- func MultiplyDecCoinByDec(dc sdk.DecCoin, scale sdk.Dec) sdk.DecCoin
- func MultiplyDecCoinByInt(dc sdk.DecCoin, scale sdk.Int) sdk.DecCoin
- func MultiplyDecCoinsByDec(dcs sdk.DecCoins, scale sdk.Dec) (scaled sdk.DecCoins)
- func MultiplyDecCoinsByInt(dcs sdk.DecCoins, scale sdk.Int) (scaled sdk.DecCoins)
- func ParamKeyTable() params.KeyTable
- func RegisterCodec(cdc *codec.Codec)
- func Reserve(S sdk.Dec, kappa int64, V0 sdk.Dec) sdk.Dec
- func RoundFee(f sdk.DecCoin) sdk.Coin
- func RoundReservePrice(p sdk.DecCoin) sdk.Coin
- func RoundReservePrices(ps sdk.DecCoins) (rounded sdk.Coins)
- func RoundReserveReturn(r sdk.DecCoin) sdk.Coin
- func RoundReserveReturns(rs sdk.DecCoins) (rounded sdk.Coins)
- func SpotPrice(R sdk.Dec, kappa int64, V0 sdk.Dec) sdk.Dec
- func StringsToString(strs []string) (result string)
- func Supply(R sdk.Dec, kappa int64, V0 sdk.Dec) sdk.Dec
- func ValidateGenesis(data GenesisState) error
- func ValidateParams(params Params) error
- type BaseOrder
- type Batch
- type Bond
- func (bond Bond) AnyOrderQuantityLimitsExceeded(amounts sdk.Coins) bool
- func (bond Bond) GetCurrentPricesPT(reserveBalances sdk.Coins) (sdk.DecCoins, error)
- func (bond Bond) GetExitFee(reserveAmount sdk.DecCoin) sdk.Coin
- func (bond Bond) GetExitFees(reserveAmounts sdk.DecCoins) (fees sdk.Coins)
- func (bond Bond) GetFee(reserveAmount sdk.DecCoin, percentage sdk.Dec) sdk.Coin
- func (bond Bond) GetFees(reserveAmounts sdk.DecCoins, percentage sdk.Dec) (fees sdk.Coins)
- func (bond Bond) GetNewReserveDecCoins(amount sdk.Dec) (coins sdk.DecCoins)
- func (bond Bond) GetPricesAtSupply(supply sdk.Int) (result sdk.DecCoins, err error)
- func (bond Bond) GetPricesToMint(mint sdk.Int, reserveBalances sdk.Coins) (sdk.DecCoins, error)
- func (bond Bond) GetReserveDeltaForLiquidityDelta(mintOrBurn sdk.Int, reserveBalances sdk.Coins) sdk.DecCoins
- func (bond Bond) GetReturnsForBurn(burn sdk.Int, reserveBalances sdk.Coins) sdk.DecCoins
- func (bond Bond) GetReturnsForSwap(from sdk.Coin, toToken string, reserveBalances sdk.Coins) (returns sdk.Coins, txFee sdk.Coin, err error)
- func (bond Bond) GetTxFee(reserveAmount sdk.DecCoin) sdk.Coin
- func (bond Bond) GetTxFees(reserveAmounts sdk.DecCoins) (fees sdk.Coins)
- func (bond Bond) ReserveAtSupply(supply sdk.Int) (result sdk.Dec)
- func (bond Bond) ReserveDenomsEqualTo(coins sdk.Coins) bool
- func (bond Bond) ReservesViolateSanityRate(newReserves sdk.Coins) bool
- func (bond Bond) SignersEqualTo(signers []sdk.AccAddress) bool
- type BuyOrder
- type FunctionParam
- type FunctionParamRestrictions
- type FunctionParams
- type GenesisState
- type MsgBuy
- type MsgCreateBond
- type MsgEditBond
- type MsgMakeOutcomePayment
- type MsgSell
- type MsgSwap
- type MsgWithdrawShare
- type Params
- type QueryBonds
- type QueryBuyPrice
- type QuerySellReturn
- type QuerySwapReturn
- type SellOrder
- type SwapOrder
Constants ¶
View Source
const ( PowerFunction = "power_function" SigmoidFunction = "sigmoid_function" SwapperFunction = "swapper_function" AugmentedFunction = "augmented_function" HatchState = "HATCH" OpenState = "OPEN" SettleState = "SETTLE" DoNotModifyField = "[do-not-modify]" AnyNumberOfReserveTokens = -1 )
View Source
const ( EventTypeCreateBond = "create_bond" EventTypeEditBond = "edit_bond" EventTypeInitSwapper = "init_swapper" EventTypeBuy = "buy" EventTypeSell = "sell" EventTypeSwap = "swap" EventTypeMakeOutcomePayment = "make_outcome_payment" EventTypeOrderCancel = "order_cancel" EventTypeOrderFulfill = "order_fulfill" EventTypeStateChange = "state_change" AttributeKeyBond = "bond" AttributeKeyName = "name" AttributeKeyDescription = "description" AttributeKeyFunctionType = "function_type" AttributeKeyFunctionParameters = "function_parameters" AttributeKeyReserveTokens = "reserve_tokens" AttributeKeyTxFeePercentage = "tx_fee_percentage" AttributeKeyExitFeePercentage = "exit_fee_percentage" AttributeKeyFeeAddress = "fee_address" AttributeKeyMaxSupply = "max_supply" AttributeKeyOrderQuantityLimits = "order_quantity_limits" AttributeKeySanityRate = "sanity_rate" AttributeKeySanityMarginPercentage = "sanity_margin_percentage" AttributeKeyAllowSells = "allow_sells" AttributeKeySigners = "signers" AttributeKeyBatchBlocks = "batch_blocks" AttributeKeyOutcomePayment = "outcome_payment" AttributeKeyState = "state" AttributeKeyMaxPrices = "max_prices" AttributeKeySwapFromToken = "from_token" AttributeKeySwapToToken = "to_token" AttributeKeyOrderType = "order_type" AttributeKeyAddress = "address" AttributeKeyCancelReason = "cancel_reason" AttributeKeyTokensMinted = "tokens_minted" AttributeKeyTokensBurned = "tokens_burned" AttributeKeyTokensSwapped = "tokens_swapped" AttributeKeyChargedPrices = "charged_prices" AttributeKeyChargedPricesReserve = "charged_prices_of_which_reserve" AttributeKeyChargedPricesFunding = "charged_prices_of_which_funding" AttributeKeyChargedFees = "charged_fees" AttributeKeyReturnedToAddress = "returned_to_address" AttributeKeyNewBondTokenBalance = "new_bond_token_balance" AttributeKeyOldState = "old_state" AttributeKeyNewState = "new_state" AttributeValueBuyOrder = "buy" AttributeValueSellOrder = "sell" AttributeValueSwapOrder = "swap" AttributeValueCategory = ModuleName )
View Source
const ( // ModuleName is the name of this module ModuleName = "bonds" // StoreKey is the default store key for this module StoreKey = ModuleName // DefaultParamspace is the default param space for this module DefaultParamspace = ModuleName // BondsMintBurnAccount the root string for the bonds mint burn account address BondsMintBurnAccount = "bonds_mint_burn_account" // BatchesIntermediaryAccount the root string for the batches account address BatchesIntermediaryAccount = "batches_intermediary_account" // BondsReserveAccount the root string for the bonds reserve account address BondsReserveAccount = "bonds_reserve_account" // QuerierRoute is the querier route for this module's store. QuerierRoute = ModuleName // RouterKey is the message route for this module RouterKey = ModuleName )
View Source
const ( TypeMsgCreateBond = "create_bond" TypeMsgEditBond = "edit_bond" TypeMsgBuy = "buy" TypeMsgSell = "sell" TypeMsgSwap = "swap" TypeMsgMakeOutcomePayment = "make_outcome_payment" )
View Source
const (
DefaultCodespace = ModuleName
)
Variables ¶
View Source
var ( RequiredParamsForFunctionType = map[string][]string{ PowerFunction: {"m", "n", "c"}, SigmoidFunction: {"a", "b", "c"}, SwapperFunction: nil, AugmentedFunction: {"d0", "p0", "theta", "kappa"}, } NoOfReserveTokensForFunctionType = map[string]int{ PowerFunction: AnyNumberOfReserveTokens, SigmoidFunction: AnyNumberOfReserveTokens, SwapperFunction: 2, AugmentedFunction: AnyNumberOfReserveTokens, } ExtraParameterRestrictions = map[string]FunctionParamRestrictions{ PowerFunction: powerParameterRestrictions, SigmoidFunction: sigmoidParameterRestrictions, SwapperFunction: nil, AugmentedFunction: augmentedParameterRestrictions, } )
View Source
var ( ErrArgumentMustBePositive = sdkerrors.Register(ModuleName, 301, "argument must be a positive value") ErrArgumentMustBeInteger = sdkerrors.Register(ModuleName, 302, "argument must be an integer value") ErrArgumentMustBeBetween = sdkerrors.Register(ModuleName, 303, "argument must be between") ErrArgumentCannotBeEmpty = sdkerrors.Register(ModuleName, 304, "argument cannot be empty") ErrArgumentCannotBeNegative = sdkerrors.Register(ModuleName, 305, "argument cannot be negative") ErrArgumentMissingOrNonFloat = sdkerrors.Register(ModuleName, 306, "argument is missing or is not a float") ErrBondDoesNotExist = sdkerrors.Register(ModuleName, 307, "bond does not exist") ErrBondAlreadyExists = sdkerrors.Register(ModuleName, 308, "bond already exists") ErrBondTokenCannotBeStakingToken = sdkerrors.Register(ModuleName, 309, "bond token cannot be staking token") ErrInvalidStateForAction = sdkerrors.Register(ModuleName, 310, "cannot perform that action at the current state") ErrReserveDenomsMismatch = sdkerrors.Register(ModuleName, 311, "denom do not match reserve") ErrOrderQuantityLimitExceeded = sdkerrors.Register(ModuleName, 312, "order quantity limits exceeded") ErrValuesViolateSanityRate = sdkerrors.Register(ModuleName, 313, "values violate sanity rate") ErrBondDoesNotAllowSelling = sdkerrors.Register(ModuleName, 314, "bond does not allow selling at the moment") ErrFunctionNotAvailableForFunctionType = sdkerrors.Register(ModuleName, 315, "function is not available for the function type") ErrCannotMakeZeroOutcomePayment = sdkerrors.Register(ModuleName, 316, "cannot make outcome payment because outcome payment is set to nil") ErrNoBondTokensOwned = sdkerrors.Register(ModuleName, 317, "no bond tokens of this bond are owned") ErrCannotBurnMoreThanSupply = sdkerrors.Register(ModuleName, 318, "cannot burn more tokens than the current supply") ErrFeesCannotBeOrExceed100Percent = sdkerrors.Register(ModuleName, 319, "sum of fees is or exceeds 100 percent") ErrFromAndToCannotBeTheSameToken = sdkerrors.Register(ModuleName, 320, "from and to tokens cannot be the same token") ErrCannotMintMoreThanMaxSupply = sdkerrors.Register(ModuleName, 321, "cannot mint more tokens than the max supply") ErrMaxPriceExceeded = sdkerrors.Register(ModuleName, 322, "max price exceeded") ErrInsufficientReserveToBuy = sdkerrors.Register(ModuleName, 323, "insufficient reserve was supplied to perform buy order") ErrIncorrectNumberOfFunctionParameters = sdkerrors.Register(ModuleName, 324, "incorrect number of function parameters") ErrFunctionParameterMissingOrNonFloat = sdkerrors.Register(ModuleName, 325, "parameter is missing or is not a float") ErrFunctionRequiresNonZeroCurrentSupply = sdkerrors.Register(ModuleName, 326, "function requires the current supply to be non zero") ErrTokenIsNotAValidReserveToken = sdkerrors.Register(ModuleName, 327, "token is not a valid reserve token") ErrSwapAmountTooSmallToGiveAnyReturn = sdkerrors.Register(ModuleName, 328, "swap amount too small to give any return") ErrSwapAmountCausesReserveDepletion = sdkerrors.Register(ModuleName, 329, "swap amount too large and causes reserve to be depleted") ErrInvalidCoinDenomination = sdkerrors.Register(ModuleName, 330, "invalid coin denomination") ErrMaxSupplyDenomDoesNotMatchTokenDenom = sdkerrors.Register(ModuleName, 331, "max supply denom does not match token denom") ErrDidNotEditAnything = sdkerrors.Register(ModuleName, 332, "did not edit anything from the bond") ErrBondTokenCannotAlsoBeReserveToken = sdkerrors.Register(ModuleName, 333, "token cannot also be a reserve token") ErrDuplicateReserveToken = sdkerrors.Register(ModuleName, 334, "cannot have duplicate tokens in reserve tokens") ErrUnrecognizedFunctionType = sdkerrors.Register(ModuleName, 335, "unrecognized function type") ErrIncorrectNumberOfReserveTokens = sdkerrors.Register(ModuleName, 336, "incorrect number of reserve tokens") ErrInvalidFunctionParameter = sdkerrors.Register(ModuleName, 337, "invalid function parameter") ErrArgumentMissingOrNonUInteger = sdkerrors.Register(ModuleName, 338, "argument is missing or is not an unsigned integer") ErrArgumentMissingOrNonBoolean = sdkerrors.Register(ModuleName, 339, "argument is missing or is not true or false") ErrReservedBondToken = sdkerrors.Register(ModuleName, 340, "bond token is reserved") )
View Source
var ( BondsKeyPrefix = []byte{0x00} // key for bonds BatchesKeyPrefix = []byte{0x01} // key for batches LastBatchesKeyPrefix = []byte{0x02} // key for last batches )
Bonds and batches are stored as follow:
- Bonds: 0x00<bond_token_bytes> - Batches: 0x01<bond_token_bytes> - Last batches: 0x02<bond_token_bytes>
View Source
var (
KeyReservedBondTokens = []byte("ReservedBondTokens")
)
Parameter store keys
View Source
var ModuleCdc *codec.Codec
ModuleCdc is the codec for the module
Functions ¶
func AccAddressesToString ¶
func AccAddressesToString(addresses []sdk.AccAddress) (result string)
func CheckCoinDenom ¶
func CheckNoOfReserveTokens ¶
func CheckReserveTokenNames ¶
func DivideDecCoinsByDec ¶
noinspection GoNilness
func GetBatchKey ¶
func GetBondKey ¶
func GetLastBatchKey ¶
func MultiplyDecCoinsByDec ¶
noinspection GoNilness
func MultiplyDecCoinsByInt ¶
noinspection GoNilness
func RegisterCodec ¶
func RoundReservePrices ¶
noinspection GoNilness
func RoundReserveReturns ¶
noinspection GoNilness
func SpotPrice ¶
given a value function (parameterized by kappa) and an invariant coeficient V0 return a spot price P as a function of reserve R
func StringsToString ¶
func Supply ¶
given a value function (parameterized by kappa) and an invariant coeficient V0 return Supply S as a function of reserve R
func ValidateGenesis ¶
func ValidateGenesis(data GenesisState) error
Types ¶
type BaseOrder ¶
type BaseOrder struct { Address sdk.AccAddress `json:"address" yaml:"address"` Amount sdk.Coin `json:"amount" yaml:"amount"` Cancelled bool `json:"cancelled" yaml:"cancelled"` CancelReason string `json:"cancel_reason" yaml:"cancel_reason"` }
func NewBaseOrder ¶
func NewBaseOrder(address sdk.AccAddress, amount sdk.Coin) BaseOrder
func (BaseOrder) IsCancelled ¶
type Batch ¶
type Batch struct { Token string `json:"token" yaml:"token"` BlocksRemaining sdk.Uint `json:"blocks_remaining" yaml:"blocks_remaining"` TotalBuyAmount sdk.Coin `json:"total_buy_amount" yaml:"total_buy_amount"` TotalSellAmount sdk.Coin `json:"total_sell_amount" yaml:"total_sell_amount"` BuyPrices sdk.DecCoins `json:"buy_prices" yaml:"buy_prices"` SellPrices sdk.DecCoins `json:"sell_prices" yaml:"sell_prices"` Buys []BuyOrder `json:"buys" yaml:"buys"` Sells []SellOrder `json:"sells" yaml:"sells"` Swaps []SwapOrder `json:"swaps" yaml:"swaps"` }
func (Batch) EqualBuysAndSells ¶
func (Batch) MoreBuysThanSells ¶
func (Batch) MoreSellsThanBuys ¶
type Bond ¶
type Bond struct { Token string `json:"token" yaml:"token"` Name string `json:"name" yaml:"name"` Description string `json:"description" yaml:"description"` Creator sdk.AccAddress `json:"creator" yaml:"creator"` FunctionType string `json:"function_type" yaml:"function_type"` FunctionParameters FunctionParams `json:"function_parameters" yaml:"function_parameters"` ReserveTokens []string `json:"reserve_tokens" yaml:"reserve_tokens"` TxFeePercentage sdk.Dec `json:"tx_fee_percentage" yaml:"tx_fee_percentage"` ExitFeePercentage sdk.Dec `json:"exit_fee_percentage" yaml:"exit_fee_percentage"` FeeAddress sdk.AccAddress `json:"fee_address" yaml:"fee_address"` MaxSupply sdk.Coin `json:"max_supply" yaml:"max_supply"` OrderQuantityLimits sdk.Coins `json:"order_quantity_limits" yaml:"order_quantity_limits"` SanityRate sdk.Dec `json:"sanity_rate" yaml:"sanity_rate"` SanityMarginPercentage sdk.Dec `json:"sanity_margin_percentage" yaml:"sanity_margin_percentage"` CurrentSupply sdk.Coin `json:"current_supply" yaml:"current_supply"` CurrentReserve sdk.Coins `json:"current_reserve" yaml:"current_reserve"` AllowSells bool `json:"allow_sells" yaml:"allow_sells"` Signers []sdk.AccAddress `json:"signers" yaml:"signers"` BatchBlocks sdk.Uint `json:"batch_blocks" yaml:"batch_blocks"` OutcomePayment sdk.Coins `json:"outcome_payment" yaml:"outcome_payment"` State string `json:"state" yaml:"state"` }
func NewBond ¶
func NewBond(token, name, description string, creator sdk.AccAddress, functionType string, functionParameters FunctionParams, reserveTokens []string, txFeePercentage, exitFeePercentage sdk.Dec, feeAddress sdk.AccAddress, maxSupply sdk.Coin, orderQuantityLimits sdk.Coins, sanityRate, sanityMarginPercentage sdk.Dec, allowSells bool, signers []sdk.AccAddress, batchBlocks sdk.Uint, outcomePayment sdk.Coins, state string) Bond
func (Bond) AnyOrderQuantityLimitsExceeded ¶
func (Bond) GetCurrentPricesPT ¶
func (Bond) GetExitFees ¶
noinspection GoNilness
func (Bond) GetNewReserveDecCoins ¶
noinspection GoNilness
func (Bond) GetPricesAtSupply ¶
func (Bond) GetPricesToMint ¶
func (Bond) GetReserveDeltaForLiquidityDelta ¶
func (Bond) GetReturnsForBurn ¶
func (Bond) GetReturnsForSwap ¶
func (Bond) ReservesViolateSanityRate ¶
func (Bond) SignersEqualTo ¶
func (bond Bond) SignersEqualTo(signers []sdk.AccAddress) bool
type BuyOrder ¶
func NewBuyOrder ¶
type FunctionParam ¶
type FunctionParam struct { Param string `json:"param" yaml:"param"` Value sdk.Dec `json:"value" yaml:"value"` }
func NewFunctionParam ¶
func NewFunctionParam(param string, value sdk.Dec) FunctionParam
type FunctionParamRestrictions ¶
func GetExceptionsForFunctionType ¶
func GetExceptionsForFunctionType(fnType string) (restrictions FunctionParamRestrictions, err error)
type FunctionParams ¶
type FunctionParams []FunctionParam
func (FunctionParams) String ¶
func (fps FunctionParams) String() (result string)
func (FunctionParams) Validate ¶
func (fps FunctionParams) Validate(functionType string) error
type GenesisState ¶
type GenesisState struct { Bonds []Bond `json:"bonds" yaml:"bonds"` Batches []Batch `json:"batches" yaml:"batches"` Params Params `json:"params" yaml:"params"` }
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
func NewGenesisState ¶
func NewGenesisState(bonds []Bond, batches []Batch, params Params) GenesisState
type MsgBuy ¶
type MsgBuy struct { Buyer sdk.AccAddress `json:"buyer" yaml:"buyer"` Amount sdk.Coin `json:"amount" yaml:"amount"` MaxPrices sdk.Coins `json:"max_prices" yaml:"max_prices"` }
func (MsgBuy) GetSignBytes ¶
func (MsgBuy) GetSigners ¶
func (msg MsgBuy) GetSigners() []sdk.AccAddress
func (MsgBuy) ValidateBasic ¶
type MsgCreateBond ¶
type MsgCreateBond struct { Token string `json:"token" yaml:"token"` Name string `json:"name" yaml:"name"` Description string `json:"description" yaml:"description"` FunctionType string `json:"function_type" yaml:"function_type"` FunctionParameters FunctionParams `json:"function_parameters" yaml:"function_parameters"` Creator sdk.AccAddress `json:"creator" yaml:"creator"` ReserveTokens []string `json:"reserve_tokens" yaml:"reserve_tokens"` TxFeePercentage sdk.Dec `json:"tx_fee_percentage" yaml:"tx_fee_percentage"` ExitFeePercentage sdk.Dec `json:"exit_fee_percentage" yaml:"exit_fee_percentage"` FeeAddress sdk.AccAddress `json:"fee_address" yaml:"fee_address"` MaxSupply sdk.Coin `json:"max_supply" yaml:"max_supply"` OrderQuantityLimits sdk.Coins `json:"order_quantity_limits" yaml:"order_quantity_limits"` SanityRate sdk.Dec `json:"sanity_rate" yaml:"sanity_rate"` SanityMarginPercentage sdk.Dec `json:"sanity_margin_percentage" yaml:"sanity_margin_percentage"` AllowSells bool `json:"allow_sells" yaml:"allow_sells"` Signers []sdk.AccAddress `json:"signers" yaml:"signers"` BatchBlocks sdk.Uint `json:"batch_blocks" yaml:"batch_blocks"` OutcomePayment sdk.Coins `json:"outcome_payment" yaml:"outcome_payment"` }
func NewMsgCreateBond ¶
func NewMsgCreateBond(token, name, description string, creator sdk.AccAddress, functionType string, functionParameters FunctionParams, reserveTokens []string, txFeePercentage, exitFeePercentage sdk.Dec, feeAddress sdk.AccAddress, maxSupply sdk.Coin, orderQuantityLimits sdk.Coins, sanityRate, sanityMarginPercentage sdk.Dec, allowSell bool, signers []sdk.AccAddress, batchBlocks sdk.Uint, outcomePayment sdk.Coins) MsgCreateBond
func (MsgCreateBond) GetSignBytes ¶
func (msg MsgCreateBond) GetSignBytes() []byte
func (MsgCreateBond) GetSigners ¶
func (msg MsgCreateBond) GetSigners() []sdk.AccAddress
func (MsgCreateBond) Route ¶
func (msg MsgCreateBond) Route() string
func (MsgCreateBond) Type ¶
func (msg MsgCreateBond) Type() string
func (MsgCreateBond) ValidateBasic ¶
func (msg MsgCreateBond) ValidateBasic() error
type MsgEditBond ¶
type MsgEditBond struct { Token string `json:"token" yaml:"token"` Name string `json:"name" yaml:"name"` Description string `json:"description" yaml:"description"` OrderQuantityLimits string `json:"order_quantity_limits" yaml:"order_quantity_limits"` SanityRate string `json:"sanity_rate" yaml:"sanity_rate"` SanityMarginPercentage string `json:"sanity_margin_percentage" yaml:"sanity_margin_percentage"` Editor sdk.AccAddress `json:"editor" yaml:"editor"` Signers []sdk.AccAddress `json:"signers" yaml:"signers"` }
func NewMsgEditBond ¶
func NewMsgEditBond(token, name, description, orderQuantityLimits, sanityRate, sanityMarginPercentage string, editor sdk.AccAddress, signers []sdk.AccAddress) MsgEditBond
func (MsgEditBond) GetSignBytes ¶
func (msg MsgEditBond) GetSignBytes() []byte
func (MsgEditBond) GetSigners ¶
func (msg MsgEditBond) GetSigners() []sdk.AccAddress
func (MsgEditBond) Route ¶
func (msg MsgEditBond) Route() string
func (MsgEditBond) Type ¶
func (msg MsgEditBond) Type() string
func (MsgEditBond) ValidateBasic ¶
func (msg MsgEditBond) ValidateBasic() error
type MsgMakeOutcomePayment ¶
type MsgMakeOutcomePayment struct { Sender sdk.AccAddress `json:"sender" yaml:"sender"` BondToken string `json:"bond_token" yaml:"bond_token"` }
func NewMsgMakeOutcomePayment ¶
func NewMsgMakeOutcomePayment(sender sdk.AccAddress, bondToken string) MsgMakeOutcomePayment
func (MsgMakeOutcomePayment) GetSignBytes ¶
func (msg MsgMakeOutcomePayment) GetSignBytes() []byte
func (MsgMakeOutcomePayment) GetSigners ¶
func (msg MsgMakeOutcomePayment) GetSigners() []sdk.AccAddress
func (MsgMakeOutcomePayment) Route ¶
func (msg MsgMakeOutcomePayment) Route() string
func (MsgMakeOutcomePayment) Type ¶
func (msg MsgMakeOutcomePayment) Type() string
func (MsgMakeOutcomePayment) ValidateBasic ¶
func (msg MsgMakeOutcomePayment) ValidateBasic() error
type MsgSell ¶
type MsgSell struct { Seller sdk.AccAddress `json:"seller" yaml:"seller"` Amount sdk.Coin `json:"amount" yaml:"amount"` }
func NewMsgSell ¶
func NewMsgSell(seller sdk.AccAddress, amount sdk.Coin) MsgSell
func (MsgSell) GetSignBytes ¶
func (MsgSell) GetSigners ¶
func (msg MsgSell) GetSigners() []sdk.AccAddress
func (MsgSell) ValidateBasic ¶
type MsgSwap ¶
type MsgSwap struct { Swapper sdk.AccAddress `json:"swapper" yaml:"swapper"` BondToken string `json:"bond_token" yaml:"bond_token"` From sdk.Coin `json:"from" yaml:"from"` ToToken string `json:"to_token" yaml:"to_token"` }
func NewMsgSwap ¶
func (MsgSwap) GetSignBytes ¶
func (MsgSwap) GetSigners ¶
func (msg MsgSwap) GetSigners() []sdk.AccAddress
func (MsgSwap) ValidateBasic ¶
type MsgWithdrawShare ¶
type MsgWithdrawShare struct {}
func NewMsgWithdrawShare ¶
func NewMsgWithdrawShare(recipient sdk.AccAddress, bondToken string) MsgWithdrawShare
func (MsgWithdrawShare) GetSignBytes ¶
func (msg MsgWithdrawShare) GetSignBytes() []byte
func (MsgWithdrawShare) GetSigners ¶
func (msg MsgWithdrawShare) GetSigners() []sdk.AccAddress
func (MsgWithdrawShare) Route ¶
func (msg MsgWithdrawShare) Route() string
func (MsgWithdrawShare) Type ¶
func (msg MsgWithdrawShare) Type() string
func (MsgWithdrawShare) ValidateBasic ¶
func (msg MsgWithdrawShare) ValidateBasic() error
type Params ¶
type Params struct {
ReservedBondTokens []string `json:"reserved_bond_tokens" yaml:"reserved_bond_tokens"`
}
bonds parameters
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() params.ParamSetPairs
Implements params.ParamSet
type QueryBonds ¶
type QueryBonds []string
func (QueryBonds) String ¶
func (b QueryBonds) String() string
type QueryBuyPrice ¶
type QueryBuyPrice struct { AdjustedSupply sdk.Coin `json:"adjusted_supply" yaml:"asdjusted_supply"` Prices sdk.Coins `json:"prices" yaml:"prices"` TxFees sdk.Coins `json:"tx_fees" yaml:"tx_fees"` TotalPrices sdk.Coins `json:"total_prices" yaml:"total_prices"` TotalFees sdk.Coins `json:"total_fees" yaml:"total_fees"` }
type QuerySellReturn ¶
type QuerySellReturn struct { AdjustedSupply sdk.Coin `json:"adjusted_supply" yaml:"asdjusted_supply"` Returns sdk.Coins `json:"returns" yaml:"returns"` TxFees sdk.Coins `json:"tx_fees" yaml:"tx_fees"` ExitFees sdk.Coins `json:"exit_fees" yaml:"exit_fees"` TotalReturns sdk.Coins `json:"total_returns" yaml:"total_returns"` TotalFees sdk.Coins `json:"total_fees" yaml:"total_fees"` }
type QuerySwapReturn ¶
type SellOrder ¶
type SellOrder struct {
BaseOrder
}
func NewSellOrder ¶
func NewSellOrder(address sdk.AccAddress, amount sdk.Coin) SellOrder
Click to show internal directories.
Click to hide internal directories.