Transcript for:
Coding Session Notes on Python and EVM

GM GM what's going on everybody Welcome to the stream going to jump right into it so uh quick heads up for those of you who've been watching the new video the 38 hour monstrosity that we uploaded I am reuploading it around hour 8 or 9 to hour 19 the audio desynced which sucks but I'm reuploading it um I reuploaded it actually on Friday and it takes YouTube several days to process 38 hours so sorry about that uh I'm re-uploading it right now I'm planning on coding for the next 8 to 10 hours I'll probably have a break in the middle here so come hang out learn some python learn some evm before I get started I'll take any questions and then I'm just going to jump into [ __ ] and uh yeah I've been using Claude 3.5 it's sick uh it's really good it makes me really like coding um very fun so although I'm signed into it uh with an account so I'll uh just have to tell you what it's telling me and I'll do my best to do that but probably a few hours and I'll stop doing that because I will get into the Zone we're coding some Python and for those of you who want to know what we're doing we're coding some python we're building a tool called gaboon which is a pythonic CLI so to give everyone's a heads up of what I'm working on one of the things I'm working on right now is a Viper curriculum uh we love client diversity we should also have Smart contract diversity also python is a dope language and is fantastic for script things very scripting things very quickly and we in the web 3 world have a horrible tendency to be like types script of rust rust is phenomenal for doing lowle stuff for doing stuff very quickly it's very performant language which is awesome which is why like WTH for example came out I'm exced excited to play with WTH a little bit more in the future however it's not so great for scripting I'm a Trader and I just want to like do some real quick script to do some trading not going to write it in R and I'm also not going to be caught dead writing some scripes in node.js as a you know asset manager or hedge fund manager so we need to give the python Community a little bit more love so I'm working on the Viper curriculum and I said hey what tool do I want to use well brownie is no longer maintained there's some things with ape that I wish were a little bit different so I said screw it I'm I'm going to make one so that's what we're doing here uh there's a good chance this is turns to complete [ __ ] and it's not good at all um I'm hoping that it's good we'll find out um but yeah the the kicker here is that the back end is all using this tool called titano boa which is like this which is basically like The Foundry of Viper except it's like also kind of like the web 3. in any case titanoboa is the thing that's going to make it a lot faster and that was usually one of the biggest complaints when it comes to like a lot of the Python tooling is that everything is so slow so titano is going to power the back end of this CLI called gaboon get it like kaboon Viper and the idea is it will be super fast and super performant because of that and we're going to use Claude to help us build some stuff if we get to a point where we decide we want to add like fuzzing or for verification that is where I think we would do some really cool crazy engineering [ __ ] where we actually would have rust do that because it so it would be performant and we could use stuff like P3 to actually write rust in our python project but that's for much later anyways uh I'll take a couple questions now that you all know what we're doing I be using cop pilot python V2 it rocks too great great to hear that I'll be building music nft Marketplace in a bit might need your help hope you'll be streaming I can't promise I will be able to debug your stuff live so uh hi from India hello hello what about hard hat is still usable and alive or did Foundry take over so hardhead is actually in my opinion still much better for devops and deployment than Foundry so Foundry is great for like testing your smart contracts using your um building your smart contracts then deploying your smart contracts but like if you want to do anything outside of that it kind of sucks right if I want to run some type of script it it leaves something to be desired which makes sense like that's not what it's designed to do why python because python is the second most popular language on the planet and we as a evm eth community are ignoring that and uh if we want blockchain to be this amazing industry well we got to go where the devs are cuz python equals JS L out you can't Import in Viper you can as of Viper v04 which is why we're playing with Viper more okay cool uh if there are no other questions we're going to jump in grab a swig of water we're going to lock in I'll look at chat in probably another hour everyone say hi to Equus all right we're going in and I'm turning the lights off oh maybe I'm not turn the lights off I'm turn the lights off it's too bright that noise okay will there be a rust course in the future maybe depends on how quickly I do all the other courses that I want to make minimizing chat locking in okay here's where I stopped yeah that's right here n what we're currently doing is we're working on this uh deploy to arbitrum uh Branch where we're adding deploy functionality so actually I'll even go to the read me real quick so here's our current um kind of checklist of stuff to build right now we're working on deploy we've been able to deploy locally because boa comes like a with like a boa VM type deal um and now we're just trying to actually deploy to an actual test net so I so I have a probably going to have to change the order of this but in any case good there um so this should work this is where I'm already going to pop this into CLA and I'm not going to show you popping this in the CLA because self. networks dict object has no attribute networks so it's saying self is the dict or config data config data is a dick end points config name is networks config data at location if I do self that networks oh guess I'll screenshot my CLA question here oh so my get attribute might be causing it issues yes now I'm giving it more context so saying hey maybe um um your get attribute has issues so I'm like all right well here's my get attribute function says this implantation could indeed be the source of your problem the first condition is correct over the next two conditions are checking dictionaries instead of attributes this means that if networks is a key in either those dictionaries will return the value from dictionary set setting it from an attribute I see here's a modified Merion might solve your issue all right does this look better to me for name is self that dict do it like that active if has attributes self active profile data this is 100% why would I add this in name and self dot should do that if has attribute config data okay we we definitely have the attributes we're going to skip that okay looks good to me I'm getting the same the same issue stu. NS Boon config has no attribute networks oh it's cuz it's self. dick are these active Alchemy end points that like Foundry just comes with that's kind of it's kind of crazy right sorry sidetracked so it has everything else just networks is no you know what I should probably be more clever with this actually anyways now I think about it config data or active profile data should probably be a property yeah actually you know what let's be more clever with this know that so active profile active profile data you know what we're going to be a little more Clover Active network app property active profile data self DCT yeah that's good Pi a profile self. active profile and I'll add a test to see and this way I don't have to set the active profile data I'm setting it here active profile profile self cuz now when I set the active profile that also sets the active profile data okay [ __ ] yeah that's so that's actually so much smarter load Networks self. net am I not it's because this line work Big Data what is config data config data why the hell am I doing this config data data self. config data it's a stupid line config data is a dictionary has no attribute networks end points config name is networks so what's the self. config import it's because it doesn't did I overwrite it self. config data profile default blah blah blah blah blah remappings it's because I overwrote it why don't why don't I have it it should always have a networks so I must have overwritten wrote it somewhere set config data active profiles actual self. config data equals config data second config data okay so it's this line I need to fix Okay so [ __ ] I always need to have a networks section [ __ ] if self. networks if you deleted the self set config data okay if sell. networks is none self. networks equals I think we do the default here second config data I hate this this is disgusting ad mic end points this is loading from the config what the so this doesn't make sense so this gets what's the line This is the line that's aing okay s okay okay okay okay okay okay load networks if this is none okay yeah this is no problem self do config data nals developmentor okay self config self. networks comes from the config data okay yes that should work if self-documenting is none oh wait no sorry uh this is wrong uh what's the what's the cool way to do this so. get think that's the cool way to do it I think yes okay okay good Dell item gaboon active networks so I need to do def Dell item attribute ask Claud I have a class called Works which is essentially a dick I want to be able to do this line how do I add a Dell item function to do so I think it should just be it shouldn't be this have to do all this [ __ ] actually okay Dell item if key in self. dat delete else raise ke okay cool get item self _ data the hell oh okay EV value Network item self key value so I don't want this for key in no it's going to be has attribute if has attribute self key yep okay so like Claud is like basically like writing this [ __ ] for me which is pretty dope okay that I want to keep all that this [ __ ] I want to change oh whoops okay okay delete item if it has the attribute delete the attribute cool get item has yep set item yep contains yep optional Implement a method to get all keys sure seems good attribute error Dell item attribute error Dell item does it not have uh maybe it doesn't have the Active network key is not defined Bo config networks what is the key there uh keep networks development Network thought I have an active Network reach value in network data. items so oh [ __ ] this is single Network this is wrong [ __ ] just put this in the wrong spot well no wonder it wasn't working this is the wrong so I have a network item and a networks item so I actually don't want to delete item okay cool self get item set item contains iter blah blah blah update set Active network add Network property self. Network ah I see just going to tell Claude this is my class actually this is my class the last class was wrong see if Claud is smart enough to give me a good output adding a Dell item is straight forward okay here we go let's put this in special okay where did I just put that for key and self networks delete key okay yes all right Claud let's see if you're help son of a [ __ ] for key andore Networks Active network key in sou Del item for each key uh maybe I don't want to do this line that I'm doing here I'm deleting the Active network this doesn't make sense to do actually now that I think about it work Moon config is not oh so in here Active network set Active network name is should I just have I feel like I should just have Active network via property same as active profile data I should just do the same as what I'm doing here app property Active network self returns uh Network return self um Ser self doore networks self-de Active network name right so we're going to make a new property Active network name which going to be a string and we're going to refactor this whole thing networks Active network name String reach Network and set Active network is just going to change the name if Active network name is none and then self. Active network name String is going to be active Network set Active network Active network name name BL if development network is not in BL blah yes this should work now [ __ ] assert end points equals kaboon so I'm not updating my networks correctly now boom config.sys so this isn't correctly adding them so have to break point this okay isic half is it none type it's none why is it none this is clearly not none what oh [ __ ] I broke my vs code there sorry I'm hella choppy huh sorry right one sec here we go we're back computer glitched up for a second there sorry about that think I should be okay yeah okay sorry uh anyways okay so let's add a break point there why is it doing that okay right run it test DK I want to do D pdb okay so mesic path this is not empty it's not defined what the it's clearly defined right here you is it config Jason where is my breakpoint mesic path is not none meic path add mesic point so I'm break pointing here M A config path there we go this is clearly spot yeah yeah right so if I do this is it going to freak out of me boom config networks this isn't working the way it should be working boom config okay well you know what next sh I was supposed to do step wasn't I okay here we go step in that not the a step why bro what the heck if so the kaboon config setup is calling ad mesic end points already but if we do add mesic end points again here that's a config path still a freaking path what the okay I'm just being stupid okay Meesa config Json is that Network config networks is blank I think this is deleting everything for some reasons oops if I run this again now networks is black path notal Jason upload I am wiping the whole thing with this line if endpoints config name not and self. config data self so if networks but it should be okay mesic path is now a thing yes good good endpoints config name not in self. config data false if it's not in it should be of course because if we do self. config data okay we have our networks right here if I do next self duck config update okay what does this do Jason load it loads this okay next next uh expected Aline [ __ ] put did I mess it up damn it mess it up oops sorry okay next next next finish that why am I oh finish that return okay good that's it so it returns it's done so this is probably going to look good now development Alchemy good that's what I want okay continue why is it broken then all of a sudden what just next next next next next okay with open blab boom networks at this point is wrong bro this just networks development oh this CU I didn't do load networks did I [ __ ] I have to do load networks every time it's kind of shitty so I have to load it into the config and then I have to load oh that kind of sucks it's bad engineering let's just do this for now I think if my blah blah I think this is the play have this return a Boolean sh this stupid okay Moment of Truth really sucks that I still okay it's closer now though points it's cuz it's a networks object okay yeah networks class Network they're the same right yeah okay equals okay other if not is this instance other turn false if it's not another network if is inance other if it's not okay no if it is an instance of other network or is instance other dick turn this uh return false right that not work Network do you mean dur ATT dict has no attribute dict other. dict oh [ __ ] uh if is instance other network self. dict equals dict okay yeah I sure did mean that phone. networks okay so those are equal so the network equality is equal so for networks to do equals if if it's not return false okay so let's do this okay if is instance other dict let's do for each Network in self. networks um uh you know I'm just going to ask Claude I have a networks class which as a attribute like this I want to do an equality check check uh it should return true if both have the same list of networks how do I do that if it should work for a another networks object or dict so they're telling me to do this equals instance other networks self. networks equals other networks xals other other also want me to do a not equality check interesting if result is not imp that's stupid I'm not going to do that turn false right this makes sense do I have to do the Active network Active network name I think I do and self other. active that let's do that and other DOT active no Other Self other I think that makes sense okay Moment of Truth of truth of course not uh because it's a property okay okay so it doesn't matter okay okay okay okay so then let's just do no I do want it I don't want it no I don't I don't want it okay so if it's not a dict if it's a dict we're going to ignore that yay gotting somewhere okay I did a nice major refactor take attribute has no attribute networked boon test network is just a dicton config Network say Network Kaboom config networks is also a deck boom config and this should be a networks object not a network object because I did a major refactor Kaboom config is not defined well should be now buddy oh well sorry that's k okay here we go Boon config okay type kaboon config dick object has no attribute networks well it freak [ __ ] didn't I just fix this no networks in here what the hell Boon config it's right here my guy active profile config data not networks so I only call it here and add mesic end points what about in the init set config data calls and M get points true set active profile boom config has no attribute networks how am I initializing this counter project path boom projects oh why do I still have both these in here boom project am my overriding networks again I keep freaking doing that is this just does it from the init so this just adds it to the configs magic pant you know what to config and then we're just going to do load networks after this every single time self doore load networks because I'm not dealing with that crap anymore okay there we go what now ah now we're back to this a we just fixed this one pdb I mean this is the last one that's breaking now so that's really good boom config it's because now we're not loading the config here's what we need to do when we call this I and I knew we had do this we got to do an additional load networks after it's going to be a type bu or none and it's going to default to true so now music path so now what we're going to do is just before we do [ __ ] at the end we do a little conditional you know what we're not even going to do return true we're not going to do this anymore we're not even testing that anyways false or true great turn true oh networks uh self load networks if load networks after self download networks this is horrible you know what this is where we're just going to ask Claude hey make this look not gross can you make this look not terrible maybe clean up this function certainly here's a cleaned up more readable version of the function oh theying a try catch though is that better all right let's see if their if their cleaned up version looks I I don't love try catches though what did they just do to me oh [ __ ] they have all this other [ __ ] down here okay does this actually look better going to import this okay if magic path is done path equals path home magic to Jason if doesn't exist F not found that makes sense checks are the beginning and we have a try this better is it actually better well first off does it work or did they did Claude just give me some garbage okay it works I don't love try catches why would this fail right like I'm going to we're going to get rid of the return bull try to catch I think should still work dope okay what did I what did I change here test Foundry project test Kaboom project can I get rid of get get rid of those project I did see if that ruin my test right test and now I'll answer questions yay nice okay I'll my test pass okay questions did I I lose the chat I must have lost the chat when I stream buffed up okay um out of curiosity what's y opinion on training a larger model to Output other smaller models like literally training a large model on weights biases a bunch of smaller ones I don't know sounds dope to me computationally expensive Asis pointed out here yeah all right if you ask uh questions before I guess you'll have to wait we have to send a message again because for some reason my Checker cut off sorry all right I'm going to go to the bathroom be right back oh I was muted the whole time whoops test are running now I can go back to actually getting run to work so uh what I want to do test run sure gration test run RPC okay so I want to run this now this is what I want to run I this Das um Bo has no attribute add account okay product. bo. add account Charles actually told me the answer to this b.v. out account okay so then I have to do this son of a [ __ ] Bo has sh probably going to have to refactor this work with Bas now n Works instead of kaboon this is a single Network he doesn't have a networks object so that's okay this is actually not as bad I thought okay this actually good yeah so what I need to do oh it's going to be pretty large ref factor in my networks section I need to make this this object a boa network but let's just continue with that if so boa do b. account do. account and I'm supposed to do this first need to set the network URL first set network environment I don't think this will work let's try EnV object has no attribute at account that account so it's bo. the hell was that b. network. account we need to do oh out network is attrib out a account what freaking attributes do you have check how to see all functions and attributes of a python think it's St there count where's this add account to include bo. add account import boa Bo do en. set EnV I need to set the EnV first so I would need to make a wrapper around okay so here here's what I'm going to have to do so we're going to refactor networks VI a dictionary of boa networks and that way I can do my product. networks. set Active network which is going to call this set Bo Network self. network. active network. you I think does this should just change the name but when I do this this should automatically no I shouldn't need to do that either okay so yeah you know what I just let's just do the reflector now this is not going to work okay so B work now working what would that's studying be H this we's just doing this real simple set em stuff sh I make a class a boa Network so he has it's basically like a network EMV oh it inits this every time H I hate that it's going to be slow it's going to be slow if I do that cuz I got to import this whole thing and then then like create the environment basically every time maybe I just make it like a boa call like call it boa Network and then I do like initialized true or false oh that's so ugly let's let's try that actually oh it's going to be so okay um she alled and then now CU what do I need to do so in this I need to do set Active network and then I need to do add account here so instead of boa my project. boa we're going to do my project dot networks. network. account my project. networks dot uh so we can so each Network needs like a default count we're probably going to use eth account eth account import account we probably we want them to be the same one ch H that's so gross dude all right I need to need to think so each so networks is this super light object or when we add a network it's just like basically adding the config when I want to actually get it to run I got to add the network set that to the active one add an account count from Key then he wants it to already be set the environment already to be set and then he wants to add it so you're adding it to like this set I think I just have to be clever you know what we're just going to do it my way we're going to do my way and then I'm going to have to go back and refactor this a little bit down too okay so networks so I could have well because where could we have accounts we could have Accounts at the network level get up Accounts at the conf the project level I think I want a default account for each Network I think each Network should have AA default account each Network should have a default account and then there can also be a default account at the project level where if the there one at the network level doesn't exist yeah we're not going to do initialized we going to have like a default account which is going to be of type account so we're going to have to import account from uh from eth account import account so we already have like key store stuff right oh I just realized I wasn't sharing my screen sorry then I guess I can have like counts uh I'm pretty sure there was like an unru to make them in a count container need to make a new kaboon out is there a pre-built isn't a built-in python data structure for like an insert uh index dict ordered dick that's what I want but doesn't provide direct integer indexing what does brownie use or it counts brownie does like both I'm pretty sure network is like an account in here El meta class equals Singleton what does this do out single import single sof out accounts is a list sensitive being stored in the redline history true self that from pneumonic true reset it's a list I could have sworn there was a way to access with names blah blah add new local C when no private key is given any new monarch is also generated load a local account from a key store oh how you have to use load that's right resolve address if account is none RPC to unlock account address I's see I see unlock account St oh self upop back end okay well that's only if it's gache though self up back in if config oh duh I'm I'm an idiot if config network type was development then unlock ET I see okay hey Karan glad uh all the coms been helpful my friend what up Haron deep welcome to the stream oh brownie has so much cool [ __ ] does he have a list of that works just like that ryy project no utils nwor okay so account this is a single account what account accounts class account oh duh right here list like container the H all Avail I just went through this okay so but these aren't in a network are they networks network network V State web 3p RPC Anvil gu hard hat yes middle Wares is there like where's the the networks class class networks there's no network there's no networks class why not networks oh it's all on net okay accounts equals accounts so it's just in RPC equal RPC so there's only like a single RPC I think I get it okay so what I want to do then do I want to do this where do I want to store the accounts I mean it should be both should be at the project level and at the and the let's do count stop by so you know we are going to do this kind of clever index sck type object so we're going to do like an accounts accounts list we'll just call it accounts and then we'll have account and then buta has theirs too right County yes class account so I I will do accounts and I will do account and got it okay okay here's what we're going to do here's what we're going to do okay so we're going to do oh [ __ ] the account class is going to from Boa oh no from eth account import from eth account yes so the base class is going to be account oh that's so annoying we call it gab account super shitty oh it's just like this double like a list and a freaking s out accounts it's going to be a list of yeah account is this so why is self not defined e thanks Claude give me some code here if key does not equaly a name key must match the account name oh wait this has a name keysa whoa name String s name name balance so okay account okay okay account account just says keys and this that's it I don't have like an address decrypt encrypt from key from pneumonic with neonic blah blah blah count is there no like address attribute count. address where is it getting oh is it a property def address address uh where is the base class this class account where is this address attribute coming from account. address account from Key what do this return local account oh this is a different kind of account see selection of convenience methods to sign a cry with an Better Private key and this has an address oh I see so is in a local account base account account base account ABC but the account class isn't uh what the hell so account [ __ ] that's shitty why is this a different kind of account returns local account why are they not are they different bro local account I hate it oh I hate it and then boa also does like some account [ __ ] account for I should be a class networking oh this already has add account it doesn't do this the way that I like it no just shut up and do it my way and then there for why isn't account a local account Keys equals Keys default kdf what the hell is that mean create decrypt account should be both of these can I oh God oh God self key account key unaware management API I see it can't be both that doesn't make sense so count is really more like there's no init on this okay so this is okay so if I do this as an account it just gets all the fun functions all the class functions from Key count out load counts. add for try Equus what are you bad at this is super annoying so brownie for counts CLI has a CLI I need accounts get account scripts accounts. Add accounts so where is this add function right here An accounts add self okay create a new local account it returns a local account nice and appends it to The Container self. from pneumonic where is it getting from pneumonic oh it has he reimplemented all these oh my God that sucks okay I see what he did so he did it like this okay import eth account so he used local account as he didn't use the account oh that's so annoying okay um okay so here's what I need to do here's what I need to do here's what I need to do I need to uh expose oh no I can just do this counts right no account and this one will be local account right because count here is this it's I mean it's really like all this create stuff create decrypt encrypt from key from pneumonic create yes so this is actually what I need to do okay actually yes this is going to be an accounts is going to be a list of oh God the naming oh God the naming oh God okay this so I have to rename this wait wait from eth account import account as eth account class Lo okay boom now account it's actually account and accounts like this count Oh wait [ __ ] so if I want to do account. accounts oh no I do want to do like this because he should never be exposed okay okay okay okay yes this is what I want to do this is what I want to do local account gets initialized key and account what the hell is account here account account account the key unaware management API what this is literally the account class it wants to pass in that's freaking stupid so then I would need to do knit key string or int okay so we're going to do name is going to be a string self. key key key ke key key does this mean you were storing the key we sure are he to bites oh yikers how did brownie do this is there like a locked I mean there should be like a locked is when you do counts a list here from pneumonic reset accounts. clear check of accounts are manually unlocked and then add them unlocked account unlock unlocked account for address and unlocked account address it goes blah blah blah blah it's account address so he's passing an address if account not in self accounts account is this his oh so he did make his own private key account Base Class for account and local account public key account I see what you did here so you have your private key account Base Class okay thing the lock what the do not control the private key pending transaction blah gas limit blah gas price check for deploy ah I see okay so he did some clever [ __ ] in here you Mr titanoboa you also did some clever [ __ ] you didn't do what external account okay never okay I need to put this I'm like okay hold on uh notes okay brownie wrapped up counts objects into few sub classes so they could be worked with uh more easily and kept encrypted stuff uh boa puts all account info into the network EMV that is active so for kaboon we will want to store it at higher level and then pass it down to the network as we see fit I guess okay so we're going to have to do for our accounts we're just kind of this is this local account is lowkey kind of shitty because this is actually a like an unlocked account so this is going to we're actually going to call this unlocked account so we should really have a a list of unlocked account and then locked accounts so account account too should have a list of unlocked uh accounts default to locked something something brownie key stores okay okay and yeah yeah yeah because I want all these functions in here except for these cuz these return the wrong type encrypt return no that's fine from Key this returns a what returns a local account okay so I'm going to have to I'm going to have to do something clever wow this kind of sucks actually like fighting with boa now does it just make sense for me to put this into boa instead of doing gaboon what if I just forked what if I just forked Bo and just did this in there that might be way easier I have to do all these wonky all this wonky [ __ ] it's fine all right well I'm going to go get some lunch I think looks quite runny outy yeah I mean it's it's more of a guideline than a hard and fast it's a work Tim yep pomodora yep yeah boa Bo is Bo is is the way B is definitely the way B is so fast okay um I'm going to go get lunch I'll be back oh actually hold on a sec ah yeah be back bye for for for for for for for e e for for for for e for for e e for for e for for for for for for oh I we back didn't need to take the full luncheon yeah boa is titano boa excuse me all right I like where we are and I like where we're about to go so let's go there let's go there huh okay I think I'm over complicating this I think this should just be count and it shouldn't be it should be local account but I'm going to add a whole bunch of [ __ ] onto here then what did we just found out we found brownie did its own thing the only reason I want to use this crap is because this is what tyano boa uses so back over here I want to do this from do account that from Key this doesn't return account does it returns a local account that's right or account local account turn a local oops let's just do it in in boa here so local account from blah now that I have this let's just do this with ra boa so I'm going to do ia. EMV do my account right account add account or account like object must exposed these account like must expose sign transaction and send transaction this is in it's a class method of account I think local will account should have it sure does or account like object local account works fine Force EA equals false what push notifications hey appreciate the like let's just do the test run test run you see wrong this is what I want to do Envy has no so this is in the class one class Network so it's boa EMV o.v NB is a Singleton I get how do I do add account then self. EA self. account accounts this is in this is in this is a networking set network from URL I don't think this has an add account does it do set now canv what's up Tac rust is not in the near future probably to be to be honest what we're doing right now yeah we're going to be doing some Viper stuff for Shel for show for show set network returns ethereum RPC URL what oh that's how he does so I need to do I probably theoa dot what okay this is in boa this is a EnV type but I need it to be a network EnV it's just it's just straight up the from just the wrong freaking typee like what am i v equal get Singleton last oh all right Claud what's the Singleton method style here single ton pattern I mean at class method transforms the method to class method Yep this checks the first class attribute signon is none right and if it's none return class otherwise return class. single time so if I do the network does this have a Singleton this will have a Singleton as well a class only the single to pattern ensures that a class has only one instance and provides a global point of access to it this method is implements a lazy initialization approach to the signal tip pattern right so if I do would I have to wrap this as a network EnV so okay oa. EMV and we have to import add account is this what I have to do does that even make sense no of course not EnV has no attribute identifier what the hell is this initialize your self RPC accounts son of a [ __ ] because I need an RPC and I need an account oh it's so annoying is every the framework is Ry this is the Ry framework we're not making a website so no no D Jango anything like that wow this is annoying wonder why he did this Singleton thing is this doesn't work cuz I need the network I mean I could I could add the network information in here just to like you know what let's do that nwv RPC accounts so let's do RPC is going to be what else do I need accounts so accounts is going to be my account see like that's so gross network uh EMV equals this di object has no attribute URL of course okay music file not found user stream nothing turn uh oh wait wait wait EV has no attribute identifier so that's that same EnV object so why are we calling this caching RPC class is ENB RPC do identifier so do I not do I do this then seems wrong use bo. set network yourl set oh so I'm using like some deprecated [ __ ] okay because then it's a setv network evv do from URL set the environment to use a custom Network you set EnV new EnV env. Singleton EnV to Singleton equals new EnV do I just do no I don't do this either here's what I freaking do I think my project aboa EMV do set EMV with a new EMV and then it's the wrong bro how does anybody do this at account crap J Jam it's not even in here I need to fix it's not even in the freaking docks here now I'm fighting with boa fighting with boa so we're going to say f of that noise and uh yeah you know what we're going to yeah scr that [ __ ] project accounts let's do this for now that's fine I don't care name is name yep that's fine key key key okay need to balance crap do make this you should have account accounts or it just accounts and then the account we have account account uh account that from Key no because that's not how we're going to do this anymore we're going to do import account from from gaboon do project do accounts count we do account. from key count and uh should me accounts or counts count that's kind of gross I don't think it should be in the project I think it should be probably in its own this should probably be it own folder file new same yeah and then all the project all this should just be in the init and then that's going to be a little bit of a refactor yeah that'll be a fun little okay uh anyways so I don't need this okay so accounts. from Key my account is going to be an account great now we're going to do a project class set so we need to do this first set Active network my project. set boa Network set Active network right I me this still won't work oh maybe it maybe it will work to establish new connection okay I need to just run Anvil let's does it need to be connected wow that sucks bro okay wow all right well okay so so this fails because this wasn't like Anvil is activated down here uh [ __ ] cuz there okay well I'm going to go to the bathroom be right back again sorry guys e for e e e e sorry had to go there my bad so now this line worked right I had to set it first and then I could do this but only when Anvil was running which is super annoying actually cuz this didn't work for so do this if that'll work shut off anvil but I don't have an active EA so it should still fail so okay so this works okay so that's cool okay okay okay okay I know what to do okay so I am going to have to have my own like account management stuff that's going to happen outside of the E andv Singleton cuz the Singleton is like live it's happening but I want to be able to like do [ __ ] before it's live it's happening it's popping right so okay this makes sense add account my account and but this this fails because I'm not adding the account correctly EA is not defined right so uaaa eoa self. eoa get Sender how do I get the sender helper function self send the EMV sender how do I set sender work damn I don't I do not love all this is set up but it's fine Force e self none or Force U count address set EA I got it okay okay okay okay okay [ __ ] are you talking about not defined but you way not what does this do then this is part of the network game right so is this the wrong so now I have a self-d away but if I continue I don't have a self-d away so something so after I set it I lose it somehow you know what run script by project you know what's happening shouldn't it be this this be the same I the should these should be the same these should be the same boas right so if I do project. boaa now it's now it's not defined for some reason okay set boa Network self. boa so everything comes from project. Active network does not equal oh do we not have anymore self. networks okay so it's a networks changed it self. self. networks. because I have property I have property I have property right property Active network self so yeah no because this worked fine so this is actually working project. boa why is this not giving me the right boa right set again we use a bow and it's great oh hell yeah we Mo away from Foundry start to look for bettering H reach project. bo. see now I I don't have the eoa anymore so I'm doing I'm doing some weird [ __ ] in here should this project. set boa should this return boa this turn AOA object s I'm doing all this wonky [ __ ] but what if this just returns if I just have this turn type soft top off b.v oops what bro do I need to save no because I want the freaking all right time to ask Claud I have a package I'm importing like so in this package I have a single ton instant uh Singleton variable variable called EnV that I would like to access I am setting it in a line like so however when I however when I run try to access this property uh outside of file the above line is in it looks like all changes are reverted PR project. o. EO a why claw 3.5 I dealing with a module reloading or multiple instances of the boa module let's break this down if the module is being reloaded in different parts of your code the module you might lose the state this can happen if you're using imp. reload uh multiple instance if boa is being imported in different ways or from uh different paths you might end up with multiple instan of the module each with their own EMV there could be threading issues or scope issues make sure that bo. EMV is truly a Singleton you might want to check its maybe do a little bit of logging uh I like that idea let's just see let's see if there's multiple use imported boa using EX existing boa using existing so it's all the existing boao do bug from print self boa EA SL Viper slity Viper no no they're both good we don't want to bring boa to brownie instead uh I kind of do but this is I mean this is basically my attempt at doing that making a new one interactive crypto zombies to teach toire don't like crypto zombies as as a main education platform like I think it's great for like um like kind of uh maybe getting started or like like a fun little side quest but I think as a main learning thing it's it's not that helpful a lot of times like a lot of the interactive stuff like is very different from actual learning right it's like uh it's like if you want wanted to learn how to play basketball by playing um by shooting you know by playing exclusively horse you know sure you might learn how to shoot but you'll be terrible at basketball um because basketball requires so much more than just knowing how to shoot there's and I think with crypto zombies it's like there's so much of what actually goes on is abstracted away that you kind of Miss what real coding is like real coding is kind of more what I'm doing here you run into an issue you Tinker you try to figure out how to solve it um whereas crypto zombies is more like hey let's let's let's like uh in this IDE where kind of the world doesn't matter CU crypto zombies is kind of handling everything for you it's almost like like lifting with the Smith Smith machine as well I don't know if that's uh those are good analogy but basically like anybody who wants to get serious about coding you have to switch over to you know your IDE like your vs code or whatever uh random question do you take anything like blah blah blah blah blah no oh thanks dude no I I do just protein and creatine sometimes that's it then just five days a week at the gym thanks dude it's a nice casual entry for anyone it's kind of table Stakes for being able to know what you're interacting with I I prefer remix to be honest for for a number of reasons um but I have I I have gotten that feedback um it's something for me to look at math recursion depth exceeded right of course makes sense this none this got to run I need both the death Fe and the log level the EA is that and then it gets deleted somehow and then it gets changed the new one one but now if I do project. booa do.a I get none using existing boa now it's none consist so I need some type of context manager wow that's so annoying um so it's the same boa module wow that's so yeah yeah it's because when I import B say when I import that [ __ ] in this isn't like importing if you're injecting boa into the module's dictionary the way you're might not persist across all uses of the module depending on how and where it's being imported elsewhere in your code objects being garbage collected or reced between use the bo attribute might be reset class boa uh sure that bow is truly a Singleton you might want to implement it as such Bo FL Bo it is a Singleton though right project class e and B is a single time talking with Claude the B module is not a Singleton pyth modules are generally Singleton by default but there are scenarios where you can end up with multiple inst of the module here's what might be happening you import boa which creates an instance of EMV you modify the state of the EnV instance somewhere else in code boa gets reloaded or reimported which creates a new module object creates a new em okay make sure boa is a Singleton make sure that BOA itself is only imported once so I need this troa is a Singleton Global EnV Singleton so we go to the project class for use syy modules to ensure single import so I'm importing boa multiple times that's what's happening so I have it as like this but I need to have it no because I want it I want it in the project each project should have its own boa hey found a Ry attack hell yeah nice work oh so I want to do like a lock that's super annoying okay threading we update our boa property oh [ __ ] s boa lock so is this lock type lock was allocate lock red. allocate lock lock type oh it's th not lock sure B is is this going to be good enough why do I feel like it's it's not EA not defined set UA so it's like defined here and then I do this and then it becomes undefined so I'm passing my project in right my I'm passing my yeah so I'm I'm passing my project then am I recreating the project somehow get script path no what if I what if I do the breako here wrong okay so at this point in the script we have the EA so next next next next next next is it do we still have it [ __ ] we still have it next now we're doing the weird import [ __ ] next next if spec is none next if spec. loader is none next and we still have the eoa next set boa Network EMV if project. Active network set boa I am just a feeble little man I'm resetting the network EMV like a dunce bucket even though I've already said it so of course now what I do next now it's going to be gone because I'm an idiot I get it we reset it it's okay I'm just the biggest dummy on the planet okay so then what do I want to do instead so I'm calling run script by project so set boa Network GV this resets everything so I need to make this super freaking smart is what I need to do this should be like a setup Network because before this is already all right because then the test test see uh run RPC run this okay okay okay run script by project this is why I want to do everything at the project level and not at the boa level I need to abstract all this away for the users why does it do that that's super Annoying It's because it call set in v and of course it's going to son of a [ __ ] that's so annoying I do this I should at least get the warning none type has no attribute e andb excuse you whatever resetting bow and all bow state will be reset okay how many times do I call this all Bo state will be reset oh I reset it here then I reset it here okay fine later so then what I want to do is oh it's G to be so annoying dude anytime I want to change URL I have to anytime I want to change the Active network I have to change this [ __ ] that's so annoying okay so freaking annoying dude now here's where I would go in and it's fine let's just finish running the test Network URL as long as the call set so I don't want to do this I want to say if project. boa dot EnV dot URL is not is set EA URL RPC RPC this have a URL where's the URL save RPC is instance it's a state variable but is it in anywhere else four carpc there's just four carpc you're not saving it Charles come on buddy okay well I guess it's meant to be internal but I'm going to access it because I need it it's none cool and let's try this I mean that's pretty cool though it worked I mean that's I mean that's that's pretty cool so this means it should have deployed I believe um deploy high now if I just do das s countown number I mean that's pretty cool and then it oh that's I mean I mean how is that not cool right like that's that's pretty cool starting count zero ending count one transactions actually broadcast okay that mean it's so now want to do my project up boa there's like an at deployer oh out loads need this just runs a script I mean their script can do whatever maybe they should like return a transaction listek BR to do real looking uh a list of receipts Maybe module. main do like older or some [ __ ] um bo. contracts. viperviper contract bo. contracts. oh is this going to [ __ ] it up cuz I'm importing boa here too no weird okay can I get the output of or the return probably right like like result so I could have this like return any module. Main script as is okay Claude this is your time to shine I want to get the return value of the main function or whatever the script turns if the module has a main function that's pretty easy to get the return but what if it does not clad what do you have to say buddy sis. standardout get value of course could I just do this turn actually you know let's do a little little break point there huh we love a good break big point for use string iio to capture value does that work no what is this then oh wait not readable okay cool oh I have to set it as a string. iio what they do with all stand out okay I probably don't need to do that um they're going to do some weirdo [ __ ] probably don't want to capture there I probably want to capture a list of transactions yeah that's what I that means I'm going to have to do something clever with transaction broadcasted I'm going have to save these somewhere send transaction execute code deploy overrides Fus environment has one too [ __ ] a ton of these um so I going to want to keep track of these so when I call I'm going have to make a wrapper around boa kind for say f let's just do that for now fck it this could be of type any or none if result then we're going to say for for oh it's already a Viper contract out Sal contract big big big big big big okay good okay so this is like the lowlevel way to do [ __ ] and we can actually deploy our stuff like that that's actually so sick so technically to read me this is done uh but it's ugly it's so ugly we're going to make it look nicer I'll be back in 10 for for all right we're getting places is bro writing evm right now I mean pretty much but no okay actually getting was actually huge what we just did okay did I break any other tests with all that [ __ ] I bet I did not I did and [ __ ] is way slower no how did this feel turn nonzero ex status what up in all honesty gmgm friend because I'm returning something sense a small B from judging Temple see what you're doing ah well thanks for dropping by uh we're working on a pythonic smart contract development framework using titano boa so everything as fast as f okay evm has no attribute RPC son of a [ __ ] of course not so the Run RPC Works run script by product this works because we have set the RPC if project. booa do no project. active project class active. networks oops. network. active network. uh if has atdr and it has the attribute no if it doesn't have the attribute do I need to set up EV object has no attribute RPC what I just check that to check a python object as an attribute oh duh so it's like this let me see that do I need to set the EMV but where are you getting this error I get the damn Trace back for oh is it because um it's because they shouldn't be in the same line is that the case okay if okay we don't have an EMV we need to set it no product. networks do active and then if doesn't have this and the Active network is none no just if it doesn't it doesn't have this if it does have it so okay let's try this invalid URL that's what I was afraid of okay we don't want to set a URL if we are using the boa VM I think what is the base BM or the base URL for boa def deploy what happens when I call deploy I just oh we literally just return super anit base Viper contract cont base evm contract or .g Singleton so what's the RPC you know let's find out def deploy one of these one of these stinkers is it deploys deploy to do add a test lamu it's probably this one break point go back to the Run let's just do this hello hello forget to uh finish running there buddy EK I bet you it's because there's like a weird try catch or something when I call deploy dot deploy loads no how do I get the cuz it has none right like I do print boa or. EMV [ __ ] it you know break point right here what the [ __ ] is happening do I need these in here I shouldn't because I don't want to set them it doesn't have the attributes but it does project. Active network is not none what is happening why is this all jacked up now oh okay good invalid URL this shouldn't be getting called bro is my terminal jacked up like what oh Okay cool so that's the issue so now I got to figure out first off I got to name these better these names suck let's call this CLI RPC test RPC run test CI c m RP run unit cliet file I'm going to break everything unit config test unit Network run finally test project cool hey welcome back aquus uh yeah I'm I'm a big dummy that's it that's the that's the biggest problem so I need to set this um these both called test r problem is yes won't work now because I removed setting the environment which I need to do break point except for it just passed for some flip-flopping reason why the hell did it pass of course it passed because I'm setting it right here like an idiot so I need my run I need this to happen in my run but I'm not exactly sure how to revert back set boa Network AMV what if this is blank networking be from URL from URL ethereum RPC URL what if it's blank RPC can't be n so what is the damn boa do EMV dot uh I don't know Bo right because Ronda P boa BMV right EMV no just break point point right here breakpoint oh this won't work because oh [ __ ] it did work EMV EMV doore PC what this is Anvil what test did I run test deploy to Anvil of course it's Anvil okay so what if I just do test run what is the EnV in this scenario my friend that's what I'm saying why is it just getting stuck holy [ __ ] it's so slow now oh this is so bad oh I [ __ ] something up so hard here it's skipping over my breako in the deploy that's why I need to see so bad you know mean just do the test data test projects booon project Source dot dot oops activate AB okay as no attribute RP see right and that's what I'm checking in the run up high waa EMV okay it has no RPC which means it must there's some must be something else here boa so this is what it looks like when there's no RPC it just it just doesn't there's no so how do I like do I just have to make a new one that's fine it's fine I think that that's just the play so if it doesn't have this if no RPC attribute we can assume and this isn't none or is not what's called development development network name from Boon do project. networks Imports this okay so if the actor network isn't none it's not n or the development name then we set it right and now everything should just work son of a [ __ ] see only only this one test run gaboon project adjust just tested that no G run deploy invalid URL no scheme is supplied well I shouldn't have to do a URL why is it calling this that's why because it's Active network I see I uh I got it I do need to have a name section for each Network okay should work Active network name um get Active network net still fails where did my uh run deploy NW workk has no attribute yet Network oops there a name let's try that now it has a get n type has no attribute get of course beautiful okay good great now this should work my commit message will be [ __ ] is working but it's slow okay get status get add dot get commit minus M [ __ ] is working but it's slow and clunky push wait what get push everything up to date what are you talking about oh I didn't commit this yet didn't I just Commit This get commit for adding object to repos a building trees not signed it get okay well it's annoying awesome hell yeah don't know why I lost permissions here you are signed in and it won't work well I'm like I'm kind of signed in uh I am signed into a different account for streaming so it's that's where it's kind of annoying it's cuz I made a commit on my other account oh that's super annoying oh well have to fix it afterwards that's kind of super spooky I don't love that okay well in any case I really don't want to do this [ __ ] uh um what if I do one two let's move everything over to gaboon 2 to that's funny aha there we go yep that was the key we just made it kaboon to I think it's because I switched over to my account the other day um should be yeah see it's like weird streaming account like some [ __ ] but it's hella slow all right so then we're going to do so it's pushed up here so gaboon two get status ohol that looks good remove D RF kaboon that's right I cuz now I want to move kaboon to be kaboon and that's oh oh I moved it into it well uh uh well you know it is what it is we're we're chilling in we're we're in gabun 2 now it's not going to be super confusing or anything I can delete this is my ho yeah whoops I will bring it back sorry about that and I wrecked my python interpreter I'm sure syn now we're back okay so now I have a little commit I have the most horrible test ever in this one where I'm doing everything with raw boa but at least shit's working so that's cool so I want to make a more interesting test test projects CD test data test projects is broken test data test projects kaboon networking on straw cabinet um let's look at that huh so now gabun DOL networks dot we're g first off we're going to get rid of this ZK sync aolia we're going to do equals CK sync actually you know let's not do that uh I send a replacement I don't think I change the I can change the port okay oh and I can change that too p 85458 fake main net Saia fake saoa I guess may not I need the chain ID in here I'm going to skip it but now what else do I want here want like a default count what do I do accounting account I get account what did I do we just return the top account if there is an index if no index return count zero otherwise do this okay cool now we're going to get into the interesting [ __ ] so default network default account equals so I want there to be like default account or this is your overall default account Network specific accounts will be overridden specific accounts will override this default account is going to be I don't need a new networking monstrosity yes I do okay so development default network is going to be fake aolia you will use the Anvil default account for development purposes unless otherwise specified default account going be default for development purposes so I want to see default account use for zolia and for this I'm going to have counts equals main account and you know what let's do another one networks fake syn seven seven a is going to be fake DK sync counts equals how do I do environment variables in here equals blah blah blah blah blah like this does the toml automatically pull in the environment variables though if I do a key so this is going to be a key or a name so many trolls aren't you scared to show your token API uh I just realized I'm not sharing anything and now I'll answer questions yay right happened to all my uh sorry like weird streaming account like some [ __ ] but it's hella slow uh all right so then we're going to do so it's pushed up here Soom sorry want to show did kaboon 2 crash on me oh [ __ ] kaboon 2 crashed on me sorry just kidding I minimized it sorry about that y'all I was just showing nothing for couple minutes there whoopsies okay so this go away I want to show kaboon this is what I'm working okay cool I'm going to take a 10 minute break here uh hey what up spent a few days watching your tutorials many stuff you teach me a lot hey appreciate it glad uh glad they're helpful so all right I'm going to take 10 minutes see you guys in a bit Joel did I show a key pretty sure all the keys that I'm working with are like nothing I mean I'm on my stream account and there's nothing really in here not even signed into GitHub for what's a token API what what what is that well if you saw something I want to yeah want to see what it was you're spooking me dog it's like token API what the hell is he talking about I'm like scrubbing at the moment yeah like a lot of uh so like I know like or if you do like Alchemy right right it's like this but it's like not like a real oh I'm not even showing you um let's go here there's like this but I'm not sure like maybe this is what you saw cuz this isn't like a real token uh oh and then maybe um I know there's this too actually uh maybe you're talking about this that works test RPC run are we talking about this we talking about this maybe so this is like the Anvil default key so this is like everyone has access to this key maybe this is what you saw all right in case let me know if I needed to leave something be right back spooked me now it's all good appreciate the call out yeah it's probably this Anvil key here oblig though friend all right let's get back at it what are we working on working on this this atrocity okay so here's where we're going to draw some more inspiration from brownie Andy you know we might even just do a major refactor here because now I'm starting to see where stuff go so he's got a network a net or project network data default configo part of me wonders if just doing yaml is better than why am I using toml for every Network I need to make a network. name that sucks if I use a yaml I can just do this like why why why toml over yaml let's see what Claude has to say uh I don't have an extension I'm using Claude in the browser whatever it's fine okay so now we're going to do this crazy [ __ ] default account have Network information here test clex networking up high data test projects data projects phone networking gab path oh this is what I want actually should do a unit test before I do all this [ __ ] actually death test is this a fake test actually y test actually let's do we don't even need to do it like this you can do data test configs complex complex networking kaboon let's try that b oops Flex working ammo test fig comp uh test initialize complex complex B um kaboon do cproject config import kab fig kabon conf fig not working I'm oh whoops PDP DS config file not found B to test data test figs with an S cannot find file complex complex what is the difference between these two I don't know but let's just config not found cat wait gabo it's because it's taking the path okay well so I already found a nice little uh little bug to fix huh okay so it's a string it's either a dict or a path knit from path re gaboom config re gaboom config if string ends witho if it doesn't end with doo join path oh it's because I'm a dummy that's why test configs test test test test test data test configs complex okay okay that's why be um okay reabo cig reab fig it doesn't end with TL okay so good good okay so now base test complex networking slabon window tunnel great so now call now this should work right string object has no attribute exists okay so it's saying a path what is mic path blank so let's just say phic path equals path phic path uh oh so none or as a PA is that there we go okay config baby default network fix a a default account my account this is wrong I think yeah CU it didn't didn't get the rest of the big. networks oh okay well that actually did work yay okay so that means our config instead of doing this where's the string or Thea fig self. active profile data should I dos should I also have do the network Works uh that actually went pretty well so I really should see config do networks do Active network equals or assert is um development default network is fake sapoia no that's wrong Folia seert config do networks. default account is my account then assert fig. Network do fig CK sync accounts uh the length of this is three cig. networks. fig okay sync. counts zero uh os. set EMV uh see sync man key bro uh and key should just go the base test anvil netor Network and anle default key second key and Bill second key second key okay so we're going to do for monkey patch uh patch set EMV see s main neck key to anvil second key second key key patch H I probably should give this a shittier name huh let's give it like um boom test keyops yeah there's a whole bunch of [ __ ] in here that I don't have and this is a little test driven development ah test K oh uh that name so this is good this is wrong it should be fake sapoia when we do the load so let's figure this out from path read set config active profile is none profile are else a profile equals default profile name profile. default load networks points config name devel El I mean this is probably where we're failing it's loading the networks wrong self talk config data B like get sink the networks's in it active okay so I'm not getting the active so we call this fig data um CU this is none right wait have two break points now [ __ ] what do I do oh no okay so this should be none right yeah okay so this is none so we're setting it to none if it's none set it to this so we have set atw set Active network name so we're going to do we going to look in here default default Network so if Active network no so we have to pass it in set yep so it makes more sense to do yeah okay Active network equals self Dot okay self. active profile data do fault network fix AIA so we'll do a little Active network if else development Network namea Active network name equals Active network ah good okay test initialized complex networking test initialize big sets uh default Network let's do this one at a time okay count I should make this a fixture for shizel okay patch test my test. fixture def complex G config turn uh yield config uh here we go right complex gab config now we can do scab config goodbye goodbye goodbye by by lovely okay uh test initialize config sets default Network fig sets default account test ini sets number of counts and just pass sets uh big converts private key to do networks has no attribute default account [ __ ] default account is set at the project level not the not at the network level I think okay if it doesn't have one so first off networks accounts networks won't have a default account that's fine but this will have a default account Network should the accounts be stored in the yes they should be stored in the networks that way the project will have access to them too so the default account is going to be the first count um okay so if it's none so counts can be zero default account oh [ __ ] default account name a string I'm going to have an account it's going to be oh there's going to be a lot of [ __ ] going on here class Network uh accounts default account name is this string just points to a string in the dicks that's it or default account Oh no just I know the app property baby def default count self account uh okay so never mind there's going to be a default account name default account name which is going to be a string or none Active network name default counts self dot default self do [ __ ] that's not what I wanted this is at the network level default account default account name network data this okay so now we have a default account name set a default account Setter super annoying okay at default account. setter default account self value account self. default count H is that if not existance default type error s. default account name if defa account not in self. accounts self. defa count um sure I don't know what I just it so has default account as a string right so then that's no problem if it's an account then we do this [ __ ] if is inance a string self to not in self. accounts edit with Network object is no attribute accounts self. accounts the hell is this though Network object this is a network object I ran into this before CL help me out I'm getting this error but here is my network object something to do with the getter uh no I don't have a get attribute why am I getting this why what do you got for me Claude uh because I it's not properly initialized of course I'm a big big dummy count Anvil key not found a network count add it with Add accounts aha there we go okay so let's try to add it uh we'll do or we need a new function so this string could be a name or a key I mean this is a good time for a refactor because I have to do accounts now let's I we're going to do a pretty big refactor here uh time for another refactor oops hilarious uh okay yeah we're going to do a huge refactor here I don't like the current setup here okay refactor time factor factor time okay I like the CLI stuff that's good project what brownie do brownie has everything network is its own network has it has the account in the networks project test I was thinking of not having a nit works project move AB Dot it's kind of an issue when does he put networks on its own sources buil so I would do brown import Network Yes Network counts counts where is accounts class accounts brownie. Network for accounts counts equals accounts oh he just does this let see it's just going to be gaboon project bone. project. net to do see he has like his accounts still in nwor fig where is config config equals config do setting he does this Singleton thing for config config container class base config so settings should be in here Singleton settings config base config default config so he does that interesting okay all the Singleton crap huh we definitely want to do this we're going to we're definitely going to refactor to this I could just put all that [ __ ] in here what is his brownie br oh [ __ ] I just put all of this in and it oh I shouldn't that's disgusting I don't need to do that because I'm actually doing this so I already can do that but I have to put accounts and networks in here project config um I think it does make sense to do a new yeah I think that's all all we need to do boon project. networks to kaboon networks kabon do project. accounts to do accounts let's put it inside of networks let's put everything inside of networks what is what does he do for accounts he has accounts inside of networks but not inside of projects for me everything thing is from the project level everything's at the project level no so we're just going to do everything at the project level everything's at the project level everything that's the project level what up how you doing so I'm just going to keep going actually I don't want to change anything so what I am going to do though is I'm going to have I don't probably shouldn't have this right test this is so slow what did I break son of a [ __ ] oh my God I broke everything Anvil key not found in Network accounts broke the thing that I was working on I broke everything else okay try to add it if default account not in self. accounts oh this is what I was about we're we're about to we're about to refactor anyways uh let's just do I know JS do I need to know full St V STW 3 not at all my friend time move be its own thing yeah canate something expose everything in crap that makes sense to me yeah we're going to do a bit of a major refector yep I'll be right back I want to make this break a little bit longer though just because I need it I don't know why long break duration for for he he e for okay I might only do like one or two more there's a couple of things that I'm kind of want to do on my own after this but made a lot of progress here so let's do a pretty big refactor probably its own folder file same with networks so networks is going to be its own file accounts is going to be its own as well yeah we all saw crowd strike that was rough what did brownie do cuz titanoboa technically also has its own it has its own network thatp but this is inside of the network that's right so this is like when you're like live and [ __ ] I deal with that right now we have accounts I'm going have to set this up so that it works so we're going to have like Global accounts and then like Network spe specific accounts does that make sense think I eth account class create decrypt encrypt what does encrypt return bre key returns just a dick okay so what do I want my account to look like and then I just got to make it compatible with that account so we'll do name key store which will be a deck right string and then key what did you do self oh accounts self. default account list what does this do private stre h why is the updraft video captur not all languages anymore like the new YouTube video or updraft the website the new YouTube video is because YouTube takes like a couple of months to add captions to a 38 hour long video it should be on updraft some more nice thanks for the update aquus I like the way he set this up actually his public key account yeah we're going to thanks Ben going to borrow some of this [ __ ] here's web 3 in here I don't want to do a we dependency don't care about that why why are we resolving an address self address equals resolve address add oh stuff where Ian okay if it's a domain you know stuff from web T doesn't have me stuff does it support okay we're not going to do contract this is a contract balance of oh it's a function get balance that's what we want address is the boa self. evm I see Charles I see what you're doing here okay uh self. evm so this is in the EnV so this is still in the singl let's let's do this in order okay so this so this is going to be public key account um does he get it he does web 3. e. get balance web 3 where is web3 initialized web 3p web where is this so I need the I need the boa all right later Equus hell yeah although I'm kind of like running into like a bit of a architecture issue here what does titanoboa do for like this account stuff oh count I mean I'm going to have to get the balance of stuff I'm going to have to be able to do for the music off for a second e I could have the EnV passed down this just be easier to put inan bar no you do not have to Learn Python 2 e e e e e e e e e [ __ ] it yeah just send it okay um not do any of that [ __ ] yet everyone's using all this different [ __ ] let's just rip run with this and this is in the network yeah okay just the network stuff is going to be in the network the account stuff is going to be the accounts so okay so this is going to be of type accounts and the default account name for the network will be in the network good okay so now we're from accounts je and this is jaana say hi chips Excuse Me Owen okay so this is going to be accounts is going to be a list of accounts blank good counts this is just a bunch of class methods what's a combo method both static method class method combo method sure is local network of type accounts or local account no it's a typ base account just has that stuff okay so my account counts sure we'll do e account class accounts is going to be a list of account and there be a name map great if we want to add one get set great so that accounts and then account it's going to be very different very different key store dick store path Str uh ke store the youa no this doesn't make sense um it up this is in his config up I uh I should put this into like and cash share oh wait is it because so I don't have any okay uh create a new key pair okay oh then I would have to import it I gotta as wallet import interactive interactive Anvil okay password password C list there we go uh there we go it's in key stores key stores F data path if um if they don't have any keyst I have to make it East door path it's going to be in the Fig does that mean it has to be passed down that kind of sucks for for for I want to initialize an account kind of like the practice of like several different types of accounts oh it's like base account you know let's call this base account and all it has is a name so now we do class this is kind of similar to the public publicy account address [ __ ] class like this all right we are going to copy some of this after all then we do class locked account it's going to be a base account and account created from yeah wallet Part D these story is going to be a dick there's two key the full key store path can you get uh I don't think can you I don't think you get the address from this can you oh you can oh [ __ ] get address from key store okay Claude self is not defined s. key path RS key F Jason um well where's the address buddy okay yeah you can't get the address so if I have a locked one I don't have the address here so we need to decrypt it in order to get the key first for oh it's so annoying man so now they can at least encrypt Jesus Christ local account private key account public key account public key account private key account local account local account and account address NS address NS private key public key if all right I think I need a longer break on my brain is starting to be fried my productivity is falling through freaking all right gang I think I got to roll um my brain is uh it's unempty and sign already turned off too all right okay well uh thanks for hanging out go uh lay down damn I didn't get as far as I wanted to get here yeah I'm going to lay down for a hot minute and then I'm going to get pissed on myself and then I come back home but probably won't stream so sorry y'all all right dudes peace