getter.gno

ExistsProposal

func ExistsProposal(
	proposalID int64
) bool

ExistsProposal checks if a proposal exists.

Parameters

Name
Type
Description

proposalID

int64

ID of the proposal

Return Values

Name
Type
Description

exists

bool

true if proposal exists


ExistsVotingInfo

ExistsVotingInfo checks if a voting info exists for a user on a proposal.

Parameters

Name
Type
Description

proposalID

int64

ID of the proposal

addr

address

voter address

Return Values

Name
Type
Description

exists

bool

true if voting info exists


GetLatestConfigVersion

GetLatestConfigVersion returns the current config version.

Return Values

Name
Type
Description

version

int64

current config version number


GetCurrentProposalID

GetCurrentProposalID returns the current proposal ID counter.

Return Values

Name
Type
Description

proposalId

int64

current proposal ID counter


GetMaxSmoothingPeriod

GetMaxSmoothingPeriod returns the maximum smoothing period for delegation history cleanup.

Return Values

Name
Type
Description

period

int64

maximum smoothing period in seconds


GetProposalCount

GetProposalCount returns the total number of proposals.

Return Values

Name
Type
Description

count

int

total number of proposals


GetProposalIDs

GetProposalIDs returns a paginated list of proposal IDs.

Parameters

Name
Type
Description

offset

int

starting index

count

int

number of IDs to return

Return Values

Name
Type
Description

proposalIds

[]int64

list of proposal IDs


GetProposerByProposalId

GetProposerByProposalId returns the proposer address of a proposal.

Parameters

Name
Type
Description

proposalId

int64

ID of the proposal

Return Values

Name
Type
Description

proposer

address

proposer address

err

error

error if not found


GetYeaByProposalId

GetYeaByProposalId returns the yes vote weight of a proposal.

Parameters

Name
Type
Description

proposalId

int64

ID of the proposal

Return Values

Name
Type
Description

yea

int64

total yes vote weight

err

error

error if not found


GetNayByProposalId

GetNayByProposalId returns the no vote weight of a proposal.

Parameters

Name
Type
Description

proposalId

int64

ID of the proposal

Return Values

Name
Type
Description

nay

int64

total no vote weight

err

error

error if not found


GetConfigVersionByProposalId

GetConfigVersionByProposalId returns the config version used by a proposal.

Parameters

Name
Type
Description

proposalId

int64

ID of the proposal

Return Values

Name
Type
Description

configVersion

int64

config version number

err

error

error if not found


GetQuorumAmountByProposalId

GetQuorumAmountByProposalId returns the quorum requirement for a proposal.

Parameters

Name
Type
Description

proposalId

int64

ID of the proposal

Return Values

Name
Type
Description

quorum

int64

required quorum amount

err

error

error if not found


GetTitleByProposalId

GetTitleByProposalId returns the title of a proposal.

Parameters

Name
Type
Description

proposalId

int64

ID of the proposal

Return Values

Name
Type
Description

title

string

proposal title

err

error

error if not found


GetDescriptionByProposalId

GetDescriptionByProposalId returns the description of a proposal.

Parameters

Name
Type
Description

proposalId

int64

ID of the proposal

Return Values

Name
Type
Description

description

string

proposal description

err

error

error if not found


GetProposalStatusByProposalId

GetProposalStatusByProposalId returns the current status of a proposal.

Parameters

Name
Type
Description

proposalId

int64

ID of the proposal

Return Values

Name
Type
Description

status

string

proposal status string

err

error

error if not found


GetProposalCreatedAt

GetProposalCreatedAt returns the creation timestamp of a proposal.

Parameters

Name
Type
Description

proposalId

int64

ID of the proposal

Return Values

Name
Type
Description

timestamp

int64

creation timestamp

err

error

error if not found


GetProposalCreatedHeight

GetProposalCreatedHeight returns the creation block height of a proposal.

Parameters

Name
Type
Description

proposalId

int64

ID of the proposal

Return Values

Name
Type
Description

height

int64

creation block height

err

error

error if not found


GetVoteStatus

GetVoteStatus returns the vote status of a proposal.

Parameters

Name
Type
Description

proposalId

int64

ID of the proposal

Return Values

Name
Type
Description

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

Name
Type
Description

proposalID

int64

ID of the proposal

Return Values

Name
Type
Description

count

int

number of voters


GetVotingInfoAddresses

GetVotingInfoAddresses returns a paginated list of voter addresses for a proposal.

Parameters

Name
Type
Description

proposalID

int64

ID of the proposal

offset

int

starting index

count

int

number of addresses to return

Return Values

Name
Type
Description

addresses

[]address

list of voter addresses


GetVoteWeight

GetVoteWeight returns the voting weight of an address for a proposal.

Parameters

Name
Type
Description

proposalID

int64

ID of the proposal

addr

address

voter address

Return Values

Name
Type
Description

weight

int64

voting weight

err

error

error if not found


GetVotedHeight

GetVotedHeight returns the block height when an address voted on a proposal.

Parameters

Name
Type
Description

proposalID

int64

ID of the proposal

addr

address

voter address

Return Values

Name
Type
Description

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

Name
Type
Description

proposalID

int64

ID of the proposal

addr

address

voter address

Return Values

Name
Type
Description

timestamp

int64

time when voted

err

error

error if not found


GetUserProposalCount

GetUserProposalCount returns the number of proposals created by a user.

Parameters

Name
Type
Description

user

address

user address

Return Values

Name
Type
Description

count

int

number of proposals created by user


GetUserProposalIDs

GetUserProposalIDs returns a paginated list of proposal IDs created by a user.

Parameters

Name
Type
Description

user

address

user address

offset

int

starting index

count

int

number of IDs to return

Return Values

Name
Type
Description

proposalIds

[]int64

list of proposal IDs


GetOldestActiveProposalSnapshotTime

GetOldestActiveProposalSnapshotTime returns the oldest snapshot time among active proposals.

Return Values

Name
Type
Description

snapshotTime

int64

oldest snapshot timestamp

exists

bool

true if active proposals exist


GetCurrentVotingWeightSnapshot

GetCurrentVotingWeightSnapshot returns the current voting weight snapshot.

Return Values

Name
Type
Description

snapshotHeight

int64

snapshot block height

snapshotTime

int64

snapshot timestamp

err

error

error if retrieval fails

Last updated