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.gnogno
    1package governance23import bptree "gno.land/p/nt/bptree/v0"45// Proposal represents a governance proposal with all its associated data and state.6// This is the core structure that tracks proposal lifecycle from creation to execution.7type Proposal struct

    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.

    {
    8 id int64 // Unique identifier for the proposal
    9 proposer address // The address of the proposer
    10 configVersion int64 // The version of the governance config used
    11 status *ProposalStatus // Current status and voting information
    12 metadata *ProposalMetadata // Title and description
    13 data *ProposalData // Type-specific proposal data
    14 snapshotTime int64 // Timestamp for voting weight snapshot lookup
    15 createdHeight int64 // Block height at creation
    16}
    17
    18// ID returns the unique identifier assigned to the proposal.
    19//
    20// Returns:
    21// - int64: proposal identifier used as its storage key
    22func (p *Proposal) ID() int64 {
    23 return p.id
    24}
    25
    26// Type returns the proposal's type discriminator from its type-specific data.
    27//
    28// Returns:
    29// - ProposalType: proposal kind, such as text, community-pool spend, or parameter change
    30func (p *Proposal) Type() ProposalType {
    31 return p.data.ProposalType()
    32}
    33
    34// Title returns the proposal title stored in its metadata.
    35//
    36// Returns:
    37// - string: proposal title
    38func (p *Proposal) Title() string {
    39 return p.metadata.Title()
    40}
    41
    42// Description returns the proposal description stored in its metadata.
    43//
    44// Returns:
    45// - string: proposal description
    46func (p *Proposal) Description() string {
    47 return p.metadata.Description()
    48}
    49
    50// Proposer returns the address that created the proposal.
    51//
    52// Returns:
    53// - address: proposal creator's address
    54func (p *Proposal) Proposer() address {
    55 return p.proposer
    56}
    57
    58// CreatedHeight returns the block height at which the proposal was created.
    59//
    60// Returns:
    61// - int64: proposal creation block height
    62func (p *Proposal) CreatedHeight() int64 {
    63 return p.createdHeight
    64}
    65
    66// CreatedAt returns the proposal creation timestamp recorded in its schedule.
    67//
    68// Returns:
    69// - int64: proposal creation timestamp
    70func (p *Proposal) CreatedAt() int64 {
    71 return p.status.schedule.createTime
    72}
    73
    74// VotingYesWeight returns the total weight recorded for "yes" votes.
    75//
    76// Returns:
    77// - int64: current "yes" vote weight
    78func (p *Proposal) VotingYesWeight() int64 {
    79 return p.status.voteStatus.yea
    80}
    81
    82// VotingNoWeight returns the total weight recorded for "no" votes.
    83//
    84// Returns:
    85// - int64: current "no" vote weight
    86func (p *Proposal) VotingNoWeight() int64 {
    87 return p.status.voteStatus.nay
    88}
    89
    90// VotingQuorumAmount returns the minimum total vote weight required to pass.
    91//
    92// Returns:
    93// - int64: quorum vote weight required by this proposal's configuration
    94func (p *Proposal) VotingQuorumAmount() int64 {
    95 return p.status.voteStatus.quorumAmount
    96}
    97
    98// VotingMaxWeight returns the maximum voting weight recorded for this proposal.
    99//
    100// Returns:
    101// - int64: maximum voting weight used for the proposal's quorum calculation
    102func (p *Proposal) VotingMaxWeight() int64 {
    103 return p.status.voteStatus.maxVotingWeight
    104}
    105
    106// ConfigVersion returns the governance configuration version used by the proposal.
    107//
    108// Returns:
    109// - int64: configuration version captured when the proposal was created
    110func (p *Proposal) ConfigVersion() int64 {
    111 return p.configVersion
    112}
    113
    114// SnapshotTime returns the timestamp used to look up historical voting weight.
    115//
    116// Returns:
    117// - int64: voting-weight snapshot timestamp
    118func (p *Proposal) SnapshotTime() int64 {
    119 return p.snapshotTime
    120}
    121
    122// Data returns the proposal's type-specific data.
    123//
    124// Returns:
    125// - *ProposalData: type-specific proposal data stored on the proposal
    126func (p *Proposal) Data() *ProposalData {
    127 return p.data
    128}
    129
    130// Status returns the proposal's schedule, vote, and action status.
    131//
    132// Returns:
    133// - *ProposalStatus: mutable aggregate status associated with the proposal
    134func (p *Proposal) Status() *ProposalStatus {
    135 return p.status
    136}
    137
    138// Metadata returns the proposal's title and description metadata.
    139//
    140// Returns:
    141// - *ProposalMetadata: metadata stored on the proposal
    142func (p *Proposal) Metadata() *ProposalMetadata {
    143 return p.metadata
    144}
    145
    146// IsTextType reports whether the proposal is a text proposal.
    147//
    148// Returns:
    149// - bool: true when the proposal type is Text
    150func (p *Proposal) IsTextType() bool {
    151 return p.Type() == Text
    152}
    153
    154// IsCommunityPoolSpendType reports whether the proposal spends community-pool funds.
    155//
    156// Returns:
    157// - bool: true when the proposal type is CommunityPoolSpend
    158func (p *Proposal) IsCommunityPoolSpendType() bool {
    159 return p.Type() == CommunityPoolSpend
    160}
    161
    162// IsParameterChangeType reports whether the proposal changes governance parameters.
    163//
    164// Returns:
    165// - bool: true when the proposal type is ParameterChange
    166func (p *Proposal) IsParameterChangeType() bool {
    167 return p.Type() == ParameterChange
    168}
    169
    170// IsProposer reports whether addr matches the proposal's proposer address.
    171//
    172// Parameters:
    173// - addr: address to compare with the proposal proposer
    174//
    175// Returns:
    176// - bool: true when addr is the proposal proposer
    177func (p *Proposal) IsProposer(addr address) bool {
    178 return p.proposer == addr
    179}
    180
    181// NewProposal creates a new proposal instance with the supplied identity,
    182// lifecycle, metadata, and type-specific data.
    183//
    184// Parameters:
    185// - proposalID: unique identifier assigned to the proposal
    186// - status: initial schedule, action, and voting status
    187// - metadata: proposal title and description metadata
    188// - data: type-specific proposal data
    189// - proposerAddress: address of the proposal creator
    190// - configVersion: governance configuration version captured for the proposal
    191// - snapshotTime: timestamp anchor for historical voting-weight lookup
    192// - createdHeight: block height at which the proposal was created
    193//
    194// Returns:
    195// - *Proposal: newly initialized proposal containing the supplied fields
    196func NewProposal(
    197 proposalID int64,
    198 status *ProposalStatus,
    199 metadata *ProposalMetadata,
    200 data *ProposalData,
    201 proposerAddress address,
    202 configVersion int64,
    203 snapshotTime int64,
    204 createdHeight int64,
    205) *Proposal {
    206 return &Proposal{
    207 id: proposalID,
    208 proposer: proposerAddress,
    209 status: status,
    210 metadata: metadata,
    211 data: data,
    212 configVersion: configVersion,
    213 snapshotTime: snapshotTime,
    214 createdHeight: createdHeight,
    215 }
    216}
    217
    218// Clone returns a deep copy of the proposal, including its type-specific data
    219// and nested execution messages.
    220//
    221// The returned proposal and all nested status, metadata, data, and message
    222// values are independent copies; mutating the clone does not mutate realm state.
    223//
    224// Returns:
    225// - *Proposal: independent proposal copy, or nil when the receiver is nil
    226func (p *Proposal) Clone() *Proposal {
    227 if p == nil {
    228 return nil
    229 }
    230
    231 return &Proposal{
    232 id: p.id,
    233 proposer: p.proposer,
    234 configVersion: p.configVersion,
    235 status: p.status.Clone(),
    236 metadata: p.metadata.Clone(),
    237 data: p.data.Clone(),
    238 snapshotTime: p.snapshotTime,
    239 createdHeight: p.createdHeight,
    240 }
    241}
    242
    243// NewProposalTree creates an empty B+ tree for proposals keyed by proposal ID.
    244//
    245// Returns:
    246// - *bptree.BPTree: empty 16-way proposal tree
    247func NewProposalTree() *bptree.BPTree {
    248 return bptree.NewBPTreeN(16)
    249}
    250
    251// NewUserProposalTree creates an empty B+ tree mapping users to proposal IDs.
    252//
    253// Returns:
    254// - *bptree.BPTree: empty 16-way user-proposal index tree
    255func NewUserProposalTree() *bptree.BPTree {
    256 return bptree.NewBPTreeN(16)
    257}
    258
    259// NewVotingInfoTree creates an empty B+ tree for per-user voting information.
    260//
    261// Returns:
    262// - *bptree.BPTree: empty 16-way voting-information tree
    263func NewVotingInfoTree() *bptree.BPTree {
    264 return bptree.NewBPTreeN(16)
    265}
    266
    267// NewProposalUserVotingInfoTree creates an empty B+ tree mapping proposal IDs
    268// to their per-user voting-information trees.
    269//
    270// Returns:
    271// - *bptree.BPTree: empty 16-way proposal voting-information index tree
    272func NewProposalUserVotingInfoTree() *bptree.BPTree {
    273 return bptree.NewBPTreeN(16)
    274}
    275