Speedrunning Ethereum Development - Austin Griffith - [Toronto Ethereum Developers Meetup]

ETH Toronto Talks · 28 Oct 2021 · 1:19:25

Austin Griffith of the Ethereum Foundation explains what it takes to start learning Ethereum development at the Toronto Ethereum Developers Meetup. He walks through scaffold-eth, a tool for rapid experimentation with Solidity that adapts a frontend to a developer's smart contracts. He also goes through his Ethereum Dev Speed Run blog post, which lays out challenges that help new developers learn to build in the ecosystem quickly.

Speakers

Topics

From ETH Toronto Talks, hosted by ETH Toronto.

Transcript

our guest of honor today austin griffith where do i get started with austin he is someone who wears an infinite number of hats according to his website www.austingriffith.com you should check it out he quotes builds lots of random things end quote and that's certainly not a lie if you scroll down his website you'll see that austin expresses prolific interest in building and supporting many things from developer tools to an automated beer brewing rig to being a dad to running his own youtube channel to helping develop ethereum meta transactions to releasing his very own art project on one of my personal favorite generative art platforms called eath block art if you guys like nfts and generative art in

the style of art blocks definitely go check it out um he's currently at the ethereum foundation where he does all manners of things including developer onboarding mentoring and tooling so if you're in this meetup and you're considering making the leap of faith into ethereum development you are in the right place this is the meet up for you austin is your guy um so without further ado i'd like to you know invite austin up to this stage officially and kind of take it away and i will also enable my sharing word thanks tim that's a that that was an in-depth introduction and and and pretty accurate like a lot of people like my my introduction sometimes is is like a patched together thing but

that was that was that was very accurate word so thank you for having me yeah and and really like uh you yeah however folks want to ask questions like i uh i jam through like a mansplain session of like one hour straight this morning and i can share that link uh here so this would be like a super super intro and i'll do an intro now just in case but but that's like that's another one uh uh to to look through that might be more in depth uh it'd be cool here if we could kind of let the group steer and kind of ask questions as we go i think i'll just show off the tool first sort of like get

right into the middle of the onion of like my work and then we can kind of like work our way out but yeah kind of just discover whatever fun stuff comes along so let me grab a screen share dope here we go here we go okay so scaffold eat is like a dap template and it like the the key the key piece that i wanted to do is have it so you can make a small change to your smart contract and then you can yarn deploy and it's going to move that it's going to compile and deploy your app to the front end we'll see more exclamation point show up over here does that make sense so let's just do that again let's create like a uint256

public counter and set it equal to five and and while we're deploying that and seeing it update let's just build another function and solidity here called increment and we'll make it public and we'll do counter plus plus right and when we saw our counter show up there you can kind of see these iterations right the counter's there now once this compiles and deploys we should have like a little increment button see how that shows up okay so this is this is kind of like the center of the onion here this this is this tool is a full dapp template that you install with a couple commands and everything works out of the box it has hard hat on the back end and then it has react on the front end and it allows you

to iterate quickly on your solidity try try things out test your assumption assumptions when you're like how do i want to store this is going to be a mapping or a struct or a mapping obstruct or an array and do i want to use a modifier here all sorts of like in-depth solidity stuff this is a good way to test it right here where you can just paste in your contract you can import what you need and then you can tinker with it over here so let's get to the tinkering part we don't have any funds right now if i hit increment it's going to tell me i don't have any gas right so you can grab funds from the faucet with that that big annoying call to action and you should get some funds and now i can increment uh that that counter so what's going on

here there's no meta mask dialogues popping up right what's happening when i click this increment button well the the uh the theory with local development is you don't need metamask to be popping up and be super safe and be like hey are you sure you want to confirm this transaction and a lot of times if you have meta mask locally while you're developing you're going to run into all sorts of problems where every time you start and stop this hard hat node the nonce of the account is going to reset you're going to have to get into meta mask and reset your account you'll you'll have things where the chain id isn't right there's just a ton of like gotchas that i mean it's it's it's really garbage when you start as a

as a web 2 person when you start in web 3 and you start trying to figure out how this works you just run into problems that it's just like what the hell why is this even a problem why am i even dealing with this and so scavoli tries to kind of have everything stacked up for you so you don't run into those weird those weird issues i see scaffold versus remix that's a good shout because like remix is totally like you can paste in some solidity and tinker with it right in the browser scaffold is very very similar i i had a coding challenge one time where it was me and this other dude i think it was i don't know maybe he was a cto from ave or something smart dude very smart dude and we our job was to like build an nft

that had a check-in system with an uh chain-link keeper and he went to riya or he went to remix and i went to scaffolding and he he beat me by 15 seconds it took us i mean it took about 20 or 30 minutes to build the thing and he beat me by 15 seconds to get it finally in and and so it's it's comparable but maybe slightly slower because there's some local build you know you have to do a yarn install and you you'll have to do let's just let's just look at the install real quick if i google scaffolding here what is that why am i seeing is that red is that red on everybody's screen or is this just on my screen yeah yeah

did i do that did i like notate something maybe i don't know whatever who cares as long as it's not like someone draws a dick we're good to go so so scaffolding basically you you do have to do some installation right you're gonna have to pull down a repo you're gonna yarn install and then yarn chain yarn start yarn deploy so you do have some like local stuff running and that overhead is gonna cost you maybe five or ten minutes to get all installed and ready to go so if you really like i guess if you're testing one thing in solidity maybe remix is gonna be faster and replit if you guys haven't seen that recently replied now has solidity uh let's see r-e-p-l-dot or ripple it.com you can now go so

and and i think you can create one that's uh solidity i think yeah yeah yeah yeah very excited about that it's it's also like this similar setup but in the browser and it's like so heartwarming to see some of the things that like scaffold these put together show up in this reply repo so also if you're doing quick iterations in the browser possibly you could you could also use replit but uh scaffold eath is a little bit slower but once you get it up there's a huge advantage here and that is that this this is this is tracked locally i can deploy locally i can track everything locally once once it's in the browser it's kind of a little bit wild and a little bit scary but also you have this whole front end that's going to come with this right and we'll get into the front end we'll

see these components a little bit more but it's sort of like you start tinkering around and in that competition the same way we we both built out the nft and he beat me by 15 seconds but all he ended up deploying was the smart contract to get it to work and i deployed the smart contract right behind him and then five minutes later i deployed an entire app where people could go to a url and they could mint the nft and it had a front end and it was out on surge so so there's there's a slight disadvantage here on time in terms of like getting it out the door quickly but a huge advantage that you'll have the whole thing locally and you can deploy a front end along with it sorry sorry for the huge tangent going

into a remix for scaffold okay so we're tinkering tinkering with our smart contract here um maybe just maybe for the noobs maybe i could do a few kind of like intro uh solidity things just to show off solidity as a language does anybody uh let me see if i can put on gallery for a second oh i can only get a few people okay there's not a lot of video here but uh is anybody against me doing like a little solidity intro if if a solidity intro is good maybe give me a thumbs up and i'll go from here all right no no medium medium thumbs up okay let's just do a little selection i asked in chat if you can talk about hard hat a little bit

