Search Apps Documentation Source Content File Folder Download Copy Actions Download

community_pool package

Overview

Package community\_pool manages the GnoSwap community treasury. This contract holds protocol-owned assets that can be allocated through governance proposals. It receives a portion of GNS emissions and can be used for ecosystem development, grants, and protocol improvements.

Functions

GetBalanceOf

func GetBalanceOf(tokenPath string) int64

GetBalanceOf returns the balance of a specific token held by the community pool. Parameters: - tokenPath: the path to the token contract (e.g., "gno.land/r/gnoswap/gns") Returns the balance of the specified token held by the community pool.

Param

Command

gnokey query vm/qeval -remote "https://rpc.test11.testnets.gno.land" -data "gno.land/r/gnoswap/community_pool.GetBalanceOf()"

Result

TransferToken

func TransferToken(cur realm, tokenPath string, to address, amount int64)

TransferToken transfers tokens from the community pool. Parameters: - tokenPath: token contract path - to: recipient address - amount: transfer amount Only callable by admin or governance.

Params

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/gnoswap/community_pool" -func "TransferToken" -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "test11" -remote "https://rpc.test11.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.test11.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/gnoswap/community_pool" -func "TransferToken" -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test11" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test11.testnets.gno.land" call.tx