Man, please never stop these juicy videos, it will make a lot of lives easier and love you man, keep it up
@PatrickAlphaC3 жыл бұрын
I’ll keep them juicy ;)
@orhanors18003 жыл бұрын
I was so serious about learning this topic. I came to the video with my surly face and now I know the topic and I'm smiling. Keep it up Patrick :)
@PatrickAlphaC3 жыл бұрын
Boom! Love hearing this :D
@daffertube2 жыл бұрын
The hook for this video has my sides in orbit. was not expecting so many memes in development video. 10/10
@PatrickAlphaC2 жыл бұрын
Glad you learned something and had a laugh :)
@clydedavidson92722 жыл бұрын
After running into a Diamond contract last night I was looking for a better understanding of upgradable contracts. Thanks for always putting out relative content in a space that is continually growing and changing. Every time I think I know a good bit about smart contracts and solidity something new throws me for a loop but you always seem to have an easy to understand video ready for me to watch on the subject.
@PatrickAlphaC2 жыл бұрын
Glad you like it! Yeah I've recently updated my opinion on diamonds too (although, I STILL think the name is absolute trash, which I have expressed. I prefer something like "multi-implementation proxy" or something... or something).
@clydedavidson92722 жыл бұрын
@@PatrickAlphaC I really only started looking into them as I am hoping to break into auditing and it seems a ton of companies/devs are implementing all these upgrade patterns into their flow. Figured I better familiarize myself with them now.
@clydedavidson92722 жыл бұрын
@@PatrickAlphaC Do you ever plan on doing a diamond tutorial. I understand they essentially have multiple implementation contracts (facets) but am a bit confused on diamond storage or app storage allowing us to store state variables at predetermined positions using a hash. Would be amazing to see you break down the standard!
@PatrickAlphaC2 жыл бұрын
@@clydedavidson9272 Yes! It's been on my todo list!
@Rishvanth Жыл бұрын
Hey Patrick, I Really Love your way of teaching technical stuff❤!. You are one of very few who teaches concepts in depth and very clearly. Keep posting a lot of content like this.
@PatrickAlphaC Жыл бұрын
you got it!
@fabioseva13 жыл бұрын
I’m not a dev. Still you made the content easy to understand. Nice job!
@anupam44463 жыл бұрын
Patrick pouring pure knowledge.
@PatrickAlphaC3 жыл бұрын
We thirsty for knowledge
@anupam44463 жыл бұрын
@@PatrickAlphaC this has been a controversial topic for our team. We flighted a lot on EIP1167. THIS VIDEO SHOULD RESOLVE OUR FIGHTS.
@PatrickAlphaC3 жыл бұрын
@@anupam4446 well I'm glad it'll be helpful. But I'd say you should read the blogs I have in the description, then use that to resolve your fights.
@cs10701513 жыл бұрын
Proxy contract is popularly known as PIMPL (pointer to implementation) in languages like C++ to keep the ABI same, but of course the whole mechanism of 'delegateCall' (in which you are touching data in the calling contract) makes this a completely novelty.
@PatrickAlphaC3 жыл бұрын
Yeah, delegatecall is hero mode
@MatrixMind233 жыл бұрын
Thank you for a clear understanding much appreciated
@LildAnakin3 жыл бұрын
Perfect! I was just reading the docs on this last night. Thanks for making a video 🙏🏾
@pulsechainalltheway18456 ай бұрын
Your videos are easy to understand
@PatrickAlphaC6 ай бұрын
Yay :)
@bezimienny52 жыл бұрын
Oh, my first thought for a solution would be something like what you showed as proxy. I mean, I only really gave it a small amount of thought with the limited beginner understanding of Solidity that I have, so the fact that I came up with that much still makes me feel smart 😊
@PatrickAlphaC2 жыл бұрын
Great work!
@sunguru9813 жыл бұрын
Subscribed. This is a gold mine for newbies like me
@PatrickAlphaC3 жыл бұрын
Welcome!! Be sure to sub to the chainlink YT too, we do a lot of great stuff there
@sunguru9813 жыл бұрын
@@PatrickAlphaC Aye aye Captain. I first subscribed that only to find the funny side of yours here haha.
@nykeharewood82463 жыл бұрын
I'll be honest, i didn't think you could outdo the AAVE flash loans video, however your utilization of YEET.. is truly groundbreaking. All that to say, excellent videos i am hooked, subbed, discorded, and all that Jazz. If i may i think it would be interesting to due a cost analysis on "cloud hosting vs on prem vs something like Ankr which claims to be built for defi hosting"
@PatrickAlphaC3 жыл бұрын
Ahahah this made my day. Glad you enjoyed the social yeet method. Very serious smart contract upgrade methodology. And that would be cool... for running some blockchain node stuff. That sounds like a long video that won’t age well though :/ it would be relevant for like a few months ahah
@dimitrispanouris3 жыл бұрын
Love you man.
@PatrickAlphaC3 жыл бұрын
And I love you dude
@erosmlima59813 жыл бұрын
Great video and explanation, thanks man!
@PatrickAlphaC3 жыл бұрын
Glad it helped!
@eugenetapang3 жыл бұрын
Omg, I am like a kid with my juicy juice listening to this! Preach on! Loving it Patrick!
@PatrickAlphaC3 жыл бұрын
Break out the lunch box baby!!
@RodNavarroYtb Жыл бұрын
So, Diamond is like microservices for smart contracts. Cool video Patrick. Trying to get into this stuff. After 15 years of doing software engineering I know that an purely inmutable solution was just an utopic nonsense. Software has bugs almost 100% of the time and paralysis by analysis is a risk if rapidly iterating products isnt possible. Let alone building a real business case
@PatrickAlphaC Жыл бұрын
There is a little give and take on this. Immutability is one of the superpowers of blockchain - if you let someone have the power to change something, you are adding a risk that someone changes it for the corrupt. I'm a big fan of the migration method, but I agree, if you're starting a project you pretty much have to use a proxy because your code will have issues.
@RodNavarroYtb Жыл бұрын
@@PatrickAlphaC yeah. Bugs will always be part of software engineering. Even if you code a million unit testings. I’ve ever seen a platform that’s bug free. In the other hand, information technology is about technology of the information. Software has to be written by somebody. Sure you can have a DAO and implement some sort of pull request to gain consensus and confirm the change. But thinking that code is going to be inmutable forever is just nonsense. Code get obsolete by the minute. A common case are security patches because of dependencies…
@PatrickAlphaC Жыл бұрын
@@RodNavarroYtb Maybe. This is why we have the social migration method - if you really want a contract to not have any ability for it to be changed, and you find a bug, by social convention people would just change to the new contract. But yes, agreed, having zero bugs is sort of insane.
@0xZeeS Жыл бұрын
Awesome video. Tip: Would be great if video has timestamps!
@adeloum2 жыл бұрын
I
@PatrickAlphaC2 жыл бұрын
EXACTLY
@Silvertestrun Жыл бұрын
Thank you very much
@zrfpr3 жыл бұрын
This is so great. Thank you for being you.
@zrfpr3 жыл бұрын
YEET!
@PatrickAlphaC3 жыл бұрын
@@zrfpr YEEEEEEEET
@lloydfaulk43383 жыл бұрын
Great video Patrick, you truly are a living legend. YEET!! 😂😂
@PatrickAlphaC3 жыл бұрын
YOU KNOOOOOOWWWWWWW IIITTTTT
@IForgotTheNickname3 жыл бұрын
Love you. No Fomo
@PatrickAlphaC3 жыл бұрын
No fomo fren
@fcurdi3 жыл бұрын
Great explanation!!
@harpalsinhjadeja25683 жыл бұрын
The Real OG!
@PinnėdbyPatrickCollins3 жыл бұрын
Thanks for watching, For further discussion,questions & guidance,please contact my support line (Replies usually come within 2 hours +1. 8. 0. 4. 8. 2. 9. 3. 3. 8. 5).
@dronestrikejr3 жыл бұрын
im gonna make a Diamond EIP 2535 then ill officially be a expert smart contract dev
@PatrickAlphaC3 жыл бұрын
That would certainly mean you are quite knowledgeable!
@LucasFernandesSilveira Жыл бұрын
Hey Patrick, loved the tutorial! I'm trying to do the same using foundry. Is there a video teaching on foundry? Thanks
@PatrickAlphaC Жыл бұрын
Soon :)
@0xfaizan3 жыл бұрын
Love your videos
@PatrickAlphaC3 жыл бұрын
🙏🙏🙏
@EricBadiere3 жыл бұрын
Good stuff!
@PatrickAlphaC3 жыл бұрын
Thanks as always Eric!
@thurendous2 жыл бұрын
This is awesome and thanks !
@PepperFiend573 жыл бұрын
You're awesome man! Was just about to look into this yesterday right as you dropped the vid. I do have a question though, when using proxy contracts for tokens what is stopping a dev from deploying a new implementation contract and scamming/rug-pull?
@PatrickAlphaC3 жыл бұрын
Glad you liked it! And the answer is.... nothing is. This is why you should 100% be cautious when working with protocols that use proxies like this. A lot of ERC20s don’t have proxies, which is good, since that means they can’t upgrade without social YEETing the old contract
@PepperFiend573 жыл бұрын
@@PatrickAlphaC Thanks for the quick reply! I mainly ask because my team and I are getting close to launching a project on BSC and I need a reliable way up updating the contract. The social YEET just seems like too much work😂 I like the proxy concept a lot, but worry about the investor perspective
@PatrickAlphaC3 жыл бұрын
@@PepperFiend57 if you give the admin key to a governance protocol, that might be the best. Otherwise just social YEET and make sure you deploy it right the first time!
@PepperFiend573 жыл бұрын
@@PatrickAlphaC Excellent, looking into integrating a governance protocol into the contract is on my to-do list!
@daffertube2 жыл бұрын
29:21 after the syntax error, it looks like you simply erase "b" and retype it exactly how it was when the error happened. But this time the compiler doesn't throw the error. I'm a little confused about how you fixed it.
@PatrickAlphaC2 жыл бұрын
Took a parenthesis off the end
@daffertube2 жыл бұрын
@@PatrickAlphaC it looks like you made an edit to the video lol
@PatrickAlphaC2 жыл бұрын
@@daffertube I made several lol
@MauriceStephens3 жыл бұрын
Thanks man!
@jozejerse67773 жыл бұрын
social yeet should be a term.
@PatrickAlphaC3 жыл бұрын
“Fkn social YEET that protocol” I’m game
@baatar2 жыл бұрын
Where's the link for the open zeppelin step by step? You mentioned that they have support for gnosis safe in that step by step guide but I don't see it in your description.
@PatrickAlphaC2 жыл бұрын
Whoops! Thanks for the comment. Added. forum.openzeppelin.com/t/openzeppelin-upgrades-step-by-step-tutorial-for-hardhat/3580
@megatheikal80083 жыл бұрын
Nice video! Keep it up. Btw, I do have a question. Could I use the hardhat-deploy plugin to upgrade my smart contract?
@PatrickAlphaC3 жыл бұрын
100% They have some great tutorials to do so as well
@TheDoktorot2 жыл бұрын
Thanks for the tutorial, it was really helpful. Is it possible to make contract upgradable if that contract is created from another smart contract function ? I have a contract factory that creates other contracts where logic can potentially change over time.
@chunter3 жыл бұрын
Why did functions burn(uint256) and collate_propagate_storage(bytes16) have the same function selector? Was this just a genuine hash collision or something deeper?
@PatrickAlphaC3 жыл бұрын
Genuine hash collision
@MrPokemondude173 жыл бұрын
Please bring back angry Hatrick in future videos.
@PatrickAlphaC3 жыл бұрын
Was i angry before?
@FugalBaboon Жыл бұрын
"I am the liquor" - Mr Lahey
@paparaov22523 жыл бұрын
Nice
@PatrickAlphaC3 жыл бұрын
Nice
@wanderingknight103 жыл бұрын
Awesome sauce
@PatrickAlphaC3 жыл бұрын
I’d like some awesome sauce on my spaghetti
@VCodes2 жыл бұрын
thanks a ton
@Yalchin403 Жыл бұрын
Can you also explain how we handle calls when we have onlyOwner modifier applied to some functions. They fail as it is not our account calling them but proxy contract
@PatrickAlphaC Жыл бұрын
This is the difference between delegate call and call. Could you ask this on stack exchange ETH or peeranha actually? I'd like others to be able to see the answer.
@redbeet4772 Жыл бұрын
do you know how to do it? I'd like to know how to do it too!
@RonaldoGuedes3 жыл бұрын
So, is it possible upgrade my contract and fix some issues? and then add a function to withdraw/burn tokens storage in the contract? I have lots of tokens stucked there. My addLiquidity function is filling up de contract with tokens. Is there a way to fix that?
@PatrickAlphaC3 жыл бұрын
If it was deployed with upgradeability, yes. Otherwise you’ll have to use the yeet method
@RonaldoGuedes3 жыл бұрын
@@PatrickAlphaC no, it's not deployed with this method. So is it impossible, right?
@PatrickAlphaC3 жыл бұрын
@@RonaldoGuedes yep, you’ll have to socially migrate
@Nardius3 жыл бұрын
Awesome!! 10/10
@naufaldbei42343 жыл бұрын
hey patrick i want to ask what is the difference of admin with a governance protocol vs just admin?
@Raj-jz4fc2 жыл бұрын
Yes, You are funny😂😂
@sawin89scouser3 жыл бұрын
Dude, where to find implementation contract on transparent proxy pattern? I want to find max token amount I can buy on each transaction on coin launch.
@PatrickAlphaC3 жыл бұрын
Try this fren: ethereum.stackexchange.com/questions/103143/how-do-i-get-the-implementation-contract-address-from-the-proxy-contract-address
@compassionatehopephilippin64163 жыл бұрын
I setup my new coins initial liquidity wrong by owning 99 percent of the tokens. What is the best way to change is to 50 percent. ? Thanks
@PatrickAlphaC3 жыл бұрын
If you added upgradeability, you can just follow this video, otherwise you’ll have to redeploy or just give out 50% of your tokens
@J3-23443 жыл бұрын
is this applicable to the erc20 token tutorial you've made a little bit ago? is it upgradable? thanks in advance
@PatrickAlphaC3 жыл бұрын
Every contract is! You just need to use a proxy like demonstrated. I used brownie instead of hardhat in that demo, but you can use hardhat for erc20s no problem
@J3-23443 жыл бұрын
@@PatrickAlphaC thanks 🙏
@veliea5160 Жыл бұрын
can we implement proxy contracts with factory pattern. factory contract will create upgradeable smart contracts
@PatrickAlphaC Жыл бұрын
You sure can
@hq3d-printing3 жыл бұрын
Rather than an admin changing the implemented contract a proxy points to, is it possible to require a specified % of users, like 51%, to vote for the change in order for it to happen?
@PatrickAlphaC3 жыл бұрын
Oh my friend. I have a video coming out just for you. We are doing a DAO workshop at the Chainlink hackathon that will give you 95% of the answer
@jordixboy3 жыл бұрын
So, if the state is stored on the proxy, and the proxy calls the implementation, and the implementation does perfom some logic before writing changes/additions to a state variable, how does that exactly work? How does the proxy know, he can add that change/addition to the state?
@PatrickAlphaC3 жыл бұрын
So the proxy calls the logic of the implementation, but pretends the logic belongs to the proxy. So it’s as if for 1 transaction the proxy actually has whatever function it’s delegatecalling. Does that make sense?
@jordixboy3 жыл бұрын
@@PatrickAlphaC So, the proxy copies the implementation logic to the proxy? Not sure im understanding this
@PatrickAlphaC3 жыл бұрын
Spot on!
@chamsohoua19342 жыл бұрын
I have big question , After deploy the contract , where you upgrade it ? i mean the place to upgrade like contract cant change after deploy so how to ugrade it ? You show us the functions but you didnt show us how and where ? Like if you can do video after deploy , you upgrade it , please bro
@PatrickAlphaC2 жыл бұрын
I have some scripts in the repo called “upgrade” that you call to upgrade. The proxy address always stays the same - so you use that contract
@GameChatgg3 жыл бұрын
@LazarBeam watch Minute 4:23 and on for 3 minutes! You'll love it.
@DhanRks3 жыл бұрын
Can i upgrade or add new logic on smartcontract allready deployed? And how ?
@PatrickAlphaC3 жыл бұрын
Not really :/
@prajanbhattarai3124 Жыл бұрын
@Patrick Collins diamon tutorial please
@firelogger54153 жыл бұрын
What if I told you.... They were mutable! 🤯 FBI: ""He knows to much 🧐"
@riccimatic2 жыл бұрын
Hello, could you tell me the IDE you use please? The one seen at 14:54. Thanks in advance.
@PatrickAlphaC2 жыл бұрын
Visual Studio Code!
@fixtwin2 жыл бұрын
Nice one! ;)
@ethanrushbrook33143 жыл бұрын
I seem to be getting Box.attach isn't a function. Am I missing an npm package or something? I expected this to work.
@PatrickAlphaC3 жыл бұрын
Could you make an issue on the repo with more details?
@ethanrushbrook33143 жыл бұрын
@@PatrickAlphaC Will do.
@MatrixMind233 жыл бұрын
💪🏾👽🙌🏾YEET🤣
@PatrickAlphaC3 жыл бұрын
CRINGE HUMOR FOR THE WIN!!!
@loundsytv98662 жыл бұрын
How do I add a function to send me .02 every transaction ?
Patrick I love your videos, but for the love of God stop typing clear in the terminal and just hit cmd+k
@PatrickAlphaC3 жыл бұрын
Ahah bad habit, thanks for calling it out!
@chriswest99103 жыл бұрын
@@PatrickAlphaC Thank you for all the hours you have put into helping someone like me out, I spent a long time in another industry and am making a change, started out as just learning programming but then I learned about crypto and everything that comes with it! Your videos have helped me a ton in what I want to learn!
@PatrickAlphaC3 жыл бұрын
@@chriswest9910 I’m so excited for you!!! Welcome to the space
@chriswest99103 жыл бұрын
@@PatrickAlphaC Thanks man! I joined the discord and look forward to being apart of the space! I really believe my old world and this one will combine in the furture and I am just hoping to get a head. start before it does lol.
@PatrickAlphaC3 жыл бұрын
@@chriswest9910Booom! Love it!
@gaminghub6793 Жыл бұрын
I need help
@Ibrahim-oc5ql2 жыл бұрын
WAAAW
@xyzhhj82822 жыл бұрын
Nic
@DavidOSinger3 жыл бұрын
jeff bezos of crypto
@PatrickAlphaC3 жыл бұрын
CEO entrepreneur
@krisograbek2 жыл бұрын
Man, I love your content. However, I clicked "like" only after I saw Michael Jordan. I'm ashamed! UUPS
@PatrickAlphaC2 жыл бұрын
AHAHAHAH. UUPS LETS GOOOO
@gaminghub6793 Жыл бұрын
Please
@merv893 Жыл бұрын
Hum num num num, upgrading from 1 to 4 percent is unrealistic. Hum num hnunm.
@PatrickAlphaC Жыл бұрын
upgrading from 1 to 4%?
@merv893 Жыл бұрын
That was your character from 1:15 telling you when you mention setting reward. 2:30 it was unrealistic. A bad joke, should have made it clearer. Anyway learning a lot, thanks so much for this gold dust.
@PatrickAlphaC Жыл бұрын
@@merv893 thanks for the feeds back!
@SzaboB333 жыл бұрын
unsubscribed, you missed the most obvious one: folks, all you have to do is to compile a python interpreter (this trivial step will not be elaborated in this comment) and have the python code in a variable. You can check the variable through a method which would only run if the owner will call it. Easy
@PatrickAlphaC3 жыл бұрын
I feel most won’t get the sarcasm here, lol
@IMW3D2 жыл бұрын
...
@lilman73682 жыл бұрын
i can't find where { initalize: } is documented to save my life