Universal Smart Wallet Addresses

Universal Smart Wallet Addresses

With the thirdweb SDK, all smart wallets maintain the same address across any EVM chain. Account factories and wallet deployments are managed for you from within the thirdweb SDK unless overridden with your own factory. If you need a different wallet address for any reason, you can provide an optional account salt to the wallet.

Create a smart wallet on your default chain:

import { smartWallet } from "thirdweb/wallets";

const mySmartWallet = smartWallet({
  chain: sepolia,
  sponsorGas: true,
});
👉
We require a "default chain" when creating a smart wallet to be used in any predeploy wallet signatures and/or to work with unique chain features like zkSync's native account abstraction.

Send your transaction on any chain:

const sendTx = prepareTransaction({
  to: receiver.address,
  value: 100000n,
  chain: baseSepolia,
  client
});

const sendResult = await sendAndConfirmTransaction({
  account: sender,
  transaction: sendTx
});

If you need to create a wallet using the same admin account but a different address, use an account salt:

const mySmartWallet = smartWallet({
  chain: sepolia,
  sponsorGas: true,
  overrides: {
    accountSalt: "123",
  }
});

Check out the video for more:

0:00
/3:31