Documentation
¶
Index ¶
- Constants
- type DepositProcedure
- type DepositProcedureParam
- func (param *DepositProcedureParam) GetStoreKey() string
- func (param *DepositProcedureParam) GetValueFromRawData(cdc *wire.Codec, res []byte) interface{}
- func (param *DepositProcedureParam) InitGenesis(genesisState interface{})
- func (param *DepositProcedureParam) LoadValue(ctx sdk.Context) bool
- func (param *DepositProcedureParam) SaveValue(ctx sdk.Context)
- func (param *DepositProcedureParam) SetReadWriter(setter params.Setter)
- func (param *DepositProcedureParam) ToJson(jsonStr string) string
- func (param *DepositProcedureParam) Update(ctx sdk.Context, jsonStr string)
- func (param *DepositProcedureParam) Valid(jsonStr string) sdk.Error
- type ParamSet
- type TallyingProcedure
- type TallyingProcedureParam
- func (param *TallyingProcedureParam) GetStoreKey() string
- func (param *TallyingProcedureParam) GetValueFromRawData(cdc *wire.Codec, res []byte) interface{}
- func (param *TallyingProcedureParam) InitGenesis(genesisState interface{})
- func (param *TallyingProcedureParam) LoadValue(ctx sdk.Context) bool
- func (param *TallyingProcedureParam) SaveValue(ctx sdk.Context)
- func (param *TallyingProcedureParam) SetReadWriter(setter params.Setter)
- func (param *TallyingProcedureParam) ToJson(jsonStr string) string
- func (param *TallyingProcedureParam) Update(ctx sdk.Context, jsonStr string)
- func (param *TallyingProcedureParam) Valid(jsonStr string) sdk.Error
- type VotingProcedure
- type VotingProcedureParam
- func (param *VotingProcedureParam) GetStoreKey() string
- func (param *VotingProcedureParam) GetValueFromRawData(cdc *wire.Codec, res []byte) interface{}
- func (param *VotingProcedureParam) InitGenesis(genesisState interface{})
- func (param *VotingProcedureParam) LoadValue(ctx sdk.Context) bool
- func (param *VotingProcedureParam) SaveValue(ctx sdk.Context)
- func (param *VotingProcedureParam) SetReadWriter(setter params.Setter)
- func (param *VotingProcedureParam) ToJson(jsonStr string) string
- func (param *VotingProcedureParam) Update(ctx sdk.Context, jsonStr string)
- func (param *VotingProcedureParam) Valid(jsonStr string) sdk.Error
Constants ¶
View Source
const LOWER_BOUND_AMOUNT = 1
View Source
const UPPER_BOUND_AMOUNT = 200
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DepositProcedure ¶
type DepositProcedure struct {
MinDeposit sdk.Coins `json:"min_deposit"` // Minimum deposit for a proposal to enter voting period.
MaxDepositPeriod int64 `json:"max_deposit_period"` // Maximum period for Atom holders to deposit on a proposal. Initial value: 2 months
}
Procedure around Deposits for governance
func GetDepositProcedure ¶
func GetDepositProcedure(ctx sdk.Context) DepositProcedure
Returns the current Deposit Procedure from the global param store
type DepositProcedureParam ¶
type DepositProcedureParam struct {
Value DepositProcedure
// contains filtered or unexported fields
}
var DepositProcedureParameter DepositProcedureParam
func (*DepositProcedureParam) GetStoreKey ¶
func (param *DepositProcedureParam) GetStoreKey() string
func (*DepositProcedureParam) GetValueFromRawData ¶
func (param *DepositProcedureParam) GetValueFromRawData(cdc *wire.Codec, res []byte) interface{}
func (*DepositProcedureParam) InitGenesis ¶
func (param *DepositProcedureParam) InitGenesis(genesisState interface{})
func (*DepositProcedureParam) LoadValue ¶
func (param *DepositProcedureParam) LoadValue(ctx sdk.Context) bool
func (*DepositProcedureParam) SaveValue ¶
func (param *DepositProcedureParam) SaveValue(ctx sdk.Context)
func (*DepositProcedureParam) SetReadWriter ¶
func (param *DepositProcedureParam) SetReadWriter(setter params.Setter)
func (*DepositProcedureParam) ToJson ¶
func (param *DepositProcedureParam) ToJson(jsonStr string) string
type ParamSet ¶
type ParamSet struct {
DepositProcedure DepositProcedure `json:"Gov/gov/DepositProcedure"`
VotingProcedure VotingProcedure `json:"Gov/gov/VotingProcedure"`
TallyingProcedure TallyingProcedure `json:"Gov/gov/TallyingProcedure"`
}
type TallyingProcedure ¶
type TallyingProcedure struct {
Threshold sdk.Rat `json:"threshold"` // Minimum propotion of Yes votes for proposal to pass. Initial value: 0.5
Veto sdk.Rat `json:"veto"` // Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Initial value: 1/3
GovernancePenalty sdk.Rat `json:"governance_penalty"` // Penalty if validator does not vote
}
Procedure around Tallying votes in governance
func GetTallyingProcedure ¶
func GetTallyingProcedure(ctx sdk.Context) TallyingProcedure
Returns the current Tallying Procedure from the global param store
type TallyingProcedureParam ¶
type TallyingProcedureParam struct {
Value TallyingProcedure
// contains filtered or unexported fields
}
var TallyingProcedureParameter TallyingProcedureParam
func (*TallyingProcedureParam) GetStoreKey ¶
func (param *TallyingProcedureParam) GetStoreKey() string
func (*TallyingProcedureParam) GetValueFromRawData ¶
func (param *TallyingProcedureParam) GetValueFromRawData(cdc *wire.Codec, res []byte) interface{}
func (*TallyingProcedureParam) InitGenesis ¶
func (param *TallyingProcedureParam) InitGenesis(genesisState interface{})
func (*TallyingProcedureParam) LoadValue ¶
func (param *TallyingProcedureParam) LoadValue(ctx sdk.Context) bool
func (*TallyingProcedureParam) SaveValue ¶
func (param *TallyingProcedureParam) SaveValue(ctx sdk.Context)
func (*TallyingProcedureParam) SetReadWriter ¶
func (param *TallyingProcedureParam) SetReadWriter(setter params.Setter)
func (*TallyingProcedureParam) ToJson ¶
func (param *TallyingProcedureParam) ToJson(jsonStr string) string
type VotingProcedure ¶
type VotingProcedure struct {
VotingPeriod int64 `json:"voting_period"` // Length of the voting period.
}
Procedure around Voting in governance
func GetVotingProcedure ¶
func GetVotingProcedure(ctx sdk.Context) VotingProcedure
Returns the current Voting Procedure from the global param store
type VotingProcedureParam ¶
type VotingProcedureParam struct {
Value VotingProcedure
// contains filtered or unexported fields
}
var VotingProcedureParameter VotingProcedureParam
func (*VotingProcedureParam) GetStoreKey ¶
func (param *VotingProcedureParam) GetStoreKey() string
func (*VotingProcedureParam) GetValueFromRawData ¶
func (param *VotingProcedureParam) GetValueFromRawData(cdc *wire.Codec, res []byte) interface{}
func (*VotingProcedureParam) InitGenesis ¶
func (param *VotingProcedureParam) InitGenesis(genesisState interface{})
func (*VotingProcedureParam) LoadValue ¶
func (param *VotingProcedureParam) LoadValue(ctx sdk.Context) bool
func (*VotingProcedureParam) SaveValue ¶
func (param *VotingProcedureParam) SaveValue(ctx sdk.Context)
func (*VotingProcedureParam) SetReadWriter ¶
func (param *VotingProcedureParam) SetReadWriter(setter params.Setter)
func (*VotingProcedureParam) ToJson ¶
func (param *VotingProcedureParam) ToJson(jsonStr string) string
Click to show internal directories.
Click to hide internal directories.