okay i'm not very very familiar with that also great show okay so hard hat uh good call and please like uh like derail me so we can like talk through this stuff for sure so hard hat is your back end basically if we're thinking of this as a web 2 developer hard hat is a local blockchain and it runs like if you've used ganache before it runs like ganache where you've got a local node and every time i make a transaction over here uh a transaction happens on my local blockchain and a block is mined so it's mining a block for every single transaction and that allows like you get instantaneous transactions right i can make these transactions very quickly i'm noticing that's very different is that it looks like you're importing hard hat

into your solidity which i was never familiar doing with ganache that is a that is also a great question this is okay this is awesome i love like a more question bit driven so like i can mansplain for 45 minutes i think it's okay but going back and forth like this i think is a lot more powerful so this this is only so i can do this console log right here so you really don't need to import hard hat right because hard hat is just compiling right so really like this is this is basically the contract here and when i i've kind of lost some things when i yarn deploy there is this thing covering up stuff do you guys even see this window is it like a weird gray thing or do you not even see the window moving around okay we can see

the visual studio okay adam yeah dope okay so so uh yeah there we go we took that out right so this is just an extra little fun feature but let's dive into it and use it real quick so basically when i set the purpose it's going to do a console log right here in solidity we're doing a console log and that's one of the superpowers of hardhat it's it's built for help being more introspective into what's going on they do stack traces they do a bunch of and there's a big plug-in community where this is actually hard hat deploy which is a deployment system built by wigawag uh french dude worked on uh mandalas and uh some some other games but like it's got a good plug-in system

but basically like the tldr is hard hat is your blockchain and also there's 10 accounts that come with that and they're loaded up with cash so it's also that remember that call to action i had let's see let's bring up an incognito window not loogies we can talk about lugies later but let me bring up another so i'm going to go to local host but now i'm on incognito see how i get a different address here that burner's a little different let me close that bring it up again so we see it so i'm going to use the hard hat account and i'm going to send some money there we go that's a nice like pink one right when i hit this grab funds from faucet it basically does this it takes this address and goes to the faucet and says send me some funds you could even click

this pull this wallet up and this is like the first account of the hard hat node and i can even kind of paste that in there and send myself a whole bunch of money right so so your hard hat node comes with a blockchain that's auto mining blocks every time you make a transaction super good for like introspection and figuring out what's going on and getting a console log let's go let's go get that console log out of there so if i do hello so is the idea with the console log that it's some like some kind of syntactic sugar around an event or something like that and then the hard hat node or the hard hat cli is just like filtering on those events and and logging them to the console that was my question when i first saw this i think i was talking to franco

from hard hat and i said oh you guys did a little event trick and actually what they i think the way it works out and i am not a gig of brain like a disclaimer this is not edm and i am not a gigabrain uh i think what it is is actually since they rebuilt the evm they can they built their own kind of tools for logging in there so i think it's more at the evm level not at the event level it's a lower level thing that the hard hat guys built into hard hat cool does that make sense nice dog it looks like a scooby dog that's one of my great things yeah great dane that's what it's called a scooby dog okay so we've got our back end right

this is your hard hat node this allows you to make all your transactions uh you because of that hardhat node we have this account here in the bottom left that's like full of money let's zoom in on and talk about those burner wallets for a second right so you'll notice that i have a wallet in the top right i can connect in my meta mask right i can connect my meta mask here oh man typing in a password on oh man what are we doing and then it's just sitting there like what's it doing okay here oh here is here is a little uh a little sugar from scaffolding uh notice that i have localhost selected so so in my front end which is here

i have the local host network so you have this target network here so i have localhost selected and so everywhere in my app anytime i click on an address anytime i do anything network based it's going to go to the the local host block explorer if i was on rank it be it to go to the rink b block explorer but it also like checks your meta mask and gives you a nice dialog that says yo you're not on the right one and even gives you a nice little button so if i click this it's going to move my meta mask over to localhost so like every single dap that gets built needs to have that functionality in it and when i go to a hackathon and i and i talk to builders and i say you know you should use this it's going to like help you out there's

all this handy stuff they're like i don't need it i want to start from scratch eventually that guy has a user that accidentally spent made that money when he meant rink a b or accidentally screwed up and was on wasn't on main net and then that user has to put in a ticket and eventually add this feature to their dap if you use scaffolding you have that feature out of the box right so so there's a ton of handy stuff here that will just get your your app deployed quicker let's let's log out of metamasco since we're local i want to use that burner wallet i want to just be able to click and and behind the scenes it uses the private key to sign a transaction to to call that increment function on our smart contract and it lets me tinker with this increment like okay what

happens if we add a decrement function right and and that's minus minus and then we redeploy that thing what's going to happen on the overflow right testing our assumptions if it was pre-8 we would get an underflow since it's 8.0 we should get safe math built in so we should get an error right but the only the best way to test it is right here right we deploy it and we click decrement until we get to that zero and then we click it again and it tells us that it overflowed right and that overflow check fires right so much easier than writing a whole test suite not as scalable but this is quick and easy and it's helping me sort of figure out how i want to write my solidity and

i was able to just like throw a function in there and go tinker with it right similar to remix but then once we deploy we've got this full app kind of ready to go so let's take our counter out of here we kind of get what's going on um the the the way i recommend you learn let me just stop there and just we'll move on to learning solidity in a second but let me see if there's any questions uh from the room what's the story for deploying to a layer two kind of thing like you showed the main net in the test nets can you deploy like arbitrarily or something let's yeah let's uh let's set that as a goal too let's deploy something to uh some some weird network all right we we will do that by the end

of this how about that let's just set that as a goal deploy to some weird network and and we'll get there but basically it's a selector right same same thing that we're selecting there if we go look at our hard hat config there's going to be all these different networks if we want to go local optimism or we want to go to i don't even know what fuji avalanche is but someone pr it in if you would like to deploy to fuji avalanche and that's the thing is i i'm an evm maximalist right if this thing is evm compatible you basically have to just like pr in your network and then it's there and you can deploy to any of these simply by selecting you can do dash dash network or you can select your network here so there's two network selectors i

think we kind of we're kind of bouncing around here but this is where thinking of the satellite dishes this is the satellite that deploys so this deploys your smart contract and then in the front end this selects what what network you're looking at from your front end so you would deploy to some public network and then you'd move your front end to that network and that's all you have to do to switch networks a lot of a lot of apps have to like carve through and get everything right as soon as we put this on let's say rinkeby it's not going to be able to find the smart contract but watch this change from localhost to rinkeby and then when i click this it's going to take me to the rinkeby block explorer right so that one change changes your whole uh your whole front

end and it allows you to jump from evm compatible network to evm compatible network by just changing that one value so i we've got a goal deploy something to a weird network by the end of this are we going till 6 or 6 30 what's the how long should i run here uh it can it can be up to uh until 6 30 that's fine okay well let's we'll we'll see how far we can get definitely like when we're setting goals here i want to like make sure i pace myself correctly okay so uh let's just do a little let's just do a little dive into solidity just to get get some exposure and let me show you how i would learn solidity if you're thinking about learning so first of all uh if you're a web 2 developer i recommend i recommend

