v2

package
v2.0.0-rc6 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 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

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable the param key table for launch module

Types

type ExponentialStepMinting

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

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

func (*ExponentialStepMinting) GetStepDuration

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

func (*ExponentialStepMinting) Marshal

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

func (*ExponentialStepMinting) MarshalTo

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

func (*ExponentialStepMinting) MarshalToSizedBuffer

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

func (*ExponentialStepMinting) ProtoMessage

func (*ExponentialStepMinting) ProtoMessage()

func (*ExponentialStepMinting) Reset

func (m *ExponentialStepMinting) Reset()

func (*ExponentialStepMinting) Size

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

func (*ExponentialStepMinting) String

func (m *ExponentialStepMinting) String() string

func (*ExponentialStepMinting) Unmarshal

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

func (*ExponentialStepMinting) XXX_DiscardUnknown

func (m *ExponentialStepMinting) XXX_DiscardUnknown()

func (*ExponentialStepMinting) XXX_Marshal

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

func (*ExponentialStepMinting) XXX_Merge

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

func (*ExponentialStepMinting) XXX_Size

func (m *ExponentialStepMinting) XXX_Size() int

func (*ExponentialStepMinting) XXX_Unmarshal

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

type LinearMinting

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

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

func (*LinearMinting) Marshal

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

func (*LinearMinting) MarshalTo

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

func (*LinearMinting) MarshalToSizedBuffer

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

func (*LinearMinting) ProtoMessage

func (*LinearMinting) ProtoMessage()

func (*LinearMinting) Reset

func (m *LinearMinting) Reset()

func (*LinearMinting) Size

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

func (*LinearMinting) String

func (m *LinearMinting) String() string

func (*LinearMinting) Unmarshal

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

func (*LinearMinting) XXX_DiscardUnknown

func (m *LinearMinting) XXX_DiscardUnknown()

func (*LinearMinting) XXX_Marshal

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

func (*LinearMinting) XXX_Merge

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

func (*LinearMinting) XXX_Size

func (m *LinearMinting) XXX_Size() int

func (*LinearMinting) XXX_Unmarshal

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

type Minter

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

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

func (*Minter) GetEndTime

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

func (*Minter) GetExponentialStepMinting

func (m *Minter) GetExponentialStepMinting() *ExponentialStepMinting

func (*Minter) GetLinearMinting

func (m *Minter) GetLinearMinting() *LinearMinting

func (*Minter) GetSequenceId

func (m *Minter) GetSequenceId() uint32

func (*Minter) GetType

func (m *Minter) GetType() string

func (*Minter) Marshal

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

func (*Minter) MarshalTo

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

func (*Minter) MarshalToSizedBuffer

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

func (*Minter) ProtoMessage

func (*Minter) ProtoMessage()

func (*Minter) Reset

func (m *Minter) Reset()

func (*Minter) Size

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

func (*Minter) String

func (m *Minter) String() string

func (*Minter) Unmarshal

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

func (*Minter) XXX_DiscardUnknown

func (m *Minter) XXX_DiscardUnknown()

func (*Minter) XXX_Marshal

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

func (*Minter) XXX_Merge

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

func (*Minter) XXX_Size

func (m *Minter) XXX_Size() int

func (*Minter) XXX_Unmarshal

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

type MinterConfig

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

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

func (*MinterConfig) GetMinters

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

func (*MinterConfig) GetStartTime

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

func (*MinterConfig) Marshal

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

func (*MinterConfig) MarshalTo

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

func (*MinterConfig) MarshalToSizedBuffer

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

func (*MinterConfig) ProtoMessage

func (*MinterConfig) ProtoMessage()

func (*MinterConfig) Reset

func (m *MinterConfig) Reset()

func (*MinterConfig) Size

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

func (*MinterConfig) String

func (m *MinterConfig) String() string

func (*MinterConfig) Unmarshal

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

func (*MinterConfig) XXX_DiscardUnknown

func (m *MinterConfig) XXX_DiscardUnknown()

func (*MinterConfig) XXX_Marshal

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

func (*MinterConfig) XXX_Merge

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

func (*MinterConfig) XXX_Size

func (m *MinterConfig) XXX_Size() int

func (*MinterConfig) XXX_Unmarshal

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

type MinterState

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

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

func (*MinterState) GetLastMintBlockTime

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

func (*MinterState) GetSequenceId

func (m *MinterState) GetSequenceId() uint32

func (*MinterState) Marshal

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

func (*MinterState) MarshalTo

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

func (*MinterState) MarshalToSizedBuffer

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

func (*MinterState) ProtoMessage

func (*MinterState) ProtoMessage()

func (*MinterState) Reset

func (m *MinterState) Reset()

func (*MinterState) Size

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

func (*MinterState) String

func (m *MinterState) String() string

func (*MinterState) Unmarshal

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

func (*MinterState) XXX_DiscardUnknown

func (m *MinterState) XXX_DiscardUnknown()

func (*MinterState) XXX_Marshal

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

func (*MinterState) XXX_Merge

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

func (*MinterState) XXX_Size

func (m *MinterState) XXX_Size() int

func (*MinterState) XXX_Unmarshal

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

type Params

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

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

func (*Params) GetMintDenom

func (m *Params) GetMintDenom() string

func (*Params) GetMinterConfig

func (m *Params) GetMinterConfig() MinterConfig

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ParamSetPairs

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

ParamSetPairs get the params.ParamSet

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (Params) String

func (params Params) String() string

String implements the Stringer interface.

func (*Params) Unmarshal

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

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

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

func (*Params) XXX_Merge

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

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

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