Mantle 🛠 Deploying A GoodContract on Mantle Using Remix<a href="" target="_blank" rel="noopener">Source</a>

Foreign [Applause] [] Engineer at mantle truly excited to Have you on board and glad that you just're Showing pursuits to get onboarded onto Mantle's testlet it will probably be our very First walkthrough which is based on the Various requests and the questions we've Been receiving from the neighborhood Um yeah with out dropping one other Further time let's bear the Various topics that we'll be overlaying In this transient stroll by way of uh I'll attempt My diploma most interesting to keep up it transient Um so shortly working by way of the Agendas for the day On let's say for the session uh um it is That we'll probably be overlaying the Prerequisites to start out out that is together with Manual check out net to metamask shopping for GS And bit tokens uh so that we're able to Interact with the wise contract and Also the alternative dabs which have been made On the testlet uh then we'll probably be Actually coming to a few of the parts of the session which is The deployment of the wise contact Itself uh which can probably be achieved using remix ID so I'll be supplying you with a quick rundown As to what remix IDE is Um then I may even be telling you about The deployment of the wise contract uh The fundamentals as to what's occurring and

Also we'll uh we'll probably be moreover Interacting with the wise contract as Well so yeah as quickly as we're achieved with that Uh we are able to even be learning the contacts On the Explorer correct we'll see as to How mantles tax uh check out that Explorer Looks like and likewise what completely different Information we're uh we're able to Find in regards to the contract from the Explorer cool Without dropping many uh you already know loads Time I consider we should all the time dive correct into It let me merely share my show display screen truly Quick Cool I consider now my show display screen will probably be Visible Uh we're in a position to actually dive correct into it Um so yeah even sooner than getting started Uh Just a phrase I'll I'll attempt my diploma to go as sluggish as doable nonetheless then Make constructive as it's a stroll by way of uh And then I'm pretty constructive people will probably be Looking at it's at liberty to pause the Walkthrough uh in between correct after which Try to watch the steps I'll make certain There's a Blog alongside from bathroom in regards to the Same walkthrough attached inside the Description beneath as properly Also all the hyperlinks that I'll be using in This walkthrough they will be inside the Description beneath so that you just don't should Worry about copying and pasting it from Somewhere else uh all the provides

Required to bear this walkthrough Will be obtainable inside the description uh Yeah I consider now we're in a position to get started So to start out with one in every of many situations Is sooner than we start deploying any sorts Of contractors together with mantle examined to Metamask uh so firstly you wish to have Metamask put in in your browser Itself uh let me share the hyperlink I indicate I'll share the hyperlink inside the Description let me merely copy the hyperlink Myself Um Yep metamask you presumably can get hold of the Metamask extension from proper right here it is Pretty easy Make constructive you could be opening your met masks Right now what you do is Wait uh let me shift my metamask in Middle of the show display screen this time on account of Pretty constructive my video could be on the very best Right hand aspect so let me do that yep so Hopefully my pockets is uh on the center Of the show display screen I consider so positive uh so what You should do is click on on in your profile Picture uh go to settings and go to Networks Once you go to group all you need to Click all you need to do is that you just Have to click on on on ADD Network It will take you to a model new show display screen all Together Which is okay uh for some extensions it Might not take you to a model new show display screen which

Is super as properly merely make certain that You're following the an identical steps Um then click on on on add a group manually Cool uh I already have this knowledge Stored with me on my clipboard I'll merely Copy and paste it from there you'll moreover Have the entry of this Um knowledge that we're typing in uh merely Make constructive to repeat and paste it appropriately Um And attempt to not go away any areas Um Before starting out as properly uh I indicate starting the textual content material yep Uh as quickly as that's achieved Okay it is saying that this URL is Currently utilized by the mantle check out Network Which is okay on account of I already have the Test net with me so what I can do is Um Okay Where is how do I take away this Let me swap my group after which take away This yep super let me copy and Paste it Again yep now it must be working Click on Save And there you could have it uh you we have got Successfully added mantle check out net Manually to our metamask uh now that we Have a mantle examined configured with Metamask we're in a position to switch on to purchasing bit Tokens and likewise getting some GE that

