Get Started
Requirements
Before you begin, you need to install the following tools:
- Node (>= v18.17) (opens in a new tab)
- Yarn (v1 (opens in a new tab) or v2+ (opens in a new tab))
- Git (opens in a new tab)
Quickstart
- Clone this repo & install dependencies
git clone https://github.com/tenetxyz/biomes-scaffold.git
cd biomes-scaffold
yarn install
- Create an
.env
underpackages/hardhat
and set your deployer private key toDEPLOYER_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.
- 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
inpackages/hardhat/contracts
- Edit your frontend in
packages/nextjs/pages
- Edit your deployment scripts in
packages/hardhat/deploy