ahmedsemih / Chiliz-Web3-Bootcamp-Final-Project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Token Staking Dapp

This is a decentralized token staking application. Built on the Chiliz Spicy testnet with thirdweb. I created a stake token and a reward token as ERC20. In this application, the user is rewarded every 600 seconds for having staked tokens.

Configuration Process

Clone this project and follow these steps to properly configure your environment for the application.

Step 1: Environment File Setup

  1. Navigate to the root directory of the project, ensuring you are at the top-level (same level as the src directory, not within it).
  2. Create a new file and name it .env.local. This file will store important global settings required for the application to function correctly.

Step 2: Environment Variables

Populate the .env.local file with the necessary environment variables. These are crucial for linking the application with your specific resources on Thirdweb. Below is a list of the required variables:

  • NEXT_PUBLIC_CLIENT_ID: Your unique client identifier from Thirdweb. You can find this by logging into your account, navigating to "Settings," then "API Keys," and selecting your key to view the clientID.
  • NEXT_PUBLIC_STAKE_TOKEN_ADDRESS: The address of your stake token.
  • NEXT_PUBLIC_REWARD_TOKEN_ADDRESS: The address of your reward token.
  • NEXT_PUBLIC_CONTRACT_ADDRESS: The address corresponding to your smart contract.

Step 3: Dependency Installation

Execute the following command in your terminal to install the project dependencies:

npm install

Step 4: Launching the Development Server

To start the development server, run:

npm run dev

About


Languages

Language:TypeScript 91.8%Language:CSS 6.2%Language:JavaScript 2.0%