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

launchpad state

Back to all declarations

Counter

type

Counter manages unique incrementing IDs.

Value

launchpad.Counter

NewCounter

func() *launchpad.Counter

NewCounter creates a new Counter starting at zero. Returns: - counter: counter initialized with current ID zero.

Open
OID
0c9087…b74a:3
NewCounter details

Inspect func

Deposit

type

Deposit 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.Deposit

MakeDeposit 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.

Open
OID
0c9087…b74a:5
MakeDeposit details

Inspect func

DefaultDeposit

func() launchpad.Deposit

DefaultDeposit returns the zero Deposit value. Returns: - deposit: zero-valued Deposit with no identifier, amounts, timestamps, or withdrawal markers.

Open
OID
0c9087…b74a:7
DefaultDeposit details

Inspect func

ErrSpoofedRealm

untyped string

Value

"rlm does not match the current crossing frame"

GetProjects

func() *v0.ReadOnlyTree

GetProjects 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.

Open
OID
0c9087…b74a:8
GetProjects details

Inspect func

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.

Open
OID
0c9087…b74a:10
GetProjectName details

Inspect func

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.

Open
OID
0c9087…b74a:11
GetProjectTokenPath details

Inspect func

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.

Open
OID
0c9087…b74a:12
GetProjectDepositAmount details

Inspect func

GetProjectRecipient

func(projectId string) (.uverse.address, .uverse.error)
Open
OID
0c9087…b74a:13
GetProjectRecipient details

Inspect func

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.

Open
OID
0c9087…b74a:14
GetProjectCondition details

Inspect func

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.

Open
OID
0c9087…b74a:15
GetProjectTiersRatios details

Inspect func

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.

Open
OID
0c9087…b74a:16
GetProjectCreatedHeight details

Inspect func

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.

Open
OID
0c9087…b74a:17
GetProjectCreatedAt details

Inspect func

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.

Open
OID
0c9087…b74a:18
GetProjectTier details

Inspect func

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.

Open
OID
0c9087…b74a:19
GetProjectTierDistributeAmountPerSecondX128 details

Inspect func

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.

Open
OID
0c9087…b74a:20
GetProjectTierTotalDistributeAmount details

Inspect func

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.

Open
OID
0c9087…b74a:21
GetProjectTierTotalDepositAmount details

Inspect func

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.

Open
OID
0c9087…b74a:22
GetProjectTierTotalWithdrawAmount details

Inspect func

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.

Open
OID
0c9087…b74a:23
GetProjectTierTotalDepositCount details

Inspect func

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.

Open
OID
0c9087…b74a:24
GetProjectTierTotalWithdrawCount details

Inspect func

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.

Open
OID
0c9087…b74a:25
GetProjectTierTotalCollectedAmount details

Inspect func

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.

Open
OID
0c9087…b74a:26
GetProjectTierStartTime details

Inspect func

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.

Open
OID
0c9087…b74a:27
GetProjectTierEndTime details

Inspect func

GetDepositCount

func() int

GetDepositCount returns the total number of deposits. Returns: - count: number of deposit records currently stored.

Open
OID
0c9087…b74a:28
GetDepositCount details

Inspect func

GetCurrentDepositId

func() int64

GetCurrentDepositId returns the current deposit counter value. Returns: - depositId: current deposit counter value; it is not incremented by this read.

Open
OID
0c9087…b74a:29
GetCurrentDepositId details

Inspect func

GetProjectTierRewards

func(projectId string, tier int64) *v0.ReadOnlyTree

GetProjectTierRewards 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.

Open
OID
0c9087…b74a:30
GetProjectTierRewards details

Inspect func

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.

Open
OID
0c9087…b74a:31
GetDeposit details

Inspect func

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.

Open
OID
0c9087…b74a:32
GetDepositProjectID details

Inspect func

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.

Open
OID
0c9087…b74a:33
GetDepositTier details

Inspect func

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.

Open
OID
0c9087…b74a:34
GetDepositProjectTierID details

Inspect func

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.

