Search Apps Documentation Source Content File Folder Download Copy Actions Download

v1 package

Functions

NewGovernanceV1

func NewGovernanceV1( governanceStore governance.IGovernanceStore, stakerAccessor governance.GovStakerAccessor, ) governance.IGovernance

Params

Command

gnokey query vm/qeval -remote "https://rpc.test11.testnets.gno.land" -data "gno.land/r/gnoswap/gov/governance/v1.NewGovernanceV1(,)"

Result

NewProposalCommunityPoolSpendData

func NewProposalCommunityPoolSpendData( tokenPath string, to address, amount int64, communityPoolPackagePath string, ) *governance.ProposalData

NewProposalCommunityPoolSpendData creates proposal data for a community pool spend proposal. Automatically generates the execution message for the token transfer. Parameters: - tokenPath: path of the token to transfer - to: recipient address for the transfer - amount: amount of tokens to transfer - communityPoolPackagePath: package path of the community pool contract Returns: - \*ProposalData: proposal data configured for community pool spending

Params

Command

gnokey query vm/qeval -remote "https://rpc.test11.testnets.gno.land" -data "gno.land/r/gnoswap/gov/governance/v1.NewProposalCommunityPoolSpendData(,,,)"

Result

NewProposalExecutionData

func NewProposalExecutionData(numToExecute int64, executions string) *governance.ProposalData

NewProposalExecutionData creates proposal data for a parameter change proposal. Parses the execution string to create the execution structure. Parameters: - numToExecute: number of parameter changes to execute - executions: encoded execution string with parameter changes Returns: - \*ProposalData: proposal data configured for parameter changes

Params

Command

gnokey query vm/qeval -remote "https://rpc.test11.testnets.gno.land" -data "gno.land/r/gnoswap/gov/governance/v1.NewProposalExecutionData(,)"

Result

NewProposalScheduleStatus

func NewProposalScheduleStatus( votingStartDelay, votingPeriod, executionDelay, executionWindow, createdAt int64, ) *governance.ProposalScheduleStatus

NewProposalScheduleStatus creates a new schedule status with calculated timestamps. This constructor takes the governance timing parameters and calculates all important timestamps for the proposal's lifecycle. Parameters: - votingStartDelay: delay before voting starts (seconds) - votingPeriod: duration of voting period (seconds) - executionDelay: delay before execution can start (seconds) - executionWindow: window during which execution is allowed (seconds) - createdAt: timestamp when proposal was created Returns: - \*ProposalScheduleStatus: new schedule status with calculated times

Params

Command

gnokey query vm/qeval -remote "https://rpc.test11.testnets.gno.land" -data "gno.land/r/gnoswap/gov/governance/v1.NewProposalScheduleStatus(,,,,)"

Result

NewProposalStatus

func NewProposalStatus( config governance.Config, maxVotingWeight int64, executable bool, createdAt int64, ) *governance.ProposalStatus

NewProposalStatus creates a new proposal status with the specified configuration. This initializes all status components with the governance configuration and timing. Parameters: - config: governance configuration to use - maxVotingWeight: maximum voting weight for this proposal - executable: whether this proposal type can be executed - createdAt: timestamp when proposal was created Returns: - \*ProposalStatus: new proposal status instance

Params

Command

gnokey query vm/qeval -remote "https://rpc.test11.testnets.gno.land" -data "gno.land/r/gnoswap/gov/governance/v1.NewProposalStatus(,,,)"

Result

NewProposalTextData

func NewProposalTextData() *governance.ProposalData

NewProposalTextData creates proposal data for a text proposal. Text proposals have no additional data requirements. Returns: - \*ProposalData: proposal data configured for text proposal

Command

gnokey query vm/qeval -remote "https://rpc.test11.testnets.gno.land" -data "gno.land/r/gnoswap/gov/governance/v1.NewProposalTextData()"

Result

NewParameterHandlerOptions

func NewParameterHandlerOptions( pkgPath, function string, paramCount int, handlerFunc func([]string) error, paramValidators ...paramValidator, ) ParameterHandler

