This extension of Scaffold-ETH 2 is designed to support development on the Rootstock sidechain, a Bitcoin-powered smart contract platform. It provides the tools needed to build and deploy dApps on Rootstock.
-
Create a new project with the Rootstock extension:
npx create-eth@latest -e Paul-Sizon/rootstock-extention
Before you begin, you need to install the following tools:
- Node (>= v18.17)
- Yarn (v1 or v2+)
- Git
To get started with Scaffold-ETH 2: Rootstock Extension, follow the steps below:
-
Install dependencies if it was skipped in CLI:
cd my-rootstock-dapp-example yarn install -
Run a local network in the first terminal:
yarn chain
This command starts a local Ethereum network using Hardhat. The network runs on your local machine and can be used for testing and development. You can customize the network configuration in
packages/hardhat/hardhat.config.ts. -
On a second terminal, deploy the test contract:
yarn deploy
This command deploys a test smart contract to the local network. The contract is located in
packages/hardhat/contractsand can be modified to suit your needs. Theyarn deploycommand uses the deploy script located inpackages/hardhat/deployto deploy the contract to the network. You can also customize the deploy script. -
On a third terminal, start your NextJS app:
yarn start
Visit your app on:
http://localhost:3000. You can interact with your smart contract using theDebug Contractspage. You can tweak the app config inpackages/nextjs/scaffold.config.ts.
Run smart contract tests with yarn hardhat:test.
- Edit your smart contract
RuneToken.solinpackages/hardhat/contracts. - Edit your frontend homepage at
packages/nextjs/app/page.tsx. For guidance on routing and configuring pages/layouts, check out the Next.js documentation. - Edit your deployment scripts in
packages/hardhat/deploy.
-
Get API keys to deploy to production Rootstock Dashboard
-
Get testnet tokens Rootstock Faucet
-
Deploy your smart contract
yarn deploy --network rskTestnet
or
yarn deploy --network rskMainnet
- Get API keys: Rootstock Dashboard
- Developer resources: Rootstock Developer Portal
- Learn about Runes: What are Runes?
🧪 An open-source toolkit for building decentralized applications (dApps) on the Rootstock sidechain, extending the powerful features of Scaffold-ETH 2. This extension is tailored for developers looking to leverage Bitcoin's security with Rootstock's smart contract capabilities.
⚙️ Built using NextJS, RainbowKit, Hardhat, Wagmi, Viem, and TypeScript, with added support for the Rootstock network.
- ✅ Contract Hot Reload: Your frontend auto-adapts to your smart contract as you edit it.
- 🪝 Custom hooks: A collection of React hooks wrapped around wagmi to simplify interactions with smart contracts, with TypeScript autocompletion.
- 🧱 Components: A 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 Rootstock and Ethereum networks.

