types

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2021 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EurxMintingClaimType = "eurx_minting"
	BondDenom            = "uestm"
)
View Source
const (
	EventTypeClaim             = "claim_reward"
	EventTypeRewardPeriod      = "new_reward_period"
	EventTypeClaimPeriod       = "new_claim_period"
	EventTypeClaimPeriodExpiry = "claim_period_expiry"

	AttributeValueCategory   = ModuleName
	AttributeKeyClaimedBy    = "claimed_by"
	AttributeKeyClaimAmount  = "claim_amount"
	AttributeKeyClaimType    = "claim_type"
	AttributeKeyRewardPeriod = "reward_period"
	AttributeKeyClaimPeriod  = "claim_period"
)

Events emitted by the incentive module

View Source
const (
	// ModuleName defines the module name
	ModuleName = "incentive"

	// StoreKey defines the primary module store key
	StoreKey = ModuleName

	// RouterKey is the message route for slashing
	RouterKey = ModuleName

	// QuerierRoute defines the module's query routing key
	QuerierRoute = ModuleName

	// MemStoreKey defines the in-memory store key
	MemStoreKey = "mem_capability"
)
View Source
const (
	ParamsKey = "Params-value-"

	EurxMintingRewardDenom = "uestm"
)
View Source
const DefaultIndex uint64 = 1

DefaultIndex is the default capability global index

Variables

View Source
var (
	ErrClaimNotFound                 = sdkerrors.Register(ModuleName, 2, "no claimable rewards found for user")
	ErrRewardPeriodNotFound          = sdkerrors.Register(ModuleName, 3, "no reward period found for collateral type")
	ErrInvalidAccountType            = sdkerrors.Register(ModuleName, 4, "account type not supported")
	ErrNoClaimsFound                 = sdkerrors.Register(ModuleName, 5, "no claimable rewards found")
	ErrInsufficientModAccountBalance = sdkerrors.Register(ModuleName, 6, "module account has insufficient balance to pay claim")
	ErrAccountNotFound               = sdkerrors.Register(ModuleName, 7, "account not found")
	ErrInvalidMultiplier             = sdkerrors.Register(ModuleName, 8, "invalid rewards multiplier")
	ErrZeroClaim                     = sdkerrors.Register(ModuleName, 9, "cannot claim - claim amount rounds to zero")
	ErrClaimExpired                  = sdkerrors.Register(ModuleName, 10, "claim has expired")
	ErrInvalidClaimType              = sdkerrors.Register(ModuleName, 11, "invalid claim type")
	ErrInvalidClaimOwner             = sdkerrors.Register(ModuleName, 12, "invalid claim owner")
)

x/incentive module sentinel errors

View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthIncentive        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowIncentive          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupIncentive = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	EurxMintingClaimKeyPrefix                     = []byte{0x01} // prefix for keys that store Eurx minting claims
	EurxMintingRewardFactorKeyPrefix              = []byte{0x02} // prefix for key that stores Eurx minting reward factors
	PreviousEurxMintingRewardAccrualTimeKeyPrefix = []byte{0x03} // prefix for key that stores the blocktime
)
View Source
var (
	KeyEurxMintingRewardPeriods     = []byte("EurxMintingRewardPeriods")
	KeyClaimEnd                     = []byte("ClaimEnd")
	KeyMultipliers                  = []byte("ClaimMultipliers")
	DefaultActive                   = false
	DefaultRewardPeriods            = RewardPeriods{}
	DefaultMultiRewardPeriods       = MultiRewardPeriods{}
	DefaultMultipliers              = Multipliers{}
	DefaultEurxClaims               = EurxMintingClaims{}
	DefaultGenesisAccumulationTimes = GenesisAccumulationTimes{}
	DefaultClaimEnd                 = tmtime.Canonical(time.Unix(1, 0))
	GovDenom                        = cdptypes.DefaultGovDenom
	PrincipalDenom                  = "eurx"
	IncentiveMacc                   = estmdistTypes.ModuleName
)

Parameter keys and default values

View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ModuleCdc = codec.NewAminoCodec(amino)
)

Functions

func GetTotalVestingPeriodLength

func GetTotalVestingPeriodLength(periods vestingtypes.Periods) int64

GetTotalVestingPeriodLength returns the summed length of all vesting periods

func KeyPrefix added in v0.2.0

func KeyPrefix(p string) []byte

func NewPeriod

func NewPeriod(amount sdk.Coins, length int64) vestingtypes.Period

NewPeriod returns a new vesting period

func ParamKeyTable

func ParamKeyTable() paramstype.KeyTable

ParamKeyTable Key declaration for parameters

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

func RegisterInterfaces added in v0.2.0

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterQueryHandler added in v0.2.0

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient added in v0.2.0

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint added in v0.2.0

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer added in v0.2.0

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer added in v0.2.0

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type AccountKeeper

