Gno.land
| 1 | package governance |
| 2 | |
| 3 | import ( |
| 4 | "gno.land/r/gnoswap/gov/staker" |
| 5 | ) |
| 6 | |
| 7 | type govStakerAccessor struct{} |
| 8 | |
| 9 | // GetTotalDelegationAmountAtSnapshot forwards an aggregate delegation-history lookup. |
| 10 | // |
| 11 | // Parameters: |
| 12 | // - snapshotTime: Unix timestamp at or before which to select the latest total-delegation entry. |
| 13 | // |
| 14 | // Returns: |
| 15 | // - int64: aggregate delegated amount at or before snapshotTime. |
| 16 | // - bool: true when a qualifying history entry exists; false otherwise. |
| 17 | func (g *govStakerAccessor) GetTotalDelegationAmountAtSnapshot(snapshotTime int64) (int64, bool) { |
| 18 | return staker.GetTotalDelegationAmountAtSnapshot(snapshotTime) |
| 19 | } |
| 20 | |
| 21 | // GetUserDelegationAmountAtSnapshot forwards a user's delegation-history lookup. |
| 22 | // |
| 23 | // Parameters: |
| 24 | // - userAddr: Delegator address whose historical amount is queried. |
| 25 | // - snapshotTime: Unix timestamp at or before which to select the latest user entry. |
| 26 | // |
| 27 | // Returns: |
| 28 | // - int64: user's delegated amount at or before snapshotTime. |
| 29 | // - bool: true when a qualifying history entry exists; false otherwise. |
| 30 | func (g *govStakerAccessor) GetUserDelegationAmountAtSnapshot(userAddr address, snapshotTime int64) (int64, bool) { |
| 31 | return staker.GetUserDelegationAmountAtSnapshot(userAddr, snapshotTime) |
| 32 | } |
| 33 | |
| 34 | // GetTotalxGnsSupply returns the total xGNS supply reported by the staker realm. |
| 35 | // |
| 36 | // Returns: |
| 37 | // - int64: total xGNS supply, including launchpad-held xGNS. |
| 38 | func (g *govStakerAccessor) GetTotalxGnsSupply() int64 { |
| 39 | return staker.GetTotalxGnsSupply() |
| 40 | } |
| 41 | |
| 42 | func newGovStakerAccessor() GovStakerAccessor { |
| 43 | return &govStakerAccessor{} |
| 44 | } |
| Function | Parameters |
|---|---|
| NewConfig | (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) |
| NewDefaultConfig | () |
| NewConfigTree | () |
| NewCounter | () |
| GetLatestConfigVersion | () |
| GetCurrentProposalID | () |
| GetMaxSmoothingPeriod | () |
| GetLatestConfig | () |
| GetConfig | (configVersion int64) |
| GetProposals | () |
| ExistsProposal | (proposalID int64) |
Gnoswap Governance
Governance configuration
| Field | Value | | --- | --- | | Active implementation | gno\.land/r/gnoswap/gov/governance/v1 | | Latest configuration version | 1 | | Current proposal ID | 1 | | Maximum smoothing period | 2592000 |
| Function | Caller | Age |
|---|---|---|
| Vote | g14m0n55…rgjt4j | 9d ago |
| Vote | g1zt5nr6…uv4s95 | 9d ago |
| Vote | g1tprmc9…vf9nvp | 9d ago |
| Vote | g1setpjm…d7ygjs | 9d ago |
| Vote | g1fmyf2y…ldwk3t | 9d ago |
| Vote | g1zq2pve…sanljg | 9d ago |
| Vote | g1pt7qxx…jf33ld | 9d ago |
| Vote | g1pq6j5q…xeyx2p | 9d ago |
| Vote | g15a7jks…ccnsxw | 9d ago |
| Vote | g153vdrj…9x2g2k | 11d ago |
| Vote | g1vq438r…g3fgs6 | 11d ago |
| Vote | g1v7c9pd…nz2frr | 11d ago |