# Get block deploys

Get deploys by block identifier (hash or height).

```
GET /blocks/{block_identifier}/deploys
```

## Query params

| Query param              | Description                                  |
| ------------------------ | -------------------------------------------- |
| `caller_public_key`      | Deploy caller public key                     |
| `contract_package_hash`  | Contract package hash of the called contract |
| `contract_hash`          | Called contract hash                         |
| `contract_entrypoint_id` | Called entry point ID                        |

## Sorting

| Property    | Description               |
| ----------- | ------------------------- |
| `timestamp` | Sort deploys by timestamp |

Default sorting is `timestamp DESC`

## Optional properties

| Property                   | Type                                                                                        | Description                                                                                                 |
| -------------------------- | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| `account_info`             | [`AccountInfo`](https://docs.cspr.cloud/1.2.x/rest-api/account-info)                        | [Account info](https://github.com/make-software/casper-account-info-contract) provided by the deploy caller |
| `centralized_account_info` | [`CentralizedAccountInfo`](https://docs.cspr.cloud/1.2.x/rest-api/centralized-account-info) | Account information available for known accounts provided by CSPR.cloud team                                |
| `contract_package`         | [`ContractPackage`](https://docs.cspr.cloud/1.2.x/rest-api/contract-package)                | [`ContractPackage`](https://docs.cspr.cloud/1.2.x/rest-api/contract-package) called by deploy.              |
| `contract`                 | [`Contract`](https://docs.cspr.cloud/1.2.x/rest-api/contract)                               | [`Contract`](https://docs.cspr.cloud/1.2.x/rest-api/contract) called by deploy.                             |
| `contract_entrypoint`      | [`ContractEntrypoint`](https://docs.cspr.cloud/1.2.x/rest-api/contract-entry-point)         | [`ContractEntrypoint`](https://docs.cspr.cloud/1.2.x/rest-api/contract-entry-point) called by deploy.       |
| `rate`                     | `float32`                                                                                   | CSPR rate for specified currency that was relevant at the moment of deploy creation.                        |
| `transfers`                | \[][`Transfer`](https://docs.cspr.cloud/1.2.x/rest-api/transfer)                            | List of `Transfer` entities.                                                                                |
| `nft_token_actions`        | \[] [`NFTTokenAction`](https://docs.cspr.cloud/1.2.x/rest-api/non-fungible-token-action)    | List of `NFTTokenAction` entities.                                                                          |
| `ft_token_actions`         | \[] [`Fungible token action`](https://docs.cspr.cloud/1.2.x/rest-api/fungible-token-action) | List of `Fungible token action` entities.                                                                   |

## Response

[`PaginatedResponse`](https://docs.cspr.cloud/1.2.x/documentation/overview/pagination)[`<Deploy>`](https://docs.cspr.cloud/1.2.x/rest-api/deploy)

## Example

```bash
curl -X 'GET' \
  'https://api.testnet.cspr.cloud/blocks/a6c2974d211fdf0ddadb15f4e81b2fb65a0274787c46f362301ef583764f26f4/deploys' \
  -H 'accept: application/json' \
  -H 'authorization: 55f79117-fc4d-4d60-9956-65423f39a06a'
```

```json
{
  "item_count": 1,
  "page_count": 1,
  "data": [
    {
      "args": {
        "amount": {
          "cl_type": "U512",
          "parsed": "2500000000"
        },
        "id": {
          "cl_type": {
            "Option": "U64"
          },
          "parsed": null
        },
        "target": {
          "cl_type": {
            "ByteArray": 32
          },
          "parsed": "536345751b7c6c6299d5ef10862d76736ed062bc32c1dabcd1179c06469d93ca"
        }
      },
      "block_hash": "d76b4ce5281f2306911a0e5e9ac0b29f1f4daf36f4636e78599ce64a7f7528a1",
      "block_height": 2404577,
      "caller_public_key": "020304811a7b142c32860cb1c114f23b0754215918d819f485b0a201af6cde70fa6c",
      "contract_hash": null,
      "contract_package_hash": null,
      "cost": "100000000",
      "deploy_hash": "88461218a5e972fcda1d764d7cc4edb2e0c3a538123b97890d484f43c55935f5",
      "entry_point_id": null,
      "error_message": null,
      "execution_type_id": 6,
      "payment_amount": "100000000",
      "status": "processed",
      "timestamp": "2024-01-08T15:24:47Z"
    }
  ]
}
```
