Search Apps Documentation Source Content File Folder Download Copy Actions Download 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()

AssertIsNotHaltedCommunityPool panics if community pool operations are halted.

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/halt/v1.AssertIsNotHaltedCommunityPool()"

Result

AssertIsNotHaltedEmission

func AssertIsNotHaltedEmission()

AssertIsNotHaltedEmission panics if emission operations are halted.

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/halt/v1.AssertIsNotHaltedEmission()"

Result

AssertIsNotHaltedGovStaker

func AssertIsNotHaltedGovStaker()

AssertIsNotHaltedGovStaker panics if governance staker operations are halted.

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/halt/v1.AssertIsNotHaltedGovStaker()"

Result

AssertIsNotHaltedGovernance

func AssertIsNotHaltedGovernance()

AssertIsNotHaltedGovernance panics if governance operations are halted.

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/halt/v1.AssertIsNotHaltedGovernance()"

Result

AssertIsNotHaltedLaunchpad

func AssertIsNotHaltedLaunchpad()

AssertIsNotHaltedLaunchpad panics if launchpad operations are halted.

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/halt/v1.AssertIsNotHaltedLaunchpad()"

Result

AssertIsNotHaltedOperation

func AssertIsNotHaltedOperation(op OpType)

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 "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/halt/v1.AssertIsNotHaltedOperation()"

Result

AssertIsNotHaltedPool

func AssertIsNotHaltedPool()

AssertIsNotHaltedPool panics if pool operations are halted.

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/halt/v1.AssertIsNotHaltedPool()"

Result

AssertIsNotHaltedPosition

func AssertIsNotHaltedPosition()

AssertIsNotHaltedPosition panics if position operations are halted.

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/halt/v1.AssertIsNotHaltedPosition()"

Result

AssertIsNotHaltedProtocolFee

func AssertIsNotHaltedProtocolFee()

AssertIsNotHaltedProtocolFee panics if protocol fee operations are halted.

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/halt/v1.AssertIsNotHaltedProtocolFee()"

Result

AssertIsNotHaltedRouter

func AssertIsNotHaltedRouter()

AssertIsNotHaltedRouter panics if router operations are halted.

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/halt/v1.AssertIsNotHaltedRouter()"

Result

AssertIsNotHaltedStaker

func AssertIsNotHaltedStaker()

AssertIsNotHaltedStaker panics if staker operations are halted.

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/halt/v1.AssertIsNotHaltedStaker()"

Result

AssertIsNotHaltedWithdraw

func AssertIsNotHaltedWithdraw()

AssertIsNotHaltedWithdraw panics if withdraw operations are halted.

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/halt/v1.AssertIsNotHaltedWithdraw()"

Result

AssertIsNotHaltedXGns

func AssertIsNotHaltedXGns()

AssertIsNotHaltedXGns panics if xGNS operations are halted.

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/halt/v1.AssertIsNotHaltedXGns()"

Result

GetHaltConfigJson

func GetHaltConfigJson() string

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 "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/halt/v1.GetHaltConfigJson()"

Result

IsHalted

func IsHalted(opTypes ...OpType) (bool, error)

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 "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/halt/v1.IsHalted()"

Result

IsHaltedCommunityPool

func IsHaltedCommunityPool() bool

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 "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/halt/v1.IsHaltedCommunityPool()"

Result

IsHaltedEmission

func IsHaltedEmission() bool

IsHaltedEmission returns true if emission operations are halted.

Returns:

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

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/halt/v1.IsHaltedEmission()"

Result

IsHaltedGovStaker

func IsHaltedGovStaker() bool

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 "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/halt/v1.IsHaltedGovStaker()"

Result

IsHaltedGovernance

func IsHaltedGovernance() bool

IsHaltedGovernance returns true if governance operations are halted.

Returns:

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

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/halt/v1.IsHaltedGovernance()"

Result

IsHaltedLaunchpad

func IsHaltedLaunchpad() bool

IsHaltedLaunchpad returns true if launchpad operations are halted.

Returns:

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

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/halt/v1.IsHaltedLaunchpad()"

Result

IsHaltedPool

func IsHaltedPool() bool

IsHaltedPool returns true if pool operations are halted.

Returns:

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

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/halt/v1.IsHaltedPool()"

Result

IsHaltedPosition

func IsHaltedPosition() bool

IsHaltedPosition returns true if position operations are halted.

Returns:

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

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/halt/v1.IsHaltedPosition()"

Result

IsHaltedProtocolFee

func IsHaltedProtocolFee() bool

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 "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/halt/v1.IsHaltedProtocolFee()"

Result

IsHaltedRouter

func IsHaltedRouter() bool

IsHaltedRouter returns true if router operations are halted.

Returns:

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

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/halt/v1.IsHaltedRouter()"

Result

IsHaltedStaker

func IsHaltedStaker() bool

IsHaltedStaker returns true if staker operations are halted.

Returns:

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

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/halt/v1.IsHaltedStaker()"

Result

IsHaltedWithdraw

func IsHaltedWithdraw() bool

IsHaltedWithdraw returns true if withdraw operations are halted.

Returns:

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

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/halt/v1.IsHaltedWithdraw()"

Result

IsHaltedXGns

func IsHaltedXGns() bool

IsHaltedXGns returns true if xGNS operations are halted.

Returns:

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

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/halt/v1.IsHaltedXGns()"

Result

Render

func Render(path string) string

Render returns the current halt status for every operation.

Param

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/halt/v1.Render()"

Result

SetHaltLevel

func SetHaltLevel(cur realm, level HaltLevel)

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 "gnoland-1" -remote "http://127.0.0.1:26657" ADDRESSgnokey query -remote "http://127.0.0.1:26657" 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 "gnoland-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "http://127.0.0.1:26657" call.tx
  

SetOperationStatus

func SetOperationStatus(cur realm, op OpType, halted bool)

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 "gnoland-1" -remote "http://127.0.0.1:26657" ADDRESSgnokey query -remote "http://127.0.0.1:26657" 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 "gnoland-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "http://127.0.0.1:26657" call.tx
  

GetHaltConfig

func GetHaltConfig() HaltConfig

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 "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/halt/v1.GetHaltConfig()"

Result

OpTypes

func OpTypes() []OpType

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 "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/halt/v1.OpTypes()"

Result