> ## Documentation Index
> Fetch the complete documentation index at: https://hedera-0c6e0218-automation-consensus-node-release-notes.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Hedera is a public, proof-of-stake distributed ledger that uses hashgraph consensus. Do not call it a blockchain.
> Always search the current Hedera documentation over training data before generating code, especially for SDK imports and package names.
> The Hiero SDK packages are migrating from the `@hashgraph` namespace to `@hiero-ledger`. Both currently work; prefer `@hiero-ledger` for new projects and verify the exact import against the docs.
> Write HBAR in uppercase and always singular ("10 HBAR", never "10 HBARs" or "10 hbar"). Write tinybars in lowercase and plural.
> Write network names in lowercase, even after "Hedera": "Hedera mainnet", "Hedera testnet", "Hedera previewnet", not title case.
> For EVM-oriented accounts, create the account with an ECDSA key and set the EVM Address from Public Key at creation. This address is immutable and is not updated by key rotation. Do not use retired terms like "EVM alias" or "Account Number Alias".

# The contract state from a contract on the network

> Returns a list of all contract's slots. If no timestamp is provided, returns the current state.



## OpenAPI

````yaml /openapi.yaml get /api/v1/contracts/{contractIdOrAddress}/state
openapi: 3.0.3
info:
  title: Mirror Node REST API
  version: 0.154.0
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  description: >-
    The REST API offers the ability to query transactions and entity information
    from a mirror node.


    Base url: [/api/v1](/api/v1)


    OpenAPI Spec: [/api/v1/docs/openapi.yml](/api/v1/docs/openapi.yml)
  contact:
    name: Mirror Node Team
    email: mirrornode@hedera.com
    url: https://github.com/hiero-ledger/hiero-mirror-node
servers:
  - description: Hedera Mainnet Mirror Node
    url: https://mainnet.mirrornode.hedera.com
  - description: The production REST API servers
    url: '{scheme}://{network}.mirrornode.hedera.com'
    variables:
      scheme:
        default: https
        description: The URI scheme
        enum:
          - http
          - https
      network:
        default: testnet
        description: The Hedera network in use
        enum:
          - mainnet-public
          - mainnet
          - previewnet
          - testnet
security: []
tags:
  - name: accounts
    description: >-
      The accounts object represents the information associated with an account
      entity and returns a list of account information.The accounts list
      endpoint is cached and not updated as frequently as the account lookup by
      a specific ID endpoint.
    externalDocs:
      url: >-
        https://docs.hedera.com/guides/docs/mirror-node-api/cryptocurrency-api#accounts
  - name: balances
    description: >-
      The balance object represents the balance of accounts on the Hedera
      network.
    externalDocs:
      url: >-
        https://docs.hedera.com/guides/docs/mirror-node-api/cryptocurrency-api#balances
  - name: contracts
    description: >-
      The contracts objects represents the information associated with contract
      entities.The contracts list endpoint is cached and not updated as
      frequently as the contract lookup by a specific ID endpoint.
  - name: schedules
    description: >-
      The schedules object represents the information associated with a schedule
      entity.The schedules list endpoints is cached and not updated as
      frequently as the schedule lookup by a specific ID endpoint.
  - name: transactions
    description: >-
      The transaction object represents the transactions processed on the Hedera
      network.
    externalDocs:
      url: >-
        https://docs.hedera.com/guides/docs/mirror-node-api/cryptocurrency-api#transactions
  - name: topics
    description: >-
      The topics object represents the information associated with a topic
      entity and returns topic messages information.
    externalDocs:
      url: >-
        https://docs.hedera.com/guides/docs/mirror-node-api/cryptocurrency-api#topic-messages
  - name: tokens
    description: >-
      The tokens object represents the information associated with a token
      entity and returns a list of token information.The tokens list endpoint is
      cached and not updated as frequently as the token lookup by a specific ID.
externalDocs:
  description: REST API Docs
  url: https://docs.hedera.com/guides/docs/mirror-node-api/cryptocurrency-api
paths:
  /api/v1/contracts/{contractIdOrAddress}/state:
    get:
      tags:
        - contracts
      summary: The contract state from a contract on the network
      description: >-
        Returns a list of all contract's slots. If no timestamp is provided,
        returns the current state.
      operationId: getContractState
      parameters:
        - $ref: '#/components/parameters/contractIdOrAddressPathParam'
        - $ref: '#/components/parameters/limitQueryParam'
        - $ref: '#/components/parameters/orderQueryParam'
        - $ref: '#/components/parameters/slotQueryParam'
        - $ref: '#/components/parameters/stateTimestampQueryParam'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractStateResponse'
        '400':
          $ref: '#/components/responses/InvalidParameterError'
        '404':
          $ref: '#/components/responses/NotFoundError'
