Search Apps Documentation Source Content File Folder Download Copy Actions Download

halt 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 "https://rpc.test11.testnets.gno.land" -data "gno.land/r/gnoswap/halt.AssertIsNotHaltedCommunityPool()"

Result

AssertIsNotHaltedEmission

func AssertIsNotHaltedEmission()

AssertIsNotHaltedEmission panics if emission operations are halted.

Command

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

Result

AssertIsNotHaltedGovStaker

func AssertIsNotHaltedGovStaker()

AssertIsNotHaltedGovStaker panics if governance staker operations are halted.

Command

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

Result

AssertIsNotHaltedGovernance

func AssertIsNotHaltedGovernance()

AssertIsNotHaltedGovernance panics if governance operations are halted.

Command

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

Result

AssertIsNotHaltedLaunchpad

func AssertIsNotHaltedLaunchpad()

AssertIsNotHaltedLaunchpad panics if launchpad operations are halted.

Command

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

Result

AssertIsNotHaltedOperation

func AssertIsNotHaltedOperation(op OpType)

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

Param

Command

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

Result

AssertIsNotHaltedPool

func AssertIsNotHaltedPool()

AssertIsNotHaltedPool panics if pool operations are halted.

Command

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

Result

AssertIsNotHaltedPosition

func AssertIsNotHaltedPosition()

AssertIsNotHaltedPosition panics if position operations are halted.

Command

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

Result

AssertIsNotHaltedProtocolFee

func AssertIsNotHaltedProtocolFee()

AssertIsNotHaltedProtocolFee panics if protocol fee operations are halted.

Command

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

Result

AssertIsNotHaltedRouter

func AssertIsNotHaltedRouter()

AssertIsNotHaltedRouter panics if router operations are halted.

Command

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

Result

AssertIsNotHaltedStaker

func AssertIsNotHaltedStaker()

AssertIsNotHaltedStaker panics if staker operations are halted.

Command

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

Result

AssertIsNotHaltedWithdraw

func AssertIsNotHaltedWithdraw()

AssertIsNotHaltedWithdraw panics if withdraw operations are halted.

Command

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

Result

AssertIsNotHaltedXGns

func AssertIsNotHaltedXGns()

AssertIsNotHaltedXGns panics if xGNS operations are halted.

Command

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

Result

GetHaltConfigJson

func GetHaltConfigJson() string

GetHaltConfigJson returns the halt configuration as a JSON string.

Command

gnokey query vm/qeval -remote "https://rpc.test11.testnets.gno.land" -data "gno.land/r/gnoswap/halt.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.

Param

Command

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

Result

IsHaltedCommunityPool

func IsHaltedCommunityPool() bool

IsHaltedCommunityPool returns true if community pool operations are halted.

Command

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

Result

IsHaltedEmission

func IsHaltedEmission() bool

IsHaltedEmission returns true if emission operations are halted.

Command

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

Result

IsHaltedGovStaker

func IsHaltedGovStaker() bool

IsHaltedGovStaker returns true if governance staker operations are halted.

Command

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

Result

IsHaltedGovernance

func IsHaltedGovernance() bool

IsHaltedGovernance returns true if governance operations are halted.

Command

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

Result

IsHaltedLaunchpad

func IsHaltedLaunchpad() bool

IsHaltedLaunchpad returns true if launchpad operations are halted.

Command

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

Result

IsHaltedPool

func IsHaltedPool() bool

IsHaltedPool returns true if pool operations are halted.

Command

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

Result

IsHaltedPosition

func IsHaltedPosition() bool

IsHaltedPosition returns true if position operations are halted.

Command

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

Result

IsHaltedProtocolFee

func IsHaltedProtocolFee() bool

IsHaltedProtocolFee returns true if protocol fee operations are halted.

Command

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

Result

IsHaltedRouter

func IsHaltedRouter() bool

IsHaltedRouter returns true if router operations are halted.

Command

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

Result

IsHaltedStaker

func IsHaltedStaker() bool

IsHaltedStaker returns true if staker operations are halted.

Command

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

Result

IsHaltedWithdraw

func IsHaltedWithdraw() bool

IsHaltedWithdraw returns true if withdraw operations are halted.

Command

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

Result

IsHaltedXGns

func IsHaltedXGns() bool

IsHaltedXGns returns true if xGNS operations are halted.

Command

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

Result

SetHaltLevel

func SetHaltLevel(cur realm, level HaltLevel)

SetHaltLevel sets the global halt level. Parameters: - level: halt level to apply (None, SafeMode, Emergency, 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" -func "SetHaltLevel" -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "test11" -remote "https://rpc.test11.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.test11.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/gnoswap/halt" -func "SetHaltLevel" -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test11" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test11.testnets.gno.land" call.tx
  

SetOperationStatus

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

SetOperationStatus sets halt status for a specific operation. Parameters: - op: operation type - halted: true to halt, false to resume 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" -func "SetOperationStatus" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" -broadcast -chainid "test11" -remote "https://rpc.test11.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.test11.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/gnoswap/halt" -func "SetOperationStatus" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test11" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test11.testnets.gno.land" call.tx
  

GetHaltConfig

func GetHaltConfig() HaltConfig

GetHaltConfig returns a copy of the current halt configuration.

Command

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

Result

OpTypes

func OpTypes() []OpType

Command

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

Result