govparams

package
v0.7.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const LOWER_BOUND_AMOUNT = 10
View Source
const THREE_DAYS = 3 * 3600 * 24
View Source
const UPPER_BOUND_AMOUNT = 10000

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 time.Duration `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() []byte

func (*DepositProcedureParam) GetValueFromRawData

func (param *DepositProcedureParam) GetValueFromRawData(cdc *codec.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(paramSpace params.Subspace)

func (*DepositProcedureParam) ToJson

func (param *DepositProcedureParam) ToJson(jsonStr string) string

func (*DepositProcedureParam) Update

func (param *DepositProcedureParam) Update(ctx sdk.Context, jsonStr string)

func (*DepositProcedureParam) Valid

func (param *DepositProcedureParam) Valid(jsonStr string) sdk.Error

type ParamSet

type ParamSet struct {
	DepositProcedure  DepositProcedure  `json:"Gov/govDepositProcedure"`
	VotingProcedure   VotingProcedure   `json:"Gov/govVotingProcedure"`
	TallyingProcedure TallyingProcedure `json:"Gov/govTallyingProcedure"`
}

type TallyingProcedure

type TallyingProcedure struct {
	Threshold     sdk.Dec `json:"threshold"`     //  Minimum propotion of Yes votes for proposal to pass. Initial value: 0.5
	Veto          sdk.Dec `json:"veto"`          //  Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Initial value: 1/3
	Participation sdk.Dec `json:"participation"` //
}

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() []byte

func (*TallyingProcedureParam) GetValueFromRawData

func (param *TallyingProcedureParam) GetValueFromRawData(cdc *codec.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(paramSpace params.Subspace)

func (*TallyingProcedureParam) ToJson

func (param *TallyingProcedureParam) ToJson(jsonStr string) string

func (*TallyingProcedureParam) Update

func (param *TallyingProcedureParam) Update(ctx sdk.Context, jsonStr string)

func (*TallyingProcedureParam) Valid

func (param *TallyingProcedureParam) Valid(jsonStr string) sdk.Error

type VotingProcedure

type VotingProcedure struct {
	VotingPeriod time.Duration `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() []byte

func (*VotingProcedureParam) GetValueFromRawData

func (param *VotingProcedureParam) GetValueFromRawData(cdc *codec.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(paramSpace params.Subspace)

func (*VotingProcedureParam) ToJson

func (param *VotingProcedureParam) ToJson(jsonStr string) string

func (*VotingProcedureParam) Update

func (param *VotingProcedureParam) Update(ctx sdk.Context, jsonStr string)

func (*VotingProcedureParam) Valid

func (param *VotingProcedureParam) Valid(jsonStr string) sdk.Error

Jump to

Keyboard shortcuts

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