Mantle Hackathon Workshop:Building on Mantle What you need to know

Mantle Hackathon: Building on Mantle Workshop · 38:57

Whisker introduces Mantle’s modular Layer 2 architecture and demonstrates deploying and verifying a smart contract with Hardhat. The workshop covers network setup, developer documentation, data availability, and questions about bridging, interoperability, and rollup proof systems.

Speakers

Topics

From Mantle Hackathon: Building on Mantle Workshop, hosted by OpenBuild.

Transcript

hello everyone I am jardan Singh the developer Advocate at open Bild and we are thrilled to have you all join us for today's live AMA session uh open build is an open source Community our aim is to empower the developers our aim is to educate as many people as we can about web3 about blockchain so in today's session we have with us uh whar Vu from mental team which is a blockchain researcher he would be taking us to the recently launched hecaton he'll be taking us to the flow of the hecaton how we you can participate how we can participate in this and we can win the prizes together so this is going to be a stepbystep

process whisker is going to explain everything to you in detail if you have any doubts then the after this whisker's presentation we have a live Q&A session as well so you can just ask your doubts there and we all said so this is now over to you whisker please yeah thank you Jay hey guys welcome to today's hexon workshop and so at first let me introduce myself briefly my name is whisker um currently work as a blockchain pro protocol researcher in mental in the mental engineering team and I'm also responsible for the related technical writing work yeah I think that's all from me let me introduce today's presentation content first I

will introduce use what mental is giving you a basic understanding of mental then I will de demonstrate how to deploy a smart contract mental using our developer tools and how to utilize our documentation to assess useful information yeah and finally we we will have a brief Q&A session where you can ask me any question you want to know and I will try my best to give you a perfect answer yes oh and and another thing is that for this presentation I assume everyone has some basic knowledge of blockchain and ethereum so I won't cover too much fundamental information of course if you have any

question during my presentation feel feel free to interrupt me at any time now let's move to our first topic what's mental simply put Mentor is is an option execution solution for ethereum scaling yes of course mental is a layer to solution as you can see here mental can significantly red reduce transaction fee and latency we can greatly improve execution efficien efficiency at at same time and while a transaction on isum might cost several dollars or even tens of dollars and during Network congestion you need to keep increasing your gas fee

to ensure transaction inclusion or mental you your transaction fee will will be close to their Ro yes maybe less than one one cent per per transaction and like other L TOS Mentor also has much higher execution performance than exet supporting High supporting High TPS and expanding eum capabilities and secondly mental features a mod design yes we amount first or one of first modular lay to to Launch main net we decouple execution consensus and settlement function we provide the evm compatible execution layer or mental we

also complete transaction uh we complete transaction and state trans transition of chain and we were using as the final segment layer for automate State transition yes like other layer tools and third one is mental inherence isum security we all know isum is one is currently the largest as blockchain with very high security and mental Leverage is this security to ensure the valid validity of layer to State transitions at last M to introduce a modular data V layer we currently use Mental da main which is a DA solution powered by agen da yes agen da is build secur da layers

through resticking as we all know this greatly reduce the cost of storing data directly on layer one okay cool so here is a mental architecture diagram and a simple high level workflow introduction in simple turns the transaction flow on mental can be broke down into these steps and the first one is is transaction permissions users or developers can send their transactions through RPC as you can see here and the second step is State transition transaction are submitted submitted to mental sequencer here which is a op components that handle ordering and

execution secur sequencing all transaction and completing State transition and the third one is batch bmit uh they are two components in mental handle transaction transaction batching the first one is op Bater and op Bater packs blocks built by sequencer and send them to the mental da for data storage and another one is op proposal op proposal sends the op State Route directed to ethereum mainnet as we can see here the last step is finalize or finalization transaction finalization require a challenge period because we are optimistic roll up during the time

the verifier can compare mental state rout on isum Serum with block data obtained from mental da yes if they are any difference they can initial a challenge so after this challenge period pass passes the transaction is considered finalized yeah that's uh high level workflow introduction and let me explain how mental as a blockchain built on op stack different from other normal op stack based row up they are two main difference differences and first one is M to natively use MNT as its gas token which will Empower MN token of course the

