Skip to content

Paul-Sizon/rootstock-extention

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

🏗 Rootstock Extension of Scaffold-ETH 2

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.

screenshot

Installation

  1. Create a new project with the Rootstock extension:

    npx create-eth@latest -e Paul-Sizon/rootstock-extention

Quickstart

Before you begin, you need to install the following tools:

To get started with Scaffold-ETH 2: Rootstock Extension, follow the steps below:

  1. Install dependencies if it was skipped in CLI:

    cd my-rootstock-dapp-example
    yarn install
  2. 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.

  3. 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/contracts and can be modified to suit your needs. The yarn deploy command uses the deploy script located in packages/hardhat/deploy to deploy the contract to the network. You can also customize the deploy script.

  4. 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 the Debug Contracts page. You can tweak the app config in packages/nextjs/scaffold.config.ts.

Run smart contract tests with yarn hardhat:test.

  • Edit your smart contract RuneToken.sol in packages/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.
  1. Get API keys to deploy to production Rootstock Dashboard

  2. Get testnet tokens Rootstock Faucet

  3. Deploy your smart contract

    yarn deploy --network rskTestnet

    or

    yarn deploy --network rskMainnet

Building on Rootstock

🧪 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.

Debug Contracts tab

About

Scaffold-ETH 🏗 extention for Rootstock🍁

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published