Solidity Tutorial For Developers - Let's Create a Smart Contract (Hands-On Project)

  Рет қаралды 42,238

Travis Media

Travis Media

Күн бұрын

In this video, we'll be learning Solidity. Not just the syntax, data types, and other boring concepts when isolated by themselves, but we'll be learning all these in the context of creating a fun smart contract. It will be practical and hands-on.
Solidity is a statically typed language designed for creating smart contracts on the Ethereum Virtual Machine.
It's your entry point for learning to write Smart Contracts.
Note that this tutorial requires some basic coding knowledge. I won't be teaching what loops or functions are or how they work, but instead will be showing you how they are written in Solidity in the context of a real Smart Contract.
By the end of the video, you'll have a fully functional smart contract as well as the knowledge to start creating your own.
Enjoy.
Github code - gist.github.com/rodgtr1/427a6...
Check out my BRAND NEW Web3 Course - geni.us/GGTRi0p
Timestamps:
Intro - 0:00
Smart Contract Overview - 0:42
Tutorial - 2:15
Solidity Cheatsheet - 55:07
A UI for our contract? - 56:08
For an in-depth Solidity course, this is my one recommendation:
geni.us/YoumAXH
*** Learn to Code Blueprint 6 Months ***
👉 geni.us/HoswN2
*** Get ONE FREE Month on Skillshare. Learn Anything (preferably code 😁) ***
🎓 geni.us/DqB7m
*** I write regularly ***
👉 travis.media
*** FREE EBOOKS ***
📘 bit.ly/2jnH2DP​
LET'S CONNECT!
📰 LinkedIn ➔ / travisdot. .
🐦 Twitter ➔ / travisdotmedia​
🙋🏼‍♂️ Website ➔ travis.media​
#web3 #smartcontract #solidity #dapp
** Some of the links in this description may be affiliate links that I may get a little cut of. Thank you.