that you speed run ethereum i'm trying to meme this into into existence but if you google speed run ethereum there is this uh curriculum that i've put together after like hours and hours of mentorship sessions one-on-one trying to figure out like okay after all these sessions like how do i scale this thing like what if i had 40 people right now i had to have these sessions with how would i do it and i kind of just laid it into a medium article with a whole bunch of different challenges from a whole bunch of different repos but let's focus just on learning solidity for a little bit right if you're a decent programmer uh any and you look at the the primitives and data types they all basically look exactly what you think they are there's you know a u and eight

is going to be an unsigned integer that uses eight bits uh if we take that thing to 255 and then we try to increment it one more we'll see that that overflows at 255 right because you only have eight bits to cover it uh i'd paste it in and and run through it but i think we got it all ready with that counter you guys saw me do an overflow uh uh signed integers and then bools bools are obvious addresses are a little bit weird right you don't see an address with a hex string like that in a lot of other languages so let's tinker with that real quick so i can copy the address from my front end and let's just set up an address public we can call it owner it can be anything arbitrary but look at that i'm just going to paste that

address right in there kind of raw right but if we deploy that what we're going to see hopefully is this pink and purple guy is now the owner of this contract there it is yeah see how that worked so so these addresses are sort of like these first class these these primary data types where an address is like a user or an address is a smart contract right and you can do cool things like you can do owner.balance and you can do things like owner.transfer right so so that address is kind of like this object that you can interact with right and you can also do check this out you can do address this and that's the address of the smart contract and then you can do something like balance right so this would tell

you how much ease is stored in our contract at any moment right okay so so you've got you've got the primary data types it's not that hard like if you're a programmer if you can write a for loop in javascript if you can build a to-do list and react like solidity is is actually like super easy uh building complex smart contract systems very hard but putting together a smart contract that does like a to-do list or does uh you know a simple token or something like that is actually pretty easy so uh we've we've learned through our primary data types are primitive data types so just kind of learn through each of these uh topics and and and by

by going through them and learning what i mean is like you get in here and you kind of figure out oh okay i'm a programmer i get what's going on here there's this storage layer of my map and then there's some set that lets me set that mapping right and then let's see let's uh let's go ahead and save that and let's deploy it and see if it just works right if we just paste blindly does this work okay cool so now we have my maps and then we have a set right so if i check if i put my address into this mapping i get a zero back if i say let's set that to a hundred i set it and then if i go ask for it it's a hundred right so so mapping is

basically a primitive pointing to another primitive so given given any address there's an integer that goes with that address and what this is really good for is just like a balance right and then and then we we somehow we have this magic function that lets us set people's balance but let me use this as an example to get into one of the most powerful parts of solidity and it's a require statement it's it sounds if you're from javascript and you hear require you think maybe we're like importing something but it's more like assert it requires a certain condition right and this is this is really the power of smart contracts because a smart contract is like a vending machine it exists on thousands of machines all across the network it's

it's censorship resistant it's hella expensive to deploy it's hella expensive to talk to but anybody can get to it anybody can talk to it at any time they just need to have a little ether so think of this as a very public vending machine so these rules about when you can call what functions are very important right and so what we want to say is the message.sender which is which is the person entering the function like this is just a global variable that everyone knows when they're writing solidity message.sender it's it's the who right so we're going to require that the message.sender equals equals our owner oh no we don't have an owner anymore oh yeah we do here he is he's down here bring this bring this guy up here and this is some nasty code like i don't even have like the tabs are wrong i don't i don't know

it's gross but we so we have a mapping of balance and we have a set function that lets us set anybody's balance and then we have this function here that says only the owner can get to this part of the function so hopefully if we do this right only the owner and we'll just say not the owner and not the wanner let's just change it we got we got all evening okay there we go oh i closed it bring that back okay let's go ahead and deploy that and let's see so now the the way it's set up is not just anyone should be able to set this right let's bring in our bad guy again i like to i like to have these kind of two players and kind of think of this as like the adversarial person kind

of attacking and think of this as kind of like us and this is the safe user but like in the long run going back to the vending machine model going back to the massive multiplayer game like this is everyone right we're all jerks we're all adversarial we're all trying to take everyone's money and all we have to trust is this code and this code allows us all to coordinate right like without without this decentralized network allowing us to write this thin layer of code on top of it we wouldn't be able to to uh iterate and and to innovate on top of decentralization as fast this is kind of a superpower of ethereum you're like okay let's make it like this let's make it like this let's take 10 of it and send it to that guy let's put it on our price curve and make the price double

every every time it's purchased just like single lines of solidity create new financial mechanisms and it allows us to kind of iterate and try those things out going going down a heady path there okay let's let's bring it back let's bring it back okay so what do you know what the user is like you got a different user when you start up the different income you don't even know how did it do that okay so are you talking about the user in the top right here yeah so that is basically a burner wallet and it's generated for you on page load if i bring up like something awful like safari and i go to localhost it's going to give me a different user right so every user that lands here is getting a fresh see how that's pink guy

and this kind of peachy guy and this is kind of purpley guy and then if i do like an incognito window and i go to localhost i'm going to get yet another address right and so that's basically a private key in local storage don't send a lot of funds to it right but it's it's insanely valuable and easy for local development right this this dude has ten thousand dollars locally it's kind of like a third party but look at that i just like spun up four different users and now they're all like playing this game right uh let's check this dude's balance right let's let's let's try to set this dude so this this should fail here we go not the owner right none of these three should be able to set it but this dude here is the owner right so let's try

setting old peach peachy guys uh set this to a hundred right so we're hooking peachy guy up with a hundred balance and there we go the transaction worked right so now peachy guy even though he doesn't have any eath well he has enough eath for gas and stuff what we're checking is this arbitrary balance in our smart contract which is just what a token is right a token is just an a mapping of who owns what and a transfer function that lets people move it from place to place and there we go this dude has a hundred i don't know if you guys can see that a hundred uh uh whatever tokens whatever and and this dude is like the king right he can set it okay now he has ten set right now if we go back over here and we send now

it's down to ten right ooh that looks weird let's see reload uh oh this dude's address here check 10. okay so all we're doing here is we're we're keeping track of a balance for everyone and we're letting the owner set that balance this is super heavy-handed right we don't you really don't want this in production hardly ever do you want some controlling user able to set everyone's balance right so normally let's let's dump that and let's do something like set the owner's address so we'll say let's bring this stuff up here

we're going to say the uh the balance of the owner equals uh a thousand and i'm gonna say ether here but that's basically saying times 10 to the power of 18. uh because the evm doesn't do floating point math it want it needs to be simple the more simple the evm the more decentralized it is uh so you basically do this thing where you multiply you multiply it by 10 to the 18 to go to whey or to go to eth and you divide it by 10 to the 18 to go away uh it's a it's a way to do decimals by by shifting everything by a whole shitload okay so let's just save that and deploy that real quick right here

