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

halt/v1 package

Overview

Package halt provides functionality for managing protocol halt levels and operations.

Functions

AssertIsNotHaltedCommunityPool

func AssertIsNotHaltedCommunityPool()
Ask AI Claude ChatGPT

AssertIsNotHaltedCommunityPool panics if community pool operations are halted.

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/gnoswap/halt/v1.AssertIsNotHaltedCommunityPool()"

Result

AssertIsNotHaltedEmission

func AssertIsNotHaltedEmission()
Ask AI Claude ChatGPT

AssertIsNotHaltedEmission panics if emission operations are halted.

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/gnoswap/halt/v1.AssertIsNotHaltedEmission()"

Result

AssertIsNotHaltedGovStaker

func AssertIsNotHaltedGovStaker()
Ask AI Claude ChatGPT

AssertIsNotHaltedGovStaker panics if governance staker operations are halted.

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/gnoswap/halt/v1.AssertIsNotHaltedGovStaker()"

Result

AssertIsNotHaltedGovernance

func AssertIsNotHaltedGovernance()
Ask AI Claude ChatGPT

AssertIsNotHaltedGovernance panics if governance operations are halted.

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/gnoswap/halt/v1.AssertIsNotHaltedGovernance()"

Result

AssertIsNotHaltedLaunchpad

func AssertIsNotHaltedLaunchpad()
Ask AI Claude ChatGPT

AssertIsNotHaltedLaunchpad panics if launchpad operations are halted.

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/gnoswap/halt/v1.AssertIsNotHaltedLaunchpad()"

Result

AssertIsNotHaltedOperation

func AssertIsNotHaltedOperation(op OpType)
Ask AI Claude ChatGPT

AssertIsNotHaltedOperation panics if the specified operation type is halted. Panics with error details including operation type name.

Parameters:

  • op: valid operation type whose halt status must permit execution; invalid operation types panic with an invalid-operation error.

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/gnoswap/halt/v1.AssertIsNotHaltedOperation()"

Result

AssertIsNotHaltedPool

func AssertIsNotHaltedPool()
Ask AI Claude ChatGPT

AssertIsNotHaltedPool panics if pool operations are halted.

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/gnoswap/halt/v1.AssertIsNotHaltedPool()"

Result

AssertIsNotHaltedPosition

func AssertIsNotHaltedPosition()
Ask AI Claude ChatGPT

AssertIsNotHaltedPosition panics if position operations are halted.

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/gnoswap/halt/v1.AssertIsNotHaltedPosition()"

Result

AssertIsNotHaltedProtocolFee

func AssertIsNotHaltedProtocolFee()
Ask AI Claude ChatGPT

AssertIsNotHaltedProtocolFee panics if protocol fee operations are halted.

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/gnoswap/halt/v1.AssertIsNotHaltedProtocolFee()"

Result

AssertIsNotHaltedRouter

func AssertIsNotHaltedRouter()
Ask AI Claude ChatGPT

AssertIsNotHaltedRouter panics if router operations are halted.

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/gnoswap/halt/v1.AssertIsNotHaltedRouter()"

Result

AssertIsNotHaltedStaker

func AssertIsNotHaltedStaker()
Ask AI Claude ChatGPT

AssertIsNotHaltedStaker panics if staker operations are halted.

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/gnoswap/halt/v1.AssertIsNotHaltedStaker()"

Result

AssertIsNotHaltedWithdraw

func AssertIsNotHaltedWithdraw()
Ask AI Claude ChatGPT

AssertIsNotHaltedWithdraw panics if withdraw operations are halted.

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/gnoswap/halt/v1.AssertIsNotHaltedWithdraw()"

Result

AssertIsNotHaltedXGns

func AssertIsNotHaltedXGns()
Ask AI Claude ChatGPT

AssertIsNotHaltedXGns panics if xGNS operations are halted.

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/gnoswap/halt/v1.AssertIsNotHaltedXGns()"

Result

GetHaltConfigJson

func GetHaltConfigJson() string
Ask AI Claude ChatGPT

GetHaltConfigJson returns the halt configuration as a JSON string.

Returns:

  • json: JSON object containing each operation type's halt status

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/gnoswap/halt/v1.GetHaltConfigJson()"

Result

IsHalted

func IsHalted(opTypes ...OpType) (bool, error)
Ask AI Claude ChatGPT

IsHalted returns true if any of the specified operation types are halted. Returns error if any operation type is invalid.

Parameters:

  • opTypes: operation types to inspect; an empty list reports no halted operations

Returns:

  • halted: true when any requested operation is halted; on invalid input it is also true alongside the error
  • error: nil when all requested operation types are valid and inspected; an invalid-operation or state error otherwise

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/gnoswap/halt/v1.IsHalted()"

Result

IsHaltedCommunityPool

func IsHaltedCommunityPool() bool
Ask AI Claude ChatGPT

IsHaltedCommunityPool returns true if community pool operations are halted.

Returns:

  • halted: true when community-pool operations are halted; false otherwise

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/gnoswap/halt/v1.IsHaltedCommunityPool()"

