For the complete documentation index, see llms.txt. This page is also available as Markdown.

Router

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

Code
Error
Description

GNOSWAP-ROUTER-001

Slippage check failed

Occurs when the execution price deviates beyond the user's specified slippage tolerance, causing the transaction to fail.

GNOSWAP-ROUTER-002

Invalid routes and quotes

Occurs when requested routes and quote does not match length.

GNOSWAP-ROUTER-003

Transaction expired

Occurs when transaction failed due to expiration.

GNOSWAP-ROUTER-004

Invalid input data

Occurs when input data does not match the expected format or parameters, making the operation invalid.

GNOSWAP-ROUTER-005

Invalid pool fee tier

Occurs when the pool fee tier specified in the transaction is not valid for pool.

GNOSWAP-ROUTER-006

Invalid swap fee

Occurs when the swap fee specified in the transaction is not valid for the operation or pool.

GNOSWAP-ROUTER-007

Invalid swap type

Occurs when an unsupported or incorrect swap type is specified, causing the transaction to fail.

GNOSWAP-ROUTER-008

Invalid pool path

Occurs when an invalid or non-existent pool path is referenced in the transaction.

GNOSWAP-ROUTER-009

Cannot wrap less than minimum amount

Occurs when the amount provided for an operation is below the minimum allowed for wugnot tokens.

GNOSWAP-ROUTER-010

Number of hops must be 1~3

Occurs when single path has unsupported number of hops.

GNOSWAP-ROUTER-011

Cannot swap same token

Occurs when an attempt is made to swap the same token as input and output.

GNOSWAP-ROUTER-012

Overflow

Occurs when mathematical results overflow numeric range.

GNOSWAP-ROUTER-013

Invalid route path

Occurs when the route path is invalid or malformed.

GNOSWAP-ROUTER-014

Invalid route first token

Occurs when the first token in the route does not match expected input token.

GNOSWAP-ROUTER-015

Invalid route last token

Occurs when the last token in the route does not match expected output token.

GNOSWAP-ROUTER-016

Invalid swap amount

Occurs when the swap amount is invalid or out of acceptable range.

GNOSWAP-ROUTER-017

Unauthorized caller

Occurs when the caller does not have permission to execute the operation.

Last updated