and so now this is going to be much more decentralized so in this oh you know what we don't have is a transfer function we need that right how long does it take to build a transfer function so there's going to be an address 2 and there's going to be a un256 amount and it's going to be public so we'll let anybody call it and what will we do well we'll set the balance of the message.sender so that's the person entering the the function right will minus equal the amount and then the balance of the two address right will plus equal to the amount and and any programmer can look at these two lines of code and understand what's going on right this is simple code we're we're

initializing this array sort of and saying that like everybody starts with the ballot zero when we deploy the contract we set the balance of the owner to a thousand and then we have this transfer function that lets anybody transfer but at this point we can deploy this thing and it's it's sufficiently decentralized in a way of like no one can take anyone else's money right your money when you when you have a balance here the only thing you have to trust is this code right here you don't have to trust this this owner now the owner starts with all the money and that's that's true right like i can get this guy's balance and it's a hundred a thousand right but if i go over here and i get this guy's address and i send this guy you know a hundred

of these there's no way i can take that back not even me can stop that as the deployer of the account if he checks his balance now he's got a hundred and no one can stop it right like it it backs to ethereum and that was like a couple simple lines of code to set that up and that's that's kind of how erc20 tokens work there's there's more to it there's an approved pattern there's some other things that go into the token but technically that's the heart of building a token is just setting up a little bit of storage and setting up a little execution that lets you call a function and move some of those tokens from from one account to the other so what we're doing here though is we're learning how solidity works we're going through this speed run and and we're

learning okay now let's look at how structs work right okay we're going to build a to-do list we're done building our token now let's let's get that stuff out of here let's create a struct for to do's okay and then let's let's let's track some some storage right so you've got storage elements and you have execution elements and then let's set up uh somewhere maybe in the constructor we'll add i kind of like the i kind of like this one this is probably my favorite uh in terms of syntax the way to do it i think you would make it look kind of like that but there we are creating some new to do uh go get a beer okay and it's

completed is false there we go so now now we're starting to kind of iterate on so so a mapping going back to that mapping where we had an address that maps to a number you can't iterate through those you can you can ask it at any time what's the number for this address and it's gonna say this guy's balance is so and so but if you wanted to say i'm gonna loop through everyone and find the the highest balance you can't do that with a mapping you can do it off chain right but you can't do it in solidity in the smart contract so if you need to iterate through things for instance like a to-do list that's a good time to use a struct and then basically an array of structs right so we we set up our struct and then we set up an array of those and

then in our constructor we add one thing to that and so if we go here and we look at to do is it to do zero yeah there we go go get a beer and if we do to do one it's probably going to yell at us that it's not oh it just doesn't even do anything i mean at least it doesn't like explode or something but that's pretty cool like so so we set up a to-do and we added to the list once you get into structs and arrays of structs and and pushing and pulling from those you really get deep into like solidity storage territory this is this is like 90 of all the the contracts you see so one of my favorite contracts is the moloch dao and it uses an array of structs for

members and then an array of structs for pro proposals and so if you want to add a proposal you're basically pushing a struct of what the proposal is onto this this stack and then as time goes by time is also very important in smart contracts as time goes by a certain uh one becomes like up for vote or whatever and and you need to be able to iterate through those so that's where a struct comes in uh handy so that's this is this is how i i i propose that you go learn solidity is is tell your your web frame web two friends or even you to go speed run ethereum find this install scaffolding get it up locally and then and then work through these

concepts and learn uh modifiers events inheritance payable fallback function but that's just the beginning that's just the start of it and then there's gonna be this whole tour of duty that you need to go on and i'm gonna pause there and and open up for questions but we'll get back to the tour of duty uh in a second so any any questions so far just like anything that comes up any any i don't know any burning questions you mentioned uh there's like not really looping um even with the structs but is it like elixir like there's recursion that you can do in order to kind of manipulate or like traverse the data let's let's let's test that right let's see

so let's set up a counter so let's go back to our counter uh so so there is there is definitely looping here right and and the the cool thing is about the way the evm works is because of the halting problem it has to charge you for every step and storage on ethereum is hella expensive right thinking of the thousands of nodes all across the network if you want to store something you're actually storing stuff on every single node on the entire network so if anybody asks any node they can get that value so when you say store this value that's a very very expensive operation but when you say loop through this for loop that's actually like super cheap i'm talking about like

100 points for per step versus 10 000 points to write some variable to storage right so so let's just find out you i think you asked about recursion right let's set the counter to five and then let's should we do it in the constructor it's kind of wild let's no let's set up a a function called poke okay and it's going to be public and we're going to say if counter is greater than 0 we want to do counter minus minus and then we want to call poke again right is that how we would test recursion and we might as well just have like a nice

little console log that like says poke right this is this is a good little wild experiment let's see what happens here so so my guess is that we're going to call this function can you believe this compiles on the first try i love it my guess is we're going to poke this thing and we're going to see five pokes in a row because it's going to recursively call itself until we we get it but let's find out here we go oh what happened oh yeah look at that poke so we poked it until it got to that number and now the counter is zero right let's let's redeploy that and and this is a little trick here you have to do dash dash reset if you haven't changed anything this is a little poke in the

side from wigawag who made our hard hat deployer plug-in but he does some caching which is really really handy on mainnet where it's like oh i accidentally deployed my thing and then like halfway through i need to add some stuff uh man i'm glad it's that cash but locally it's a pain in the butt so so you start out with five with each deployment and then a single poke takes it all the way to zero so so yes there's recursion right i think we just proved it there right that that's reversible fish yeah pretty close yeah i mean actually yeah that 100 is yeah cool awesome any any other questions about what we've done so far just like even if you feel like you're missing some context please please feel free to i have not been

watching the chat i should there's probably some good questions in the chat dope okay it's time for the tuber of duty so so you sit down and you bang through the syntax and basically you get to if i draw it right you get to the top of the dunning krueger which is like i think i can do anything i understand the syntax of solidity i could build a decentralized whatever and and what you do by the way and i've been here myself is you use the thing like a database for a while you you set those structs up so it's like first name last name all that stuff being stored in the contract right and you end up using it like we're storing to a database and each one like

and and it costs you like 500 per transaction right with anything you're doing so at first you use it like a database that's okay tinker was solidity and get into it get up that dunning krueger and get get basically the license to learn and then let's go through the tour of duty that's going to kind of like bring you back to earth and teach you what ethereum is good for but also what it's not good for and where it's expensive so the first thing i always have folks do is just run through a simple nft example this is a this is a fun one because it's like basically all here it sets you up where it it uploads these uh fantastic pieces of artwork to ipfs and then it mints them as nfts and then you

send those nfts around kind of like how we have this address this account here in this account here you kind of send them between your burner accounts to make sure it works and then you could push that up to uh a public network and eventually deploy it to rinkaby or whatever i think it might even go to rinkeby that would be cool if it did because then it would show up in openc oh yeah oh yeah look at this look at this you deploy it to openc and have it show up on openc and then you also verify your contract so a lot of like little context things that you need to go through in terms of like building web3 stuff is gonna just this is gonna kind of hold your hand through that and give you something fun to play with right then then then you can kind of