Open
OID
0c9087…b74a:35
GetDepositAmount details

Inspect func

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.

Open
OID
0c9087…b74a:36
GetDepositWithdrawnHeight details

Inspect func

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.

Open
OID
0c9087…b74a:37
GetDepositWithdrawnTime details

Inspect func

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.

Open
OID
0c9087…b74a:38
GetDepositCreatedHeight details

Inspect func

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.

Open
OID
0c9087…b74a:39
GetDepositCreatedAt details

Inspect func

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.

Open
OID
0c9087…b74a:40
GetDepositEndTime details

Inspect func

GetTotalGNSStakedAmount

func() int64

GetTotalGNSStakedAmount 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.

Open
OID
0c9087…b74a:41
GetTotalGNSStakedAmount details

Inspect func

GetProjectTierRewardManagerCount

func() int

GetProjectTierRewardManagerCount returns the total number of reward managers. Returns: - count: number of project-tier reward managers currently stored.

Open
OID
0c9087…b74a:42
GetProjectTierRewardManagerCount details

Inspect func

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.

Open
OID
0c9087…b74a:43
GetProjectTierRewardManager details

Inspect func

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.

Open
OID
0c9087…b74a:44
GetProjectTierRewardDistributeAmountPerSecondX128 details

Inspect func

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.

Open
OID
0c9087…b74a:45
GetProjectTierRewardAccumulatedRewardPerDepositX128 details

Inspect func

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.

Open
OID
0c9087…b74a:46
GetProjectTierRewardTotalDistributeAmount details

Inspect func

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.

Open
OID
0c9087…b74a:47
GetProjectTierRewardTotalClaimedAmount details

Inspect func

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.

Open
OID
0c9087…b74a:48
GetProjectTierRewardDistributeStartTime details

Inspect func

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.

Open
OID
0c9087…b74a:49
GetProjectTierRewardDistributeEndTime details

Inspect func

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.

Open
OID
0c9087…b74a:50
GetProjectTierRewardAccumulatedDistributeAmount details

Inspect func

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.

Open
OID
0c9087…b74a:51
GetProjectTierRewardAccumulatedTime details

Inspect func

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.

Open
OID
0c9087…b74a:52
GetProjectTierRewardClaimableDuration details

Inspect func

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.

Open
OID
0c9087…b74a:53
GetRewardState details

Inspect func

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.

Open
OID
0c9087…b74a:54
GetProjectActiveStatus details

Inspect func

cloneInt64Map

func(src map[int64]int64) map[int64]int64
Open
OID
0c9087…b74a:55
cloneInt64Map details

Inspect func

Project

type

Project 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.Project

NewProject 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.

Open
OID
0c9087…b74a:57
NewProject details

Inspect func

MakeProjectID

func(tokenPath string, createdHeight int64) string

MakeProjectID 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.

Open
OID
0c9087…b74a:59
MakeProjectID details

Inspect func

stringSplitterPad

untyped string

Value

"*PAD*"

ProjectCondition

type

ProjectCondition 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.ProjectCondition

NewProjectCondition 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.

Open
OID
0c9087…b74a:60
NewProjectCondition details

Inspect func

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.

Open
OID
0c9087…b74a:62
NewProjectConditionsWithError details

Inspect func

ProjectTier

type

ProjectTier 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.ProjectTier

NewProjectTier 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.

Open
OID
0c9087…b74a:63
NewProjectTier details

Inspect func

MakeProjectTierID

func(projectID string, duration int64) string

MakeProjectTierID 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.

Open
OID
0c9087…b74a:65
MakeProjectTierID details

Inspect func

CreateProject

func(name string, tokenPath string, recipient .uverse.address, depositAmount int64, conditionTokens string, conditionAmounts string, tier30Ratio int64, tier90Ratio int64, tier180Ratio int64, startTime int64) string

CreateProject 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.

Open
OID
0c9087…b74a:66
CreateProject details

Inspect func

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.

Open
OID
0c9087…b74a:68
CollectProtocolFee details

Inspect func

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.

