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/gov/governance

Realm
Open in gnoweb ↗

Overview

Kind
Realm (renderable)
Name
governance
Namespace
gnoswap / gov
Files
21 (README)(gnomod.toml)
Exported functions
64
Module
gno.land/r/gnoswap/gov/governance
gno
0.9

Files (21)

  • README.mdmarkdown
  • gnomod.tomltoml
  • accessor.gnogno
  • config.gnogno
  • counter.gnogno
  • doc.gnogno
  • getters.gnogno
  • proposal_action_status.gnogno
  • proposal_data.gnogno
  • proposal_schedule_status.gnogno
  • proposal_status.gnogno
  • proposal_type.gnogno
  • proposal_vote_status.gnogno
  • proposal.gnogno
  • proxy.gnogno
  • render.gnogno
  • state.gnogno
  • store.gnogno
  • types.gnogno
  • upgrade.gnogno
  • voting_info.gnogno
  • proposal_action_status.gnogno
    1package governance23// ProposalActionStatus tracks the execution and cancellation status of a proposal.4// This structure manages the action-related state including who performed actions and when.5type ProposalActionStatus struct {6	canceled       bool    // Whether the proposal has been canceled7

    Functions

    • Cancel(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}, proposalId int64) int64

    • DefaultVotingInfo() struct{availableVoteWeight int64; votedWeight int64; votedHeight int64; votedAt int64; votedYes bool; voted bool}

    • Execute(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}, proposalId int64) int64

    • ExistsProposal(proposalID int64) bool

    • ExistsVotingInfo(proposalID int64, addr string) bool

    • GetConfig(configVersion int64) (struct{VotingStartDelay int64; VotingPeriod int64; VotingWeightSmoothingDuration int64; Quorum int64; ProposalCreationThreshold int64; ExecutionDelay int64; ExecutionWindow int64}, interface {Error func() string})

    • GetConfigVersionByProposalId(proposalId int64) (int64, interface {Error func() string})

    • GetCurrentProposalID() int64

    • GetCurrentVotingWeightSnapshot() (int64, int64, interface {Error func() string})

    • GetDescriptionByProposalId(proposalId int64) (string, interface {Error func() string})

    • GetImplementationPackagePath() string

    • GetLatestConfig() (struct{VotingStartDelay int64; VotingPeriod int64; VotingWeightSmoothingDuration int64; Quorum int64; ProposalCreationThreshold int64; ExecutionDelay int64; ExecutionWindow int64}, interface {Error func() string})

    • GetLatestConfigVersion() int64

    • GetMaxSmoothingPeriod() int64

    • GetNayByProposalId(proposalId int64) (int64, interface {Error func() string})

    • GetOldestActiveProposalSnapshotTime() (int64, bool, interface {Error func() string})

    • GetProposalCommunityPoolSpendInfo(proposalID int64) (*gno.land/r/gnoswap/gov/governance.CommunityPoolSpendInfo, interface {Error func() string})

    • GetProposalCreatedAt(proposalId int64) (int64, interface {Error func() string})

    • GetProposalCreatedHeight(proposalId int64) (int64, interface {Error func() string})

    • GetProposalExecutionInfo(proposalID int64) (*gno.land/r/gnoswap/gov/governance.ExecutionInfo, interface {Error func() string})

    • GetProposals() *gno.land/p/nt/bptree/rotree/v0.ReadOnlyTree

    • GetProposalStatusByProposalId(proposalId int64) (string, interface {Error func() string})

    • GetProposalTypeByProposalId(proposalId int64) (string, interface {Error func() string})

    • GetProposerByProposalId(proposalId int64) (string, interface {Error func() string})

    • GetQuorumAmountByProposalId(proposalId int64) (int64, interface {Error func() string})

    • GetTitleByProposalId(proposalId int64) (string, interface {Error func() string})

    • GetUserProposals() *gno.land/p/nt/bptree/rotree/v0.ReadOnlyTree

    • GetVotedAt(proposalID int64, addr string) (int64, interface {Error func() string})

    • GetVotedHeight(proposalID int64, addr string) (int64, interface {Error func() string})

    • GetVoteStatus(proposalId int64) (quorum int64, maxVotingWeight int64, yesWeight int64, noWeight int64, err interface {Error func() string})

    • GetVoteWeight(proposalID int64, addr string) (int64, interface {Error func() string})

    • GetVotingInfos(proposalID int64) *gno.land/p/nt/bptree/rotree/v0.ReadOnlyTree

    • GetYeaByProposalId(proposalId int64) (int64, interface {Error func() string})

    • NewCommunityPoolSpendInfo(to string, tokenPath string, amount int64) *gno.land/r/gnoswap/gov/governance.CommunityPoolSpendInfo

    • NewConfig(votingStartDelay int64, votingPeriod int64, votingWeightSmoothingDuration int64, quorum int64, proposalCreationThreshold int64, executionDelay int64, executionWindow int64) struct{VotingStartDelay int64; VotingPeriod int64; VotingWeightSmoothingDuration int64; Quorum int64; ProposalCreationThreshold int64; ExecutionDelay int64; ExecutionWindow int64}

    • NewConfigPtr(votingStartDelay int64, votingPeriod int64, votingWeightSmoothingDuration int64, quorum int64, proposalCreationThreshold int64, executionDelay int64, executionWindow int64) *gno.land/r/gnoswap/gov/governance.Config

    • NewConfigTree() *gno.land/p/nt/bptree/v0.BPTree

    • NewCounter() *gno.land/r/gnoswap/gov/governance.Counter

    • NewDefaultConfig() struct{VotingStartDelay int64; VotingPeriod int64; VotingWeightSmoothingDuration int64; Quorum int64; ProposalCreationThreshold int64; ExecutionDelay int64; ExecutionWindow int64}

    • NewExecutionInfo(num int64, msgs []string) *gno.land/r/gnoswap/gov/governance.ExecutionInfo

    • NewGovernanceStore(kvStore interface {AddAuthorizedCaller func(int, .uverse.realm, .uverse.address, gno.land/p/gnoswap/store/v1.Permission) .uverse.error; Delete func(int, .uverse.realm, string) .uverse.error; Get func(string) (interface {}, .uverse.error); GetAddress func(string) (.uverse.address, .uverse.error); GetAllKeys func() ([]string, .uverse.error); GetAuthorizedCallers func() (map[.uverse.address]gno.land/p/gnoswap/store/v1.Permission, .uverse.error); GetBPTree func(string) (*gno.land/p/nt/bptree/v0.BPTree, .uverse.error); GetBool func(string) (bool, .uverse.error); GetDomainAddress func() .uverse.address; GetInt64 func(string) (int64, .uverse.error); GetString func(string) (string, .uverse.error); GetUint64 func(string) (uint64, .uverse.error); Has func(string) bool; IsWriteAuthorized func(.uverse.address) bool; RemoveAuthorizedCaller func(int, .uverse.realm, .uverse.address) .uverse.error; Set func(int, .uverse.realm, string, interface {}) .uverse.error; UpdateAuthorizedCaller func(int, .uverse.realm, .uverse.address, gno.land/p/gnoswap/store/v1.Permission) .uverse.error}) interface {AddUserProposal func(int, .uverse.realm, string, int64) .uverse.error; GetActiveProposalsBySnapshot func() *gno.land/p/nt/bptree/v0.BPTree; GetConfig func(int64) (gno.land/r/gnoswap/gov/governance.Config, bool); GetConfigCounter func() *gno.land/r/gnoswap/gov/governance.Counter; GetProposal func(int64) (*gno.land/r/gnoswap/gov/governance.Proposal, bool); GetProposalCounter func() *gno.land/r/gnoswap/gov/governance.Counter; GetProposalUserVotingInfos func() *gno.land/p/nt/bptree/v0.BPTree; GetProposalVotingInfos func(int64) (*gno.land/p/nt/bptree/v0.BPTree, bool); GetProposals func() *gno.land/p/nt/bptree/v0.BPTree; GetUserProposalIDs func(string) ([]int64, bool); GetUserProposals func() *gno.land/p/nt/bptree/v0.BPTree; HasActiveProposalsBySnapshotStoreKey func() bool; HasConfigCounterStoreKey func() bool; HasConfigsStoreKey func() bool; HasProposalCounterStoreKey func() bool; HasProposalUserVotingInfosStoreKey func() bool; HasProposalsStoreKey func() bool; HasUserProposalsStoreKey func() bool; RemoveUserProposal func(int, .uverse.realm, string, int64) .uverse.error; SetActiveProposalsBySnapshot func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetConfig func(int, .uverse.realm, int64, gno.land/r/gnoswap/gov/governance.Config) .uverse.error; SetConfigCounter func(int, .uverse.realm, *gno.land/r/gnoswap/gov/governance.Counter) .uverse.error; SetConfigs func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetProposal func(int, .uverse.realm, int64, *gno.land/r/gnoswap/gov/governance.Proposal) .uverse.error; SetProposalCounter func(int, .uverse.realm, *gno.land/r/gnoswap/gov/governance.Counter) .uverse.error; SetProposalUserVotingInfos func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetProposalVotingInfos func(int, .uverse.realm, int64, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetProposals func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error; SetUserProposals func(int, .uverse.realm, *gno.land/p/nt/bptree/v0.BPTree) .uverse.error}

    • NewParameterChangeInfo(pkgPath string, function string, params []string) struct{pkgPath string; function string; params []string}

    • NewProposal(proposalID int64, status *gno.land/r/gnoswap/gov/governance.ProposalStatus, metadata *gno.land/r/gnoswap/gov/governance.ProposalMetadata, data *gno.land/r/gnoswap/gov/governance.ProposalData, proposerAddress string, configVersion int64, snapshotTime int64, createdHeight int64) *gno.land/r/gnoswap/gov/governance.Proposal

    • NewProposalActionStatus(executable bool) *gno.land/r/gnoswap/gov/governance.ProposalActionStatus

    • NewProposalData(proposalType string, communityPoolSpend *gno.land/r/gnoswap/gov/governance.CommunityPoolSpendInfo, execution *gno.land/r/gnoswap/gov/governance.ExecutionInfo) *gno.land/r/gnoswap/gov/governance.ProposalData

    • NewProposalMetadata(title string, description string) *gno.land/r/gnoswap/gov/governance.ProposalMetadata

    • NewProposalScheduleStatus(createTime int64, activeTime int64, votingEndTime int64, executableTime int64, expiredTime int64) *gno.land/r/gnoswap/gov/governance.ProposalScheduleStatus

    • NewProposalStatusBy(schedule *gno.land/r/gnoswap/gov/governance.ProposalScheduleStatus, actionStatus *gno.land/r/gnoswap/gov/governance.ProposalActionStatus, voteStatus *gno.land/r/gnoswap/gov/governance.ProposalVoteStatus) *gno.land/r/gnoswap/gov/governance.ProposalStatus

    • NewProposalTree() *gno.land/p/nt/bptree/v0.BPTree

    • NewProposalUserVotingInfoTree() *gno.land/p/nt/bptree/v0.BPTree

    • NewProposalVoteStatus(maxVotingWeight int64, quorumAmount int64) *gno.land/r/gnoswap/gov/governance.ProposalVoteStatus

    • NewUserProposalTree() *gno.land/p/nt/bptree/v0.BPTree

    • NewVotedVotingInfo(availableVoteWeight int64, votedYes bool, votedWeight int64, votedHeight int64, votedAt int64) struct{availableVoteWeight int64; votedWeight int64; votedHeight int64; votedAt int64; votedYes bool; voted bool}

    • NewVotingInfo(availableVoteWeight int64) struct{availableVoteWeight int64; votedWeight int64; votedHeight int64; votedAt int64; votedYes bool; voted bool}

    • NewVotingInfoTree() *gno.land/p/nt/bptree/v0.BPTree

    • ProposeCommunityPoolSpend(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}, title string, description string, to string, tokenPath string, amount int64) int64

    • ProposeParameterChange(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}, title string, description string, numToExecute int64, executions string) int64

    • ProposeText(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}, title string, description string) int64

    • Reconfigure(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}, votingStartDelay int64, votingPeriod int64, votingWeightSmoothingDuration int64, quorum int64, proposalCreationThreshold int64, executionDelay int64, executionWindow int64) int64

    • RegisterInitializer(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}, initializer func(int, .uverse.realm, gno.land/r/gnoswap/gov/governance.IGovernanceStore, gno.land/r/gnoswap/gov/governance.GovStakerAccessor) gno.land/r/gnoswap/gov/governance.IGovernance)

    • RemoveInactiveProposalFromIndex(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}, proposalID int64)

    • Render(path string) string

    • UpgradeImpl(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}, targetPackagePath string)

    • Vote(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}, proposalId int64, yes bool) string

    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.

    canceledAt int64 // Timestamp when proposal was canceled
    8 canceledHeight int64 // Block height when proposal was canceled
    9 canceledBy address // Who canceled the proposal
    10
    11 executed bool // Whether the proposal has been executed
    12 executedAt int64 // Timestamp when proposal was executed
    13 executedHeight int64 // Block height when proposal was executed
    14 executedBy address // Who executed the proposal
    15
    16 executable bool // Whether this proposal type supports execution
    17}
    18
    19/* Getter methods */
    20// Canceled reports whether this proposal has been marked canceled.
    21//
    22// Returns:
    23// - bool: true when cancellation has been recorded
    24func (p *ProposalActionStatus) Canceled() bool { return p.canceled }
    25
    26// CanceledAt returns the timestamp recorded when the proposal was canceled.
    27//
    28// Returns:
    29// - int64: cancellation timestamp, or zero when none has been recorded
    30func (p *ProposalActionStatus) CanceledAt() int64 { return p.canceledAt }
    31
    32// CanceledHeight returns the block height recorded when the proposal was canceled.
    33//
    34// Returns:
    35// - int64: cancellation block height, or zero when none has been recorded
    36func (p *ProposalActionStatus) CanceledHeight() int64 { return p.canceledHeight }
    37
    38// Executed reports whether this proposal has been marked executed.
    39//
    40// Returns:
    41// - bool: true when execution has been recorded
    42func (p *ProposalActionStatus) Executed() bool { return p.executed }
    43
    44// ExecutedAt returns the timestamp recorded when the proposal was executed.
    45//
    46// Returns:
    47// - int64: execution timestamp, or zero when none has been recorded
    48func (p *ProposalActionStatus) ExecutedAt() int64 { return p.executedAt }
    49
    50// ExecutedHeight returns the block height recorded when the proposal was executed.
    51//
    52// Returns:
    53// - int64: execution block height, or zero when none has been recorded
    54func (p *ProposalActionStatus) ExecutedHeight() int64 { return p.executedHeight }
    55
    56// Executable reports whether this proposal type supports execution.
    57//
    58// Returns:
    59// - bool: true when the proposal's action can be executed
    60func (p *ProposalActionStatus) Executable() bool { return p.executable }
    61
    62/* Setter methods */
    63// SetCanceled records whether the proposal is canceled.
    64//
    65// Parameters:
    66// - canceled: cancellation state to store
    67func (p *ProposalActionStatus) SetCanceled(canceled bool) {
    68 p.canceled = canceled
    69}
    70
    71// SetCanceledAt records the timestamp associated with proposal cancellation.
    72//
    73// Parameters:
    74// - canceledAt: cancellation timestamp to store
    75func (p *ProposalActionStatus) SetCanceledAt(canceledAt int64) {
    76 p.canceledAt = canceledAt
    77}
    78
    79// SetCanceledHeight records the block height associated with proposal cancellation.
    80//
    81// Parameters:
    82// - canceledHeight: cancellation block height to store
    83func (p *ProposalActionStatus) SetCanceledHeight(canceledHeight int64) {
    84 p.canceledHeight = canceledHeight
    85}
    86
    87// SetCanceledBy records the address that canceled the proposal.
    88//
    89// Parameters:
    90// - canceledBy: address of the actor that canceled the proposal
    91func (p *ProposalActionStatus) SetCanceledBy(canceledBy address) {
    92 p.canceledBy = canceledBy
    93}
    94
    95// SetExecuted records whether the proposal is executed.
    96//
    97// Parameters:
    98// - executed: execution state to store
    99func (p *ProposalActionStatus) SetExecuted(executed bool) {
    100 p.executed = executed
    101}
    102
    103// SetExecutedAt records the timestamp associated with proposal execution.
    104//
    105// Parameters:
    106// - executedAt: execution timestamp to store
    107func (p *ProposalActionStatus) SetExecutedAt(executedAt int64) {
    108 p.executedAt = executedAt
    109}
    110
    111// SetExecutedHeight records the block height associated with proposal execution.
    112//
    113// Parameters:
    114// - executedHeight: execution block height to store
    115func (p *ProposalActionStatus) SetExecutedHeight(executedHeight int64) {
    116 p.executedHeight = executedHeight
    117}
    118
    119// SetExecutedBy records the address that executed the proposal.
    120//
    121// Parameters:
    122// - executedBy: address of the actor that executed the proposal
    123func (p *ProposalActionStatus) SetExecutedBy(executedBy address) {
    124 p.executedBy = executedBy
    125}
    126
    127// SetExecutable records whether this proposal type supports execution.
    128//
    129// Parameters:
    130// - executable: execution capability to store for the proposal type
    131func (p *ProposalActionStatus) SetExecutable(executable bool) {
    132 p.executable = executable
    133}
    134
    135// CanceledBy returns the address recorded as having canceled the proposal.
    136// The value is meaningful when Canceled() is true; before then it is the
    137// zero address unless a caller has explicitly stored another value.
    138//
    139// Returns:
    140// - address: address recorded for the cancellation actor
    141func (p *ProposalActionStatus) CanceledBy() address {
    142 return p.canceledBy
    143}
    144
    145// IsExecuted reports whether execution has been recorded for the proposal.
    146//
    147// Returns:
    148// - bool: true when the proposal has been marked executed
    149func (p *ProposalActionStatus) IsExecuted() bool {
    150 return p.executed
    151}
    152
    153// ExecutedBy returns the address recorded as having executed the proposal.
    154// The value is meaningful when IsExecuted() is true; before then it is the
    155// zero address unless a caller has explicitly stored another value.
    156//
    157// Returns:
    158// - address: address recorded for the execution actor
    159func (p *ProposalActionStatus) ExecutedBy() address {
    160 return p.executedBy
    161}
    162
    163// IsExecutable reports whether this proposal type can be executed.
    164//
    165// Returns:
    166// - bool: true when execution is supported for the proposal type
    167func (p *ProposalActionStatus) IsExecutable() bool {
    168 return p.executable
    169}
    170
    171// NewProposalActionStatus creates a new action status for a proposal.
    172// Initializes the status with default values and the executable flag.
    173//
    174// Parameters:
    175// - executable: whether this proposal type can be executed
    176//
    177// Returns:
    178// - *ProposalActionStatus: new action status instance
    179func NewProposalActionStatus(executable bool) *ProposalActionStatus {
    180 return &ProposalActionStatus{
    181 canceled: false, // Proposal starts as not canceled
    182 executed: false, // Proposal starts as not executed
    183 executable: executable, // Set based on proposal type
    184 }
    185}
    186
    187// Clone creates a deep copy of the ProposalActionStatus, or nil when the
    188// receiver is nil.
    189//
    190// Returns:
    191// - *ProposalActionStatus: independent copy of the status, or nil for a nil receiver
    192func (p *ProposalActionStatus) Clone() *ProposalActionStatus {
    193 if p == nil {
    194 return nil
    195 }
    196
    197 return &ProposalActionStatus{
    198 canceled: p.canceled,
    199 canceledAt: p.canceledAt,
    200 canceledHeight: p.canceledHeight,
    201 canceledBy: p.canceledBy,
    202 executed: p.executed,
    203 executedAt: p.executedAt,
    204 executedHeight: p.executedHeight,
    205 executedBy: p.executedBy,
    206 executable: p.executable,
    207 }
    208}
    209