🧪 An open-source, up-to-date toolkit for building decentralized applications (dapps) on Polkadot Hub blockchain with Solidity smart contracts. It's designed to make it easier for developers to create and deploy smart contracts and build user interfaces that interact with those contracts.
⚙️ Built using NextJS, Reown AppKit, Hardhat, Wagmi, Viem, and Typescript.
- ✅ Contract Hot Reload: Your frontend auto-adapts to your smart contract as you edit it.
- 🪝 Custom hooks: Collection of React hooks wrapper around wagmi to simplify interactions with smart contracts with typescript autocompletion.
- 🧱 Components: Collection of common web3 components to quickly build your frontend.
- 🔥 Burner Wallet & Local Faucet: Quickly test your application with a burner wallet and local faucet.
- 🔐 Integration with Wallet Providers: Connect to different wallet providers and interact with the Ethereum network.
Before you begin, you need to install the following tools:
To get started with Scaffold-DOT, follow the steps below:
- Install the latest version of Scaffold-DOT.
git clone https://github.com/scaffold-dot/scaffold-dot.git scaffold-dot
cd into scaffold-dot directory and yarn install
cd scaffold-dot && yarn install
This step will set up your monorepo and download the correct prebuilt asset hub binaries for your system. Windows OS not supported.
- On a terminal, start the substrate node:
yarn chain
- On a second terminal, start the eth-rpc server:
yarn rpc
- On a third terminal, deploy the test contract:
yarn deploy
This command deploys a test smart contract to the local chain.
- On a fourth terminal, start your NextJS app:
yarn start
Visit your app on: http://localhost:3000. You can interact with your smart contract using the Debug Contracts page. You can tweak the app config in packages/nextjs/scaffold.config.ts.
Deployment to a public testnet or AssetHub
- Generate a deployment private key by running
yarn generate, and follow the prompts.yarn accountwill print account details to the terminal. Fund your account with the Polkadot faucet or send the deployment account somd funds from AssetHub.
Scaffold-DOT will generate an encrypted private key. This is the most secure way to generate and store your private key.
You'll need to change two configuration files.
Update the defaultNetwork to the network you want to deploy to.
Update targetNetworks to include the networks that your frontend will support.
Fund your account with a faucet, run yarn deploy, type your password, and your contract deployment confirmation will print in the console.
Run your frontend server, and connect with your browser wallet. You are now able to interact with your smart contract.
What's next:
Scaffold-DOT is a fork of scaffold-ETH2. For now, you can follow their docs below.
Visit the What's next section of our docs to learn how to:
- Edit your smart contracts
- Edit your deployment scripts
- Customize your frontend
- Edit the app config
- Writing and running tests
- Setting up external services and API keys
Visit the Scaffold-ETH 2 docs to learn all the technical details and guides for working with Scaffold-DOT.
To know more about its features, check out their website.
We welcome contributions to Scaffold-DOT!
Please see CONTRIBUTING.MD for more information and guidelines for contributing to Scaffold-DOT.
