This project provides a user interface for staking tokens and earning rewards using Ethereum smart contracts. The UI also includes a market feed for cryptocurrency prices and a live video stream.
- Connect and disconnect your Ethereum wallet
- Stake and unstake tokens
- Claim staking rewards
- Display live cryptocurrency prices (BTC, ETH, SOL, LINK, AVAX)
- Stream live video
- HTML5 and CSS3
- JavaScript
- Web3.js
- API for price feeds
- Node.js and npm installed
- MetaMask extension installed in your browser
-
Clone the repository
git clone https://github.com/totalingarc/staking-rewards-ui.git cd staking-rewards-ui
-
Install dependencies
npm install
-
Update Contract Address
- Open
script.js
and replace'YOUR_STAKING_CONTRACT_ADDRESS_HERE'
with your actual staking contract address.
- Open
-
Update Video Source
- Open
index.html
and replace'YOUR_VIDEO_SOURCE_URL'
with the URL of your video stream.
- Open
-
Update ABI
- Open
abi.js
and replace the placeholder with the ABI of your staking contract.
- Open
- Start a local server
You can use any local server to serve the files. For example, using
http-server
:Navigate tonpx http-server
http://localhost:8080
in your browser to view the application.
-
Connect Wallet
- Click on the "Connect" button to connect your MetaMask wallet.
- Your wallet address and balance will be displayed.
-
Stake Tokens
- Enter the amount of tokens you wish to stake and click "Stake".
-
Unstake Tokens
- Enter the amount of tokens you wish to unstake and click "Unstake".
-
Claim Rewards
- Click on the "Claim" button to claim your staking rewards.
-
Market Feed
- The market feed displays the latest prices for BTC, ETH, SOL, LINK, and AVAX.
-
Live Stream
- A live video stream is displayed in the designated box.