Will be wished as gasoline in diversified steps Now for purchasing native bit uh since Mantle check out net presently lives in Quality Network it's a must to to build up G sooner than you may start bridging your Tokens correct so we'll go uh by way of the Whole issue first is to Acquire G by way of Paradigm faucet Um the hyperlinks will probably be inside the description No wish to fret about it Parrot and faucet proper right here we go Okay Um yeah so let me merely sign out truly Quick uh yeah so that's how the landing Page of the parenting faucet will look Like should you occur to're trying to utilize it for the First time examine in with It will ask you to approve I've already Approved it so it wouldn't ask me as soon as extra Um Then go to your metamask Copy your Wallet sort out correct uh merely click on on on This hyperlink beneath uh not hyperlink I indicate click on on On this account button sorry Um merely copy the uh click on on on it and it Gets copied And paste it uh on this search subject or The clear space over proper right here correct uh and Then all you need to do is click on on on Claim Yep so as you presumably can see over proper right here on the Top correct nook or should you occur to cannot see it Is displaying that I've uh already taken

Tokens or declare tokens inside the remaining 24 Hours so that you presumably can solely declare token as quickly as In 24 hours as I was doing the identical Walkthrough yesterday on Discord dwell I Uh did it dwell so it is like just about like There's just about like two three hours additional To it uh so uh by then Um I indicate it doesn't make sense for me to Wait on account of I already have the tokens But then yeah for the first time clients Who are able to take it they'll have the power To Um they will they will be succesful to get All kinds of exams tokens that is Required you might also see as to what Tokens you're getting on this drop so Point one e degree the place we eat and 5 Nfts ERC 721 Um so yeah you presumably can merely try it out as Well Now Um Now that we have got achieved this The Next Step Would be to build up large tokens correct so For getting the big tokens you wish to Get uh bear the mantle check out net Faucet Links will probably be inside the description as properly Right so what I'm going to do is uh let Me merely look at if the hyperlink is there yep I don't know it is over okay so the First step could be to connect your uh Connected to your pockets over proper right here

Right And I consider I've already associated my Wallet uh nonetheless then it might probably nonetheless ask me To swap to golly Network yep uh so we Click on swap Network hopefully it was Visible Um I've to keep up dragging it out my show display screen But then it's super Um let me merely Check as soon as extra Yep uh so the the first step could be to Authenticate your Twitter merely click on on on Authenticate Authorize app And it's a must to be good to go uh let me Select the amount of tokens which could be Going to win 200 Mint Um I'm opening my metamask yeah and it Should ask me uh for some sort of guess I affirm the transaction And cool please depend on bit in your Address inside half an hour cool we Wouldn't be prepared for half an hour and Usually we get it by like what the two Minutes I acquired't be prepared on account of I Already have achieved this step and I've Bits in my pockets so we'll be shifting on To the next step Feel free to drop suggestions beneath or moreover Directly attain us out on Discord let's

Say in case you have got any sort of doubts in Any of the steps correct Um now the third step could be to Actually Bridge your erc20 uh tokens That is the bit tokens that we had uh uh Through uh by way of the mantle Bridge Yep so I was going to say the mantle Test net tokens by way of the mantle Bridge uh so yeah Um Let me merely uh copy this hyperlink Okay Mantle Bridge We open mantle Bridge Wait for it to open cool So my pockets is already associated let me Disconnect it so that we're in a position to bear The steps as soon as extra So one among so the 1st step could be Obviously to click on on on this correct prime Right correct hand nook which says Um be part of pockets So we click on on on be part of pockets we click on on On metamask and it must be associated Directly so one in every of many points to make Sure is that it's a must to be on the Quality examined on account of we're Bridging The tokens from gauri to mantle and by no means The completely different strategy spherical Right so yeah should you want to bridge it You can go ahead and eat tokens that you just Have gotten that is the Geth uh after which You might Bridge the beta or the bit Tokens uh yeah as you presumably can see over proper right here

It's a drop down menu okay so yeah uh Make constructive that you just already know I indicate that's For everybody node to know that that's A drop down correct I had seen quite a lot of Questions the place people have been asking I Don't see bit over proper right here so it's a drop Down menu you presumably can see as to regardless of you Have in your uh pockets over proper right here select Bit I want to modify like 100 bits Deposit Initiating the deposit Um yeah as you presumably can see I've to manage The transaction I affirm the Transaction And it is pending I await it to Happen it might take one to 2 minutes Right uh nonetheless as soon as extra like I said I already Have the bits and G and the tokens Already on account of I've achieved this quite a lot of Times so I wouldn't be prepared and we'll Be shifting on to the next step Um Feel free to pause the video as in Whenever you want okay yeah by the purpose If you're talking it's already achieved uh So we're on this I consider we're if You're viewing this and also you then're Trying to Um Do and deploy the wise contract on the Same time I consider we're going hand in Hand Um I indicate there you could have it like uh your Bits in the meanwhile are obtainable for everybody to

