PathrockNetwork Gno Explorer
HomeBlocksTransactionsTokensRealmsPackagesValidatorsAnalytics

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/p/gnoswap/gnsmath/v1

Package
Open in gnoweb ↗

Overview

Kind
Pure package
Name
v1
Namespace
gnoswap / gnsmath
Files
11 (README)(gnomod.toml)
Exported functions
n/a — not supported for pure packages by the node (vm/qfuncs)
Module
gno.land/p/gnoswap/gnsmath/v1
gno
0.9

Files (11)

  • README.mdmarkdown
  • gnomod.tomltoml
  • bit_math.gnogno
  • consts.gnogno
  • doc.gnogno
  • errors.gnogno
  • liquidity_math.gnogno
  • safe_math.gnogno
  • sqrt_price_math.gnogno
  • swap_math.gnogno
  • tick_math.gnogno
  • errors.gnogno
    1package gnsmath23import (4	ufmt "gno.land/p/nt/ufmt/v0"5)67const (8	errInvalidPoolSqrtPrice     = "invalid pool sqrt price calculation: product/amount != sqrtPX96 or numerator1 <= product"9	errSqrtPriceOverflow        = "sqrt price overflow"10	errSqrtPriceExceedsQuotient = "sqrt price exceeds calculated quotient"11	errSqrtPriceZero            = "sqrtPX96 should not be zero"12	errLiquidityZero            = "liquidity should not be zero"13	errSqrtRatioAX96Zero        = "sqrtRatioAX96 must be greater than zero"14	errAmount0DeltaOverflow     = "GetAmount0Delta: overflow"15	errAmount1DeltaOverflow     = "GetAmount1Delta: overflow"16	errMSBZeroInput             = "input for MSB calculation should not be zero"17	errLSBZeroInput             = "input for LSB calculation should not be zero"18	errGetAmount0DeltaNilInput  = "GetAmount0Delta: input parameters cannot be nil"19	errGetAmount1DeltaNilInput  = "GetAmount1Delta: input parameters cannot be nil"20	errTickMathOutOfRange       = "tick_math: value out of range"21	errTickMathInvalidInput     = "tick_math: invalid input data"22	errTickMathOverflow         = "tick_math: overflow"23	errLiquidityIdenticalTicks  = "liquidity_math: identical ticks"24	errLiquidityOverflow        = "liquidity_math: overflow"25	errSafeMathOverflow         = "safe_math: overflow"26)2728func newErrorWithDetail(errMsg string, detail string) string {29	return ufmt.Errorf("%s || %s", errMsg, detail).Error()30}31

    Functions

    not supported for pure packages by the node (vm/qfuncs)

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