airdrop

package
v1.22.21 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2025 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AirdropClaim

type AirdropClaim struct {
	Address        common.Address `json:"address"`
	LuxAddress     ids.ShortID    `json:"luxAddress"`
	AmountClaimed  *big.Int       `json:"amountClaimed"`
	ClaimTime      time.Time      `json:"claimTime"`
	VestingEndTime time.Time      `json:"vestingEndTime"`
	TxID           ids.ID         `json:"txId"`
}

AirdropClaim represents a claim on the airdrop

type AirdropStats

type AirdropStats struct {
	TotalREQLHolders  uint64    `json:"totalREQLHolders"`
	TotalLUXAllocated *big.Int  `json:"totalLUXAllocated"`
	TotalClaims       uint64    `json:"totalClaims"`
	TotalLUXClaimed   *big.Int  `json:"totalLUXClaimed"`
	ConversionRatio   float64   `json:"conversionRatio"`
	ClaimPeriodEnds   time.Time `json:"claimPeriodEnds"`
}

AirdropStats contains statistics about the airdrop

type ClaimStatus

type ClaimStatus struct {
	Address       common.Address `json:"address"`
	Eligible      bool           `json:"eligible"`
	Claimed       bool           `json:"claimed"`
	Snapshot      *REQLSnapshot  `json:"snapshot,omitempty"`
	Claim         *AirdropClaim  `json:"claim,omitempty"`
	ClaimDeadline time.Time      `json:"claimDeadline,omitempty"`
}

ClaimStatus represents the airdrop claim status for an address

type Manager

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

Manager manages the REQL to LUX airdrop

func NewManager

func NewManager(
	config *config.AirdropConfig,
	tokenomics *config.TokenomicsConfig,
	db database.Database,
	ethClient *ethclient.Client,
	log log.Logger,
) (*Manager, error)

NewManager creates a new airdrop manager

func (*Manager) CheckEligibility

func (m *Manager) CheckEligibility(ethAddress common.Address) (*REQLSnapshot, error)

CheckEligibility checks if an address is eligible for the airdrop

func (*Manager) ClaimAirdrop

func (m *Manager) ClaimAirdrop(
	ctx context.Context,
	ethAddress common.Address,
	luxAddress ids.ShortID,
	signature []byte,
) (*AirdropClaim, error)

ClaimAirdrop processes an airdrop claim

func (*Manager) GetAirdropStats

func (m *Manager) GetAirdropStats() *AirdropStats

GetAirdropStats returns statistics about the airdrop

func (*Manager) GetClaimStatus

func (m *Manager) GetClaimStatus(ethAddress common.Address) (*ClaimStatus, error)

GetClaimStatus returns the claim status for an address

type REQLSnapshot

type REQLSnapshot struct {
	Address       common.Address `json:"address"`
	REQLBalance   *big.Int       `json:"reqlBalance"`
	LUXAllocation *big.Int       `json:"luxAllocation"`
	SnapshotBlock uint64         `json:"snapshotBlock"`
	SnapshotTime  time.Time      `json:"snapshotTime"`
}

REQLSnapshot represents a REQL holder's balance at snapshot time

Jump to

Keyboard shortcuts

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