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?
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.
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.
@@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!
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
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
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.
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
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.
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.
Proxy uses the implmentation's code in context of proxy, so variable defined in implementation are implicitly and independently defined in proxy as well.
@@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!
Thank you man. It helps understand better what's happening under the hood
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?
Best explanation. Thanks a lot.
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.
Hey man, do you do 1to1 solidity and web3 coding mentorship? I would be very very interested
Very good. Thanks!
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.
I second you ser on this!
Sad take.
For honest projects. This is to prepare for the HUGE changes in the future!
@@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!
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
don't you need to call initialize after upgrading proxy to another implementation?
You kill it.... nice work
You helped me a lot!!! Thanks!!
Do you know how I can build a Factory for upgradeable smart contracts using UUPS Proxy?
Great tutorial!
noice!
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
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.
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
Love from India
Bro, u are awesome 🎉
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
The constructor data for implementation contract
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.
@@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! 🙂
how can i get the read as proxy and write as proxy buttons on tron
Great tutorial helpful, one suggestion if possible pls share the code also
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.
Proxy uses the implmentation's code in context of proxy, so variable defined in implementation are implicitly and independently defined in proxy as well.
@@Web3_Club thank you so much
@@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!
@@Web3_Club have the basic idea, but need to investigate further. Thank you
Do you know how I can build a Factory for upgradeable smart contracts using UUPS Proxy?