Current location: Home > solidity > Solidity, Blockchain, and Smart Contract Course – Beginner to Expert Python Tutorial - Ep35 Text
Solidity, Blockchain, and Smart Contract Course – Beginner to Expert Python Tutorial - Ep35
Time: 2025-07-11 11:53:35 Source: Codora.ai Author: php Reading: 987 times
our outputlist we're going to get an ABI outthat's incredibly important which we'vetalked about before we're going to getsome metadata we're going to get an evmdoitecode we going to get an evm do openai gemini courseSourcemap that's pretty much it again I'm notgoing to go too deep into what thisoutput selection and what these settingsare actually doing but if you want tolearn more you can go to the homepage ofpyk X scroll down to the documentationsection and read more in the docs onwhat you can actually put in all thedifferent features that this actuallyhas the last thing we're going to do iswe're going to add a Suk version orsolidity version version we're going tosaysulk version equals and then we'llchoose the version that we want to useso we'll put in0.6.0 and then what we should be able todo is print out this compiledso and we'll see just a whole bunch ofreally really lowlevel stuff so let's goahead and run this we'll run pythondeploy pi and you'll see we get thismassive object here which has has awhole bunch of basically unreadablepieces but this is a lot of the low-lcode that actually gets compiledwhenever we use a compiler in remix ornow in Python remix actually does theexact same thing once we compilesomething on remix you can actually copythe bite code if you hit this littlecopy button and copy the bite code andcome back to your vs code and create anew file a keyboard shortcut to create anew file is command n and we pasteeverything we can see there's a wholebunch of stuff in here these op codesare the low-level code that our contractis actually doing that actually governshow this code works this is what ourwritten code is getting compiled down toso solidity can actually read it andunderstand what's going on you'll alsosee this thing called ABI which is inremix and we're even going to Output itright here we have this ABI thing now inremix if you hit copy the button on theABI come back create a new file paste ityou can see we have this long Jsonobject this is that application binaryinterface that we've talked about somuch you can see that it's actuallydescribing all the functions andvariables so for example we have afunction called add person and it takestwo parameters a name and a favoritenumber so we have this input section forthe function and we have this sectionthat describes what the function can isactually doing so the name is AD personit doesn't have a return type it's non-ppayable and it's a function and we cansee that for pretty much everything inhere this is the lowest digestible wayto say hey here's where all thefunctions are here's what the parametertypes are here's what the return typesare going to be and everything like thatso we're going to close it out for nowthough so this is fantastic we've nowcompiled our solidity typically Iusually also like to Output it and printit out to a file as well so to do thatwe'll do withopen compiled code.Json and this time instead of readingwe're going to wrun right and we'll callthis as file as well instead of doingfile. right we're going to do what'scalled adjacent dodump piled Soul file we do need ofcourse to import Json also just a note Iknow it says we're using sulk here butplease use sulk X still I ended upfilming a little bit of both versions soI did a little bit of a a mix and matchbut please use sulk X even if you seeSuk what this line is going to do isit's going to take our compile Soul Jsonvariable and just dump it into this filehere but it's going to keep it in theJson syntax so it's still going to beJson e so now if we run python deploypiy we'll see we have a new file in herecalled compile code. Json the otherreason that I wanted to do this wasbecause if I hit contrl s it actuallyformats this into a readable way nowagain we can go into these settings herewe can look up Jsonand we can do enable Json formatter andthis will automatically make it so thatwe format this Json so it's a lot morereadable again the reason I like toOutput this is because this ABI is soimportant and we're going to use it somuch that I like to kind of be able tosee it and and read through it reallyquickly the rest of this lower levelstuff like evm and bite codes and opcodes we don't really work with so muchhowever as you learn more and more aboutsolidity you'll probably see more andmore of op code so if you really want tolearn a lot of really lowlevel stufffflook into op codes but for the purposeof this tutorial we're not going to begoing too deep into it okay awesome sowe've compiled our solidity we've evenstored our solidity code to thiscompiled code. Json file now what do wedo we probably want to deploy it andtest it out so how do we actually dothat well first we actually have to getthe bite code we need the bite code ofthe file so that we can actually deployit so we're going to do bitecode equals compiledSoulcontracts simple storage.Soul simplestorageevm whitecode object all right great there we goso now we have our bite code we alsoneed to get our ABI so we need to getthe API so what we're doing here whenwe're typing in all these words likecontract simple storage simple storageis we're walking down the Json here sowhen we say we want to get the bite codein this compiled solidity Json we wantto go to contracts simple storage simplestorage evm bite code so contractsinside this contracts Json you got to goto simple storage inside this simplestorage. Soul there's another simplestorage inside that there's an AI butthat's not what we want we want the evmso we're going to scroll down aha we'regoing to get the evm then what do wewant then we want the bite code greatand then we want the object so this isthe bite code of our contract it's thereally lowlevel
(Editor in charge: ai)
Latest content
- ·Web3 Developer in 2024 Roadmap_ Solidity, Smart Contract, and Blockchain Development [Full Course] - Ep34
- ·Bloodhound Q50 Tells His Life Story (Full Interview) - Ep1
- ·Solidity, Blockchain, and Smart Contract Course – Beginner to Expert Python Tutorial - Ep59
- ·Full interview_ Donald Trump details his plans for Day 1 and beyond in the White House - Ep3
- ·Solana Developer Bootcamp 2024 - Learn Blockchain and Full Stack Web3 Development - Projects 1-9 - Ep53
- ·Solidity, Blockchain, and Smart Contract Course – Beginner to Expert Python Tutorial - Ep91
- ·Artificial Intelligence Full Course _ Artificial Intelligence Tutorial for Beginners _ Edureka - Ep18
- ·Full interview_ Donald Trump details his plans for Day 1 and beyond in the White House - Ep4
- ·One On One Interview With Abisoye Bello _ Host_ Patricia Nkwane - Ep9
- ·GenAI Essentials – Full Course for Beginners - Ep148
Hot content
- ·Solana Developer Bootcamp 2024 - Learn Blockchain and Full Stack Web3 Development - Projects 1-9 - Ep15
- ·GenAI Essentials – Full Course for Beginners - Ep37
- ·GenAI Essentials – Full Course for Beginners - Ep176
- ·Godfather of AI_ I Tried to Warn Them, But We’ve Already Lost Control! Geoffrey Hinton - Ep13
- ·GenAI Essentials – Full Course for Beginners - Ep171
- ·GenAI Essentials – Full Course for Beginners - Ep55
- ·Solidity, Blockchain, and Smart Contract Course – Beginner to Expert Python Tutorial - Ep5
- ·Solidity, Blockchain, and Smart Contract Course – Beginner to Expert Python Tutorial - Ep86
- ·GenAI Essentials – Full Course for Beginners - Ep126
- ·GenAI Essentials – Full Course for Beginners - Ep189