Member Login - User Registration - Set as Homepage - Add to Favorites - Website Map Solidity, Blockchain, and Smart Contract Course – Beginner to Expert Python Tutorial - Ep101!

Solidity, Blockchain, and Smart Contract Course – Beginner to Expert Python Tutorial - Ep101

Time: 2025-07-11 11:50:02 Source: Codora.ai Author: ai Reading: 106 times
to that one as well so if we'vedone this correctly and geoffrey hinton warningswe hit refreshmetadata on this test nest. open C.Oand we do a little refresh here we cannow see our St Bernard which isfantastic and then if we change thisfrom 0er to one since I've deployed twoand I refresh this one's metadata andthen refresh the page we can now see thePug as well again just keep in mindsometimes the refreshing metadata doestake some time and you might have towait up to 20 minutes but for allintents and purposes we have justdeployed our nfts given them token yourueyes that aren't around centralizedservers we can now see them on an nftMarketplace like openc you can let out abig sigh of relief because you just didsomething fantastic that not a lot ofother Engineers can do you should beincredibly proud of yourself at thispoint let's take a minute go back oversome of the new things that we'velearnedhere when deploying your smart contractson chain we all know that those smartcontracts are immutable or unchangeablebut what if I told you that they weremutable well technically I wouldn't becorrect however smart contracts actuallycan change all the time when peopletransfer tokens when people stake in acontract or really do any type offunctionality those smart contracts haveto update their balances and updatetheir mappings and update theirvariables to reflect this the reasonthat they're immutable is that the logicitself never changes and will be onchain like that forever so technicallyyes once they are deployed they areimmutable and this is actually one ofthe major benefits of smart contracts inthe first place that nobody can tamperwith or screw with our smart contractsonce we deploy them however this can bean issue if for example we want toupgrade our smart contract or protocolto do more things or we want to fix someglaring bug or issue that we have noweven though we can't change the specificcode that's been deployed to an addresswe can actually do a lot more than youthink we're going to explain thedifferent methodologies behind upgradingyour smart contracts and then we'regoing to show you how to do it now atfirst glance you might be thinking ifyou can upgrade your smart contractsthen they're not really immutable thenand in a way you'd be right so whenexplaining kind of the differentphilosophies and patterns that we canuse here we do need to keep in mind thephilosophies and decentralizationimplications that each one of thesepatterns have as they do all havedifferent advantages and disadvantagesand yes some of the disadvantages hereare going to affect decentral so we needto keep that in mind and this is whyit's so important that before you goahead and jump in and start deployingupgradeable smart contracts youunderstand the trade-offs we're going tolook at three different ways to upgradeyour smart contract the not reallyupgrading method the social AKAmigrating method and then the methodthat you're probably here for which isproxies so let's talk about the notreally upgrading method or theparameterization method or whatever youwant to call it this is the simplest wayto think about upgrading your smartcontracts and it really isn't upgradingour smart contracts because we can'treally change the logic of the smartcontract whatever logic that we'vewritten is there we also can't add newstorage or state variables so this isreally not really upgrading but it issomething to think about upgrades isjust parameterizing everything whateverlogic that we've deployed is there andthat's what we're interacting with thisfunction means we just have a wholebunch of Setter functions and we canupdate certain parameters like maybe wehave a reward parameter that gives out atoken at 1% every year or something likethat maybe we have a set of functionthat says hey update that to 2% orupdate that to 4% it's just a set offunction that changes some variable nowthe advantages here are obviously thisis really simple to implement thedisadvantage is that if you didn'tdidn't think of some logic or somefunctionality the first time youdeployed their smart contract that's toobad you're stuck with it you can'tupdate the logic or really updateanything uh with the parameterizationAKA not really method and the otherthing you have to think about is who theadmins are who has access to theseSetter functions to these updatingfunctions if it's a single person guesswhat 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 AA Used before you call a functionyou actually check some contractregistry that is updated as a parameterby somebody 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 Trill bitshas actually argued that if you deployyour contract 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 looking at it again now if Iwere to deploy a smart contract and Iwanted to upgrade it with thisphilosophy in mind that hey we got tokeep it immutable we could use thesocial Yeet method to actually upgradeto new versions the social Yeet methodor the migration method is just when youdeploy your new contract not connectedto the old contract in any way and bysocial convention you tell everybody heyhey this new contract this new one thatwe just imployed yeah this is the realone now

(Editor in charge: solidity)

Related content
  • Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep242
  • [Hindi (auto-generated)] Machine Learning FULL Course with Practical (10 HOURS) _ Learn Free ML in 2025 _ Part-1 - Ep25
  • Harvard CS50’s Artificial Intelligence with Python – Full University Course - Ep94
  • [Hindi (auto-generated)] Machine Learning FULL Course with Practical (10 HOURS) _ Learn Free ML in 2025 _ Part-1 - Ep67
  • Solidity, Blockchain, and Smart Contract Course – Beginner to Expert Python Tutorial - Ep100
  • Generative AI Full Course – Gemini Pro, OpenAI, Llama, Langchain, Pinecone, Vector Databases & More - Ep3
  • [Hindi (auto-generated)] Machine Learning FULL Course with Practical (10 HOURS) _ Learn Free ML in 2025 _ Part-1 - Ep38
  • Generative AI Full Course – Gemini Pro, OpenAI, Llama, Langchain, Pinecone, Vector Databases & More - Ep164
Recommended content
  • Solana Developer Bootcamp 2024 - Learn Blockchain and Full Stack Web3 Development - Projects 1-9 - Ep14
  • Harvard CS50’s Artificial Intelligence with Python – Full University Course - Ep16
  • Generative AI Full Course – Gemini Pro, OpenAI, Llama, Langchain, Pinecone, Vector Databases & More - Ep149
  • Harvard CS50’s Artificial Intelligence with Python – Full University Course - Ep29
  • Solana Developer Bootcamp 2024 - Learn Blockchain and Full Stack Web3 Development - Projects 1-9 - Ep63
  • Harvard CS50’s Artificial Intelligence with Python – Full University Course - Ep89