Documentation ¶
Index ¶
- Constants
- Variables
- func AddProposerAddressToProposal(ctx sdk.Context, storeService corestoretypes.KVStoreService, ...) error
- func GetProposalIDBytes(proposalID uint64) (proposalIDBz []byte)
- func MigrateJSON(oldState *v1.GenesisState) (*v1.GenesisState, error)
- func MigrateStore(ctx sdk.Context, storeService corestoretypes.KVStoreService, ...) error
- func VotingPeriodProposalKey(proposalID uint64) []byte
Constants ¶
const (
// ModuleName is the name of the module
ModuleName = "gov"
)
Variables ¶
var ( // ParamsKey is the key of x/gov params ParamsKey = []byte{0x30} // - 0x04<proposalID_Bytes>: ProposalContents VotingPeriodProposalKeyPrefix = []byte{0x04} )
Functions ¶
func AddProposerAddressToProposal ¶
func AddProposerAddressToProposal(ctx sdk.Context, storeService corestoretypes.KVStoreService, cdc codec.BinaryCodec, proposals map[uint64]string) error
AddProposerAddressToProposal will add proposer to proposal and set to the store. This function is optional.
func GetProposalIDBytes ¶
GetProposalIDBytes returns the byte representation of the proposalID
func MigrateJSON ¶
func MigrateJSON(oldState *v1.GenesisState) (*v1.GenesisState, error)
MigrateJSON accepts exported v3 (v0.46) x/gov genesis state and migrates it to v4 (v0.47) x/gov genesis state. The migration includes:
Params migrations from x/params to gov Addition of the new min initial deposit ratio parameter that is set to 0 by default. Proposals in voting period are tracked in a separate index.
func MigrateStore ¶
func MigrateStore(ctx sdk.Context, storeService corestoretypes.KVStoreService, legacySubspace exported.ParamSubspace, cdc codec.BinaryCodec) error
MigrateStore performs in-place store migrations from v3 (v0.46) to v4 (v0.47). The migration includes:
Params migrations from x/params to gov Addition of the new min initial deposit ratio parameter that is set to 0 by default. Proposals in voting period are tracked in a separate index.
func VotingPeriodProposalKey ¶
VotingPeriodProposalKey gets if a proposal is in voting period.
Types ¶
This section is empty.