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.
To create a custom smart wallet, clone this repo using the thirdweb CLI:
npx thirdweb create --contract --template erc-6551
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
To deploy ANY contract, with no requirements, use thirdweb Deploy:
npx thirdweb deploy
- Deploy the implementation contract,
TokenBoundAccount
as this will be needed as a constructor parameter for the factory. - 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.
For any questions or suggestions, join our discord at https://discord.gg/thirdweb.