type AccountKeeper interface {
	// Return a new account with the next account number and the specified address. Does not save the new account to the store.
	NewAccountWithAddress(sdk.Context, sdk.AccAddress) authtypes.AccountI

	// Return a new account with the next account number. Does not save the new account to the store.
	NewAccount(sdk.Context, authtypes.AccountI) authtypes.AccountI

	// Retrieve an account from the store.
	GetAccount(sdk.Context, sdk.AccAddress) authtypes.AccountI

	// Set an account in the store.
	SetAccount(sdk.Context, authtypes.AccountI)

	// Remove an account from the store.
	RemoveAccount(sdk.Context, authtypes.AccountI)

	// Iterate over all accounts, calling the provided function. Stop iteraiton when it returns false.
	IterateAccounts(sdk.Context, func(authtypes.AccountI) bool)

	// Fetch the public key of an account at a specified address
	GetPubKey(sdk.Context, sdk.AccAddress) (cryptotypes.PubKey, error)

	// Fetch the sequence of an account at a specified address.
	GetSequence(sdk.Context, sdk.AccAddress) (uint64, error)

	// Fetch the next account number, and increment the internal counter.
	GetNextAccountNumber(sdk.Context) uint64

	GetModuleAddress(moduleName string) sdk.AccAddress
	GetModuleAccount(ctx sdk.Context, moduleName string) authtypes.ModuleAccountI
}

AccountKeeper expected interface for the account keeper (noalias)

type BankKeeper added in v0.2.0

type BankKeeper interface {
	// View
	ValidateBalance(ctx sdk.Context, addr sdk.AccAddress) error
	HasBalance(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coin) bool

	GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
	GetAccountsBalances(ctx sdk.Context) []banktypes.Balance
	GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
	LockedCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
	SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins

	IterateAccountBalances(ctx sdk.Context, addr sdk.AccAddress, cb func(coin sdk.Coin) (stop bool))
	IterateAllBalances(ctx sdk.Context, cb func(address sdk.AccAddress, coin sdk.Coin) (stop bool))

	// Send
	InputOutputCoins(ctx sdk.Context, inputs []banktypes.Input, outputs []banktypes.Output) error
	SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error

	GetParams(ctx sdk.Context) banktypes.Params
	SetParams(ctx sdk.Context, params banktypes.Params)

	SendEnabledCoin(ctx sdk.Context, coin sdk.Coin) bool
	SendEnabledCoins(ctx sdk.Context, coins ...sdk.Coin) error

	BlockedAddr(addr sdk.AccAddress) bool

	//
	InitGenesis(sdk.Context, *banktypes.GenesisState)
	ExportGenesis(sdk.Context) *banktypes.GenesisState

	GetSupply(ctx sdk.Context) exported.SupplyI
	SetSupply(ctx sdk.Context, supply exported.SupplyI)

	GetDenomMetaData(ctx sdk.Context, denom string) banktypes.Metadata
	SetDenomMetaData(ctx sdk.Context, denomMetaData banktypes.Metadata)
	IterateAllDenomMetaData(ctx sdk.Context, cb func(banktypes.Metadata) bool)

	SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
	SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error
	SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
	DelegateCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
	UndelegateCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
	MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error
	BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error

	DelegateCoins(ctx sdk.Context, delegatorAddr, moduleAccAddr sdk.AccAddress, amt sdk.Coins) error
	UndelegateCoins(ctx sdk.Context, moduleAccAddr, delegatorAddr sdk.AccAddress, amt sdk.Coins) error
	MarshalSupply(supplyI exported.SupplyI) ([]byte, error)
	UnmarshalSupply(bz []byte) (exported.SupplyI, error)
}

type BaseClaim added in v0.2.0

type BaseClaim struct {
	Owner  github_com_lcnem_eurx_types.StringAccAddress `protobuf:"bytes,1,opt,name=owner,proto3,customtype=github.com/lcnem/eurx/types.StringAccAddress" json:"owner" yaml:"owner"`
	Reward types.Coin                                   `protobuf:"bytes,2,opt,name=reward,proto3" json:"reward" yaml:"reward"`
}

func (*BaseClaim) Descriptor added in v0.2.0

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

func (*BaseClaim) GetReward added in v0.2.0

func (m *BaseClaim) GetReward() types.Coin

func (BaseClaim) GetType added in v0.2.0

func (c BaseClaim) GetType() string

GetType returns the claim type, used to identify auctions in event attributes

func (*BaseClaim) Marshal added in v0.2.0

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

func (*BaseClaim) MarshalTo added in v0.2.0

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

func (*BaseClaim) MarshalToSizedBuffer added in v0.2.0

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

func (*BaseClaim) ProtoMessage added in v0.2.0

func (*BaseClaim) ProtoMessage()

func (*BaseClaim) Reset added in v0.2.0

func (m *BaseClaim) Reset()

func (*BaseClaim) Size added in v0.2.0

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

func (*BaseClaim) String added in v0.2.0

func (m *BaseClaim) String() string

func (*BaseClaim) Unmarshal added in v0.2.0

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

func (BaseClaim) Validate added in v0.2.0

func (c BaseClaim) Validate() error

Validate performs a basic check of a BaseClaim fields

func (*BaseClaim) XXX_DiscardUnknown added in v0.2.0

func (m *BaseClaim) XXX_DiscardUnknown()

func (*BaseClaim) XXX_Marshal added in v0.2.0

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

func (*BaseClaim) XXX_Merge added in v0.2.0

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

func (*BaseClaim) XXX_Size added in v0.2.0

func (m *BaseClaim) XXX_Size() int

func (*BaseClaim) XXX_Unmarshal added in v0.2.0

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