Test out Um I indicate clearly you to take a look at and Interact with diversified tabs being constructed By builders and Um yeah like moreover sooner than we dive into Interacting with diversified tabs uh let's Look at our fairly easy tutorial to Deploy wise contracts on the mantle Test net immediately Um and likewise don't worry that's strategy Easier than than it sounds Will it come yeah okay so uh when it Comes to deploying the wise contract uh We are actually using remix IDE over Here there are a variety of you'll be able to do It nonetheless on account of we wished to make it as Big adequate entry as doable Um so we tried to do it whereas remix uh There are quite a lot of IDs as properly the place you Can try and deploy wise contract as properly And which may out So let me merely share my show display screen uh Hopefully it has already shared and let Me merely open remix Cool So a query quick rundown of the remix ID And the interface so this half is Actually generally known as the icon panel that's Actually generally known as the aspect panel And proper right here the place the code is displayed This is unquestionably the first panel and the One beneath it is actually generally known as remix Interface Right

In the first panel um On the very best correct on the very best left sorry You can see an icon which is called icon Which is principally headphones correct Um merely click on on on it and that can probably be That will straight take you to the Landing net web page uh for Um for quite a lot of folks that there have Been conditions the place they straight don't Land on the landing net web page and that can get Them barely bit Um yeah in order that they get they get confused as To what is going on merely click on on on it And yeah you'll be on the landing net web page Um Also make certain on the few on the Featured plugin half uh solidity is Checked in uh on account of we would just like the Pre-made wise contracts for this Tutorial correct Um Also an expert tip could be that uh whenever you Are properly burst with the remix ID there Might be quite a lot of plugins that you just actually need To use you presumably can actually permit and Disable quite a lot of plugins from this Plugin supervisor which is on the bottom Left nook over proper right here cool Now let's start with deploying the wise Contracts correct Um now after I say deploying wise Contacts and mantle uh it'd in all probability it'd in all probability Seem like a very large course of correct nonetheless uh In this info we're trying to cowl the

Basics of deploying the contract with a Simple large no nice devices we'll Show you the best technique to compile them deploy them And moreover lastly the best technique to work along with Them Um so given we're merely getting started And that's one among our first Walkthroughs which could be pretty transient Uh for this walkthrough we'll probably be Focusing solely on one contract which is One storage dot clear up yow will uncover it Under contracts artifacts and there you Have it one storage dot soul Let me merely click on on on it proper right here Who We Are Uh so storage.soul is a fairly easy Contract and it does merely two points uh It outlets a main chain by a Function retailer it reads set saved Number by way of function retrieve correct we Are merely a amount after which we Are retrieving a amount That's it correct Um yeah moreover Um now that everyone knows that what this Um wise contract is doing all we would like To do is that now we have to start compiling Right so to compile the contract all you Need to do is go to the solidity Compiler half on the icon panel it is This Right after which you need to click on on on Compile storage.sol Okay uh yeah uh even sooner than we begin Uh make certain that uh in your metamask

You are once more to mantle testlet Because we have to deploy our wise Contracts on the mantle desk net correct Uh so we'll probably be linking your account at The subsequent step of the step which is right After this so be certain you're already On onto the mantle examined and by no means the Quality check out net cool make sense uh we Compile the storage let me merely look at Yep it is combined Yep you could be getting a inexperienced look at Mark like this over proper right here Cool Now that your wise contract is Um Compiled let me moreover current you if there's An error how your entire interface would Look like Let's say if I take away the semicolon from Num It must ideally give me an error yeah See it supplies me in password it was Saying that it expects a semicolon nonetheless It acquired a bracket instead so we're going To put the semicolon So your entire errors will probably be displayed In the underside left half Um Now that we have got compiled a wise Contract we're in a position to deploy the Monumental Test set Um so for that what we will do Is we're going to click on on on deploy and Run icon on the icons icon

