Search Apps Documentation Source Content File Folder Download Copy Actions Download

deposit.gno

0.60 Kb ยท 34 lines
 1package v1
 2
 3import "gno.land/r/gnoswap/launchpad"
 4
 5func withdrawDeposit(d *launchpad.Deposit, currentHeight, currentTime int64) int64 {
 6	d.SetWithdrawn(currentHeight, currentTime)
 7
 8	previousDepositAmount := d.DepositAmount()
 9	d.SetDepositAmount(0)
10
11	return previousDepositAmount
12}
13
14func newDeposit(
15	depositID string,
16	projectID string,
17	tier int64,
18	depositor address,
19	depositAmount int64,
20	createdHeight int64,
21	createdTime int64,
22	endTime int64,
23) *launchpad.Deposit {
24	return launchpad.NewDeposit(
25		depositID,
26		projectID,
27		tier,
28		depositor,
29		depositAmount,
30		createdHeight,
31		createdTime,
32		endTime,
33	)
34}