Skip to content
Function: useShieldedWriteContract()

seismic-react


seismic-react / useShieldedWriteContract

Function: useShieldedWriteContract()

function useShieldedWriteContract<TAbi, TFunctionName, TArgs>(config): object

Defined in: packages/seismic-react/src/hooks/shieldedWriteContract.ts:42

Similar to wagmi's useWriteContract hook, but uses shieldedWriteContract instead.

Type Parameters

TAbi extends Abi | readonly unknown[]

TFunctionName extends string

TArgs extends unknown

Parameters

config

UseShieldedWriteContractConfig<TAbi, TFunctionName, TArgs>

The configuration object.

  • address (Hex) - The address of the contract.
  • abi (Abi) - The contract ABI.
  • functionName (string) - The name of the contract function to call.
  • args (array) - The arguments to pass to the contract function.
  • gas (bigint) - Optional gas limit for the transaction.
  • gasPrice (bigint) - Optional gas price for the transaction.

Returns

object

An object containing:

  • writeContract (function): A function to execute contract writes.
  • isLoading (boolean): Indicates if the write operation is in progress.
  • hash (string): The transaction hash from the last successful call to writeContract.
  • error (string): Any error message from the most recent call to writeContract, if present.
NameTypeDefault valueDefined in
errornull | Error-packages/seismic-react/src/hooks/shieldedWriteContract.ts:101
hashnull | `0x${string}`-packages/seismic-react/src/hooks/shieldedWriteContract.ts:102
isLoadingboolean-packages/seismic-react/src/hooks/shieldedWriteContract.ts:100
write() => Promise<undefined | `0x${string}`>writeContractpackages/seismic-react/src/hooks/shieldedWriteContract.ts:99
writeContract() => Promise<undefined | `0x${string}`>-packages/seismic-react/src/hooks/shieldedWriteContract.ts:98