interesting is that we recently see optimism actively exploring the Sim similar possibilities about that they have proposed a proposal called customer guas token in op stack and we know base which is one of the largest op stack op stack based train right now right now they have used used usdc as their custom as their gas token so which is pretty interesting because we all know the normal orops we all use they just use is at their native gas token so the gas calculations are in easther units right

so thanks mental use MNT we need to introduce a parameter to bridge this gap which called token ratio and token ratio is the price ratio between e e and MNT which can be obtained through mental Oracle this results in very large gas used value a mental and we will say it later and since the original gas use need to be multiplied by token ratio yes but don't worry about that mental transaction fee still is one of the latest of so many rups right now and the second one is we meant to use a third

party data availability as our d as you can see here our transaction fee have significantly decrease after the upgradation here and our Test shows that you can complete a transaction for less than less than one cent and here is our mental V2 technology F FAL case you can see yes it's pretty pretty cheap I think yes I think in next section I will show you guys how to deploy a smart contract on mental So currently mental supports multiple developer tools to deploy and verify smart contract and uh I won't show every

TOS due to the time so and and I will show you guys how to how to use hard hat as a smart contract deployment tools before that there are some Ino informations you need you need to know first one is basic info of course we need to know the network details and uh also we have some onboarding tools and some TR shooting FAQs you can get get this information from our documentation yes you can enter our documentation and find the is quick access in for developer section here this is our Network details and Main net and test net and our onboarding

tools of course you can have a foret to get some testet token and the bridges and pay attention to this we didn't spot solidity compile version so make sure your solidity compile version is lower than this this version yes and there also some more advanced tutorials the first one is how to optimize your transaction fees you can also find these here in our documentation yeah we we also have some tutorials to to tell you how to deploy and verify contracts you can find them here how to guide how to deploy smart contract and how to verify

smart contract yes and the third one is how to use Mentor SDK to bridge ass set it's a pretty interesting tutorials we have our own SDK and you can use our SDK to do some interesting try to bridge assets from other network to Mentor yes current we support mental and ease and every see 20 tokens yes and last there is a trouble shooting page here you can also find here so if you have any question make sure you have check this page at first cool so it's demo time okay so now I will show you guys how to deploy smart

contract on mental yes I will use hardhead as our as example the first thing you need to do is yes let's create a folder callshop test and make sure you have already install hard hat now I have installed it yes okay so first one at first you need to initial project and then make sure you have add all things s and hardhead and we will use do INF as a deployment choose here

so so let's wait for is install yeah I think let's do some thing we need to prepare the first one is make sure you have your wallet here I will use M metamask as an example and you need to create a new wallet make sure you have import mentoria test net test net information and I have you can add a custom Network here and the field all information we can get from the quick access Network details here yes uh yeah I have imported and you also need to have

prepare some test token which you can find here we have our foret here and you need to authentic your Twitter account and you can get 1,000 testet token for free yes cool yes I think we have we have prepared all things need to create your own project hardhead project here yeah I will use type types as example yes yes yes we need to wait for this and if you have any any question I think you can find all things from our

documentation the first page you need to know is this quick access I think you can get most of your questions answers here just wait a [Music] second cool so we can see every dependency is is ready there are some demo contracts devoted in a hardhead so we will use this as our example contract and deploy it on mental and verify it at same time yes so the first thing we need to do is you and yes we need to prepare this and you need to fail your account privacy priv private key here so how to

get a account private private key you can open your M mask and find click this get Account Details and choose show Private key here enter password yeah this is your private key here yeah copy it pass here so make sure you won't link your private key to the public uh this is brand new account so I will use this as example so don't worry about that yes another thing is that yes we need to change this config hardhead config now

we can see it's a default configs and we we need to add some mental Network config configuration ation which we can find from our documentation you can see here so copy this and re replace it yes I think it's good so one thing you need to pay attention is that we can see here the example can check they are using the solida compile Val version is 27 Which is higher than our recommendation so I will replace replace it to the 19 yes yes I think now we can

