PathrockNetwork Gno Explorer
HomeBlocksTransactionsRealmsPackagesValidatorsAnalytics

PathrockNetwork Gno Explorer — an independent explorer for Gno.land Mainnet (gnoland-1), operated by PathrockNetwork. Not an official Gno.land service.

gnowebarchive RPC

gno.land/r/gnoswap/launchpad/v1

Realm
Open in gnoweb ↗

Overview

Kind
Realm (renderable)
Name
v1
Namespace
gnoswap / launchpad
Files
23 (README)(gnomod.toml)
Exported functions
1
Module
gno.land/r/gnoswap/launchpad/v1
gno
0.9

Files (23)

  • README.mdmarkdown
  • gnomod.tomltoml
  • assert.gnogno
  • consts.gnogno
  • deposit.gnogno
  • emits.gnogno
  • errors.gnogno
  • getter_utils.gnogno
  • getter.gnogno
  • init.gnogno
  • instance.gnogno
  • launchpad_deposit.gnogno
  • launchpad_project.gnogno
  • launchpad_protocol_fee.gnogno
  • launchpad_reward.gnogno
  • launchpad_withdraw.gnogno
  • project_tier.gnogno
  • project.gnogno
  • render.gnogno
  • reward_manager.gnogno
  • reward_state.gnogno
  • state.gnogno
  • utils.gnogno
  • utils.gnogno
    1package launchpad23import (4	"math"5	"strconv"6	"strings"78	ufmt "gno.land/p/nt/ufmt/v0"9)1011const (12	MAX_INT64 = math.MaxInt6413	MIN_INT64 = math.MinInt6414)1516func buildConditionEventAttrs(conditionTokens string, conditionAmounts string) []string {17	if conditionTokens == "" {18		return []string{}19	}2021	tokenPaths := strings.Split(conditionTokens, stringSplitterPad)22	amounts := strings.Split(conditionAmounts, stringSplitterPad)23	eventAttrs := make([]string, 0, len(tokenPaths)*2)2425	for index, tokenPath := range tokenPaths {26		eventAttrs = append(eventAttrs, ufmt.Sprintf("conditionsTokens[%d]", index))27		eventAttrs = append(eventAttrs, tokenPath+stringSplitterPad+amounts[index])28	}2930	return eventAttrs31}3233// parseProjectTierID parses a project tier ID into its project ID and duration.34// Returns the project ID {tokenPath}:{createdHeight} and the duration of the project tier (30, 90, 180).35func parseProjectTierID(projectTierID string) (string, int64) {36	parts := strings.Split(projectTierID, ":")37	if len(parts) != 3 {38		panic(makeErrorWithDetails(39			errInvalidData,40			ufmt.Sprintf("(%s)", projectTierID),41		))42	}4344	projectID := parts[0] + ":" + parts[1]4546	tierDuration, err := strconv.ParseInt(parts[2], 10, 64)47	if err != nil {48		panic(makeErrorWithDetails(49			errInvalidData,50			ufmt.Sprintf("(%s)", projectTierID),51		))52	}5354	// Validate tier duration55	if tierDuration != projectTier30 && tierDuration != projectTier90 && tierDuration != projectTier180 {56		panic(makeErrorWithDetails(57			errInvalidTier,58			ufmt.Sprintf("pool type(%d) is not available", tierDuration),59		))60	}6162	return projectID, tierDuration63}64

    Functions

    • NewLaunchpadV1(launchpadStore interface {GetDepositCounter func() *gno.land/r/gnoswap/launchpad.Counter; GetDeposits func() *gno.land/p/nt/bptree/v0.BPTree; GetProjectRecipients func() *gno.land/p/nt/bptree/v0.BPTree; GetProjectTierRewardManagers func() *gno.land/p/nt/bptree/v0.BPTree; GetProjects func() *gno.land/p/nt/bptree/v0.BPTree; GetTotalGNSStakedAmount func() int64; HasDepositCounterStoreKey func() bool; HasDepositsKey func() bool; HasProjectRecipientsKey func() bool; HasProjectTierRewardManagersKey func() bool; HasProjectsKey func() bool; HasTotalGNSStakedAmountKey func() bool; NextDepositID func() string; SetDepositCounter func(int, .uverse.realm, *gno.land/r/gnoswap/launchpad.Counter) .uverse.error; SetDeposits func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetProjectRecipients func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetProjectTierRewardManagers func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetProjects func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetTotalGNSStakedAmount func(int, .uverse.realm, int64) .uverse.error}) interface {CollectDepositGns func(int, .uverse.realm, string) (int64, .uverse.error); CollectEmissionReward func(int, .uverse.realm); CollectProtocolFee func(int, .uverse.realm); CollectProtocolFeeReward func(int, .uverse.realm, string); CollectRewardByDepositId func(int, .uverse.realm, string) int64; CreateProject func(int, .uverse.realm, string, string, .uverse.address, int64, string, string, int64, int64, int64, int64) string; DepositGns func(int, .uverse.realm, string, int64, string) string; GetCurrentDepositId func() int64; GetDeposit func(string) (gno.land/r/gnoswap/launchpad.Deposit, .uverse.error); GetDepositAmount func(string) (int64, .uverse.error); GetDepositCount func() int; GetDepositCreatedAt func(string) (int64, .uverse.error); GetDepositCreatedHeight func(string) (int64, .uverse.error); GetDepositEndTime func(string) (int64, .uverse.error); GetDepositProjectID func(string) (string, .uverse.error); GetDepositProjectTierID func(string) (string, .uverse.error); GetDepositTier func(string) (int64, .uverse.error); GetDepositWithdrawnHeight func(string) (int64, .uverse.error); GetDepositWithdrawnTime func(string) (int64, .uverse.error); GetProjectActiveStatus func(string) (bool, .uverse.error); GetProjectCondition func(string, string) (*gno.land/r/gnoswap/launchpad.ProjectCondition, .uverse.error); GetProjectCreatedAt func(string) (int64, .uverse.error); GetProjectCreatedHeight func(string) (int64, .uverse.error); GetProjectDepositAmount func(string) (int64, .uverse.error); GetProjectName func(string) (string, .uverse.error); GetProjectRecipient func(string) (.uverse.address, .uverse.error); GetProjectTier func(string, int64) (*gno.land/r/gnoswap/launchpad.ProjectTier, .uverse.error); GetProjectTierDistributeAmountPerSecondX128 func(string, int64) (*gno.land/p/gnoswap/uint256/v1.Uint, .uverse.error); GetProjectTierEndTime func(string, int64) (int64, .uverse.error); GetProjectTierRewardAccumulatedDistributeAmount func(string) (int64, .uverse.error); GetProjectTierRewardAccumulatedRewardPerDepositX128 func(string) (*gno.land/p/gnoswap/uint256/v1.Uint, .uverse.error); GetProjectTierRewardAccumulatedTime func(string) (int64, .uverse.error); GetProjectTierRewardClaimableDuration func(string) (int64, .uverse.error); GetProjectTierRewardDistributeAmountPerSecondX128 func(string) (*gno.land/p/gnoswap/uint256/v1.Uint, .uverse.error); GetProjectTierRewardDistributeEndTime func(string) (int64, .uverse.error); GetProjectTierRewardDistributeStartTime func(string) (int64, .uverse.error); GetProjectTierRewardManager func(string) (*gno.land/r/gnoswap/launchpad.RewardManager, .uverse.error); GetProjectTierRewardManagerCount func() int; GetProjectTierRewardTotalClaimedAmount func(string) (int64, .uverse.error); GetProjectTierRewardTotalDistributeAmount func(string) (int64, .uverse.error); GetProjectTierRewards func(string, int64) *gno.land/p/nt/bptree/rotree/v0.ReadOnlyTree; GetProjectTierStartTime func(string, int64) (int64, .uverse.error); GetProjectTierTotalCollectedAmount func(string, int64) (int64, .uverse.error); GetProjectTierTotalDepositAmount func(string, int64) (int64, .uverse.error); GetProjectTierTotalDepositCount func(string, int64) (int64, .uverse.error); GetProjectTierTotalDistributeAmount func(string, int64) (int64, .uverse.error); GetProjectTierTotalWithdrawAmount func(string, int64) (int64, .uverse.error); GetProjectTierTotalWithdrawCount func(string, int64) (int64, .uverse.error); GetProjectTiersRatios func(string) (map[int64]int64, .uverse.error); GetProjectTokenPath func(string) (string, .uverse.error); GetProjects func() *gno.land/p/nt/bptree/rotree/v0.ReadOnlyTree; GetRewardState func(string, string) (*gno.land/r/gnoswap/launchpad.RewardState, .uverse.error); GetTotalGNSStakedAmount func() int64; Render func(string) string; TransferLeftFromProjectByAdmin func(int, .uverse.realm, string, .uverse.address) int64}

    Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.

    Rendered

    RenderedRawgnoweb ↗
    This realm does not provide renderable output (vm/qrender → NoRenderDeclError). View on gnoweb ↗

    vm/qrender output, sanitized (docs/render-security.md) and displayed in an empty-sandbox iframe — scripts, forms and popups cannot run. Links stay inert in-preview; right-click to open.