Kind Realm (renderable)
Name launchpad
Namespace gnoswap
Exported functions 71
Module gno.land/r/gnoswap/launchpad
gno 0.9 types.gno gno
⧉
1 package launchpad 2 3 import ( 4 "gno.land/p/gnoswap/uint256/v1" 5 rotree "gno.land/p/nt/bptree/rotree/v0" 6 bptree "gno.land/p/nt/bptree/v0" 7 ) 8 CollectDepositGns (cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, depositID string) (int64, interface {Error func() string})
CollectEmissionReward (cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string})
CollectProtocolFee (cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string})
CollectProtocolFeeReward (cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, tokenPath string)
CollectRewardByDepositId (cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, depositID string) int64
CreateProject (cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, name string, tokenPath string, recipient string, depositAmount int64, conditionTokens string, conditionAmounts string, tier30Ratio int64, tier90Ratio int64, tier180Ratio int64, startTime int64) string
DefaultDeposit () struct{depositor .uverse.address; id string; projectID string; tier int64; depositAmount int64; withdrawnHeight int64; withdrawnTime int64; createdHeight int64; createdAt int64; endTime int64}
DepositGns (cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, targetProjectTierID string, depositAmount int64, referrer string) string
GetCurrentDepositId () int64
GetDeposit (depositId string) (struct{depositor .uverse.address; id string; projectID string; tier int64; depositAmount int64; withdrawnHeight int64; withdrawnTime int64; createdHeight int64; createdAt int64; endTime int64}, interface {Error func() string})
GetDepositAmount (depositId string) (int64, interface {Error func() string})
GetDepositCount () int
GetDepositCreatedAt (depositId string) (int64, interface {Error func() string})
GetDepositCreatedHeight (depositId string) (int64, interface {Error func() string})
GetDepositEndTime (depositId string) (int64, interface {Error func() string})
GetDepositProjectID (depositId string) (string, interface {Error func() string})
GetDepositProjectTierID (depositId string) (string, interface {Error func() string})
GetDepositTier (depositId string) (int64, interface {Error func() string})
GetDepositWithdrawnHeight (depositId string) (int64, interface {Error func() string})
GetDepositWithdrawnTime (depositId string) (int64, interface {Error func() string})
GetImplementationPackagePath () string
GetProjectActiveStatus (projectId string) (bool, interface {Error func() string})
GetProjectCondition (projectId string, tokenPath string) (*gno.land/r/gnoswap/launchpad.ProjectCondition, interface {Error func() string})
GetProjectCreatedAt (projectId string) (int64, interface {Error func() string})
GetProjectCreatedHeight (projectId string) (int64, interface {Error func() string})
GetProjectDepositAmount (projectId string) (int64, interface {Error func() string})
GetProjectName (projectId string) (string, interface {Error func() string})
GetProjectRecipient (projectId string) (string, interface {Error func() string})
GetProjects () *gno.land/p/nt/bptree/rotree/v0.ReadOnlyTree
GetProjectTier (projectId string, tier int64) (*gno.land/r/gnoswap/launchpad.ProjectTier, interface {Error func() string})
GetProjectTierDistributeAmountPerSecondX128 (projectId string, tier int64) (*gno.land/p/gnoswap/uint256/v1.Uint, interface {Error func() string})
GetProjectTierEndTime (projectId string, tier int64) (int64, interface {Error func() string})
GetProjectTierRewardAccumulatedDistributeAmount (projectTierId string) (int64, interface {Error func() string})
GetProjectTierRewardAccumulatedRewardPerDepositX128 (projectTierId string) (*gno.land/p/gnoswap/uint256/v1.Uint, interface {Error func() string})
GetProjectTierRewardAccumulatedTime (projectTierId string) (int64, interface {Error func() string})
GetProjectTierRewardClaimableDuration (projectTierId string) (int64, interface {Error func() string})
GetProjectTierRewardDistributeAmountPerSecondX128 (projectTierId string) (*gno.land/p/gnoswap/uint256/v1.Uint, interface {Error func() string})
GetProjectTierRewardDistributeEndTime (projectTierId string) (int64, interface {Error func() string})
GetProjectTierRewardDistributeStartTime (projectTierId string) (int64, interface {Error func() string})
GetProjectTierRewardManager (projectTierId string) (*gno.land/r/gnoswap/launchpad.RewardManager, interface {Error func() string})
GetProjectTierRewardManagerCount () int
GetProjectTierRewards (projectId string, tier int64) *gno.land/p/nt/bptree/rotree/v0.ReadOnlyTree
GetProjectTierRewardTotalClaimedAmount (projectTierId string) (int64, interface {Error func() string})
GetProjectTierRewardTotalDistributeAmount (projectTierId string) (int64, interface {Error func() string})
GetProjectTiersRatios (projectId string) (map[int64]int64, interface {Error func() string})
GetProjectTierStartTime (projectId string, tier int64) (int64, interface {Error func() string})
GetProjectTierTotalCollectedAmount (projectId string, tier int64) (int64, interface {Error func() string})
GetProjectTierTotalDepositAmount (projectId string, tier int64) (int64, interface {Error func() string})
GetProjectTierTotalDepositCount (projectId string, tier int64) (int64, interface {Error func() string})
GetProjectTierTotalDistributeAmount (projectId string, tier int64) (int64, interface {Error func() string})
GetProjectTierTotalWithdrawAmount (projectId string, tier int64) (int64, interface {Error func() string})
GetProjectTierTotalWithdrawCount (projectId string, tier int64) (int64, interface {Error func() string})
GetProjectTokenPath (projectId string) (string, interface {Error func() string})
GetRewardState (projectTierId string, depositId string) (*gno.land/r/gnoswap/launchpad.RewardState, interface {Error func() string})
GetTotalGNSStakedAmount () int64
MakeDeposit (depositID string, projectID string, tier int64, depositor string, depositAmount int64, createdHeight int64, createdTime int64, endTime int64) struct{depositor .uverse.address; id string; projectID string; tier int64; depositAmount int64; withdrawnHeight int64; withdrawnTime int64; createdHeight int64; createdAt int64; endTime int64}
MakeProjectID (tokenPath string, createdHeight int64) string
MakeProjectTierID (projectID string, duration int64) string
NewBPTreeN (fanout int) *gno.land/p/nt/bptree/v0.BPTree
NewCounter () *gno.land/r/gnoswap/launchpad.Counter
NewLaunchpadStore (kvStore interface {AddAuthorizedCaller func(int, .uverse.realm, .uverse.address, gno.land/p/gnoswap/store/v1.Permission) .uverse.error; Delete func(int, .uverse.realm, string) .uverse.error; Get func(string) (interface {}, .uverse.error); GetAddress func(string) (.uverse.address, .uverse.error); GetAllKeys func() ([]string, .uverse.error); GetAuthorizedCallers func() (map[.uverse.address]gno.land/p/gnoswap/store/v1.Permission, .uverse.error); GetBPTree func(string) (*gno.land/p/nt/bptree/v0.BPTree, .uverse.error); GetBool func(string) (bool, .uverse.error); GetDomainAddress func() .uverse.address; GetInt64 func(string) (int64, .uverse.error); GetString func(string) (string, .uverse.error); GetUint64 func(string) (uint64, .uverse.error); Has func(string) bool; IsWriteAuthorized func(.uverse.address) bool; RemoveAuthorizedCaller func(int, .uverse.realm, .uverse.address) .uverse.error; Set func(int, .uverse.realm, string, interface {}) .uverse.error; UpdateAuthorizedCaller func(int, .uverse.realm, .uverse.address, gno.land/p/gnoswap/store/v1.Permission) .uverse.error}) interface {GetDepositCounter func() *gno.land/r/gnoswap/launchpad.Counter; GetDeposits func() *gno.land/p/nt/bptree/v0.BPTree; GetProjectRecipients func() *gno.land/p/nt/bptree/v0.BPTree; GetProjectTierRewardManagers func() *gno.land/p/nt/bptree/v0.BPTree; GetProjects func() *gno.land/p/nt/bptree/v0.BPTree; GetTotalGNSStakedAmount func() int64; HasDepositCounterStoreKey func() bool; HasDepositsKey func() bool; HasProjectRecipientsKey func() bool; HasProjectTierRewardManagersKey func() bool; HasProjectsKey func() bool; HasTotalGNSStakedAmountKey func() bool; NextDepositID func() string; SetDepositCounter func(int, .uverse.realm, *gno.land/r/gnoswap/launchpad.Counter) .uverse.error; SetDeposits func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetProjectRecipients func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetProjectTierRewardManagers func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetProjects func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetTotalGNSStakedAmount func(int, .uverse.realm, int64) .uverse.error}
NewProject (name string, tokenPath string, depositAmount int64, recipient string, createdHeight int64, createdAt int64) *gno.land/r/gnoswap/launchpad.Project
NewProjectCondition (tokenPath string, minimumAmount int64) *gno.land/r/gnoswap/launchpad.ProjectCondition
NewProjectConditionsWithError (conditionTokens string, conditionAmounts string) ([]*gno.land/r/gnoswap/launchpad.ProjectCondition, interface {Error func() string})
NewProjectTier (projectID string, tierDuration int64, totalDistributeAmount int64, startTime int64, endTime int64) *gno.land/r/gnoswap/launchpad.ProjectTier
NewRewardManager (totalDistributeAmount int64, distributeStartTime int64, distributeEndTime int64, rewardCollectableDuration int64) *gno.land/r/gnoswap/launchpad.RewardManager
NewRewardState (accumulatedRewardPerDepositX128 *gno.land/p/gnoswap/uint256/v1.Uint, depositAmount int64, distributeStartTime int64, distributeEndTime int64, claimableTime int64) *gno.land/r/gnoswap/launchpad.RewardState
RegisterInitializer (cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, initializer func(int, .uverse.realm, gno.land/r/gnoswap/launchpad.ILaunchpadStore) gno.land/r/gnoswap/launchpad.ILaunchpad)
Render (path string) string
TransferLeftFromProjectByAdmin (cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, projectID string, recipient string) int64
UpgradeImpl (cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, packagePath string)
Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.
9 type ILaunchpad interface {
10 ILaunchpadProject
11 ILaunchpadDeposit
12 ILaunchpadGetter
13 Render(path string ) string
14 }
15
16 type ILaunchpadProject interface {
17 // CreateProject creates a project and its reward tiers in the current launchpad realm.
18 //
19 // Parameters:
20 // - _: Noncrossing implementation-call discriminator; pass 0.
21 // - rlm: Current realm context forwarded unchanged by the launchpad proxy.
22 // - name: human-readable project name.
23 // - tokenPath: token path whose tokens are distributed as project rewards.
24 // - recipient: address authorized to receive project rewards and project proceeds.
25 // - depositAmount: total reward-token amount allocated to the project.
26 // - conditionTokens: optional `*PAD*`-separated token paths required for deposits.
27 // - conditionAmounts: optional `*PAD*`-separated required amounts matching conditionTokens.
28 // - tier30Ratio: reward allocation ratio for the 30-day tier.
29 // - tier90Ratio: reward allocation ratio for the 90-day tier.
30 // - tier180Ratio: reward allocation ratio for the 180-day tier.
31 // - startTime: Unix timestamp at which project reward distribution starts.
32 //
33 // Returns:
34 // - projectID: identifier assigned to the newly created project.
35 CreateProject(
36 _ int ,
37 rlm realm,
38 name string ,
39 tokenPath string ,
40 recipient address,
41 depositAmount int64 ,
42 conditionTokens string ,
43 conditionAmounts string ,
44 tier30Ratio int64 ,
45 tier90Ratio int64 ,
46 tier180Ratio int64 ,
47 startTime int64 ,
48 ) string
49 // TransferLeftFromProjectByAdmin transfers unreserved reward tokens from an ended project.
50 //
51 // Parameters:
52 // - _: Noncrossing implementation-call discriminator; pass 0.
53 // - rlm: Current realm context forwarded unchanged by the launchpad proxy.
54 // - projectID: identifier of the ended project whose remaining balance is transferred.
55 // - recipient: destination address for the transferable balance.
56 //
57 // Returns:
58 // - amount: number of reward tokens transferred after active claims are reserved.
59 TransferLeftFromProjectByAdmin(_ int , rlm realm, projectID string , recipient address) int64
60 // CollectProtocolFee collects protocol-fee rewards allocated to the project recipient.
61 //
62 // Parameters:
63 // - _: Noncrossing implementation-call discriminator; pass 0.
64 // - rlm: Current realm context forwarded unchanged by the launchpad proxy.
65 CollectProtocolFee(_ int , rlm realm)
66 // CollectEmissionReward collects accumulated launchpad emission rewards.
67 //
68 // Parameters:
69 // - _: Noncrossing implementation-call discriminator; pass 0.
70 // - rlm: Current realm context forwarded unchanged by the launchpad proxy.
71 CollectEmissionReward(_ int , rlm realm)
72 // CollectProtocolFeeReward collects accumulated protocol-fee rewards for one token path.
73 //
74 // Parameters:
75 // - _: Noncrossing implementation-call discriminator; pass 0.
76 // - rlm: Current realm context forwarded unchanged by the launchpad proxy.
77 // - tokenPath: token path whose accumulated protocol-fee reward is collected.
78 CollectProtocolFeeReward(_ int , rlm realm, tokenPath string )
79 }
80
81 type ILaunchpadDeposit interface {
82 // DepositGns creates a GNS deposit in the selected project tier.
83 //
84 // Parameters:
85 // - _: Noncrossing implementation-call discriminator; pass 0.
86 // - rlm: Current realm context forwarded unchanged by the launchpad proxy.
87 // - targetProjectTierID: project-tier identifier in `{projectID}:{tierDuration}` form.
88 // - depositAmount: amount of GNS to stake in the selected tier.
89 // - referrer: optional referral address associated with the deposit.
90 //
91 // Returns:
92 // - depositID: identifier assigned to the newly created deposit.
93 DepositGns(_ int , rlm realm, targetProjectTierID string , depositAmount int64 , referrer string ) string
94 // CollectDepositGns withdraws a deposit's staked GNS after its tier permits withdrawal.
95 //
96 // Parameters:
97 // - _: Noncrossing implementation-call discriminator; pass 0.
98 // - rlm: Current realm context forwarded unchanged by the launchpad proxy.
99 // - depositID: identifier of the deposit whose GNS is collected.
100 //
101 // Returns:
102 // - amount: GNS amount withdrawn from the deposit.
103 // - err: non-nil when the deposit cannot be collected.
104 CollectDepositGns(_ int , rlm realm, depositID string ) ( int64 , error )
105 // CollectRewardByDepositId collects the project-token reward earned by a deposit.
106 //
107 // Parameters:
108 // - _: Noncrossing implementation-call discriminator; pass 0.
109 // - rlm: Current realm context forwarded unchanged by the launchpad proxy.
110 // - depositID: identifier of the deposit whose reward is collected.
111 //
112 // Returns:
113 // - amount: project-token reward amount transferred to the depositor.
114 CollectRewardByDepositId(_ int , rlm realm, depositID string ) int64
115 }
116
117 type ILaunchpadGetter interface {
118 // GetProjects returns a read-only tree containing projects keyed by project ID.
119 //
120 // Returns:
121 // - projects: read-only project tree for iteration without mutating stored state.
122 GetProjects() *rotree.ReadOnlyTree
123 // GetProjectName returns the human-readable name of a project.
124 //
125 // Parameters:
126 // - projectId: identifier of the project to inspect.
127 //
128 // Returns:
129 // - name: stored project name, or an empty string when lookup fails.
130 // - err: non-nil when projectId does not identify a stored project.
131 GetProjectName(projectId string ) ( string , error )
132 // GetProjectTokenPath returns the reward-token path configured for a project.
133 //
134 // Parameters:
135 // - projectId: identifier of the project to inspect.
136 //
137 // Returns:
138 // - tokenPath: configured project reward-token path, or an empty string on lookup failure.
139 // - err: non-nil when projectId does not identify a stored project.
140 GetProjectTokenPath(projectId string ) ( string , error )
141 // GetProjectDepositAmount returns the total reward-token allocation configured for a project.
142 //
143 // Parameters:
144 // - projectId: identifier of the project to inspect.
145 //
146 // Returns:
147 // - amount: configured project reward-token amount, or zero on lookup failure.
148 // - err: non-nil when projectId does not identify a stored project.
149 GetProjectDepositAmount(projectId string ) ( int64 , error )
150 // GetProjectRecipient returns the address configured to receive a project's rewards.
151 //
152 // Parameters:
153 // - projectId: identifier of the project to inspect.
154 //
155 // Returns:
156 // - recipient: configured project recipient address, or the zero address on lookup failure.
157 // - err: non-nil when projectId does not identify a stored project.
158 GetProjectRecipient(projectId string ) (address, error )
159 // GetProjectCondition returns the deposit condition for one token path in a project.
160 //
161 // Parameters:
162 // - projectId: identifier of the project to inspect.
163 // - tokenPath: token path whose required balance condition is requested.
164 //
165 // Returns:
166 // - condition: configured token condition, or nil when lookup fails.
167 // - err: non-nil when the project or token condition is not found.
168 GetProjectCondition(projectId string , tokenPath string ) (*ProjectCondition, error )
169 // GetProjectTiersRatios returns reward allocation ratios keyed by tier duration.
170 //
171 // Parameters:
172 // - projectId: identifier of the project to inspect.
173 //
174 // Returns:
175 // - ratios: map from tier duration to its reward allocation ratio.
176 // - err: non-nil when projectId does not identify a stored project.
177 GetProjectTiersRatios(projectId string ) ( map [ int64 ] int64 , error )
178 // GetProjectCreatedHeight returns the block height at which a project was created.
179 //
180 // Parameters:
181 // - projectId: identifier of the project to inspect.
182 //
183 // Returns:
184 // - height: creation block height, or zero on lookup failure.
185 // - err: non-nil when projectId does not identify a stored project.
186 GetProjectCreatedHeight(projectId string ) ( int64 , error )
187 // GetProjectCreatedAt returns the Unix timestamp at which a project was created.
188 //
189 // Parameters:
190 // - projectId: identifier of the project to inspect.
191 //
192 // Returns:
193 // - time: creation Unix timestamp, or zero on lookup failure.
194 // - err: non-nil when projectId does not identify a stored project.
195 GetProjectCreatedAt(projectId string ) ( int64 , error )
196
197 // GetProjectTier returns one tier of a project by its duration.
198 //
199 // Parameters:
200 // - projectId: identifier of the project to inspect.
201 // - tier: tier duration in seconds.
202 //
203 // Returns:
204 // - projectTier: requested tier, or nil when lookup fails.
205 // - err: non-nil when the project or requested tier is not found.
206 GetProjectTier(projectId string , tier int64 ) (*ProjectTier, error )
207 // GetProjectTierDistributeAmountPerSecondX128 returns a tier's Q128-scaled reward rate.
208 //
209 // Parameters:
210 // - projectId: identifier of the project to inspect.
211 // - tier: tier duration in seconds.
212 //
213 // Returns:
214 // - amountPerSecondX128: reward tokens per second scaled by 2^128.
215 // - err: non-nil when the project or requested tier is not found.
216 GetProjectTierDistributeAmountPerSecondX128(projectId string , tier int64 ) (*uint256.Uint, error )
217 // GetProjectTierTotalDistributeAmount returns the total reward allocation for a tier.
218 //
219 // Parameters:
220 // - projectId: identifier of the project to inspect.
221 // - tier: tier duration in seconds.
222 //
223 // Returns:
224 // - amount: total reward-token amount allocated to the tier.
225 // - err: non-nil when the project or requested tier is not found.
226 GetProjectTierTotalDistributeAmount(projectId string , tier int64 ) ( int64 , error )
227 // GetProjectTierTotalDepositAmount returns the cumulative GNS deposited into a tier.
228 //
229 // Parameters:
230 // - projectId: identifier of the project to inspect.
231 // - tier: tier duration in seconds.
232 //
233 // Returns:
234 // - amount: cumulative GNS amount deposited into the tier.
235 // - err: non-nil when the project or requested tier is not found.
236 GetProjectTierTotalDepositAmount(projectId string , tier int64 ) ( int64 , error )
237 // GetProjectTierTotalWithdrawAmount returns the cumulative GNS withdrawn from a tier.
238 //
239 // Parameters:
240 // - projectId: identifier of the project to inspect.
241 // - tier: tier duration in seconds.
242 //
243 // Returns:
244 // - amount: cumulative GNS amount withdrawn from the tier.
245 // - err: non-nil when the project or requested tier is not found.
246 GetProjectTierTotalWithdrawAmount(projectId string , tier int64 ) ( int64 , error )
247 // GetProjectTierTotalDepositCount returns the cumulative number of tier deposits.
248 //
249 // Parameters:
250 // - projectId: identifier of the project to inspect.
251 // - tier: tier duration in seconds.
252 //
253 // Returns:
254 // - count: cumulative number of deposits recorded for the tier.
255 // - err: non-nil when the project or requested tier is not found.
256 GetProjectTierTotalDepositCount(projectId string , tier int64 ) ( int64 , error )
257 // GetProjectTierTotalWithdrawCount returns the cumulative number of tier withdrawals.
258 //
259 // Parameters:
260 // - projectId: identifier of the project to inspect.
261 // - tier: tier duration in seconds.
262 //
263 // Returns:
264 // - count: cumulative number of withdrawals recorded for the tier.
265 // - err: non-nil when the project or requested tier is not found.
266 GetProjectTierTotalWithdrawCount(projectId string , tier int64 ) ( int64 , error )
267 // GetProjectTierTotalCollectedAmount returns the cumulative reward amount collected from a tier.
268 //
269 // Parameters:
270 // - projectId: identifier of the project to inspect.
271 // - tier: tier duration in seconds.
272 //
273 // Returns:
274 // - amount: cumulative project-token reward amount collected from the tier.
275 // - err: non-nil when the project or requested tier is not found.
276 GetProjectTierTotalCollectedAmount(projectId string , tier int64 ) ( int64 , error )
277 // GetProjectTierStartTime returns the Unix timestamp when a tier starts distributing rewards.
278 //
279 // Parameters:
280 // - projectId: identifier of the project to inspect.
281 // - tier: tier duration in seconds.
282 //
283 // Returns:
284 // - time: tier distribution start Unix timestamp.
285 // - err: non-nil when the project or requested tier is not found.
286 GetProjectTierStartTime(projectId string , tier int64 ) ( int64 , error )
287 // GetProjectTierEndTime returns the Unix timestamp when a tier stops distributing rewards.
288 //
289 // Parameters:
290 // - projectId: identifier of the project to inspect.
291 // - tier: tier duration in seconds.
292 //
293 // Returns:
294 // - time: tier distribution end Unix timestamp.
295 // - err: non-nil when the project or requested tier is not found.
296 GetProjectTierEndTime(projectId string , tier int64 ) ( int64 , error )
297
298 // GetDepositCount returns the number of deposits currently stored.
299 //
300 // Returns:
301 // - count: number of stored deposits.
302 GetDepositCount() int
303 // GetCurrentDepositId returns the latest allocated deposit identifier.
304 //
305 // Returns:
306 // - depositID: latest numeric deposit identifier.
307 GetCurrentDepositId() int64
308 // GetProjectTierRewards returns a read-only reward-state tree for a project tier.
309 //
310 // Parameters:
311 // - projectId: identifier of the project to inspect.
312 // - tier: tier duration in seconds.
313 //
314 // Returns:
315 // - rewards: read-only tree of reward states keyed by deposit ID.
316 GetProjectTierRewards(projectId string , tier int64 ) *rotree.ReadOnlyTree
317
318 // GetDeposit returns the stored deposit identified by depositId.
319 //
320 // Parameters:
321 // - depositId: identifier of the deposit to inspect.
322 //
323 // Returns:
324 // - deposit: stored deposit, or its zero value when lookup fails.
325 // - err: non-nil when depositId does not identify a stored deposit.
326 GetDeposit(depositId string ) (Deposit, error )
327 // GetDepositProjectID returns the project identifier associated with a deposit.
328 //
329 // Parameters:
330 // - depositId: identifier of the deposit to inspect.
331 //
332 // Returns:
333 // - projectID: project identifier recorded in the deposit.
334 // - err: non-nil when depositId does not identify a stored deposit.
335 GetDepositProjectID(depositId string ) ( string , error )
336 // GetDepositTier returns the tier duration recorded in a deposit.
337 //
338 // Parameters:
339 // - depositId: identifier of the deposit to inspect.
340 //
341 // Returns:
342 // - tier: deposit tier duration in seconds.
343 // - err: non-nil when depositId does not identify a stored deposit.
344 GetDepositTier(depositId string ) ( int64 , error )
345 // GetDepositProjectTierID returns the combined project-tier identifier for a deposit.
346 //
347 // Parameters:
348 // - depositId: identifier of the deposit to inspect.
349 //
350 // Returns:
351 // - projectTierID: identifier in `{projectID}:{tierDuration}` form.
352 // - err: non-nil when depositId does not identify a stored deposit.
353 GetDepositProjectTierID(depositId string ) ( string , error )
354 // GetDepositAmount returns the currently staked GNS amount in a deposit.
355 //
356 // Parameters:
357 // - depositId: identifier of the deposit to inspect.
358 //
359 // Returns:
360 // - amount: current GNS amount held by the deposit.
361 // - err: non-nil when depositId does not identify a stored deposit.
362 GetDepositAmount(depositId string ) ( int64 , error )
363 // GetDepositWithdrawnHeight returns the block height at which a deposit was withdrawn.
364 //
365 // Parameters:
366 // - depositId: identifier of the deposit to inspect.
367 //
368 // Returns:
369 // - height: withdrawal block height, or the stored zero value if not withdrawn.
370 // - err: non-nil when depositId does not identify a stored deposit.
371 GetDepositWithdrawnHeight(depositId string ) ( int64 , error )
372 // GetDepositWithdrawnTime returns the Unix timestamp at which a deposit was withdrawn.
373 //
374 // Parameters:
375 // - depositId: identifier of the deposit to inspect.
376 //
377 // Returns:
378 // - time: withdrawal Unix timestamp, or the stored zero value if not withdrawn.
379 // - err: non-nil when depositId does not identify a stored deposit.
380 GetDepositWithdrawnTime(depositId string ) ( int64 , error )
381 // GetDepositCreatedHeight returns the block height at which a deposit was created.
382 //
383 // Parameters:
384 // - depositId: identifier of the deposit to inspect.
385 //
386 // Returns:
387 // - height: deposit creation block height.
388 // - err: non-nil when depositId does not identify a stored deposit.
389 GetDepositCreatedHeight(depositId string ) ( int64 , error )
390 // GetDepositCreatedAt returns the Unix timestamp at which a deposit was created.
391 //
392 // Parameters:
393 // - depositId: identifier of the deposit to inspect.
394 //
395 // Returns:
396 // - time: deposit creation Unix timestamp.
397 // - err: non-nil when depositId does not identify a stored deposit.
398 GetDepositCreatedAt(depositId string ) ( int64 , error )
399 // GetDepositEndTime returns the Unix timestamp when a deposit's tier ends.
400 //
401 // Parameters:
402 // - depositId: identifier of the deposit to inspect.
403 //
404 // Returns:
405 // - time: deposit tier end Unix timestamp.
406 // - err: non-nil when depositId does not identify a stored deposit.
407 GetDepositEndTime(depositId string ) ( int64 , error )
408 // GetTotalGNSStakedAmount returns the current GNS amount staked across all deposits.
409 //
410 // Returns:
411 // - amount: aggregate currently staked GNS amount.
412 GetTotalGNSStakedAmount() int64
413
414 // GetProjectTierRewardManagerCount returns the number of stored tier reward managers.
415 //
416 // Returns:
417 // - count: number of project-tier reward managers.
418 GetProjectTierRewardManagerCount() int
419 // GetProjectTierRewardManager returns the reward manager for a project tier.
420 //
421 // Parameters:
422 // - projectTierId: identifier of the project tier.
423 //
424 // Returns:
425 // - manager: reward manager for the project tier, or nil on lookup failure.
426 // - err: non-nil when projectTierId does not identify a stored manager.
427 GetProjectTierRewardManager(projectTierId string ) (*RewardManager, error )
428 // GetProjectTierRewardDistributeAmountPerSecondX128 returns a tier manager's Q128 reward rate.
429 //
430 // Parameters:
431 // - projectTierId: identifier of the project tier.
432 //
433 // Returns:
434 // - amountPerSecondX128: reward tokens per second scaled by 2^128.
435 // - err: non-nil when projectTierId does not identify a stored manager.
436 GetProjectTierRewardDistributeAmountPerSecondX128(projectTierId string ) (*uint256.Uint, error )
437 // GetProjectTierRewardAccumulatedRewardPerDepositX128 returns accumulated Q128 reward per deposit.
438 //
439 // Parameters:
440 // - projectTierId: identifier of the project tier.
441 //
442 // Returns:
443 // - accumulatedX128: accumulated reward-per-deposit value scaled by 2^128.
444 // - err: non-nil when projectTierId does not identify a stored manager.
445 GetProjectTierRewardAccumulatedRewardPerDepositX128(projectTierId string ) (*uint256.Uint, error )
446 // GetProjectTierRewardTotalDistributeAmount returns total reward tokens allocated to a tier.
447 //
448 // Parameters:
449 // - projectTierId: identifier of the project tier.
450 //
451 // Returns:
452 // - amount: total reward-token allocation.
453 // - err: non-nil when projectTierId does not identify a stored manager.
454 GetProjectTierRewardTotalDistributeAmount(projectTierId string ) ( int64 , error )
455 // GetProjectTierRewardTotalClaimedAmount returns total reward tokens claimed from a tier.
456 //
457 // Parameters:
458 // - projectTierId: identifier of the project tier.
459 //
460 // Returns:
461 // - amount: cumulative claimed reward-token amount.
462 // - err: non-nil when projectTierId does not identify a stored manager.
463 GetProjectTierRewardTotalClaimedAmount(projectTierId string ) ( int64 , error )
464 // GetProjectTierRewardDistributeStartTime returns a tier manager's distribution start time.
465 //
466 // Parameters:
467 // - projectTierId: identifier of the project tier.
468 //
469 // Returns:
470 // - time: distribution start Unix timestamp.
471 // - err: non-nil when projectTierId does not identify a stored manager.
472 GetProjectTierRewardDistributeStartTime(projectTierId string ) ( int64 , error )
473 // GetProjectTierRewardDistributeEndTime returns a tier manager's distribution end time.
474 //
475 // Parameters:
476 // - projectTierId: identifier of the project tier.
477 //
478 // Returns:
479 // - time: distribution end Unix timestamp.
480 // - err: non-nil when projectTierId does not identify a stored manager.
481 GetProjectTierRewardDistributeEndTime(projectTierId string ) ( int64 , error )
482 // GetProjectTierRewardAccumulatedDistributeAmount returns the accumulated distributed reward amount.
483 //
484 // Parameters:
485 // - projectTierId: identifier of the project tier.
486 //
487 // Returns:
488 // - amount: accumulated reward-token amount accounted for distribution.
489 // - err: non-nil when projectTierId does not identify a stored manager.
490 GetProjectTierRewardAccumulatedDistributeAmount(projectTierId string ) ( int64 , error )
491 // GetProjectTierRewardAccumulatedTime returns the timestamp through which rewards are accumulated.
492 //
493 // Parameters:
494 // - projectTierId: identifier of the project tier.
495 //
496 // Returns:
497 // - time: accumulated Unix timestamp.
498 // - err: non-nil when projectTierId does not identify a stored manager.
499 GetProjectTierRewardAccumulatedTime(projectTierId string ) ( int64 , error )
500 // GetProjectTierRewardClaimableDuration returns the delay before rewards become claimable.
501 //
502 // Parameters:
503 // - projectTierId: identifier of the project tier.
504 //
505 // Returns:
506 // - duration: claimable delay in seconds.
507 // - err: non-nil when projectTierId does not identify a stored manager.
508 GetProjectTierRewardClaimableDuration(projectTierId string ) ( int64 , error )
509
510 // GetRewardState returns the reward state for one deposit in a project tier.
511 //
512 // Parameters:
513 // - projectTierId: identifier of the project tier.
514 // - depositId: identifier of the deposit whose reward state is requested.
515 //
516 // Returns:
517 // - rewardState: stored reward state, or nil on lookup failure.
518 // - err: non-nil when the project tier or deposit reward state is missing.
519 GetRewardState(projectTierId string , depositId string ) (*RewardState, error )
520 // GetProjectActiveStatus reports whether a project is active at the current time.
521 //
522 // Parameters:
523 // - projectId: identifier of the project to inspect.
524 //
525 // Returns:
526 // - active: true when the project is currently active; false otherwise.
527 // - err: non-nil when projectId does not identify a stored project.
528 GetProjectActiveStatus(projectId string ) ( bool , error )
529 }
530
531 type ILaunchpadStore interface {
532 // HasProjectsKey reports whether the projects tree has a persisted store key.
533 //
534 // Returns:
535 // - exists: true when the projects store key is present.
536 HasProjectsKey() bool
537 // GetProjects returns the persisted project tree.
538 //
539 // Returns:
540 // - projects: tree containing projects keyed by project ID.
541 GetProjects() *bptree.BPTree
542 // SetProjects persists the project tree in the current store realm.
543 //
544 // Parameters:
545 // - _: Noncrossing implementation-call discriminator; pass 0.
546 // - rlm: current realm context forwarded for current-realm validation.
547 // - projects: project tree to persist.
548 //
549 // Returns:
550 // - err: non-nil when the realm context fails store validation or persistence fails.
551 SetProjects(_ int , rlm realm, projects *bptree.BPTree) error
552
553 // HasProjectRecipientsKey reports whether the project-recipient tree has a persisted key.
554 //
555 // Returns:
556 // - exists: true when the project-recipient store key is present.
557 HasProjectRecipientsKey() bool
558 // GetProjectRecipients returns the persisted project-recipient membership tree.
559 //
560 // Returns:
561 // - recipients: tree mapping project identifiers to recipient membership data.
562 GetProjectRecipients() *bptree.BPTree
563 // SetProjectRecipients persists the project-recipient membership tree.
564 //
565 // Parameters:
566 // - _: Noncrossing implementation-call discriminator; pass 0.
567 // - rlm: current realm context forwarded for current-realm validation.
568 // - recipients: project-recipient membership tree to persist.
569 //
570 // Returns:
571 // - err: non-nil when the realm context fails store validation or persistence fails.
572 SetProjectRecipients(_ int , rlm realm, recipients *bptree.BPTree) error
573
574 // HasProjectTierRewardManagersKey reports whether tier reward managers have a persisted key.
575 //
576 // Returns:
577 // - exists: true when the reward-manager store key is present.
578 HasProjectTierRewardManagersKey() bool
579 // GetProjectTierRewardManagers returns the persisted tier reward-manager tree.
580 //
581 // Returns:
582 // - managers: tree keyed by project-tier identifier.
583 GetProjectTierRewardManagers() *bptree.BPTree
584 // SetProjectTierRewardManagers persists the tier reward-manager tree.
585 //
586 // Parameters:
587 // - _: Noncrossing implementation-call discriminator; pass 0.
588 // - rlm: current realm context forwarded for current-realm validation.
589 // - managers: tier reward-manager tree to persist.
590 //
591 // Returns:
592 // - err: non-nil when the realm context fails store validation or persistence fails.
593 SetProjectTierRewardManagers(_ int , rlm realm, managers *bptree.BPTree) error
594
595 // DepositCounter
596 // HasDepositCounterStoreKey reports whether the deposit counter has a persisted key.
597 //
598 // Returns:
599 // - exists: true when the deposit-counter store key is present.
600 HasDepositCounterStoreKey() bool
601 // GetDepositCounter returns the persisted counter used to allocate deposit IDs.
602 //
603 // Returns:
604 // - counter: deposit ID counter.
605 GetDepositCounter() *Counter
606 // SetDepositCounter persists the counter used to allocate deposit IDs.
607 //
608 // Parameters:
609 // - _: Noncrossing implementation-call discriminator; pass 0.
610 // - rlm: current realm context forwarded for current-realm validation.
611 // - counter: counter state to persist.
612 //
613 // Returns:
614 // - err: non-nil when the realm context fails store validation or persistence fails.
615 SetDepositCounter(_ int , rlm realm, counter *Counter) error
616 // NextDepositID advances the deposit counter and returns its new identifier.
617 //
618 // Returns:
619 // - depositID: newly allocated deposit identifier.
620 NextDepositID() string
621
622 // HasDepositsKey reports whether the deposits tree has a persisted store key.
623 //
624 // Returns:
625 // - exists: true when the deposits store key is present.
626 HasDepositsKey() bool
627 // GetDeposits returns the persisted deposit tree.
628 //
629 // Returns:
630 // - deposits: tree containing deposits keyed by deposit ID.
631 GetDeposits() *bptree.BPTree
632 // SetDeposits persists the deposit tree in the current store realm.
633 //
634 // Parameters:
635 // - _: Noncrossing implementation-call discriminator; pass 0.
636 // - rlm: current realm context forwarded for current-realm validation.
637 // - deposits: deposit tree to persist.
638 //
639 // Returns:
640 // - err: non-nil when the realm context fails store validation or persistence fails.
641 SetDeposits(_ int , rlm realm, deposits *bptree.BPTree) error
642
643 // HasTotalGNSStakedAmountKey reports whether the aggregate GNS stake has a persisted key.
644 //
645 // Returns:
646 // - exists: true when the total-stake store key is present.
647 HasTotalGNSStakedAmountKey() bool
648 // GetTotalGNSStakedAmount returns the aggregate GNS amount currently staked.
649 //
650 // Returns:
651 // - amount: total GNS amount currently held in deposits.
652 GetTotalGNSStakedAmount() int64
653 // SetTotalGNSStakedAmount persists the aggregate current GNS stake.
654 //
655 // Parameters:
656 // - _: Noncrossing implementation-call discriminator; pass 0.
657 // - rlm: current realm context forwarded for current-realm validation.
658 // - amount: aggregate GNS amount currently staked.
659 //
660 // Returns:
661 // - err: non-nil when the realm context fails store validation or persistence fails.
662 SetTotalGNSStakedAmount(_ int , rlm realm, amount int64 ) error
663 }
664
vm/qrender output, sanitized (docs/render-security.md) and displayed in an empty-sandbox iframe — scripts, forms and popups cannot run. Links stay inert in-preview; right-click to open.