like tinker with that and say okay if i want to extend that if i want to fork that you could take that and take it somewhere else you can uh this this next branch works you through [Music] what if the artist only wants to deploy the contract and they want to deploy the contract in a way where someone could come to the contract and pay the gas and mint one of their pieces of artwork so you deploy the contract with all the artwork in it but they're not minted yet and then the the buyer pays the gas to mint and that's just like kind of setting you up for the setting the stage for the fact that all of these are just branches of scaffold eat once you get scaffold eat down there's 250 branches around it for any kind of thing you're trying to get into

whether it's d5 or nfts or dows or some mix of those or something brand new there's a ton of branches in scaffolding and you could just take one off the shelf and move it a little bit farther and then put that back up there and and the build guild will fund you and we'll get to the build guide i think developer communities was something that that was brought up earlier and we kind of get to that too but uh back to the speedrun you've got the syntax you've got the tool you you understand uh nfts and sending them around you've got context for what it takes then it's time to take on these challenges so this first challenge is is going back to this idea of you only has to have to trust the code it's a network of decentralized and adversarial actors

what you have to build is a staking app you have to get a bunch of jerks to either coordinate or not coordinate they can defect or they can coordinate it's up to you up to them but everyone like no one loses money basically well let's think of this as a state machine think of this as like a little escrow going back to a vending machine right it's a vending machine that anybody can get to and you set some specific values you say we need to get ten thousand dollars together and uh we set a date and we say if we don't have ten thousand dollars by this point then our state machine turns into a withdrawal pattern and people can withdraw from it if we do get enough

together then that 10 10 k goes on to buy an nft or do something else and it just takes it to an external contract that's just kind of a dumbing contract here but your job is to write the mechanics of how this staking contract will work and your job is to write it in a way where assuming all of these actors are adversarial they would love to steal each other as much each other's money if they could even they would love to grief each other if they could right you need to build the state machine so no money can be lost no one can get griefed there's a specific time period if we have enough money at that time period it goes one way if we don't then it goes another way and it's your job to build that out and you deploy this all the way to an

app and and you turn in you actually go to a telegram channel and you turn in your finished app and someone clicks on it and stakes into it right and that's challenge one so then challenge two is a token vendor so you'll build an erc20 you'll bend a build a vendor contract and you'll sell the erc20 out of the vendor contract but the the real power here is you'll buy the token back within the vendor contract and what that teaches you along with contract to contract interaction is it also teaches you the approve pattern how you have to approve in one transaction and then transfer in the second transaction and you'll get to it it's a pain in the ass but it's you have to work through it right you have to get like why the hell when i go to unit swap when i go eat to

die it's one transaction but when i go die to eat i have to approve wait for a freaking transaction to go through and then hit transfer and then have that go right why does that happen well it's because tokens are smart contracts they're not moving uh eth at the at the protocol level like eth works right so you'll get to that you'll learn that now the tour of duty like includes all these weird gotchas right randomness is a good one i i suggest as a third third challenge you either build your own little decks or you build a little dice game and you figure out how to make randomness work there's a couple ways to do it either with previous block hash or with a commit reveal pattern or with a vrf oracle

dive into oracle's and learn how that works then dive into building a dex there's a whole article here that just like takes you through very slowly how a dex works and what you'll do is just fork master scaffolding and you'll get in here and you'll learn how kind of a dex works but basically you can like copy and paste code and you'll say okay where's the price function how does the price work okay i'm learning math copy and paste that price function right and it's just based on the reserves right i'm learning how the price works i'm seeing how slippage works it's based on reserves and when the reserves are too heavy on one side then i'm getting a lot less of that a lot less of that light element you build your token to eat and you're

eat the token and you deploy that thing with scaffold eats right so you can quickly build this is this is the whole thing right here right this is a decentralized exchange right there if i could fit it all in one thing and you know thanks to some gigabrains out there for for laying this out for us it's a like a perfectly cool composable open source piece that we could just grab put into a contract throw some reserves in there and now you can swap between that token and eath right in the contract without ever having anyone that can grief you and nothing can fall over right you're only trusting the code so then there's like there's kind of like a whole quest of d5 right learning learning how

lending works i feel like lending is sort of critical to d5 once you learn how like over collateralized loans work you learn how to borrow you learn how to like leverage up you learn how to short tokens all of those things are good to learn but it depends on how degenerate you are you know you can decide how far to get into signed messages are super important with ethereum so you're using these ecdsa key pairs right you have a private key your private key can sign a message and it can go across the network it can go all over the place if it gets tampered with then it falls apart it doesn't work but if if it comes through correct and you have a message and a signature you can recover who signed that thing and that's super

powerful even in off chain things i can have you sign a message and then i can cryptographically verify that you signed a certain message and those were good for like state channels at first but but or or like off-chain kind of like signature based stuff but what it really what the power really comes down to is that check out the ec dsa library of open zeppelin because basically you can recover in a smart contract uh uh someone's signature right and that allows you to do all this like kind of meta transactiony stuff where i sign the intent to move some tokens but then that message and that signature goes to a relayer and the relayer puts it on chain the relayer pays the gas the relayer is the message.sender but when

you get into the guts of the contract it it it unravels that little signed message on chain and says okay who actually signed this oh austin signed this and he wants to try he wants to send five tokens to tim okay let's do that so what that does is it allows me to send tim five tokens without ever paying gas or doing any anything on chain as long as there's some relayer to do that and nifty inc i'm gonna warn you there's dicks there there's going to be squigglies of dicks this is somehow a platform for people to draw dicks but nifty inc brings in a couple of these yeah there's a couple a couple little ones there nifty inc brings in a lot of these uh concepts that we're talking about here first of all the burner wallet if you if you have a phone or

even like a tablet right if you have a tablet point that thing at nifty.inc you're gonna land oh i don't even know don't don't do that if if you if you land here you're going to have an address you're going to be able to try this this evening while you're sitting around or i i guess it's like the middle of the night for pretend but for for us that still have time to have a beer after this go grab a tablet go to nifty inc click create and you can draw anything right you can you can draw something here and this is using this burner wallet and if i ink this on chain this is going to use a meta transaction if i don't have any each so i don't have to know anything about crypto at all i

can land on nifty.inc and it generates me an account i can make a drawing and it puts it in ipfs it records it and puts it into an nft and then when i hit mint it's going to mint it on a side chain using a meta transaction relayer so a lot of this like account abstraction stuff trying to get us closer to mainstream audiences this this all kind of happens in nifty inc and it's a fun little app to play with if you go to nifty inc now there's a blue square that i just drew for some reason right uh it's still updating but uh uh the the this idea of meta transactions is kind of changing there's more cool account abstraction stuff but the idea of meta transactions still kind of works for onboarding the we have to pay the gas there's

there's there's kind of some gotchas where like the message.sender is the relayer so you can't just like replace a contract but signed messages was was the topic i wanted to cover there you can use signed messages and then finally like the the final boss is basically build a signature based multisig so so i'd like you to check out solidity by example and go through some of those topics and also go through the hacks learn reentrancy learn learn uh how a honeypot works where briefing happens uh learn how front running works right that's gonna teach you a lot about the network but also learn about these applications and if you look at this multi-sig we can see that a multi-sig is basically like a dow where there's you

