wars

package
v0.0.0-...-00bf0a9 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PowerFunction     = types.PowerFunction
	SigmoidFunction   = types.SigmoidFunction
	SwapperFunction   = types.SwapperFunction
	AugmentedFunction = types.AugmentedFunction

	HatchState  = types.HatchState
	OpenState   = types.OpenState
	SettleState = types.SettleState

	DoNotModifyField = types.DoNotModifyField

	AnyNumberOfReserveTokens = types.AnyNumberOfReserveTokens

	DefaultCodespace = types.DefaultCodespace

	ModuleName        = types.ModuleName
	DefaultParamspace = types.DefaultParamspace
	StoreKey          = types.StoreKey

	WarsMintBurnAccount        = types.WarsMintBurnAccount
	BatchesIntermediaryAccount = types.BatchesIntermediaryAccount
	WarsReserveAccount         = types.WarsReserveAccount

	QuerierRoute = types.QuerierRoute
	RouterKey    = types.RouterKey
)

Variables

View Source
var (
	NewQuerier = keeper.NewQuerier
	NewKeeper  = keeper.NewKeeper

	RegisterInvariants = keeper.RegisterInvariants
	AllInvariants      = keeper.AllInvariants
	SupplyInvariant    = keeper.SupplyInvariant
	ReserveInvariant   = keeper.ReserveInvariant

	RegisterCodec = types.RegisterCodec

	NewBatch         = types.NewBatch
	NewBaseOrder     = types.NewBaseOrder
	NewBuyOrder      = types.NewBuyOrder
	NewSellOrder     = types.NewSellOrder
	NewSwapOrder     = types.NewSwapOrder
	NewFunctionParam = types.NewFunctionParam
	NewWar           = types.NewWar

	RoundReservePrice     = types.RoundReservePrice
	RoundReserveReturn    = types.RoundReserveReturn
	RoundFee              = types.RoundFee
	RoundReservePrices    = types.RoundReservePrices
	RoundReserveReturns   = types.RoundReserveReturns
	MultiplyDecCoinByInt  = types.MultiplyDecCoinByInt
	MultiplyDecCoinsByInt = types.MultiplyDecCoinsByInt
	MultiplyDecCoinByDec  = types.MultiplyDecCoinByDec
	MultiplyDecCoinsByDec = types.MultiplyDecCoinsByDec
	DivideDecCoinByDec    = types.DivideDecCoinByDec
	DivideDecCoinsByDec   = types.DivideDecCoinsByDec
	AdjustFees            = types.AdjustFees

	NewGenesisState     = types.NewGenesisState
	ValidateGenesis     = types.ValidateGenesis
	DefaultGenesisState = types.DefaultGenesisState

	GetWarKey       = types.GetWarKey
	GetBatchKey     = types.GetBatchKey
	GetLastBatchKey = types.GetLastBatchKey

	NewMsgCreateWar          = types.NewMsgCreateWar
	NewMsgEditWar            = types.NewMsgEditWar
	NewMsgBuy                = types.NewMsgBuy
	NewMsgSell               = types.NewMsgSell
	NewMsgSwap               = types.NewMsgSwap
	NewMsgMakeOutcomePayment = types.NewMsgMakeOutcomePayment
	NewMsgWithdrawShare      = types.NewMsgWithdrawShare

	ParseFunctionParams = client.ParseFunctionParams
	ParseSigners        = client.ParseSigners
	ParseTwoPartCoin    = client.ParseTwoPartCoin

	ModuleCdc = types.ModuleCdc

	RequiredParamsForFunctionType    = types.RequiredParamsForFunctionType
	NoOfReserveTokensForFunctionType = types.NoOfReserveTokensForFunctionType
	ExtraParameterRestrictions       = types.ExtraParameterRestrictions

	ErrArgumentMustBePositive               = types.ErrArgumentMustBePositive
	ErrArgumentMustBeInteger                = types.ErrArgumentMustBeInteger
	ErrArgumentMustBeBetween                = types.ErrArgumentMustBeBetween
	ErrArgumentCannotBeEmpty                = types.ErrArgumentCannotBeEmpty
	ErrArgumentCannotBeNegative             = types.ErrArgumentCannotBeNegative
	ErrArgumentMissingOrNonFloat            = types.ErrArgumentMissingOrNonFloat
	ErrWarDoesNotExist                      = types.ErrWarDoesNotExist
	ErrWarAlreadyExists                     = types.ErrWarAlreadyExists
	ErrWarTokenCannotBeStakingToken         = types.ErrWarTokenCannotBeStakingToken
	ErrInvalidStateForAction                = types.ErrInvalidStateForAction
	ErrReserveDenomsMismatch                = types.ErrReserveDenomsMismatch
	ErrOrderQuantityLimitExceeded           = types.ErrOrderQuantityLimitExceeded
	ErrValuesViolateSanityRate              = types.ErrValuesViolateSanityRate
	ErrWarDoesNotAllowSelling               = types.ErrWarDoesNotAllowSelling
	ErrFunctionNotAvailableForFunctionType  = types.ErrFunctionNotAvailableForFunctionType
	ErrCannotMakeZeroOutcomePayment         = types.ErrCannotMakeZeroOutcomePayment
	ErrNoWarTokensOwned                     = types.ErrNoWarTokensOwned
	ErrCannotBurnMoreThanSupply             = types.ErrCannotBurnMoreThanSupply
	ErrFeesCannotBeOrExceed100Percent       = types.ErrFeesCannotBeOrExceed100Percent
	ErrFromAndToCannotBeTheSameToken        = types.ErrFromAndToCannotBeTheSameToken
	ErrCannotMintMoreThanMaxSupply          = types.ErrCannotMintMoreThanMaxSupply
	ErrMaxPriceExceeded                     = types.ErrMaxPriceExceeded
	ErrInsufficientReserveToBuy             = types.ErrInsufficientReserveToBuy
	ErrIncorrectNumberOfFunctionParameters  = types.ErrIncorrectNumberOfFunctionParameters
	ErrFunctionParameterMissingOrNonFloat   = types.ErrFunctionParameterMissingOrNonFloat
	ErrFunctionRequiresNonZeroCurrentSupply = types.ErrFunctionRequiresNonZeroCurrentSupply
	ErrTokenIsNotAValidReserveToken         = types.ErrTokenIsNotAValidReserveToken
	ErrSwapAmountTooSmallToGiveAnyReturn    = types.ErrSwapAmountTooSmallToGiveAnyReturn
	ErrSwapAmountCausesReserveDepletion     = types.ErrSwapAmountCausesReserveDepletion
	ErrInvalidCoinDenomination              = types.ErrInvalidCoinDenomination
	ErrMaxSupplyDenomDoesNotMatchTokenDenom = types.ErrMaxSupplyDenomDoesNotMatchTokenDenom
	ErrDidNotEditAnything                   = types.ErrDidNotEditAnything
	ErrWarTokenCannotAlsoBeReserveToken     = types.ErrWarTokenCannotAlsoBeReserveToken
	ErrDuplicateReserveToken                = types.ErrDuplicateReserveToken
	ErrUnrecognizedFunctionType             = types.ErrUnrecognizedFunctionType
	ErrIncorrectNumberOfReserveTokens       = types.ErrIncorrectNumberOfReserveTokens
	ErrInvalidFunctionParameter             = types.ErrInvalidFunctionParameter
	ErrArgumentMissingOrNonUInteger         = types.ErrArgumentMissingOrNonUInteger
	ErrArgumentMissingOrNonBoolean          = types.ErrArgumentMissingOrNonBoolean

	WarsKeyPrefix        = types.WarsKeyPrefix
	BatchesKeyPrefix     = types.BatchesKeyPrefix
	LastBatchesKeyPrefix = types.LastBatchesKeyPrefix
)