Пікірлер: 83
@worldtrends3296
@worldtrends3296 Жыл бұрын
This is the best solidity tutorial online, no much talk, just straight to the point with a full contract built.
@marjuksajid
@marjuksajid 3 ай бұрын
Thank you so much. It is very helpful. I am watching from Bangladesh 🇧🇩
@lolaaaa864
@lolaaaa864 2 жыл бұрын
I believe this is the best video about Solidity on KZbin
@gaganborra7593
@gaganborra7593 2 жыл бұрын
Man! this is the first solidity tutorial that I have watched till the end! Every sec of it is interesting ! Thanks for the video!
@saintgabriel0
@saintgabriel0 Жыл бұрын
The first snart contract tutorial I watched to the end. Thanks so much for the video .
@HelghastSon
@HelghastSon Жыл бұрын
I cant thank you enough for this tutorial. So easy to follow, you explain everything in great detail, and your voice is extremely pleasant to listen to. I feel so much more confident tackling solidity with this video. Thank you so much, king.
@plb7459
@plb7459 2 жыл бұрын
Love the way you teach, easy to understand with examples. Would love to see more solidity smart contract projects please!!
@TravisMedia
@TravisMedia 2 жыл бұрын
Thanks Paul, more to come! Here's the most recent kzbin.info/www/bejne/n3ewfoKQp6d5sLc
@Rahulkp220
@Rahulkp220 2 жыл бұрын
No fluff Solidity tutorial! Thanks a ton! Subscribed.
@bigcoryjones2126
@bigcoryjones2126 2 жыл бұрын
I used this video to compile my 1st contract without any coding experience. you my friend are brilliant. When I say without any coding experience I do mean literally 0. I was computer illiterate 2 weeks ago.
@TheOGDesigner
@TheOGDesigner Жыл бұрын
Thanks a lot for such a neat an in-depth tutorial! This was actually a great real-life use case for a smart contract while learning the basic concepts 💯💯
@rocketrobin3393
@rocketrobin3393 2 жыл бұрын
Just found your channel. You are the first one to really explain it well and create something useful. Much appreciated!
@themomentier
@themomentier 2 жыл бұрын
So true this simple video is much simpler and straight forward than bunch of paid once. thanks
@demiann4160
@demiann4160 2 жыл бұрын
Yes, exactly. If I make a statement about web3 is for the lack of high-quality training. This is an exception.
@anupamat.c5181
@anupamat.c5181 Жыл бұрын
very true
@marcelom.5672
@marcelom.5672 Жыл бұрын
Hands down best tutorial on the matter, thanks for putting this out!! Glad to have found it. What would you recommend next after this? Any other videos? Thanks and have a great weekend!
@shidharthraj9310
@shidharthraj9310 2 жыл бұрын
Really loved the way you teach solidity. Can you please make more such videos on Blockchain Development and solidity...👍.
@NicolasG-pc8un
@NicolasG-pc8un 2 ай бұрын
This is a great video. There's one bug though, you need to reset the amount to 0 after a kid withdraws, otherwise they would be able to repeatedly call withdraw() and take other kids funds.
@solidityacademy
@solidityacademy 8 ай бұрын
That was an amazing video packed with valuable information! 👏 Thanks a lot! 🙌
@MakeYouSuperhuman
@MakeYouSuperhuman 2 жыл бұрын
Just Amazing , best Tutorial on KZbin.
@Eche0001
@Eche0001 2 жыл бұрын
This video is really simplified and knowledgeable. thanks I really appreciate. Can you please make more videos on Solidity
@bartosz13
@bartosz13 Жыл бұрын
First tutorial i made to the very end thank You for this
@anikalee3471
@anikalee3471 2 ай бұрын
Hey Travis! It'd be great if you could do a part 2 to this tutorial on how we can link it up to a frontend like Angular. Thank you so much for this tutorial and I hope you'd consider making follow-up tutorials for this! :-)
@salmanabdulaziz7552
@salmanabdulaziz7552 2 жыл бұрын
From the middle east region, Great video !!. Need more examples and sample hands on
@aktoriukas
@aktoriukas 2 жыл бұрын
What a great tutorial! Thanks for that.
@javierdash1
@javierdash1 2 жыл бұрын
just love it. Super well explain. Hope you have lots of visits because it is a great tutorial!!
@jackwee4921
@jackwee4921 2 жыл бұрын
Ya agree
@EnglishRain
@EnglishRain 2 жыл бұрын
Thank you for your excellent high quality content!
@cz8986
@cz8986 Жыл бұрын
God, such a good and easy to understand introduction to solidity ! Thx a lot !
@TravisMedia
@TravisMedia Жыл бұрын
Glad it was helpful!
@lolaaaa864
@lolaaaa864 2 жыл бұрын
Very clair but I did get everything .. I ll try the udemy course .. Thank you for sharing
@mjmj007a
@mjmj007a 2 жыл бұрын
Great Video and Thank You !
@mhzboxing1759
@mhzboxing1759 2 жыл бұрын
Wow I love the way you teach Solidity. You should do a TedTalk
@montof9195
@montof9195 Жыл бұрын
Question: Would it be a good compromise for gas to use a storage mapping for (address => Kid) instead of looping multiple times with a for loop in each function?
@MrMahesh7001
@MrMahesh7001 Жыл бұрын
Excellent video on Solidity Travis, thank you for your video. Could you please share or explain the front end integration of this CryptoKids project, please? Really interesting to see the integration part of this smart contract to UI. That's really greatly appreciated. Thank you.
@mahendranath2504
@mahendranath2504 Жыл бұрын
Thank you so much 😊
@hereticsaint100
@hereticsaint100 Жыл бұрын
Yes, do the JS front end tutorial!
@salmanabdulaziz7552
@salmanabdulaziz7552 2 жыл бұрын
Dear Travis, Can you teach us the in same way the last part of graphical version of same program. It would be nice to learn that also. How graphically we can present contracts and have hands on session.
@khizerhayyat549
@khizerhayyat549 2 жыл бұрын
Hi Travis! thanks for the amazing content but don't you think that using array for the kids will be the cause of high gas when you will find the index through a loop and event the if condition inside. what would you say about mapping? something like mapping(address => Kid) public kids;
@TravisMedia
@TravisMedia 2 жыл бұрын
Hi Khizer! Thanks for the input and you're exactly right. I think I mentioned about the gas fees, though, in the video. I was mainly using the array for the teaching aspect of Solidity. But yes, a mapping just like you said is a much better option. I used that instead in my latest Bike Rental App video as it is much more efficient. Thanks again for the input.
@sujeewa8067
@sujeewa8067 2 жыл бұрын
Thanks a lot man!
@m4_thednblab397
@m4_thednblab397 Жыл бұрын
im getting an error that you don't seem to be getting, which is stopping me from being able to interact with the SC but outside of this, great tutorial, thanks for your time!
@skyking4997
@skyking4997 Жыл бұрын
Perfect thanks
@SuperDividenz
@SuperDividenz Жыл бұрын
can you deploy to block chain? possibly on other evm chains?
@Inderashah007
@Inderashah007 Жыл бұрын
Great 👍🏽
@kichirmichir2730
@kichirmichir2730 2 жыл бұрын
nice job....
@jackdelagrange1519
@jackdelagrange1519 2 жыл бұрын
Hey Travis, great video, will you be posting more solidity or blockchain /crypto content?
@TravisMedia
@TravisMedia 2 жыл бұрын
What would you like to see?
@jackdelagrange1519
@jackdelagrange1519 2 жыл бұрын
@@TravisMedia I think many people want to learn about crypto, blockchain , web3, etc. You have a clear way of explaining these complex and important subjects. Thanks again for the solidity info!
@vladusa
@vladusa Жыл бұрын
You forgot to specify range of dates. If someone puts a '0' for time to withdraw, things go wrong. Maybe make an initial check for timeToWithdraw > timeOfContract
@adityasai550
@adityasai550 Жыл бұрын
I think it's not a problem. In that case, we can simply assume the kid can withdraw money as soon as their parents deposit it.
@vladusa
@vladusa Жыл бұрын
@@adityasai550 exactly. This was what my comment stated. withdrawTimestamp - entryTimestamp.
@Chrisadynowski
@Chrisadynowski 2 жыл бұрын
Great vid ! I have question regarding lists , you shows something like : uint[5] names; and here for example : names.push("Travis"); I think this is wrong becasue list is type of uint not string soooo is should be string[5] names; names.push("Travis"); and with uint[5] age; age.push("34"); Something like that ? I am not sure it was for me just weard that list is type of uint and you want to push there strings :D If I am wrong please correct me !
@TravisMedia
@TravisMedia 2 жыл бұрын
Nope you’re right. Thanks for pointing that out. Mainly it was a passing/quick example of how you would add to a list so I didn’t consider the type closely.
@pavspy3489
@pavspy3489 Жыл бұрын
Hi. Can someone plz help me understand, around 25 min, mark. Why are funds being added to the child account from the same child's address?
@gugapilar3135
@gugapilar3135 2 жыл бұрын
Continue postando os videos! Te desejo muita sorte com o teu canal! Siga postando os viideos! te desejo toda sorte com o teu canal!
@dennyage4791
@dennyage4791 2 жыл бұрын
One suggestion: please use larger font size and attach github file links
@TravisMedia
@TravisMedia 2 жыл бұрын
Appreciate the suggestions. Will put the github file link in the description tomorrow.
@vncntjms
@vncntjms 2 жыл бұрын
Can we use the address itself as index of the array? So we don't have loop through all addresses just access it like kids[walletAddress]
@TravisMedia
@TravisMedia 2 жыл бұрын
Yes that’s a much more efficient approach. But wanted to use an array for the beginner tutorial.
@vncntjms
@vncntjms 2 жыл бұрын
@@TravisMedia understood. thank you
@codyshipley3900
@codyshipley3900 3 ай бұрын
Travis, Is there anyway you can have a look at a contract and help me with something?
@mokho3027
@mokho3027 Жыл бұрын
around 15:00, why cant we simply add our 'struct' as a parameter to our function instead of putting all those variables that are in struct?
@nouraldeen9254
@nouraldeen9254 Жыл бұрын
Is this video useful for beginners (first time solidity and smart contracts)!?
@TravisMedia
@TravisMedia Жыл бұрын
Yes. Next step after this is here: kzbin.info/www/bejne/goSvZ2yIfMqEgpI
@rndom-fact
@rndom-fact 6 ай бұрын
Can someone without a prior knowledge in programming learn Solidity? How difficult is it?
@ch453skipper2
@ch453skipper2 Жыл бұрын
For once I have completed an entire tutorial without taking a break and actually understood something
@EzamZaidi
@EzamZaidi 2 жыл бұрын
Maybe I am wrong, but the contract does have a lot of flaws. 1. I can transfer eth to even those addresses which are not even added as kids.
@TravisMedia
@TravisMedia 2 жыл бұрын
You can transfer to any address, yes. In a real contract there would need to be a condition for that for sure. However this was an introductory tutorial to Solidity and a contract for demonstration only.
@codefactor
@codefactor Жыл бұрын
I know it's just a tutorial project - but can't help but point out that kids can withdraw all the money by pressing withdraw button multiple times!
@ryanz67
@ryanz67 2 жыл бұрын
I don’t see how this is the future tbh
@spotshortmanipulators4721
@spotshortmanipulators4721 2 жыл бұрын
Let 's Do Another Function...
@lyon8539
@lyon8539 Жыл бұрын
How much you earn from a writing smart contract?
@zackd7597
@zackd7597 Жыл бұрын
I can't be the only one who finds coding difficult lol
@ballinwith
@ballinwith 2 жыл бұрын
Would you like to join my team as a developer? I’m looking for people who can conduct smart contracts
@tsunningwah3471
@tsunningwah3471 2 ай бұрын
zhichi
@mexicanwhotriestosneakinto921
@mexicanwhotriestosneakinto921 2 жыл бұрын
why are you copying traversy media you are the fake traversy media
@TravisMedia
@TravisMedia 2 жыл бұрын
kzbin.info/www/bejne/h2baaqVul9d4Z5I
@dineshrambabukushwaha4757
@dineshrambabukushwaha4757 2 жыл бұрын
kids[i].amount = 0; once it is transferred to wallet of the kids ? Correct me , If i am wrong here. Because I see for the same kid, if the amount transferred again and withdrawal cause issue.
@gaganborra7593
@gaganborra7593 2 жыл бұрын
Yea! This should be added too! or else jane's gonna rob everything 😂
@maakayp
@maakayp 2 жыл бұрын
Hi Travis i need help am stuck, // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.7; //owner Dad contract CryptoKids { constructor() { owner = msg.sender; } } From Solidity, Declaration Error: undeclared Identifier. owner=msg.sender ^^^^^^
@anandrai9059
@anandrai9059 2 жыл бұрын
You have to write address owner ; before owner = msg.sender;
Smart Contract Tutorial - Vending Machine Smart Contract in Solidity
34:34
5 Signs of an Inexperienced Self-Taught Developer (and how to fix)
8:40
ПЕЙ МОЛОКО КАК ФОКУСНИК
00:37
Masomka
Рет қаралды 10 МЛН
Sprinting with More and More Money
00:29
MrBeast
Рет қаралды 34 МЛН
Joven bailarín noquea a ladrón de un golpe #nmas #shorts
00:17
Understanding Pseudo Code: Part 1 - Flowchart Basics
8:53
TOVALD IT SECURITY ENTERPRISE
Рет қаралды 10
The App YOU or I Could Have Built... ShipFast
6:52
Travis Media
Рет қаралды 102 М.
Why You’ll WASTE The Next 3 Years…
6:06
Travis Media
Рет қаралды 281 М.
Why Great Developers DON'T Create Content (and a lesson to learn)
6:56
How To Become A Blockchain Developer In 2023?
18:05
EatTheBlocks
Рет қаралды 120 М.
Rust's Alien Data Types 👽 Box, Rc, Arc
11:54
Code to the Moon
Рет қаралды 132 М.
Теперь это его телефон
0:21
Хорошие Новости
Рет қаралды 1,7 МЛН
Выложил СВОЙ АЙФОН НА АВИТО #shorts
0:42
Дмитрий Левандовский
Рет қаралды 1,3 МЛН
Как я сделал домашний кинотеатр
0:41
RICARDO
Рет қаралды 1,5 МЛН