PathrockNetwork Gno Explorer
HomeBlocksTransactionsTokensRealmsPackagesValidatorsAnalytics

PathrockNetwork Gno Explorer — an independent explorer for Gno.land Mainnet (gnoland-1), operated by PathrockNetwork. Not an official Gno.land service.

gnowebarchive RPC

gno.land/r/gnoswap/halt/v1

Realm
Open in gnoweb ↗

Overview

Kind
Realm (renderable)
Name
v1
Namespace
gnoswap / halt
Files
11 (README)(gnomod.toml)
Exported functions
32
Module
gno.land/r/gnoswap/halt/v1
gno
0.9

Files (11)

  • README.mdmarkdown
  • gnomod.tomltoml
  • assert.gnogno
  • config.gnogno
  • doc.gnogno
  • errors.gnogno
  • getters.gnogno
  • halt_state.gnogno
  • halt.gnogno
  • render.gnogno
  • types.gnogno
  • halt_state.gnogno
    1package halt23type HaltStateManager map[OpType]bool45// IsOperationHalted returns the halt state for an operation type.6//7// Parameters:8//   - op: operation type whose halt flag is queried.9//10// Returns:11//   - halted: configured halt flag for op.12//   - error: nil when op exists; otherwise errOpTypeNotFound.13func (h HaltStateManager) IsOperationHalted(op OpType) (bool, error) {14	return h.getOperationHalted(op)15}1617// ToConfig converts the HaltStateManager to an independent HaltConfig copy.18//19// Returns:20//   - config: copied operation-to-halt-flag map.21func (h HaltStateManager) ToConfig() HaltConfig {22	config := make(HaltConfig)23	for op, halted := range h {24		config[op] = halted25	}26	return config27}2829// getOperationHalted retrieves halt state for the specified operation type.30//31// Errors:32//   - errOpTypeNotFound: the specified operation type does not exist in the manager33func (h HaltStateManager) getOperationHalted(op OpType) (bool, error) {34	halted, exists := h[op]35	if !exists {36		return false, makeErrorWithDetails(errOpTypeNotFound, op.String())37	}3839	return halted, nil40}4142func (h HaltStateManager) setOperationHalted(op OpType, halted bool) error {43	if !op.IsValid() {44		return makeErrorWithDetails(errInvalidOpType, op.String())45	}4647	h[op] = halted4849	return nil50}5152func (h HaltStateManager) updateOperationHaltsByConfig(config HaltConfig) error {53	for op, halted := range config {54		if err := h.setOperationHalted(op, halted); err != nil {55			return err56		}57	}5859	return nil60}6162func newHaltStateManagerByConfig(config HaltConfig) HaltStateManager {63	haltState := make(HaltStateManager)6465	for _, op := range OpTypes() {66		halted, exists := config[op]67		if !exists {68			halted = true69		}7071		haltState[op] = halted72	}7374	return haltState75}76

    Functions

    • AssertIsNotHaltedCommunityPool()

    • AssertIsNotHaltedEmission()

    • AssertIsNotHaltedGovernance()

    • AssertIsNotHaltedGovStaker()

    • AssertIsNotHaltedLaunchpad()

    • AssertIsNotHaltedOperation(op string)

    • AssertIsNotHaltedPool()

    • AssertIsNotHaltedPosition()

    • AssertIsNotHaltedProtocolFee()

    • AssertIsNotHaltedRouter()

    • AssertIsNotHaltedStaker()

    • AssertIsNotHaltedWithdraw()

    • AssertIsNotHaltedXGns()

    • GetHaltConfig() map[gno.land/r/gnoswap/halt/v1.OpType]bool

    • GetHaltConfigJson() string

    • IsHalted(opTypes ...gno.land/r/gnoswap/halt/v1.OpType) (bool, interface {Error func() string})

    • IsHaltedCommunityPool() bool

    • IsHaltedEmission() bool

    • IsHaltedGovernance() bool

    • IsHaltedGovStaker() bool

    • IsHaltedLaunchpad() bool

    • IsHaltedPool() bool

    • IsHaltedPosition() bool

    • IsHaltedProtocolFee() bool

    • IsHaltedRouter() bool

    • IsHaltedStaker() bool

    • IsHaltedWithdraw() bool

    • IsHaltedXGns() bool

    • OpTypes() []gno.land/r/gnoswap/halt/v1.OpType

    • Render(path string) string

    • SetHaltLevel(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, level string)

    • SetOperationStatus(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, op string, halted bool)

    Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.

    Rendered

    RenderedRawgnoweb ↗

    vm/qrender output, sanitized (docs/render-security.md) and displayed in an empty-sandbox iframe — scripts, forms and popups cannot run. Links stay inert in-preview; right-click to open.