Transient Storage | Solidity 0.8

Поделиться
HTML-код
  • Опубликовано: 26 дек 2024

Комментарии • 20

  • @smartcontractprogrammer
    @smartcontractprogrammer  9 месяцев назад

    0:00 Intro
    2:45 Transient storage
    8:04 Reentrancy guard example
    Code
    solidity-by-example.org/transient-storage
    Take a course
    www.smartcontract.engineer/
    Remix
    remix.ethereum.org
    #Solidity #SmartContract #Ethereum #スマートコントラクト

    • @xiphod2207
      @xiphod2207 5 месяцев назад

      Can you clarify for me: it is suggested that KYC information can be stored, checked against, then erased. Does this mean that this data is effectively private? Is it safe from an attacker who wants to know your identity? Or is it implied this kyc data would be encrypted? Also, is it possible to use this storage for any sort of key sharing?

  • @passandscore_
    @passandscore_ 9 месяцев назад +1

    Great example. I was waiting for this one. Looking forward to seeing clever use cases.

  • @wxIyz
    @wxIyz 9 месяцев назад

    Man thank you, you have best crypto contents in youtube

  • @moeidmandegar1033
    @moeidmandegar1033 9 месяцев назад

    Great content thank you

  • @MajdTurfa
    @MajdTurfa 7 месяцев назад

    Thank you. a question please. In the Reentrancy guard example, If I want the Reentrancy guard to apply on all my functions (only one function of my contract is allowed to be called in a transaction) then I don't need to reset the tstore(SLOT, 0) , correct?

  • @Rishabhsharma-dm5ec
    @Rishabhsharma-dm5ec 9 месяцев назад

    Why did we have to reset the slot value in the reentrancy example? unlike the val example where we did nothing to set the value back to 0.

    • @passandscore_
      @passandscore_ 9 месяцев назад +1

      All reentrancy guards need to be set back to zero at the end of function execution otherwise you are disabling the function as all future calls to it will revert.

    • @senthilsamrat24
      @senthilsamrat24 9 месяцев назад +1

      you are right! logically transient storage doesnt have to be set back to 0 since it will be automatically cleared at the end of the tx.

    • @senthilsamrat24
      @senthilsamrat24 9 месяцев назад +2

      @@passandscore_ transient storage is contexualised only within single tx. so it will be reset at the end of the tx and wont affect new tx execution

    • @smartcontractprogrammer
      @smartcontractprogrammer  9 месяцев назад +1

      if transient storage lock is not reset the function can only be called once in a transaction.
      Example
      1. Send a transaction to multi call into a function with transient lock
      2. First call will set the lock and execute fine. Here transient lock is not reset
      3. Second call will revert. The function is still locked.

    • @Rishabhsharma-dm5ec
      @Rishabhsharma-dm5ec 9 месяцев назад

      @@smartcontractprogrammer I understand that, but my only question was why not, why is it not reset?

  • @matt-stam
    @matt-stam 9 месяцев назад

    Do you need to actually use assembly, or will setting X = true then X = false just make the Solidity compiler make TSTORE work under the hood?

    • @smartcontractprogrammer
      @smartcontractprogrammer  9 месяцев назад

      for now you need assembly.
      I think vyper also has transient storage without assembly

  • @Mentalist06
    @Mentalist06 9 месяцев назад

    Time to start move. There are enough videos about solidity

  • @user-uh7fo8dg4j
    @user-uh7fo8dg4j 9 месяцев назад +2

    Like this comment is you like this video