govparams

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2018 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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

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/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

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 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

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