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

xgns source realm

Package xgns implements the GRC20-compliant xGNS token that represents staked GNS tokens. It manages minting/burning ...

Overview

Package xgns implements the GRC20-compliant xGNS token that represents staked GNS tokens. It manages minting/burning operations and tracks voting power for governance.

Functions 6

func BalanceOf

Action
1func BalanceOf(owner address) int64
source

BalanceOf returns token balance for address.

Parameters:

  • owner: address to check balance for

Returns balance amount.

func Burn

crossing Action
1func Burn(cur realm, from address, amount int64)
source

Burn burns tokens from address.

Parameters:

  • from: address to burn from
  • amount: amount to burn

Only callable by governance staker contract.

func Mint

crossing Action
1func Mint(cur realm, to address, amount int64)
source

Mint mints tokens to address.

Parameters:

  • to: recipient address
  • amount: amount to mint

Only callable by governance staker contract.

func Render

1func Render(path string) string
source

Render returns a formatted representation of the token state.

func SupplyInfo

Action
1func SupplyInfo() (totalIssued, issuedByDelegate, issuedByDepositGns int64, err error)
source

SupplyInfo returns supply breakdown information.

Returns:

  • totalIssued: total xGNS tokens issued
  • issuedByDelegate: tokens issued through governance delegation
  • issuedByDepositGns: tokens issued through launchpad deposit
  • error: error if launchpad address not found

Imports 9

Source Files 3