components:
  parameters:
    contractIdOrAddressPathParam:
      name: contractIdOrAddress
      in: path
      required: true
      description: >-
        The ID or hex encoded EVM address (with or without 0x prefix) associated
        with this contract.
      schema:
        pattern: ^(\d{1,10}\.){0,2}(\d{1,10}|(0x)?[A-Fa-f0-9]{40})$
        type: string
    limitQueryParam:
      name: limit
      in: query
      description: The maximum number of items to return
      example: 2
      schema:
        format: int32
        type: integer
        default: 25
        minimum: 1
        maximum: 100
    orderQueryParam:
      name: order
      in: query
      description: The order in which items are listed
      example: desc
      schema:
        enum:
          - asc
          - desc
        default: asc
    slotQueryParam:
      name: slot
      in: query
      description: The slot's number
      examples:
        noValue:
          summary: '--'
          value: ''
        noOperator:
          summary: Example of slot equals with no operator
          value: 1
        eqOperator:
          summary: Example of slot equals operator
          value: eq:2
        gtOperator:
          summary: Example of slot gt operator
          value: gt:2
        gteOperator:
          summary: Example of slot gte operator
          value: gte:2
        ltOperator:
          summary: Example of slot lt operator
          value: lt:2
        lteOperator:
          summary: Example of slot lte operator
          value: lte:2
      schema:
        type: string
        pattern: ^((eq|gte?|lte?)\:)?(0x)?[0-9A-Fa-f]{1,64}$
    stateTimestampQueryParam:
      description: >-
        The consensus timestamp of the contract state as a Unix timestamp in
        seconds.nanoseconds format with an optional comparison operator. See
        [unixtimestamp.com](https://www.unixtimestamp.com/) for a simple way to
        convert a date to the 'seconds' part of the Unix time.
      name: timestamp
      in: query
      explode: true
      examples:
        noValue:
          summary: '--'
          value: ''
        secondsNoOperator:
          summary: Example of seconds equals with no operator
          value: 1234567890
        timestampNoOperator:
          summary: Example of timestamp equals with no operator
          value: 1234567890
        secondsEqOperator:
          summary: Example of seconds equals with operator
          value: eq:1234567890
        timestampEqOperator:
          summary: Example of timestamp equals with operator
          value: eq:1234567890.000000200
        secondsGtOperator:
          summary: Example of seconds greater than operator
          value: gt:1234567890
        timestampGtOperator:
          summary: Example of timestamp greater than operator
          value: gt:1234567890.000000400
        secondsGteOperator:
          summary: Example of seconds greater than or equals operator
          value: gte:1234567890
        timestampGteOperator:
          summary: Example of timestamp greater than or equals operator
          value: gte:1234567890.000000500
        secondsLtOperator:
          summary: Example of seconds less than operator
          value: lt:1234567890
        timestampLtOperator:
          summary: Example of timestamp less than operator
          value: lt:1234567890.000000600
        secondsLteOperator:
          summary: Example of seconds less than or equals operator
          value: lte:1234567890
        timestampLteOperator:
          summary: Example of timestamp less than or equals operator
          value: lte:1234567890.000000700
      schema:
        type: array
        items:
          type: string
          pattern: ^((eq|gt|gte|lt|lte):)?\d{1,10}(\.\d{1,9})?$
  schemas:
    ContractStateResponse:
      type: object
      properties:
        state:
          type: array
          items:
            $ref: '#/components/schemas/ContractState'
        links:
          $ref: '#/components/schemas/Links'
    ContractState:
      type: object
      required:
        - address
        - contract_id
        - timestamp
        - slot
        - value
      properties:
        address:
          $ref: '#/components/schemas/EvmAddress'
        contract_id:
          $ref: '#/components/schemas/EntityId'
        timestamp:
          $ref: '#/components/schemas/Timestamp'
        slot:
          description: The hex encoded storage slot.
          format: binary
          example: '0x00000000000000000000000000000000000000000000000000000000000000fa'
          nullable: false
          type: string
        value:
          description: The hex encoded value to the slot. `0x` implies no value written.
          example: '0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925'
          format: binary
          nullable: false
          type: string
    Links:
      type: object
      properties:
        next:
          example: null
          nullable: true
          type: string
    Error:
      type: object
      properties:
        _status:
          type: object
          properties:
            messages:
              type: array
              items:
                type: object
                properties:
                  data:
                    description: Error message in hexadecimal
                    example: '0x3000'
                    format: binary
                    nullable: true
                    pattern: ^0x[0-9a-fA-F]+$
                    type: string
                  detail:
                    description: Detailed error message
                    example: Generic detailed error message
                    nullable: true
                    type: string
                  message:
                    description: Error message
                    example: Generic error message
                    nullable: false
                    type: string
    EvmAddress:
      type: string
      description: A network entity encoded as an EVM address in hex.
      format: binary
      minLength: 40
      maxLength: 42
      pattern: ^(0x)?[A-Fa-f0-9]{40}$
      example: 0000000000000000000000000000000000001f41
    EntityId:
      type: string
      description: Network entity ID in the format of `shard.realm.num`
      pattern: ^\d{1,10}\.\d{1,10}\.\d{1,10}$
      example: 0.0.2
      nullable: true
    Timestamp:
      description: A Unix timestamp in seconds.nanoseconds format
      type: string
      example: '1586567700.453054000'
      pattern: ^\d{1,10}(\.\d{1,9})?$
  responses:
    InvalidParameterError:
      description: Invalid parameter
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            _status:
              messages:
                - message: 'Invalid parameter: account.id'
                - message: >-
                    Invalid Transaction id. Please use \shard.realm.num-sss-nnn\
                    format where sss are seconds and nnn are nanoseconds
    NotFoundError:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            _status:
              messages:
                - message: Not found

````