Result

IsHaltedEmission

func IsHaltedEmission() bool
Ask AI Claude ChatGPT

IsHaltedEmission returns true if emission operations are halted.

Returns:

  • halted: true when emission operations are halted; false otherwise

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/gnoswap/halt/v1.IsHaltedEmission()"

Result

IsHaltedGovStaker

func IsHaltedGovStaker() bool
Ask AI Claude ChatGPT

IsHaltedGovStaker returns true if governance staker operations are halted.

Returns:

  • halted: true when governance-staker operations are halted; false otherwise

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/gnoswap/halt/v1.IsHaltedGovStaker()"

Result

IsHaltedGovernance

func IsHaltedGovernance() bool
Ask AI Claude ChatGPT

IsHaltedGovernance returns true if governance operations are halted.

Returns:

  • halted: true when governance operations are halted; false otherwise

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/gnoswap/halt/v1.IsHaltedGovernance()"

Result

IsHaltedLaunchpad

func IsHaltedLaunchpad() bool
Ask AI Claude ChatGPT

IsHaltedLaunchpad returns true if launchpad operations are halted.

Returns:

  • halted: true when launchpad operations are halted; false otherwise

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/gnoswap/halt/v1.IsHaltedLaunchpad()"

Result

IsHaltedPool

func IsHaltedPool() bool
Ask AI Claude ChatGPT

IsHaltedPool returns true if pool operations are halted.

Returns:

  • halted: true when pool operations are halted; false otherwise

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/gnoswap/halt/v1.IsHaltedPool()"

Result

IsHaltedPosition

func IsHaltedPosition() bool
Ask AI Claude ChatGPT

IsHaltedPosition returns true if position operations are halted.

Returns:

  • halted: true when position operations are halted; false otherwise

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/gnoswap/halt/v1.IsHaltedPosition()"

Result

IsHaltedProtocolFee

func IsHaltedProtocolFee() bool
Ask AI Claude ChatGPT

IsHaltedProtocolFee returns true if protocol fee operations are halted.

Returns:

  • halted: true when protocol-fee operations are halted; false otherwise

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/gnoswap/halt/v1.IsHaltedProtocolFee()"

Result

IsHaltedRouter

func IsHaltedRouter() bool
Ask AI Claude ChatGPT

IsHaltedRouter returns true if router operations are halted.

Returns:

  • halted: true when router operations are halted; false otherwise

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/gnoswap/halt/v1.IsHaltedRouter()"

Result

IsHaltedStaker

func IsHaltedStaker() bool
Ask AI Claude ChatGPT

IsHaltedStaker returns true if staker operations are halted.

Returns:

  • halted: true when staker operations are halted; false otherwise

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/gnoswap/halt/v1.IsHaltedStaker()"

Result

IsHaltedWithdraw

func IsHaltedWithdraw() bool
Ask AI Claude ChatGPT

IsHaltedWithdraw returns true if withdraw operations are halted.

Returns:

  • halted: true when withdrawal operations are halted; false otherwise

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/gnoswap/halt/v1.IsHaltedWithdraw()"

Result

IsHaltedXGns

func IsHaltedXGns() bool
Ask AI Claude ChatGPT

IsHaltedXGns returns true if xGNS operations are halted.

Returns:

  • halted: true when xGNS operations are halted; false otherwise

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/gnoswap/halt/v1.IsHaltedXGns()"

Result

Render

func Render(path string) string
Ask AI Claude ChatGPT

Render returns the current halt status for every operation.

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/gnoswap/halt/v1.Render()"

Result

SetHaltLevel

func SetHaltLevel(cur realm, level HaltLevel)
Ask AI Claude ChatGPT

SetHaltLevel sets the global halt level.

Parameters:

  • cur: Current realm context; callers use cross(cur) when crossing into this realm.
  • level: halt level to apply (None, SafeMode, Emergency, or Complete).

Only callable by admin or governance.

Param

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/halt/v1" -func "SetHaltLevel" -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/halt/v1" -func "SetHaltLevel" -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
  

SetOperationStatus

func SetOperationStatus(cur realm, op OpType, halted bool)
Ask AI Claude ChatGPT

SetOperationStatus sets the halt status for a specific operation.

Parameters:

  • cur: Current realm context; callers use cross(cur) when crossing into this realm.
  • op: operation type whose halt status is changed.
  • halted: true to block the operation, false to allow it.

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/halt/v1" -func "SetOperationStatus" -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/halt/v1" -func "SetOperationStatus" -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
  

GetHaltConfig

func GetHaltConfig() HaltConfig
Ask AI Claude ChatGPT

GetHaltConfig returns a copy of the current halt configuration.

Returns:

  • config: copy of the current halt status keyed by operation type

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/gnoswap/halt/v1.GetHaltConfig()"

Result

OpTypes

func OpTypes() []OpType
Ask AI Claude ChatGPT

OpTypes returns all operation types currently supported by the halt configuration.

Returns:

  • operationTypes: slice containing each defined operation type in map iteration order

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/gnoswap/halt/v1.OpTypes()"

Result