30 Solidity Tricks You Can’t Live Without

Поділитися
Вставка
  • Опубліковано 10 лип 2023
  • FREE MASTERCLASS "Get Into Web3 In a Bear Market"
    👉 Link: eattheblocks.com/masterclass
    👉 Full roadmap to learn Web3 Development & get a 6 figure remote job
    👉 EVEN during this bear market

КОМЕНТАРІ • 58

  • @EatTheBlocks
    @EatTheBlocks  11 місяців тому +2

    FREE MASTERCLASS "Get Into Web3 In a Bear Market"
    👉 Link: eattheblocks.com/masterclass
    👉 Full roadmap to learn Web3 Development & get a 6 figure remote job
    👉 EVEN during this bear market

  • @warodomwerapun6417
    @warodomwerapun6417 11 місяців тому +3

    ^0.8.20 , some tutorials put this for compatible purpose, not for deploying in the production, then putting ^ symbol is not always wrong, it is depending on the objective of example.

  • @DYNO_619
    @DYNO_619 11 місяців тому +9

    We want more videos like this.

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

    Thank you! This is really helpful. Much appreciated.

  • @peter9910
    @peter9910 11 місяців тому +1

    11:41 for "pure" keyword, I compiled the code example with and without optimization using no mutability, "view" and then "pure", and bytecode is exact same in every case (except for metadata hash ofc)

  • @juleslondon
    @juleslondon 8 місяців тому

    Nice tips and tricks, I love the section on reentrancy guards 👌

    • @EatTheBlocks
      @EatTheBlocks  8 місяців тому

      Thanks, glad you liked these Solidity tricks!

  • @slavikcryptoes1714
    @slavikcryptoes1714 6 місяців тому +1

    14:04 Thank you professor, just like in the college 😅

  • @saadabbasi2063
    @saadabbasi2063 9 місяців тому +1

    Solidity: EXCUSE MEEE!!! Did you just assume my GENDERR!!!

  • @califafula2928
    @califafula2928 3 місяці тому

    The best

  • @ja.digital617
    @ja.digital617 11 місяців тому +1

    Hey pal!

  • @justinholbein9776
    @justinholbein9776 11 місяців тому

    Yes yes yes ooo solidity so good

  • @danaherstudio
    @danaherstudio 8 місяців тому

    Do free functions (or importing scripts) still count towards the size of the contract?
    I don't see why they wouldn't but I have my fingers crossed for the opposite lol.

  • @slavikcryptoes1714
    @slavikcryptoes1714 6 місяців тому

    You're like the crypto-Asterix, excellent videos anyway, thanks.

  • @JohnnyMayHymn
    @JohnnyMayHymn 11 місяців тому +1

    this is awesome, thanks for sharing these advanced tips

  • @notchobby
    @notchobby 11 місяців тому +1

    Thank you for this.

  • @bazalkhan9533
    @bazalkhan9533 11 місяців тому +1

    Suggest some courses for beginner to advance in blockchain developement

    • @EatTheBlocks
      @EatTheBlocks  11 місяців тому

      Here you go (it's my course):
      eattheblocks.com/course/

  • @r4c0nnoe27
    @r4c0nnoe27 11 місяців тому +1

    your videos are the best!

  • @merv893
    @merv893 11 місяців тому +1

    Wow that’s a lot of information ,merci

  • @codertjay
    @codertjay 11 місяців тому +1

    Wow. I really love this

  • @MehranHydary
    @MehranHydary 11 місяців тому +1

    thank u

  • @freemindcanada9319
    @freemindcanada9319 11 місяців тому +1

    mind explosion .... thankyou

  • @grisdoteth
    @grisdoteth 10 місяців тому

    this was great

  • @yairopro
    @yairopro 8 місяців тому

    05:16 😂 Tu as fais ton "et voilà" comme un étranger qui essaie de parler français

    • @EatTheBlocks
      @EatTheBlocks  8 місяців тому

      Ah non, en Anglais on peut dire voila.

  • @jopadjr
    @jopadjr 11 місяців тому +1

    109th...Thanks Julien

  • @sarnavosahasardar3283
    @sarnavosahasardar3283 11 місяців тому +1

    trying to use console.log but not working giving error
    code:
    pragma solidity ^0.8.8;
    import "hardhat/console.sol";
    contract Tricks
    {
    function Console() external pure
    {
    uint256 a=30;
    int256 b=-25;
    console.log (a);
    console.log (b);
    }
    }
    error:
    TypeError: Member "log" not found or not visible after argument-dependent lookup in type(library console).
    --> SOLIDITY/SOLIDITY/Tricks.sol:13:10:
    |
    13 | console.log (b);
    | ^^^^^^^^^^^

  • @HasanKhan-nq2ch
    @HasanKhan-nq2ch 10 місяців тому

    u are awosomeeeee

  • @adammr8523
    @adammr8523 11 місяців тому

    What about huff ?

    • @EatTheBlocks
      @EatTheBlocks  10 місяців тому

      Good suggestion. I might do a tutorial on that

  • @ggman6047
    @ggman6047 10 місяців тому +1

    You have a lot of mistakes in your codes like when you define a global function above other contracts you cannot give it a visiblity state like internal ! and mistake about ^0.8.15 meaning and your syntax is incorrect while declaring a event in timestamp section , other miss-uses ....

  • @jean-michelhiver4362
    @jean-michelhiver4362 11 місяців тому

    So you do a horrible unbounded loop in the iterate() function example, say "et voila", only to let people know in the following trick that doing so is actually a terrible idea. Lol

    • @EatTheBlocks
      @EatTheBlocks  11 місяців тому +1

      No, you missed the point. Unbounded loops should be avoided in transactions. If you are just reading data, it's not a transaction.

    • @jean-michelhiver4362
      @jean-michelhiver4362 11 місяців тому

      @@EatTheBlocks there is still a gas limit on reads, plus you might well need to use a read function in a write function, so it's still a pretty ugly thing to do imho

  • @xjohnxwickx
    @xjohnxwickx 11 місяців тому

    @EatTheBlocks