> ## Documentation Index
> Fetch the complete documentation index at: https://docs.codex.io/llms.txt
> Use this file to discover all available pages before exploring further.

# SimulateTokenContractErrors

> Errors for a token contract buy/sell. SimulateTokenContractErrors type reference: every field and its type.

## GraphQL

```
type SimulateTokenContractErrors {
  simulatorError: String
  tokenErrors: SimulateTokenErrorsType!
  deployErrors: SimulateDeployErrorsType!
  contractBalanceErrors: SimulateContractBalanceErrorsType!
  liquidityErrors: SimulateLiquidityErrorsType!
  transferErrors: SimulateTransferErrorsType!
  swapErrors: SimulateSwapErrorsType!
  ownerErrors: SimulateOwnerErrorsType!
  creatorErrors: SimulateCreatorErrorsType!
}

type SimulateTokenErrorsType {
  tokenSymbolError: String
  decimalsError: String
  tokenNameError: String
  totalSupplyError: String
  canTransferOwnershipError: String
  canRenounceOwnershipError: String
}

type SimulateDeployErrorsType {
  deployError: String
  tokenMintedToDeployerError: String
}

type SimulateContractBalanceErrorsType {
  tokenContractTokenBalanceError: String
  tokenContractEthBalanceError: String
}

type SimulateLiquidityErrorsType {
  lpTotalSupplyError: String
  preLiquidityEnableTradingError: String
  postLiquidityEnableTradingError: String
  addLiquidityError: String
}

type SimulateTransferErrorsType {
  tokenContractApprovalError: String
  tokenTransferredToContractError: String
  userApprovalError: String
}

enum SimulateTokenContractBuySellErrorEnum {
  INSUFFICIENT_OUTPUT_AMOUNT
  INSUFFICIENT_LIQUIDITY
  TRANSFER_FAILED
  UNKNOWN_ERROR
}

type SimulateSwapErrorsType {
  buyError: String
  buyErrorEnum: SimulateTokenContractBuySellErrorEnum
  sellError: String
  sellErrorEnum: SimulateTokenContractBuySellErrorEnum
}

type SimulateOwnerErrorsType {
  ownerAddressError: String
  ownerTokenBalanceError: String
  ownerEthBalanceError: String
}

type SimulateCreatorErrorsType {
  creatorTokenBalanceError: String
  creatorEthBalanceError: String
}
```

### Used By

**Returned by**

* [getSimulateTokenContractResults](https://docs.codex.io/api-reference/queries/getsimulatetokencontractresults.md): Returns recorded token analyses, including pending and failed requests. Results are ordered by block number descending, then request timestamp descending. Use simulationId to retrieve a specific request.
* [onSimulateTokenContract](https://docs.codex.io/api-reference/subscriptions/onsimulatetokencontract.md): Live-streamed published analysis results for a token, across all simulation IDs. This is not a complete request-status stream: use getSimulateTokenContractResults to check pending, failed or indeterminate outcomes.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.