Current location: Home > php > Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep269 Text
Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep269
Time: 2025-07-11 11:43:06 Source: Codora.ai Author: cpp Reading: 784 times
otherthing you have artificial intelligence courseto think about is who theadmins are who has access to theseSetter functions to these updatingfunctions if it's a single personguess what you have a centralized smartcontract now of course you can add agovernance contract to be the admincontract of your protocol and that wouldbe a decentralized way of doing this sojust keep that in mind you can do thismethod just need a governance protocolto do so another example of this mightbe a contract registry and this issomething actually that early versionsof a used before you call a function youactually check some contract registrythat is updated as a parameter bysomebody and you get routed to thatcontract and you do your call thereagain this really doesn't allow us tohave the full functionality of upgradeshere you can argue that this registry isa mix of one of the later versions butfor all intents and purposes thisdoesn't really give us that flexibilitythat we want for our upgrades but somepeople might even think that upgradingyour smart contract is ruining thedecentral and one of the things thatmakes Smart contracts so potent is thatthey are immutable and that this is oneof the benefits that they have so thereare some people who think that youshouldn't add any customization or anyupgradeability you should deploy yourcontract and then that's it trb bits hasactually argued that if you deploy yourcontract knowing that it can't bechanged later you take a little bitextra time making sure you geteverything right and there are oftenless security vulnerabilities becauseyou're just setting it forgetting it andnot looking at it again now if I wantedto upgrade a smart contract with thisphilosophy in mind the philosophy that Ido want to keep my smart contractsimmutable we can instead use the socialmigration method which I previouslycalled the Yeet method and now I thinkit's less funny so we're just going tostick with social migration the socialYeet method or the migration method isjust when you deoy your new contract notconnected to the old contract in any wayand by social convention you telleverybody hey hey this new contract thisnew one that we just deployed yeah thisis the real one now and it's just byConvention of people migrating and overinto using this new one that the upgradeis done hence my slang name of socialYeet because you Yeet the first one outof the way and you move to the secondone I think I'm funny this has theadvantage of truly always saying heythis is our immutable smart contract andthis is our new one this is really thetruest definition of a mutable becausesince you give it no way of beingupgraded in place then if somebody callsthat contract in 50,000 years in thefuture it'll respond exactly the sameanother huge disadvantage here is thatyou have to have a totally new contractaddress so if you're an erc20 token forexample you have to go convince all theexchanges to list your new contractaddress as the actual address keep inmind that when we do this we do have tomove the state of the first one over tothe second one so for example if you'rean ERC token moving to a new version ofthat ERC token you do have to have a wayto take all those mappings from thefirst contract and move it to the secondone obviously there are ways to do thissince everything is on chain but if youhave a million transfer calls I don'twant to have to write the script thatupdates everyone's balance and figuresout what everyone's balance is just so Ican migrate to my new version of thecontract so there is a ton of socialconvention work here to do trailer bitshas actually written a fantastic blog onupgrading from a V1 to a V2 or Etc withthis Yeet methodology and they give alot of steps for moving your storage andyour state variables over to the newcontract so Link in the description ifyou want to read that now let's get toour big ticket item so in order to havea really robust upgrading mentality orphilosophy we need to have some type ofmethodology or framework that can updateour state keep our contract address andallow us to update any type of logic inour smart contracts in an easy way whichleads us to our big ticket item theproxies what's our big ticket itemproxies people proxies proxies are thetruest form of upgrades since a user cankeep interacting with the protocolsthrough these proxies and not evennotice that anything changed or even gotupdated now these are also the placeswhere you can screw up the easiestproxies use a lot of low-levelfunctionality and the main one being thedelegate call functionality delegatecall is a low-level function where thecode in the Target contract is executedin the context of the calling contractand message. sender and message. valuealso don't change so you understand whatdelegate call means now right great andin English this means if I delegate calla function in contract B from contract aI will do contracts B's logic incontract a so if contract B has afunction that says hey store this valuein a variable up top I'm going to storethat variable in contract a this is thePowerHouse and this combined with thefall bang function allows us to delegateall calls through a proxy contractaddress to some other contract thismeans that I can have one proxy contractthat will have the same address foreverand I can just point and Route people tothe correct implementation contract thathas the logic whenever I want to upgradeI just deploy a new implementationcontract and point my proxy to that newimplementation now whenever a user callsa function on the proxy contract I'mgoing to delegate call it to the newcontract contract I can just call anadmin only function on my proxy contractlet's call it upgrade or something and Imake all the contract calls go to thisnew contract when we're talking aboutproxies there are four pieces ofterminology that we want to keep in mindfirst is the implementation contract theimplementation contract has all of ourlogic and all the pieces of our protocolwhenever we upgrade we actually launch abrand new implementation contract theproxy contract proxy points to whichimplementation is the correct one androutes everyone's calls to the
(Editor in charge: go)
Latest content
- ·XRP Ripple LIVE Senate Brad Garlinghouse - FROM WALL STREET TO WEB3 - Martyn Lucas Investor - Ep26
- ·[Hindi (auto-generated)] Machine Learning FULL Course with Practical (10 HOURS) _ Learn Free ML in 2025 _ Part-1 - Ep65
- ·[Hindi (auto-generated)] Machine Learning FULL Course with Practical (10 HOURS) _ Learn Free ML in 2025 _ Part-1 - Ep27
- ·Generative AI Full Course – Gemini Pro, OpenAI, Llama, Langchain, Pinecone, Vector Databases & More - Ep196
- ·Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep65
- ·Generative AI Full Course – Gemini Pro, OpenAI, Llama, Langchain, Pinecone, Vector Databases & More - Ep114
- ·Generative AI Full Course – Gemini Pro, OpenAI, Llama, Langchain, Pinecone, Vector Databases & More - Ep1
- ·Artificial Intelligence Full Course _ Artificial Intelligence Tutorial for Beginners _ Edureka [DownSub.com](1).txt - Ep21
- ·Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep174
- ·Generative AI Full Course – Gemini Pro, OpenAI, Llama, Langchain, Pinecone, Vector Databases & More - Ep180
Hot content
- ·Solidity, Blockchain, and Smart Contract Course – Beginner to Expert Python Tutorial - Ep35
- ·Artificial Intelligence Full Course _ Artificial Intelligence Tutorial for Beginners _ Edureka [DownSub.com](1).txt - Ep18
- ·Artificial Intelligence Full Course _ Artificial Intelligence Tutorial for Beginners _ Edureka [DownSub.com](1).txt - Ep22
- ·Generative AI Full Course – Gemini Pro, OpenAI, Llama, Langchain, Pinecone, Vector Databases & More - Ep153
- ·Solidity, Blockchain, and Smart Contract Course – Beginner to Expert Python Tutorial - Ep113
- ·Generative AI Full Course – Gemini Pro, OpenAI, Llama, Langchain, Pinecone, Vector Databases & More - Ep3
- ·Generative AI Full Course – Gemini Pro, OpenAI, Llama, Langchain, Pinecone, Vector Databases & More - Ep42
- ·Harvard CS50’s Artificial Intelligence with Python – Full University Course - Ep75
- ·Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep213
- ·[Hindi (auto-generated)] Machine Learning FULL Course with Practical (10 HOURS) _ Learn Free ML in 2025 _ Part-1 - Ep68