Counter
typeCounter manages unique incrementing IDs.
Value
launchpad.Counter
NewCounter
func() *launchpad.CounterNewCounter creates a new Counter starting at 0.
- 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 of the deposit. - depositAmount (int64): The amount of the deposit. - withdrawnHeight (int64): The height at which the deposit was withdrawn. - withdrawnTime (int64): The time when the deposit was withdrawn. - createdTime (int64): The time when the deposit was created. - endTime (int64): The time when the deposit ends.
Value
launchpad.Deposit
NewDeposit
func(depositID string, projectID string, tier int64, depositor .uverse.address, depositAmount int64, createdHeight int64, createdTime int64, endTime int64) *launchpad.DepositNewDeposit returns a pointer to a new Deposit with the given values.
- OID
- 0c9087…b74a:5
NewDeposit details
ErrSpoofedRealm
untyped stringValue
"rlm does not match the current crossing frame"
GetProjectCount
func() intGetProjectCount returns the total number of projects.
- OID
- 0c9087…b74a:7
GetProjectCount details
GetProjectIDs
func(offset int, count int) []stringGetProjectIDs returns a paginated list of project IDs.
- OID
- 0c9087…b74a:9
GetProjectIDs details
GetProject
func(projectId string) (*launchpad.Project, .uverse.error)GetProject retrieves a project by its ID. Returns a cloned project to prevent external modification.
- OID
- 0c9087…b74a:10
GetProject details
GetProjectName
func(projectId string) (string, .uverse.error)GetProjectName returns the name of a project by its ID.
- OID
- 0c9087…b74a:11
GetProjectName details
GetProjectTokenPath
func(projectId string) (string, .uverse.error)GetProjectTokenPath returns the token path of a project by its ID.
- OID
- 0c9087…b74a:12
GetProjectTokenPath details
GetProjectDepositAmount
func(projectId string) (int64, .uverse.error)GetProjectDepositAmount returns the deposit amount of a project by its ID.
- OID
- 0c9087…b74a:13
GetProjectDepositAmount details
GetProjectRecipient
func(projectId string) (.uverse.address, .uverse.error)- OID
- 0c9087…b74a:14
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.
- OID
- 0c9087…b74a:15
GetProjectCondition details
GetProjectTiersRatios
func(projectId string) (map[int64]int64, .uverse.error)GetProjectTiersRatios returns the tiers ratios map of a project by its ID.
- OID
- 0c9087…b74a:16
GetProjectTiersRatios details
GetProjectCreatedHeight
func(projectId string) (int64, .uverse.error)GetProjectCreatedHeight returns the created height of a project by its ID.
- OID
- 0c9087…b74a:17
GetProjectCreatedHeight details
GetProjectCreatedAt
func(projectId string) (int64, .uverse.error)GetProjectCreatedAt returns the created time of a project by its ID.
- OID
- 0c9087…b74a:18
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.
- OID
- 0c9087…b74a:19
GetProjectTier details
GetProjectTierDistributeAmountPerSecondX128
func(projectId string, tier int64) (*uint256.Uint, .uverse.error)GetProjectTierDistributeAmountPerSecondX128 returns the distribute amount per second (Q128) of a project tier.
- OID
- 0c9087…b74a:20
GetProjectTierDistributeAmountPerSecondX128 details
GetProjectTierTotalDistributeAmount
func(projectId string, tier int64) (int64, .uverse.error)GetProjectTierTotalDistributeAmount returns the total distribute amount of a project tier.
- OID
- 0c9087…b74a:21
GetProjectTierTotalDistributeAmount details
GetProjectTierTotalDepositAmount
func(projectId string, tier int64) (int64, .uverse.error)GetProjectTierTotalDepositAmount returns the total deposit amount of a project tier.
- OID
- 0c9087…b74a:22
GetProjectTierTotalDepositAmount details
GetProjectTierTotalWithdrawAmount
func(projectId string, tier int64) (int64, .uverse.error)GetProjectTierTotalWithdrawAmount returns the total withdraw amount of a project tier.
- OID
- 0c9087…b74a:23
GetProjectTierTotalWithdrawAmount details
GetProjectTierTotalDepositCount
func(projectId string, tier int64) (int64, .uverse.error)GetProjectTierTotalDepositCount returns the total deposit count of a project tier.
- OID
- 0c9087…b74a:24
GetProjectTierTotalDepositCount details
GetProjectTierTotalWithdrawCount
func(projectId string, tier int64) (int64, .uverse.error)GetProjectTierTotalWithdrawCount returns the total withdraw count of a project tier.
- OID
- 0c9087…b74a:25
GetProjectTierTotalWithdrawCount details
GetProjectTierTotalCollectedAmount
func(projectId string, tier int64) (int64, .uverse.error)GetProjectTierTotalCollectedAmount returns the total collected amount of a project tier.
- OID
- 0c9087…b74a:26
GetProjectTierTotalCollectedAmount details
GetProjectTierStartTime
func(projectId string, tier int64) (int64, .uverse.error)GetProjectTierStartTime returns the start time of a project tier.
- OID
- 0c9087…b74a:27
GetProjectTierStartTime details
GetProjectTierEndTime
func(projectId string, tier int64) (int64, .uverse.error)GetProjectTierEndTime returns the end time of a project tier.
- OID
- 0c9087…b74a:28
GetProjectTierEndTime details
GetDepositCount
func() intGetDepositCount returns the total number of deposits.
- OID
- 0c9087…b74a:29
GetDepositCount details
GetCurrentDepositId
func() int64GetCurrentDepositId returns the current deposit counter value.
- OID
- 0c9087…b74a:30
GetCurrentDepositId details
GetProjectTierDepositCount
func(projectId string, tier int64) intGetProjectTierDepositCount returns the total number of deposits for a project tier.
- OID
- 0c9087…b74a:31
GetProjectTierDepositCount details
GetProjectTierDepositIDs
func(projectId string, tier int64, offset int, count int) []stringGetProjectTierDepositIDs returns a paginated list of deposit IDs for a project tier.
- OID
- 0c9087…b74a:32
GetProjectTierDepositIDs details
GetDeposit
func(depositId string) (*launchpad.Deposit, .uverse.error)GetDeposit retrieves a deposit by its ID. Returns a cloned deposit to prevent external modification.
- OID
- 0c9087…b74a:33
GetDeposit details
GetDepositProjectID
func(depositId string) (string, .uverse.error)GetDepositProjectID returns the project ID of a deposit by its ID.
- OID
- 0c9087…b74a:34
GetDepositProjectID details
GetDepositTier
func(depositId string) (int64, .uverse.error)GetDepositTier returns the tier of a deposit by its ID.
- OID
- 0c9087…b74a:35
GetDepositTier details
GetDepositProjectTierID
func(depositId string) (string, .uverse.error)GetDepositProjectTierID returns the project tier ID of a deposit by its ID.
- OID
- 0c9087…b74a:36
GetDepositProjectTierID details
GetDepositAmount
func(depositId string) (int64, .uverse.error)GetDepositAmount returns the deposit amount of a deposit by its ID.
- OID
- 0c9087…b74a:37
GetDepositAmount details
GetDepositWithdrawnHeight
func(depositId string) (int64, .uverse.error)GetDepositWithdrawnHeight returns the withdrawn height of a deposit by its ID.
- OID
- 0c9087…b74a:38
GetDepositWithdrawnHeight details
GetDepositWithdrawnTime
func(depositId string) (int64, .uverse.error)GetDepositWithdrawnTime returns the withdrawn time of a deposit by its ID.
- OID
- 0c9087…b74a:39
GetDepositWithdrawnTime details
GetDepositCreatedHeight
func(depositId string) (int64, .uverse.error)GetDepositCreatedHeight returns the created height of a deposit by its ID.
- OID
- 0c9087…b74a:40
GetDepositCreatedHeight details
GetDepositCreatedAt
func(depositId string) (int64, .uverse.error)GetDepositCreatedAt returns the created time of a deposit by its ID.
- OID
- 0c9087…b74a:41
GetDepositCreatedAt details
GetDepositEndTime
func(depositId string) (int64, .uverse.error)GetDepositEndTime returns the end time of a deposit by its ID.
- OID
- 0c9087…b74a:42
GetDepositEndTime details
GetTotalGNSStakedAmount
func() int64GetTotalGNSStakedAmount returns the total amount of GNS currently staked across all launchpad deposits.
- OID
- 0c9087…b74a:43
GetTotalGNSStakedAmount details
GetProjectTierRewardManagerCount
func() intGetProjectTierRewardManagerCount returns the total number of reward managers.
- OID
- 0c9087…b74a:44
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.
- OID
- 0c9087…b74a:45
GetProjectTierRewardManager details
GetProjectTierRewardDistributeAmountPerSecondX128
func(projectTierId string) (*uint256.Uint, .uverse.error)GetProjectTierRewardDistributeAmountPerSecondX128 returns the distribute amount per second (Q128) of a reward manager.
- OID
- 0c9087…b74a:46
GetProjectTierRewardDistributeAmountPerSecondX128 details
GetProjectTierRewardAccumulatedRewardPerDepositX128
func(projectTierId string) (*uint256.Uint, .uverse.error)GetProjectTierRewardAccumulatedRewardPerDepositX128 returns the accumulated reward per deposit (Q128) of a reward manager.
- OID
- 0c9087…b74a:47
GetProjectTierRewardAccumulatedRewardPerDepositX128 details
GetProjectTierRewardTotalDistributeAmount
func(projectTierId string) (int64, .uverse.error)GetProjectTierRewardTotalDistributeAmount returns the total distribute amount of a reward manager.
- OID
- 0c9087…b74a:48
GetProjectTierRewardTotalDistributeAmount details
GetProjectTierRewardTotalClaimedAmount
func(projectTierId string) (int64, .uverse.error)GetProjectTierRewardTotalClaimedAmount returns the total claimed amount of a reward manager.
- OID
- 0c9087…b74a:49
GetProjectTierRewardTotalClaimedAmount details
GetProjectTierRewardDistributeStartTime
func(projectTierId string) (int64, .uverse.error)GetProjectTierRewardDistributeStartTime returns the distribute start time of a reward manager.
- OID
- 0c9087…b74a:50
GetProjectTierRewardDistributeStartTime details
GetProjectTierRewardDistributeEndTime
func(projectTierId string) (int64, .uverse.error)GetProjectTierRewardDistributeEndTime returns the distribute end time of a reward manager.
- OID
- 0c9087…b74a:51
GetProjectTierRewardDistributeEndTime details
GetProjectTierRewardAccumulatedDistributeAmount
func(projectTierId string) (int64, .uverse.error)GetProjectTierRewardAccumulatedDistributeAmount returns the accumulated distribute amount of a reward manager.
- OID
- 0c9087…b74a:52
GetProjectTierRewardAccumulatedDistributeAmount details
GetProjectTierRewardAccumulatedTime
func(projectTierId string) (int64, .uverse.error)GetProjectTierRewardAccumulatedTime returns the accumulated time of a reward manager.
- OID
- 0c9087…b74a:53
GetProjectTierRewardAccumulatedTime details
GetProjectTierRewardClaimableDuration
func(projectTierId string) (int64, .uverse.error)GetProjectTierRewardClaimableDuration returns the reward claimable duration of a reward manager.
- OID
- 0c9087…b74a:54
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.
- OID
- 0c9087…b74a:55
GetRewardState details
GetProjectActiveStatus
func(projectId string) (bool, .uverse.error)GetProjectActiveStatus returns whether a project is currently active.
- OID
- 0c9087…b74a:56
GetProjectActiveStatus details
cloneStringSlice
func(src []string) []string- OID
- 0c9087…b74a:57
cloneStringSlice details
cloneInt64Map
func(src map[int64]int64) map[int64]int64- OID
- 0c9087…b74a:59
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 (std.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. - createdBlockTimeInfo (BlockTimeInfo): The block time and height information for the creation of the project.
Value
launchpad.Project
NewProject
func(name string, tokenPath string, depositAmount int64, recipient .uverse.address, createdHeight int64, createdAt int64) *launchpad.Project- OID
- 0c9087…b74a:60
NewProject details
MakeProjectID
func(tokenPath string, createdHeight int64) stringMakeProjectID generates a unique project ID based on the given token path and the current block height. The generated ID combines the \`tokenPath\` and the current block height in the following format: "{tokenPath}:{height}" Parameters: - tokenPath (string): The path of the token associated with the project. Returns: - string: A unique project ID in the format "tokenPath:height".
- OID
- 0c9087…b74a:62
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.ProjectCondition- OID
- 0c9087…b74a:63
NewProjectCondition details
NewProjectConditionsWithError
func(conditionTokens string, conditionAmounts string) ([]*launchpad.ProjectCondition, .uverse.error)- OID
- 0c9087…b74a:65
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.
- OID
- 0c9087…b74a:66
NewProjectTier details
MakeProjectTierID
func(projectID string, duration int64) stringMakeProjectTierID generates a unique tier ID based on the given project ID and the tier duration. The generated ID combines the \`projectId\` and the \`duration\` in the following format: "{projectId}:{duration}" Parameters: - projectId (string): The unique ID of the project associated with the tier. - duration (uint64): The duration of the tier (e.g., 30, 90, 180 days). Returns: - string: A unique tier ID in the format "projectId:duration".
- OID
- 0c9087…b74a:68
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 with tiered allocations.
- OID
- 0c9087…b74a:69
CreateProject details
CollectProtocolFee
func()CollectProtocolFee collects accumulated protocol fees from launchpad operations.
- OID
- 0c9087…b74a:71
CollectProtocolFee details
CollectEmissionReward
func()CollectEmissionReward collects accumulated launchpad emission rewards.
- OID
- 0c9087…b74a:72
CollectEmissionReward details
CollectProtocolFeeReward
func(tokenPath string)CollectProtocolFeeReward collects accumulated launchpad protocol fee rewards for the provided token path.
- OID
- 0c9087…b74a:73
CollectProtocolFeeReward details
TransferLeftFromProjectByAdmin
func(projectID string, recipient .uverse.address) int64TransferLeftFromProjectByAdmin transfers the remaining rewards of a project to a specified recipient.
- OID
- 0c9087…b74a:74
TransferLeftFromProjectByAdmin details
DepositGns
func(targetProjectTierID string, depositAmount int64, referrer string) stringDepositGns deposits GNS tokens to a launchpad project tier.
- OID
- 0c9087…b74a:75
DepositGns details
CollectDepositGns
func(depositID string) (int64, .uverse.error)CollectDepositGns collects rewards from a deposit.
- OID
- 0c9087…b74a:76
CollectDepositGns details
CollectRewardByDepositId
func(depositID string) int64CollectRewardByDepositId collects rewards from a deposit.
- OID
- 0c9087…b74a:77
CollectRewardByDepositId 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 amount of tokens to be distributed. - 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): The accumulated amount of tokens distributed. - 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.
- OID
- 0c9087…b74a:78
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 *uint256.Uint, depositAmount int64, distributeStartTime int64, distributeEndTime int64, claimableTime int64) *launchpad.RewardStateNewRewardState returns a pointer to a new RewardState with the given values.
- OID
- 0c9087…b74a:80
NewRewardState details
kvStore
*store.kvStore- OID
- 0c9087…b74a:100
kvStore details
versionManager
*version_manager.versionManager- OID
- 0c9087…b74a:104
versionManager details
implementation
*v1.launchpadV1- OID
- 04315f…d24b:75
implementation details
init.81
func()- OID
- 0c9087…b74a:85
init.81 details
initializeDomainStore
func(int, rlm .uverse.realm, kvStore store.KVStore) interface{...}- OID
- 0c9087…b74a:87
initializeDomainStore details
getImplementation
func() launchpad.ILaunchpad- OID
- 0c9087…b74a:88
getImplementation details
updateImplementation
func() .uverse.error- OID
- 0c9087…b74a:89
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.
- OID
- 0c9087…b74a:90
NewBPTreeN details
StoreKey
typeValue
launchpad.StoreKey
StoreKeyProjects
launchpad.StoreKey// Projects 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 store.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.
- OID
- 0c9087…b74a:92
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.
- OID
- 0c9087…b74a:93
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.
- OID
- 0c9087…b74a:95
UpgradeImpl details
GetImplementationPackagePath
func() stringGetImplementationPackagePath returns the package path of the currently active implementation.
- OID
- 0c9087…b74a:96