Versions in this module Expand all Collapse all v0 v0.11.1 Mar 16, 2021 v0.10.1 Mar 16, 2021 Changes in this version + const AttributeKeyAddress + const AttributeKeyAmountYieldPerBlock + const AttributeKeyClaimed + const AttributeKeyDeposit + const AttributeKeyMinLockAmount + const AttributeKeyPool + const AttributeKeyStartHeightToYield + const AttributeKeyWithdraw + const AttributeKeyYieldToken + const AttributeValueCategory + const CodeInsufficientAmount + const CodeInvalidAddress + const CodeInvalidDenom + const CodeInvalidInput + const CodeInvalidInputAmount + const CodeInvalidLockInfo + const CodeInvalidPoolOwner + const CodeInvalidStartHeight + const CodeLockAmountBelowMinimum + const CodeNoFarmPoolFound + const CodePoolAlreadyExist + const CodePoolNameLength + const CodePoolNotFinished + const CodePoolNotInWhiteList + const CodeRemainingAmountNotZero + const CodeSendCoinsFromAccountToModuleFailed + const CodeSendCoinsFromModuleToAccountFailed + const CodeSwapTokenPairNotExist + const CodeTokenNotExist + const CodeUnexpectedProposalType + const CodeUnknownFarmMsgType + const CodeUnknownFarmQueryType + const DefaultCodespace + const DefaultParamspace + const EventTypeClaim + const EventTypeCreatePool + const EventTypeDestroyPool + const EventTypeLock + const EventTypeProvide + const EventTypeUnlock + const MaxPoolNameLength + const MintFarmingAccount + const ModuleName + const PeriodByteArrayLength + const QuerierRoute + const QueryAccount + const QueryAccountsLockedTo + const QueryEarnings + const QueryLockInfo + const QueryParameters + const QueryPool + const QueryPoolNum + const QueryPools + const QueryWhitelist + const RouterKey + const StoreKey + const TStoreKey + const YieldFarmingAccount + var Address2PoolPrefix = []byte + var FarmPoolPrefix = []byte + var KeyCreatePoolDeposit = []byte("CreatePoolDeposit") + var KeyCreatePoolFee = []byte("CreatePoolFee") + var KeyQuoteSymbol = []byte("QuoteSymbol") + var ModuleCdc *codec.Codec + var Pool2AddressPrefix = []byte + var PoolCurrentRewardsPrefix = []byte + var PoolHistoricalRewardsPrefix = []byte + var PoolsYieldNativeTokenPrefix = []byte + func ErrInsufficientAmount(amount string, inputAmount string) sdk.EnvelopedErr + func ErrInvalidDenom(symbolLocked string, token string) sdk.EnvelopedErr + func ErrInvalidInput(msg string) sdk.EnvelopedErr + func ErrInvalidInputAmount(amount string) sdk.EnvelopedErr + func ErrInvalidPoolOwner(address string, poolName string) sdk.EnvelopedErr + func ErrInvalidStartHeight() sdk.EnvelopedErr + func ErrLockAmountBelowMinimum(minLockAmount, amount sdk.Dec) sdk.EnvelopedErr + func ErrNilAddress() sdk.EnvelopedErr + func ErrNoFarmPoolFound(poolName string) sdk.EnvelopedErr + func ErrNoLockInfoFound(addr string, pool string) sdk.EnvelopedErr + func ErrPoolAlreadyExist(poolName string) sdk.EnvelopedErr + func ErrPoolNameLength(poolName string, got, max int) sdk.EnvelopedErr + func ErrPoolNameNotExistedInWhiteList(poolName string) sdk.EnvelopedErr + func ErrPoolNotFinished(poolName string) sdk.EnvelopedErr + func ErrRemainingAmountNotZero(amount string) sdk.EnvelopedErr + func ErrSendCoinsFromAccountToModuleFailed(content string) sdk.EnvelopedErr + func ErrSendCoinsFromModuleToAccountFailed(content string) sdk.EnvelopedErr + func ErrSwapTokenPairNotExist(tokenName string) sdk.EnvelopedErr + func ErrTokenNotExist(tokenName string) sdk.EnvelopedErr + func ErrUnexpectedProposalType(proposalType string) sdk.EnvelopedErr + func ErrUnknownFarmMsgType(content string) sdk.EnvelopedErr + func ErrUnknownFarmQueryType(content string) sdk.EnvelopedErr + func GetAddressInFarmPoolKey(poolName string, addr sdk.AccAddress) []byte + func GetFarmPoolKey(poolName string) []byte + func GetLockInfoKey(addr sdk.AccAddress, poolName string) []byte + func GetPoolCurrentRewardsKey(poolName string) []byte + func GetPoolHistoricalRewardsKey(poolName string, period uint64) []byte + func GetPoolHistoricalRewardsPrefix(poolName string) []byte + func GetWhitelistMemberKey(poolName string) []byte + func ParamKeyTable() params.KeyTable + func RegisterCodec(cdc *codec.Codec) + func SplitPoolNameFromLockInfoKey(lockInfoKey []byte) string + func SplitPoolsYieldNativeTokenKey(keyWithPrefix []byte) (poolName string) + func ValidateGenesis(data GenesisState) error + type AccAddrList []sdk.AccAddress + func (aal AccAddrList) String() string + type BackendKeeper interface + OnFarmClaim func(ctx sdk.Context, address sdk.AccAddress, poolName string, ...) + type CodeType = uint32 + type Earnings struct + AmountLocked sdk.SysCoin + AmountYielded sdk.SysCoins + TargetBlockHeight int64 + func NewEarnings(targetBlockHeight int64, amountLocked sdk.SysCoin, amountYielded sdk.SysCoins) Earnings + func (e Earnings) String() string + type FarmPool struct + DepositAmount sdk.SysCoin + MinLockAmount sdk.SysCoin + Name string + Owner sdk.AccAddress + TotalAccumulatedRewards sdk.SysCoins + TotalValueLocked sdk.SysCoin + YieldedTokenInfos YieldedTokenInfos + func NewFarmPool(owner sdk.AccAddress, name string, minLockAmount sdk.SysCoin, ...) FarmPool + func (fp FarmPool) Finished() bool + func (fp FarmPool) String() string + type FarmPools []FarmPool + func (fps FarmPools) String() (out string) + type GenesisState struct + LockInfos []LockInfo + Params Params + PoolCurrentRewards []PoolCurrentRewardsRecord + PoolHistoricalRewards []PoolHistoricalRewardsRecord + Pools FarmPools + WhiteList PoolNameList + func DefaultGenesisState() GenesisState + func NewGenesisState(pools FarmPools, lockInfos []LockInfo, histories []PoolHistoricalRewardsRecord, ...) GenesisState + type LockInfo struct + Amount sdk.SysCoin + Owner sdk.AccAddress + PoolName string + ReferencePeriod uint64 + StartBlockHeight int64 + func NewLockInfo(owner sdk.AccAddress, poolName string, amount sdk.SysCoin, ...) LockInfo + func (li LockInfo) String() string + type LockInfoRecord struct + LockAddress sdk.AccAddress + LockInfo LockInfo + PoolName string + type ManageWhiteListProposal struct + Description string + IsAdded bool + PoolName string + Title string + func NewManageWhiteListProposal(title, description, poolName string, isAdded bool) ManageWhiteListProposal + func (mp ManageWhiteListProposal) GetDescription() string + func (mp ManageWhiteListProposal) GetTitle() string + func (mp ManageWhiteListProposal) ProposalRoute() string + func (mp ManageWhiteListProposal) ProposalType() string + func (mp ManageWhiteListProposal) String() string + func (mp ManageWhiteListProposal) ValidateBasic() sdk.Error + type MsgClaim struct + Address sdk.AccAddress + PoolName string + func NewMsgClaim(poolName string, address sdk.AccAddress) MsgClaim + func (m MsgClaim) GetSignBytes() []byte + func (m MsgClaim) GetSigners() []sdk.AccAddress + func (m MsgClaim) Route() string + func (m MsgClaim) Type() string + func (m MsgClaim) ValidateBasic() sdk.Error + type MsgCreatePool struct + MinLockAmount sdk.SysCoin + Owner sdk.AccAddress + PoolName string + YieldedSymbol string + func NewMsgCreatePool(address sdk.AccAddress, poolName string, minLockAmount sdk.SysCoin, ...) MsgCreatePool + func (m MsgCreatePool) GetSignBytes() []byte + func (m MsgCreatePool) GetSigners() []sdk.AccAddress + func (m MsgCreatePool) Route() string + func (m MsgCreatePool) Type() string + func (m MsgCreatePool) ValidateBasic() sdk.Error + type MsgDestroyPool struct + Owner sdk.AccAddress + PoolName string + func NewMsgDestroyPool(address sdk.AccAddress, poolName string) MsgDestroyPool + func (m MsgDestroyPool) GetSignBytes() []byte + func (m MsgDestroyPool) GetSigners() []sdk.AccAddress + func (m MsgDestroyPool) Route() string + func (m MsgDestroyPool) Type() string + func (m MsgDestroyPool) ValidateBasic() sdk.Error + type MsgLock struct + Address sdk.AccAddress + Amount sdk.SysCoin + PoolName string + func NewMsgLock(poolName string, address sdk.AccAddress, amount sdk.SysCoin) MsgLock + func (m MsgLock) GetSignBytes() []byte + func (m MsgLock) GetSigners() []sdk.AccAddress + func (m MsgLock) Route() string + func (m MsgLock) Type() string + func (m MsgLock) ValidateBasic() sdk.Error + type MsgProvide struct + Address sdk.AccAddress + Amount sdk.SysCoin + AmountYieldedPerBlock sdk.Dec + PoolName string + StartHeightToYield int64 + func NewMsgProvide(poolName string, address sdk.AccAddress, amount sdk.SysCoin, ...) MsgProvide + func (m MsgProvide) GetSignBytes() []byte + func (m MsgProvide) GetSigners() []sdk.AccAddress + func (m MsgProvide) Route() string + func (m MsgProvide) Type() string + func (m MsgProvide) ValidateBasic() sdk.Error + type MsgSetWhite struct + Address sdk.AccAddress + PoolName string + func NewMsgSetWhite(poolName string, address sdk.AccAddress) MsgSetWhite + func (m MsgSetWhite) GetSignBytes() []byte + func (m MsgSetWhite) GetSigners() []sdk.AccAddress + func (m MsgSetWhite) Route() string + func (m MsgSetWhite) Type() string + func (m MsgSetWhite) ValidateBasic() sdk.Error + type MsgUnlock struct + Address sdk.AccAddress + Amount sdk.SysCoin + PoolName string + func NewMsgUnlock(poolName string, address sdk.AccAddress, amount sdk.SysCoin) MsgUnlock + func (m MsgUnlock) GetSignBytes() []byte + func (m MsgUnlock) GetSigners() []sdk.AccAddress + func (m MsgUnlock) Route() string + func (m MsgUnlock) Type() string + func (m MsgUnlock) ValidateBasic() sdk.Error + type ParamSubspace interface + Get func(ctx sdk.Context, key []byte, ptr interface{}) + GetParamSet func(ctx sdk.Context, ps params.ParamSet) + SetParamSet func(ctx sdk.Context, ps params.ParamSet) + WithKeyTable func(table params.KeyTable) params.Subspace + type Params struct + CreatePoolDeposit sdk.SysCoin + CreatePoolFee sdk.SysCoin + QuoteSymbol string + YieldNativeToken bool + func DefaultParams() Params + func (p *Params) ParamSetPairs() params.ParamSetPairs + func (p Params) String() string + type PoolCurrentRewards struct + Period uint64 + Rewards sdk.SysCoins + StartBlockHeight int64 + func NewPoolCurrentRewards(startBlockHeight int64, period uint64, token sdk.SysCoins) PoolCurrentRewards + type PoolCurrentRewardsRecord struct + PoolName string + Rewards PoolCurrentRewards + type PoolHistoricalRewards struct + CumulativeRewardRatio sdk.SysCoins + ReferenceCount uint16 + func NewPoolHistoricalRewards(cumulativeRewardRatio sdk.SysCoins, referenceCount uint16) PoolHistoricalRewards + type PoolHistoricalRewardsRecord struct + Period uint64 + PoolName string + Rewards PoolHistoricalRewards + type PoolNameList []string + func (pnl PoolNameList) String() string + type PoolNum struct + Number uint + func NewPoolNum(num uint) PoolNum + func (pn PoolNum) String() string + type QueryAccountParams struct + AccAddress sdk.AccAddress + func NewQueryAccountParams(accAddr sdk.AccAddress) QueryAccountParams + type QueryPoolAccountParams struct + AccAddress sdk.AccAddress + PoolName string + func NewQueryPoolAccountParams(poolName string, accAddr sdk.AccAddress) QueryPoolAccountParams + type QueryPoolParams struct + PoolName string + func NewQueryPoolParams(poolName string) QueryPoolParams + type QueryPoolsParams struct + Limit int + Page int + func NewQueryPoolsParams(page, limit int) QueryPoolsParams + type YieldedTokenInfo struct + AmountYieldedPerBlock sdk.Dec + RemainingAmount sdk.SysCoin + StartBlockHeightToYield int64 + func NewYieldedTokenInfo(remainingAmount sdk.SysCoin, startBlockHeightToYield int64, ...) YieldedTokenInfo + func (yti YieldedTokenInfo) String() string + type YieldedTokenInfos []YieldedTokenInfo + func NewYieldedTokenInfos(yieldedTokenInfos ...YieldedTokenInfo) YieldedTokenInfos + func (ytis YieldedTokenInfos) String() (out string)