How to build a "Play to Earn" idle game on Polygon zkEVM

Поделиться
HTML-код
  • Опубликовано: 30 июн 2024
  • 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: github.com/watase-eth/polygon...
    Polygon zkEVM Bridge:
    wallet.polygon.technology/
    Smart contracts:
    ERC1155Drop - thirdweb.com/thirdweb.eth/Dro...
    ERC20 - thirdweb.com/thirdweb.eth/Tok...
    ERC115Staking - thirdweb.com/thirdweb.eth/Edi...
    Join our Community of over 30,000 Web3 builders: / discord
    thirdweb Official Site: thirdweb.com/dashboard
    thirdweb Twitter: / thirdweb
    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
  • НаукаНаука

Комментарии • 50

  • @thirdweb_
    @thirdweb_  Год назад +2

    Thank you for watching! Be sure to leave a comment with what you'd like to see us build next. 👇
    If you haven't already, hit the subscribe button to be notified every time we drop a web3 development tutorial. 💫

    • @AliyanAli-qc9ky
      @AliyanAli-qc9ky 4 месяца назад

      can you upload picture of the farmer

  • @virtual_graphics
    @virtual_graphics Год назад +4

    Great video... an updated, streamlined version of Jarrod's P2E game from 8 months ago.

  • @bhok5228
    @bhok5228 6 месяцев назад

    Amazing content, thank you very much!

    • @thirdweb_
      @thirdweb_  5 месяцев назад

      Glad you liked it!

  • @sigitharyoprayogi733
    @sigitharyoprayogi733 Год назад

    thanks for the video sir

  • @alexsouzarod
    @alexsouzarod 7 месяцев назад

    WHAT A GREAT VIDEO ! YOU SHOULD DO THE SAME BUT WITH UNITY !

  • @x_x5204
    @x_x5204 5 месяцев назад

    Awesome video!!

    • @thirdweb_
      @thirdweb_  5 месяцев назад

      Glad you enjoyed it

  • @x_x5204
    @x_x5204 5 месяцев назад

    You can then turn this whole project into an nft by going to unstoppable and creating a site under your crypto domain and upload your ipfs link you got when yarn deployed ..or upload the built files from the out/ directory created in your project

  • @deniandriyanto7006
    @deniandriyanto7006 Год назад +1

    its compatible with swith network to bsc?

  • @x_x5204
    @x_x5204 5 месяцев назад

    The shop nav button doesnt redirect once deployed so either remove the button or make sure it redirects the same as the inventory shop button so once deployed it leads to shop html ...not just shop or ipfs will say not found error ... However you can verify it does work when clicking the inventorys shop button it redirects no problem

  • @pcgamermx8841
    @pcgamermx8841 7 месяцев назад

    Great Guide, i use it and all work good, but i got 1 problem, when i claim a new NFT, the token that i shoud paid is not getting discount it from wallet. i get the nft for free.

  • @nextgame1763
    @nextgame1763 8 месяцев назад

    this is usefull, cool guide for game developer. could you show me how to make a ERC1155 items that have a life time please, ex: 24 hours use after buy. Thank you

    • @nextgame1763
      @nextgame1763 8 месяцев назад

      i mean that, which funtions that i can use to make an item have a life time

  • @telifhakki8745
    @telifhakki8745 Год назад

    So how can we make an ido launchpad, thanks in advance.

  • @luyenlevan2052
    @luyenlevan2052 11 месяцев назад

    Very useful guide for me. i get the error: TypeError: Cannot read properties of undefined (reading '0') (components\Equipped.tsx (41:145) @ Equipped) when switching between different wallets. how to fix this error. Thanks

  • @luyenlevan2052
    @luyenlevan2052 11 месяцев назад

    I can't build with "yarn build" . Error: No duplicate props allowed. how to fix it, thanks

  • @MarkTaylor-wk6zj
    @MarkTaylor-wk6zj Год назад

    Does zkEvm support other testnets like sepolia? Kinda hard to get gEth rn.

    • @thirdweb_
      @thirdweb_  Год назад

      Polygon zkEVM currently support Goerli testnet.

  • @StanleySeow
    @StanleySeow 2 месяца назад

    I m using Polygon zkEVM Cardona chain ( 2442 ) instead of the old chain ( 1442 ) , how do I change the code to reflect this chain ??

  • @Oliver-ik7eu
    @Oliver-ik7eu 8 месяцев назад

    I used the project in GitHub and ran it, but there are no images and you cannot get the farmer please can any one help me

  • @VoiceHole
    @VoiceHole Год назад

    what would i look up to find the "import {} for PolygonMainet instead of testnet?

    • @thirdweb_
      @thirdweb_  Год назад

      Polygon is the mainnet and Mumbai is the testnet.

    • @VoiceHole
      @VoiceHole 11 месяцев назад

      @@thirdweb_ Would there be a way to do a "Claim all" form the NFT tools staked instead of doing 1 at a time?

  • @ortaxx
    @ortaxx 10 месяцев назад

    how to deploy it to hosting??

  • @user-ot5tw2lp4r
    @user-ot5tw2lp4r 5 месяцев назад

    How much money would we need to start this with the in game currency

    • @thirdweb_
      @thirdweb_  5 месяцев назад

      In this example you would only need to pay for the deployment cost, which is determined by the chain you deploy on and the gas at the time of deployment.

  • @geraldmvududu
    @geraldmvududu 7 месяцев назад

    Hi.Can i create this play to earn game on the bnb testnet?

    • @thirdweb_
      @thirdweb_  7 месяцев назад

      Yes. Just select the chain when deploying your smart contracts.

  • @aalahussainn1056
    @aalahussainn1056 8 месяцев назад

    it says i gotta have eth on mainnet to get zkevm goerli
    does it mean i need to like have REAL ETH inorder to get goerli on polygon ?

    • @thirdweb_
      @thirdweb_  8 месяцев назад

      No the testnet bridge will only need Goerli ETH.

  • @user-ol4mw5ip7p
    @user-ol4mw5ip7p 7 месяцев назад

    Hi, is this video outdated or can I still follow these instructions and be successful?

    • @thirdweb_
      @thirdweb_  7 месяцев назад

      There are some updates since this video. The main one being thirdweb API keys, but everything else should be the same.

  • @KuiperGame
    @KuiperGame Год назад

    How to do the same with unity? any good tutorial or course?

    • @thirdweb_
      @thirdweb_  Год назад

      We don't currently have a video on how to implement this with Unity. It can be done. But we will put this on our list of potential videos.

    • @KuiperGame
      @KuiperGame Год назад

      @@thirdweb_ will wait...thanks

  • @0xfliz
    @0xfliz Год назад

    sir can we make p2e game with core gaming engine?
    Can you make a tutorial?

    • @thirdweb_
      @thirdweb_  Год назад +1

      Yes this concept can be created with our Unity SDK. We will put this on our list of potential videos.

    • @0xfliz
      @0xfliz Год назад

      @@thirdweb_ I'm waiting for that video.Very happy to learning with thirdweb.😇😇

  • @fernandodluccas8724
    @fernandodluccas8724 Год назад

    how do i get tokens on goerli?

    • @devinrattray2541
      @devinrattray2541 Год назад

      if you join the thirdweb Discord our support team will gladly send you some!

  • @blackowl.ally007
    @blackowl.ally007 2 месяца назад

    chakra is not working.

    • @thirdweb_
      @thirdweb_  2 месяца назад

      Here is an updated version of this tutorial (does not use Chakra): ruclips.net/video/mtaf6VtgcRo/видео.html

  • @bossgd100
    @bossgd100 Год назад

    Polygon zkEVM is too expansive compared to normal polygon

  • @maurofiorentino6339
    @maurofiorentino6339 3 месяца назад

    I woluld like to find a developer to do this for me. I could pay or be a partner as designer and 3d creator to make unique 3d models instead of generic Ai images.Write to me if you're interested.

  • @RastCrypt
    @RastCrypt 4 месяца назад

    Sir you need some updates on your repo , some depedencies not working anymore also thirdweb need apikey rn

    • @thirdweb_
      @thirdweb_  4 месяца назад +1

      Repo will be updated and a new version of this video will also be released soon.

  • @xesentertainment
    @xesentertainment 10 месяцев назад

    You rock love these vids. Are you on twitter / x I want to follow you. I already following third web

  • @tirmazi3
    @tirmazi3 2 месяца назад

    Can you make another P2E tutorial for Unreal Engine game. It would be handy to see Lyra Starter game project by Epic Games implementing P2E @thirdweb_ framework.