v2

package
v1.3.1-rc2 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NoMintingType              string = "NO_MINTING"
	LinearMintingType          string = "LINEAR_MINTING"
	ExponentialStepMintingType string = "EXPONENTIAL_STEP_MINTING"
)

Variables

View Source
var (
	KeyMintDenom    = []byte("MintDenom")
	KeyMinterConfig = []byte("MinterConfig")
)
View Source
var (
	ErrInvalidLengthMinter        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMinter          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMinter = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group")
)
View Source
var MinterStateHistoryKeyPrefix = []byte{0x03}

Functions

func MigrateParams

func MigrateParams(ctx sdk.Context, paramStore subspace.Subspace) error

MigrateParams performs in-place store migrations from v1.0.1 to v1.1.0 The migration includes: - Cfeminter params structure changed - Remove ReductionPeriodLength from PeriodicReducstionMinter

func MigrateStore

func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec) error

MigrateStore performs in-place store migrations from v1.0.1 to v1.1.0 The migration includes: - MinterState change type of Position from int32 to uint32. - MinterState rename Position to SequenceId. - History of minter states in KvStore is now identified by SequenceId and its key is set in different way

func ParamKeyTable added in v1.3.0

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable the param key table for launch module

Types

type ExponentialStepMinting added in v1.3.0

type ExponentialStepMinting struct {
	Amount           github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"`
	StepDuration     time.Duration                          `protobuf:"bytes,1,opt,name=step_duration,json=stepDuration,proto3,stdduration" json:"step_duration"`
	AmountMultiplier github_com_cosmos_cosmos_sdk_types.Dec `` /* 149-byte string literal not displayed */
}

func (*ExponentialStepMinting) Descriptor added in v1.3.0

func (*ExponentialStepMinting) Descriptor() ([]byte, []int)

func (*ExponentialStepMinting) GetStepDuration added in v1.3.0

func (m *ExponentialStepMinting) GetStepDuration() time.Duration

func (*ExponentialStepMinting) Marshal added in v1.3.0

func (m *ExponentialStepMinting) Marshal() (dAtA []byte, err error)

func (*ExponentialStepMinting) MarshalTo added in v1.3.0

func (m *ExponentialStepMinting) MarshalTo(dAtA []byte) (int, error)

func (*ExponentialStepMinting) MarshalToSizedBuffer added in v1.3.0

func (m *ExponentialStepMinting) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ExponentialStepMinting) ProtoMessage added in v1.3.0

func (*ExponentialStepMinting) ProtoMessage()

func (*ExponentialStepMinting) Reset added in v1.3.0

func (m *ExponentialStepMinting) Reset()

func (*ExponentialStepMinting) Size added in v1.3.0

func (m *ExponentialStepMinting) Size() (n int)

func (*ExponentialStepMinting) String added in v1.3.0

func (m *ExponentialStepMinting) String() string

func (*ExponentialStepMinting) Unmarshal added in v1.3.0

func (m *ExponentialStepMinting) Unmarshal(dAtA []byte) error

func (*ExponentialStepMinting) XXX_DiscardUnknown added in v1.3.0

func (m *ExponentialStepMinting) XXX_DiscardUnknown()

func (*ExponentialStepMinting) XXX_Marshal added in v1.3.0

func (m *ExponentialStepMinting) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ExponentialStepMinting) XXX_Merge added in v1.3.0

func (m *ExponentialStepMinting) XXX_Merge(src proto.Message)

func (*ExponentialStepMinting) XXX_Size added in v1.3.0

func (m *ExponentialStepMinting) XXX_Size() int

func (*ExponentialStepMinting) XXX_Unmarshal added in v1.3.0

func (m *ExponentialStepMinting) XXX_Unmarshal(b []byte) error

type LinearMinting added in v1.3.0

type LinearMinting struct {
	Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"`
}

func (*LinearMinting) Descriptor added in v1.3.0

func (*LinearMinting) Descriptor() ([]byte, []int)

func (*LinearMinting) Marshal added in v1.3.0

func (m *LinearMinting) Marshal() (dAtA []byte, err error)

func (*LinearMinting) MarshalTo added in v1.3.0

func (m *LinearMinting) MarshalTo(dAtA []byte) (int, error)

func (*LinearMinting) MarshalToSizedBuffer added in v1.3.0

func (m *LinearMinting) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LinearMinting) ProtoMessage added in v1.3.0

func (*LinearMinting) ProtoMessage()

func (*LinearMinting) Reset added in v1.3.0

func (m *LinearMinting) Reset()

func (*LinearMinting) Size added in v1.3.0

func (m *LinearMinting) Size() (n int)

func (*LinearMinting) String added in v1.3.0

func (m *LinearMinting) String() string

func (*LinearMinting) Unmarshal added in v1.3.0

func (m *LinearMinting) Unmarshal(dAtA []byte) error

func (*LinearMinting) XXX_DiscardUnknown added in v1.3.0

