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

halt package

Overview

Package halt holds the halt switches shared by the GnoSwap order realms (gno.land/r/gnoswap/order/...).

Each target (an order type such as "dca" or "limit") has a switch per operation. Admin or governance turns a switch on for one target, or for every target with TargetAll, and can add targets for new order realms. Order realms check IsHalted with their own target, which reports the operation halted when either switch is on, and decide which entry points each operation guards.

Operations:

  • OperationExecute: creating or executing orders
  • OperationWithdraw: executing orders, paying out or refunding funds

The switches are independent of the GnoSwap protocol halt levels.

Function

SetHalted

func SetHalted(cur realm, target string, operation string, isHalted bool)
Ask AI Claude ChatGPT

SetHalted halts or resumes operation for target. Admin or governance only.

Parameters:

  • target: a registered target, or TargetAll for every target.
  • operation: OperationExecute or OperationWithdraw.

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/order/halt" -func "SetHalted" -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "onyx-1" -remote "https://rpc.onyx.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.onyx.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/gnoswap/order/halt" -func "SetHalted" -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "onyx-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.onyx.testnets.gno.land" call.tx
  

Gno Expression Evaluator

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