Skip to content

kanthgithub/token-bound-account

Repository files navigation

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 token-gated-account

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, TokenGatedAccount as this will be needed as a constructor parameter for the factory.
  2. Deploy the factory contract TokenGatedAccountFactory

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published