Counter
typeCounter manages unique incrementing IDs.
Value
launchpad.Counter
NewCounter
func() *launchpad.CounterNewCounter creates a new Counter starting at zero. Returns: - counter: counter initialized with current ID zero.
- OID
- 0c9087…b74a:3
NewCounter details
Deposit
typeDeposit represents a deposit made by a user in a launchpad project. This struct contains the necessary data and methods to manage and distribute rewards for a specific deposit. Fields: - depositor (std.Address): The address of the depositor. - id (string): The unique identifier for the deposit. - projectID (string): The ID of the project associated with the deposit. - tier (int64): The tier duration of the deposit (30, 90, or 180 days). - depositAmount (int64): The amount of the deposit. - withdrawnHeight (int64): The height at which the deposit was withdrawn. - withdrawnTime (int64): The Unix timestamp when the deposit was withdrawn. - createdHeight (int64): The block height at which the deposit was created. - createdAt (int64): The Unix timestamp when the deposit was created. - endTime (int64): The Unix timestamp when the deposit ends.
Value
launchpad.Deposit
MakeDeposit
func(depositID string, projectID string, tier int64, depositor .uverse.address, depositAmount int64, createdHeight int64, createdTime int64, endTime int64) launchpad.DepositMakeDeposit returns a new Deposit value with the given values. Parameters: - depositID: unique identifier to assign to the new deposit. - projectID: launchpad project identifier associated with the deposit. - tier: tier duration in days; launchpad tiers use 30, 90, or 180. - depositor: account address making the deposit. - depositAmount: amount of GNS deposited for the project. - createdHeight: block height at which the deposit was created. - createdTime: creation timestamp in Unix seconds. - endTime: tier end timestamp in Unix seconds. Returns: - deposit: new Deposit populated with the supplied fields and zero withdrawal markers.
- OID
- 0c9087…b74a:5
MakeDeposit details
DefaultDeposit
func() launchpad.DepositDefaultDeposit returns the zero Deposit value. Returns: - deposit: zero-valued Deposit with no identifier, amounts, timestamps, or withdrawal markers.
- OID
- 0c9087…b74a:7
DefaultDeposit details
ErrSpoofedRealm
untyped stringValue
"rlm does not match the current crossing frame"
GetProjects
func() *v0.ReadOnlyTreeGetProjects retrieves the projects tree. Returns: - projects: stored projects BP-tree keyed by project ID; the method panics if the key is missing or has the wrong type.
- OID
- 0c9087…b74a:8
GetProjects details
GetProjectName
func(projectId string) (string, .uverse.error)GetProjectName returns the name of a project by its ID. Parameters: - projectId: unique identifier of the launchpad project to inspect. Returns: - name: stored project name. - err: non-nil when projectId does not identify a stored project.
- OID
- 0c9087…b74a:10
GetProjectName details
GetProjectTokenPath
func(projectId string) (string, .uverse.error)GetProjectTokenPath returns the token path of a project by its ID. Parameters: - projectId: unique identifier of the launchpad project to inspect. Returns: - tokenPath: reward-token contract path configured for the project. - err: non-nil when projectId does not identify a stored project.
- OID
- 0c9087…b74a:11
GetProjectTokenPath details
GetProjectDepositAmount
func(projectId string) (int64, .uverse.error)GetProjectDepositAmount returns the deposit amount of a project by its ID. Parameters: - projectId: unique identifier of the launchpad project to inspect. Returns: - amount: project-token amount initially allocated to the project, in token base units. - err: non-nil when projectId does not identify a stored project.
- OID
- 0c9087…b74a:12
GetProjectDepositAmount details
GetProjectRecipient
func(projectId string) (.uverse.address, .uverse.error)- OID
- 0c9087…b74a:13
GetProjectRecipient details
GetProjectCondition
func(projectId string, tokenPath string) (*launchpad.ProjectCondition, .uverse.error)GetProjectCondition retrieves a specific condition of a project. Returns a cloned condition to prevent external modification. Parameters: - projectId: unique identifier of the project containing the condition. - tokenPath: token contract path used as the condition key. Returns: - condition: cloned condition for the requested token; nil when the implementation returns no condition without an error. - err: non-nil when the project or condition cannot be found.
- OID
- 0c9087…b74a:14
GetProjectCondition details
GetProjectTiersRatios
func(projectId string) (map[int64]int64, .uverse.error)GetProjectTiersRatios returns the tiers ratios map of a project by its ID. Parameters: - projectId: unique identifier of the launchpad project to inspect. Returns: - tiersRatios: cloned map from tier duration to its allocation ratio. - err: non-nil when projectId does not identify a stored project.
- OID
- 0c9087…b74a:15
GetProjectTiersRatios details
GetProjectCreatedHeight
func(projectId string) (int64, .uverse.error)GetProjectCreatedHeight returns the created height of a project by its ID. Parameters: - projectId: unique identifier of the launchpad project to inspect. Returns: - height: block height at which the project was created. - err: non-nil when projectId does not identify a stored project.
- OID
- 0c9087…b74a:16
GetProjectCreatedHeight details
GetProjectCreatedAt
func(projectId string) (int64, .uverse.error)GetProjectCreatedAt returns the created time of a project by its ID. Parameters: - projectId: unique identifier of the launchpad project to inspect. Returns: - createdAt: Unix timestamp in seconds at which the project was created. - err: non-nil when projectId does not identify a stored project.
- OID
- 0c9087…b74a:17
GetProjectCreatedAt details
GetProjectTier
func(projectId string, tier int64) (*launchpad.ProjectTier, .uverse.error)GetProjectTier retrieves a specific tier of a project. Returns a cloned tier to prevent external modification. Parameters: - projectId: unique identifier of the project containing the tier. - tier: tier duration key, such as 30, 90, or 180. Returns: - projectTier: cloned project tier; nil when the implementation supplies no tier without an error. - err: non-nil when the project or tier cannot be found.
- OID
- 0c9087…b74a:18
GetProjectTier details
GetProjectTierDistributeAmountPerSecondX128
func(projectId string, tier int64) (*v1.Uint, .uverse.error)GetProjectTierDistributeAmountPerSecondX128 returns the distribute amount per second (Q128) of a project tier. Parameters: - projectId: unique identifier of the project containing the tier. - tier: tier duration key, such as 30, 90, or 180. Returns: - amountPerSecondX128: project-token distribution rate per second in Q128 fixed-point units; nil when no value is available. - err: non-nil when the project or tier cannot be found.
- OID
- 0c9087…b74a:19
GetProjectTierDistributeAmountPerSecondX128 details
GetProjectTierTotalDistributeAmount
func(projectId string, tier int64) (int64, .uverse.error)GetProjectTierTotalDistributeAmount returns the total distribute amount of a project tier. Parameters: - projectId: unique identifier of the project containing the tier. - tier: tier duration key, such as 30, 90, or 180. Returns: - amount: total project-token allocation for the tier, in token base units. - err: non-nil when the project or tier cannot be found.
- OID
- 0c9087…b74a:20
GetProjectTierTotalDistributeAmount details
GetProjectTierTotalDepositAmount
func(projectId string, tier int64) (int64, .uverse.error)GetProjectTierTotalDepositAmount returns the total deposit amount of a project tier. Parameters: - projectId: unique identifier of the project containing the tier. - tier: tier duration key, such as 30, 90, or 180. Returns: - amount: cumulative GNS principal deposited into the tier, in base units. - err: non-nil when the project or tier cannot be found.
- OID
- 0c9087…b74a:21
GetProjectTierTotalDepositAmount details
GetProjectTierTotalWithdrawAmount
func(projectId string, tier int64) (int64, .uverse.error)GetProjectTierTotalWithdrawAmount returns the total withdraw amount of a project tier. Parameters: - projectId: unique identifier of the project containing the tier. - tier: tier duration key, such as 30, 90, or 180. Returns: - amount: cumulative GNS principal withdrawn from the tier, in base units. - err: non-nil when the project or tier cannot be found.
- OID
- 0c9087…b74a:22
GetProjectTierTotalWithdrawAmount details
GetProjectTierTotalDepositCount
func(projectId string, tier int64) (int64, .uverse.error)GetProjectTierTotalDepositCount returns the total deposit count of a project tier. Parameters: - projectId: unique identifier of the project containing the tier. - tier: tier duration key, such as 30, 90, or 180. Returns: - count: cumulative number of deposits created in the tier. - err: non-nil when the project or tier cannot be found.
- OID
- 0c9087…b74a:23
GetProjectTierTotalDepositCount details
GetProjectTierTotalWithdrawCount
func(projectId string, tier int64) (int64, .uverse.error)GetProjectTierTotalWithdrawCount returns the total withdraw count of a project tier. Parameters: - projectId: unique identifier of the project containing the tier. - tier: tier duration key, such as 30, 90, or 180. Returns: - count: cumulative number of withdrawals completed in the tier. - err: non-nil when the project or tier cannot be found.
- OID
- 0c9087…b74a:24
GetProjectTierTotalWithdrawCount details
GetProjectTierTotalCollectedAmount
func(projectId string, tier int64) (int64, .uverse.error)GetProjectTierTotalCollectedAmount returns the total collected amount of a project tier. Parameters: - projectId: unique identifier of the project containing the tier. - tier: tier duration key, such as 30, 90, or 180. Returns: - amount: cumulative project-token reward collected from the tier, in token base units. - err: non-nil when the project or tier cannot be found.
- OID
- 0c9087…b74a:25
GetProjectTierTotalCollectedAmount details
GetProjectTierStartTime
func(projectId string, tier int64) (int64, .uverse.error)GetProjectTierStartTime returns the start time of a project tier. Parameters: - projectId: unique identifier of the project containing the tier. - tier: tier duration key, such as 30, 90, or 180. Returns: - startTime: tier start timestamp in Unix seconds. - err: non-nil when the project or tier cannot be found.
- OID
- 0c9087…b74a:26
GetProjectTierStartTime details
GetProjectTierEndTime
func(projectId string, tier int64) (int64, .uverse.error)GetProjectTierEndTime returns the end time of a project tier. Parameters: - projectId: unique identifier of the project containing the tier. - tier: tier duration key, such as 30, 90, or 180. Returns: - endTime: tier end timestamp in Unix seconds. - err: non-nil when the project or tier cannot be found.
- OID
- 0c9087…b74a:27
GetProjectTierEndTime details
GetDepositCount
func() intGetDepositCount returns the total number of deposits. Returns: - count: number of deposit records currently stored.
- OID
- 0c9087…b74a:28
GetDepositCount details
GetCurrentDepositId
func() int64GetCurrentDepositId returns the current deposit counter value. Returns: - depositId: current deposit counter value; it is not incremented by this read.
- OID
- 0c9087…b74a:29
GetCurrentDepositId details
GetProjectTierRewards
func(projectId string, tier int64) *v0.ReadOnlyTreeGetProjectTierRewards returns a read-only view of a project tier's reward states, keyed by deposit ID. Reading an entry yields a clone, so the view cannot mutate realm state. nil is returned when the project tier does not exist. Parameters: - projectId: unique identifier of the project containing the tier. - tier: tier duration key, such as 30, 90, or 180. Returns: - rewards: read-only tree of reward states keyed by deposit ID; nil when the tier's reward manager is unavailable.
- OID
- 0c9087…b74a:30
GetProjectTierRewards details
GetDeposit
func(depositId string) (launchpad.Deposit, .uverse.error)GetDeposit retrieves a deposit by its ID. Parameters: - depositId: unique identifier of the deposit to inspect. Returns: - deposit: stored deposit value. - err: non-nil when depositId does not identify a stored deposit.
- OID
- 0c9087…b74a:31
GetDeposit details
GetDepositProjectID
func(depositId string) (string, .uverse.error)GetDepositProjectID returns the project ID of a deposit by its ID. Parameters: - depositId: unique identifier of the deposit to inspect. Returns: - projectId: project identifier associated with the deposit. - err: non-nil when depositId does not identify a stored deposit.
- OID
- 0c9087…b74a:32
GetDepositProjectID details
GetDepositTier
func(depositId string) (int64, .uverse.error)GetDepositTier returns the tier of a deposit by its ID. Parameters: - depositId: unique identifier of the deposit to inspect. Returns: - tier: tier duration key selected by the deposit. - err: non-nil when depositId does not identify a stored deposit.
- OID
- 0c9087…b74a:33
GetDepositTier details
GetDepositProjectTierID
func(depositId string) (string, .uverse.error)GetDepositProjectTierID returns the project tier ID of a deposit by its ID. Parameters: - depositId: unique identifier of the deposit to inspect. Returns: - projectTierId: composite project-tier identifier derived from the deposit's project and tier. - err: non-nil when depositId does not identify a stored deposit.
- OID
- 0c9087…b74a:34
GetDepositProjectTierID details
GetDepositAmount
func(depositId string) (int64, .uverse.error)GetDepositAmount returns the deposit amount of a deposit by its ID. Parameters: - depositId: unique identifier of the deposit to inspect. Returns: - amount: GNS principal deposited, in base units. - err: non-nil when depositId does not identify a stored deposit.
- OID
- 0c9087…b74a:35
GetDepositAmount details
GetDepositWithdrawnHeight
func(depositId string) (int64, .uverse.error)GetDepositWithdrawnHeight returns the withdrawn height of a deposit by its ID. Parameters: - depositId: unique identifier of the deposit to inspect. Returns: - height: withdrawal block height; zero when the deposit has not been withdrawn. - err: non-nil when depositId does not identify a stored deposit.
- OID
- 0c9087…b74a:36
GetDepositWithdrawnHeight details
GetDepositWithdrawnTime
func(depositId string) (int64, .uverse.error)GetDepositWithdrawnTime returns the withdrawn time of a deposit by its ID. Parameters: - depositId: unique identifier of the deposit to inspect. Returns: - withdrawnAt: withdrawal Unix timestamp in seconds; zero when the deposit has not been withdrawn. - err: non-nil when depositId does not identify a stored deposit.
- OID
- 0c9087…b74a:37
GetDepositWithdrawnTime details
GetDepositCreatedHeight
func(depositId string) (int64, .uverse.error)GetDepositCreatedHeight returns the created height of a deposit by its ID. Parameters: - depositId: unique identifier of the deposit to inspect. Returns: - height: creation block height of the deposit. - err: non-nil when depositId does not identify a stored deposit.
- OID
- 0c9087…b74a:38
GetDepositCreatedHeight details
GetDepositCreatedAt
func(depositId string) (int64, .uverse.error)GetDepositCreatedAt returns the created time of a deposit by its ID. Parameters: - depositId: unique identifier of the deposit to inspect. Returns: - createdAt: deposit creation Unix timestamp in seconds. - err: non-nil when depositId does not identify a stored deposit.
- OID
- 0c9087…b74a:39
GetDepositCreatedAt details
GetDepositEndTime
func(depositId string) (int64, .uverse.error)GetDepositEndTime returns the end time of a deposit by its ID. Parameters: - depositId: unique identifier of the deposit to inspect. Returns: - endTime: deposit lock/end Unix timestamp in seconds. - err: non-nil when depositId does not identify a stored deposit.
- OID
- 0c9087…b74a:40
GetDepositEndTime details
GetTotalGNSStakedAmount
func() int64GetTotalGNSStakedAmount retrieves the total active GNS amount tracked by the store. Returns: - amount: total currently staked GNS in base units; the method panics if the key is missing or has the wrong type.
- OID
- 0c9087…b74a:41
GetTotalGNSStakedAmount details
GetProjectTierRewardManagerCount
func() intGetProjectTierRewardManagerCount returns the total number of reward managers. Returns: - count: number of project-tier reward managers currently stored.
- OID
- 0c9087…b74a:42
GetProjectTierRewardManagerCount details
GetProjectTierRewardManager
func(projectTierId string) (*launchpad.RewardManager, .uverse.error)GetProjectTierRewardManager retrieves a reward manager by project tier ID. Returns a cloned reward manager to prevent external modification. Parameters: - projectTierId: composite project-tier identifier whose manager is requested. Returns: - rewardManager: cloned reward manager; nil when the implementation supplies no manager without an error. - err: non-nil when projectTierId does not identify a stored reward manager.
- OID
- 0c9087…b74a:43
GetProjectTierRewardManager details
GetProjectTierRewardDistributeAmountPerSecondX128
func(projectTierId string) (*v1.Uint, .uverse.error)GetProjectTierRewardDistributeAmountPerSecondX128 returns the distribute amount per second (Q128) of a reward manager. Parameters: - projectTierId: composite project-tier identifier whose manager is requested. Returns: - amountPerSecondX128: reward distribution rate per second in Q128 fixed-point token units; nil when no value is available. - err: non-nil when projectTierId does not identify a stored reward manager.
- OID
- 0c9087…b74a:44
GetProjectTierRewardDistributeAmountPerSecondX128 details
GetProjectTierRewardAccumulatedRewardPerDepositX128
func(projectTierId string) (*v1.Uint, .uverse.error)GetProjectTierRewardAccumulatedRewardPerDepositX128 returns the accumulated reward per deposit (Q128) of a reward manager. Parameters: - projectTierId: composite project-tier identifier whose manager is requested. Returns: - accumulatedRewardPerDepositX128: accumulated reward index per deposited GNS unit in Q128 fixed-point units; nil when no value is available. - err: non-nil when projectTierId does not identify a stored reward manager.
- OID
- 0c9087…b74a:45
GetProjectTierRewardAccumulatedRewardPerDepositX128 details
GetProjectTierRewardTotalDistributeAmount
func(projectTierId string) (int64, .uverse.error)GetProjectTierRewardTotalDistributeAmount returns the total distribute amount of a reward manager. Parameters: - projectTierId: composite project-tier identifier whose manager is requested. Returns: - amount: total reward allocation managed for the project tier, in token base units. - err: non-nil when projectTierId does not identify a stored reward manager.
- OID
- 0c9087…b74a:46
GetProjectTierRewardTotalDistributeAmount details
GetProjectTierRewardTotalClaimedAmount
func(projectTierId string) (int64, .uverse.error)GetProjectTierRewardTotalClaimedAmount returns the total claimed amount of a reward manager. Parameters: - projectTierId: composite project-tier identifier whose manager is requested. Returns: - amount: total reward amount claimed from the manager, in token base units. - err: non-nil when projectTierId does not identify a stored reward manager.
- OID
- 0c9087…b74a:47
GetProjectTierRewardTotalClaimedAmount details
GetProjectTierRewardDistributeStartTime
func(projectTierId string) (int64, .uverse.error)GetProjectTierRewardDistributeStartTime returns the distribute start time of a reward manager. Parameters: - projectTierId: composite project-tier identifier whose manager is requested. Returns: - startTime: reward distribution start timestamp in Unix seconds. - err: non-nil when projectTierId does not identify a stored reward manager.
- OID
- 0c9087…b74a:48
GetProjectTierRewardDistributeStartTime details
GetProjectTierRewardDistributeEndTime
func(projectTierId string) (int64, .uverse.error)GetProjectTierRewardDistributeEndTime returns the distribute end time of a reward manager. Parameters: - projectTierId: composite project-tier identifier whose manager is requested. Returns: - endTime: reward distribution end timestamp in Unix seconds. - err: non-nil when projectTierId does not identify a stored reward manager.
- OID
- 0c9087…b74a:49
GetProjectTierRewardDistributeEndTime details
GetProjectTierRewardAccumulatedDistributeAmount
func(projectTierId string) (int64, .uverse.error)GetProjectTierRewardAccumulatedDistributeAmount returns a legacy reward-manager field. The v1 reward paths do not maintain it, so normal reads return zero unless it was explicitly set. Parameters: - projectTierId: composite project-tier identifier whose manager is requested. Returns: - amount: legacy accumulated distribution amount in token base units; v1 accounting normally leaves it at zero unless explicitly set. - err: non-nil when projectTierId does not identify a stored reward manager.
- OID
- 0c9087…b74a:50
GetProjectTierRewardAccumulatedDistributeAmount details
GetProjectTierRewardAccumulatedTime
func(projectTierId string) (int64, .uverse.error)GetProjectTierRewardAccumulatedTime returns the accumulated time of a reward manager. Parameters: - projectTierId: composite project-tier identifier whose manager is requested. Returns: - time: last reward-accumulation timestamp in Unix seconds, or zero before accumulation. - err: non-nil when projectTierId does not identify a stored reward manager.
- OID
- 0c9087…b74a:51
GetProjectTierRewardAccumulatedTime details
GetProjectTierRewardClaimableDuration
func(projectTierId string) (int64, .uverse.error)GetProjectTierRewardClaimableDuration returns the reward claimable duration of a reward manager. Parameters: - projectTierId: composite project-tier identifier whose manager is requested. Returns: - duration: reward claimable window in seconds. - err: non-nil when projectTierId does not identify a stored reward manager.
- OID
- 0c9087…b74a:52
GetProjectTierRewardClaimableDuration details
GetRewardState
func(projectTierId string, depositId string) (*launchpad.RewardState, .uverse.error)GetRewardState retrieves a reward state by project tier ID and deposit ID. Returns a cloned reward state to prevent external modification. Parameters: - projectTierId: composite project-tier identifier containing the reward state. - depositId: deposit identifier whose reward state is requested. Returns: - rewardState: cloned reward state; nil when the implementation supplies no state without an error. - err: non-nil when the reward manager or reward state cannot be found.
- OID
- 0c9087…b74a:53
GetRewardState details
GetProjectActiveStatus
func(projectId string) (bool, .uverse.error)GetProjectActiveStatus returns whether a project is currently active. Parameters: - projectId: unique identifier of the project to inspect. Returns: - active: true when the project is active at the current Unix time; false when it is inactive. - err: non-nil when projectId does not identify a stored project.
- OID
- 0c9087…b74a:54
GetProjectActiveStatus details
cloneInt64Map
func(src map[int64]int64) map[int64]int64- OID
- 0c9087…b74a:55
cloneInt64Map details
Project
typeProject represents a launchpad project. This struct contains the necessary data and methods to manage and distribute rewards for a specific project. Fields: - id (string): The unique identifier for the project, formatted as "{tokenPath}:{createdHeight}". - name (string): The name of the project. - tokenPath (string): The path of the token associated with the project. - depositAmount (int64): The total amount of tokens deposited for the project. - recipient (address): The address to receive the project's rewards. - conditions (map\[string]\*ProjectCondition): A map of token paths to their associated conditions. - tiers (map\[int64]\*ProjectTier): A map of tier durations to their associated tiers. - tiersRatios (map\[int64]int64): A map of tier durations to their associated ratios. - createdHeight (int64): The block height at which the project was created. - createdAt (int64): The Unix timestamp at which the project was created.
Value
launchpad.Project
NewProject
func(name string, tokenPath string, depositAmount int64, recipient .uverse.address, createdHeight int64, createdAt int64) *launchpad.ProjectNewProject creates a project with empty conditions, tiers, and tier-ratio maps. Parameters: - name: human-readable project name. - tokenPath: token path whose tokens are distributed as project rewards. - depositAmount: total reward-token amount allocated to the project. - recipient: address authorized to receive project rewards. - createdHeight: block height at which the project is created. - createdAt: Unix timestamp at which the project is created. Returns: - project: initialized project with an ID derived from tokenPath and createdHeight.
- OID
- 0c9087…b74a:57
NewProject details
MakeProjectID
func(tokenPath string, createdHeight int64) stringMakeProjectID combines a token path and creation height into a project identifier. Parameters: - tokenPath: token path associated with the project. - createdHeight: block height at which the project was created. Returns: - projectID: identifier in "{tokenPath}:{createdHeight}" form.
- OID
- 0c9087…b74a:59
MakeProjectID details
stringSplitterPad
untyped stringValue
"*PAD*"
ProjectCondition
typeProjectCondition represents a condition for a project. This struct contains the necessary data and methods to manage and distribute rewards for a specific project. Fields: - tokenPath (string): The path of the token associated with the project. - minimumAmount (int64): The minimum amount of the token required for the project.
Value
launchpad.ProjectCondition
NewProjectCondition
func(tokenPath string, minimumAmount int64) *launchpad.ProjectConditionNewProjectCondition creates a project condition for a token path and minimum amount. Parameters: - tokenPath: token contract path whose balance is required. - minimumAmount: minimum balance in the token's base units. Returns: - condition: newly allocated project condition containing the supplied values.
- OID
- 0c9087…b74a:60
NewProjectCondition details
NewProjectConditionsWithError
func(conditionTokens string, conditionAmounts string) ([]*launchpad.ProjectCondition, .uverse.error)NewProjectConditionsWithError parses parallel \*PAD\*-separated token paths and minimum amounts. Parameters: - conditionTokens: \*PAD\*-separated token contract paths, in condition order. - conditionAmounts: \*PAD\*-separated decimal int64 minimum amounts paired by index with conditionTokens; entries beyond the token list are not consumed. Returns: - conditions: parsed available conditions in the same order as their token paths; empty when both inputs are empty. - err: nil on successful parsing; non-nil when a token lacks a matching amount, an amount is not a valid int64, or a condition is unavailable.
- OID
- 0c9087…b74a:62
NewProjectConditionsWithError details
ProjectTier
typeProjectTier represents a tier within a project. This struct contains the necessary data and methods to manage and distribute rewards for a specific tier of a project. Fields: - distributeAmountPerSecondX128 (u256.Uint): The amount of tokens to be distributed per second, represented as a Q128 fixed-point number. - startTime (int64): The time for the start of the tier. - endTime (int64): The time for the end of the tier. - id (string): The unique identifier for the tier, formatted as "{projectID}:duration". - totalDistributeAmount (int64): The total amount of tokens to be distributed for the tier. - totalDepositAmount (int64): The total amount of tokens deposited for the tier. - totalWithdrawAmount (int64): The total amount of tokens withdrawn from the tier. - totalDepositCount (int64): The total number of deposits made to the tier. - totalWithdrawCount (int64): The total number of withdrawals from the tier. - totalCollectedAmount (int64): The total amount of tokens collected as rewards for the tier.
Value
launchpad.ProjectTier
NewProjectTier
func(projectID string, tierDuration int64, totalDistributeAmount int64, startTime int64, endTime int64) *launchpad.ProjectTierNewProjectTier returns a pointer to a new ProjectTier with the given values. Parameters: - projectID: launchpad project identifier associated with the tier. - tierDuration: tier duration in days; launchpad tiers use 30, 90, or 180. - totalDistributeAmount: total token amount allocated for this tier. - startTime: tier start timestamp in Unix seconds. - endTime: tier end timestamp in Unix seconds. Returns: - tier: new ProjectTier with the supplied identity, allocation, and time window; counters and rates start at zero.
- OID
- 0c9087…b74a:63
NewProjectTier details
MakeProjectTierID
func(projectID string, duration int64) stringMakeProjectTierID constructs the tier identifier from a project ID and duration. The resulting identifier uses the "{projectID}:{duration}" format. Parameters: - projectID: unique launchpad project identifier associated with the tier. - duration: tier duration in days, such as 30, 90, or 180. Returns: - projectTierID: identifier combining projectID and duration with a colon.
- OID
- 0c9087…b74a:65
MakeProjectTierID details
CreateProject
func(name string, tokenPath string, recipient .uverse.address, depositAmount int64, conditionTokens string, conditionAmounts string, tier30Ratio int64, tier90Ratio int64, tier180Ratio int64, startTime int64) stringCreateProject creates a new launchpad project callable by the administrator or governance. Parameters: - cur: current realm context; callers use cross(cur) when crossing into this realm. - name: human-readable project name. - tokenPath: token path whose tokens are distributed as project rewards. - recipient: address authorized to receive project rewards and project proceeds. - depositAmount: total reward-token amount allocated to the project. - conditionTokens: optional \`\*PAD\*\`-separated token paths required for deposits. - conditionAmounts: optional \`\*PAD\*\`-separated required amounts matching conditionTokens. - tier30Ratio: reward allocation ratio for the 30-day tier. - tier90Ratio: reward allocation ratio for the 90-day tier. - tier180Ratio: reward allocation ratio for the 180-day tier. - startTime: Unix timestamp at which project reward distribution starts. Returns: - projectId: identifier assigned to the newly created project. Halt check: reverts while the Launchpad halt scope is active.
- OID
- 0c9087…b74a:66
CreateProject details
CollectProtocolFee
func()CollectProtocolFee collects protocol-fee rewards allocated to project recipients. Parameters: - cur: current realm context; callers use cross(cur) when crossing into this realm. Halt check: reverts while the Withdraw halt scope is active.
- OID
- 0c9087…b74a:68
CollectProtocolFee details
CollectEmissionReward
func()CollectEmissionReward collects accumulated launchpad emission rewards. Parameters: - cur: current realm context; callers use cross(cur) when crossing into this realm. Halt check: reverts while the Withdraw halt scope is active.
- OID
- 0c9087…b74a:69
CollectEmissionReward details
CollectProtocolFeeReward
func(tokenPath string)CollectProtocolFeeReward collects accumulated launchpad protocol-fee rewards for a token path. Parameters: - cur: current realm context; callers use cross(cur) when crossing into this realm. - tokenPath: token path whose accumulated protocol-fee reward is collected. Halt check: reverts while the Withdraw halt scope is active.
- OID
- 0c9087…b74a:70
CollectProtocolFeeReward details
TransferLeftFromProjectByAdmin
func(projectID string, recipient .uverse.address) int64TransferLeftFromProjectByAdmin transfers unreserved reward tokens from an ended project. Active depositor claims remain reserved and are excluded; only the administrator may call it. Parameters: - cur: current realm context; callers use cross(cur) when crossing into this realm. - projectID: identifier of the ended project whose remaining balance is transferred. - recipient: destination address for the transferable balance. Returns: - amount: number of reward tokens transferred after active claims are reserved. Halt check: reverts while the Launchpad halt scope is active.
- OID
- 0c9087…b74a:71
TransferLeftFromProjectByAdmin details
DepositGns
func(targetProjectTierID string, depositAmount int64, referrer string) stringDepositGns deposits GNS into a selected launchpad project tier. Parameters: - cur: current realm context; callers use cross(cur) when crossing into this realm. - targetProjectTierID: project-tier identifier in \`{projectID}:{tierDuration}\` form. - depositAmount: amount of GNS to stake in the selected tier. - referrer: optional referral address associated with the deposit. Returns: - depositId: identifier assigned to the newly created deposit. Halt check: reverts while the Launchpad halt scope is active.
- OID
- 0c9087…b74a:72
DepositGns details
CollectDepositGns
func(depositID string) (int64, .uverse.error)CollectDepositGns withdraws the GNS amount recorded by a deposit. Parameters: - cur: current realm context; callers use cross(cur) when crossing into this realm. - depositID: identifier of the deposit whose GNS is collected. Returns: - amount: GNS amount withdrawn from the deposit. - err: non-nil when the deposit cannot be collected. Halt check: reverts while the Withdraw halt scope is active.
- OID
- 0c9087…b74a:73
CollectDepositGns details
CollectRewardByDepositId
func(depositID string) int64CollectRewardByDepositId collects the project-token reward earned by a deposit. Parameters: - cur: current realm context; callers use cross(cur) when crossing into this realm. - depositID: identifier of the deposit whose reward is collected. Returns: - amount: project-token reward amount transferred to the depositor. Halt check: reverts while the Withdraw halt scope is active.
- OID
- 0c9087…b74a:74
CollectRewardByDepositId details
Render
func(path string) stringRender delegates web rendering to the active implementation.
- OID
- 0c9087…b74a:75
Render details
RewardManager
typeRewardManager manages the distribution of rewards for a project tier. This struct contains the necessary data and methods to calculate and track rewards for deposits associated with a project tier. Fields: - rewards (bptree.BPTree): A map of deposit IDs to their associated reward states. - distributeAmountPerSecondX128 (u256.Uint): The amount of tokens to be distributed per second, represented as a Q128 fixed-point number. - accumulatedRewardPerDepositX128 (u256.Uint): The accumulated reward per GNS stake, represented as a Q128 fixed-point number. - totalDistributeAmount (int64): The total token allocation for this tier. - totalClaimedAmount (int64): The total amount of tokens claimed. - distributeStartTime (int64): The start time of the reward calculation. - distributeEndTime (int64): The end time of the reward calculation. - accumulatedDistributeAmount (int64): A legacy field not maintained by v1 reward accounting; normally zero unless explicitly set. - rewardClaimableDuration (int64): The duration of reward claimable.
Value
launchpad.RewardManager
NewRewardManager
func(totalDistributeAmount int64, distributeStartTime int64, distributeEndTime int64, rewardCollectableDuration int64) *launchpad.RewardManagerNewRewardManager returns a pointer to a new RewardManager with the given values. Parameters: - totalDistributeAmount: total reward allocation for the tier in token base units. - distributeStartTime: reward distribution start timestamp in Unix seconds. - distributeEndTime: reward distribution end timestamp in Unix seconds. - rewardCollectableDuration: duration in seconds for which each accrued reward remains claimable. Returns: - rewardManager: initialized manager with zeroed accounting counters and an empty reward tree.
- OID
- 0c9087…b74a:77
NewRewardManager details
RewardState
typeRewardState represents the state of a reward for a deposit. It contains the necessary data to manage and distribute rewards for a specific deposit.
Value
launchpad.RewardState
NewRewardState
func(accumulatedRewardPerDepositX128 *v1.Uint, depositAmount int64, distributeStartTime int64, distributeEndTime int64, claimableTime int64) *launchpad.RewardStateNewRewardState creates a reward state initialized from a reward-per-deposit index. Parameters: - accumulatedRewardPerDepositX128: current accumulated reward-per-deposit index in Q128 fixed-point units; it becomes this deposit's initial price debt. - depositAmount: GNS amount staked by the deposit, in base units. - distributeStartTime: Unix timestamp in seconds when this deposit begins accruing rewards. - distributeEndTime: Unix timestamp in seconds when this deposit stops accruing rewards. - claimableTime: Unix timestamp in seconds after which the accrued reward can be claimed. Returns: - rewardState: newly allocated state with claimed and legacy accumulation fields initialized to zero.
- OID
- 0c9087…b74a:79
NewRewardState details
kvStore
*v1.kvStore- OID
- 0c9087…b74a:99
kvStore details
versionManager
*v1.versionManager- OID
- 0c9087…b74a:103
versionManager details
implementation
*v1.launchpadV1- OID
- 04315f…d24b:81
implementation details
init.79
func()- OID
- 0c9087…b74a:84
init.79 details
initializeDomainStore
func(int, rlm .uverse.realm, kvStore v1.KVStore) interface{...}- OID
- 0c9087…b74a:86
initializeDomainStore details
getImplementation
func() launchpad.ILaunchpad- OID
- 0c9087…b74a:87
getImplementation details
updateImplementation
func() .uverse.error- OID
- 0c9087…b74a:88
updateImplementation details
NewBPTreeN
func(fanout int) *v0.BPTreeNewBPTreeN allocates a BP-tree under /r/gnoswap/launchpad's realm context (the realm that declares Project/Deposit/RewardManager). The tree's PkgID is therefore /r/gnoswap/launchpad, matching the domain values it stores, so tree.Set leaf-slot writes clear the readonly-taint gate regardless of which realm (launchpad/v1, mock, tests) calls Set. Implementations, mocks, and tests must allocate launchpad trees through here rather than calling bptree.NewBPTreeN directly in their own realm. Parameters: - fanout: branching factor passed to the BP-tree constructor. Returns: - tree: new BP-tree allocated under the launchpad realm's package context.
- OID
- 0c9087…b74a:89
NewBPTreeN details
StoreKey
typeValue
launchpad.StoreKey
StoreKeyProjects
launchpad.StoreKey// Projects tree
Value
<gnolang.StringValue>
StoreKeyProjectRecipients
launchpad.StoreKey// Recipient membership tree
Value
<gnolang.StringValue>
StoreKeyProjectTierRewardManagers
launchpad.StoreKey// Project tier reward managers tree
Value
<gnolang.StringValue>
StoreKeyDepositCounter
launchpad.StoreKey// Deposit counter
Value
<gnolang.StringValue>
StoreKeyDeposits
launchpad.StoreKey// Deposits tree
Value
<gnolang.StringValue>
StoreKeyTotalGNSStakedAmount
launchpad.StoreKey// Total active launchpad GNS stake
Value
<gnolang.StringValue>
launchpadStore
typeValue
launchpad.launchpadStore
NewLaunchpadStore
func(kvStore v1.KVStore) launchpad.ILaunchpadStoreNewLaunchpadStore creates a new launchpad store instance with the provided KV store. This function is used by the upgrade system to create storage instances for each implementation. Parameters: - kvStore: key-value store used to persist launchpad state. Returns: - launchpadStore: storage implementation backed by kvStore.
- OID
- 0c9087…b74a:91
NewLaunchpadStore details
ILaunchpad
typeValue
launchpad.ILaunchpad
ILaunchpadProject
typeValue
launchpad.ILaunchpadProject
ILaunchpadDeposit
typeValue
launchpad.ILaunchpadDeposit
ILaunchpadGetter
typeValue
launchpad.ILaunchpadGetter
ILaunchpadStore
typeValue
launchpad.ILaunchpadStore
RegisterInitializer
func(initializer func(...))RegisterInitializer registers a new launchpad implementation version. This function is called by each version (v1, v2, etc.) during initialization to register their implementation with the proxy system. The initializer function creates a new instance of the implementation using the provided launchpadStore interface. Security: Only contracts within the domain path can register initializers. Each package path can only register once to prevent duplicate registrations. Parameters: - cur: current realm context; callers use cross(cur) when crossing into this realm. - initializer: callback that receives the implementation realm context and launchpad store, then returns the version's ILaunchpad implementation; its leading integer discriminator is invoked as 0.
- OID
- 0c9087…b74a:92
RegisterInitializer details
UpgradeImpl
func(packagePath string)UpgradeImpl switches the active launchpad implementation to a different version. This function allows seamless upgrades from one version to another without data migration or downtime. Security: Only admin or governance can perform upgrades. The new implementation must have been previously registered via RegisterInitializer. Parameters: - cur: current realm context; callers use cross(cur) when crossing into this realm. - packagePath: registered package path of the launchpad implementation to activate.
- OID
- 0c9087…b74a:94
UpgradeImpl details
GetImplementationPackagePath
func() stringGetImplementationPackagePath returns the package path of the currently active implementation. Returns: - packagePath: package path of the active implementation
- OID
- 0c9087…b74a:95