know five signers and you have to have at least three people vote for a specific transaction to get it to go through these transactions are all stored on chain in this instance i i would propose a transaction or i would propose that we make a transaction and that would that would be an actual transaction to the smart contract so that's one transaction then someone would confirm that transaction that's two then someone else would confirm that's three and then at this point i think we have the three out of five and then a fourth transaction would have to go in to execute the the so at least somewhere between three and five transactions on chain have to happen to make a three of five work uh on in multi-sig land and that worked at first like when ethereum was like worth a dollar or

something but when when ethereum is worth what it's worth now and you're spending a shitload of gas you wanna think about how you could do as much as you can off chain but still use cryptography and use those signatures that's why the final boss in my speed run is to build a signature based multi-sig it teaches you how to build not just the app not just the smart contract but there's a server that holds all these signed messages that helps you uh aggregate those together then it helps you uh basically make a single transaction and send those aggregated signatures in so that's a big speed run on just like here's how you get the the critical like starting information one thing i'll zoom in on i keep talking

about this idea of these vending machines and i want to make sure the mental model is very clear let's talk about a web 2 developer that wants to make a cron job right let's say you have a compounding interest app that every night at midnight needs someone to poke it right it's a crown job you would think maybe i just need to have a server set up and have that server poke the contract every night at midnight right and that would work for a while but pretty soon your platform starts to spin up all of a sudden there's two million dollars tvl and then someone realizes you just have this server at this ip address hitting this someone griefs that server the server falls over and your contract fails to compound that interest that

night and it you know it gets attacked right and of course there's probably a lot more elaborate attacks than that but but a cron job is not just a server checking in you need to think of it as this is a massive multiplayer game you need to think of it as there's all these adversarial things and what you have to do is in and think about mechanism design think about incentives you want to say if if i want this thing to run for sure every night at midnight i'm going to build a public function that says pogue right that that public poke function that anybody can get into and anybody can call right it's publicly available and then i'll think about my require statements right what am i going to require i'm going to require that it happens once per day

and i'm going to require i don't know maybe it's after midnight some kind of some something like that and then the the key here is i'm gonna send them maybe like 0.1 eth for doing that so it could only happen once per day it has to happen within 24 hours and if you check in you get paid point one eat for doing it so you build the incentives you incentivize someone financially to click in and poke that thing and i guarantee you that thing will get poked every night as long as the gas price is less than whatever the the reward is right so that's how you build a cron job on ethereum and it's good to like think through that kind of like different paradigm of this massive multiplayer game okay uh uh last thing we're gonna do here is look look through some branches

and deploy some stuff but let me open it up to the floor again if there's questions okay so here's what we're going to do we're going to make it so uh we're going to set up a uint 256 price we're going to set up a price function okay and we're going to start it at uh 0.1 uh ether okay and to set the purpose we're going to charge you right we're going to make this a payable function that says you have to spend you have to send money in

and we're going to set up a require statement saying that the message dot value must be greater than or equal to the current price and we're going to say not enough okay and as soon as that happens we're going to do something real interesting here we're going to say our price equals times 105 divided by 100. okay remember remember no decimals so we need to make sure we get our order of operations correct here but what we're going to do here is we're going to take that price up five percent each time someone sets the purpose so we had this like weird attestation thing where someone could get in here and set the purpose that was fun

in in one two three lines of code we set it up so now you have to pay a price and that is on a curve and will go up five percent per purchase total totally different rad mechanism and all we had to do is add a couple lines of code uh this looks good let's let's save it and see if it compiles let's see let's see how far we do here how good how well we do here i haven't gotten the single syntax error yet what is going on here i'm a terrible programmer this is working perfectly here we go so now we have a purpose i can say hello world uh you know what i would like a price function to be public oh look at that it's not public redeploy redeploy gotta remember that like why

like i've got this variable here and it's not showing up over here gotta be public let's let's do that again now hopefully we can see the price because it's gonna be a lot easier if we can see the price in the front end so we can work through this all right there we go so now someone pays point zero zero one and by the way this is like some this is some shitty ui here this is for a developer i'm gonna make them hit this little green button and take it to way right now when you build your app you'll have a nice little app and you won't do this but at first when we're poking at it it makes a lot of sense to just make this very raw and and sort of like i can just follow this and we oh no oh no do i not have enough

money oh i don't have enough money okay we got to give this homie some money here we go there we go there we go okay now look at the price the price is up now right so now if i try to pay that same amount again it's going to fail not enough i've got to pay this price now right boop okay all right so we've got our app this is what it's going to be this is what we're going to deploy we we made a message board on a price curve oh you know what there's an issue here where the the contract is is making a bunch of money right so the car that's cool whatever the contract is making money let's let's send that somewhere right let's should we send it to vitalik that might be kind of funny so let's do that

all right so what's vitalik's uh e s address look at that isn't that nice that i could just type in vitalik.e and get ens resolution right in my app right out of the box that's what you'll get with scaffoldee except i didn't copy it in time let's go to etherscan and get it okay what we're going to do is we're going to we're going to send this money to vitalik each time that's a that's a bad example let's send it to the build guild instead let's send it to public goods right we're raising money for public goods we're going to send it to the build guild multisig okay all right and i'll get to the guild in a second if we have time but so i'm gonna set this address public it's probably immutable or constant fiddle giggle is equal to that let's see

does that does it like that is it even okay with that my cat's snoring over there hopefully that's not picked up too much on the audio okay so there we go we've got bit of ghetto so what we want to do here is we want to send some money to biddle gittle now we can uh you want to do this at the very end to avoid re-entrancing anytime you're going out you need to make sure all of your state changes are done first and you finally do and go look at reentrancy it's super fascinating but we're going to say buildguild.transfer the message.value now this would basically send the money that came in to the build guild and that's pretty straightforward but this doesn't work because the build guild is a multi-sig it's going to use a

little bit of gas a dot transfer doesn't work what you need to do is dot call to send e solidity by example wow i got a lot of stuff wrong there but i still bet i find what i need okay what i'm looking for is this there's this lad this line right here this is what i'm looking for so i'm gonna replace all of this with this line of code that i just know works and it's what everybody uses and it's one another gotcha in ethereum but if you want to send value to the build you do a dot call and then you bring in this value here see that and then this is call data it's blank and fails to send ether all right this looks good let's see if this ships so we don't want any money to stay in the

contract we basically want to set it up so we're selling this on a price curve and all the money goes to public goods nothing lands in this contract good to go it's ready to go uh let's tinker with it let's try like maybe one one time make sure the 0.1 goes through and make sure no money stays in the contract and we can even check this dude's balance check this out we could do yarn balance this dude there we go point one eighth right uh i can zoom way in it's 0.18 okay so uh we've got our app ready to go it's time to go to production it's time to deploy this thing let's say it works maybe maybe we tinker around and we make a front end if you get into the app there's a ton of like example ui things

