getter.gno
ExistsProposal
func ExistsProposal(
proposalID int64
) bool
ExistsProposal checks if a proposal exists.
Parameters
proposalID
int64
ID of the proposal
Return Values
exists
bool
true if proposal exists
ExistsVotingInfo
ExistsVotingInfo checks if a voting info exists for a user on a proposal.
Parameters
proposalID
int64
ID of the proposal
addr
address
voter address
Return Values
exists
bool
true if voting info exists
GetLatestConfigVersion
GetLatestConfigVersion returns the current config version.
Return Values
version
int64
current config version number
GetCurrentProposalID
GetCurrentProposalID returns the current proposal ID counter.
Return Values
proposalId
int64
current proposal ID counter
GetMaxSmoothingPeriod
GetMaxSmoothingPeriod returns the maximum smoothing period for delegation history cleanup.
Return Values
period
int64
maximum smoothing period in seconds
GetProposalCount
GetProposalCount returns the total number of proposals.
Return Values
count
int
total number of proposals
GetProposalIDs
GetProposalIDs returns a paginated list of proposal IDs.
Parameters
offset
int
starting index
count
int
number of IDs to return
Return Values
proposalIds
[]int64
list of proposal IDs
GetProposerByProposalId
GetProposerByProposalId returns the proposer address of a proposal.
Parameters
proposalId
int64
ID of the proposal
Return Values
proposer
address
proposer address
err
error
error if not found
GetYeaByProposalId
GetYeaByProposalId returns the yes vote weight of a proposal.
Parameters
proposalId
int64
ID of the proposal
Return Values
yea
int64
total yes vote weight
err
error
error if not found
GetNayByProposalId
GetNayByProposalId returns the no vote weight of a proposal.
Parameters
proposalId
int64
ID of the proposal
Return Values
nay
int64
total no vote weight
err
error
error if not found
GetConfigVersionByProposalId
GetConfigVersionByProposalId returns the config version used by a proposal.
Parameters
proposalId
int64
ID of the proposal
Return Values
configVersion
int64
config version number
err
error
error if not found
GetQuorumAmountByProposalId
GetQuorumAmountByProposalId returns the quorum requirement for a proposal.
Parameters
proposalId
int64
ID of the proposal
Return Values
quorum
int64
required quorum amount
err
error
error if not found
GetTitleByProposalId
GetTitleByProposalId returns the title of a proposal.
Parameters
proposalId
int64
ID of the proposal
Return Values
title
string
proposal title
err
error
error if not found
GetDescriptionByProposalId
GetDescriptionByProposalId returns the description of a proposal.
Parameters
proposalId
int64
ID of the proposal
Return Values
description
string
proposal description
err
error
error if not found
GetProposalStatusByProposalId
GetProposalStatusByProposalId returns the current status of a proposal.
Parameters
proposalId
int64
ID of the proposal
Return Values
status
string
proposal status string
err
error
error if not found
GetProposalCreatedAt
GetProposalCreatedAt returns the creation timestamp of a proposal.
Parameters
proposalId
int64
ID of the proposal
Return Values
timestamp
int64
creation timestamp
err
error
error if not found
GetProposalCreatedHeight
GetProposalCreatedHeight returns the creation block height of a proposal.
Parameters
proposalId
int64
ID of the proposal
Return Values
height
int64
creation block height
err
error
error if not found
GetVoteStatus
GetVoteStatus returns the vote status of a proposal.
Parameters
proposalId
int64
ID of the proposal
Return Values
quorum
int64
minimum vote weight required for proposal to pass
maxVotingWeight
int64
maximum possible voting weight
yesWeight
int64
total weight of "yes" votes
noWeight
int64
total weight of "no" votes
err
error
error if not found
GetVotingInfoCount
GetVotingInfoCount returns the number of voters for a proposal.
Parameters
proposalID
int64
ID of the proposal
Return Values
count
int
number of voters
GetVotingInfoAddresses
GetVotingInfoAddresses returns a paginated list of voter addresses for a proposal.
Parameters
proposalID
int64
ID of the proposal
offset
int
starting index
count
int
number of addresses to return
Return Values
addresses
[]address
list of voter addresses
GetVoteWeight
GetVoteWeight returns the voting weight of an address for a proposal.
Parameters
proposalID
int64
ID of the proposal
addr
address
voter address
Return Values
weight
int64
voting weight
err
error
error if not found
GetVotedHeight
GetVotedHeight returns the block height when an address voted on a proposal.
Parameters
proposalID
int64
ID of the proposal
addr
address
voter address
Return Values
height
int64
block height when voted
err
error
error if not found
GetVotedAt
GetVotedAt returns the timestamp when an address voted on a proposal.
Parameters
proposalID
int64
ID of the proposal
addr
address
voter address
Return Values
timestamp
int64
time when voted
err
error
error if not found
GetUserProposalCount
GetUserProposalCount returns the number of proposals created by a user.
Parameters
user
address
user address
Return Values
count
int
number of proposals created by user
GetUserProposalIDs
GetUserProposalIDs returns a paginated list of proposal IDs created by a user.
Parameters
user
address
user address
offset
int
starting index
count
int
number of IDs to return
Return Values
proposalIds
[]int64
list of proposal IDs
GetOldestActiveProposalSnapshotTime
GetOldestActiveProposalSnapshotTime returns the oldest snapshot time among active proposals.
Return Values
snapshotTime
int64
oldest snapshot timestamp
exists
bool
true if active proposals exist
GetCurrentVotingWeightSnapshot
GetCurrentVotingWeightSnapshot returns the current voting weight snapshot.
Return Values
snapshotHeight
int64
snapshot block height
snapshotTime
int64
snapshot timestamp
err
error
error if retrieval fails
Last updated