Use smart accounts with Scaffold-ETH 2
Use the Smart Accounts Kit extension for Scaffold-ETH 2 to bootstrap a project in under two minutes. This extension demonstrates the end-to-end flow for initializing a MetaMask smart account, creating and signing a delegation, and redeeming the delegation.
Run the extension
-
Run the following command to install the Smart Accounts Kit extension:
npx create-eth@latest -e metamask/gator-extension -
Upon installation, you'll be asked the following prompts:
? Your project name: (my-dapp-example)
? What solidity framework do you want to use?
❯ hardhat
foundry
noneOnce you've answered the prompts, the extension will create the project using the specified settings.
-
Navigate into the project's
nextjspackage:cd my-dapp-example/packages/nextjs -
Create a
.env.localfile:cp .env.example .env.localFill in the
NEXT_PUBLIC_PIMLICO_API_KEYenvironment variable with your Pimlico API key. -
In the root of your project, start the development server:
yarn startNavigate to the project in your browser:

-
Connect your MetaMask wallet on the Sepolia testnet. In the MetaMask Smart Accounts & Delegation section, follow the prompts to deploy a delegator account, create a delegate wallet, create a delegation, and redeem a delegation. You can view the completed transaction on Etherscan.
Next steps
Learn more about MetaMask Smart Accounts and delegation.