Learning Solidity : Tutorial 3 Custom Modifiers and Error Handling

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ธ.ค. 2024

ความคิดเห็น •

  • @nsulaiman23
    @nsulaiman23 7 ปีที่แล้ว +20

    You deserve a lot more views and subscribers. Great work!

  • @Lanciz
    @Lanciz 4 ปีที่แล้ว +1

    Your tutorials are perfect! Really great job, you are so much helpful!
    A bit unfair those tutorials are 3 years old, syntax is a little bit changed, that may cause some little problem to new users, but anyways those videos are still really helpful!

  • @basselkh5147
    @basselkh5147 7 ปีที่แล้ว +6

    Solidity is much easier and more enjoyable with you, thanks

  • @dandanmovies
    @dandanmovies 6 ปีที่แล้ว

    You really make me understand the language. thank you!

  • @hayttman
    @hayttman 6 ปีที่แล้ว

    Fantastic stuff. perfect length of these tutorials

  • @vurtnesaerdna
    @vurtnesaerdna 7 ปีที่แล้ว

    very good man!This is the best solidity video ever!

  • @michaelangelos5117
    @michaelangelos5117 3 ปีที่แล้ว

    A quick estimation of the average length of your solidity videos shows me that I am about 3 hours away from being a solidity programmer!
    I think I have to send you some cash(crypto) when I get my first gig.

  • @blippr2877
    @blippr2877 7 ปีที่แล้ว +3

    Thanks a lot for the videos, you are a hero! Don't be disappointed that you don't have 1.000.000 subs yet, but they will come. The early bird gets the worm, right?

  • @cristianv3876
    @cristianv3876 4 ปีที่แล้ว +1

    Very good videos!! just a sugestion: it would be easier to watch in any screen if you increase the screen fonts size. Thanks!

  • @claudelk1719
    @claudelk1719 6 ปีที่แล้ว +2

    Thanks a lot for this. What do you mean by "gas consumed?"

  • @sanfranciscotribe9345
    @sanfranciscotribe9345 6 ปีที่แล้ว

    Please continue videos!

  • @zuntah
    @zuntah 5 ปีที่แล้ว +2

    Thank you :)
    The require identifier doesn't work in compiler version 0.4.0, It's supported since 0.4.10, In the first tutorial you say you are using 4.0.0, Can you please update it so more people will not mistaken?
    Thanks.

  • @traildataanalytics407
    @traildataanalytics407 6 ปีที่แล้ว

    great work

  • @domi1kenobi
    @domi1kenobi 4 ปีที่แล้ว

    thanks a lot!

  • @WhiteArtsMagic
    @WhiteArtsMagic 6 ปีที่แล้ว

    Hi, I am having an issue with the if calling checkValue. I get this error on line 20 -- Declaration error undeclared identifier. Did you mean "checkValue" ? if (checkValue(amount))
    any idea?

    • @asadmohammed706
      @asadmohammed706 6 ปีที่แล้ว

      Did you find the solution?

    • @tomminguyen6704
      @tomminguyen6704 6 ปีที่แล้ว

      The Solidity update and Remix has changes quite a bit since, you can check out my codes if you need help
      github.com/Aleadinglight/Smart-contract/blob/master/Inheritance.sol

    • @tomminguyen6704
      @tomminguyen6704 6 ปีที่แล้ว

      My friend, there is some random "/" in my code that i just removed, but otherwise there is no problem with it. I tested in the latest Remix and it is fine. Can you try again?

    • @tomminguyen6704
      @tomminguyen6704 6 ปีที่แล้ว

      If you need help, please send me a link to your code.

  • @GiraffePi
    @GiraffePi 6 ปีที่แล้ว

    here is solution for warnings
    1)for construction use "constructor" instead of function
    function Bank(uint amount) --> constructor (uint amount) public
    2) add public to end of functions (only if it is public)
    example: function deposit(uint amount) ownerFunc public
    example2: function deposit(uint amount) ownerFunc public returns(uint)
    3)use "pure" or "view" when the fuction returns
    The constant modifier is being replaced by view and pure. With view you cannot modify the contract storage, but you can access the storage. With pure you cannot access the contract storage
    example: function getName() public pure returns (string){ return "YO WHAT UP";}
    example2: function getName() public view returns (string){return name;}
    three things will solve warning sign.

  • @ArpitSaxenaBCI
    @ArpitSaxenaBCI 6 ปีที่แล้ว

    Getting this error for every function i created.
    "Relevant source part starts here and spans across multiple lines."
    What should i do?

  • @samajapstaceht
    @samajapstaceht 7 ปีที่แล้ว

    Great videos, but I have one question. If there is no access modifier on a function, what is the default? Public?

  • @parishilanrayamajhi4879
    @parishilanrayamajhi4879 7 ปีที่แล้ว

    can you please explain more about the modifier. Is it something like constructor which can be called more than a time but its value cant be changed ones it is initiated? and what is the scope of owner in the given example.
    Thanx in advance!!!!

    • @Dimstara
      @Dimstara 7 ปีที่แล้ว +3

      Modifier is like a mixin (read: function) you can use with your functions. This is more about contract flexibility and reusable code principle. Modifiers can also receive parameters, like functions.
      Literally, they wrap your function (which looks like this _;) with specified code.

  • @siddharthr1853
    @siddharthr1853 7 ปีที่แล้ว +1

    The official docs did a horrible job of explaining modifier and the _; weird syntax. Donating to your wallet.

  • @dsp-ye9is
    @dsp-ye9is 7 ปีที่แล้ว

    I get an error "This contract does not implement all functions and thus cannot be created." when I try to create myFirstContract @ 5:57 ?

    • @WillitScale
      @WillitScale  7 ปีที่แล้ว

      Are you 100% sure that you have correctly implemented all the functions of the extending contract?

    • @dsp-ye9is
      @dsp-ye9is 7 ปีที่แล้ว +1

      I had defined Loan() with an upper case L, realized it when I downloaded your source and compared to mine. Thank you! Really cool tutorials

    • @WillitScale
      @WillitScale  7 ปีที่แล้ว

      Glad you resolved the issue and thanks!

  • @sagarrana2859
    @sagarrana2859 6 ปีที่แล้ว

    Sir, after watching this complete series can I able to make my own token and deploy it on blockchain?

  • @apex12122
    @apex12122 5 ปีที่แล้ว

    I also have the
    same error : expect import directive or contract definition. on the interface line ??? anybody got a solution, I really got stuck here... thx

    • @WillitScale
      @WillitScale  5 ปีที่แล้ว

      Hey, yes with the new remix compiler you have to fix a few things:
      The pragma definition needs to now be: "pragma solidity >=0.4.0

  • @GiraffePi
    @GiraffePi 6 ปีที่แล้ว

    does any1 has many warning on this code? Warning:No visibility specified. defaulting to public

    • @EPurnachandrapatro
      @EPurnachandrapatro 6 ปีที่แล้ว

      yes. You can work with this warning though.
      ethereum.stackexchange.com/questions/19380/external-vs-public-best-practices

  • @celestial_crash0
    @celestial_crash0 7 ปีที่แล้ว

    you really like the word "obviously" hahaha great tutorial though

  • @kielbarry1789
    @kielbarry1789 6 ปีที่แล้ว

    do you have a twitter handle?

  • @shubhpatni2123
    @shubhpatni2123 6 ปีที่แล้ว

    PLease make a video on whisper protocol

  • @benamigoldenberg1275
    @benamigoldenberg1275 6 ปีที่แล้ว +2

    Since value cannot be less the zero you didn't really have a bug

  • @seba23571
    @seba23571 3 ปีที่แล้ว

    someone has some clue of how to use solidity in current version.

  • @apex12122
    @apex12122 5 ปีที่แล้ว

    Anybody ?? , man Im really stuck here with this error...

  • @jpl_btc
    @jpl_btc ปีที่แล้ว

    that is too much white for my eyes, I'm skipping this one bro'