# DebugWriteResult

Result from a debug shielded write (`.dwrite` namespace). The transaction **is** broadcast (like `.write`), but you also get both plaintext and encrypted views for inspection.

## Definition

```python
@dataclass(frozen=True)
class DebugWriteResult:
    plaintext_tx: PlaintextTx
    shielded_tx: UnsignedSeismicTx
    tx_hash: HexBytes
```

## Fields

| Field          | Type                                                                                          | Description                                     |
| -------------- | --------------------------------------------------------------------------------------------- | ----------------------------------------------- |
| `plaintext_tx` | [`PlaintextTx`](/clients/python/api-reference/transaction-types/plaintext-tx.md)              | Transaction with unencrypted calldata           |
| `shielded_tx`  | [`UnsignedSeismicTx`](/clients/python/api-reference/transaction-types/unsigned-seismic-tx.md) | Full unsigned TxSeismic with encrypted calldata |
| `tx_hash`      | `HexBytes`                                                                                    | Transaction hash from `eth_sendRawTransaction`  |

## Example

```python
result = await contract.dwrite.transfer(recipient, 1000)

print(f"Tx hash: {result.tx_hash.to_0x_hex()}")
print(f"Plaintext data: {result.plaintext_tx.data.to_0x_hex()}")
print(f"Encrypted data: {result.shielded_tx.data.to_0x_hex()}")
```

## Notes

* `.dwrite` broadcasts a real transaction — it consumes gas and changes state
* Use `.write` in production; `.dwrite` is for debugging only
* The `shielded_tx` field is unsigned (the SDK adds the signature before broadcast)

## See Also

* [PlaintextTx](/clients/python/api-reference/transaction-types/plaintext-tx.md) — plaintext transaction view
* [UnsignedSeismicTx](/clients/python/api-reference/transaction-types/unsigned-seismic-tx.md) — shielded transaction structure


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.seismic.systems/clients/python/api-reference/transaction-types/debug-write-result.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
