Skip to content Search Apps Documentation Source Content Run Reset Eval Playground File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

whitelist package

Overview

Package whitelist manages the direct pools available to GnoSwap orders.

DCA and Limit have independent pool whitelists, selected by TargetDCA ("dca") and TargetLimit ("limit"). Adding or removing a pool affects only the selected target. Pools must exist before being added; removing one prevents that target's orders from trading on it, not from cancelling.

Admin, governance, or callers authorized by gno.land/r/gnoswap/order/keeper can update membership. At deployment, AddWhitelistedPool and RemoveWhitelistedPool are assigned to PoolManagerRole on this realm; the target argument selects the pool list, not the authorization policy. Queries expose membership, a read-only pool tree, and whether a pair has an existing whitelisted direct pool at any registered fee tier.

Files:

  • whitelist.gno: AddWhitelistedPool and RemoveWhitelistedPool
  • getters.gno: read-only queries
  • state.gno: independent DCA and Limit whitelist states
  • assert.gno: authorization, target, and pool validation
  • consts.gno: supported target names
  • emits.gno: pool membership events

Function

IsWhitelistedPool

func IsWhitelistedPool(target, poolPath string) bool
Ask AI Claude ChatGPT

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/gnoswap/order/whitelist.IsWhitelistedPool(,)"

Result

Gno Expression Evaluator

Evaluate any read-only Gno expression against gno.land/r/gnoswap/order/whitelist, for example a function call with arguments.