type BaseMultiClaim added in v0.2.0

type BaseMultiClaim struct {
	Owner  github_com_lcnem_eurx_types.StringAccAddress `protobuf:"bytes,1,opt,name=owner,proto3,customtype=github.com/lcnem/eurx/types.StringAccAddress" json:"owner" yaml:"owner"`
	Reward []types.Coin                                 `protobuf:"bytes,2,rep,name=reward,proto3" json:"reward" yaml:"rewards"`
}

func (*BaseMultiClaim) Descriptor added in v0.2.0

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

func (*BaseMultiClaim) GetReward added in v0.2.0

func (m *BaseMultiClaim) GetReward() []types.Coin

func (BaseMultiClaim) GetType added in v0.2.0

func (c BaseMultiClaim) GetType() string

GetType returns the claim type, used to identify auctions in event attributes

func (*BaseMultiClaim) Marshal added in v0.2.0

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

func (*BaseMultiClaim) MarshalTo added in v0.2.0

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

func (*BaseMultiClaim) MarshalToSizedBuffer added in v0.2.0

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

func (*BaseMultiClaim) ProtoMessage added in v0.2.0

func (*BaseMultiClaim) ProtoMessage()

func (*BaseMultiClaim) Reset added in v0.2.0

func (m *BaseMultiClaim) Reset()

func (*BaseMultiClaim) Size added in v0.2.0

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

func (*BaseMultiClaim) String added in v0.2.0

func (m *BaseMultiClaim) String() string

func (*BaseMultiClaim) Unmarshal added in v0.2.0

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

func (BaseMultiClaim) Validate added in v0.2.0

func (c BaseMultiClaim) Validate() error

Validate performs a basic check of a BaseClaim fields

func (*BaseMultiClaim) XXX_DiscardUnknown added in v0.2.0

func (m *BaseMultiClaim) XXX_DiscardUnknown()

func (*BaseMultiClaim) XXX_Marshal added in v0.2.0

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

func (*BaseMultiClaim) XXX_Merge added in v0.2.0

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

func (*BaseMultiClaim) XXX_Size added in v0.2.0

func (m *BaseMultiClaim) XXX_Size() int

func (*BaseMultiClaim) XXX_Unmarshal added in v0.2.0

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

type CdpKeeper

type CdpKeeper interface {
	GetInterestFactor(ctx sdk.Context, collateralType string) (sdk.Dec, bool)
	GetTotalPrincipal(ctx sdk.Context, collateralType string, principalDenom string) (total sdk.Int)
	GetCdpByOwnerAndCollateralType(ctx sdk.Context, owner sdk.AccAddress, collateralType string) (cdptypes.Cdp, bool)
	GetCollateral(ctx sdk.Context, collateralType string) (cdptypes.CollateralParam, bool)
}

CdpKeeper defines the expected interface for the pricefeed (noalias)

type Claim

type Claim interface {
	GetOwner() sdk.AccAddress
	GetReward() sdk.Coin
	GetType() string
}

Claim is an interface for handling common claim actions

type Claims

type Claims []Claim

Claims is a slice of Claim

type EurxMintingClaim added in v0.3.0

type EurxMintingClaim struct {
	*BaseClaim    ``            /* 126-byte string literal not displayed */
	RewardIndexes []RewardIndex `protobuf:"bytes,2,rep,name=reward_indexes,json=rewardIndexes,proto3" json:"reward_indexes" yaml:"reward_indexes"`
}

func NewEurxMintingClaim added in v0.3.0

func NewEurxMintingClaim(owner sdk.AccAddress, reward sdk.Coin, rewardIndexes RewardIndexes) EurxMintingClaim

NewEurxMintingClaim returns a new EurxMintingClaim

func (*EurxMintingClaim) Descriptor added in v0.3.0

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

func (EurxMintingClaim) GetOwner added in v0.3.0

func (c EurxMintingClaim) GetOwner() sdk.AccAddress

GetOwner returns the claim's owner

func (EurxMintingClaim) GetReward added in v0.3.0

func (c EurxMintingClaim) GetReward() sdk.Coin

GetReward returns the claim's reward coin

func (*EurxMintingClaim) GetRewardIndexes added in v0.3.0

func (m *EurxMintingClaim) GetRewardIndexes() []RewardIndex

func (EurxMintingClaim) GetType added in v0.3.0

func (c EurxMintingClaim) GetType() string

GetType returns the claim's type

func (EurxMintingClaim) HasRewardIndex added in v0.3.0

func (c EurxMintingClaim) HasRewardIndex(collateralType string) (int64, bool)

HasRewardIndex check if a claim has a reward index for the input collateral type

func (*EurxMintingClaim) Marshal added in v0.3.0

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

func (*EurxMintingClaim) MarshalTo added in v0.3.0

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

func (*EurxMintingClaim) MarshalToSizedBuffer added in v0.3.0

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

func (*EurxMintingClaim) ProtoMessage added in v0.3.0

func (*EurxMintingClaim) ProtoMessage()

func (*EurxMintingClaim) Reset added in v0.3.0

func (m *EurxMintingClaim) Reset()

func (*EurxMintingClaim) Size added in v0.3.0

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

func (*EurxMintingClaim) String added in v0.3.0

func (m *EurxMintingClaim) String() string