like here's how you make a button that calls a function here's how you make a button that sends value i have all these components here here's how you listen to events here's how you set up your ui so there's just like a lot of copy and pastable examples let's pretend like we spent a little bit more time on our ui because kind of let's be honest the blockchain stuff is the most important thing react developers are a dime a dozen web3 developers are the smart ones right i that's a jk like any web 2 developer can get it a web 3 with the speed run right but anyways let's deploy this app right where are we going what is the weird network we want i promised we would deploy to a weird let's see let's find one here mean i don't have a ton of some of these

like having to go get local arbitra might be bad like can we just can we just do girly and pretend to pretend like it's a a an exotic evm but seriously i just wanted to know like how easy that was it looks like it's pretty easy super easy right let's just let's just pick gourley i'm just picking a random evm network right the the network just needs to be uh we need an inferior end point basically so we can push to it and we need some funds right so let's just let's actually i'm going to go with kovan because it's quicker we we're we're pushing up on time here not kovan optimism but just like straight up coven there we go let's just go with coven okay so if i do a yarn deploy

and i do dash dash network uh you probably probably can't see that let's make that bigger dash dash network equals and let's go covan uh this is gonna fail i think because i don't have any coven e it should tell me that yep you don't have any money wow that's a classic web 3 error right there instead of saying you don't have any money you get hit with this wall of text really really what you need to see is insufficient funds dude but you get all of this instead so insufficient funds we need to send some money so the way it works is we don't have these nice deployer accounts like we had while we're working on our local hardhat node right we need to do a yarn generate and this is all in the readme in the repo

but what this does is create a local mnemonic now we have an address if i do yarn account it's going to give me that address let me see if i have some gourley on a burner wallet that would be super cool so i'm going to open up a punk wallet check out this punk oh that is a cool punk wallet so it's got like a little zombie punk so if you go to punk wallet.io it uses scaffold eath to make you a wallet and then i'm going to select gorly let's see if i have wait covan right yeah covan and i'm going to go to that qr code and i'm going to hit scan i'm going to scan that qr code okay so now it's telling me i'm sending that person let's just send like point one and go

all right in five seconds that dude should have some covan now if we do a yarn deploy network covan i think this is going to go to covant let's find out please work first try oh yeah we got a transaction hash that's always a good that's always a good sign there we go it's deployed all right so now we have to change going back to those two satellites we changed the first satellite we both of them were pointed to localhost right we pointed the first satellite at covan and we fired the contract now we need to go to the front end and change it to point at covad2 so if we go to the app and we can watch this happen right if i'm over on localhost it's still my localhost contract but if i go here and i type in

covan and i hit save now the whole app shifts over to be on covan and anytime i click on this contract address so so there's the address of the contract on covan if i click this it's going to take me to the covan ether scan and here's the contract and i can verify it or whatever right so there's our app on covan now we're almost there what we need to do is a yarn build we need to build the static app right technically this is a decentralized app it's out there if we verified our contract it'd be a lot easier but anyone can interface with that contract at this point that it it is deployed it is out there it is decentralized anyone can get in there and pay the

current price uh and set the purpose let's just try that i'm gonna now is the time to connect my meta mask right i'm gonna bring my meta mask in i'm gonna switch it over to kovan i think i'm kind of a coven whale let's see it's taking it kind of a long time i feel like the infuria key i should zoom in on that you're you're in furike so scaffold eat comes with like this sort of god mode infiora key but the way it works is it can't load very much so depending on what url you're coming from as soon as you go to production it will fall over immediately but it's built to work for as many people as it can out of the box from the start so your your app is sort of like you can prototype pretty quickly with this god mode thing but as

soon as you're going to get users you need to take it off this inferior key or your whole app will fall over but i think that's what took so long there okay uh hello world we're ready to do this on chain here we go and we need to pay point zero zero one now if someone gets to this before me like if someone hit this contract before i could get to it you guys could be griefing me right now and and basically they could be paying the .01 ahead of me whoa there's something weird going on here why isn't that button working oh what metamask man there's there's so many things wrong with metamask

there's so many reasons why web3 developers rage quit because when it doesn't work then they they think there's something wrong and things are so complicated i'm just i want to start over i just want to flip my desk over right now and metamask okay i'm going to click the button again there we go there's our metamask prompt are you willing to pay 1.1 make sure we're on covan send that baby and you'll notice now that we get these nice uh notified js instead of the the kind of placeholder notifications we get nice notifications that comes out of the box with scaffold eats from block native now the price is up if anybody was watching this they would be able to see this okay so let's deploy this thing

uh deploy the app right we've deployed the contract we've built our app i'm going to do a yarn i could do yarn ipfs yarn s3 my favorite is yarn surge and this is going to be uh coven perp maybe let's see let's see if this i might have already used this one this is a this is a demo i do sometimes let's see covan perp are you happy with kovan perp oh it's uploading okay so now you guys let me see if i can send this to chat man i have not been paying attention to chat hopefully ah there's nothing there that's nothing there okay so covenantperp.search it's only a 10 right now it's slowly updating but once this goes we will have

basically built and deployed a smart contract tinkered with it and thanks to that front end that was already there now we can just deploy that front end and anyone can get in and and start paying the price and you can set the purpose to whatever you want uh even even something gross but don't do it because it's on my screen right uh but uh yeah i guess we're at only 23 so we're waiting for this to upload still man this is super slow wonder if that's my internet or what okay uh open open to questions uh we'll we'll close i'll close with build guild and branches but let's open it up for questions and see just like uh if you guys have any thing to talk about is it normal to build like production

uis using scaffolding like you've demoed the super cool development ui is it normal to take this and turn it into a real production thing and use that yep exactly and that's what you want to do you don't want to use this contract component you want to carve this contract component out you want to set up an input box you want to make sure that input box is controlled as they change it it updates some state variable right when and then when they hit send it looks at the price it it it initiates the transaction to send the current price with the the text that they put in their text box uh it takes it to weigh automatically right but that like i could write that front end in 10 minutes and and it would work and basically i would carve that stuff out and just make that a nice

pretty front end but uh i'll let the react developers do that but really that that that example ui really shows you how to do that right let's let's just look at so here is a button so we were setting the purpose earlier right there's a button that sets the purpose uh there's a button that sends some value here is the transaction we would use we would basically just copy and paste this we'd go to our contract dot your contract and we call the function whatever what's our function called oh it is set purpose we'd set the purpose and we'd pay some some amount right so you probably want to do 108 here and you'd want to get the uh like let price equal await you do read contracts dot your contract

dot is it price i think it's that right there and then you would put the price in here so it's like one little thing but basically if i put this into react that would do what we wanted to do right so so yes you would you would you'd probably not oh what did i just quit is everybody still here i just quit something randomly up in my bar as long as everybody's still we're still here we're still here okay but but hopefully that makes sense but you definitely want to build a react app and not use this but this works fine for like just getting this app up here and getting it so we can all tinker with it like like say you had to deploy something like loot just came out and you wrote a quick little app that like looks through and finds the next loot

