Published On Apr 23, 2024
In this video learn how to build an ERC-20 staking app. Build a web3 app where a user can stake an ERC-20 token and earn an ERC-20 token reward based on how long the tokens are staked within the contract.
ERC-20 Token smart contract: https://thirdweb.com/thirdweb.eth/Tok...
ERC-20 Staking smart contract: https://thirdweb.com/thirdweb.eth/Tok...
GitHub Repo: https://github.com/thirdweb-example/y...
thirdweb API: https://thirdweb.com/dashboard/settingsa
Creating an API: • Start building blockchain apps: Getti...
thirdweb Docs: https://portal.thirdweb.com/
Join our Community of over 30,000 Web3 builders: / discord
thirdweb Official Site: https://thirdweb.com/dashboard
thirdweb Twitter: / thirdweb
Timestamps:
00:00 Demo of an ERC-20 staking app
02:20 Overview of how to build an ERC-20 staking app
03:15 Deploy ERC-20 smart contracts for staking and reward tokens
05:30 Deploy an ERC-20 staking smart contract
08:40 Mint, approve, and deposit reward token into ERC-20 staking contract
13:30 Create a new Next.js project and install thirdweb Connect SDK
14:45 Setup and configure thirdweb Connect SDK with client and chain
19:30 Add a connect button to connect a web3 wallet to app
22:40 Configure and wrap smart contracts to interact with Connect SDK
26:25 Get and display stake and reward token balances or the connected wallet
33:25 Get staking info for amount of tokens staked and claimable rewards
36:55 Create staking modal component to stake tokens to contract
49:55 Display staking information and create a button to claim rewards
53:45 Create withdraw modal to remove tokens from staking contract
56:55 Conclusion