Web3 Tutorial Project | Build a web3js dApp with a Solidity lottery smart contract on Ethereum

Поділитися
Вставка
  • Опубліковано 21 жов 2024
  • In this project-based web3 tutorial we build a completed lottery dApp with a focus on how to build a UI for a lottery smart contract, using the web3js library.
    Topics covered include: the web3js library, connecting a Metamask wallet, application binary interface (abi), NextJS, Truffle, Ethereum Rinkeby testnet, Chainlink VRN, deploying a Solidity smart contract to Ethereum and more.
    Completed project code:
    github.com/jsp...
    Lottery Smart Contract Part I
    • Smart Contract Tutoria...
    Lottery Smart Contract Part II
    • Lottery Smart Contract...
    Ether faucet on Rinkeby testnet:
    faucet.rinkeby...
    LINK faucet on Rinkeby testnet:
    faucets.chain....
    Address to LINK token on Rinkeby testnet:
    docs.chain.lin...

КОМЕНТАРІ • 87

  • @joseph5058
    @joseph5058 2 роки тому

    One of the best web3 tutorial i have watched since i started my journey. Thank you

  • @josep8952
    @josep8952 2 роки тому +5

    Man i love that you explain every detail! thats something that is missing in the industry. Love it! just gained a sub !

  • @damianwasilewski6928
    @damianwasilewski6928 2 роки тому +3

    Your way of explaining is so great, subscribed!

  • @karthikpuvvula
    @karthikpuvvula 2 роки тому

    In pickWinnerHandler function you invoked payWinner() instead of pickWinner(). That's the reason it is not selecting winner at random.. you fixed it at 3:00:03.. you didn't have to split the function into two to generate the random result. great tutorial btw.. thanks alot !

  • @prakhyatkhati3053
    @prakhyatkhati3053 2 роки тому

    Managed to complete through the course. Really helped alot. Thanks !!

  • @adityasankhla8367
    @adityasankhla8367 2 роки тому +4

    Just what I was looking for. Thanks a lot man! Learning about smart contracts nowdays and would definitely love to join a community discord server

    • @BlockExplorerMedia
      @BlockExplorerMedia  2 роки тому

      Thanks Aditya! I've had some interest in Discord from a few members so I may have to do that soon : )

  • @MrEricBloom
    @MrEricBloom 2 роки тому +1

    Thank you, will you please share what's in your opion a good crypto token or app to invest in..

  • @WaveMrNight
    @WaveMrNight 2 роки тому

    That was awesome. That's the first time I manage to follow a web3 tutorial. Thanks dude

  • @pulseunity1
    @pulseunity1 Рік тому

    Fantastic videos. Great teacher.

  • @atomsmovie
    @atomsmovie 2 роки тому +1

    Where do we find the smart contract testing and deployment guide that you mention @45:15

  • @MananRupani
    @MananRupani Рік тому

    Thank you so much for the awesome content :)

  • @yoshikagarner6655
    @yoshikagarner6655 2 роки тому +3

    Love the content! I will continue to support your channel! Your explanations are so easy to follow, as always! Thank you! P.S. I would love to join your Discord Server in the future! :)

  • @pryansh_
    @pryansh_ 2 роки тому +1

    simply i would say, i love you 🙀

  • @cmc2110
    @cmc2110 2 роки тому +1

    Just want I needed, thank you so much

  • @despertar23
    @despertar23 2 роки тому +1

    hi, could you teach me how to make a lottery like the one in pancake swap. a lottery with multiple winners and dividing the pot in differents % depending on the amount correct numbers from start to finish max 6 or 7 numbers. please. a video of this would be great. im trying to make a crypto lottery as a project for my class. I was wanting to make a DEX but i find the frontend a little bit to complicate for me. at the moment is to espensive for a class project could you make one in Polygon. also if i could use its own social token for the tickets that would be great

  • @justintrudeou6099
    @justintrudeou6099 2 роки тому +1

    im trying to get truffle init to work from the vending machine tutorial cant seem to get it to work any suggestions

  • @alizavras
    @alizavras 2 роки тому

    Great tutorial!
    I've been trying to get solc to work but there is a bug in version 0.8.14, downgraded to 0.8.13, and still get the same Error: Cannot find module './common/helpers'.
    What kind of version are you using?
    Downgrading to 0.4.25 is not an option because of a ParserError of the Lottery contract.

  • @Cadaur
    @Cadaur 2 роки тому +3

    Loving the video already! Just a reminder that you should probably make a discord server for this my man, (I would love to help with it, it's what I do).

    • @BlockExplorerMedia
      @BlockExplorerMedia  2 роки тому +1

      Thanks dude! Thinking about this...might wait until the channel grows just a bit more. I will definitely get in touch when the time is right!

    • @cmc2110
      @cmc2110 2 роки тому +1

      Hey, how can I get in touch with you? A friend of mine needs help with discord

    • @Cadaur
      @Cadaur 2 роки тому +1

      @@BlockExplorerMedia Sounds good man, is there any way to contact you if we need little tips or help? (that's also why I was thinking of the disc)

  • @D3CK3RON3R
    @D3CK3RON3R 2 роки тому

    Really like this tutorial. However, got a read slice error after truffle migrate --network rinkeby command. Help!

  • @web3byjohn949
    @web3byjohn949 2 роки тому

    Great tutorial that I’m looking for!

  • @mahdeekhibe7623
    @mahdeekhibe7623 2 роки тому

    I have the error web3.eth.Contract is not a constructor and Cannot read properties of undefined (reading 'methods') .
    What is the problem ?

  • @SQLEinstein
    @SQLEinstein 2 роки тому

    Could you do a quick example of how you could embed an NFT in your website design. For example if we wanted to mint our logo and then use the nft logo on the site.

  • @C0DEXED0C
    @C0DEXED0C 2 роки тому

    Thanks for your videos they really help me understand whats going on. KEEP UP THE GR8 WORK

  • @Blackbeardcodes
    @Blackbeardcodes 2 роки тому

    Anyone struggling to get Truffle to install/work, "npx truffle init" should solve everything, "npx.." will solve all issues throughout the video.. Awesome video, really learnt so much however I have one question.. At some point toward the end of the video, maybe the last 40 minutes or so my dApp no longer automatically refreshed/updated what did we change? I'll have a proper look over the weekend.

  • @DuyTran-ls5ty
    @DuyTran-ls5ty 2 роки тому

    Hi bro, project having use random number generate (RNG) blockchain??

  • @dmytroshcherbak8657
    @dmytroshcherbak8657 2 роки тому

    Hello, why mt-5 couldn't work in bulma? I did all the same as you, but padding on sections doesn't work

    • @dmytroshcherbak8657
      @dmytroshcherbak8657 2 роки тому

      Also I had an error after I migrate contract to rinkeby at 1:01:58 : PollingBlockTracker - encountered an error while attempting to update latest block: undefined and all solutions from the internet don't work. Could you please help me?

  • @mysterynights6255
    @mysterynights6255 2 роки тому

    Sir how can we store images and different media files in blockchain.

  • @PhilipDenys
    @PhilipDenys 2 роки тому

    open the current folder in vscode with the terminal: code .

  • @tradewithisrael
    @tradewithisrael 2 роки тому

    But how do we publish in website this coad???

  • @raeendanesh1618
    @raeendanesh1618 2 роки тому

    Love the content but I've got a question, How did you get rid of duplicate lottery winners in lottery history card? I've tried to splice the lotteryhistory array and its started to show last winner to first winner in seconds and stay on first winner, Thanks for your help in advance.

  •  2 роки тому

    Great stuff and great way to pass the knowledge. I assume a participant can enter multiple times. That would increase their odds of winning. How to develop UI to enter the lottery multiple times at once? Thanks 😊

  • @storagedawgs
    @storagedawgs 2 роки тому

    how to export to a build folder to upload to our website?

  • @syouske4496
    @syouske4496 2 роки тому

    Real gem 💎💎

  • @shawnwong2845
    @shawnwong2845 2 роки тому

    Great tutorial that I’m looking for! Small question here: is it possible to make PickWinner and PayWinner function automatic when the pot reaches its limited (hypothetical there is cap)?

    • @minimoments911
      @minimoments911 2 роки тому

      Ye, try to search for Chainlink Keepers

    • @BlockExplorerMedia
      @BlockExplorerMedia  2 роки тому

      yeah definitely, you could just change the implementation so that the 'enter' lottery function checks the pot limit each time (or have it on a timer) and then trigger pick / pay winner. great idea!

    • @shawnwong2845
      @shawnwong2845 2 роки тому

      @@minimoments911 Thanks I’ll check that! :)

    • @shawnwong2845
      @shawnwong2845 2 роки тому

      @@BlockExplorerMedia That’s really good suggestion! I’ll try it! Thanks!

    • @dylanpowell2674
      @dylanpowell2674 2 роки тому

      @@BlockExplorerMedia I have a question as well. If the lottery creators wallet (you,me) deploys the contractors original msg.sender , does that mean the ether sent to enter the lotto goes to the creator? Or to the pot balance?

  • @divewithsk
    @divewithsk 2 роки тому

    we need to install python????

  • @raunak5483
    @raunak5483 2 роки тому

    GODS WORK

  • @sakshamsharma4776
    @sakshamsharma4776 2 роки тому

    Sir How to Create A Minting Website .. Please Make A Video and also Gives The code in GitHub For easy to new onces.. thank you ❤️

  • @marksmusic7686
    @marksmusic7686 2 роки тому +1

    2:53:00
    Timestamp for how to recompile your smart contract for quick retest

  • @prchaser2081
    @prchaser2081 4 місяці тому

    Is this still working?

  • @rahmanshahrivar6574
    @rahmanshahrivar6574 2 роки тому

    utopia ecosystem is the best web3 solution.

  • @newborn7850
    @newborn7850 2 роки тому

    Just needed but only in react js pls without next is , as many of us are in react js

    • @BlockExplorerMedia
      @BlockExplorerMedia  2 роки тому +2

      hey, the exact same code can be used in a ReactJS project. this project is React actually, just with some NextJS features such as routing which don't affect the code in question at all, if that makes sense. let me know if you have any questions!

    • @zulfiqar7967
      @zulfiqar7967 2 роки тому +2

      Next js is an additional framework in React js.. thats it.. if you know next js then it will be handy to practice developing dapps ..

  • @goodluckdeal3220
    @goodluckdeal3220 2 роки тому

    good

  • @mehrdad1068
    @mehrdad1068 2 роки тому

    Please make tutorial for ntf game 🙏🙏🙏💚🌱

  • @thinkcrypto8643
    @thinkcrypto8643 2 роки тому

    please make flash loan tutorial

  • @Thomas-ym9kk
    @Thomas-ym9kk 2 роки тому +1

    Im sure this the wisest and best decision I've ever taken in my life to have given a trial to their legitimate investment platform, I found it hard to believe cos I've been duped by many Platform while trying to increase my portfolio but all has been a story with the help of this amazing platform that gives the best trading signal for my Portfolio

  • @foreveryoung7757
    @foreveryoung7757 2 роки тому +1

    all right perfect, all right perfect....pls stop repeating that shit

  • @iamsnaack
    @iamsnaack 2 роки тому

    Thx god

    • @BlockExplorerMedia
      @BlockExplorerMedia  2 роки тому

      "You are most welcome, beloved child of the Earth" - god ; D

  • @yashguma
    @yashguma 2 роки тому

    give me dapps

  • @walterjunk5498
    @walterjunk5498 2 роки тому

    ...

  • @tommythecat1392
    @tommythecat1392 2 роки тому

    scam

  • @_57u
    @_57u 2 роки тому

    Looking at the contract in your github link, it looks like the player at index 0 could never possibly win?
    `require(randomResult > 0, "Must have a source of randomness before choosing winner");`
    Surely random could possibly return a 0 from the modulo call: `randomResult % players.length`?

  • @greeneyes2751
    @greeneyes2751 2 роки тому

    Hi
    How can get in touch, you have a telegram group or something, I need to ask you some questions, please

  • @giuseppefontana8114
    @giuseppefontana8114 2 роки тому

    Hello, thank's for the video. Why give me the error? DeclarationError: Identifier not found or not unique.
    --> project:/contracts/Lottery.sol:61:33:
    |61 | function payWinner() public onlyOwner {

  • @nqlid
    @nqlid 2 роки тому

    Block Explorer do you have instagram, twitter, linkedIN ? I want to contact with you.

    • @BlockExplorerMedia
      @BlockExplorerMedia  2 роки тому

      No Instagram or Twitter. Just my personal Linkedin:
      www.linkedin.com/in/jonathan-spruance-91493a126/

    • @nqlid
      @nqlid 2 роки тому

      @@BlockExplorerMedia you did not accept my connection

  • @akimilafter2566
    @akimilafter2566 2 роки тому +6

    Honestly I appreciate you and your content , Technical Analysis is good but I find It truly baffling that major crypto youtubers just look mostly at pure T.A. and completely ignore the bigger narrative of why Cryptos pump/pumped and why the future outlook will be even rosier than it seems. It's kinda irresponsible to ignore the fact that each ETF launch so far has caused a major dump at the peaks of these tokens. We were already on shaky footing with historically low volume and almost pure whale pumps, narrowly avoiding a long-term bear market. More emphasis should be put into day trading as it is less affected by the unpredictable nature of the market. I’ve been day trading crypto for 2 weeks with James Harvey's daily signals and insights and was able to make $48,021 as profit from my initial $3,000. You can contact Mr. James Harvey if you really want to be successful in bitcoin investment and trading and all other crypto related questions.

    • @akimilafter2566
      @akimilafter2566 2 роки тому

      Te-le-gr-am,James_harvey247

    • @gregorfilippo5194
      @gregorfilippo5194 2 роки тому

      Indeed Btc price settled above the zone to move further into a bullish territory. BTC even broke the resistance levels. Mr James once talked about btc breaking the resistance level in one of his articles. His insight is top notch

    • @fredwilliams1463
      @fredwilliams1463 2 роки тому

      I really intend to make so much money from trading with you, James. Its been a week and 1/2 and I have already made 0.4btc And the fact that he is an easy-going guy makes it easy for a beginner

    • @philipandrino371
      @philipandrino371 2 роки тому

      Pretty impressed by the way Mr James tutors closely, I was able to catch up to speed with his strategy last year when I reached out to him. I'm a better trader now all thanks to him

  • @rohannero
    @rohannero 2 роки тому

    In the last 30 minutes of the video I am coming across an error that I can not figure out, when I try to enter the lottery the transaction reverts and says: "Transaction has been reverted by the EVM". Any help would be greatly appreciated!

  • @Thomas-ym9kk
    @Thomas-ym9kk 2 роки тому

    Im sure this the wisest and best decision I've ever taken in my life to have given a trial to their legitimate investment platform, I found it hard to believe cos I've been duped by many Platform while trying to increase my portfolio but all has been a story with the help of this amazing platform that gives the best trading signal for my Portfolio