penuseShieldedWrite

Send encrypted write transactions to shielded contracts

circle-info

This hook wraps useShieldedWriteContract from seismic-react. The actual export name is useShieldedWriteContract.

Hook for sending shielded write transactions. Encrypts calldata before submission so transaction data is not visible on-chain.

import { useShieldedWriteContract } from "seismic-react";

Config

Parameter
Type
Required
Description

address

Hex

Yes

Contract address

abi

Abi

Yes

Contract ABI

functionName

string

Yes

Name of the nonpayable/payable function

args

array

No

Arguments to pass to the function

gas

bigint

No

Gas limit override

gasPrice

bigint

No

Gas price override

Return Type

Property
Type
Description

writeContract

() => Promise<Hex>

Function to execute the shielded write

write

() => Promise<Hex>

Alias for writeContract

isLoading

boolean

Whether a write is in progress

error

Error | null

Error from the most recent write

hash

`0x${string}` | null

Transaction hash from last successful write


Usage

Shielded token transfer

Transaction hash tracking

The hash field updates after each successful write. Use it to link to a block explorer or track confirmation.

Loading and error state handling

With gas override

Pass gas or gasPrice to override the automatic estimates:

circle-info

Like useSignedReadContract, the write function is imperative -- you call writeContract() or write() explicitly. The hook does not auto-execute on mount or when arguments change.

See Also

Last updated