Documentation ¶
Index ¶
- Variables
- func MigrateParams(ctx sdk.Context, paramStore subspace.Subspace) error
- func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec) error
- func ParamKeyTable() paramtypes.KeyTable
- type Account
- func (*Account) Descriptor() ([]byte, []int)
- func (account Account) GetAccountKey() string
- func (m *Account) GetId() string
- func (m *Account) GetType() string
- func (m *Account) Marshal() (dAtA []byte, err error)
- func (m *Account) MarshalTo(dAtA []byte) (int, error)
- func (m *Account) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Account) ProtoMessage()
- func (m *Account) Reset()
- func (m *Account) Size() (n int)
- func (m *Account) String() string
- func (m *Account) Unmarshal(dAtA []byte) error
- func (m *Account) XXX_DiscardUnknown()
- func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Account) XXX_Merge(src proto.Message)
- func (m *Account) XXX_Size() int
- func (m *Account) XXX_Unmarshal(b []byte) error
- type DestinationShare
- func (*DestinationShare) Descriptor() ([]byte, []int)
- func (m *DestinationShare) GetDestination() Account
- func (m *DestinationShare) GetName() string
- func (m *DestinationShare) Marshal() (dAtA []byte, err error)
- func (m *DestinationShare) MarshalTo(dAtA []byte) (int, error)
- func (m *DestinationShare) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*DestinationShare) ProtoMessage()
- func (m *DestinationShare) Reset()
- func (m *DestinationShare) Size() (n int)
- func (m *DestinationShare) String() string
- func (m *DestinationShare) Unmarshal(dAtA []byte) error
- func (m *DestinationShare) XXX_DiscardUnknown()
- func (m *DestinationShare) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DestinationShare) XXX_Merge(src proto.Message)
- func (m *DestinationShare) XXX_Size() int
- func (m *DestinationShare) XXX_Unmarshal(b []byte) error
- type Destinations
- func (*Destinations) Descriptor() ([]byte, []int)
- func (m *Destinations) GetPrimaryShare() Account
- func (m *Destinations) GetShares() []*DestinationShare
- func (m *Destinations) Marshal() (dAtA []byte, err error)
- func (m *Destinations) MarshalTo(dAtA []byte) (int, error)
- func (m *Destinations) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Destinations) ProtoMessage()
- func (m *Destinations) Reset()
- func (m *Destinations) Size() (n int)
- func (m *Destinations) String() string
- func (m *Destinations) Unmarshal(dAtA []byte) error
- func (m *Destinations) XXX_DiscardUnknown()
- func (m *Destinations) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Destinations) XXX_Merge(src proto.Message)
- func (m *Destinations) XXX_Size() int
- func (m *Destinations) XXX_Unmarshal(b []byte) error
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) GetSubDistributors() []SubDistributor
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (p Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type State
- func (*State) Descriptor() ([]byte, []int)
- func (m *State) GetAccount() *Account
- func (m *State) GetBurn() bool
- func (m *State) GetRemains() github_com_cosmos_cosmos_sdk_types.DecCoins
- func (state State) GetStateKey() string
- func (m *State) Marshal() (dAtA []byte, err error)
- func (m *State) MarshalTo(dAtA []byte) (int, error)
- func (m *State) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*State) ProtoMessage()
- func (m *State) Reset()
- func (m *State) Size() (n int)
- func (m *State) String() string
- func (m *State) Unmarshal(dAtA []byte) error
- func (m *State) XXX_DiscardUnknown()
- func (m *State) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *State) XXX_Merge(src proto.Message)
- func (m *State) XXX_Size() int
- func (m *State) XXX_Unmarshal(b []byte) error
- type SubDistributor
- func (*SubDistributor) Descriptor() ([]byte, []int)
- func (m *SubDistributor) GetDestinations() Destinations
- func (m *SubDistributor) GetName() string
- func (m *SubDistributor) GetSources() []*Account
- func (m *SubDistributor) Marshal() (dAtA []byte, err error)
- func (m *SubDistributor) MarshalTo(dAtA []byte) (int, error)
- func (m *SubDistributor) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SubDistributor) ProtoMessage()
- func (m *SubDistributor) Reset()
- func (m *SubDistributor) Size() (n int)
- func (m *SubDistributor) String() string
- func (m *SubDistributor) Unmarshal(dAtA []byte) error
- func (m *SubDistributor) XXX_DiscardUnknown()
- func (m *SubDistributor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SubDistributor) XXX_Merge(src proto.Message)
- func (m *SubDistributor) XXX_Size() int
- func (m *SubDistributor) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BurnStateKey = "burn_state_key" StateKeyPrefix = []byte{0x04} )
View Source
var ( ValidatorsRewardsCollector = "validators_rewards_collector" ModuleAccount = "MODULE_ACCOUNT" Main = "MAIN" )
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 ( ErrInvalidLengthSubDistributor = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowSubDistributor = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupSubDistributor = fmt.Errorf("proto: unexpected end of group") )
View Source
var ( DefaultSubDistributors = []SubDistributor{ { Name: "default_distributor", Destinations: Destinations{ PrimaryShare: Account{ Id: ValidatorsRewardsCollector, Type: ModuleAccount, }, BurnShare: sdk.ZeroDec(), }, Sources: []*Account{ { Id: "", Type: Main, }, }, }, } )
View Source
var (
KeySubDistributors = []byte("SubDistributors")
)
Functions ¶
func MigrateParams ¶
MigrateParams performs in-place store migrations from v1.0.1 to v1.1.0. The migration includes: - SubDistributor params structure changed. - BurnShare and Share now must be set between 0 and 1, not 0 and 100.
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: - SubDistributor State rename CoinStates to Remains. - If burn is set to true state account must be nil
func ParamKeyTable ¶ added in v1.3.0
func ParamKeyTable() paramtypes.KeyTable
ParamKeyTable the param key table for launch module
Types ¶
type Account ¶ added in v1.3.0
type Account struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` }
func (*Account) Descriptor ¶ added in v1.3.0
func (Account) GetAccountKey ¶ added in v1.3.0
func (*Account) MarshalToSizedBuffer ¶ added in v1.3.0
func (*Account) ProtoMessage ¶ added in v1.3.0
func (*Account) ProtoMessage()
func (*Account) XXX_DiscardUnknown ¶ added in v1.3.0
func (m *Account) XXX_DiscardUnknown()
func (*Account) XXX_Marshal ¶ added in v1.3.0
func (*Account) XXX_Unmarshal ¶ added in v1.3.0
type DestinationShare ¶ added in v1.3.0
type DestinationShare struct {}
func (*DestinationShare) Descriptor ¶ added in v1.3.0
func (*DestinationShare) Descriptor() ([]byte, []int)
func (*DestinationShare) GetDestination ¶ added in v1.3.0
func (m *DestinationShare) GetDestination() Account
func (*DestinationShare) GetName ¶ added in v1.3.0
func (m *DestinationShare) GetName() string
func (*DestinationShare) Marshal ¶ added in v1.3.0
func (m *DestinationShare) Marshal() (dAtA []byte, err error)
func (*DestinationShare) MarshalTo ¶ added in v1.3.0
func (m *DestinationShare) MarshalTo(dAtA []byte) (int, error)
func (*DestinationShare) MarshalToSizedBuffer ¶ added in v1.3.0
func (m *DestinationShare) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*DestinationShare) ProtoMessage ¶ added in v1.3.0
func (*DestinationShare) ProtoMessage()
func (*DestinationShare) Reset ¶ added in v1.3.0
func (m *DestinationShare) Reset()
func (*DestinationShare) Size ¶ added in v1.3.0
func (m *DestinationShare) Size() (n int)
func (*DestinationShare) String ¶ added in v1.3.0
func (m *DestinationShare) String() string
func (*DestinationShare) Unmarshal ¶ added in v1.3.0
func (m *DestinationShare) Unmarshal(dAtA []byte) error
func (*DestinationShare) XXX_DiscardUnknown ¶ added in v1.3.0
func (m *DestinationShare) XXX_DiscardUnknown()
func (*DestinationShare) XXX_Marshal ¶ added in v1.3.0
func (m *DestinationShare) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DestinationShare) XXX_Merge ¶ added in v1.3.0
func (m *DestinationShare) XXX_Merge(src proto.Message)
func (*DestinationShare) XXX_Size ¶ added in v1.3.0
func (m *DestinationShare) XXX_Size() int
func (*DestinationShare) XXX_Unmarshal ¶ added in v1.3.0
func (m *DestinationShare) XXX_Unmarshal(b []byte) error
type Destinations ¶ added in v1.3.0
type Destinations struct {}
func (*Destinations) Descriptor ¶ added in v1.3.0
func (*Destinations) Descriptor() ([]byte, []int)
func (*Destinations) GetPrimaryShare ¶ added in v1.3.0
func (m *Destinations) GetPrimaryShare() Account
func (*Destinations) GetShares ¶ added in v1.3.0
func (m *Destinations) GetShares() []*DestinationShare
func (*Destinations) Marshal ¶ added in v1.3.0
func (m *Destinations) Marshal() (dAtA []byte, err error)
func (*Destinations) MarshalTo ¶ added in v1.3.0
func (m *Destinations) MarshalTo(dAtA []byte) (int, error)
func (*Destinations) MarshalToSizedBuffer ¶ added in v1.3.0
func (m *Destinations) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Destinations) ProtoMessage ¶ added in v1.3.0
func (*Destinations) ProtoMessage()
func (*Destinations) Reset ¶ added in v1.3.0
func (m *Destinations) Reset()
func (*Destinations) Size ¶ added in v1.3.0
func (m *Destinations) Size() (n int)
func (*Destinations) String ¶ added in v1.3.0
func (m *Destinations) String() string
func (*Destinations) Unmarshal ¶ added in v1.3.0
func (m *Destinations) Unmarshal(dAtA []byte) error
func (*Destinations) XXX_DiscardUnknown ¶ added in v1.3.0
func (m *Destinations) XXX_DiscardUnknown()
func (*Destinations) XXX_Marshal ¶ added in v1.3.0
func (m *Destinations) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Destinations) XXX_Merge ¶ added in v1.3.0
func (m *Destinations) XXX_Merge(src proto.Message)
func (*Destinations) XXX_Size ¶ added in v1.3.0
func (m *Destinations) XXX_Size() int
func (*Destinations) XXX_Unmarshal ¶ added in v1.3.0
func (m *Destinations) XXX_Unmarshal(b []byte) error
type Params ¶ added in v1.3.0
type Params struct {
SubDistributors []SubDistributor `protobuf:"bytes,1,rep,name=sub_distributors,json=subDistributors,proto3" json:"sub_distributors"`
}
Params defines the parameters for the module.
func DefaultParams ¶ added in v1.3.0
func DefaultParams() Params
DefaultParams returns a default set of parameters
func NewParams ¶ added in v1.3.0
func NewParams(subDistributors []SubDistributor) Params
NewParams creates a new Params instance
func (*Params) Descriptor ¶ added in v1.3.0
func (*Params) GetSubDistributors ¶ added in v1.3.0
func (m *Params) GetSubDistributors() []SubDistributor
func (*Params) MarshalToSizedBuffer ¶ added in v1.3.0
func (*Params) ParamSetPairs ¶ added in v1.3.0
func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
ParamSetPairs get the params.ParamSet
func (*Params) ProtoMessage ¶ added in v1.3.0
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶ added in v1.3.0
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶ added in v1.3.0
func (*Params) XXX_Unmarshal ¶ added in v1.3.0
type State ¶ added in v1.3.0
type State struct { Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` Burn bool `protobuf:"varint,2,opt,name=burn,proto3" json:"burn,omitempty"` Remains github_com_cosmos_cosmos_sdk_types.DecCoins `` /* 129-byte string literal not displayed */ }
func (*State) Descriptor ¶ added in v1.3.0
func (*State) GetAccount ¶ added in v1.3.0
func (*State) GetRemains ¶ added in v1.3.0
func (m *State) GetRemains() github_com_cosmos_cosmos_sdk_types.DecCoins
func (State) GetStateKey ¶ added in v1.3.0
func (*State) MarshalToSizedBuffer ¶ added in v1.3.0
func (*State) ProtoMessage ¶ added in v1.3.0
func (*State) ProtoMessage()
func (*State) XXX_DiscardUnknown ¶ added in v1.3.0
func (m *State) XXX_DiscardUnknown()
func (*State) XXX_Marshal ¶ added in v1.3.0
func (*State) XXX_Unmarshal ¶ added in v1.3.0
type SubDistributor ¶ added in v1.3.0
type SubDistributor struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Sources []*Account `protobuf:"bytes,2,rep,name=sources,proto3" json:"sources,omitempty"` Destinations Destinations `protobuf:"bytes,3,opt,name=destinations,proto3" json:"destinations"` }
func (*SubDistributor) Descriptor ¶ added in v1.3.0
func (*SubDistributor) Descriptor() ([]byte, []int)
func (*SubDistributor) GetDestinations ¶ added in v1.3.0
func (m *SubDistributor) GetDestinations() Destinations
func (*SubDistributor) GetName ¶ added in v1.3.0
func (m *SubDistributor) GetName() string
func (*SubDistributor) GetSources ¶ added in v1.3.0
func (m *SubDistributor) GetSources() []*Account
func (*SubDistributor) Marshal ¶ added in v1.3.0
func (m *SubDistributor) Marshal() (dAtA []byte, err error)
func (*SubDistributor) MarshalTo ¶ added in v1.3.0
func (m *SubDistributor) MarshalTo(dAtA []byte) (int, error)
func (*SubDistributor) MarshalToSizedBuffer ¶ added in v1.3.0
func (m *SubDistributor) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SubDistributor) ProtoMessage ¶ added in v1.3.0
func (*SubDistributor) ProtoMessage()
func (*SubDistributor) Reset ¶ added in v1.3.0
func (m *SubDistributor) Reset()
func (*SubDistributor) Size ¶ added in v1.3.0
func (m *SubDistributor) Size() (n int)
func (*SubDistributor) String ¶ added in v1.3.0
func (m *SubDistributor) String() string
func (*SubDistributor) Unmarshal ¶ added in v1.3.0
func (m *SubDistributor) Unmarshal(dAtA []byte) error
func (*SubDistributor) XXX_DiscardUnknown ¶ added in v1.3.0
func (m *SubDistributor) XXX_DiscardUnknown()
func (*SubDistributor) XXX_Marshal ¶ added in v1.3.0
func (m *SubDistributor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SubDistributor) XXX_Merge ¶ added in v1.3.0
func (m *SubDistributor) XXX_Merge(src proto.Message)
func (*SubDistributor) XXX_Size ¶ added in v1.3.0
func (m *SubDistributor) XXX_Size() int
func (*SubDistributor) XXX_Unmarshal ¶ added in v1.3.0
func (m *SubDistributor) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.