Gas Optimization in Solidity: 10 tips

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

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

  • @cryptocalc6884
    @cryptocalc6884 2 ปีที่แล้ว

    Amazing channel -- thanks a lot. Thanks also for the quick summary in the description

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

    thanks, i was stuck, turn on optimizer of solidity compiler

  • @shouryamkumar3369
    @shouryamkumar3369 2 ปีที่แล้ว +1

    The most clear playlist on the ethereum gas I could find. Thanks Julian for all the effort you put in!

  • @kishlorn3299
    @kishlorn3299 3 ปีที่แล้ว +1

    Your optimizer settings are wrong at 3:46
    Optimizer settings should be under under settings, as in: compilers.solc.settings.optimizer:{...}

    • @nikolais6452
      @nikolais6452 2 ปีที่แล้ว

      Only if you are not using a EVM framework, like truffle, hardhat or forge

  • @magnetto90
    @magnetto90 2 ปีที่แล้ว

    You deserve more subscribers

  • @ghasemsadeghi5175
    @ghasemsadeghi5175 4 ปีที่แล้ว +5

    Nice tips. I think it would be great if you can show all of these tips in a real DAPP example.

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

      See uni v2 actual code

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

    Is it recommended to use the Remix IDE's optimization feature?

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

      If you deploy to production.

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

      @@EatTheBlocks Some are suggesting to turn it off (Remix optimization) in production. So I'm a bit confused at this point.

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

      @@despareint why are they suggesting this? You want code that is gas optimized for production.

    • @nikolais6452
      @nikolais6452 2 ปีที่แล้ว

      @@EatTheBlocks It used to have problems, i think in solidity 0.5.0, so people still think this is the same

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

    you're awesome man really

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

    I have a doubt...after deployment of a contract on to a test network, first time deployment is successful and then after when I did deploy again on the test network it said transaction may fail exceeded gas limit, VM execution error

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

      its possible, gas requirements change depending on whats in the storage of the smart contract the and input provided to the function.

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

      @@EatTheBlocks Thanks for the reply.. How can I solve this error.. because I am preparing a contract that will store Blacklisted IP address... It consists of both IPv4 and IPv6 types of addresses.

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

      @@bikashjena8167 increase gas limit on your transaction

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

      @@EatTheBlocks thanks for the suggestion man...