In this video, we'll go over how to create a play to earn idle game on Polygon zkEVM. This idle-like game is called Crypto Farm and allows you to stake tools to earn an ERC20 token. You can spend those tokens in the shop to buy more tools to earn more tokens.
Demo repo: [ Ссылка ]
Polygon zkEVM Bridge:
[ Ссылка ]
Smart contracts:
ERC1155Drop - [ Ссылка ]
ERC20 - [ Ссылка ]
ERC115Staking - [ Ссылка ]
Join our Community of over 30,000 Web3 builders: [ Ссылка ]
thirdweb Official Site: [ Ссылка ]
thirdweb Twitter: [ Ссылка ]
Timestamps:
00:00 Introduction
01:09 Game demo
04:48 Polygon zkEVM bridge
06:50 Farmer NFT (ERC1155)
10:03 Tool NFTs (ERC1155)
11:42 $CARROT (ERC20)
12:57 Set claim conditions for Tool NFTs
14:50 Create ERC1155 staking contract
21:10 Setup Play to Earn app with thirdweb
25:00 Create Navbar
27:10 Store contract address
28:19 Claim a Farmer NFT
34:35 Game dashboard
50:25 Tools shop
55:48 Conclusion
![](https://i.ytimg.com/vi/nvtW4-29i9o/maxresdefault.jpg)