Upgradable Smart Contracts - UUPS Proxy tutorial

Поділитися
Вставка
  • Опубліковано 15 лис 2024

КОМЕНТАРІ • 35

  • @lorisp186
    @lorisp186 Рік тому

    Thank you man. It helps understand better what's happening under the hood

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

    Hey great video but i am a bit confused about something I am hoping you can clarify. With this UUPS pattern do the users interact with the Proxy contract or the Logic Contract? Also instead of writing out the Proxy and Proxiable contracts is it possible to use OpenZeppelin's UUPSUpgradable Contract & Initializable contracts? Is Proxy & Proxiable intended to be equivalent of UUPSUpgradeable and Initializable respectively?

  • @aluranarveez9021
    @aluranarveez9021 Рік тому

    Best explanation. Thanks a lot.

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

    Hey shobhit! I’m having trouble with finding a way to host all my images through Ipfs. I tried pinata but it says that only 1GB is free then I have to pay. My file size 40 GB since my NFTs are in 2K quality. Do you know a way to do it for free or with least amount of money spent. I hope you could make a video on Ipfs and uploading images to your own server.

  • @bibovskij9526
    @bibovskij9526 Рік тому

    Hey man, do you do 1to1 solidity and web3 coding mentorship? I would be very very interested

  • @meka4996
    @meka4996 Рік тому

    Very good. Thanks!

  • @dennisdecoene
    @dennisdecoene 2 роки тому +7

    If I see upgradeable smart contracts I mostly steer away from them and will never ever lock funds in it. They can always upgrade to a rugpull at any time. This goes against a corner philosophy of crypto. I can see what code I'm interacting with and because of immutability it will be the same code next century. With upgradable smart contracts that inherent trust is gone.

    • @NishantSingh-zx3cd
      @NishantSingh-zx3cd 2 роки тому

      I second you ser on this!

    • @spaceboychorizo7001
      @spaceboychorizo7001 2 роки тому +3

      Sad take.
      For honest projects. This is to prepare for the HUGE changes in the future!

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

      @@spaceboychorizo7001 that's the whole problem. Who's honest? How would I know? You want me to trust an unknown party in a system that was invented to be trustless!

    • @kamalchan9756
      @kamalchan9756 Рік тому

      don't worry bcz there are always ppl who looks into the logic contract and its public you can see it except if it is only bytecode then you can't trust the protocol

  • @chiragtitiya9381
    @chiragtitiya9381 Рік тому

    don't you need to call initialize after upgrading proxy to another implementation?

  • @notify7610
    @notify7610 Рік тому

    You kill it.... nice work

  • @JoaoVictorPereiraSantos
    @JoaoVictorPereiraSantos Рік тому

    You helped me a lot!!! Thanks!!

  • @matiasfalcone979
    @matiasfalcone979 Рік тому

    Do you know how I can build a Factory for upgradeable smart contracts using UUPS Proxy?

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

    Great tutorial!

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

    noice!

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

    Im confused about the abi and address though. The ABI seem to be for logic but address point to Proxy is that correct?
    I'm currently in situation where Im deploying a contract that will use functions of another contract that was deployed through a proxy.
    What abi/address should I use you point correctly and how should I import it in solidity? Any help would be appreciated

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

      When we use the ABI of implementation, we send the request to our proxy contract, looking for method of implementation. When the system doesn't find the method, it goes to the fallback function, where it is delegated to implementation contract, where it does find the function for execution.

  • @kamalchan9756
    @kamalchan9756 Рік тому

    but the data are not saved i mean you count should be still 4 images if you have users data the data should still the same as ContractV1

  • @parasgaur3195
    @parasgaur3195 Рік тому

    Love from India

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

    Bro, u are awesome 🎉

  • @ShubhamVerma-zc1ou
    @ShubhamVerma-zc1ou Рік тому

    Hi, I have a question - at the time of deploying the Proxy contract we need two parameters: Construct Data and Contract Address. What do we add to Construct Data ????
    thanks

    • @Web3_Club
      @Web3_Club  Рік тому

      The constructor data for implementation contract

    • @decentriss.r.o.8756
      @decentriss.r.o.8756 Рік тому +2

      I need to add something to the answer of Shobhit, as it is not easy to figure this out if you have no experience with this (Shobhit explains it as well at the end of the video, but I know that it might be confusing when working through the tutorial and not knowing that the explanation you're searching will come at the very end): You have to enter the name of the constructor function - initialize() - in this field. But the name must be ENCODED and this is how you do this: In the console of Remix just enter: "web3.utils.sha3('initialize()').substring(0,10)", which will encode the initialize() constructur into this 10 digit hex: 0x8129fc1c - And this hex is the value, which you have to enter for the "constructData" parameter when deploying. In the "contractLogic" parameter you enter the contract address of "MyContract", which of course, you have deployed to the respective chain in first place.

    • @therealputincoin
      @therealputincoin Рік тому

      @@decentriss.r.o.8756 Thank you very much! This was the answer I was desperately searching for! Now I can finally complete Shobhit's tutorial! 🙂

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

    how can i get the read as proxy and write as proxy buttons on tron

  • @shiv-sharma
    @shiv-sharma 2 роки тому

    Great tutorial helpful, one suggestion if possible pls share the code also

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

    Thank for a great video. The value of Proxy is 4 and the value of Implementation contract is 1. I wonder where is the value of Proxy contract come from?. There is no storage variable inside Proxy contract.

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

      Proxy uses the implmentation's code in context of proxy, so variable defined in implementation are implicitly and independently defined in proxy as well.

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

      @@Web3_Club thank you so much

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

      @@Web3_Club one more question. When we add more storage variables in upgraded implementation contract. How proxy contract get new variables? proxy's code and address does not change!

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

      @@Web3_Club have the basic idea, but need to investigate further. Thank you

  • @FalconStakepool
    @FalconStakepool Рік тому

    Do you know how I can build a Factory for upgradeable smart contracts using UUPS Proxy?