Panel Cool and likewise that's pretty invite uh This is pretty you wish to Click on Let me merely Yep so the ambiance must be the Inject provider correct and likewise you could have To make certain that even whenever you're in On inject provider you have to be on Mantle examined and by no means quarterly Um yeah Cool given we're on mantle check out it it Is I consider we're doing it correct positive we Are We merely look at Yep now all that is left is unquestionably to Deploy the contract correct after getting Selected the inject provider make certain That it is your an identical account that is Connected that is the pockets correct and You select deploy Once you hit deploy open your masks Yep you presumably can see now we have to affirm and Sign the transaction affirm Contract deployment is pending so we Will await the contract deployment to Uh obtain and as quickly because it's achieved it Will be one factor like this on account of our Deployed quite a lot of contacts sooner than as Well so it must it principally turns Green and reveals you the current date yep Uh by the purpose that is achieved uh make certain If let's say your metamask is it popping Up by itself make certain to solely go hover

Over to your extension panel after which Click on the Met masks on account of quite a lot of Time it doesn't happen nonetheless then uh yeah That's till you sign the transaction It wouldn't get deployed correct you need To affirm the transaction in your Metamask You're nonetheless prepared for it to be Deployed By the time it is deployed we're in a position to Actually look at on to our block Explorer As to what's occurring let me look at it Out You can see we're straight going onto The mantles testnet Explorer and oh yeah So Awesome Let me merely swap my Headphones truly quick My headphones are drained Cool it isn't a stroll by way of if nothing Happens Let me merely change my settings truly Quick Cool I consider each factor else is wanting Fine Right Um now that we're in a position to uh getting once more to The complete issue now we're in a position to see that uh On the Block Explorer it says it is Confirmed the result is success standing Is confirmed it moreover supplies us the block Number and likewise the timestamp as to when

It was confirmed correct so permit us to look at Go once more to remix Open our metamask Let me put it in the middle of the Screen Yeah so that you presumably can see the uh in all probability essentially the most Recent train was uh contact Deployment to the spending before now we Can see that it has been achieved excellent Um so yeah one in every of many alternative points I Actually didn't must open the Explorer now nonetheless then I merely wished to Confirm with out dropping any time um as To is it confirmed or not or is there Any sort of error which is going on nonetheless Then I consider we're on track Cool Um now that like um now that we uh it Has confirmed success completely and each factor Is on the observe let me merely look at Yep uh so yeah like to start out with Congrats for deploying your very first Contract on the model check out that you have Compiled this the wise contract and in addition you Have moreover deployed it on the battle Tested as we would see from the Transaction itself it took us to Mantle's uh check out net Explorer and we Could see the block it was created and Also timestamp when it was created Um yeah so yeah congrats Um moreover now Coming to a few of the in uh like More thrilling parts of the session would

Be uh interacting with a wise contract That is what we will do subsequent Um now inside the deploy contact Section you Should uh now the deployed contracts Section must be actually populated With a number of knowledge correct should you occur to Expand on the contracts over proper right here you Should be succesful to see additional knowledge Right so what is going on over proper right here uh If you go to deployed contracts uh merely I can uh merely beside it on the becoming Side it says copy should you occur to repeat it it is The exact sort out of the contract which You have merely deployed we will Use it uh barely later Once we're achieved with interacting with The smartphone tract Right Um so what's that this uh retailer so like I Said this contract that we compiled it Actually does the students it outlets the Info and it reveals an knowledge so beneath Stores merely write any amount that you just Want your contract to retailer Let's say I want to provide it 26. Okay Make constructive that you just're heading over to Your metamask Confirming the transaction Pending will await it to happen And by then yeah Um so like I was saying this solidity uh Uh the wise contract that we had Written uh it merely does two points for

Now nonetheless then finally we'll be scaling Up uh like we'll be trying out our biggest Uh by way of scale up by way of the Walkthrough intervals that then Eventually create our private custom-made Contracts like that is the end goal Um we're happy to help and guarantee You're dropping us any sort of questions That you could have all by way of the walkthrough Or any sort of uh questions or doubts You have for even several types of points That you might be using or any kinds of Other IDE uh be at liberty to tag us there Cool Um should you occur to can see the show display screen uh it is The transaction is unquestionably achieved uh Which is pretty excellent Um so the function that we generally known as It is unquestionably confirmed cool Uh we are able to even affirm this by occurring To Explorer later nonetheless then now we're in a position to Also check out if it actually labored by Calling the retrieve function so merely Click on retrieve It says identify identify from this block to Storage that's actually our pockets Address to retailer dot receiver which Received the that has been saved which is Actually 26 C Um so yeah we're on the becoming net web page uh We are actually Um Yeah I was merely wanting on the terminal