Functions

func EndBlocker

func EndBlocker(ctx sdk.Context, keeper keeper.Keeper) []abci.ValidatorUpdate

func InitGenesis

func InitGenesis(ctx sdk.Context, keeper Keeper, data GenesisState)

func NewHandler

func NewHandler(keeper keeper.Keeper) sdk.Handler

Types

type AppModule

type AppModule struct {
	AppModuleBasic
	// contains filtered or unexported fields
}

func NewAppModule

func NewAppModule(k keeper.Keeper, accountKeeper auth.AccountKeeper) AppModule

func (AppModule) BeginBlock

func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock)

func (AppModule) EndBlock

func (AppModule) ExportGenesis

func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage

func (AppModule) GenerateGenesisState

func (AppModule) GenerateGenesisState(simState *module.SimulationState)

GenerateGenesisState creates a randomized GenState of the distribution module.

func (AppModule) InitGenesis

func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate

func (AppModule) Name

func (AppModule) Name() string

func (AppModule) NewHandler

func (am AppModule) NewHandler() sdk.Handler

func (AppModule) NewQuerierHandler

func (am AppModule) NewQuerierHandler() sdk.Querier

func (AppModule) ProposalContents

ProposalContents doesn't return any content functions for governance proposals.

func (AppModule) QuerierRoute