try to deploy this contractor mental so there are two ways to deploy a contract uh the first one is use npx hardhead and ignation deploy yeah you need to set deployment ID this parameter here to deploy this contract and I need to add another thing yeah don't worry about that it's a proed to to prevent time out and I think you guys don't need it so confirm deploy

deployed network mentoria of course yes and then it will compile your smart contract and try to deploy it to man po Network so when you doing your taxon project you need to replace your smart contract here and do the same things try to deploy it so now we can see it's success and it's successful and this is the Smart contract address and let's copy it and move to theal Explorer here and choose man to test net make sure you have moved to the test net

Explorer yeah C I think this is your smart contract we just deploy it 30 38 seconds ago so the deployment is successful and next we need to verify our Mar contract which will will make our project more more stable yes and more trustable of course so how to verify hour smart contract uh you don't need to do much more things all you need to do is PX hard hat so I will direct to

copy the command here yes MSR head ignition verify and fill your deployment ID at last okay there it says we don't have our scan API key configured yes we need to configure our is is scan API key so how to get our is scan API key we will use our Explorer so make sure you jump to the mainnet Explorer Network you need to log in here to make sure you have loging and choose API Keys here and you can add your API key here

so it's a free API plan the limit is five five course per per second and uh copy this API key and you need to enter this and uh I think yes configure it here and we also need to change our hardhead configure here yes you can get the verifi configuration here yes you can see here let's copy it and replace it so let's try again I think it should

be work it's verifying the contract it say it's successful so now you have finished the deployment and the verification and if you want to do it at the same time we also have another way so you can find here yes I think you can find here the first the the first way is that verification during the deployment okay not this one so just hold on a second oh I think it's this one use verify flag so let's try it so it's

deploying yes deployment is successful and it's very fry yes I think everything work everything works here so you have finished finished the deployment and the verification at one time I think that's all from me and please pay attention that if you have any questions so the first thing you need to do is enter our watch documentation and find find answer here yes we have 4er section cool I think yeah that's all for me let's jump to the QA time hello hey Jay hey uh thank you so much whiska thank you thank you for taking us all to this it's so

nice uh of you to explain the details and to explain the deployment process in a so simple manner thank you and uh now let's move on to the live Q&A session let's see the doubts uh if the audience is having any doubts then let me just check cool okay so the first one we have here is when it comes to security how does mental ensure that everything's safe especially with data availability and to fight against the frauds that's a pretty good question we all know optimistic roll up need to fra proove or some other other proof system to prevent to make sure your transaction is is

everything everything good so currently we don't have we are not prepare we are not have overall for proof system right now and we of course we are working on that that's our highest priority work yes you mentioned external data layer right so our solution is that on on our main net we are using mental da which is powered by addon da which is a reaking system you can current eum etherum security by using ag ag functionality and reaking things yes and currently we are testing the egund da functionality

our test net and if everything goes by we will move to the DA uh our minet yes I think is is trustable right for you guys yeah thank you for telling us and uh looks like Okay so this remains your top priority and soon we'll discover some solutions coming in that's uh great uh the next one we have is Will mental be Ron will mental be rolling out more tutorials or resources for the community to learn and grow so what kind of plans do you have with the courses and the uh learning resources for the developers as I mentioned before we have our SDK and we also have our to tutorial for this SDK our documentation and I

think currently we have a overall documentation for developers and you guys can find uh most of your questions answer our documentation if you have a question just find the the documentation if you can figure it we also have our developer success colle here colleagues here and we we all know the developers is is very important for our community right so we we prepare much more things for them if you have question just reach out to us and we will we will let you know what's wrong with your problem and we will try to figure it out yeah try try our best and also we have much more haxon and workshop we have maybe more

