launchpad_project_deposits.gno
0.81 Kb ยท 29 lines
1package staker
2
3import (
4 "gno.land/p/nt/avl"
5)
6
7// LaunchpadProjectDeposits manages deposit amounts for launchpad projects.
8// It tracks the total staked amount for each project identified by owner address.
9type LaunchpadProjectDeposits struct {
10 // deposits maps owner address to deposit amount
11 deposits *avl.Tree // string -> int64
12}
13
14// NewLaunchpadProjectDeposits creates a new instance of LaunchpadProjectDeposits.
15func NewLaunchpadProjectDeposits() *LaunchpadProjectDeposits {
16 return &LaunchpadProjectDeposits{
17 deposits: avl.NewTree(),
18 }
19}
20
21// GetDeposits returns the entire deposits tree.
22func (lpd *LaunchpadProjectDeposits) GetDeposits() *avl.Tree {
23 return lpd.deposits
24}
25
26// SetDeposits sets the entire deposits tree.
27func (lpd *LaunchpadProjectDeposits) SetDeposits(deposits *avl.Tree) {
28 lpd.deposits = deposits
29}