rewards

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

View Source
const ModuleName = "rewards"

ModuleName is the rewards module name.

Variables

View Source
var RewardPoolAddress = types.NewAddressForModule(ModuleName, []byte("reward-pool"))

RewardPoolAddress is the address of the reward pool.

Functions

This section is empty.

Types

type Parameters

type Parameters struct {
	Schedule RewardSchedule `json:"schedule"`

	ParticipationThresholdNumerator   uint64 `json:"participation_threshold_numerator"`
	ParticipationThresholdDenominator uint64 `json:"participation_threshold_denominator"`
}

Parameters are the parameters for the rewards module.

type RewardSchedule

type RewardSchedule struct {
	Steps []RewardStep `json:"steps"`
}

RewardSchedule is a reward schedule.

type RewardStep

type RewardStep struct {
	Until  beacon.EpochTime `json:"until"`
	Amount types.BaseUnits  `json:"amount"`
}

RewardStep is one of the time periods in the reward schedule.

type V1

type V1 interface {
	// Parameters queries the rewards module parameters.
	Parameters(ctx context.Context, round uint64) (*Parameters, error)
}

V1 is the v1 rewards module interface.

func NewV1

func NewV1(rc client.RuntimeClient) V1

NewV1 generates a V1 client helper for the rewards module.

Jump to

Keyboard shortcuts

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