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.
Clone this project and follow these steps to properly configure your environment for the application.
- Navigate to the root directory of the project, ensuring you are at the top-level (same level as the
src
directory, not within it). - Create a new file and name it
.env.local
. This file will store important global settings required for the application to function correctly.
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.
Execute the following command in your terminal to install the project dependencies:
npm install
To start the development server, run:
npm run dev