Open
OID
0c9087…b74a:69
CollectEmissionReward details

Inspect func

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.

Open
OID
0c9087…b74a:70
CollectProtocolFeeReward details

Inspect func

TransferLeftFromProjectByAdmin

func(projectID string, recipient .uverse.address) int64

TransferLeftFromProjectByAdmin 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.

Open
OID
0c9087…b74a:71
TransferLeftFromProjectByAdmin details

Inspect func

DepositGns

func(targetProjectTierID string, depositAmount int64, referrer string) string

DepositGns 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.

Open
OID
0c9087…b74a:72
DepositGns details

Inspect func

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.

Open
OID
0c9087…b74a:73
CollectDepositGns details

Inspect func

CollectRewardByDepositId

func(depositID string) int64

CollectRewardByDepositId 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.

Open
OID
0c9087…b74a:74
CollectRewardByDepositId details

Inspect func

Render

func(path string) string

Render delegates web rendering to the active implementation.

Open
OID
0c9087…b74a:75
Render details

Inspect func

RewardManager

type

RewardManager 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.RewardManager

NewRewardManager 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.

Open
OID
0c9087…b74a:77
NewRewardManager details

Inspect func

RewardState

type

RewardState 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.RewardState

NewRewardState 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.

Open
OID
0c9087…b74a:79
NewRewardState details

Inspect func

initializeDomainStore

func(int, rlm .uverse.realm, kvStore v1.KVStore) interface{...}
Open
OID
0c9087…b74a:86
initializeDomainStore details

Inspect func

getImplementation

func() launchpad.ILaunchpad
Open
OID
0c9087…b74a:87
getImplementation details

Inspect func

updateImplementation

func() .uverse.error
Open
OID
0c9087…b74a:88
updateImplementation details

Inspect func

NewBPTreeN

func(fanout int) *v0.BPTree

NewBPTreeN 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.

Open
OID
0c9087…b74a:89
NewBPTreeN details

Inspect func

StoreKey

type

Value

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

type

Value

launchpad.launchpadStore

NewLaunchpadStore

func(kvStore v1.KVStore) launchpad.ILaunchpadStore

NewLaunchpadStore 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.

Open
OID
0c9087…b74a:91
NewLaunchpadStore details

Inspect func

ILaunchpad

type

Value

launchpad.ILaunchpad

ILaunchpadProject

type

Value

launchpad.ILaunchpadProject

ILaunchpadDeposit

type

Value

launchpad.ILaunchpadDeposit

ILaunchpadGetter

type

Value

launchpad.ILaunchpadGetter

ILaunchpadStore

type

Value

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.

Open
OID
0c9087…b74a:92
RegisterInitializer details

Inspect func

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.

Open
OID
0c9087…b74a:94
UpgradeImpl details

Inspect func

GetImplementationPackagePath

func() string

GetImplementationPackagePath returns the package path of the currently active implementation. Returns: - packagePath: package path of the active implementation

Open
OID
0c9087…b74a:95
GetImplementationPackagePath details

