referral

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package referral ...

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bonus added in v1.2.4

type Bonus struct {
	Count  int     `json:"count"`
	Reward sdk.Int `json:"reward"`
}

Bonus ...

type Config

type Config struct {
	ThresholdPDV       sdk.Dec       `json:"thresholdPDV"`
	ThresholdDays      int           `json:"thresholdDays"`
	ReceiverReward     sdk.Int       `json:"receiverReward"`
	SenderBonuses      []Bonus       `json:"senderBonus"`
	SenderRewardLevels []RewardLevel `json:"senderRewardLevels"`
}

Config ... swagger:model

func NewConfig added in v1.2.4

func NewConfig(thresholdPDV sdk.Dec, thresholdDays int) Config

NewConfig creates a new instance of Config.

func (Config) GetSenderBonus added in v1.2.4

func (c Config) GetSenderBonus(confirmedReferralsCount int) sdk.Int

GetSenderBonus returns a bonus reward.

func (Config) GetSenderReward added in v1.2.4

func (c Config) GetSenderReward(confirmedReferralsCount int) sdk.Int

GetSenderReward returns a sender reward.

type RewardLevel added in v1.2.4

type RewardLevel struct {
	From   int     `json:"from"`
	To     *int    `json:"to"`
	Reward sdk.Int `json:"reward"`
}

RewardLevel ...

type Rewarder

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

Rewarder ...

func NewRewarder

NewRewarder creates a new instance of Rewarder.

func (*Rewarder) Run

func (r *Rewarder) Run(ctx context.Context, interval time.Duration)

Run runs the rewarder check referral status loop.

Jump to

Keyboard shortcuts

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