than 20 Workshop or haxon in in the last year yes that's that's kind of cool yeah yeah we we know developers is important and we also want to invite as much as we can as much as developers we can invite to join our ecosystem yes that's great that's great and you know for every blockchain developers are the top priority the users the developers the community uh the more we have them the more stronger the art ecosystem becomes uh that comes to uh my doubt personally I was having like what kind of developer grants are you guys offering for the developers what tracks are there uh are there any grants available we all know

we have ecosystem Grant like 200 million I'm not sure about that but you can go at it so we also have some Grand page on our on our website you can reach out there and find if you you are interested on that and you can join it and apply Grant here yes okay okay the next question we have from the community is kind of like a followup only so what kind of support does mental offer to the developers are there any specific types of teams or projects that would benefit the most so is there any specific Niche that you guys are targeting like D5 space or uh that is more likely to get

the more support uh are you guys having something and what kind of support do you guys provide I'm not sure about that but from currently we have list most of our developer things and information our documentation and I think you can find guides and some resource and tooling things all documentation and also some optimization to how to lower your transaction fee yes and if you guys have any thoughts on that please let me know and I think you can reach on me from Twitter and thought other ways of course and uh if you have any question just feel free to reach out to me and I will

try to figure it out and maybe yes complet our documentation yes okay that's kind of great so the next question we have here is how does mental handle interoperability with other Layer Two networks oh that's a pretty in pretty interesting question and if you guys know it we have posted a Blog recently called how to I'm not sure about that but this this blog is about how to build a cross roll up by using currently supported ERC and or Erp and also we have some did some research on this these narrative things we did some

research on let me other yes we are concentrated on this of course and we all think interoperability is is pretty pretty important and interesting things in ecosystem eum ecosystem since we have complain about the fragmentation in their two or robs ecosystem right now so currently uh I'm not sure about that but we are working on I'm not sure about how if I can say that but we are working on integrate ERC uh 7683 which is cross intent Erp proposed by Unis weap and across and we are working on that have integr integrated

on that to support if if any other robs want to have some in Cross Rob transaction or contract our car to mental yes we are prepared that of course yes and we also dis some research on CH chain abstraction which is also Hot Hot Topic recently and uh I think we will have we will see more progress in the future yes I think I can't say too much on that but let's see yes well still without revealing much you have like given High Hopes to the community I guess the question took out many things from you the team is working on like what kind of

things the team is working on and that's really great of you to share them with the community here uh so uh going moving on to the next question uh going through the docks can you shed some light on how mental handle L1 to L2 bridging or bridging to other evm l2s so how does mental handle that and anything any just a basic idea of it give the community we have a bridging tutorials about how to bridging assets to mental from from room yes I think yeah I think you can FOC it and try to figure it I think all all things you need to do is do some

small changes about that yes you can reach out to the mental documentations bridging tutorials using our use Mental using mental SDK yeah that should be work okay thank you thank you uh moving on to the next one how does mental manage to keep transaction fees so low while maintaining High throughput I think the important thing that we still use external da a third party data availabity layer we call it mental da and which is powered by da we all know eum eum is not cheap even though we are using blob if we are using blob as instead of code code data to put

published to ass Asser that as we can see many op stack based robs they are using blogs right now but I'm not sure have you guys noticed that base they have explor their ecosystem so they have very very high TPS recently and have much much more transaction recently and in the part they are the one of the lowest the lowest transaction fee in the rup ecosystem and right now is it's not cheap enough and you can see it and but we are still stable for for our transaction fee around one cent maybe less less than one one cent and because

we are using we we we won't you we we we didn't use blob to publish to eum and we still use external data data available layer so most of them most of our data storage will store offchain and we just published some State root to the onchain there I think that's why we are still cheap one of the cheap isup in the ecosystem yes yeah thanks for shedding light on that and uh let's move on to the next one so the next one we have right here is between the ZK rollups and optimistic rollups what's mentals plan for the future so uh can you please elaborate a bit about the both and then

what's your plan for the future it's also a interesting question for me and also a difficult things for me because I I don't know if I can say that and I can't explore too much information I think as I mentioned before the proof system is one of the highest PRI priority things for our engineering team and we need to make sure our rups is is valid uh our robs validity is is Rob robust enough for the users or the the developers so we all know optimistic uh robs will have have a challenge period maybe seven days and we also know eum

