Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

proxy.gno

2.02 Kb · 66 lines
 1package launchpad
 2
 3// CreateProject creates a new launchpad project with tiered allocations.
 4func CreateProject(
 5	cur realm,
 6	name string,
 7	tokenPath string,
 8	recipient address,
 9	depositAmount int64,
10	conditionTokens string,
11	conditionAmounts string,
12	tier30Ratio int64,
13	tier90Ratio int64,
14	tier180Ratio int64,
15	startTime int64,
16) string {
17	return getImplementation().CreateProject(
18		0,
19		cur,
20		name,
21		tokenPath,
22		recipient,
23		depositAmount,
24		conditionTokens,
25		conditionAmounts,
26		tier30Ratio,
27		tier90Ratio,
28		tier180Ratio,
29		startTime,
30	)
31}
32
33// CollectProtocolFee collects accumulated protocol fees from launchpad operations.
34func CollectProtocolFee(cur realm) {
35	getImplementation().CollectProtocolFee(0, cur)
36}
37
38// CollectEmissionReward collects accumulated launchpad emission rewards.
39func CollectEmissionReward(cur realm) {
40	getImplementation().CollectEmissionReward(0, cur)
41}
42
43// CollectProtocolFeeReward collects accumulated launchpad protocol fee rewards for the provided token path.
44func CollectProtocolFeeReward(cur realm, tokenPath string) {
45	getImplementation().CollectProtocolFeeReward(0, cur, tokenPath)
46}
47
48// TransferLeftFromProjectByAdmin transfers the remaining rewards of a project to a specified recipient.
49func TransferLeftFromProjectByAdmin(cur realm, projectID string, recipient address) int64 {
50	return getImplementation().TransferLeftFromProjectByAdmin(0, cur, projectID, recipient)
51}
52
53// DepositGns deposits GNS tokens to a launchpad project tier.
54func DepositGns(cur realm, targetProjectTierID string, depositAmount int64, referrer string) string {
55	return getImplementation().DepositGns(0, cur, targetProjectTierID, depositAmount, referrer)
56}
57
58// CollectDepositGns collects rewards from a deposit.
59func CollectDepositGns(cur realm, depositID string) (int64, error) {
60	return getImplementation().CollectDepositGns(0, cur, depositID)
61}
62
63// CollectRewardByDepositId collects rewards from a deposit.
64func CollectRewardByDepositId(cur realm, depositID string) int64 {
65	return getImplementation().CollectRewardByDepositId(0, cur, depositID)
66}