Governance

The following table outlines potential errors that may occur during interactions with the governance contract in GnoSwap:

Governance

Code
Error
Description

GNOSWAP-GOVERNANCE-001

Invalid input

Occurs when input data does not meet the required format or values for a governance operation.

GNOSWAP-GOVERNANCE-002

Requested data not found

Occurs when the system is unable to locate the requested data for a governance action, such as a specific proposal.

GNOSWAP-GOVERNANCE-003

Not enough balance

Occurs when a user attempts an action without sufficient token balance to fulfill the requirement.

GNOSWAP-GOVERNANCE-004

Cannot vote twice

Occurs when a user tries to vote multiple times on the same proposal.

GNOSWAP-GOVERNANCE-005

Not enough voting power

Occurs when a user does not have enough voting power to cast a vote on a proposal.

GNOSWAP-GOVERNANCE-006

Cannot cancel already canceled proposal

Occurs when an attempt is made to cancel a proposal that has already been canceled.

GNOSWAP-GOVERNANCE-007

Unable to cancel voting proposal

Occurs when a user tries to cancel a proposal that is in the voting phase and cannot be canceled.

GNOSWAP-GOVERNANCE-008

Cannot execute text proposal

Occurs when an attempt is made to execute a text proposal, which is not executable.

GNOSWAP-GOVERNANCE-009

Unable to vote out of voting period

Occurs when a user votes to proposal while voting out of voting period.

GNOSWAP-GOVERNANCE-010

Invalid message format

Occurs when a user submits a proposal with invalid execution message format.

GNOSWAP-GOVERNANCE-011

Already active proposal

Occurs when there is already an active proposal and another proposal creation is attempted.

GNOSWAP-GOVERNANCE-012

Proposal not found

Occurs when the specified proposal cannot be found.

GNOSWAP-GOVERNANCE-013

Proposal not executable

Occurs when a proposal is in a state that does not allow execution.

GNOSWAP-GOVERNANCE-014

Not proposer

Occurs when a non-proposer attempts to perform an action reserved for the proposer.

GNOSWAP-GOVERNANCE-015

Invalid configuration

Occurs when governance configuration parameters are invalid.

GNOSWAP-GOVERNANCE-016

Invalid execution: handler not found

Occurs when the execution handler for a proposal cannot be found.

GNOSWAP-GOVERNANCE-017

Invalid smoothing period

Occurs when an invalid smoothing period is specified.

Governance Staker

Code
Error
Description

GNOSWAP-GOV_STAKER-001

Requested data not found

Occurs when the system is unable to locate the requested data for a staking or governance operation.

GNOSWAP-GOV_STAKER-002

Invalid amount

Occurs when a token transfer operation is attempted with invalid amounts.

GNOSWAP-GOV_STAKER-003

Zero delegated amount

Occurs when a delegation operation is attempted with an amount of zero, which is invalid.

GNOSWAP-GOV_STAKER-004

Not enough delegated

Occurs when a user tries to undelegate more tokens than they have delegated.

GNOSWAP-GOV_STAKER-005

Invalid address

Occurs when an invalid address is provided in a staking or delegation operation.

GNOSWAP-GOV_STAKER-006

Not enough balance

Occurs when a user attempts an action without sufficient token balance to complete the operation.

GNOSWAP-GOV_STAKER-007

Cannot delegate less than minimum amount

Occurs when a user attempts to delegate an amount that is below the minimum required.

GNOSWAP-GOV_STAKER-008

Invalid snapshot time

Occurs when an invalid snapshot time is provided.

GNOSWAP-GOV_STAKER-009

Cannot redelegate to same address

Occurs when a user attempts to redelegate to the same address they are currently delegating to.

GNOSWAP-GOV_STAKER-010

Withdraw is not collectable

Occurs when a user attempts to collect a withdrawal that is not yet available.

Last updated