Inspect func
Counter : type =launchpad.Counter
NewCounter : func() *launchpad.Counter Inspect
Deposit : type =launchpad.Deposit
MakeDeposit : func(depositID string, projectID string, tier int64, depositor .uverse.address, depositAmount int64, createdHeight int64, createdTime int64, endTime int64) launchpad.Deposit Inspect
DefaultDeposit : func() launchpad.Deposit Inspect
ErrSpoofedRealm : untyped string ="rlm does not match the current crossing frame"
GetProjects : func() *v0.ReadOnlyTree Inspect
GetProjectName : func(projectId string) (string, .uverse.error) Inspect
GetProjectTokenPath : func(projectId string) (string, .uverse.error) Inspect
GetProjectDepositAmount : func(projectId string) (int64, .uverse.error) Inspect
GetProjectRecipient : func(projectId string) (.uverse.address, .uverse.error) Inspect
GetProjectCondition : func(projectId string, tokenPath string) (*launchpad.ProjectCondition, .uverse.error) Inspect
GetProjectTiersRatios : func(projectId string) (map[int64]int64, .uverse.error) Inspect
GetProjectCreatedHeight : func(projectId string) (int64, .uverse.error) Inspect
GetProjectCreatedAt : func(projectId string) (int64, .uverse.error) Inspect
GetProjectTier : func(projectId string, tier int64) (*launchpad.ProjectTier, .uverse.error) Inspect
GetProjectTierDistributeAmountPerSecondX128 : func(projectId string, tier int64) (*v1.Uint, .uverse.error) Inspect
GetProjectTierTotalDistributeAmount : func(projectId string, tier int64) (int64, .uverse.error) Inspect
GetProjectTierTotalDepositAmount : func(projectId string, tier int64) (int64, .uverse.error) Inspect
GetProjectTierTotalWithdrawAmount : func(projectId string, tier int64) (int64, .uverse.error) Inspect
GetProjectTierTotalDepositCount : func(projectId string, tier int64) (int64, .uverse.error) Inspect
GetProjectTierTotalWithdrawCount : func(projectId string, tier int64) (int64, .uverse.error) Inspect
GetProjectTierTotalCollectedAmount : func(projectId string, tier int64) (int64, .uverse.error) Inspect
GetProjectTierStartTime : func(projectId string, tier int64) (int64, .uverse.error) Inspect
GetProjectTierEndTime : func(projectId string, tier int64) (int64, .uverse.error) Inspect
GetDepositCount : func() int Inspect
GetCurrentDepositId : func() int64 Inspect
GetProjectTierRewards : func(projectId string, tier int64) *v0.ReadOnlyTree Inspect
GetDeposit : func(depositId string) (launchpad.Deposit, .uverse.error) Inspect
GetDepositProjectID : func(depositId string) (string, .uverse.error) Inspect
GetDepositTier : func(depositId string) (int64, .uverse.error) Inspect
GetDepositProjectTierID : func(depositId string) (string, .uverse.error) Inspect
GetDepositAmount : func(depositId string) (int64, .uverse.error) Inspect
GetDepositWithdrawnHeight : func(depositId string) (int64, .uverse.error) Inspect
GetDepositWithdrawnTime : func(depositId string) (int64, .uverse.error) Inspect
GetDepositCreatedHeight : func(depositId string) (int64, .uverse.error) Inspect
GetDepositCreatedAt : func(depositId string) (int64, .uverse.error) Inspect
GetDepositEndTime : func(depositId string) (int64, .uverse.error) Inspect
GetTotalGNSStakedAmount : func() int64 Inspect
GetProjectTierRewardManagerCount : func() int Inspect
GetProjectTierRewardManager : func(projectTierId string) (*launchpad.RewardManager, .uverse.error) Inspect
GetProjectTierRewardDistributeAmountPerSecondX128 : func(projectTierId string) (*v1.Uint, .uverse.error) Inspect
GetProjectTierRewardAccumulatedRewardPerDepositX128 : func(projectTierId string) (*v1.Uint, .uverse.error) Inspect
GetProjectTierRewardTotalDistributeAmount : func(projectTierId string) (int64, .uverse.error) Inspect
GetProjectTierRewardTotalClaimedAmount : func(projectTierId string) (int64, .uverse.error) Inspect
GetProjectTierRewardDistributeStartTime : func(projectTierId string) (int64, .uverse.error) Inspect
GetProjectTierRewardDistributeEndTime : func(projectTierId string) (int64, .uverse.error) Inspect
GetProjectTierRewardAccumulatedDistributeAmount : func(projectTierId string) (int64, .uverse.error) Inspect
GetProjectTierRewardAccumulatedTime : func(projectTierId string) (int64, .uverse.error) Inspect
GetProjectTierRewardClaimableDuration : func(projectTierId string) (int64, .uverse.error) Inspect
GetRewardState : func(projectTierId string, depositId string) (*launchpad.RewardState, .uverse.error) Inspect
GetProjectActiveStatus : func(projectId string) (bool, .uverse.error) Inspect
cloneInt64Map : func(src map[int64]int64) map[int64]int64 Inspect
Project : type =launchpad.Project
NewProject : func(name string, tokenPath string, depositAmount int64, recipient .uverse.address, createdHeight int64, createdAt int64) *launchpad.Project Inspect
MakeProjectID : func(tokenPath string, createdHeight int64) string Inspect
stringSplitterPad : untyped string ="*PAD*"
ProjectCondition : type =launchpad.ProjectCondition
NewProjectCondition : func(tokenPath string, minimumAmount int64) *launchpad.ProjectCondition Inspect
NewProjectConditionsWithError : func(conditionTokens string, conditionAmounts string) ([]*launchpad.ProjectCondition, .uverse.error) Inspect
ProjectTier : type =launchpad.ProjectTier
NewProjectTier : func(projectID string, tierDuration int64, totalDistributeAmount int64, startTime int64, endTime int64) *launchpad.ProjectTier Inspect
MakeProjectTierID : func(projectID string, duration int64) string Inspect
CreateProject : func(name string, tokenPath string, recipient .uverse.address, depositAmount int64, conditionTokens string, conditionAmounts string, tier30Ratio int64, tier90Ratio int64, tier180Ratio int64, startTime int64) string Inspect
CollectProtocolFee : func() Inspect
CollectEmissionReward : func() Inspect
CollectProtocolFeeReward : func(tokenPath string) Inspect
TransferLeftFromProjectByAdmin : func(projectID string, recipient .uverse.address) int64 Inspect
DepositGns : func(targetProjectTierID string, depositAmount int64, referrer string) string Inspect
CollectDepositGns : func(depositID string) (int64, .uverse.error) Inspect
CollectRewardByDepositId : func(depositID string) int64 Inspect
Render : func(path string) string Inspect
RewardManager : type =launchpad.RewardManager
NewRewardManager : func(totalDistributeAmount int64, distributeStartTime int64, distributeEndTime int64, rewardCollectableDuration int64) *launchpad.RewardManager Inspect
RewardState : type =launchpad.RewardState
NewRewardState : func(accumulatedRewardPerDepositX128 *v1.Uint, depositAmount int64, distributeStartTime int64, distributeEndTime int64, claimableTime int64) *launchpad.RewardState Inspect
kvStore : *v1.kvStore Inspect
versionManager : *v1.versionManager Inspect
implementation : *v1.launchpadV1 Inspect
init.79 : func() Inspect
initializeDomainStore : func(int, rlm .uverse.realm, kvStore v1.KVStore) interface{...} Inspect
getImplementation : func() launchpad.ILaunchpad Inspect
updateImplementation : func() .uverse.error Inspect
NewBPTreeN : func(fanout int) *v0.BPTree Inspect
StoreKey : type =launchpad.StoreKey
StoreKeyProjects : launchpad.StoreKey =<gnolang.StringValue>
StoreKeyProjectRecipients : launchpad.StoreKey =<gnolang.StringValue>
StoreKeyProjectTierRewardManagers : launchpad.StoreKey =<gnolang.StringValue>
StoreKeyDepositCounter : launchpad.StoreKey =<gnolang.StringValue>
StoreKeyDeposits : launchpad.StoreKey =<gnolang.StringValue>
StoreKeyTotalGNSStakedAmount : launchpad.StoreKey =<gnolang.StringValue>
launchpadStore : type =launchpad.launchpadStore
NewLaunchpadStore : func(kvStore v1.KVStore) launchpad.ILaunchpadStore Inspect
ILaunchpad : type =launchpad.ILaunchpad
ILaunchpadProject : type =launchpad.ILaunchpadProject
ILaunchpadDeposit : type =launchpad.ILaunchpadDeposit
ILaunchpadGetter : type =launchpad.ILaunchpadGetter
ILaunchpadStore : type =launchpad.ILaunchpadStore
RegisterInitializer : func(initializer func(...)) Inspect
UpgradeImpl : func(packagePath string) Inspect
GetImplementationPackagePath : func() string Inspect