Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultOperators() []sdk.AccAddress
- func DisbursementByTimeKey(endTime time.Time) []byte
- func DisbursementQueueKey(address sdk.AccAddress, endTime time.Time) []byte
- func GetDisbursementReferenceIteratorKey() []byte
- func GetDisbursementReferenceKey(reference string) []byte
- func GetOperatorIteratorKey() []byte
- func GetOperatorKey(address sdk.AccAddress) []byte
- func NewAddBuyBackLiquidityProposal(title, description string, amount sdk.Coins) gov.Content
- func NewBurnDistributionProfitsProposal(title, description string, amount sdk.Coins) gov.Content
- func NewRemoveBuyBackLiquidityProposal(title, description string, amount sdk.Coins) gov.Content
- func NewTransferFromDistributionProfitsToBuyBackLiquidityProposal(title, description string, amount sdk.Coins) gov.Content
- func NewTransferFromSwapEscrowToBuyBackProposal(title, description string, amount sdk.Coins) gov.Content
- func NewTransferFromTreasuryToSwapEscrowProposal(title, description string, amount sdk.Coins) gov.Content
- func ParamKeyTable() params.KeyTable
- func RegisterCodec(cdc *codec.Codec)
- func SplitDisbursementReferenceKey(key []byte) string
- func SplitOperatorKey(key []byte) sdk.AccAddress
- func ValidateGenesis(data GenesisState) error
- type AddBuyBackLiquidityProposal
- func (p AddBuyBackLiquidityProposal) GetDescription() string
- func (p AddBuyBackLiquidityProposal) GetTitle() string
- func (p AddBuyBackLiquidityProposal) ProposalRoute() string
- func (p AddBuyBackLiquidityProposal) ProposalType() string
- func (p AddBuyBackLiquidityProposal) String() string
- func (p AddBuyBackLiquidityProposal) ValidateBasic() error
- type BurnDistributionProfitsProposal
- func (p BurnDistributionProfitsProposal) GetDescription() string
- func (p BurnDistributionProfitsProposal) GetTitle() string
- func (p BurnDistributionProfitsProposal) ProposalRoute() string
- func (p BurnDistributionProfitsProposal) ProposalType() string
- func (p BurnDistributionProfitsProposal) String() string
- func (p BurnDistributionProfitsProposal) ValidateBasic() error
- type Disbursement
- type GenesisState
- type MsgAddOperator
- type MsgCancelDisbursement
- type MsgCreateBuyOrder
- type MsgCreateSellOrder
- type MsgDisburse
- type MsgDisburseFromEscrow
- type MsgDisburseToEscrow
- type MsgRemoveOperator
- type MsgRevertFromEscrow
- type MsgSwap
- type Params
- type QueryResDisbursements
- type QueryResOperators
- type QueryResPrice
- type ReferenceAmountInfo
- type RemoveBuyBackLiquidityProposal
- func (p RemoveBuyBackLiquidityProposal) GetDescription() string
- func (p RemoveBuyBackLiquidityProposal) GetTitle() string
- func (p RemoveBuyBackLiquidityProposal) ProposalRoute() string
- func (p RemoveBuyBackLiquidityProposal) ProposalType() string
- func (p RemoveBuyBackLiquidityProposal) String() string
- func (p RemoveBuyBackLiquidityProposal) ValidateBasic() error
- type TransferFromDistributionProfitsToBuyBackLiquidityProposal
- func (p TransferFromDistributionProfitsToBuyBackLiquidityProposal) GetDescription() string
- func (p TransferFromDistributionProfitsToBuyBackLiquidityProposal) GetTitle() string
- func (p TransferFromDistributionProfitsToBuyBackLiquidityProposal) ProposalRoute() string
- func (p TransferFromDistributionProfitsToBuyBackLiquidityProposal) ProposalType() string
- func (p TransferFromDistributionProfitsToBuyBackLiquidityProposal) String() string
- func (p TransferFromDistributionProfitsToBuyBackLiquidityProposal) ValidateBasic() error
- type TransferFromSwapEscrowToBuyBackProposal
- func (p TransferFromSwapEscrowToBuyBackProposal) GetDescription() string
- func (p TransferFromSwapEscrowToBuyBackProposal) GetTitle() string
- func (p TransferFromSwapEscrowToBuyBackProposal) ProposalRoute() string
- func (p TransferFromSwapEscrowToBuyBackProposal) ProposalType() string
- func (p TransferFromSwapEscrowToBuyBackProposal) String() string
- func (p TransferFromSwapEscrowToBuyBackProposal) ValidateBasic() error
- type TransferFromTreasuryToSwapEscrowProposal
- func (p TransferFromTreasuryToSwapEscrowProposal) GetDescription() string
- func (p TransferFromTreasuryToSwapEscrowProposal) GetTitle() string
- func (p TransferFromTreasuryToSwapEscrowProposal) ProposalRoute() string
- func (p TransferFromTreasuryToSwapEscrowProposal) ProposalType() string
- func (p TransferFromTreasuryToSwapEscrowProposal) String() string
- func (p TransferFromTreasuryToSwapEscrowProposal) ValidateBasic() error
- type Treasury
Constants ¶
View Source
const ( EventTypeDisburse = "disburse" EventTypeDisburseToEscrow = "disburse_to_escrow" EventTypeDisburseFromEscrow = "disburse_from_escrow" EventTypeRevertFromEscrow = "revert_from_escrow" EventTypeAddOperator = "add_operator" EventTypeRemoveOperator = "remove_operator" EventTypeCancelDisbursement = "cancel_disbursement" EventTypeCreateSellOrder = "create_sell_order" EventTypeCreateBuyOrder = "create_buy_order" EventTypeTransfer = "transfer_to_distribution_module" EventTypeSwap = "swap" EventTypeAddBuyBackLiquidity = "AddBuyBackLiquidity" EventTypeRemoveBuyBackLiquidity = "RemoveBuyBackLiquidity" EventTypeBurnDistributionProfits = "BurnDistributionProfits" EventTypeTransferFromDistributionProfitsToBuyBackLiquidity = "TransferFromDistributionProfitsToBuyBackLiquidity" EventTypeTransferFromTreasuryToSwapEscrow = "TransferFromTreasuryToSwapEscrow" EventTypeTransferSwapEscrowToBuyBack = "TransferSwapEscrowToBuyBack" AttributeKeySender = "sender" AttributeKeyRecipient = "recipient" AttributeKeyAmount = "amount" AttributeKeyReference = "reference" AttributeKeyScheduledFor = "scheduledFor" AttributeKeyOperator = "operator" AttributeKeyPinAmount = "pin_amount" AttributeKeyDinAmount = "din_amount" AttributeKeyEscrowRemainder = "escrow_remainder" AttributeKeyTitle = "title" AttributeKeyDescription = "description" AttributeValueModule = ModuleName )
View Source
const ( // ModuleName is the name of the module ModuleName = "treasury" // Module stores initial supply of Anatha // StoreKey to be used when creating the KVStore StoreKey = ModuleName // RouterKey to be used for routing msgs RouterKey = ModuleName // QuerierRoute to be used for querierer msgs QuerierRoute = ModuleName BuyBackLiquidityFundModuleName = "buyback_liquidity" // Module stores the supply of AST for executing BuyBacks BuyBackFundModuleName = "treasury_buyback" // Module stores the bought back supply of Anatha (participates in distribution) DistributionProfitsModuleName = "distribution_profits" // Module stores AST profits from Anatha purchases with AST TreasuryEscrowModuleName = "treasury_escrow" // Module stores distributions without supplied recipient addresses SwapEscrowModuleName = "swap_escrow" // Module stores ERC20 token balance )
View Source
const ( DefaultParamspace = ModuleName DefaultRiskAssesmentDuration = time.Hour * 24 * 3 // devnet: time.Second * 60 * 2 DefaultRiskAssesmentAmount = 10000 // usd )
View Source
const ( ProposalTypeAddBuyBackLiquidity = "AddBuyBackLiquidity" ProposalTypeRemoveBuyBackLiquidity = "RemoveBuyBackLiquidity" ProposalTypeBurnDistributionProfits = "BurnDistributionProfits" ProposalTypeTransferFromDistributionProfitsToBuyBackLiquidity = "TransferFromDistributionProfitsToBuyBackLiquidity" ProposalTypeTransferFromTreasuryToSwapEscrow = "TransferFromTreasuryToSwapEscrow" ProposalTypeTransferSwapEscrowToBuyBack = "TransferSwapEscrowToBuyBack" )
Variables ¶
View Source
var ( ErrNotManager = sdkerrors.Register(ModuleName, 101, "No Manager permissions to execute the action.") ErrNotOperator = sdkerrors.Register(ModuleName, 102, "No Operator permissions to execute the action.") ErrInvalidTime = sdkerrors.Register(ModuleName, 103, "Invalid time") ErrEscrowDistributionAmountExceeded = sdkerrors.Register(ModuleName, 109, "escrow distribution amount exceeded") ErrInvalidReference = sdkerrors.Register(ModuleName, 110, "Invalid reference") ErrEscrowDisbursed = sdkerrors.Register(ModuleName, 111, "Escrow already disbursed") ErrDuplicateReference = sdkerrors.Register(ModuleName, 112, "Reference already used") ErrEscrowRevertAmountTooBig = sdkerrors.Register(ModuleName, 113, "Escrow revert amount too big") ErrDisbursementNotScheduled = sdkerrors.Register(ModuleName, 114, "Disbursement not scheduled") )
View Source
var ( TreasuryKey = []byte{0x00} OperatorKeyPrefix = []byte{0x10} DisbursementQueueKeyPrefix = []byte{0x12} DisbursementReferenceKeyPrefix = []byte{0x15} StatusPresent = []byte{0x01} )
View Source
var ( KeyManagers = []byte("Managers") KeyRiskAssessmentAmount = []byte("RiskAssesmentAmount") KeyRiskAssessmentDuration = []byte("RiskAssesmentDuration") KeyBuyBackPercentage = []byte("BuyBackPercentage") DefaultManagerAddress = "anatha1qaf2gssp652s6np00a5cxdwytdf3vutdumwc0q" DefaultBuyBackPercentage = sdk.NewDecWithPrec(24, 2) )
View Source
var (
DefaultOperatorsList = []string{
"anatha18klyq6qxyemrgsuyapw80y7xz4gh0lhjk9tj7n",
"anatha1lafvzw2f6nj4sv2k0cpsu4zdxur9l0e98ngzxz",
"anatha13fsp5p3mjcxtr833vcln6kjwvyl8tz66tu2j8z",
}
)
View Source
var ModuleCdc = codec.New()
ModuleCdc defines the module codec
Functions ¶
func DefaultOperators ¶
func DefaultOperators() []sdk.AccAddress
func DisbursementByTimeKey ¶
func DisbursementQueueKey ¶
func DisbursementQueueKey(address sdk.AccAddress, endTime time.Time) []byte
func GetDisbursementReferenceIteratorKey ¶
func GetDisbursementReferenceIteratorKey() []byte
func GetOperatorIteratorKey ¶
func GetOperatorIteratorKey() []byte
func GetOperatorKey ¶
func GetOperatorKey(address sdk.AccAddress) []byte
func NewTransferFromSwapEscrowToBuyBackProposal ¶ added in v0.2.0
func NewTransferFromTreasuryToSwapEscrowProposal ¶ added in v0.2.0
func ParamKeyTable ¶
func RegisterCodec ¶
RegisterCodec registers concrete types on codec
func SplitOperatorKey ¶
func SplitOperatorKey(key []byte) sdk.AccAddress
func ValidateGenesis ¶
func ValidateGenesis(data GenesisState) error
ValidateGenesis validates the treasury genesis parameters
Types ¶
type AddBuyBackLiquidityProposal ¶
type AddBuyBackLiquidityProposal struct { Title string `json:"title" yaml:"title"` Description string `json:"description" yaml:"description"` Amount sdk.Coins `json:"amount" yaml:"amount"` }
func (AddBuyBackLiquidityProposal) GetDescription ¶
func (p AddBuyBackLiquidityProposal) GetDescription() string
func (AddBuyBackLiquidityProposal) GetTitle ¶
func (p AddBuyBackLiquidityProposal) GetTitle() string
func (AddBuyBackLiquidityProposal) ProposalRoute ¶
func (p AddBuyBackLiquidityProposal) ProposalRoute() string
func (AddBuyBackLiquidityProposal) ProposalType ¶
func (p AddBuyBackLiquidityProposal) ProposalType() string
func (AddBuyBackLiquidityProposal) String ¶
func (p AddBuyBackLiquidityProposal) String() string
func (AddBuyBackLiquidityProposal) ValidateBasic ¶
func (p AddBuyBackLiquidityProposal) ValidateBasic() error
type BurnDistributionProfitsProposal ¶
type BurnDistributionProfitsProposal struct { Title string `json:"title" yaml:"title"` Description string `json:"description" yaml:"description"` Amount sdk.Coins `json:"amount" yaml:"amount"` }
func (BurnDistributionProfitsProposal) GetDescription ¶
func (p BurnDistributionProfitsProposal) GetDescription() string
func (BurnDistributionProfitsProposal) GetTitle ¶
func (p BurnDistributionProfitsProposal) GetTitle() string
func (BurnDistributionProfitsProposal) ProposalRoute ¶
func (p BurnDistributionProfitsProposal) ProposalRoute() string
func (BurnDistributionProfitsProposal) ProposalType ¶
func (p BurnDistributionProfitsProposal) ProposalType() string
func (BurnDistributionProfitsProposal) String ¶
func (p BurnDistributionProfitsProposal) String() string
func (BurnDistributionProfitsProposal) ValidateBasic ¶
func (p BurnDistributionProfitsProposal) ValidateBasic() error
type Disbursement ¶
type Disbursement struct { Operator sdk.AccAddress `json:"operator" yaml:"operator"` Recipient sdk.AccAddress `json:"recipient" yaml:"recipient"` Amount sdk.Coins `json:"amount" yaml:"amount"` ScheduledFor time.Time `json:"scheduled_for" yaml:"scheduled_for"` Reference string `json:"reference" yaml:"reference"` }
func NewDisbursement ¶
func NewDisbursement(operator sdk.AccAddress, recipient sdk.AccAddress, amount sdk.Coins, scheduledFor time.Time, reference string) Disbursement
func (Disbursement) String ¶
func (d Disbursement) String() string
type GenesisState ¶
type GenesisState struct { Treasury Treasury `json:"treasury" yaml:"treasury"` Params Params `json:"params" yaml:"params"` Operators []sdk.AccAddress `json:"distribution_operators" yaml:"distribution_operators"` DisbursementQueue []Disbursement `json:"disbursement_queue" yaml:"disbursement_queue"` DisbursementReferences []ReferenceAmountInfo `json:"disbursement_references" yaml:"disbursement_references"` }
GenesisState - all treasury state that must be provided at genesis
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
DefaultGenesisState - default GenesisState used by Cosmos Hub
func NewGenesisState ¶
func NewGenesisState(treasury Treasury, params Params, operators []sdk.AccAddress, disbursements []Disbursement, references []ReferenceAmountInfo) GenesisState
NewGenesisState creates a new GenesisState object
type MsgAddOperator ¶
type MsgAddOperator struct { Sender sdk.AccAddress `json:"sender" yaml:"sender"` Operator sdk.AccAddress `json:"operator" yaml:"operator"` }
MsgAddOperator
func NewMsgAddOperator ¶
func NewMsgAddOperator(sender sdk.AccAddress, operator sdk.AccAddress) MsgAddOperator
func (MsgAddOperator) GetSignBytes ¶
func (msg MsgAddOperator) GetSignBytes() []byte
func (MsgAddOperator) GetSigners ¶
func (msg MsgAddOperator) GetSigners() []sdk.AccAddress
func (MsgAddOperator) Route ¶
func (msg MsgAddOperator) Route() string
func (MsgAddOperator) Type ¶
func (msg MsgAddOperator) Type() string
func (MsgAddOperator) ValidateBasic ¶
func (msg MsgAddOperator) ValidateBasic() error
type MsgCancelDisbursement ¶
type MsgCancelDisbursement struct { Manager sdk.AccAddress `json:"manager" yaml:"manager"` Recipient sdk.AccAddress `json:"recipient" yaml:"recipient"` ScheduledFor string `json:"scheduled_for" yaml:"scheduled_for"` // has to be string and parsed on server because of broken amino decoding }
MsgCancelDisbursement
func NewMsgCancelDisbursement ¶
func NewMsgCancelDisbursement(manager sdk.AccAddress, recipient sdk.AccAddress, scheduledFor string) MsgCancelDisbursement
func (MsgCancelDisbursement) GetSignBytes ¶
func (msg MsgCancelDisbursement) GetSignBytes() []byte
func (MsgCancelDisbursement) GetSigners ¶
func (msg MsgCancelDisbursement) GetSigners() []sdk.AccAddress
func (MsgCancelDisbursement) Route ¶
func (msg MsgCancelDisbursement) Route() string
func (MsgCancelDisbursement) Type ¶
func (msg MsgCancelDisbursement) Type() string
func (MsgCancelDisbursement) ValidateBasic ¶
func (msg MsgCancelDisbursement) ValidateBasic() error
type MsgCreateBuyOrder ¶
type MsgCreateBuyOrder struct { Buyer sdk.AccAddress `json:"buyer" yaml:"buyer"` Amount sdk.Coins `json:"amount" yaml:"amount"` }
MsgCreateBuyOrder
func NewMsgCreateBuyOrder ¶
func NewMsgCreateBuyOrder(buyer sdk.AccAddress, amount sdk.Coins) MsgCreateBuyOrder
func (MsgCreateBuyOrder) GetSignBytes ¶
func (msg MsgCreateBuyOrder) GetSignBytes() []byte
func (MsgCreateBuyOrder) GetSigners ¶
func (msg MsgCreateBuyOrder) GetSigners() []sdk.AccAddress
func (MsgCreateBuyOrder) Route ¶
func (msg MsgCreateBuyOrder) Route() string
func (MsgCreateBuyOrder) Type ¶
func (msg MsgCreateBuyOrder) Type() string
func (MsgCreateBuyOrder) ValidateBasic ¶
func (msg MsgCreateBuyOrder) ValidateBasic() error
type MsgCreateSellOrder ¶
type MsgCreateSellOrder struct { Seller sdk.AccAddress `json:"seller" yaml:"seller"` Amount sdk.Coins `json:"amount" yaml:"amount"` }
MsgCreateSellOrder
func NewMsgCreateSellOrder ¶
func NewMsgCreateSellOrder(seller sdk.AccAddress, amount sdk.Coins) MsgCreateSellOrder
func (MsgCreateSellOrder) GetSignBytes ¶
func (msg MsgCreateSellOrder) GetSignBytes() []byte
func (MsgCreateSellOrder) GetSigners ¶
func (msg MsgCreateSellOrder) GetSigners() []sdk.AccAddress
func (MsgCreateSellOrder) Route ¶
func (msg MsgCreateSellOrder) Route() string
func (MsgCreateSellOrder) Type ¶
func (msg MsgCreateSellOrder) Type() string
func (MsgCreateSellOrder) ValidateBasic ¶
func (msg MsgCreateSellOrder) ValidateBasic() error
type MsgDisburse ¶
type MsgDisburse struct { Operator sdk.AccAddress `json:"operator" yaml:"operator"` Recipient sdk.AccAddress `json:"recipient" yaml:"recipient"` Amount sdk.Coins `json:"amount" yaml:"amount"` Reference string `json:"reference" yaml:"reference"` }
MsgDisburse
func NewMsgDisburse ¶
func NewMsgDisburse(sender sdk.AccAddress, recipient sdk.AccAddress, amount sdk.Coins, reference string) MsgDisburse
func (MsgDisburse) GetSignBytes ¶
func (msg MsgDisburse) GetSignBytes() []byte
func (MsgDisburse) GetSigners ¶
func (msg MsgDisburse) GetSigners() []sdk.AccAddress
func (MsgDisburse) Route ¶
func (msg MsgDisburse) Route() string
func (MsgDisburse) Type ¶
func (msg MsgDisburse) Type() string
func (MsgDisburse) ValidateBasic ¶
func (msg MsgDisburse) ValidateBasic() error
type MsgDisburseFromEscrow ¶
type MsgDisburseFromEscrow struct { Operator sdk.AccAddress `json:"operator" yaml:"operator"` Reference string `json:"reference" yaml:"reference"` Recipient sdk.AccAddress `json:"recipient" yaml:"recipient"` }
MsgDisburseFromEscrow
func NewMsgDisburseFromEscrow ¶
func NewMsgDisburseFromEscrow(sender sdk.AccAddress, reference string, recipient sdk.AccAddress) MsgDisburseFromEscrow
func (MsgDisburseFromEscrow) GetSignBytes ¶
func (msg MsgDisburseFromEscrow) GetSignBytes() []byte
func (MsgDisburseFromEscrow) GetSigners ¶
func (msg MsgDisburseFromEscrow) GetSigners() []sdk.AccAddress
func (MsgDisburseFromEscrow) Route ¶
func (msg MsgDisburseFromEscrow) Route() string
func (MsgDisburseFromEscrow) Type ¶
func (msg MsgDisburseFromEscrow) Type() string
func (MsgDisburseFromEscrow) ValidateBasic ¶
func (msg MsgDisburseFromEscrow) ValidateBasic() error
type MsgDisburseToEscrow ¶
type MsgDisburseToEscrow struct { Operator sdk.AccAddress `json:"operator" yaml:"operator"` Amount sdk.Coins `json:"amount" yaml:"amount"` Reference string `json:"reference" yaml:"reference"` }
MsgDisburseToEscrow
func NewMsgDisburseToEscrow ¶
func NewMsgDisburseToEscrow(sender sdk.AccAddress, amount sdk.Coins, reference string) MsgDisburseToEscrow
func (MsgDisburseToEscrow) GetSignBytes ¶
func (msg MsgDisburseToEscrow) GetSignBytes() []byte
func (MsgDisburseToEscrow) GetSigners ¶
func (msg MsgDisburseToEscrow) GetSigners() []sdk.AccAddress
func (MsgDisburseToEscrow) Route ¶
func (msg MsgDisburseToEscrow) Route() string
func (MsgDisburseToEscrow) Type ¶
func (msg MsgDisburseToEscrow) Type() string
func (MsgDisburseToEscrow) ValidateBasic ¶
func (msg MsgDisburseToEscrow) ValidateBasic() error
type MsgRemoveOperator ¶
type MsgRemoveOperator struct { Sender sdk.AccAddress `json:"sender" yaml:"sender"` Operator sdk.AccAddress `json:"operator" yaml:"operator"` }
MsgRemoveOperator
func NewMsgRemoveOperator ¶
func NewMsgRemoveOperator(sender sdk.AccAddress, operator sdk.AccAddress) MsgRemoveOperator
func (MsgRemoveOperator) GetSignBytes ¶
func (msg MsgRemoveOperator) GetSignBytes() []byte
func (MsgRemoveOperator) GetSigners ¶
func (msg MsgRemoveOperator) GetSigners() []sdk.AccAddress
func (MsgRemoveOperator) Route ¶
func (msg MsgRemoveOperator) Route() string
func (MsgRemoveOperator) Type ¶
func (msg MsgRemoveOperator) Type() string
func (MsgRemoveOperator) ValidateBasic ¶
func (msg MsgRemoveOperator) ValidateBasic() error
type MsgRevertFromEscrow ¶
type MsgRevertFromEscrow struct { Operator sdk.AccAddress `json:"operator" yaml:"operator"` Amount sdk.Coins `json:"amount" yaml:"amount"` Reference string `json:"reference" yaml:"reference"` }
MsgRevertFromEscrow
func NewMsgRevertFromEscrow ¶
func NewMsgRevertFromEscrow(sender sdk.AccAddress, amount sdk.Coins, reference string) MsgRevertFromEscrow
func (MsgRevertFromEscrow) GetSignBytes ¶
func (msg MsgRevertFromEscrow) GetSignBytes() []byte
func (MsgRevertFromEscrow) GetSigners ¶
func (msg MsgRevertFromEscrow) GetSigners() []sdk.AccAddress
func (MsgRevertFromEscrow) Route ¶
func (msg MsgRevertFromEscrow) Route() string
func (MsgRevertFromEscrow) Type ¶
func (msg MsgRevertFromEscrow) Type() string
func (MsgRevertFromEscrow) ValidateBasic ¶
func (msg MsgRevertFromEscrow) ValidateBasic() error
type MsgSwap ¶ added in v0.2.0
type MsgSwap struct { Operator sdk.AccAddress `json:"operator" yaml:"operator"` Recipient sdk.AccAddress `json:"recipient" yaml:"recipient"` Amount sdk.Coins `json:"amount" yaml:"amount"` Reference string `json:"reference" yaml:"reference"` }
MsgSwap
func NewMsgSwap ¶ added in v0.2.0
func NewMsgSwap(sender sdk.AccAddress, recipient sdk.AccAddress, amount sdk.Coins, reference string) MsgSwap
func (MsgSwap) GetSignBytes ¶ added in v0.2.0
func (MsgSwap) GetSigners ¶ added in v0.2.0
func (msg MsgSwap) GetSigners() []sdk.AccAddress
func (MsgSwap) ValidateBasic ¶ added in v0.2.0
type Params ¶
type Params struct { Managers []sdk.AccAddress `json:"managers" yaml:"managers"` RiskAssessmentAmount sdk.Coins `json:"risk_assesment_amount" yaml:"risk_assesment_amount"` RiskAssessmentDuration time.Duration `json:"risk_assesment_duration" yaml:"risk_assesment_duration"` BuyBackPercentage sdk.Dec `json:"buyback_percentage" yaml:"buyback_percentage"` }
func DefaultParams ¶
func DefaultParams() Params
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() params.ParamSetPairs
type QueryResDisbursements ¶
type QueryResDisbursements []Disbursement
func (QueryResDisbursements) String ¶
func (n QueryResDisbursements) String() string
type QueryResOperators ¶
type QueryResOperators []sdk.AccAddress
func (QueryResOperators) String ¶
func (n QueryResOperators) String() string
type QueryResPrice ¶
func (QueryResPrice) String ¶
func (n QueryResPrice) String() string
type ReferenceAmountInfo ¶
type ReferenceAmountInfo struct { Reference string `json:"reference" yaml:"reference"` Amount sdk.Int `json:"amount" yaml:"amount"` }
func NewReferenceAmountInfo ¶
func NewReferenceAmountInfo(reference string, amount sdk.Int) ReferenceAmountInfo
func (ReferenceAmountInfo) String ¶
func (a ReferenceAmountInfo) String() string
type RemoveBuyBackLiquidityProposal ¶
type RemoveBuyBackLiquidityProposal struct { Title string `json:"title" yaml:"title"` Description string `json:"description" yaml:"description"` Amount sdk.Coins `json:"amount" yaml:"amount"` }
func (RemoveBuyBackLiquidityProposal) GetDescription ¶
func (p RemoveBuyBackLiquidityProposal) GetDescription() string
func (RemoveBuyBackLiquidityProposal) GetTitle ¶
func (p RemoveBuyBackLiquidityProposal) GetTitle() string
func (RemoveBuyBackLiquidityProposal) ProposalRoute ¶
func (p RemoveBuyBackLiquidityProposal) ProposalRoute() string
func (RemoveBuyBackLiquidityProposal) ProposalType ¶
func (p RemoveBuyBackLiquidityProposal) ProposalType() string
func (RemoveBuyBackLiquidityProposal) String ¶
func (p RemoveBuyBackLiquidityProposal) String() string
func (RemoveBuyBackLiquidityProposal) ValidateBasic ¶
func (p RemoveBuyBackLiquidityProposal) ValidateBasic() error
type TransferFromDistributionProfitsToBuyBackLiquidityProposal ¶
type TransferFromDistributionProfitsToBuyBackLiquidityProposal struct { Title string `json:"title" yaml:"title"` Description string `json:"description" yaml:"description"` Amount sdk.Coins `json:"amount" yaml:"amount"` }
func (TransferFromDistributionProfitsToBuyBackLiquidityProposal) GetDescription ¶
func (p TransferFromDistributionProfitsToBuyBackLiquidityProposal) GetDescription() string
func (TransferFromDistributionProfitsToBuyBackLiquidityProposal) GetTitle ¶
func (p TransferFromDistributionProfitsToBuyBackLiquidityProposal) GetTitle() string
func (TransferFromDistributionProfitsToBuyBackLiquidityProposal) ProposalRoute ¶
func (p TransferFromDistributionProfitsToBuyBackLiquidityProposal) ProposalRoute() string
func (TransferFromDistributionProfitsToBuyBackLiquidityProposal) ProposalType ¶
func (p TransferFromDistributionProfitsToBuyBackLiquidityProposal) ProposalType() string
func (TransferFromDistributionProfitsToBuyBackLiquidityProposal) String ¶
func (p TransferFromDistributionProfitsToBuyBackLiquidityProposal) String() string
func (TransferFromDistributionProfitsToBuyBackLiquidityProposal) ValidateBasic ¶
func (p TransferFromDistributionProfitsToBuyBackLiquidityProposal) ValidateBasic() error
type TransferFromSwapEscrowToBuyBackProposal ¶ added in v0.2.0
type TransferFromSwapEscrowToBuyBackProposal struct { Title string `json:"title" yaml:"title"` Description string `json:"description" yaml:"description"` Amount sdk.Coins `json:"amount" yaml:"amount"` }
func (TransferFromSwapEscrowToBuyBackProposal) GetDescription ¶ added in v0.2.0
func (p TransferFromSwapEscrowToBuyBackProposal) GetDescription() string
func (TransferFromSwapEscrowToBuyBackProposal) GetTitle ¶ added in v0.2.0
func (p TransferFromSwapEscrowToBuyBackProposal) GetTitle() string
func (TransferFromSwapEscrowToBuyBackProposal) ProposalRoute ¶ added in v0.2.0
func (p TransferFromSwapEscrowToBuyBackProposal) ProposalRoute() string
func (TransferFromSwapEscrowToBuyBackProposal) ProposalType ¶ added in v0.2.0
func (p TransferFromSwapEscrowToBuyBackProposal) ProposalType() string
func (TransferFromSwapEscrowToBuyBackProposal) String ¶ added in v0.2.0
func (p TransferFromSwapEscrowToBuyBackProposal) String() string
func (TransferFromSwapEscrowToBuyBackProposal) ValidateBasic ¶ added in v0.2.0
func (p TransferFromSwapEscrowToBuyBackProposal) ValidateBasic() error
type TransferFromTreasuryToSwapEscrowProposal ¶ added in v0.2.0
type TransferFromTreasuryToSwapEscrowProposal struct { Title string `json:"title" yaml:"title"` Description string `json:"description" yaml:"description"` Amount sdk.Coins `json:"amount" yaml:"amount"` }
func (TransferFromTreasuryToSwapEscrowProposal) GetDescription ¶ added in v0.2.0
func (p TransferFromTreasuryToSwapEscrowProposal) GetDescription() string
func (TransferFromTreasuryToSwapEscrowProposal) GetTitle ¶ added in v0.2.0
func (p TransferFromTreasuryToSwapEscrowProposal) GetTitle() string
func (TransferFromTreasuryToSwapEscrowProposal) ProposalRoute ¶ added in v0.2.0
func (p TransferFromTreasuryToSwapEscrowProposal) ProposalRoute() string
func (TransferFromTreasuryToSwapEscrowProposal) ProposalType ¶ added in v0.2.0
func (p TransferFromTreasuryToSwapEscrowProposal) ProposalType() string
func (TransferFromTreasuryToSwapEscrowProposal) String ¶ added in v0.2.0
func (p TransferFromTreasuryToSwapEscrowProposal) String() string
func (TransferFromTreasuryToSwapEscrowProposal) ValidateBasic ¶ added in v0.2.0
func (p TransferFromTreasuryToSwapEscrowProposal) ValidateBasic() error
type Treasury ¶
type Treasury struct { MintGenesisSupply bool `json:"mint_genesis_supply" yaml:"mint_genesis_supply"` TargetSupply sdk.Coins `json:"target_supply" yaml:"target_supply"` Distributed sdk.Coins `json:"distributed" yaml:"distributed"` CoinsPerStage sdk.Coins `json:"coins_per_stage" yaml:"coins_per_stage"` InboundDin sdk.Coins `json:"inbound_din" yaml:"inbound_din"` }
func DefaultInitialTreasury ¶
func DefaultInitialTreasury() Treasury
func InitialTreasury ¶
Click to show internal directories.
Click to hide internal directories.