Get Started

Get Started

Requirements

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

Quickstart

  1. Clone this repo & install dependencies
git clone https://github.com/tenetxyz/biomes-scaffold.git
cd biomes-scaffold
yarn install
  1. Create an .env under packages/hardhat and set your deployer private key to DEPLOYER_PRIVATE_KEY. Deploy the extension contract.
yarn deploy --network garnet

This command deploys a test smart contract to the Redstone garnet testnet. 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.

  1. On a third terminal, start your NextJS app:
yarn start

Visit your app on: http://localhost:3000. By default, it will connect to the Redstone garnet Testnet. You can tweak the app config in packages/nextjs/scaffold.config.ts.

Run smart contract test with yarn hardhat:test

  • Edit your smart contract Game.sol in packages/hardhat/contracts
  • Edit your frontend in packages/nextjs/pages
  • Edit your deployment scripts in packages/hardhat/deploy