func (*EurxMintingClaim) Unmarshal added in v0.3.0

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

func (EurxMintingClaim) Validate added in v0.3.0

func (c EurxMintingClaim) Validate() error

Validate performs a basic check of a Claim fields

func (*EurxMintingClaim) XXX_DiscardUnknown added in v0.3.0

func (m *EurxMintingClaim) XXX_DiscardUnknown()

func (*EurxMintingClaim) XXX_Marshal added in v0.3.0

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

func (*EurxMintingClaim) XXX_Merge added in v0.3.0

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

func (*EurxMintingClaim) XXX_Size added in v0.3.0

func (m *EurxMintingClaim) XXX_Size() int

func (*EurxMintingClaim) XXX_Unmarshal added in v0.3.0

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

type EurxMintingClaims added in v0.3.0

type EurxMintingClaims []EurxMintingClaim

EurxMintingClaims slice of EurxMintingClaim

func (EurxMintingClaims) Validate added in v0.3.0

func (cs EurxMintingClaims) Validate() error

Validate checks if all the claims are valid and there are no duplicated entries.

type GenesisAccumulationTime added in v0.2.0

type GenesisAccumulationTime struct {
	CollateralType           string    `` /* 126-byte string literal not displayed */
	PreviousAccumulationTime time.Time `` /* 167-byte string literal not displayed */
}

func NewGenesisAccumulationTime added in v0.2.0

func NewGenesisAccumulationTime(ctype string, prevTime time.Time) GenesisAccumulationTime

NewGenesisAccumulationTime returns a new GenesisAccumulationTime

func (*GenesisAccumulationTime) Descriptor added in v0.2.0

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

func (*GenesisAccumulationTime) GetCollateralType added in v0.2.0

func (m *GenesisAccumulationTime) GetCollateralType() string

func (*GenesisAccumulationTime) GetPreviousAccumulationTime added in v0.2.0

func (m *GenesisAccumulationTime) GetPreviousAccumulationTime() time.Time

func (*GenesisAccumulationTime) Marshal added in v0.2.0

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

func (*GenesisAccumulationTime) MarshalTo added in v0.2.0

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

func (*GenesisAccumulationTime) MarshalToSizedBuffer added in v0.2.0

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

func (*GenesisAccumulationTime) ProtoMessage added in v0.2.0

func (*GenesisAccumulationTime) ProtoMessage()

func (*GenesisAccumulationTime) Reset added in v0.2.0

func (m *GenesisAccumulationTime) Reset()

func (*GenesisAccumulationTime) Size added in v0.2.0

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

func (*GenesisAccumulationTime) String added in v0.2.0

func (m *GenesisAccumulationTime) String() string

func (*GenesisAccumulationTime) Unmarshal added in v0.2.0

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

func (GenesisAccumulationTime) Validate added in v0.2.0

func (gat GenesisAccumulationTime) Validate() error

Validate performs validation of GenesisAccumulationTime

func (*GenesisAccumulationTime) XXX_DiscardUnknown added in v0.2.0

func (m *GenesisAccumulationTime) XXX_DiscardUnknown()

func (*GenesisAccumulationTime) XXX_Marshal added in v0.2.0

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

func (*GenesisAccumulationTime) XXX_Merge added in v0.2.0

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

func (*GenesisAccumulationTime) XXX_Size added in v0.2.0

func (m *GenesisAccumulationTime) XXX_Size() int

func (*GenesisAccumulationTime) XXX_Unmarshal added in v0.2.0

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

type GenesisAccumulationTimes added in v0.2.0

type GenesisAccumulationTimes []GenesisAccumulationTime

GenesisAccumulationTimes slice of GenesisAccumulationTime

func (GenesisAccumulationTimes) Validate added in v0.2.0

func (gats GenesisAccumulationTimes) Validate() error

Validate performs validation of GenesisAccumulationTimes

type GenesisState

type GenesisState struct {
	Params                Params                    `protobuf:"bytes,1,opt,name=params,proto3" json:"params" yaml:"params"`
	EurxAccumulationTimes []GenesisAccumulationTime `` /* 147-byte string literal not displayed */
	EurxMintingClaims     []EurxMintingClaim        `` /* 131-byte string literal not displayed */
}

GenesisState defines the incentive module's genesis state.

func DefaultGenesis added in v0.2.0

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default Capability genesis state

func NewGenesisState

func NewGenesisState(params Params, eurxAccumTimes GenesisAccumulationTimes, c EurxMintingClaims) GenesisState

NewGenesisState returns a new genesis state

func (*GenesisState) Descriptor added in v0.2.0

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

func (GenesisState) Equal

func (gs GenesisState) Equal(gs2 GenesisState) bool

Equal checks whether two gov GenesisState structs are equivalent

func (*GenesisState) GetEurxAccumulationTimes added in v0.2.0

func (m *GenesisState) GetEurxAccumulationTimes() []GenesisAccumulationTime

func (*GenesisState) GetEurxMintingClaims added in v0.2.0

func (m *GenesisState) GetEurxMintingClaims() []EurxMintingClaim

func (*GenesisState) GetParams added in v0.2.0

func (m *GenesisState) GetParams() Params

func (GenesisState) IsEmpty

func (gs GenesisState) IsEmpty() bool

