# getCreateDataSetAndAddPiecesResult

> **getCreateDataSetAndAddPiecesResult**(`client`, `options`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`OutputType`](/reference/filoz/synapse-core/warm-storage/namespaces/getcreatedatasetandaddpiecesresult/type-aliases/outputtype/)\>

Defined in: [packages/synapse-core/src/warm-storage/submission-result.ts:183](https://github.com/FilOzone/synapse-sdk/blob/56f1ef3fb5ccfea19fb80cb59e997e381f37d85a/packages/synapse-core/src/warm-storage/submission-result.ts#L183)

Check on chain whether a create data set and add pieces submission landed, without the SP or any transaction hash.

Both happen in one transaction, so the add pieces nonce alone tells whether it landed and
gives the data set ID and piece IDs. If `created` is false, resubmitting the same `extraData` is safe.

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `client` | `Client`\<`Transport`, `Chain`\> | The client to use to read the nonce. |
| `options` | [`OptionsType`](/reference/filoz/synapse-core/warm-storage/namespaces/getcreatedatasetandaddpiecesresult/type-aliases/optionstype/) | [getCreateDataSetAndAddPiecesResult.OptionsType](/reference/filoz/synapse-core/warm-storage/namespaces/getcreatedatasetandaddpiecesresult/type-aliases/optionstype/) |

## Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`OutputType`](/reference/filoz/synapse-core/warm-storage/namespaces/getcreatedatasetandaddpiecesresult/type-aliases/outputtype/)\>

The result [getCreateDataSetAndAddPiecesResult.OutputType](/reference/filoz/synapse-core/warm-storage/namespaces/getcreatedatasetandaddpiecesresult/type-aliases/outputtype/)

## Throws

Errors [getCreateDataSetAndAddPiecesResult.ErrorType](/reference/filoz/synapse-core/warm-storage/namespaces/getcreatedatasetandaddpiecesresult/type-aliases/errortype/)

## Example

```ts
import { getCreateDataSetAndAddPiecesResult } from '@filoz/synapse-core/warm-storage'
import { createPublicClient, http } from 'viem'
import { calibration } from '@filoz/synapse-core/chains'

const client = createPublicClient({
  chain: calibration,
  transport: http(),
})

// `extraData` and `pieceCount` were persisted from `createDataSetAndAddPieces` before a crash
const result = await getCreateDataSetAndAddPiecesResult(client, {
  extraData: '0x...',
  pieceCount: 1,
})

if (result.created) {
  console.log(result.dataSetId, result.pieceIds)
}
```