> ## 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.

# getSimulateTokenContractResults

> Returns recorded token contract analyses, including pending and failed requests, newest first. Pass a simulationId to fetch a specific request.

## GraphQL

```
type Query {
  # Requires a Growth or Enterprise plan.
  getSimulateTokenContractResults(
    contractAddress: String!
    networkId: Int!
    simulationId: String
    cursor: String
    limit: Int
  ): GetSimulateTokenContractResultsConnection!
}

enum SimulateTokenContractResultStatusEnum {
  SUCCESS
  FAILURE
  PENDING
}

enum AnalysisVerdictEnum {
  TRADEABLE
  HONEYPOT
  INDETERMINATE
}

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
}

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

type SimulateTokenType {
  contractAddress: String!
  tokenSymbol: String
  decimals: Int
  tokenName: String
  totalSupply: String
  canTransferOwnership: Boolean
  canRenounceOwnership: Boolean
  isOwnerRenounced: Boolean
}

type SimulateDeployType {
  deploySuccess: Boolean
  tokenMintedToDeployer: String
}

type SimulateContractBalanceType {
  tokenContractTokenBalance: String
  tokenContractEthBalance: String
}

type SimulateLiquidityType {
  pairAddress: String
  lpTotalSupply: String
  preLiquidityEnableTradingCall: String
  preLiquidityEnableTradingSuccess: Boolean
  preLiquidityEnableTradingSupportsTransfer: Boolean
  liquiditySetByPreLiquidityOpenTradingCall: Boolean
  postLiquidityEnableTradingCall: String
  postLiquidityEnableTradingSuccess: Boolean
  addLiquiditySuccess: Boolean
}

type SimulateTransferType {
  tokenContractApprovalSuccess: Boolean
  tokenTransferredToContractSuccess: Boolean
  userApprovalSuccess: Boolean
}

type SimulateSwapType {
  buySuccess: Boolean
  buyTax: String
  buyGasUsed: String
  maxBuyAmount: String
  sellSuccess: Boolean
  sellTax: String
  sellGasUsed: String
  maxSellAmount: String
}

type SimulateOwnerType {
  ownerAddress: String
  ownerTokenBalance: String
  ownerEthBalance: String
}

type SimulateCreatorType {
  creatorAddress: String
  creatorTokenBalance: String
  creatorEthBalance: String
}

type SimulateTokenContractResult {
  id: String!
  sortKey: String!
  contractHashKey: String!
  uuidHashKey: String!
  blockNumber: String!
  networkId: Int!
  analysisType: Int!
  timestamp: Int!
  status: SimulateTokenContractResultStatusEnum!
  verdict: AnalysisVerdictEnum
  verdictReason: String
  errors: SimulateTokenContractErrors!
  uuid: String!
  token: SimulateTokenType!
  deploy: SimulateDeployType!
  contractBalance: SimulateContractBalanceType!
  liquidity: SimulateLiquidityType!
  transfer: SimulateTransferType!
  swap: SimulateSwapType!
  owner: SimulateOwnerType!
  creator: SimulateCreatorType!
}

type GetSimulateTokenContractResultsConnection {
  results: [SimulateTokenContractResult!]!
  cursor: String
}
```

### Example

[Test this query in the Explorer →](https://docs.codex.io/explore.md)

```graphql theme={null}
query TokenTaxes {
  getSimulateTokenContractResults(
    contractAddress: "TOKEN_ADDRESS"
    networkId: 8453
    limit: 3
  ) {
    cursor
    results {
      uuid
      timestamp
      blockNumber
      status
      verdict
      verdictReason
      swap {
        buyTax
        sellTax
        buySuccess
        sellSuccess
        maxSellAmount
      }
      liquidity {
        pairAddress
      }
      token {
        isOwnerRenounced
        canTransferOwnership
      }
      errors {
        simulatorError
        swapErrors {
          sellError
          sellErrorEnum
        }
      }
    }
  }
}
```

### Usage Guidelines

* Pass the token's contract address and `networkId`. Without `simulationId` you get every stored analysis for the token, newest block first, ten per page. Pass the `simulationId` returned by [`simulateTokenContract`](https://docs.codex.io/api-reference/mutations/simulatetokencontract) to read one request
* Read `verdict` first. `TRADEABLE` and `HONEYPOT` are decisive. `INDETERMINATE` means the run could not reach a decision, and `verdictReason` says why (no sell route, unsupported venue, no liquidity). `status` only tracks the pipeline, and `buySuccess` / `sellSuccess` can be true on an indeterminate row
* `swap.buyTax` and `swap.sellTax` are decimal fractions as strings: `"0.05"` is 5%. Each is the tax on that side's simulated trade alone, without pool, hook or launchpad platform fees, and is null when that side could not be measured on its own. A sale that reverts or returns almost nothing leaves `sellTax` null; a measured `buyTax` is preserved. When a sell cap stops the full sale, `sellTax` is the tax measured on the smaller sale that went through. Older records can instead hold an estimate from the whole buy-and-sell round trip in `sellTax`, or `"1"` for a failed sale. [`risk.buyTax` and `risk.sellTax`](https://docs.codex.io/concepts/token-risk#get-the-actual-tax-numbers) return measured values only
* `liquidity.pairAddress` is the pool the run traded through. Tax belongs to the pool, so runs that route through different pools can disagree. On Uniswap V4 the value is a 32-byte pool ID rather than an address
* A submission writes a `PENDING` row first, and the finished result lands as a second row under the same `uuid`. Poll until a row with that `uuid` has a `verdict`, or subscribe to [`onSimulateTokenContract`](https://docs.codex.io/api-reference/subscriptions/onsimulatetokencontract)
* Nullable measurements mean not measured, not zero. Rows written before the 2026 rebuild can have `status: FAILURE` and no `verdict`, and used percentage tax values
* What the verdict means for the token as a whole is summarized on `token.risk`. See [Token Risk](https://docs.codex.io/concepts/token-risk.md)

### Troubleshooting Tips

> [accordion] Why is results empty?
>
> The token has never been analyzed. Submit a run with [`simulateTokenContract`](https://docs.codex.io/api-reference/mutations/simulatetokencontract), then query again with the returned `simulationId`. Codex analyzes tokens in the background as risk signals fire, so many tokens have stored rows, but not every token does.

> [accordion] Why does the first row still say PENDING?
>
> The pending placeholder is not updated in place. The completed analysis is a separate row with the same `uuid`, so filter the page by `uuid` and take the row that has a `verdict`.

> [accordion] Why did simulateTokenContract return TOO\_MANY\_REQUESTS?
>
> One submission per token and network is allowed every five minutes. The error message names the time after which you can submit again. Stored results stay readable in the meantime.

> [accordion] Why do two runs report different taxes?
>
> Each run analyzes one pool, shown in `liquidity.pairAddress`. Token taxes can depend on the route and state at the simulated block, so runs through different pools or at different blocks can disagree. Pool, hook and launchpad platform fees are excluded from the measured tax.

### Related

* [Token Risk](https://docs.codex.io/concepts/token-risk.md): The verdict, score and reason codes that summarize these results per token
* [`simulateTokenContract`](https://docs.codex.io/api-reference/mutations/simulatetokencontract): Queue a new analysis
* [`onSimulateTokenContract`](https://docs.codex.io/api-reference/subscriptions/onsimulatetokencontract): Stream published results for a token


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