WETH | Solidity 0.8

Поділитися
Вставка
  • Опубліковано 4 лют 2025

КОМЕНТАРІ • 22

  • @danchatka8613
    @danchatka8613 2 роки тому +2

    Another excellent tutorial. You totally demystify smart contracts.

  • @Sydra.
    @Sydra. 2 роки тому +8

    Yeah!
    More ERC20 related tutorials please! Maybe about some basic swap contracts. Or ERC20 hacks what we should be careful about.

  • @AnimalsvsMonstersClips
    @AnimalsvsMonstersClips 2 роки тому +2

    I've been watching content for months and just realized u have a course website. You should definitely pin "Take a course" comment on each videos

  • @bhok5228
    @bhok5228 2 роки тому +1

    Vey cool, thank you for the lesson

  • @gyutaro88
    @gyutaro88 2 роки тому

    Keep them coming! Good job!

  • @shivangsaini3940
    @shivangsaini3940 2 роки тому +2

    another immutable data writed in my mind.

  • @BinWang-b7f
    @BinWang-b7f 2 роки тому +2

    If a user directly sents ETH to this contract, why do we want to execute fallback function instead of receive function (and then call the deposit function)?

  • @cbrian4326
    @cbrian4326 2 роки тому +4

    Hi, I’m just curious is the solmate erc20 better than openzeppelin erc20?

  • @Lowlim90
    @Lowlim90 2 роки тому +1

    Every chain alrdy has their own WETH contract... is it better to use their WETH contract or create another my own WETH contract in my own defi?

  • @crypto_peng
    @crypto_peng 2 роки тому

    any more use case or example for 'fallback and change function from external to public'?

  • @ayushthakur733
    @ayushthakur733 2 роки тому

    Great🙌... Make a video on erc1155

  • @bresis87
    @bresis87 2 роки тому +6

    wouldn't it be better to use "payable(msg.sender).call{value: ...}()" instead of "payable(msg.sender).transfer(amount)"?

    • @smartcontractprogrammer
      @smartcontractprogrammer  2 роки тому +2

      Both is fine.
      _burn is called before transfer ETH so it's protected from re-entrancy

    • @viktorlavrenenko1713
      @viktorlavrenenko1713 2 роки тому +2

      @@smartcontractprogrammer, but is it protected from 2300 gas?

    • @bresis87
      @bresis87 2 роки тому

      @@smartcontractprogrammer indeed but if you send the ethers to another smart contract that has to do some work with it, couldn't the transaction get reverted?

    • @tharbusred6071
      @tharbusred6071 2 роки тому +1

      @@viktorlavrenenko1713 You made a good point here. If we refer to security tips from Consensys, they advocate to use call since gas costs are not arbitrary. Re-entrancy can be avoided using check-effect-interact pattern

    • @sewingsugar9892
      @sewingsugar9892 2 роки тому

      Truee