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_data.gnogno
    1package governance23import (4	"strings"5)67// ProposalMetadata contains descriptive information about a proposal.8

    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.

    // This includes the title and description that are displayed to voters.
    9type ProposalMetadata struct {
    10 title string // Proposal title (max 255 characters)
    11 description string // Detailed proposal description (max 10,000 characters)
    12}
    13
    14// Title returns the proposal title.
    15//
    16// Returns:
    17// - string: proposal title
    18func (p *ProposalMetadata) Title() string {
    19 return p.title
    20}
    21
    22// Description returns the proposal description.
    23//
    24// Returns:
    25// - string: proposal description
    26func (p *ProposalMetadata) Description() string {
    27 return p.description
    28}
    29
    30// NewProposalMetadata creates a new proposal metadata instance with trimmed input.
    31//
    32// Parameters:
    33// - title: proposal title
    34// - description: proposal description
    35//
    36// Returns:
    37// - *ProposalMetadata: new metadata instance with trimmed whitespace
    38func NewProposalMetadata(title string, description string) *ProposalMetadata {
    39 return &ProposalMetadata{
    40 title: strings.TrimSpace(title),
    41 description: strings.TrimSpace(description),
    42 }
    43}
    44
    45// ProposalData contains the type-specific data for a proposal.
    46// This structure holds different data depending on the proposal type.
    47type ProposalData struct {
    48 proposalType ProposalType // Type of proposal (Text, CommunityPoolSpend, ParameterChange)
    49 communityPoolSpend *CommunityPoolSpendInfo // Data for community pool spending proposals
    50 execution *ExecutionInfo // Data for parameter change proposals
    51}
    52
    53// ProposalType returns the type of this proposal.
    54//
    55// Returns:
    56// - ProposalType: the proposal type
    57func (p *ProposalData) ProposalType() ProposalType {
    58 return p.proposalType
    59}
    60
    61// CommunityPoolSpend returns the community pool spending information.
    62//
    63// Returns:
    64// - *CommunityPoolSpendInfo: community pool spending details
    65func (p *ProposalData) CommunityPoolSpend() *CommunityPoolSpendInfo {
    66 return p.communityPoolSpend
    67}
    68
    69// Execution returns the execution information for parameter changes.
    70//
    71// Returns:
    72// - *ExecutionInfo: parameter change execution details
    73func (p *ProposalData) Execution() *ExecutionInfo {
    74 return p.execution
    75}
    76
    77// NewProposalData creates a new proposal data instance with the specified components.
    78//
    79// Parameters:
    80// - proposalType: type of the proposal
    81// - communityPoolSpend: community pool spending information
    82// - execution: parameter change execution information
    83//
    84// Returns:
    85// - *ProposalData: new proposal data instance
    86func NewProposalData(proposalType ProposalType, communityPoolSpend *CommunityPoolSpendInfo, execution *ExecutionInfo) *ProposalData {
    87 return &ProposalData{
    88 proposalType: proposalType,
    89 communityPoolSpend: communityPoolSpend,
    90 execution: execution,
    91 }
    92}
    93
    94// CommunityPoolSpendInfo contains information for community pool spending proposals.
    95type CommunityPoolSpendInfo struct {
    96 to address // Recipient address for token transfer
    97 tokenPath string // Path of the token to transfer
    98 amount int64 // Amount of tokens to transfer
    99}
    100
    101// NewCommunityPoolSpendInfo creates community-pool spend data.
    102//
    103// Parameters:
    104// - to: Recipient address that receives the community-pool transfer.
    105// - tokenPath: Registered token path of the asset to transfer.
    106// - amount: Transfer amount in the token's smallest unit.
    107//
    108// Returns:
    109// - *CommunityPoolSpendInfo: spend data containing the recipient, token path, and amount.
    110func NewCommunityPoolSpendInfo(to address, tokenPath string, amount int64) *CommunityPoolSpendInfo {
    111 return &CommunityPoolSpendInfo{
    112 to: to,
    113 tokenPath: tokenPath,
    114 amount: amount,
    115 }
    116}
    117
    118/* Getter methods */
    119// Returns:
    120// - address: recipient address configured for the community-pool spend.
    121//
    122func (i *CommunityPoolSpendInfo) To() address { return i.to }
    123
    124// Returns:
    125// - string: registered token path configured for the community-pool spend.
    126func (i *CommunityPoolSpendInfo) TokenPath() string { return i.tokenPath }
    127
    128// Returns:
    129// - int64: transfer amount in the token's smallest unit.
    130func (i *CommunityPoolSpendInfo) Amount() int64 { return i.amount }
    131
    132// ExecutionInfo contains information for parameter change execution.
    133// Messages are encoded strings that specify function calls and parameters.
    134type ExecutionInfo struct {
    135 num int64 // Number of parameter changes to execute
    136 msgs []string // Execution messages separated by messageSeparator (*GOV*)
    137}
    138
    139// NewExecutionInfo creates execution data for a parameter-change proposal.
    140//
    141// Parameters:
    142// - num: Number of encoded parameter-change messages to execute.
    143// - msgs: Encoded parameter-change messages, one message per execution.
    144//
    145// Returns:
    146// - *ExecutionInfo: execution data containing the declared count and messages.
    147func NewExecutionInfo(num int64, msgs []string) *ExecutionInfo {
    148 return &ExecutionInfo{
    149 num: num,
    150 msgs: msgs,
    151 }
    152}
    153
    154/* Getter methods */
    155// Returns:
    156// - int64: declared number of parameter-change messages.
    157//
    158func (i *ExecutionInfo) Num() int64 { return i.num }
    159
    160// Returns:
    161// - []string: encoded parameter-change messages in execution order.
    162func (i *ExecutionInfo) Msgs() []string { return i.msgs }
    163
    164// ParameterChangeInfo represents a single parameter change to be executed.
    165type ParameterChangeInfo struct {
    166 pkgPath string // Package path of the target contract
    167 function string // Function name to call
    168 params []string // Parameters to pass to the function
    169}
    170
    171// NewParameterChangeInfo creates one encoded parameter-change target description.
    172//
    173// Parameters:
    174// - pkgPath: Package path containing the parameter-change handler.
    175// - function: Handler function name to invoke.
    176// - params: String arguments passed to the handler in order.
    177//
    178// Returns:
    179// - ParameterChangeInfo: parameter-change target and its encoded arguments.
    180func NewParameterChangeInfo(pkgPath string, function string, params []string) ParameterChangeInfo {
    181 return ParameterChangeInfo{
    182 pkgPath: pkgPath,
    183 function: function,
    184 params: params,
    185 }
    186}
    187
    188/* Getter methods */
    189// Returns:
    190// - string: package path of the parameter-change handler.
    191//
    192func (i *ParameterChangeInfo) PkgPath() string { return i.pkgPath }
    193
    194// Returns:
    195// - string: function name of the parameter-change handler.
    196func (i *ParameterChangeInfo) Function() string { return i.function }
    197
    198// Returns:
    199// - []string: encoded arguments passed to the parameter-change handler.
    200func (i *ParameterChangeInfo) Params() []string { return i.params }
    201
    202// Clone creates a deep copy of the ProposalMetadata.
    203// Returns:
    204// - *ProposalMetadata: independent metadata copy, or nil when the receiver is nil.
    205func (p *ProposalMetadata) Clone() *ProposalMetadata {
    206 if p == nil {
    207 return nil
    208 }
    209
    210 return &ProposalMetadata{
    211 title: p.title,
    212 description: p.description,
    213 }
    214}
    215
    216// Clone creates a deep copy of the CommunityPoolSpendInfo.
    217// Returns:
    218// - *CommunityPoolSpendInfo: independent spend-data copy, or nil when the receiver is nil.
    219func (i *CommunityPoolSpendInfo) Clone() *CommunityPoolSpendInfo {
    220 if i == nil {
    221 return nil
    222 }
    223
    224 return &CommunityPoolSpendInfo{
    225 to: i.to,
    226 tokenPath: i.tokenPath,
    227 amount: i.amount,
    228 }
    229}
    230
    231// Clone creates a deep copy of the ExecutionInfo.
    232// Returns:
    233// - *ExecutionInfo: independent execution-data copy including a copied message slice, or nil when the receiver is nil.
    234func (i *ExecutionInfo) Clone() *ExecutionInfo {
    235 if i == nil {
    236 return nil
    237 }
    238
    239 clonedMsgs := make([]string, len(i.msgs))
    240 copy(clonedMsgs, i.msgs)
    241
    242 return &ExecutionInfo{
    243 num: i.num,
    244 msgs: clonedMsgs,
    245 }
    246}
    247
    248// Clone creates a deep copy of the ProposalData.
    249// Returns:
    250// - *ProposalData: independent proposal-data copy with cloned nested values, or nil when the receiver is nil.
    251func (p *ProposalData) Clone() *ProposalData {
    252 if p == nil {
    253 return nil
    254 }
    255
    256 return &ProposalData{
    257 proposalType: p.proposalType,
    258 communityPoolSpend: p.communityPoolSpend.Clone(),
    259 execution: p.execution.Clone(),
    260 }
    261}
    262