NewParameterHandlerOptions creates a new parameter handler with the specified configuration. Parameters: - pkgPath: package path of the target contract - function: function name to be called - paramCount: expected number of parameters - handlerFunc: function that executes the parameter change - paramValidators: optional validators for each parameter (must match paramCount if provided) Returns: - ParameterHandler: configured parameter handler interface

Params

Command

gnokey query vm/qeval -remote "https://rpc.test11.testnets.gno.land" -data "gno.land/r/gnoswap/gov/governance/v1.NewParameterHandlerOptions(,,,,)"

Result

CreateParameterHandlers

func CreateParameterHandlers() *ParameterRegistry

createParameterHandlers initializes and configures all supported parameter handlers. This function defines all the parameter changes that can be executed through governance proposals. It covers configuration changes for various system components including pools, staking, fees, etc. Returns: - \*ParameterRegistry: fully configured registry with all supported handlers

Command

gnokey query vm/qeval -remote "https://rpc.test11.testnets.gno.land" -data "gno.land/r/gnoswap/gov/governance/v1.CreateParameterHandlers()"

Result

NewParameterRegistry

func NewParameterRegistry() *ParameterRegistry

NewParameterRegistry creates a new empty parameter registry. Returns: - \*ParameterRegistry: new registry instance

Command

gnokey query vm/qeval -remote "https://rpc.test11.testnets.gno.land" -data "gno.land/r/gnoswap/gov/governance/v1.NewParameterRegistry()"

Result

NewProposalActionStatusResolver

func NewProposalActionStatusResolver(status *governance.ProposalActionStatus) *ProposalActionStatusResolver

Param

Command

gnokey query vm/qeval -remote "https://rpc.test11.testnets.gno.land" -data "gno.land/r/gnoswap/gov/governance/v1.NewProposalActionStatusResolver()"

Result

NewProposalDataResolver

func NewProposalDataResolver(proposalData *governance.ProposalData) *ProposalDataResolver

Param

Command

gnokey query vm/qeval -remote "https://rpc.test11.testnets.gno.land" -data "gno.land/r/gnoswap/gov/governance/v1.NewProposalDataResolver()"

Result

NewProposalMetadataResolver

func NewProposalMetadataResolver(metadata *governance.ProposalMetadata) *ProposalMetadataResolver

Param

Command

gnokey query vm/qeval -remote "https://rpc.test11.testnets.gno.land" -data "gno.land/r/gnoswap/gov/governance/v1.NewProposalMetadataResolver()"

Result

NewProposalResolver

func NewProposalResolver(proposal *governance.Proposal) *ProposalResolver

Param

Command

gnokey query vm/qeval -remote "https://rpc.test11.testnets.gno.land" -data "gno.land/r/gnoswap/gov/governance/v1.NewProposalResolver()"

Result

NewProposalScheduleStatusResolver

func NewProposalScheduleStatusResolver(status *governance.ProposalScheduleStatus) *ProposalScheduleStatusResolver

Param

Command

gnokey query vm/qeval -remote "https://rpc.test11.testnets.gno.land" -data "gno.land/r/gnoswap/gov/governance/v1.NewProposalScheduleStatusResolver()"

Result

NewProposalStatusResolver

func NewProposalStatusResolver(status *governance.ProposalStatus) *ProposalStatusResolver

Param

Command

gnokey query vm/qeval -remote "https://rpc.test11.testnets.gno.land" -data "gno.land/r/gnoswap/gov/governance/v1.NewProposalStatusResolver()"

Result

NewProposalVoteStatusResolver

func NewProposalVoteStatusResolver(voteStatus *governance.ProposalVoteStatus) *ProposalVoteStatusResolver

Param

Command

gnokey query vm/qeval -remote "https://rpc.test11.testnets.gno.land" -data "gno.land/r/gnoswap/gov/governance/v1.NewProposalVoteStatusResolver()"

Result

NewVotingInfoResolver

func NewVotingInfoResolver(votingInfo *governance.VotingInfo) *VotingInfoResolver

Param

Command

gnokey query vm/qeval -remote "https://rpc.test11.testnets.gno.land" -data "gno.land/r/gnoswap/gov/governance/v1.NewVotingInfoResolver()"

Result