system eum Foundation are working on the fast finality things maybe uh single salute things of course and to and and we know optimistic optimism they are also working that they have tried to figure out they have tried to fix the problem of the seven days challenge period and we know they rob they they just have maybe one hour or just one less one one day to finalize their transaction that that's pretty faster than optimistic rup yeah and I think all all optimistic R up they all want to fix this problem to prevent seven days challenge period that's bad

ux for users of course and we are working on that for a while I think I won't talk too much about that but I would say we have try to talk with so much team about that we know we have risk V and suing team they are they all working on the integration with OP St right the risk Z they will they just offer a solution called they they K hypd roll up yeah they have this solution and uh in normal uh the Dr is still optimistic so which means you you you don't need to generate sty proof all the time and if you have challenge period

you can use risk leral they will Pro they will generate they can prove and at that time it just pretty like uh they they can roll up and uh you don't need to wait for seven days challenge period uh and uh that's what they they think uh and we all know many community members are doubt about that but I won't talk too much about that but but this is their solution and and snc and they also they also provide a solution but uh it's uh it's called op op succinct which they have offer uh to to help optimistic roll

up to move to they roll up similarly which is pretty interesting things right so which means optimistic optimistic R up can can can be are they roll up maybe they they they think they can do it in a day or yes it's pretty fast and I think it makes sense because most of toix Rob team they are trying to fix the challenge period if they are using op6 they can move to they can roll up there the challenge period is gone long and yes you don't need to wait to seven days and that's our that's our research on that and we I don't I don't want to talk

too much about that and I don't want to talk too much things about our plans because I think that's that's enough for you guys to know there there's two solutions right now in the ecosystem yeah they are all the solution for try to fix the challenge period and bad your accs and uh let's is who let's see who we weighing yes yeah I get it I get it so whiska does not want to Spill the tea he does not want to reveal everything but at least he has given us our glimpse so that's really fine I guess you believe in the ideology of move in silence and let your success make the noise so that's that was great that at least you told

the a brief overview about what your plans are and how you will be proceeding let's move on to the uh hello hey welcome back J okay okay I don't know what happened so the question is how does mental Envision itself in the web3 industry and what does the future look for like for you like how do you see yourself in shaping the future of the industry okay so we all know man has has a pretty big treasure and we are concentrate on the etherum ecosystem and we want to make etherum great again of course and we are trying to trying to

fix the problem of problem of eum I would say that low performance as we we we offer offchain scaling School solution and we are not like other op stack op stack based Ro up we have our own features like custom to gas token and AER a third party data available availab data availability layer and which make us special in the ecosystem so our vision for the future is that we first all we need to provide a better ux for the user of course and the developer and how to do that we need to make our

protocal more more more stable and rear of course that's the most important things of course that's why we uh the proof system is our highest Pro priority things and another thing that's how to fix how to make our ux better and that's why we are also concentrate on the things of like how to fix the challenge period of optimistic row up and of course the interoperability things and how to how to implement maybe a CH abstraction solution of op stack and yeah that's our vision for the future we the most important is that as I

mentioned before is ux yes so I get it the ux remains your top priority and uh that that's really great so uh for now we don't have any more questions if you want to share anything any upcoming news with the community uh any exciting news then uh you can proceed ahead the questions I can see there are no more questions right now uh yeah V anything else from your side no I think everything goes for from my end so thank you so much for joining and it was great talking to you it was great having you with us here so for all the audience you can just participate and see all the rules um they are clearly specified in

the hackathon manual uh so you guys can participate whisker in this session we went through the whole flow of how you can deploy your contract and I would like to thank wh again for joining us for explaining it so nicely uh for the audience we have a lot of plenty of courses on our platform you can definitely visit open build. XYZ and see so uh that was it from our side guys uh thank you all for joining us bye-bye thank you J yeah yeah thank you