Docs

TransactionButton

TransactionButton component is used to render a button that triggers a transaction. It handles switching chains if the connected wallet is on a different chain than the transaction. It also estimates gas and displays a loading spinner while the transaction is pending.

Example

<TransactionButton
transaction={transaction}
onSuccess={handleSuccess}
onError={handleError}
>
Confirm Transaction
</TransactionButton>;

Parameters

Returns