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

# Block Effects

> Returns changes in block for given block height or hash over all transactions for all the types. Includes changes like account_touched, access_key_touched, data_touched, contract_code_touched.



## OpenAPI

````yaml /openapi.json post /block_effects
openapi: 3.0.0
info:
  title: NEAR Protocol JSON RPC API
  version: 1.2.3
servers:
  - url: https://rpc.mainnet.near.org
    description: Mainnet
  - url: https://rpc.testnet.near.org
    description: Testnet
security: []
paths:
  /block_effects:
    post:
      summary: Block Effects
      description: >-
        Returns changes in block for given block height or hash over all
        transactions for all the types. Includes changes like account_touched,
        access_key_touched, data_touched, contract_code_touched.
      operationId: block_effects
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JsonRpcRequest_for_block_effects'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/JsonRpcResponse_for_RpcStateChangesInBlockByTypeResponse_and_RpcStateChangesError
components:
  schemas:
    JsonRpcRequest_for_block_effects:
      properties:
        id:
          type: string
        jsonrpc:
          type: string
        method:
          enum:
            - block_effects
          type: string
        params:
          $ref: '#/components/schemas/RpcStateChangesInBlockRequest'
      required:
        - jsonrpc
        - id
        - params
        - method
      title: JsonRpcRequest_for_block_effects
      type: object
    JsonRpcResponse_for_RpcStateChangesInBlockByTypeResponse_and_RpcStateChangesError:
      oneOf:
        - $ref: >-
            #/components/schemas/JsonRpcResponse_for_RpcStateChangesInBlockByTypeResponse_and_RpcStateChangesError_variant0
        - $ref: >-
            #/components/schemas/JsonRpcResponse_for_RpcStateChangesInBlockByTypeResponse_and_RpcStateChangesError_variant1
      properties:
        id:
          type: string
        jsonrpc:
          type: string
      required:
        - jsonrpc
        - id
      title: >-
        JsonRpcResponse_for_RpcStateChangesInBlockByTypeResponse_and_RpcStateChangesError
      type: object
    RpcStateChangesInBlockRequest:
      oneOf:
        - $ref: '#/components/schemas/RpcStateChangesInBlockRequest_variant0'
        - $ref: '#/components/schemas/RpcStateChangesInBlockRequest_variant1'
        - $ref: '#/components/schemas/RpcStateChangesInBlockRequest_variant2'
      title: RpcStateChangesInBlockRequest
      type: object
    JsonRpcResponse_for_RpcStateChangesInBlockByTypeResponse_and_RpcStateChangesError_variant0:
      properties:
        result:
          $ref: '#/components/schemas/RpcStateChangesInBlockByTypeResponse'
      required:
        - result
      type: object
    JsonRpcResponse_for_RpcStateChangesInBlockByTypeResponse_and_RpcStateChangesError_variant1:
      properties:
        error:
          $ref: '#/components/schemas/ErrorWrapper_for_RpcStateChangesError'
      required:
        - error
      type: object
    RpcStateChangesInBlockRequest_variant0:
      properties:
        block_id:
          $ref: '#/components/schemas/BlockId'
      required:
        - block_id
      type: object
    RpcStateChangesInBlockRequest_variant1:
      properties:
        finality:
          $ref: '#/components/schemas/Finality'
      required:
        - finality
      type: object
    RpcStateChangesInBlockRequest_variant2:
      properties:
        sync_checkpoint:
          $ref: '#/components/schemas/SyncCheckpoint'
      required:
        - sync_checkpoint
      type: object
    RpcStateChangesInBlockByTypeResponse:
      properties:
        block_hash:
          $ref: '#/components/schemas/CryptoHash'
        changes:
          items:
            $ref: '#/components/schemas/StateChangeKindView'
          type: array
      required:
        - block_hash
        - changes
      type: object
    ErrorWrapper_for_RpcStateChangesError:
      oneOf:
        - $ref: '#/components/schemas/ErrorWrapper_for_RpcStateChangesError_variant0'
        - $ref: '#/components/schemas/ErrorWrapper_for_RpcStateChangesError_variant1'
        - $ref: '#/components/schemas/ErrorWrapper_for_RpcStateChangesError_variant2'
    BlockId:
      anyOf:
        - $ref: '#/components/schemas/BlockId_variant0'
        - $ref: '#/components/schemas/CryptoHash'
    Finality:
      description: Different types of finality.
      enum:
        - optimistic
        - near-final
        - final
      type: string
    SyncCheckpoint:
      enum:
        - genesis
        - earliest_available
      type: string
    CryptoHash:
      type: string
    StateChangeKindView:
      description: |-
        It is a [serializable view] of [`StateChangeKind`].

        [serializable view]: ./index.html
        [`StateChangeKind`]: ../types/struct.StateChangeKind.html
      oneOf:
        - $ref: '#/components/schemas/StateChangeKindView_variant0'
        - $ref: '#/components/schemas/StateChangeKindView_variant1'
        - $ref: '#/components/schemas/StateChangeKindView_variant2'
        - $ref: '#/components/schemas/StateChangeKindView_variant3'
    ErrorWrapper_for_RpcStateChangesError_variant0:
      properties:
        cause:
          $ref: '#/components/schemas/RpcRequestValidationErrorKind'
        name:
          enum:
            - REQUEST_VALIDATION_ERROR
          type: string
      required:
        - name
        - cause
      type: object
    ErrorWrapper_for_RpcStateChangesError_variant1:
      properties:
        cause:
          $ref: '#/components/schemas/RpcStateChangesError'
        name:
          enum:
            - HANDLER_ERROR
          type: string
      required:
        - name
        - cause
      type: object
    ErrorWrapper_for_RpcStateChangesError_variant2:
      properties:
        cause:
          $ref: '#/components/schemas/InternalError'
        name:
          enum:
            - INTERNAL_ERROR
          type: string
      required:
        - name
        - cause
      type: object
    BlockId_variant0:
      format: uint64
      minimum: 0
      title: block_height
      type: integer
    StateChangeKindView_variant0:
      properties:
        account_id:
          $ref: '#/components/schemas/AccountId'
        type:
          enum:
            - account_touched
          type: string
      required:
        - type
        - account_id
      type: object
    StateChangeKindView_variant1:
      properties:
        account_id:
          $ref: '#/components/schemas/AccountId'
        type:
          enum:
            - access_key_touched
          type: string
      required:
        - type
        - account_id
      type: object
    StateChangeKindView_variant2:
      properties:
        account_id:
          $ref: '#/components/schemas/AccountId'
        type:
          enum:
            - data_touched
          type: string
      required:
        - type
        - account_id
      type: object
    StateChangeKindView_variant3:
      properties:
        account_id:
          $ref: '#/components/schemas/AccountId'
        type:
          enum:
            - contract_code_touched
          type: string
      required:
        - type
        - account_id
      type: object
    RpcRequestValidationErrorKind:
      oneOf:
        - $ref: '#/components/schemas/RpcRequestValidationErrorKind_variant0'
        - $ref: '#/components/schemas/RpcRequestValidationErrorKind_variant1'
    RpcStateChangesError:
      oneOf:
        - $ref: '#/components/schemas/RpcStateChangesError_variant0'
        - $ref: '#/components/schemas/RpcStateChangesError_variant1'
        - $ref: '#/components/schemas/RpcStateChangesError_variant2'
    InternalError:
      oneOf:
        - $ref: '#/components/schemas/InternalError_variant0'
    AccountId:
      description: >-
        NEAR Account Identifier.


        This is a unique, syntactically valid, human-readable account identifier
        on the NEAR network.


        [See the crate-level docs for information about
        validation.](index.html#account-id-rules)


        Also see [Error kind precedence](AccountId#error-kind-precedence).


        ## Examples


        ```

        use near_account_id::AccountId;


        let alice: AccountId = "alice.near".parse().unwrap();


        assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f)

        ```
      title: AccountId
      type: string
    RpcRequestValidationErrorKind_variant0:
      properties:
        info:
          properties:
            method_name:
              type: string
          required:
            - method_name
          type: object
        name:
          enum:
            - METHOD_NOT_FOUND
          type: string
      required:
        - name
        - info
      type: object
    RpcRequestValidationErrorKind_variant1:
      properties:
        info:
          properties:
            error_message:
              type: string
          required:
            - error_message
          type: object
        name:
          enum:
            - PARSE_ERROR
          type: string
      required:
        - name
        - info
      type: object
    RpcStateChangesError_variant0:
      properties:
        info:
          type: object
        name:
          enum:
            - UNKNOWN_BLOCK
          type: string
      required:
        - name
        - info
      type: object
    RpcStateChangesError_variant1:
      properties:
        name:
          enum:
            - NOT_SYNCED_YET
          type: string
      required:
        - name
      type: object
    RpcStateChangesError_variant2:
      properties:
        info:
          properties:
            error_message:
              type: string
          required:
            - error_message
          type: object
        name:
          enum:
            - INTERNAL_ERROR
          type: string
      required:
        - name
        - info
      type: object
    InternalError_variant0:
      properties:
        info:
          properties:
            error_message:
              type: string
          required:
            - error_message
          type: object
        name:
          enum:
            - INTERNAL_ERROR
          type: string
      required:
        - name
        - info
      type: object

````