Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ModuleName defines the module name ModuleName = "tokenomics" // StoreKey defines the primary module store key StoreKey = ModuleName // MemStoreKey defines the in-memory store key MemStoreKey = "mem_tokenomics" )
Variables ¶
View Source
var ( ErrTokenomicsInvalidSigner = sdkerrors.Register(ModuleName, 1100, "the provided authority address does not match the on-chain governance address") ErrTokenomicsAddressInvalid = sdkerrors.Register(ModuleName, 1101, "the provided authority address is not a valid bech32 address") ErrTokenomicsClaimNil = sdkerrors.Register(ModuleName, 1102, "provided claim is nil") ErrTokenomicsSessionHeaderNil = sdkerrors.Register(ModuleName, 1103, "provided claim's session header is nil") ErrTokenomicsSessionHeaderInvalid = sdkerrors.Register(ModuleName, 1104, "provided claim's session header is invalid") ErrTokenomicsSupplierModuleMintFailed = sdkerrors.Register(ModuleName, 1105, "failed to mint uPOKT to supplier module account") ErrTokenomicsSupplierRewardFailed = sdkerrors.Register(ModuleName, 1106, "failed to send uPOKT from supplier module account to supplier") ErrTokenomicsSupplierAddressInvalid = sdkerrors.Register(ModuleName, 1107, "the supplier address in the claim is not a valid bech32 address") ErrTokenomicsApplicationNotFound = sdkerrors.Register(ModuleName, 1108, "application not found") ErrTokenomicsApplicationModuleBurn = sdkerrors.Register(ModuleName, 1109, "failed to burn uPOKT from application module account") ErrTokenomicsApplicationAddressInvalid = sdkerrors.Register(ModuleName, 1112, "the application address in the claim is not a valid bech32 address") ErrTokenomicsParamsInvalid = sdkerrors.Register(ModuleName, 1113, "provided params are invalid") ErrTokenomicsRootHashInvalid = sdkerrors.Register(ModuleName, 1114, "the root hash in the claim is invalid") ErrTokenomicsApplicationNewStakeInvalid = sdkerrors.Register(ModuleName, 1115, "application stake cannot be reduced to a -ve amount") ErrTokenomicsParamNameInvalid = sdkerrors.Register(ModuleName, 1116, "the provided param name is invalid") ErrTokenomicsParamInvalid = sdkerrors.Register(ModuleName, 1117, "the provided param is invalid") )
x/tokenomics module sentinel errors
View Source
var ( KeyComputeUnitsToTokensMultiplier = []byte("ComputeUnitsToTokensMultiplier") NameComputeUnitsToTokensMultiplier = "compute_units_to_tokens_multiplier" DefaultComputeUnitsToTokensMultiplier uint64 = 42 // TODO_BLOCKER: Determine the default value. )
View Source
var ParamsKey = []byte("p_tokenomics")
Functions ¶
func ParamKeyTable ¶
func ParamKeyTable() paramtypes.KeyTable
ParamKeyTable the param key table for launch module
func RegisterInterfaces ¶
func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
func ValidateComputeUnitsToTokensMultiplier ¶ added in v0.0.2
func ValidateComputeUnitsToTokensMultiplier(v interface{}) error
ValidateComputeUnitsToTokensMultiplier validates the ComputeUnitsToTokensMultiplier governance parameter. NB: The argument is an interface type to satisfy the ParamSetPair function signature.
Types ¶
type AccountKeeper ¶
type AccountKeeper interface {
GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI // only used for simulation
}
AccountKeeper defines the expected interface for the Account module.
type ApplicationKeeper ¶
type ApplicationKeeper interface { GetApplication(ctx context.Context, appAddr string) (app apptypes.Application, found bool) SetApplication(ctx context.Context, app apptypes.Application) }
type BankKeeper ¶
type BankKeeper interface { MintCoins(ctx context.Context, moduleName string, amt sdk.Coins) error BurnCoins(ctx context.Context, moduleName string, amt sdk.Coins) error // We use the bankkeeper SendXXX instead of DelegateXX methods // because their purpose is to "escrow" funds on behalf of an account rather // than "delegate" funds from one account to another which is more closely // linked to staking. SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error }
BankKeeper defines the expected interface for the Bank module.
type ProofKeeper ¶
type ProofKeeper interface { GetAllClaims(ctx context.Context) []prooftypes.Claim RemoveClaim(ctx context.Context, sessionId, supplierAddr string) GetProof(ctx context.Context, sessionId, supplierAddr string) (proof prooftypes.Proof, isProofFound bool) RemoveProof(ctx context.Context, sessionId, supplierAddr string) // Only used for testing & simulation UpsertClaim(ctx context.Context, claim prooftypes.Claim) UpsertProof(ctx context.Context, claim prooftypes.Proof) }
Click to show internal directories.
Click to hide internal directories.