IsEmpty returns true if a GenesisState is empty

func (*GenesisState) Marshal added in v0.2.0

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

func (*GenesisState) MarshalTo added in v0.2.0

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

func (*GenesisState) MarshalToSizedBuffer added in v0.2.0

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

func (*GenesisState) ProtoMessage added in v0.2.0

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset added in v0.2.0

func (m *GenesisState) Reset()

func (*GenesisState) Size added in v0.2.0

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

func (*GenesisState) String added in v0.2.0

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal added in v0.2.0

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

func (GenesisState) Validate

func (gs GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure.

func (*GenesisState) XXX_DiscardUnknown added in v0.2.0

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal added in v0.2.0

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

func (*GenesisState) XXX_Merge added in v0.2.0

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

func (*GenesisState) XXX_Size added in v0.2.0

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal added in v0.2.0

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

type MsgClaimEurxMintingReward added in v0.3.0

type MsgClaimEurxMintingReward struct {
	Sender         github_com_lcnem_eurx_types.StringAccAddress `protobuf:"bytes,1,opt,name=sender,proto3,customtype=github.com/lcnem/eurx/types.StringAccAddress" json:"sender" yaml:"sender"`
	MultiplierName string                                       `` /* 126-byte string literal not displayed */
}

func NewMsgClaimEurxMintingReward added in v0.3.0

func NewMsgClaimEurxMintingReward(sender sdk.AccAddress, multiplierName string) MsgClaimEurxMintingReward

NewMsgClaimEurxMintingReward returns a new MsgClaimEurxMintingReward.

func (*MsgClaimEurxMintingReward) Descriptor added in v0.3.0

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

func (*MsgClaimEurxMintingReward) GetMultiplierName added in v0.3.0

func (m *MsgClaimEurxMintingReward) GetMultiplierName() string

func (MsgClaimEurxMintingReward) GetSignBytes added in v0.3.0

func (msg MsgClaimEurxMintingReward) GetSignBytes() []byte

GetSignBytes gets the canonical byte representation of the Msg.

func (MsgClaimEurxMintingReward) GetSigners added in v0.3.0

func (msg MsgClaimEurxMintingReward) GetSigners() []sdk.AccAddress

GetSigners returns the addresses of signers that must sign.

func (*MsgClaimEurxMintingReward) Marshal added in v0.3.0

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

func (*MsgClaimEurxMintingReward) MarshalTo added in v0.3.0

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

func (*MsgClaimEurxMintingReward) MarshalToSizedBuffer added in v0.3.0

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

func (*MsgClaimEurxMintingReward) ProtoMessage added in v0.3.0

func (*MsgClaimEurxMintingReward) ProtoMessage()

func (*MsgClaimEurxMintingReward) Reset added in v0.3.0

func (m *MsgClaimEurxMintingReward) Reset()

func (MsgClaimEurxMintingReward) Route added in v0.3.0

func (msg MsgClaimEurxMintingReward) Route() string

Route return the message type used for routing the message.

func (*MsgClaimEurxMintingReward) Size added in v0.3.0

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

func (*MsgClaimEurxMintingReward) String added in v0.3.0

func (m *MsgClaimEurxMintingReward) String() string

func (MsgClaimEurxMintingReward) Type added in v0.3.0

func (msg MsgClaimEurxMintingReward) Type() string

Type returns a human-readable string for the message, intended for utilization within tags.

func (*MsgClaimEurxMintingReward) Unmarshal added in v0.3.0

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

func (MsgClaimEurxMintingReward) ValidateBasic added in v0.3.0

func (msg MsgClaimEurxMintingReward) ValidateBasic() error

ValidateBasic does a simple validation check that doesn't require access to state.

func (*MsgClaimEurxMintingReward) XXX_DiscardUnknown added in v0.3.0

func (m *MsgClaimEurxMintingReward) XXX_DiscardUnknown()

func (*MsgClaimEurxMintingReward) XXX_Marshal added in v0.3.0

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

func (*MsgClaimEurxMintingReward) XXX_Merge added in v0.3.0

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

func (*MsgClaimEurxMintingReward) XXX_Size added in v0.3.0

func (m *MsgClaimEurxMintingReward) XXX_Size() int

func (*MsgClaimEurxMintingReward) XXX_Unmarshal added in v0.3.0

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

type MultiRewardIndex added in v0.2.0

type MultiRewardIndex struct {
	CollateralType string        `json:"collateral_type" yaml:"collateral_type"`
	RewardIndexes  RewardIndexes `json:"reward_indexes" yaml:"reward_indexes"`
}

MultiRewardIndex stores reward accumulation information on multiple reward types

func NewMultiRewardIndex added in v0.2.0

func NewMultiRewardIndex(collateralType string, indexes RewardIndexes) MultiRewardIndex

NewMultiRewardIndex returns a new MultiRewardIndex

func (MultiRewardIndex) GetFactorIndex added in v0.2.0

func (mri MultiRewardIndex) GetFactorIndex(denom string) (int, bool)

GetFactorIndex gets the index of a specific reward index inside the array by its index

func (MultiRewardIndex) String added in v0.2.0

func (mri MultiRewardIndex) String() string

func (MultiRewardIndex) Validate added in v0.2.0

func (mri MultiRewardIndex) Validate() error

Validate validates multi-reward index

type MultiRewardIndexes added in v0.2.0

type MultiRewardIndexes []MultiRewardIndex

MultiRewardIndexes slice of MultiRewardIndex

func (MultiRewardIndexes) GetRewardIndex added in v0.2.0

func (mris MultiRewardIndexes) GetRewardIndex(denom string) (MultiRewardIndex, bool)

GetRewardIndex fetches a RewardIndex from a MultiRewardIndex by its denom

func (MultiRewardIndexes) GetRewardIndexIndex added in v0.2.0

func (mris MultiRewardIndexes) GetRewardIndexIndex(denom string) (int, bool)

GetRewardIndexIndex fetches a specific reward index inside the array by its denom

func (MultiRewardIndexes) Validate added in v0.2.0

func (mris MultiRewardIndexes) Validate() error

Validate validation for reward indexes

type MultiRewardPeriod added in v0.2.0

type MultiRewardPeriod struct {
	Active           bool      `json:"active" yaml:"active"`
	CollateralType   string    `json:"collateral_type" yaml:"collateral_type"`
	Start            time.Time `json:"start" yaml:"start"`
	End              time.Time `json:"end" yaml:"end"`
	RewardsPerSecond sdk.Coins `json:"rewards_per_second" yaml:"rewards_per_second"` // per second reward payouts
}

MultiRewardPeriod supports multiple reward types

func NewMultiRewardPeriod added in v0.2.0

func NewMultiRewardPeriod(active bool, collateralType string, start time.Time, end time.Time, reward sdk.Coins) MultiRewardPeriod

NewMultiRewardPeriod returns a new MultiRewardPeriod

func (MultiRewardPeriod) String added in v0.2.0

func (mrp MultiRewardPeriod) String() string

String implements fmt.Stringer

func (MultiRewardPeriod) Validate added in v0.2.0

func (mrp MultiRewardPeriod) Validate() error

Validate performs a basic check of a MultiRewardPeriod.

type MultiRewardPeriods added in v0.2.0

type MultiRewardPeriods []MultiRewardPeriod

MultiRewardPeriods array of MultiRewardPeriod

func (MultiRewardPeriods) GetMultiRewardPeriod added in v0.2.0

func (mrps MultiRewardPeriods) GetMultiRewardPeriod(denom string) (MultiRewardPeriod, bool)

GetMultiRewardPeriod fetches a MultiRewardPeriod from an array of MultiRewardPeriods by its denom

func (MultiRewardPeriods) GetMultiRewardPeriodIndex added in v0.2.0

func (mrps MultiRewardPeriods) GetMultiRewardPeriodIndex(denom string) (int, bool)

GetMultiRewardPeriodIndex returns the index of a MultiRewardPeriod inside array MultiRewardPeriods

func (MultiRewardPeriods) Validate added in v0.2.0

func (mrps MultiRewardPeriods) Validate() error

Validate checks if all the RewardPeriods are valid and there are no duplicated entries.

type Multiplier added in v0.2.0

type Multiplier struct {
	Name         string                                 `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" yaml:"name"`
	MonthsLockup int64                                  `protobuf:"varint,2,opt,name=months_lockup,json=monthsLockup,proto3" json:"months_lockup,omitempty" yaml:"months_lockup"`
	Factor       github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=factor,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"factor" yaml:"factor"`
}

func NewMultiplier added in v0.2.0

func NewMultiplier(name MultiplierName, lockup int64, factor sdk.Dec) Multiplier

NewMultiplier returns a new Multiplier

func (*Multiplier) Descriptor added in v0.2.0

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

func (*Multiplier) GetMonthsLockup added in v0.2.0

func (m *Multiplier) GetMonthsLockup() int64

func (*Multiplier) GetName added in v0.2.0

func (m *Multiplier) GetName() string

func (*Multiplier) Marshal added in v0.2.0

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

func (*Multiplier) MarshalTo added in v0.2.0

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

func (*Multiplier) MarshalToSizedBuffer added in v0.2.0

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

func (*Multiplier) ProtoMessage added in v0.2.0

func (*Multiplier) ProtoMessage()

func (*Multiplier) Reset added in v0.2.0

func (m *Multiplier) Reset()

func (*Multiplier) Size added in v0.2.0

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

func (*Multiplier) String added in v0.2.0

func (m *Multiplier) String() string

func (*Multiplier) Unmarshal added in v0.2.0

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

func (Multiplier) Validate added in v0.2.0

func (m Multiplier) Validate() error

Validate multiplier param

func (*Multiplier) XXX_DiscardUnknown added in v0.2.0

func (m *Multiplier) XXX_DiscardUnknown()

func (*Multiplier) XXX_Marshal added in v0.2.0

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

func (*Multiplier) XXX_Merge added in v0.2.0

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

func (*Multiplier) XXX_Size added in v0.2.0

func (m *Multiplier) XXX_Size() int

func (*Multiplier) XXX_Unmarshal added in v0.2.0

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

type MultiplierName added in v0.2.0

type MultiplierName string

MultiplierName name for valid multiplier

const (
	Small  MultiplierName = "small"
	Medium MultiplierName = "medium"
	Large  MultiplierName = "large"
)

Valid reward multipliers

func (MultiplierName) IsValid added in v0.2.0

func (mn MultiplierName) IsValid() error

IsValid checks if the input is one of the expected strings

type Multipliers added in v0.2.0

type Multipliers []Multiplier

Multipliers slice of Multiplier

func (Multipliers) String added in v0.2.0

func (ms Multipliers) String() string

String implements fmt.Stringer

func (Multipliers) Validate added in v0.2.0

func (ms Multipliers) Validate() error

Validate validates each multiplier

type Params

type Params struct {
	EurxMintingRewardPeriods []RewardPeriod `` /* 149-byte string literal not displayed */
	ClaimMultipliers         []Multiplier   `protobuf:"bytes,2,rep,name=claim_multipliers,json=claimMultipliers,proto3" json:"claim_multipliers" yaml:"claim_multipliers"`
	ClaimEnd                 time.Time      `protobuf:"bytes,3,opt,name=claim_end,json=claimEnd,proto3,stdtime" json:"claim_end" yaml:"claim_end"`
}

func DefaultParams

func DefaultParams() Params

DefaultParams returns default params for incentive module

func NewParams

func NewParams(eurxMinting RewardPeriods, hardSupply, hardBorrow MultiRewardPeriods,
	hardDelegator RewardPeriods, multipliers Multipliers, claimEnd time.Time) Params

NewParams returns a new params object

func (*Params) Descriptor added in v0.2.0

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

func (*Params) GetClaimEnd added in v0.2.0

func (m *Params) GetClaimEnd() time.Time

func (*Params) GetClaimMultipliers added in v0.2.0

func (m *Params) GetClaimMultipliers() []Multiplier

func (*Params) GetEurxMintingRewardPeriods added in v0.2.0

func (m *Params) GetEurxMintingRewardPeriods() []RewardPeriod

func (*Params) Marshal added in v0.2.0

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

func (*Params) MarshalTo added in v0.2.0

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

func (*Params) MarshalToSizedBuffer added in v0.2.0

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

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() paramstype.ParamSetPairs

ParamSetPairs implements the ParamSet interface and returns all the key/value pairs

func (*Params) ProtoMessage added in v0.2.0

func (*Params) ProtoMessage()

func (*Params) Reset added in v0.2.0

func (m *Params) Reset()

func (*Params) Size added in v0.2.0

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

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal added in v0.2.0

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

func (Params) Validate

func (p Params) Validate() error

Validate checks that the parameters have valid values.

func (*Params) XXX_DiscardUnknown added in v0.2.0

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal added in v0.2.0

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

func (*Params) XXX_Merge added in v0.2.0

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

func (*Params) XXX_Size added in v0.2.0

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal added in v0.2.0

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

type QueryClient added in v0.2.0

type QueryClient interface {
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewQueryClient added in v0.2.0

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryParamsRequest added in v0.2.0

type QueryParamsRequest struct {
}

func (*QueryParamsRequest) Descriptor added in v0.2.0

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

func (*QueryParamsRequest) Marshal added in v0.2.0

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

func (*QueryParamsRequest) MarshalTo added in v0.2.0

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

func (*QueryParamsRequest) MarshalToSizedBuffer added in v0.2.0

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

func (*QueryParamsRequest) ProtoMessage added in v0.2.0

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset added in v0.2.0

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size added in v0.2.0

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

func (*QueryParamsRequest) String added in v0.2.0

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal added in v0.2.0

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

func (*QueryParamsRequest) XXX_DiscardUnknown added in v0.2.0

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal added in v0.2.0

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

func (*QueryParamsRequest) XXX_Merge added in v0.2.0

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

func (*QueryParamsRequest) XXX_Size added in v0.2.0

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal added in v0.2.0

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

type QueryParamsResponse added in v0.2.0

type QueryParamsResponse struct {
	Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"`
}

func (*QueryParamsResponse) Descriptor added in v0.2.0

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

func (*QueryParamsResponse) GetParams added in v0.2.0

func (m *QueryParamsResponse) GetParams() *Params

func (*QueryParamsResponse) Marshal added in v0.2.0

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

func (*QueryParamsResponse) MarshalTo added in v0.2.0

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

func (*QueryParamsResponse) MarshalToSizedBuffer added in v0.2.0

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

func (*QueryParamsResponse) ProtoMessage added in v0.2.0

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset added in v0.2.0

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size added in v0.2.0

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

func (*QueryParamsResponse) String added in v0.2.0

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal added in v0.2.0

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

func (*QueryParamsResponse) XXX_DiscardUnknown added in v0.2.0

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal added in v0.2.0

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

func (*QueryParamsResponse) XXX_Merge added in v0.2.0

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

func (*QueryParamsResponse) XXX_Size added in v0.2.0

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal added in v0.2.0

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

type QueryServer added in v0.2.0

type QueryServer interface {
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
}

QueryServer is the server API for Query service.

type RewardIndex added in v0.2.0

type RewardIndex struct {
	CollateralType string                                 `` /* 126-byte string literal not displayed */
	RewardFactor   github_com_cosmos_cosmos_sdk_types.Dec `` /* 158-byte string literal not displayed */
}

func NewRewardIndex added in v0.2.0

func NewRewardIndex(collateralType string, factor sdk.Dec) RewardIndex

NewRewardIndex returns a new RewardIndex

func (*RewardIndex) Descriptor added in v0.2.0

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

func (*RewardIndex) GetCollateralType added in v0.2.0

func (m *RewardIndex) GetCollateralType() string

func (*RewardIndex) Marshal added in v0.2.0

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

func (*RewardIndex) MarshalTo added in v0.2.0

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

func (*RewardIndex) MarshalToSizedBuffer added in v0.2.0

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

func (*RewardIndex) ProtoMessage added in v0.2.0

func (*RewardIndex) ProtoMessage()

func (*RewardIndex) Reset added in v0.2.0

func (m *RewardIndex) Reset()

func (*RewardIndex) Size added in v0.2.0

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

func (*RewardIndex) String added in v0.2.0

func (m *RewardIndex) String() string

func (*RewardIndex) Unmarshal added in v0.2.0

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

func (RewardIndex) Validate added in v0.2.0

func (ri RewardIndex) Validate() error

Validate validates reward index

func (*RewardIndex) XXX_DiscardUnknown added in v0.2.0

func (m *RewardIndex) XXX_DiscardUnknown()

func (*RewardIndex) XXX_Marshal added in v0.2.0

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

func (*RewardIndex) XXX_Merge added in v0.2.0

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

func (*RewardIndex) XXX_Size added in v0.2.0

func (m *RewardIndex) XXX_Size() int

func (*RewardIndex) XXX_Unmarshal added in v0.2.0

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

type RewardIndexes added in v0.2.0

type RewardIndexes []RewardIndex

RewardIndexes slice of RewardIndex

func (RewardIndexes) GetFactorIndex added in v0.2.0

func (ris RewardIndexes) GetFactorIndex(denom string) (int, bool)

GetFactorIndex gets the index of a specific reward index inside the array by its index

func (RewardIndexes) GetRewardIndex added in v0.2.0

func (ris RewardIndexes) GetRewardIndex(denom string) (RewardIndex, bool)

GetRewardIndex fetches a RewardIndex by its denom

func (RewardIndexes) Validate added in v0.2.0

func (ris RewardIndexes) Validate() error

Validate validation for reward indexes

type RewardPeriod

type RewardPeriod struct {
	Active           bool       `protobuf:"varint,1,opt,name=active,proto3" json:"active,omitempty" yaml:"active"`
	CollateralType   string     `` /* 126-byte string literal not displayed */
	Start            time.Time  `protobuf:"bytes,3,opt,name=start,proto3,stdtime" json:"start" yaml:"start"`
	End              time.Time  `protobuf:"bytes,4,opt,name=end,proto3,stdtime" json:"end" yaml:"end"`
	RewardsPerSecond types.Coin `` /* 127-byte string literal not displayed */
}

func NewRewardPeriod

func NewRewardPeriod(active bool, collateralType string, start time.Time, end time.Time, reward sdk.Coin) RewardPeriod

NewRewardPeriod returns a new RewardPeriod

func (*RewardPeriod) Descriptor added in v0.2.0

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

func (*RewardPeriod) GetActive added in v0.2.0

func (m *RewardPeriod) GetActive() bool

func (*RewardPeriod) GetCollateralType added in v0.2.0

func (m *RewardPeriod) GetCollateralType() string

func (*RewardPeriod) GetEnd added in v0.2.0

func (m *RewardPeriod) GetEnd() time.Time

func (*RewardPeriod) GetRewardsPerSecond added in v0.2.0

func (m *RewardPeriod) GetRewardsPerSecond() types.Coin

func (*RewardPeriod) GetStart added in v0.2.0

func (m *RewardPeriod) GetStart() time.Time

func (*RewardPeriod) Marshal added in v0.2.0

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

func (*RewardPeriod) MarshalTo added in v0.2.0

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

func (*RewardPeriod) MarshalToSizedBuffer added in v0.2.0

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

func (*RewardPeriod) ProtoMessage added in v0.2.0

func (*RewardPeriod) ProtoMessage()

func (*RewardPeriod) Reset added in v0.2.0

func (m *RewardPeriod) Reset()

func (*RewardPeriod) Size added in v0.2.0

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

func (*RewardPeriod) String

func (m *RewardPeriod) String() string

func (*RewardPeriod) Unmarshal added in v0.2.0

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

func (RewardPeriod) Validate

func (rp RewardPeriod) Validate() error

Validate performs a basic check of a RewardPeriod fields.

func (*RewardPeriod) XXX_DiscardUnknown added in v0.2.0

func (m *RewardPeriod) XXX_DiscardUnknown()

func (*RewardPeriod) XXX_Marshal added in v0.2.0

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

func (*RewardPeriod) XXX_Merge added in v0.2.0

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

func (*RewardPeriod) XXX_Size added in v0.2.0

func (m *RewardPeriod) XXX_Size() int

func (*RewardPeriod) XXX_Unmarshal added in v0.2.0

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

type RewardPeriods

type RewardPeriods []RewardPeriod

RewardPeriods array of RewardPeriod

func (RewardPeriods) Validate

func (rps RewardPeriods) Validate() error

Validate checks if all the RewardPeriods are valid and there are no duplicated entries.

type UnimplementedQueryServer added in v0.2.0

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Params added in v0.2.0

Jump to

Keyboard shortcuts

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