func (m *LinearMinting) XXX_DiscardUnknown()

func (*LinearMinting) XXX_Marshal added in v1.3.0

func (m *LinearMinting) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LinearMinting) XXX_Merge added in v1.3.0

func (m *LinearMinting) XXX_Merge(src proto.Message)

func (*LinearMinting) XXX_Size added in v1.3.0

func (m *LinearMinting) XXX_Size() int

func (*LinearMinting) XXX_Unmarshal added in v1.3.0

func (m *LinearMinting) XXX_Unmarshal(b []byte) error

type Minter added in v1.3.0

type Minter struct {
	SequenceId uint32     `protobuf:"varint,1,opt,name=sequence_id,json=sequenceId,proto3" json:"sequence_id,omitempty"`
	EndTime    *time.Time `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3,stdtime" json:"end_time,omitempty"`
	// types:
	//
	//	NO_MINTING;
	//	LINEAR_MINTING;
	//	EXPONENTIAL_STEP_MINTING;
	Type                   string                  `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
	LinearMinting          *LinearMinting          `protobuf:"bytes,4,opt,name=linear_minting,json=linearMinting,proto3" json:"linear_minting,omitempty"`
	ExponentialStepMinting *ExponentialStepMinting `` /* 129-byte string literal not displayed */
}

func (*Minter) Descriptor added in v1.3.0

func (*Minter) Descriptor() ([]byte, []int)

func (*Minter) GetEndTime added in v1.3.0

func (m *Minter) GetEndTime() *time.Time

func (*Minter) GetExponentialStepMinting added in v1.3.0

func (m *Minter) GetExponentialStepMinting() *ExponentialStepMinting

func (*Minter) GetLinearMinting added in v1.3.0

func (m *Minter) GetLinearMinting() *LinearMinting

func (*Minter) GetSequenceId added in v1.3.0

func (m *Minter) GetSequenceId() uint32

func (*Minter) GetType added in v1.3.0

func (m *Minter) GetType() string

func (*Minter) Marshal added in v1.3.0

func (m *Minter) Marshal() (dAtA []byte, err error)

func (*Minter) MarshalTo added in v1.3.0

func (m *Minter) MarshalTo(dAtA []byte) (int, error)

func (*Minter) MarshalToSizedBuffer added in v1.3.0

func (m *Minter) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Minter) ProtoMessage added in v1.3.0

func (*Minter) ProtoMessage()

func (*Minter) Reset added in v1.3.0

func (m *Minter) Reset()

func (*Minter) Size added in v1.3.0

func (m *Minter) Size() (n int)

func (*Minter) String added in v1.3.0

func (m *Minter) String() string

func (*Minter) Unmarshal added in v1.3.0

func (m *Minter) Unmarshal(dAtA []byte) error

func (*Minter) XXX_DiscardUnknown added in v1.3.0

func (m *Minter) XXX_DiscardUnknown()

func (*Minter) XXX_Marshal added in v1.3.0

func (m *Minter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Minter) XXX_Merge added in v1.3.0

func (m *Minter) XXX_Merge(src proto.Message)

func (*Minter) XXX_Size added in v1.3.0

func (m *Minter) XXX_Size() int

func (*Minter) XXX_Unmarshal added in v1.3.0

func (m *Minter) XXX_Unmarshal(b []byte) error

type MinterConfig added in v1.3.0

type MinterConfig struct {
	StartTime time.Time `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time"`
	Minters   []*Minter `protobuf:"bytes,3,rep,name=minters,proto3" json:"minters,omitempty"`
}

func (*MinterConfig) Descriptor added in v1.3.0

func (*MinterConfig) Descriptor() ([]byte, []int)

func (*MinterConfig) GetMinters added in v1.3.0

func (m *MinterConfig) GetMinters() []*Minter

func (*MinterConfig) GetStartTime added in v1.3.0

func (m *MinterConfig) GetStartTime() time.Time

func (*MinterConfig) Marshal added in v1.3.0

func (m *MinterConfig) Marshal() (dAtA []byte, err error)

func (*MinterConfig) MarshalTo added in v1.3.0

func (m *MinterConfig) MarshalTo(dAtA []byte) (int, error)

func (*MinterConfig) MarshalToSizedBuffer added in v1.3.0

func (m *MinterConfig) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MinterConfig) ProtoMessage added in v1.3.0

func (*MinterConfig) ProtoMessage()

func (*MinterConfig) Reset added in v1.3.0

func (m *MinterConfig) Reset()

func (*MinterConfig) Size added in v1.3.0

func (m *MinterConfig) Size() (n int)

func (*MinterConfig) String added in v1.3.0

func (m *MinterConfig) String() string

func (*MinterConfig) Unmarshal added in v1.3.0

func (m *MinterConfig) Unmarshal(dAtA []byte) error

func (*MinterConfig) XXX_DiscardUnknown added in v1.3.0

func (m *MinterConfig) XXX_DiscardUnknown()

func (*MinterConfig) XXX_Marshal added in v1.3.0

