TokenBoundAccount

Token Bound Account

An ERC-6551: Token Bound Accounts compliant smart contract wallet.

  • Publish Date

    Sep 08, 2023

  • Licenses

    Apache-2.0, MIT, GPL-3.0-or-later, GPL-3.0-only

Token Bound Account Implementation Contract

The Token Bound Account contract is an ERC-6551 and ERC-4337 compliant smart contract wallet. It can be cloned by the ERC-6551 registry contract to create token-bound account smart wallets which are associated with a specified ERC-721 NFT. The owner of the specified NFT token automatically owns the associated wallet. App developers can programmatically issue token-bound accounts to their users using the thirdweb SDK.

thirdweb's token-bound accounts have the following features by default:

  • Execute transactions (single and batched).
  • Send and receive native tokens.
  • Send and receive ERC-721 and ERC-1155 NFTs.
  • Multicall-able.
  • Store contract metadata.

The TokenBoundAccount smart wallet is a smart wallet that comes with all the basic benefits of account abstraction, and the owner of the associated NFT token is the owner of the wallet. If the NFT is transferred, the ownership of the wallet is automatically transferred

Usage

On deploying this implementation smart contract, go to the ERC-6551 registry and use the createAccount method on the Explorer and pass the contract's address as the "Implementation" to create a token bound account smart wallet.

You can find the ERC-6551 registry for the Goerli testnet, here. The registry is deployed at the same address on these networks.

You can read more about token bound account smart wallets in this blogpost.

Use Cases

  • NFT composability: allowing for an ERC-721 token and its related assets to be bundled together into one 'profile' or 'inventory'. Bundling tokens, assets, and NFTs, into a single TBA allows users to transfer assets and switch between platforms easily.
  • Fully onchain identities - create full onchain identities and reputations as NFTs that can interact with dApps themselves, rather than the wallets that hold them.
  • Tradable Accounts: If the NFT associated with a wallet is transferred, the wallet and it's entire contents are automatically transferred.

Resources

1.0.1 Release Notes

Hidden advanced parameters

addDeposit

payable

No inputs required

Token Bound Account | Published Smart Contract