/erc-6551

Smart Wallets

Primary LanguageSolidity

Custom Smart Accounts

Use the Solidity SDK to create custom ERC-4337 Smart Wallets in which the owner of the wallet is tied to the ownership of a specified erc-721 token.

Getting Started

To create a custom smart wallet, clone this repo using the thirdweb CLI:

npx thirdweb create --contract --template erc-6551

Building the project & running tests

Note: This repository is a Foundry project, so make sure that Foundry is installed locally.

To make sure that Foundry is up to date and install dependencies, run the following command:

foundryup && forge install

Once the dependencies are installed, tests can be run:

forge test

Deploying Contracts

To deploy ANY contract, with no requirements, use thirdweb Deploy:

npx thirdweb deploy
  1. Deploy the implementation contract, TokenBoundAccount as this will be needed as a constructor parameter for the factory.
  2. Deploy the factory contract TokenBoundAccountFactory

In both cases, set the EntryPoint contract address as 0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789. This address is the same on all chains it is deployed to.

Join our Discord!

For any questions or suggestions, join our discord at https://discord.gg/thirdweb.