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

tokenfactory_v2 package

Overview

Package tokenfactory — Samouraï Coop Token Factory

A curated GRC20 token factory with on-chain platform fees, event emission, input validation, and faucet rate limiting.

Forked from gno.land/r/demo/defi/grc20factory with improvements. Uses the standard gno.land/p/demo/tokens/grc20 package and registers tokens with gno.land/r/demo/defi/grc20reg for full ecosystem compatibility.

Improvements over upstream:

  • On-chain platform fee on Mint and initial supply, read live from the DAO fee spine (memba_market_config, lane "token") — D3(b) ruling
  • chain.Emit events for all state-changing operations
  • Symbol validation (1-10 uppercase alphanumeric)
  • Faucet rate limiting (~24h cooldown per address)
  • Optional token metadata (description, website, IPFS logo)

All original function signatures are preserved for 100% API compatibility.

Function

TotalSupply

func TotalSupply(symbol string) int64

Param

Command

gnokey query vm/qeval -remote "https://rpc.pearl.testnets.gno.land" -data "gno.land/r/samcrew/tokenfactory_v2.TotalSupply()"

Result