Exceptions
In some cases, the contract's execution might fail. The current chapter describes the list of possible in-contract fails:
Description
Factory/exchange-launched
The exchange can't be launched if it already exists
Factory/function-set
The lambda with the index already set
Factory/wrong-index
The lambda index isn't allowed
MetadataStorage/permision-denied
Updating the MEtadata by anyone other than admin is not allowed
UnsafeAllowanceChange
The operator already approved for some tokens amount; reset the allowance to zero before the operation.
FA2_NOT_OPERATOR
operator_transfer_policy == Owner_or_operator_transfer and it is invoked neither by the token owner nor a permitted operator
FA2_TOKEN_UNDEFINED
One of the specified token_ids is not defined within the FA2 contract
FA2_INSUFFICIENT_BALANCE
A token owner does not have sufficient balance to transfer tokens from owner's account
FA2_NOT_OWNER
operator_transfer_policy == Owner_transfer and it is invoked not by the token owner
Dex/wrong-index
Attempt to add the lambda function to the wrong index.
Dex/not-allowed
The amount of XTZ or tokens is zero during the exchange launch
Dex/wrong-token-id
Token ids order in pair is wrong; the lower one should be first
Dex/no-token-a
The amount of token a is zero during the launch
Dex/no-token-b
The amount of token b is zero during the launch
Dex/wrong-pair
Token addresses order in pair is wrong; the lower one should be first
Dex/not-launched
The exchange isn't launched
Dex/zero-amount-in
Zero XTZ to be swapped
Dex/zero-min-amount-out
The expected output amount is zero
Dex/wrong-min-out
The expected output is too high
Dex/high-out
The output amount of the swap is higher that 1/3 of all the reserves
Dex/wrong-route
The path doesn't exist
Dex/too-few-swaps
The route consist of the single swap; use tokenToTokenPayment instead
Dex/zero-swaps
The route is empty
Dex/wrong-params
Attempt to invest of zero shares
Dex/zero-token-a-in
The amount to pay for the shares is too low in token a
Dex/zero-token-b-in
The amount to pay for the shares is too low in token b
Dex/low-max-token-a-in
The amount of token a to be spent during investment is too low
Dex/low-max-token-b-in
The amount of token b to be spent during investment is too low
Dex/pair-not-exist
Exchange pair doesn't exist
Dex/function-not-set
Function isn't set to the lambdas map
Dex/function-set
Lambda at the spesific index already exists
Dex/not-token
The token doesn't implement the standard entrypoint.
Dex/not-validator
Baker registry doesn't have expectedvalidate entrypoint
Dex/non-zero-reserves
The Dex can't be relaunched if some liquidity is still in the pool
Dex/non-zero-shares
The Dex can't be relaunched if some shares are still in the pool
Dex/no-xtz
The exchange can't be launched with zero XTZ liquidity
Dex/no-tokens
The exchange can't be launched with zero token liquidity
Dex/veto-candidate
Vote for the banned candidate
Dex/not-enough-balance
Attempt to vote with too many votes
Dex/no-votes
The user doesn't have any LP tokens to vote
Dex/no-shares
No shares to vote
Dex/zero-tokens-in
Invest of zero tokens on one of the sides is not allowed
Dex/low-max-token-in
Amount of required tokens exceed allowed by the user
Dex/zero-burn-shares
Zero shares can't be divested
Dex/insufficient-shares
Not enough shares to burn
Dex/dust-output
One or all divested token amounts are zero.
Dex/high-expectation
The expected output is higher than the real one
Dex/selt-transfer
Transfer tokens to yourself
Dex/not-enough-allowance
The вender doesn't have enough allowance to perform the action
Dex/selt-approval
Approve LP tokens spent to yourself
Last modified 5mo ago
Copy link