Solidity, Blockchain, and Smart Contract Course – Beginner to Expert Python Tutorial - Ep127
2025-07-11 12:00:03 [ai] Source: MetaScripta
if chain ID oops chain IDdoes not exist then once again we'regoing to do ai taking jobsconstants do address zero sowe're just going to leave it blank andthen we're going to do the exact samething for the fu slth die token so we'lldo const futokenaddress equals chain ID question mark Soif the chain ID does exist it'll be thebrownieconfignetworks networkname FAUtoken and if chain ID doesn't existwill'll beconstants address zero okay awesome andif we save it oops looks like I put anextra comma in there by accident justgoing to get rid of that andresave and then refresh here so I'mgetting an issue uh because I'm on therink be chain right now and it's sayinghey there's no there's nothing for rinkthere's no dap token for rink beat yougot to be on Coen so if I go back tokovenhere and I refresh now it works out fineright this might still break for you ifyou're on Coen and you haven't deployedanything to Coen we can fix this in ourconfig for the D Provider by changingthe supported chains for this nowtypically a lot of the times you'regoing to want to test using a ganachechain or some type of local chain sothat your front end testing can be a lotfaster for this we're just going to doeverything on Coen but a nice littlechallenge for you would be to refactorthis so that it also works withsomething like ganache and we're goingto not use ganache so I'm just going togo back to app. TSX we're going toremove ganache even we're going to evenremove rink B for now we're just goingto work with Coen just to make it simpleif I go to our react page now refresh Ican connect awesome if I go to rink Bit's not going to freak out because itsays Hey rink B is not even supported soI don't care what you're doing howeverkoven is supported so we're connectedand we're looking good and the thing iswe really don't want to couple our frontend with our contracts right we reallywant to code the contracts independentlyin the front end independently anywaysso let's get back into our main . TSX sowe're going to be in here for a whilebut we've already done some great thingswe've gotten what network we're on whatchain ID we're on and we've gotten thedifferent addresses for these differenttokens so as you can probably see theplace that we're actually going to putstuff on the front end is in this littlereturn statement here right right nowwe're just returning I'm Main and I wejust see I'm main right here to do thiswe're actually going to make anothercomponent we're going to make acomponent called your wallet thiscomponent is going to be part of thisMaincomponent here it's a component insideof a component that is literally onlygoing to address our wallet needs so onour little components tab here we'regoing to go ahead and create a newfolder and we're going to call it yourwallet this is just going to haveeverything to do with our wallet in hereso let's get in here we'll create a newfile because we're going to actuallymake a couple files and our first one isjust going to be your wallet.TSX this is going to be our componentthat is just going to deal with gettingour wallet getting the token balances ofthe different tokens that we have sincewe know we're going to put thiscomponent in Main and Main is in our ourhome base our app. TSX you know thatwe're going to do an export const yourwallet in here and we'll make this afunction now in order to actually showthese tokens we do need to get someinformation from our other component weneed to get some information on what thesupported tokens even are so we're goingto have our main actually pass avariable to our wallet here we're goingto call it thesupported tokens and this is going to beoftype your wallet[Music]props and this is going to be a yourwallet props here just to telltypescript what this is what thissupported tokens is going to look likewe're going to say interface your walletprops it's going to look like like thissupported tokens and it's going to be anarray of token array of sometoken we're going to grab that tokentype from Main as well so actually we'regoing to do importtokenfromMain and in our main we're going to passthis token and we're going to pass somesupported tokens to our wallet so rightunderneath those three token addressesback in main we're going to do constsupported tokens is going to be anarray of token this tokentype so above here we're going to doexport typetokenequals and we're going to say a tokentype is going to involve an image whichis going to be a string an address whichis also going to be a string and a namewhich will also be a string so we'recreating a new type called token here inour main function we're creating thissupported tokens object which is anarray of tokens and this is excuse meand this is going to equal that arraysyntax so our firsttoken is going to be have animage that we haven't defined yet theaddress is going to be this dap tokenaddress and the namethe name of course is going to be dap ordap token now we're going to need acouple images so at this point youshould see where we're going with thiswe're create this array of supportedtokens first is our dap token and weneed an image for this dap token so ifyou're following along you can just grabthis image right off of the GitHub andwe're going to grab that D token andwe're going to pop it intoSRC we're going to change this to dap.PNG now we can import this by doingimport dapfrom dap. PNG now we can take this dapimage and under image I'll put now let'sdo the other tokens so we'll do a commawe'll doimage will be F oops F address will bewetoken we token address name will be weand again we can either oh let's closethis off and again we can either grabright from my GitHub or pop it into mySRC here we'll change this to f.pngwe'll
(Editor: html)
Related content
Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep244
Screwly G's First Interview! Music Video Shooting, FBG Duck Diss Controversy, Gary Indiana & More - Ep3
The 3 Year AI Reset_ How To Get Ahead While Others Lose Their Jobs (Prepare Now) _ Emad Mostaque - Ep17
Artificial Intelligence Full Course 2024 _ AI Tutorial For Beginners _ AI Full Course_ Intellipaat - Ep89
Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep246
- GenAI Essentials – Full Course for Beginners - Ep108
- Artificial Intelligence Full Course 2024 _ AI Tutorial For Beginners _ AI Full Course_ Intellipaat [DownSub.com](1).txt - Ep3
- Artificial Intelligence Full Course 2024 _ AI Tutorial For Beginners _ AI Full Course_ Intellipaat [DownSub.com](1).txt - Ep89
- Artificial Intelligence Full Course 2024 _ AI Tutorial For Beginners _ AI Full Course_ Intellipaat [DownSub.com](1).txt - Ep75
- Web3 Developer in 2024 Roadmap_ Solidity, Smart Contract, and Blockchain Development [Full Course] - Ep16
- How to use ChatGPT in 2025 _ ChatGPT Tutorial _ ChatGPT Full Course - Ep51
- Artificial Intelligence Full Course 2024 _ AI Tutorial For Beginners _ AI Full Course_ Intellipaat - Ep33
- How to use ChatGPT in 2025 _ ChatGPT Tutorial _ ChatGPT Full Course - Ep56
Recommended articles
-
Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep31
but we get this little red thingsaying insufficient funds of courselater on we'll learn how to add n ...[Details]
-
makingthese gigantic nuclear weapons andyou're also in this game and what you'retrying to do is make ...[Details]
-
that to youjustnowhow many Connections in total will thesehave 12 4 into 3 right but these this 4int ...[Details]
-
so as in when your modelcomplexity starts to increase your modelcomplexity will increase when you ke ...[Details]
-
is minimized ornot after that if the error is very hugethen you'll update the weight and you'llcheck ...[Details]
-
say 1 threeand five right so I might miss on thecorrect sets of weight so that is why asof now what ...[Details]
-
Once A Liar _ Interview with a Killer S2 E2_ Sarah 'Cindy' White - Ep4
like, "Oh my god, they'restill in there." Yes, you know, I did. Iwas like, "My god, what happened? W ...[Details]
-
neurons rightnow let's assume that when the neuralnetwork goes ahead and out of the 302 itdeactivate ...[Details]
-
Solidity, Blockchain, and Smart Contract Course – Beginner to Expert Python Tutorial - Ep117
is going to be equal tothis dictionary that we make so we'rejust going to Route each one of thesecon ...[Details]
-
andthat's the one that makes you sleepy butthen other ones give you dry mouth andother things someth ...[Details]
Hot reading
Random content
Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep207
- GenAI Essentials – Full Course for Beginners - Ep169
- How to use ChatGPT in 2025 _ ChatGPT Tutorial _ ChatGPT Full Course - Ep36
- 50 Cent Goes In on Diddy, Drake, Jay Z, Snoop, Eminem, Trump 2024, Vegas Shows +More Scandals - Ep2
- Artificial Intelligence Full Course 2024 _ AI Tutorial For Beginners _ AI Full Course_ Intellipaat [DownSub.com](1).txt - Ep66
- Solidity, Blockchain, and Smart Contract Course – Beginner to Expert Python Tutorial - Ep131
- Artificial Intelligence Full Course 2024 _ AI Tutorial For Beginners _ AI Full Course_ Intellipaat - Ep73
- [Hindi (auto-generated)] Machine Learning FULL Course with Practical (10 HOURS) _ Learn Free ML in 2025 _ Part-1 - Ep78