For a second uh nonetheless then yeah I consider Everything appears to be good we have got deployed Successfully after which we have got uh Interacted with the wise contract as Well on the mantle check out net uh Yeah now I consider Um that covers each factor that we wished To sooner than we switch on to find or to us to uh what all the Information we're in a position to uncover in regards to the Contract Um Congrats for deploying your very first Contract beneath the mantle check out net if You have any doubts as soon as extra be at liberty to Ping us on Discord uh and our devs and Our assist workforce will probably be ready I'll Also be there to answer any sort of Questions correct excellent Moving on to learning the wise contracts Onto the mat on using the mantle Explorer correct uh so let's attempt to Explore all kinds of info that we're in a position to Find in regards to the wise contract which is Deployed on Explorer uh first let's go To Explorer Right the place is Explorer Cool so the Explorer internet net web page correct now For testnet it appears to be one factor like this Right all you wish to do is return to Your remix IDE Um Under deployed contracts correct beneath Deployed contracts you presumably can see there's a

Copy merchandise icon over proper right here merely make certain To copy it copies the wise contracts Address return to your mantle Explorer And then paste it over proper right here yeah So one in every of many necessary reason why I protect The Explorer issue on the highest is on account of It went typically it does take time for The wise contract to level out up on the Explorer nonetheless then it'll positively does it On the battery testnet uh it is pretty Fast Um nonetheless then yeah typically attributable to Congestion or presumably the remainder it Might take some time uh there are moreover Instances the place metamask API simply is not able To fetch it in precise time there could also be Certain conditions like that as properly so That is why in between I was occurring to Mantle check out net to look at Um if our contract was actually deployed Onto the check out set cool now let me look at As to what's occurring Cool If we go to the transactions tab that's Important for us not lower than at this stage To understand you presumably can see our contract Was actually created who created the Contact it will probably be your pockets sort out That is there and likewise the contract Where the ID was uh the contract uh ID Where your entire factor was moreover created Within uh one in every of many points to try Is you might also look at the block amount Which was moreover given uh in the middle of the

Transaction as properly it was uh the Contract was created 9 minutes up to now And then we moreover had a contract generally known as Just a few minutes once more after correct so We did two kinds of transactions as properly Where we would have liked to approve these Transactions or metamask as properly should you occur to Remember Cool Also should you want to fiddle barely Bit uh one among Cool points to take a look at is clearly you Open your metamask be certain you're on To the mantle check out it and that you just copy Your private pockets sort out and see positive to What kinds of transactions have been Done Cool so I've it should you occur to go to the Tokens tab it might probably current you as to what All tokens could be discovered correct you presumably can It tells me that erc20 type there's Three kinds of token bit token clown and And moreover beneath transactions over proper right here You can see the an identical kinds of Transaction that we made out our contact Creation was there and our contract identify Was moreover there 5 minutes and seven Minutes up to now So yeah Um Uh If your fifth like feeler should you occur to essentially really feel Like having fun with throughout the Explorer a

Little bit additional then you definitely presumably can uh Definitely check out S2 token change Tokens inside transactions and in addition you Know fiddle us too with others Deployed contracts on the psychological check out Set as properly and look at as to what's Going on there uh could be truly cool To take a look at some that everybody Is able to find uh and what all Information they will get Um nonetheless then positive like thanks as soon as extra for Tuning in to this transient walkthrough Right Um And then yeah like even sooner than one thing Like congrats as soon as extra for deploying your Very first contract onto the mantle check out Net Um proper right here actually we've lined main Onboarding by establishing the metamask Adding mantle examined to it manually Followed by getting jeed and some bit Tokens uh for the wise contract Deployment moreover after deploying we Interacted with the wise contract which Was principally principally a mutation Function and now we have been storing a value Uh We've moreover even lined uh Explorer Basis and checked if the wise contract Was actually deployed on the check out net And furthermore uh the various Transaction calls which were made Um except for that Um yeah hoping this walkthrough

Um was an excellent start to getting onboarded Onto the mantel's current check out that uh We encourage everybody to start out out setting up Cooled apps and Uh any kinds of enterprise that you have in Mind on to the material check out set and Reach out to our workforce with demos and any Sorts of questions Um deliberate to preserve your keys private Obviously now no particular person from our workforce would Ask you for a case ever Um yeah protect setting up protect transport Um you be at liberty to achieve out to us on Our Discord Um Thanks as soon as extra and see you inside the subsequent one