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...
One of the best web3 tutorial i have watched since i started my journey. Thank you
Thanks, so glad to hear that. More on the way!
Man i love that you explain every detail! thats something that is missing in the industry. Love it! just gained a sub !
Your way of explaining is so great, subscribed!
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 !
Managed to complete through the course. Really helped alot. Thanks !!
That's awesome...glad it helped!
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
Thanks Aditya! I've had some interest in Discord from a few members so I may have to do that soon : )
Thank you, will you please share what's in your opion a good crypto token or app to invest in..
That was awesome. That's the first time I manage to follow a web3 tutorial. Thanks dude
Fantastic videos. Great teacher.
Where do we find the smart contract testing and deployment guide that you mention @45:15
Thank you so much for the awesome content :)
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! :)
Thanks Yoshika, I really appreciate your support!
simply i would say, i love you 🙀
Best comment ever...thanks for your support my friend!
Just want I needed, thank you so much
Awesome...you bet!
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
im trying to get truffle init to work from the vending machine tutorial cant seem to get it to work any suggestions
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.
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).
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!
Hey, how can I get in touch with you? A friend of mine needs help with discord
@@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)
Really like this tutorial. However, got a read slice error after truffle migrate --network rinkeby command. Help!
Great tutorial that I’m looking for!
I have the error web3.eth.Contract is not a constructor and Cannot read properties of undefined (reading 'methods') .
What is the problem ?
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.
Thanks for your videos they really help me understand whats going on. KEEP UP THE GR8 WORK
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.
Hi bro, project having use random number generate (RNG) blockchain??
Hello, why mt-5 couldn't work in bulma? I did all the same as you, but padding on sections doesn't work
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?
Sir how can we store images and different media files in blockchain.
open the current folder in vscode with the terminal: code .
But how do we publish in website this coad???
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.
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 😊
how to export to a build folder to upload to our website?
Real gem 💎💎
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)?
Ye, try to search for Chainlink Keepers
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!
@@minimoments911 Thanks I’ll check that! :)
@@BlockExplorerMedia That’s really good suggestion! I’ll try it! Thanks!
@@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?
we need to install python????
GODS WORK
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 ❤️
This is on my list...hope to be making this one soon!
2:53:00
Timestamp for how to recompile your smart contract for quick retest
Is this still working?
utopia ecosystem is the best web3 solution.
Just needed but only in react js pls without next is , as many of us are in react js
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!
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 ..
good
Please make tutorial for ntf game 🙏🙏🙏💚🌱
please make flash loan tutorial
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
all right perfect, all right perfect....pls stop repeating that shit
Thx god
"You are most welcome, beloved child of the Earth" - god ; D
give me dapps
...
scam
No thanks, I'm trying to quit ; )
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`?
Hi
How can get in touch, you have a telegram group or something, I need to ask you some questions, please
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 {
Block Explorer do you have instagram, twitter, linkedIN ? I want to contact with you.
No Instagram or Twitter. Just my personal Linkedin:
www.linkedin.com/in/jonathan-spruance-91493a126/
@@BlockExplorerMedia you did not accept my connection
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.
Te-le-gr-am,James_harvey247
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
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
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
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!
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