winners

package
v0.0.0-...-abb4387 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VerificationDataType

type VerificationDataType struct {
	Email string
	KYCId string
}

type Winner

type Winner struct {
	Address         string                         // Account Address
	Rewards         uint64                         // Total Reward of a winner
	ParticipantData participants.ParticipantRecord // If the information of this winner account if verified
	ValidatorInfo   validators.ValidatorInfo       // If the winner is a validator, the data will be set here
}

type WinnerChallenge

type WinnerChallenge struct {
	Challenge string
	Rewards   uint64
}

type WinnersList

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

func (*WinnersList) Append

func (w *WinnersList) Append(item Winner)

func (*WinnersList) AppendWithAggregateRewards

func (w *WinnersList) AppendWithAggregateRewards(item Winner)

func (WinnersList) FindByAddress

func (w WinnersList) FindByAddress(address string) int

Return result:

-1 : Not found
>-1: The item index

func (*WinnersList) GetItem

func (w *WinnersList) GetItem(index int) Winner

func (*WinnersList) GetItems

func (w *WinnersList) GetItems() []Winner

func (*WinnersList) GetVerifiedOnly

func (w *WinnersList) GetVerifiedOnly() WinnersList

func (WinnersList) Length

func (w WinnersList) Length() int

func (*WinnersList) Merge

func (w *WinnersList) Merge(newList WinnersList)

This function merges two lists of winners if a winner already exist, it is not added

func (*WinnersList) MergeWithAggregateRewards

func (w *WinnersList) MergeWithAggregateRewards(newList WinnersList)

This function merges two lists of winners and aggregates the rewards If a winner already exist, her/his rewards will be aggregated

func (WinnersList) Print

func (w WinnersList) Print()

func (WinnersList) Trim

func (w WinnersList) Trim(length int) WinnersList

This function cuts the end of a list

Jump to

Keyboard shortcuts

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