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

router/v2 package

Overview

package router handles token swaps through GnoSwap liquidity pools.

The router provides user-facing swap functions with slippage protection, multi-hop routing, and both exact-input and exact-output swap modes.

Live exact-input calls enforce a minimum output and deadline. Live exact-output calls enforce a maximum input and deadline. DrySwapRoute is read-only and has no deadline or transfer.

Function

NewRouteParser

func NewRouteParser() *RouteParser
Ask AI Claude ChatGPT

NewRouteParser creates a parser for comma-separated route and quote strings.

Returns:

  • parser: new RouteParser instance

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/gnoswap/router/v2.NewRouteParser()"

Result

Gno Expression Evaluator

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