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

# ContractTransactionResponse

A **ContractTransactionResponse** will return a [**ContractTransactionReceipt**](/sdk/content/classes/ContractTransactionReceipt)
when waited on.

## Extends

* [`QuaiTransactionResponse`](/sdk/content/classes/QuaiTransactionResponse)

## Properties

| Property      | Modifier   | Type                                                           | Description                                                                                                                                                                                                                                                                                                                                                                            | Inherited from                                                                          |
| :------------ | :--------- | :------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- |
| `accessList`  | `readonly` | `null` \| [`AccessList`](/sdk/content/type-aliases/AccessList) | The [EIP-2930](https://eips.ethereum.org/EIPS/eip-2930) access list for transaction types that support it,<br />otherwise `null`.                                                                                                                                                                                                                                                      | [`QuaiTransactionResponse`](/sdk/content/classes/QuaiTransactionResponse).`accessList`  |
| `blockHash`   | `readonly` | `null` \| `string`                                             | The blockHash of the block that this transaction was included in.<br /><br />This is `null` for pending transactions.                                                                                                                                                                                                                                                                  | [`QuaiTransactionResponse`](/sdk/content/classes/QuaiTransactionResponse).`blockHash`   |
| `blockNumber` | `readonly` | `null` \| `number`                                             | The block number of the block that this transaction was included in.<br /><br />This is `null` for pending transactions.                                                                                                                                                                                                                                                               | [`QuaiTransactionResponse`](/sdk/content/classes/QuaiTransactionResponse).`blockNumber` |
| `chainId`     | `readonly` | `bigint`                                                       | The chain ID.                                                                                                                                                                                                                                                                                                                                                                          | [`QuaiTransactionResponse`](/sdk/content/classes/QuaiTransactionResponse).`chainId`     |
| `data`        | `readonly` | `string`                                                       | The data.                                                                                                                                                                                                                                                                                                                                                                              | [`QuaiTransactionResponse`](/sdk/content/classes/QuaiTransactionResponse).`data`        |
| `from`        | `readonly` | `string`                                                       | The sender of this transaction. It is implicitly computed from the transaction pre-image hash (as the digest) and<br />the [**signature** ](/sdk/content/classes/QuaiTransactionResponse) using ecrecover.                                                                                                                                                                             | [`QuaiTransactionResponse`](/sdk/content/classes/QuaiTransactionResponse).`from`        |
| `gasLimit`    | `readonly` | `bigint`                                                       | The maximum units of gas this transaction can consume. If execution exceeds this, the entries transaction is<br />reverted and the sender is charged for the full amount, despite not state changes being made.                                                                                                                                                                        | [`QuaiTransactionResponse`](/sdk/content/classes/QuaiTransactionResponse).`gasLimit`    |
| `gasPrice`    | `readonly` | `null` \| `bigint`                                             | The maximum fee (per unit of gas) to allow this transaction to charge the sender.                                                                                                                                                                                                                                                                                                      | [`QuaiTransactionResponse`](/sdk/content/classes/QuaiTransactionResponse).`gasPrice`    |
| `hash`        | `readonly` | `string`                                                       | The transaction hash.                                                                                                                                                                                                                                                                                                                                                                  | [`QuaiTransactionResponse`](/sdk/content/classes/QuaiTransactionResponse).`hash`        |
| `index`       | `readonly` | `bigint`                                                       | The index within the block that this transaction resides at.                                                                                                                                                                                                                                                                                                                           | [`QuaiTransactionResponse`](/sdk/content/classes/QuaiTransactionResponse).`index`       |
| `nonce`       | `readonly` | `number`                                                       | The nonce, which is used to prevent replay attacks and offer a method to ensure transactions from a given sender<br />are explicitly ordered.<br /><br />When sending a transaction, this must be equal to the number of transactions ever sent by<br />[**from** ](/sdk/content/classes/QuaiTransactionResponse).                                                                     | [`QuaiTransactionResponse`](/sdk/content/classes/QuaiTransactionResponse).`nonce`       |
| `provider`    | `readonly` | [`Provider`](/sdk/content/interfaces/Provider)                 | The provider this is connected to, which will influence how its methods will resolve its async inspection<br />methods.                                                                                                                                                                                                                                                                | [`QuaiTransactionResponse`](/sdk/content/classes/QuaiTransactionResponse).`provider`    |
| `signature`   | `readonly` | [`Signature`](/sdk/content/classes/Signature)                  | The signature.                                                                                                                                                                                                                                                                                                                                                                         | [`QuaiTransactionResponse`](/sdk/content/classes/QuaiTransactionResponse).`signature`   |
| `to`          | `readonly` | `null` \| `string`                                             | The receiver of this transaction.<br /><br />If `null`, then the transaction is an initcode transaction. This means the result of executing the<br />[**data** ](/sdk/content/classes/QuaiTransactionResponse) will be deployed as a new contract on chain (assuming it does not<br />revert) and the address may be computed using [getCreateAddress](../functions/getCreateAddress). | [`QuaiTransactionResponse`](/sdk/content/classes/QuaiTransactionResponse).`to`          |
| `type`        | `readonly` | `number`                                                       | The [EIP-2718](https://eips.ethereum.org/EIPS/eip-2718) transaction envelope type. This is `0` for legacy<br />transactions types.                                                                                                                                                                                                                                                     | [`QuaiTransactionResponse`](/sdk/content/classes/QuaiTransactionResponse).`type`        |
| `value`       | `readonly` | `bigint`                                                       | The value, in wei. Use [formatEther](../functions/formatEther) to format this value as ether.                                                                                                                                                                                                                                                                                          | [`QuaiTransactionResponse`](/sdk/content/classes/QuaiTransactionResponse).`value`       |

## Methods

### confirmations()

```ts theme={null}
confirmations(): Promise<number>
```

Resolve to the number of confirmations this transaction has.

#### Returns

`Promise`\<`number`>

A promise resolving to the number of confirmations.

#### Inherited from

[`QuaiTransactionResponse`](/sdk/content/classes/QuaiTransactionResponse).[`confirmations`](/sdk/content/classes/QuaiTransactionResponse#confirmations)

#### Throws

If the block is not found.

#### Source

[providers/provider.ts:1921](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L1921)

***

### getBlock()

```ts theme={null}
getBlock(shard): Promise<null | Block>
```

Resolves to the Block that this transaction was included in.

This will return null if the transaction has not been included yet.

#### Parameters

| Parameter | Type                                       | Description                        |
| :-------- | :----------------------------------------- | :--------------------------------- |
| `shard`   | [`Shard`](/sdk/content/enumerations/Shard) | The shard to fetch the block from. |

#### Returns

`Promise`\<`null` | [`Block`](/sdk/content/classes/Block)>

A promise resolving to the block.

#### Inherited from

[`QuaiTransactionResponse`](/sdk/content/classes/QuaiTransactionResponse).[`getBlock`](/sdk/content/classes/QuaiTransactionResponse#getblock)

#### Source

[providers/provider.ts:1882](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L1882)

***

### getTransaction()

```ts theme={null}
getTransaction(): Promise<null | QuaiTransactionResponse>
```

Resolves to this transaction being re-requested from the provider. This can be used if you have an unmined
transaction and wish to get an up-to-date populated instance.

#### Returns

`Promise`\<`null` | [`QuaiTransactionResponse`](/sdk/content/classes/QuaiTransactionResponse)>

A promise resolving to the transaction, or null if not found.

#### Inherited from

[`QuaiTransactionResponse`](/sdk/content/classes/QuaiTransactionResponse).[`getTransaction`](/sdk/content/classes/QuaiTransactionResponse#gettransaction)

#### Source

[providers/provider.ts:1906](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L1906)

***

### isMined()

```ts theme={null}
isMined(): this is QuaiMinedTransactionResponse
```

Returns `true` if this transaction has been included.

This is effective only as of the time the TransactionResponse was instantiated. To get up-to-date information,
use [**getTransaction**](/sdk/content/classes/QuaiTransactionResponse#gettransaction).

This provides a Type Guard that this transaction will have non-null property values for properties that are null
for unmined transactions.

#### Returns

`this is QuaiMinedTransactionResponse`

True if the transaction has been mined.

#### Inherited from

[`QuaiTransactionResponse`](/sdk/content/classes/QuaiTransactionResponse).[`isMined`](/sdk/content/classes/QuaiTransactionResponse#ismined)

#### Throws

If the transaction was replaced, repriced, or cancelled.

#### Source

[providers/provider.ts:2179](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2179)

***

### removedEvent()

```ts theme={null}
removedEvent(): OrphanFilter
```

Returns a filter which can be used to listen for orphan events that evict this transaction.

#### Returns

[`OrphanFilter`](/sdk/content/type-aliases/OrphanFilter)

The orphan filter.

#### Inherited from

[`QuaiTransactionResponse`](/sdk/content/classes/QuaiTransactionResponse).[`removedEvent`](/sdk/content/classes/QuaiTransactionResponse#removedevent)

#### Source

[providers/provider.ts:2188](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2188)

***

### reorderedEvent()

```ts theme={null}
reorderedEvent(other?): OrphanFilter
```

Returns a filter which can be used to listen for orphan events that re-order this event against `other`.

#### Parameters

| Parameter | Type                                                                   | Description                               |
| :-------- | :--------------------------------------------------------------------- | :---------------------------------------- |
| `other`?  | [`TransactionResponse`](/sdk/content/type-aliases/TransactionResponse) | The other transaction to compare against. |

#### Returns

[`OrphanFilter`](/sdk/content/type-aliases/OrphanFilter)

The orphan filter.

#### Inherited from

[`QuaiTransactionResponse`](/sdk/content/classes/QuaiTransactionResponse).[`reorderedEvent`](/sdk/content/classes/QuaiTransactionResponse#reorderedevent)

#### Source

[providers/provider.ts:2201](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2201)

***

### replaceableTransaction()

```ts theme={null}
replaceableTransaction(startBlock): QuaiTransactionResponse
```

Returns a new TransactionResponse instance which has the ability to detect (and throw an error) if the
transaction is replaced, which will begin scanning at `startBlock`.

This should generally not be used by developers and is intended primarily for internal use. Setting an incorrect
`startBlock` can have devastating performance consequences if used incorrectly.

#### Parameters

| Parameter    | Type     | Description                                          |
| :----------- | :------- | :--------------------------------------------------- |
| `startBlock` | `number` | The block number to start scanning for replacements. |

#### Returns

[`QuaiTransactionResponse`](/sdk/content/classes/QuaiTransactionResponse)

The replaceable transaction.

#### Inherited from

[`QuaiTransactionResponse`](/sdk/content/classes/QuaiTransactionResponse).[`replaceableTransaction`](/sdk/content/classes/QuaiTransactionResponse#replaceabletransaction)

#### Source

[providers/provider.ts:2223](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L2223)

***

### toJSON()

```ts theme={null}
toJSON(): any
```

Returns a JSON-compatible representation of this transaction.

#### Returns

`any`

#### Inherited from

[`QuaiTransactionResponse`](/sdk/content/classes/QuaiTransactionResponse).[`toJSON`](/sdk/content/classes/QuaiTransactionResponse#tojson)

#### Source

[providers/provider.ts:1850](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/providers/provider.ts#L1850)

***

### wait()

```ts theme={null}
wait(confirms?): Promise<null | ContractTransactionReceipt>
```

Resolves once this transaction has been mined and has `confirms` blocks including it (default: `1`) with an
optional `timeout`.

This can resolve to `null` only if `confirms` is `0` and the transaction has not been mined, otherwise this will
wait until enough confirmations have completed.

#### Parameters

| Parameter   | Type     | Description                              |
| :---------- | :------- | :--------------------------------------- |
| `confirms`? | `number` | The number of confirmations to wait for. |

#### Returns

`Promise`\<`null` | [`ContractTransactionReceipt`](/sdk/content/classes/ContractTransactionReceipt)>

The transaction receipt, or `null` if `confirms` is `0`.

#### Overrides

[`QuaiTransactionResponse`](/sdk/content/classes/QuaiTransactionResponse).[`wait`](/sdk/content/classes/QuaiTransactionResponse#wait)

#### Source

[contract/wrappers.ts:141](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/contract/wrappers.ts#L141)
