Chain Abstraction

Facilitate transactions by letting users pay with any token from any chain, or with fiat.

Live Playground

Try out the demo for yourself in the live playground

Usage with regular transactions

Any transaction sent with useSendTransaction or with TransactionButton will prompt the user to choose a different payment method if they don't have enough balance for the transaction.

You can turn off this behaviour by setting the payModal option to false.

Usage with TransactionWidget

The TransactionWidget component provides a complete UI for executing transactions with built-in cross-chain payment support.

import { TransactionWidget } from "thirdweb/react";
import { prepareContractCall } from "thirdweb";
function MyComponent() {
return (
<TransactionWidget
client={client}
transaction={prepareContractCall({
contract: myContract,
method: "function mint(uint256 quantity)",
params: [1n],
})}
amount="0.1"
title="Mint NFT"
/>
);
}