func (am AppModule) QuerierRoute() string

func (AppModule) RandomizedParams

func (AppModule) RandomizedParams(r *rand.Rand) []sim.ParamChange

RandomizedParams doesn't create any randomized wars param changes for the simulator. noinspection GoUnusedParameter

func (AppModule) RegisterInvariants

func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)

func (AppModule) RegisterStoreDecoder

func (AppModule) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry)

RegisterStoreDecoder registers a decoder for war module's types

func (AppModule) Route

func (am AppModule) Route() string

func (AppModule) WeightedOperations

func (am AppModule) WeightedOperations(simState module.SimulationState) []sim.WeightedOperation

WeightedOperations returns the all the war module operations with their respective weights.

type AppModuleBasic

type AppModuleBasic struct{}

func (AppModuleBasic) DefaultGenesis

func (AppModuleBasic) DefaultGenesis() json.RawMessage

func (AppModuleBasic) GetQueryCmd

func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command

Get the root query command of this module

func (AppModuleBasic) GetTxCmd

func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command

Get the root tx command of this module

func (AppModuleBasic) Name

func (AppModuleBasic) Name() string

func (AppModuleBasic) RegisterCodec

func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)

func (AppModuleBasic) RegisterRESTRoutes

func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)

Register rest routes

func (AppModuleBasic) ValidateGenesis

func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error

type BaseOrder

type BaseOrder = types.BaseOrder

type Batch

type Batch = types.Batch

type BuyOrder

type BuyOrder = types.BuyOrder

type FunctionParam

type FunctionParam = types.FunctionParam

type FunctionParamRestrictions

type FunctionParamRestrictions = types.FunctionParamRestrictions

type FunctionParams

type FunctionParams = types.FunctionParams

type GenesisState

type GenesisState = types.GenesisState

func ExportGenesis

func ExportGenesis(ctx sdk.Context, k Keeper) GenesisState

type Keeper

type Keeper = keeper.Keeper

type MsgBuy

type MsgBuy = types.MsgBuy

type MsgCreateWar

type MsgCreateWar = types.MsgCreateWar

type MsgEditWar

type MsgEditWar = types.MsgEditWar

type MsgMakeOutcomePayment

type MsgMakeOutcomePayment = types.MsgMakeOutcomePayment

type MsgSell

type MsgSell = types.MsgSell

type MsgSwap

type MsgSwap = types.MsgSwap

type MsgWithdrawShare

type MsgWithdrawShare = types.MsgWithdrawShare

type SellOrder

type SellOrder = types.SellOrder

type SwapOrder

type SwapOrder = types.SwapOrder

type War

type War = types.War

Directories

Path Synopsis
nolint
nolint
cli
internal

Jump to

Keyboard shortcuts

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