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/r/gnoswap/common

Realm
Open in gnoweb ↗

Overview

Kind
Realm (renderable)
Name
common
Namespace
gnoswap
Files
9 (README)(gnomod.toml)
Exported functions
17
Module
gno.land/r/gnoswap/common
gno
0.9

Files (9)

  • README.mdmarkdown
  • gnomod.tomltoml
  • assert.gnogno
  • doc.gnogno
  • grc20reg_helper.gnogno
  • render.gnogno
  • state.gnogno
  • types.gnogno
  • upgrade.gnogno
  • types.gnogno
    1package common23type ICommon interface {4	// ValidateNotHandleNativeCoin rejects a call carrying native coins.5	//6	// Returns:7	//   - error: non-nil when the transaction includes native coins; nil when no native coins are attached

    Functions

    • Allowance(tokenKey string, owner string, spender string) int64

    • Approve(int, rlm interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, tokenKey string, spender string, amount int64) interface {Error func() string}

    • AssertIsNotHandleNativeCoin()

    • BalanceOf(tokenKey string, addr string) int64

    • GetImplementationPackagePath() string

    • IsRegistered(tokenKey string) interface {Error func() string}

    • MustRegistered(tokenKeys ...string)

    • RegisterInitializer(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, initializer func(int, .uverse.realm) gno.land/r/gnoswap/common.ICommon)

    • Render(path string) string

    • SafeGRC20Approve(int, rlm interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, tokenKey string, spender string, amount int64)

    • SafeGRC20Transfer(int, rlm interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, tokenKey string, to string, amount int64)

    • SafeGRC20TransferFrom(int, rlm interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, tokenKey string, from string, to string, amount int64)

    • TotalSupply(tokenKey string) int64

    • Transfer(int, rlm interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, tokenKey string, to string, amount int64) interface {Error func() string}

    • TransferFrom(int, rlm interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, tokenKey string, from string, to string, amount int64) interface {Error func() string}

    • UpgradeImpl(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, packagePath string)

    • ValidateRegistered(tokenKeys ...string) interface {Error func() string}

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

    Rendered

    RenderedRawgnoweb ↗
    8 ValidateNotHandleNativeCoin() error
    9
    10 // IsRegistered checks whether tokenKey identifies a registered token.
    11 //
    12 // Parameters:
    13 // - tokenKey: token registry key to validate and look up
    14 //
    15 // Returns:
    16 // - error: nil when tokenKey is valid and registered; non-nil for an invalid or unregistered key
    17 IsRegistered(tokenKey string) error
    18
    19 // ValidateRegistered checks each token key in order.
    20 //
    21 // Parameters:
    22 // - tokenKeys: token registry keys that must all be valid and registered
    23 //
    24 // Returns:
    25 // - error: nil when every key is registered; otherwise the first registration failure in input order
    26 ValidateRegistered(tokenKeys ...string) error
    27
    28 // TotalSupply returns the total supply of a registered token.
    29 //
    30 // Parameters:
    31 // - tokenKey: token registry key whose supply is queried
    32 //
    33 // Returns:
    34 // - totalSupply: token's total supply; panics if tokenKey is invalid or unregistered
    35 TotalSupply(tokenKey string) int64
    36
    37 // BalanceOf returns a registered token's balance for an address.
    38 //
    39 // Parameters:
    40 // - tokenKey: token registry key whose balance is queried
    41 // - addr: account address whose token balance is queried
    42 //
    43 // Returns:
    44 // - balance: token units held by addr; panics if tokenKey is invalid or unregistered
    45 BalanceOf(tokenKey string, addr address) int64
    46
    47 // Allowance returns the approved spendable amount for an owner/spender pair.
    48 //
    49 // Parameters:
    50 // - tokenKey: token registry key whose allowance is queried
    51 // - owner: account that granted spending approval
    52 // - spender: account allowed to spend owner's tokens
    53 //
    54 // Returns:
    55 // - allowance: token units owner has approved for spender; panics if tokenKey is invalid or unregistered
    56 Allowance(tokenKey string, owner, spender address) int64
    57
    58 // Transfer asks the token teller bound to rlm to move tokens to to.
    59 //
    60 // Parameters:
    61 // - _: leading token-call discriminator; callers pass 0
    62 // - rlm: propagated realm context used to bind the token teller and invoke the transfer
    63 // - tokenKey: token registry key whose tokens are transferred
    64 // - to: recipient account address
    65 // - amount: number of token units to transfer
    66 //
    67 // Returns:
    68 // - error: nil when the teller completes the transfer; non-nil when token validation or transfer rules reject it
    69 Transfer(_ int, rlm realm, tokenKey string, to address, amount int64) error
    70
    71 // TransferFrom asks the token teller bound to rlm to transfer tokens from one account to another.
    72 //
    73 // Parameters:
    74 // - _: leading token-call discriminator; callers pass 0
    75 // - rlm: propagated realm context used to bind the token teller and invoke the transfer
    76 // - tokenKey: token registry key whose tokens are transferred
    77 // - from: account whose token balance is debited
    78 // - to: recipient account address
    79 // - amount: number of token units to transfer
    80 //
    81 // Returns:
    82 // - error: nil when the teller completes the transfer; non-nil when token validation, allowance, or balance rules reject it
    83 TransferFrom(_ int, rlm realm, tokenKey string, from, to address, amount int64) error
    84
    85 // Approve asks the token teller bound to rlm to set spender's allowance.
    86 //
    87 // Parameters:
    88 // - _: leading token-call discriminator; callers pass 0
    89 // - rlm: propagated realm context used to bind the token teller and invoke approval
    90 // - tokenKey: token registry key whose tokens are approved
    91 // - spender: account receiving permission to spend the caller's tokens
    92 // - amount: number of token units to authorize
    93 //
    94 // Returns:
    95 // - error: nil when the teller records the allowance; non-nil when token validation or approval rules reject it
    96 Approve(_ int, rlm realm, tokenKey string, spender address, amount int64) error
    97 Render(path string) string
    98}
    99

    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.