mint

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 20 Imported by: 0

README

x/mint

Abstract

This module enables the minting of time based rewards for reporters, validators, and the team. For more information about rewards and how the token bridge works, reference the ADRs below.

ADRs

  • adr1001 - distributions of base rewards
  • adr1002 - dual delgation
  • adr10003 - time based rewards eligibility
  • adr2001 - trb bridge structure
  • adr3001 - TellorMaster to bridge structure

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeginBlocker

func BeginBlocker(ctx context.Context, k keeper.Keeper) error

BeginBlocker updates the inflation rate, annual provisions, and then mints the block provision for the current block.

func MintBlockProvision

func MintBlockProvision(ctx context.Context, k keeper.Keeper, currentTime time.Time, minter types.Minter) error

mintBlockProvision mints the block provision for the current block.

func SetPreviousBlockTime

func SetPreviousBlockTime(ctx context.Context, k keeper.Keeper, blockTime time.Time) error

Types

type AppModule

type AppModule struct {
	AppModuleBasic
	// contains filtered or unexported fields
}

AppModule implements the AppModule interface that defines the inter-dependent methods that modules need to implement

func NewAppModule

func NewAppModule(
	cdc codec.Codec,
	keeper keeper.Keeper,
	accountKeeper types.AccountKeeper,
) AppModule

func (AppModule) BeginBlock

func (am AppModule) BeginBlock(ctx context.Context) error

BeginBlock returns the begin blocker for the mint module.

func (AppModule) ConsensusVersion

func (AppModule) ConsensusVersion() uint64

ConsensusVersion is a sequence number for state-breaking change of the module. It should be incremented on each consensus-breaking change introduced by the module. To avoid wrong/empty versions, the initial version should be set to 1

func (AppModule) ExportGenesis

func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage

ExportGenesis returns the exported genesis state as raw bytes for the mint module.

func (AppModule) InitGenesis

func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) []abci.ValidatorUpdate

InitGenesis performs the module's genesis initialization. It returns no validator updates.

func (AppModule) Name

func (AppModule) Name() string

Name returns the mint module's name.

func (AppModule) RegisterInvariants

func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry)

RegisterInvariants registers the invariants of the module. If an invariant deviates from its predicted value, the InvariantRegistry triggers appropriate logic (most often the chain will be halted)

func (AppModule) RegisterServices

func (am AppModule) RegisterServices(cfg module.Configurator)

RegisterServices registers a gRPC query service to respond to the module-specific gRPC queries

type AppModuleBasic

type AppModuleBasic struct {
	// contains filtered or unexported fields
}

AppModuleBasic implements the AppModuleBasic interface that defines the independent methods a Cosmos SDK module needs to implement.

func NewAppModuleBasic

func NewAppModuleBasic(cdc codec.BinaryCodec) AppModuleBasic

func (AppModuleBasic) DefaultGenesis

func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage

DefaultGenesis returns default genesis state as raw bytes for the mint module.

func (AppModuleBasic) IsAppModule

func (AppModuleBasic) IsAppModule()

IsAppModule implements the appmodule.AppModule interface.

func (AppModuleBasic) IsOnePerModuleType

func (AppModuleBasic) IsOnePerModuleType()

IsOnePerModuleType implements the depinject.OnePerModuleType interface.

func (AppModuleBasic) Name

func (AppModuleBasic) Name() string

Name returns the mint module's name.

func (AppModuleBasic) RegisterGRPCGatewayRoutes

func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux)

RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module

func (AppModuleBasic) RegisterInterfaces

func (b AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry)

RegisterInterfaces registers the module's interface types

func (AppModuleBasic) RegisterLegacyAminoCodec

func (AppModuleBasic) RegisterLegacyAminoCodec(_ *codec.LegacyAmino)

RegisterLegacyAminoCodec registers the mint module's types on the given LegacyAmino codec.

func (AppModuleBasic) ValidateGenesis

ValidateGenesis used to validate the GenesisState, given in its json.RawMessage form

type MintInputs

type MintInputs struct {
	depinject.In

	Cdc    codec.Codec
	Config *mintmodulev1.Module

	AccountKeeper types.AccountKeeper
	BankKeeper    types.BankKeeper

	StoreService store.KVStoreService
}

type MintOutputs

type MintOutputs struct {
	depinject.Out

	MintKeeper keeper.Keeper
	Module     appmodule.AppModule
}

func ProvideModule

func ProvideModule(in MintInputs) MintOutputs

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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