func (m *MinterConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MinterConfig) XXX_Merge added in v1.3.0

func (m *MinterConfig) XXX_Merge(src proto.Message)

func (*MinterConfig) XXX_Size added in v1.3.0

func (m *MinterConfig) XXX_Size() int

func (*MinterConfig) XXX_Unmarshal added in v1.3.0

func (m *MinterConfig) XXX_Unmarshal(b []byte) error

type MinterState added in v1.3.0

type MinterState struct {
	SequenceId                  uint32                                 `protobuf:"varint,1,opt,name=sequence_id,json=sequenceId,proto3" json:"sequence_id,omitempty"`
	AmountMinted                github_com_cosmos_cosmos_sdk_types.Int `` /* 137-byte string literal not displayed */
	RemainderToMint             github_com_cosmos_cosmos_sdk_types.Dec `` /* 148-byte string literal not displayed */
	LastMintBlockTime           time.Time                              `protobuf:"bytes,4,opt,name=last_mint_block_time,json=lastMintBlockTime,proto3,stdtime" json:"last_mint_block_time"`
	RemainderFromPreviousPeriod github_com_cosmos_cosmos_sdk_types.Dec `` /* 186-byte string literal not displayed */
}

func (*MinterState) Descriptor added in v1.3.0

func (*MinterState) Descriptor() ([]byte, []int)

func (*MinterState) GetLastMintBlockTime added in v1.3.0

func (m *MinterState) GetLastMintBlockTime() time.Time

func (*MinterState) GetSequenceId added in v1.3.0

func (m *MinterState) GetSequenceId() uint32

func (*MinterState) Marshal added in v1.3.0

func (m *MinterState) Marshal() (dAtA []byte, err error)

func (*MinterState) MarshalTo added in v1.3.0

func (m *MinterState) MarshalTo(dAtA []byte) (int, error)

func (*MinterState) MarshalToSizedBuffer added in v1.3.0

func (m *MinterState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MinterState) ProtoMessage added in v1.3.0

func (*MinterState) ProtoMessage()

func (*MinterState) Reset added in v1.3.0

func (m *MinterState) Reset()

func (*MinterState) Size added in v1.3.0

func (m *MinterState) Size() (n int)

func (*MinterState) String added in v1.3.0

func (m *MinterState) String() string

func (*MinterState) Unmarshal added in v1.3.0

func (m *MinterState) Unmarshal(dAtA []byte) error

func (*MinterState) XXX_DiscardUnknown added in v1.3.0

func (m *MinterState) XXX_DiscardUnknown()

func (*MinterState) XXX_Marshal added in v1.3.0

func (m *MinterState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MinterState) XXX_Merge added in v1.3.0

func (m *MinterState) XXX_Merge(src proto.Message)

func (*MinterState) XXX_Size added in v1.3.0

func (m *MinterState) XXX_Size() int

func (*MinterState) XXX_Unmarshal added in v1.3.0

func (m *MinterState) XXX_Unmarshal(b []byte) error

type Params added in v1.3.0

type Params struct {
	MintDenom    string       `protobuf:"bytes,1,opt,name=mint_denom,json=mintDenom,proto3" json:"mint_denom,omitempty"`
	MinterConfig MinterConfig `protobuf:"bytes,2,opt,name=minter_config,json=minterConfig,proto3" json:"minter_config"`
}

Params defines the parameters for the module.

func (*Params) Descriptor added in v1.3.0

func (*Params) Descriptor() ([]byte, []int)

func (*Params) GetMintDenom added in v1.3.0

func (m *Params) GetMintDenom() string

func (*Params) GetMinterConfig added in v1.3.0

func (m *Params) GetMinterConfig() MinterConfig

func (*Params) Marshal added in v1.3.0

func (m *Params) Marshal() (dAtA []byte, err error)

func (*Params) MarshalTo added in v1.3.0

func (m *Params) MarshalTo(dAtA []byte) (int, error)

func (*Params) MarshalToSizedBuffer added in v1.3.0

func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Params) ParamSetPairs added in v1.3.0

func (params *Params) ParamSetPairs() paramtypes.ParamSetPairs

ParamSetPairs get the params.ParamSet

func (*Params) ProtoMessage added in v1.3.0

func (*Params) ProtoMessage()

func (*Params) Reset added in v1.3.0

func (m *Params) Reset()

func (*Params) Size added in v1.3.0

func (m *Params) Size() (n int)

func (Params) String added in v1.3.0

func (params Params) String() string

String implements the Stringer interface.

func (*Params) Unmarshal added in v1.3.0

func (m *Params) Unmarshal(dAtA []byte) error

func (*Params) XXX_DiscardUnknown added in v1.3.0

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal added in v1.3.0

func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Params) XXX_Merge added in v1.3.0

func (m *Params) XXX_Merge(src proto.Message)

func (*Params) XXX_Size added in v1.3.0

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal added in v1.3.0

func (m *Params) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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