available and mints it for someone like that ui could be ugly as hell as long as it's up there and it's a button for someone to push making the ui perfect making ux perfect that's like a uh you know it can take forever right so so it's up to you on how you build your ui but now let's see let's see where we're at with this coven perp thing uh you guys should be able to go to covent dot surge you should get this ethereum app you should be able to you know you'll get a burner wallet right but ignore the burner wallet and just connect in with metamask or or some other wallet uh if you're not on kovan it'll notice that it'll help you switch and you can say hey hey hey and now you need to do this value and multiply it by that and

send and if i beat all you guys to it someone might beat me to it and then uh might like we'll have collisions right like if we both go at the same time only one of us will get in on the block depending on who set the higher gas price but uh there you go and if you guys hit this little refresh button or you refresh your page you'll get the latest purpose so we basically built a decentralized app right like this is going to continue work not even we can stop it right i deployed this thing and now i can't stop it and it's going to do exactly what it's coded it's going to let you set that little variable it's going to let you set that purpose variable it's going to make sure you paid the right amount of money it's going to increase the price by 5

uh it's going to set the purpose and then it's gonna send all that money over to the build guild address so if we check the build guild on kovan let's see how would we do that right here oops that didn't go to oh weird hmm that should okay let's let's do covam uh ether scan this dude there we go he has 0.205 eth right so the money is flowing into the account we wanted it to go into okay any any other questions there before we close this out okay and feel free to no one's no one's said it yet but feel free to go to covent and and set that up okay so uh there's a couple different paths you can go down uh if you're a developer and

you're just thinking i just want to work at a web3 shop get get through that speed run just get through a few challenges if you get through challenge three you you've built a dex hit me up in the dms and say i want to go work at a web 3 place i've already here's all my challenges i'll tell you to post them up publicly and have people poke at them but basically like i can connect you to a bunch of places including chain safe now right like these are these are now all connections i have where i can send developers so so if you want to go work somewhere the bare minimum is getting through those three challenges so you have some sort of a web 3 resume right now if you want to build your own project that's kind of the bread and butter of scaffolding but then if you

want to go even higher level and you want to basically be an evm auditor and you want to really get into things start with the solidity by example go through all the all the attacks and understand the attacks there we go chain safe dot io slash careers way to go perfect plug uh yeah so so if you uh if you wanted to get into auditing i would then i would look at all the audits first of all but then go look at the ether knot this is where i tell folks to get started who want to really dive into evm stuff and understand kind of what's going on beneath the sheets look you get to reentrancy at 10 and there's 25 of them right so you're gonna learn a lot of stuff the the king of the hill is about griefing i think where like you set it

up so it sends money out yeah see king.transfer so so to be able to to take over you do a king dot transfer and today we learned if you transfer to an address that has a fallback that burns a little gas this will fail so someone tries to do this and then they're going to be blocked out forever and all you have to do is set up a contract to do that right so if you want to get into auditing get into ethernet dial so coming back to kind of the middle the middle of the bell curve if you want to just build your own product you want to just build something you're an entrepreneur you're builder you're getting into it uh go go through the speed run but then get on scaffolding and start looking through the branches right start looking at

maybe like uh an nft example right and i'll get into some of these nfts in a second but like there's so many nfts here the the one i want to show off is just something i'm super excited about is the lugie svg we'll get to that in a second once you go through the branches you find something that's close to what you want everything is going to be structured exactly like you're used to with scaffolding the front end is exactly the same the contracts are all in the same place all of the commands are the same but there's 250 different flavors of it right and that helps you like get to having a prototype or a product quickly the build guild is the second place to look for a prototype to fork so i have a handful of just like so basically the build guild is a public

good on ethereum it's a bunch of developers that are affiliated with me that are sort of mentored by me that are building whatever you know products prototypes tutorials any kind of generic products that the ecosystem needs let me find a good example like a simple stream it's kind of it's kind of like uh uh sablier but this simple stream sets it up so the the dynamic is a little different where someone has to withdraw from it so you want to stream funds to someone but have them withdraw the funds or or our tokens where you want to invest something and then the yield comes back and you split the yield and you redirect the yield to one place and you send the the the principal somewhere else right or an nft auction or an nft viewer

or or a lending app or yeah just there's just so many stuff here proxies and apps and swappers and attacks and and these are just like fun examples also these are just branches of scaffoldees so the final thing i want to get into is just just because it's like super fun and interesting is uh these loogies so look at this let me get into the loogie nft so the loogies first of all let me go to open c and show my bags real quick if you go to loogies v2 there are something like 7 000 or maybe it's only 18 a.i almost 2 000 of them and they're the these little homies so basically they're a different width and they're a different color right see

how they're kind of they kind of vary in color and width normally an nft is just an entry in ipfs it's something someone has drawn uploaded to ipfs got the hash for and then put that into the token these are different and and i didn't invent this someone else invented i just am making it really easy to get to or to reproduce but let's keep those loogies over here let's go look at if we go to packages we go to hard hat we go to contracts here's our collectible right here so here is the loogie and look at this so check this out so this is an svg so here is the i so that's i1 which is back here and then it renders the body right which is this body right here and

then it renders the second i on top of that so this is solidity and it's drawing an svg and what's really cool about that is this chubbiness is a variable within the smart contract itself each of these nfts has a chubbiness on chain and a color on chain so what you could do is kind of breed them together and mix the colors mix the chubbiness right there's a lot of fun things you can do with that svg and then that that renders the json there too so that the fun thing the really fun thing i want to show is let's see if i can find the link to this oh man i don't even know where it is let me see if i can find maybe it's deployed uh sending either it might be this right what does this go to nope that's not it

uh oh here we go lookie tank video this is my this is my like i'm on the i'm on the run and someone asked me for something i go to my own website that i set up okay so check this out check this out so you you can see here we set up these new nfts that own other nfts so this is a composable svg nft that is a tank like a fish tank and it's an nft itself and you send loogies into the tank and what's really interesting here is we make sure that that lugi render function is public so when i send it in here the parent is actually looping through its inventory

and calling the render function of each of its children and amassing this large svg and then displaying it so this is what it looks like in open c basically rendering a tank of nfts and then we added animation and it's like deterministic animation based on the block hash and and so this is just an nft i could i could i could put this on an open c i could fractionalize it it sticks to the standard so the composability of these like svg nfts are really exciting and i just wanted to show those off but i think that's that's the that's the end goat don't go buy some loogies how do i how do i not pump my bags don't don't go buy some loogies but some neat fun things are to come

with lugies too yes you could have a tank of tanks imagine you have a wall of tanks right and it just puts all the tanks on like a wall like it's a fish fish shop wall like a fish fish store wall and then you have all those loogies moving around and even like so the lookies are dynamically generated right so say a lugie gets sick and he turns red you would see that live within the rendering of the thing and that's happening in the in the smart contract of the lugi not the smart contract of the tank so lots of fun stuff there i'm gonna i'm gonna kick my share off i think i think we've gotten to time here i kind of went over a little bit hopefully that's a lot of fun stuff any any closing questions or comments yeah if anyone has any questions feel

free to unmute yourself and ask