New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

Moonbeam: An Ethereum-compatible parachain on Polkadot with Alberto Viera

ETH WarsawThu, Oct 7, 2021, 12:00 AM

Speaker

Alberto Viera

BOUNTY LINKS: Moonbeam: https://gitcoin.co/issue/PureStake/hackathon-0x-moonbeam/2/100025702 https://gitcoin.co/issue/PureStake/hackathon-0x-moonbeam/1/100025701

Transcript

it's connecting yeah welcome back uh hello alberto all right nice to be here guys alberto is a developer relations manager at uh pure stake and moonbeam uh so as i mentioned before he's gonna give you some more background and uh info about uh bounty sponsored by mumbi uh so yeah alberto the stage is yours thanks thanks for the presentation and truly uh happy to be here hopefully you guys hear me well and yeah i'm gonna talk to you about today about moonbeam which is a smart contract platform that is ethereal compatible on the polka dot ecosystem um i didn't do like a like a like a whole technical a huge technical demo or presentation what i'm gonna do is provide some some slides to to for you to get to know uh moonbeam and also uh some some d-apps examples that we've built uh on top of our testnet so i i guess you can see my screen now uh so yeah before actually i i go into the presentation i just want to do a very quick demo right um if you're familiar with the ethereum environment an ethereum developer uh and you're an ethereum developer uh you might have known remix so remix is a web-based browser a browser-based tool to compile and deploy smart contracts as you can see right here i have an erc20 token contract from the open sampling uh code base and i'm going to deploy this erc20 called xerox 0x hack moon and then 0x moon as a symbol and i am already connected the contract is already compiled i'm going to go ahead and deploy you will see that i have i have a metamask pop-up i have super zoomed in so you guys can see and i'm going to go ahead and confirm this transaction so this is uh you know a typical kind of like workflow when you're working with remix and with open sampling or any kind of like a smart contracts and remix and you're using ethereum sorry metamask as a web3 provider for remix right you can see i mean you can you cannot see it but you can see down here that my transaction has already been confirmed i can go down here and check my erc20 token contract as you would expect i can go ahead and copy the address go to metamask paste it here and import the token to metamask right so the whole uh there's a trick behind all this right and what if i tell you that all the steps that i i just did are not against you know rinky b or kovan or any like ethereum kind of like technology stack based note right but it's against moonbeam or testnet moonbase alpha which provides a very friendly and ethereum compatible environment but it's built on a totally different technology stack which is substrate and this is what i'm going to present to you today it's it's it's what is what is moving right so um you know today's agenda is going to be a little bit introduction about moonbeam and i brought a bunch of the apps examples that we've built on top of our tested just to provide some ideas for the hackathon and i mean we're not going to go through the code because all the code is usually available on our github but you know we're going to see a little bit of how how what is the difference between a d app on moonbeam and at the app on ethereum and just to give you a preview there is actually not much difference oh and by the way feel free to ask any questions on the chat i'm looking into it on the other screen so i can uh answer any questions you might have um so yeah the first question it's it's what is movie right and moomin is a smart contract platform that it's built on top of the polka dot or kusama ecosystem so as a smart contract ethereum compatible smart contract platform we do have an ebm but the evms is just like the base layer of all the stuff that we've built on top of that evm we have different stuff that we've added over the time just to provide the the most seamless or frictionless ethereum compatible environment you might find on the polka dot or kusama ecosystems and this means that you know we support the token and different infrastructure integrations we have uh modified the substrate underlying account system so that everything is a standardized as an ethereum account and key format we're compatible with ethereum based tools that you just saw with remix and metamask for example and you can deploy solidity smart contracts and we also provide some composibility between the contract right um just if you're curious the name moonbeam comes from the jazz standard polka dots and moonbeams so we we believe that a multi-chain strategy makes sense because there are three main topics i'm going to only discuss two of them uh for time constraint purposes but a multi-strategy makes sense because on one side we have the lost market opportunity this means that a lot of users or use cases are being priced out of ethereum l1 due to high gas feed right and even though gas fees have you know reduced a little bit in the past month we're still seeing you know the deploying a smart contract can cost 200 300 depending on the gas so a lot of these projects are just priced out right uh a good example that i like to provide is that let's say i am a dab that needs to roll a dice on chain with a brf or whatever and it just costs 20 to roll a dice i mean this is this is something that is not feasible for a lot of projects but more importantly or also more interestingly is that you can be a first movers in new markets this means that your project can draw new users and gain access to assets that are not native on ethereum and we're not talking only about dot and ksm but also a growing list of new perichine based assets so all the all the blockchains that will live under the polka dot or kusama ecosystems are called parachains and they will all have a lot of assets that are just new right and one of the cool things about polka dot or kusama is that these blockchains called parachains will be able to communicate with each other on a native level and this means that if you deploy your contract to moonbeam your your project will have access to all the assets that are in the polkadot usama ecosystem not only so basically a multi-chain strategy looks like this on moonbeam right so let's say you have your solidity or viper anything that compiles to to evm bytecode your contracts here and you can actually deploy them to ethereum but you can also deploy them to moonbeam and and basically you know access the whole polkadot ecosystem and moonbeam can act as a gateway for that right and and one example one really straightforward example is that let's say that you have your uh project already you know configured on truffle or hard hat or any other tool you can just change the provider and just basically switch from from the deployment to ethereum to the point to moonbeam and depending on you know how you basically configure your truffle deployment it can it could be a matter of like minutes or seconds right to to deploy them to to moonbase alpha or test it and just start start getting you know everything tuned up for a multi-team deployment some of the projects that i are working on moonbeam are sushi swap balancer ocean you know chain link human protocol and others that you know we have a growing list of of a a really big ecosystem that we're truly excited about what we're building right so if you don't read more information about the projects feel free to go to our website and you'll find a lot of the information there um so a question that a lot of like ethereum developers uh might have is you know and they can be a little bit of a skeptical right because we know that uh they're used to working with with ethereum tools and ethereum environments such as you know uh ethereum itself or like bsc which is still like a fork of ethereum but how do we bring ethereum compatibility features to a substrate-based tool so moonbeam is built using substrate which is a framework uh by built by the parity team in rust and and a lot of projects might just be a skeptical right so like how is the experience like what is the experience going to be when you're dealing with mumbi so before we go into this you know let's just do a very one minute recap of how like the ethereum json rpc works and this is how basically a lot of these tools such as metamask remix truffle or hard hat communicate with an ethereum node even though they might use some underlying uh you know libraries like web3 javascript or etherjs right so basically what they do is that they create a request where they're actually asking some sort of information and the ethereum node under send this request and provides a response so let's say i want to manamask wants to know the balance of an account that will say hey i want to know the balance of this address and the ethereum node will provide a response with the balance right um on basically on moonbeam or any substrate-based period chain uh the the main kind of like feature that provides ethereum compatibility is called frontier and this is my favorite definition frontier because it's the one that it's just easier to understand is that frontier will ask will be like a middleware between ethereum users or developers and moonbeam which is the substrate-based very chain right so everything the fema user and developer won't have to really like you know wonder how do i interact with moonbeam they'll just use their regular tools their regular experience user experience and frontier will act as a miller middleware that will translate from ethereum language let's say like that to substrate language right and the point of moonbeamer what we're trying to achieve is that if you at any moment uh hit a roadblock or you you say hey this is not like it was an ethereum we're not doing our job well and this is exaggerating a little bit but this is what we're trying to aim for right and so frontier is like a key feature in in playing this kind of role that it's it just provides like a black box definition where you don't have to understand what it is but you know it'll be the element that will provide the seamless or frictionless integration at a more deeper level how frontier works is that any ethereum json rpc or you know ethereum development tool will interact with the rpc extension that provides a web 3 compatible api and it basically maps everything to substrate runtime calls so that is why developers don't really need to worry because at frontier will will do everything for you we also have what is called pallet ethereum and pallet ethereum emulates block processing store invoked transactional logs and dispatchers to the evm back then so these two components are actually what provides like an ethereum compatible api and kind of like experience we also have a pallet evm and the rust evm which are basically the two components that you know provide evm compatibility so one thing is an api and the other thing is evm compatibility but basically at a very high level these are all the components that provide an ethereum experience on the polka dot or substrate uh basically technology so what does this means right so this is a lot of jibber-jabber uh what does this means at a more practical terms and basically what this is is that let's let's just use an example right if we go to the ethereum wiki json rpc api uh basically this url that you see right here is our testnet open url http endpoint and we're building a json rpc blob here where we're actually using the f get balance method and we're passing an address right and we're asking the the basically what we're doing is asking the node to tell us the the latest available balance of this address and the response from moonbeam will be this and this is exactly the response that you will get from any like ethereum node or if you're using infira or alchemy this is a response that you will get and this is basically almost 50 death tokens which is our testing token and of course in hexadecimal and in way units so this is once again what basically metamask is doing all the time if you actually see the logs you basically see that metamask is asking the balance of all the accounts that are available in metamask it's asking for the block number the chain id just to make sure constantly that this you're connected to the right place and the balance is getting updated as fast as possible and this is mind-blowing because what i mentioned before right this this means that developers don't really have to worry about oh jesus moonbeam this is a different technology i'm a little bit skeptical how do i get started another important thing that it's it's really important to understand is that there are a lot of like evm compatible para chains out there and and we've once again uh pushed really hard into providing a seamless or frictionless ethereum compatible experience and unified accounts as one of these features that separates ourselves from other pair chains that are offering evm on polkadot even compatibility on polkadot so unified accounts uh remember what i mentioned before that any para chain that uses evm pallet ethylene pallet and frontier is able to provide kind of like this ethereum friendly environment right but without unified accounts this is more or less what it looks like in this kind of like base baseline setup let's say user let's let's call her alice right if she wants to interact with the evm or the ethereum side of things or var like blockchain you know she'll she'll need a private key and a normal private key to sign transactions and that private key is related to an h160 address which is the the ethereum style address right and with this combination she can actually sign transactions and deploy contracts to the evm side of things right and mathematically mathematically this can be this address can be mapped to an h256 address which is the polka dot based style of address right and and she can actually do read operations for example of the balance the problem is that the private key is related to the h160 address and not the h256 address so it's related to the ethereum address and not the polkadot based address or substrate address so the problem is that she cannot do any transactions on the substrate runtime okay so for her to do that she'll need to actually create another account where she'll have a private key a different private key that is related to an h.256 address and because she knows that private key she can actually sign transactions related to the substrate runtime and those are really important transactions because they are related to governance or democracy and staking features so let's say alice wants to deploy evm stuff or the ethereum smart contracts she'll have to use that a private key right and for governance or it's thinking she'll have to use another private key and this creates a lot of friction because she'll have to wonder about two different balances and transfer balance from one place to another and it's just it's just it's hard right it just creates some some friction so what we did in moonbeam is that we modified the substrate underlying account system and we made everything work with the h160 address and private key pair right so you'll be able to do not only the ethereum side of things with your h160 address but also to do a staking and governance in in with your private key nh 160 address on the substrate runtime and the sec something that you can actually do right now um on on our poke you using the polka dot js interface with your like account that you got from metamask you can import it there and just you know do staking and do governance in our testing all right so let's go to to show you some stuff around moonbeam how you can get started you know we already saw metamasking remix uh we're gonna see how you can configure truffle and hard hat and we do have some ching ling and other kind of like d apps to show you around so let's say you're a developer and you're going to get started with moonbeam uh there are two let's say you're just starting there are two paths that you can take you can either build a development node or you can go to the test and moonbase alpha the development node is a very cool way to get started because it's kind of ganache right it's a it provides instant seal this means that a transaction a block gets produced every time there's a transaction in the pool and this is super fast for development you know like you can send 100 sections in less than three seconds or so there are two ways to build a development node one of them is with a docker image uh or you can clone the repo compile the binary and run the binary uh the docker image can get you started in a matter of like less than two minutes building the binary it's it's cool but it takes roughly 30 minutes so i mean depending on your machine so we tend to you know tell people that the docker is the right way but you know you can do both both uh things on the moon itself uh side we provide an http and a websocket endpoint we do have a token faucet and discord that you can get some tokens to start playing around and we do have staking and governance features there you want to also play around with those features uh as a developer so if you want to build a development node uh like i mentioned before the darker way is the fastest way to get started if you have docker installed basically you just run this command and it just it will pop up a movie development node uh where you have two endpoints available on localhost the http is in port 9933 the websocket endpoint is in port 9944 i just added some extra flags that you can run uh on the development node these are real really helpful in case you want to do different things for example let's say you want to create a you don't want to have this instantial feature do you want to have a you know a block produced every x seconds you can use the ceiling flag and provide the time in milliseconds and there are other flags you can see on the screen that i'm going to go not going to go through them all right if you want to build the binary you can just clone the tutorial the repo and build it using this steps like i mentioned before it takes roughly 30 minutes it might take a little bit less or a little bit more depending on your machine and then you can run the binary using this command down here for the test net is is even more straightforward to get started with the testing because they're already an http and websocket endpoint so for example metamask if you want to connect to it is super fast uh for example i provided some code snippets here let's say you're using the web3 javascript library you just import the npm package and then you can just create from the web3 constructor create your web3 instance by providing the the http endpoint right it's just that easy to to basically port the web3 javascript library uh to moonbeam so instead of using like an infira or alchemy api you just put the httpn from endpoint from the test set and that's it that's the only change you have to do on the web3 javascript library an ether.js depending on the json rpc provider that you're using we tend to recommend people to use the static json rpc provider you need to pass in the uh the http endpoint the chain id and the name of the network this is not entirely necessary but if you're using the static json rpc provider this is what we recommend for truffle and hard hat uh you might have just guessed already that you know you just need to define a moon based provider uh you you can actually a moonbeam network moonbase network sorry you can use hd wallet provider by you know just giving a private key and the http endpoint and the network id and with the hard hat is super similar there's not a lot of stuff that you need to change just to find a different network with the configuration that you see on the screen so basically like i mentioned before it is just that simple right if you already have a deployment script that is using truffle or hard hat um it's just defining a new provider and just deploying and it just it might take literally two minutes to change your your configuration to to be able to deploy on moon moon-based alpha yeah so um what i want to do now we still have a lot of time so what i want to do now is go through some examples right so we do have some ethereum d apps running on moonbeam going to go through them a little bit so you can see more or less uh how he incompatible we are basically and so let me just um do this and yeah like i mentioned before you saw remix uh you can see at the top part of remix that i have the ejected web3 provider connected to the testnet which is on chain id 1287. um you have metamask metamask is connected to moonbase alpha as you might have seen in the top right corner i do have for example some dev tokens some erc20s that i've deployed and you can see here our 0x moon token that of course you can just use metamask to transfer to another account that you have and we can just provide here let's send this person a thousand x 0x moon tokens you can see here i can just click next confirm and the transaction is queued and if once this transaction is confirmed we can actually go ahead and view not an ether scan oops sorry about that not on easter scan we could because we were not there yet but you can copy the transaction id and go to our explorer that we're running which is block scout and just go ahead here and paste it but i mean the transaction has not been mined yet but usually it takes 12 seconds or so uh it might take two blocks because you know we're getting a lot of transactions per day nowadays on the test net but this is more or less uh how it would look like if there you go it's already mined well it's not mine because it's in in polka dot there's no mining right but it's already included and i can just go ahead and search for this transaction on the block explorer and you can see here that hopefully you can see this that this is already you know this is the nons the transaction fee transaction speed and you can see here that it was just you know a recipient of a thousand well i mean some tokens here so the easiest way to get started uh connecting metamask to our test set is that we've included this latest metamask feature that you can just create a button and just you know in our docs side that you will find in our in our website you can just click here and connect metamask and there will be a pop-up saying hey this this uh this website is trying to configure metamask uh you know and you can just click next and metamask will be automatically configured so you can uh just get started super quickly right if you're an old-fashioned and you want to just go ahead and do it yourself you can go to our one of our tutorials that is integrate metamask where we have also the button but we also have like you know a step-by-step guide of how you can get started and connect it to moonbase alpha the old-fashioned way of configuring the network yourself but yeah basically it is that easy to get started you can see here that i already have less 0x moon tokens and so yeah let's just go ahead and check some d-apps right so the first one that i want to show you oh there's a question nice um can we deploy uh our dia on moonbeam to web using web3 same as we do with ethereum yeah exactly you can do it that's that's the beauty of moonbeam you can basically just define let's say that you're using truffle or a hard hat just to find a different provider and and that's it i mean you you've deployed your your contracts to to moonbeam and from the df side from the front end i'll just show you how easy it is with actually this example so what we see here is that we have the moonlink oracle dashboard and this is basically uh an oracle that uh a dashboard that we've created as an example for for uh uh for chain link on moonbeam right so changling provides two ways of getting uh the price feeds or the price data on chain so one of them is a data price fee and this is only doing great operations to smart contracts as you can see here we have token pairs ptc eth dot ksm and our chain link configuration updates the price every hour or if the price changes uh more than one percent it will update it as well unchained so this is the price information that you can see here um the basic request model is a different way you can actually see how the price of btc has dropped because nowadays it's roughly 45k and now this is this is was updated may 12. so you can see here that we can actually request a new price of btc if we just copy this job id and we submit a transaction oops this happens when you have metamask like super zoomed in so yeah exactly so i'm just looking at the answer yeah you just need to change your rpc in metamask and that's it it's super convenient and that's this is what i what i mean that uh me being a developer relations engineer uh for us it's truly important that the experience that you have is exactly the same as an ethereum right so we truly appreciate any feedback that you have while you know deploying your contracts or deploying your df to moonbase alpha because for us you know like i mentioned before if you hit any roadblocks on ethereum compatibility we're not doing our job well so we're trying to push for that uh really hard so yeah i mean uh this if you want to see the code of this uh dashboard you can click here and this will take you to a github repo that we prepared with all the code that builds this dashboard for you um just to let you know that you know this code is not you know something fancy or anything it was written in a way that is very understandable and one of the one of the things for example that you need to change in terms of the the provider is that in this case what i what what this code snippet does is that hey if if it detests meta mask and metamask is connected to the chain id that moonbase alpha represents just use the metamask provider right but if we're not uh we don't detect metamask i'm just defining the ether.

js static json rpc provider with the moonbase alpha kind of information so this is a way that you know it might just be different uh if you for example want to provide compatibility for kuvin in our test set you might have to change this snippet and also this snippet depending right on when you're what you want to provide to your your front and your users but this is basically it this is like the main code snippet that will provide the the web3 instance uh that you need in order to get started and like i mentioned before you can either use it with metamask and use a provider that is injected uh by metamask depending on the network you're connected uh and on the other side you can just provide a static provider just in case that user don't doesn't have metamask because for example in this example uh this information is all read read operations right so the user doesn't need to send a transaction so it doesn't need metamask signer right so only by providing like this http endpoint you will be able to see this price information even though metamask is not installed and down here you can see that this price was already updated and you can see the timestamp here and then this now represents the same more or less the same price information as this one right all right hopefully this this is more or less clear like i mentioned before we we provide a lot of code snippets and and repos uh in case you're interested and you want to check this out uh for some uh for some help right um another d app that we've created and this is cool in case you want to use like you want to deploy kind of like a d5 kind of thing or a d app that uses erc20 tokens is that we've created a near c20 token faucet for the tesla so um there are basically eight tokens that represent each planet and the ninth token is for pluto because pluto is not a planet anymore for some reason but yeah basically the idea is that you connect metamask to to this d app and you will see your balance you can see here that i have no mercury uh token balance or no venus token balance and you're actually limited to a hundred tokens every hour uh so the idea is that for example let me go ahead and sell uranus tokens so i can go ahead down here click on the planet name and then just submit transaction and once again metamask will pop up i said it would on a theorem right so this is a very ethereum like experience and i'll just confirm this this this uh the transaction once the transaction is is confirmed and it's included in a blog we will have now 200 tokens uh and then this boolean will set to false because i have to wait another hour or so to be able to mint so we've provided all the token addresses here just in case there we go you can see that i have already 200 and this boolean is set to false we've provided all this uh token addresses in case you want to implement them and your solution your d app or anything and you can you know tell people to come here to mint tokens and interact with your id app if they want to so as an example of of this df implementation uh we can go ahead and go to to movement swap so this is basically uh a uh a uni suave v2 deployment that we did on our test net and it's we called it moving pop for fun but it's just a way to to show people that you know building on moonbeam in this case a moon based alpha is really easy and it's really easy to port projects if you already built that the app for ethereum you know uh building uh deploying that d app to movement software or moonbeam is very straightforward as you can see here i have uh moving swap i have a balance of 340 earth tokens and i can swap uh some 10 earth tokens uh you know for almost 12 merit tokens you can also create a pool add liquidity and you know for example let's do let's add liquidity to the pluto and saturn right uh joe i'm the first liquidity provider so this means that i'll be actually creating the pool so i can just go ahead and add 10 tokens each i'll have to approve each of these tokens you know the the s the unit swap contracts as an erc20 spender so i'll just confirm this and confirm this as well and we'll have to wait a little bit until this is approved uh and there's another comment um can you please tell us how substrate is different from layer two scaling of ethereum and does it have a competitive transaction cost and speed than layer two yeah so this is actually a really good question and substrate you shouldn't see substrate as a layer two solution right substrate is it's more like gas or open ethereum right it's like the underlying kind of implementation of the blockchain and and moonbeam a lot of people get confused between movement layer two but moomim is actually like a layer one as well right so you deploy the contrast directly to moonbeam and and moomin will be like the main net right so it will be directly like implementing uh a solution on an ethereum mainnet but it will be you know on moonbeam and with that you will have access to the whole polka dot ecosystem basically um so in terms of transactions called cost and speed we're targeting six second block time on mainnet deployment even though you know right now our test set is 12 seconds and this is due to some problems in the consensus mechanism uh right now that's been tested but we hope that we have a target of six second block time on both moonbeam that is our polka dot deployment and moon river which is our kusama deployment um in terms of transaction costs it's it's kind of hard for for us to to talk about transaction costs right now because you know there are a lot of still improvements uh being done to to the moonbeam technology stack um currently right now what we have in our test that is that per block we have a 15 million gas per block limit so this is actually it matches the same as ethereum right now uh even though if you just increase it to 12 from 12.5 to 15 million um but basically we hope to increase these by a factor of four at least so we're talking about a 60 million uh a gas limit per block and we we would have a six second block time right so uh we like to say that we expect transactions to be uh you know a lot cheaper than ethereum because we're providing much a lot like a bigger room for transactions to be included on a block right so it's kind of difficult for me to talk about specific numbers but you know we expect because of the things that i've just mentioned uh to be much cheaper to to deplore or interact with with moonbeam than with ethereum maintenance so hopefully this this answers the question you must know even though it's not a straightforward but i just want to make another uh point in saying that moonbeam will not only you will able to deploy the moonbeam but you will able to access other para chains or the assets of other perijeans in the polka dot or kusama ecosystem through moonbeam and that is also another important topic right a lot of people ask us hey what's going to happen when the theme 2.0 comes and the gas price you know gets gets marginally lower um what's going to happen with boom beam and we tell them hey yeah but we don't see ourselves an east killer you know we see ourselves as a gateway for ethereum projects to access the polka dot or kusama ecosystem so i'm going to create a pool and you can see here that i have my metamask pop-up and i can just confirm and you know this this is going to take a while so i'm just going to go back and i'm going to do the swap as well right so i'm going to swap earth tokens for um was it merck mark tokens there we go and you can see that basically what we did is that we included this erc20 token in the in the token list by default that you usually have on unit swap right so i'm going to go ahead and put a lot of that 10 earth tokens and i'm going to click on swap confirm swap and i'll just confirm this all right and by the way the the the pool was already created but i totally forgot what what was the the two tokens that i selected so either way uh the pool that i just added liquidity to was just created the cool thing about this as well is that i can just go ahead and for example check right the ada liquidity transaction i can copy the transaction id and paste it on our blocks cloud implementation you will you should be able to see everything related to to this right so i'm interacting with this you can see the the all the contract uh the call that was used in the in the uni swap b2 contract which is the add liquidity method and you'll have everything related to the logs the raw trays so this is you know like a more or less like an ethercam experience when you have a lot more information for developers to play around with in terms of the contract interaction right so as you can see here now this swab was already confirmed and i have some merk balance now because i i swapped some tokens in terms of another d app this is balancer once again we announced that bouncer is coming to moonbeam and we'd really like to we we did this implementation to show showcase basically how this how would this look like right so you can see that i have also we deployed the pool management ui and the dispo management ui the cool thing about this is that this dashboard here that you see on the main screen this is actually using the balancer subgraph right so this this basically showcase that we're able to use all these ethereum tools uh to interact together as they would on an ethereum mainnet but this is on moon based alpha or testing it so this information is feed it to the dashboard via uh the balancer sub graph that is basically the graph is deployed on our test net and it's running nodes and you can launch soft graphs and fetch information from your smart contracts and display it nicely like it is on this dashboard so what i'm going to do i mean in here you can create a pool you can wrap some some dev tokens into rap dev and so on but what i'm gonna do is that i'm gonna show you guys once again that i can swap some 10 earth tokens from some venus tokens and we can see the order routing that it's really cool because what we're looking at is that this is uh it's telling me that it's going to do this swap using two pools right to get you the best price possible and if i actually increase this oops i don't have enough balance you know this is actually gonna use now three pools to get you the best price possible so i'm gonna go ahead and i'm gonna click on swap metamask popup i'll confirm this transaction oh by the way i didn't mention this but uh on the test that currently you can use gas prices zero so you might have noticed on my metamask every time there's a pop-up uh the gas limit it's it's whatever number and the gas price is set to zero uh this this might change in the future but currently still you can deploy contracts without having any funds because you can set the gas price to zero so you can see here now that uh i i have i should have roughly 9.8 uh venus tokens and if i go to to metamask i see my venus tokens right here so yeah this is this is pretty cool let's show you a little bit of composability of different things working together uh show you that you can actually deploy uh stuff that are on ethereum to movies alpha and play around with minimal changes you know just add compelling usually it's more difficult to add compatibility for the front and then for the smart contracts themselves right but there's some different stuff around that you can see that how they work on mumbai's alpha and once again we've added actually all the the erc20 tokens just to so people have you know a way of like common good erc 20 tokens to to play around and test in their implementation another cool d app that we have here it's actually a bridge that communicates moon based alpha to either kovan and ethereum we do have some documentations written about this bridge but what you can do it's mint erc 20 sample tokens and and you know um here you can mint tokens actually let's go ahead and do it because the bridge works with some assets that you need to register right and so for demo purposes we've registered this erc20 token so people can just test the bridge functionality and and send tokens from mumbai sofa to koban um from koben to moonbase alpha and the same with rinkybee right so it's just we did we decided to do two tests and implementations you can see how now i have eight erc20 sample tokens and i can go ahead and click here i'm going to send two erc20 sample tokens just to my same account and i'm going to start transfer and i'll just oops it's telling me the gas price is 10 i'll just leave it like that but you can put zero and this will work and you know this ui is a very nice and clean way to interact with the bridge but you can also interact of course via the smart contracts uh we have all the information in our dockside if you're interested i want to build something around the bridge um so yeah this actually it's already confirmed this should start initiating transfer there we go uh this will take some minutes because you know we need to do so how the bridge works is that there's some stuff going on on the uh origin chain which is in this case a moon base alpha and then there's some stuff going on kovan that the relayers need to sign uh and vote to make sure that this is a valid transaction and then they'll send a transaction in coven saying hey unlock this token for this person right so we'll come back to make sure that this actually went through all right so i still have some time and i want to spend some slides uh well actually yeah so so some of the some of the apps i just showed you are in here in case you wanna i do wanna you know check them out i'm gonna provide this presentation should be accessible via this link and if you want to check them out uh we do have the repos for the erc mentor the moomim swab actually we just released a blog explaining how you can port uni swap v2 to moonbase alpha and the moonland dashboard uh sadly i haven't had time to provide the the information regarding balancer but this is something that we plan to do in the future um so yeah i mean all this sounds really cool you know uh you you you got me alberto you got to me you know this is i want to start working on moonbeam how can i do it um we have a really extend uh documentation site where you'll find examples of how to connect metamask how to use remix how to use truffle and hard hat and theo libraries web3 javascript ethers and web3 python some different oracle solutions the bridges we have a couple of indexers that are working on moonbase alpha this is the graph and covalent and we have a lot more you can check out our moon builders workshop getting started with moonbeam we have already two more episodes one with the chainbridge uh solution it was presented by greg from chainsafe and the other one from uh ganesh from the covalent team uh this is super cool if you want to check those out and just to wrap it up i mean we still have some time but i want to speak a little bit about the challenges right so we have a couple bounties or challenges uh the first one is pretty generic it's just to build a diaper moonbase alpha of course the the app that brings the most value to the testnet it's you know it's gonna it's gonna get the price but the idea is just created the app you can use any of the integrations that i presented to you today this is oracles bridges uh you know indexers or whatever uh the d-app should be available to all the tested users so anyone anyone in the test that should be able to use it uh getting some dev tokens using the minter the app and get some ert20s to interact with your d app and for us like i mentioned before is it's really important that you write some documentation uh explain how as your experience deploying to moonbeam any issues any suggestions like i mentioned multiple times for us it's really important the developer experience that they're getting is it similar to ethereum where are the roadblocks where can we improve in terms of documentation as well so basically those are the three kind of like requirements it's super simple and straightforward just build something and movement that it's cool and it's you know brings value to the community and and just it'll be uh and just provide some feedback basically the challenge number two is it's it's not that it's more challenging but it's a it's something that it's more unique right because um one of the features that moonbeam offers natively is taking a governance right so those are features that are not available on ethereum so the cool thing about mobium is that is this ethereum compatible kind of environment but have this like substrate or polka dot features such as staking and and um governance so what are the seeking pre-compile so you know what is what am i talking about it's basically um to access the sticking features you need to go through the substrate api and if you're not familiar with substrate api i can just provide a really quick rundown of what it looks like right so this is the polka dot js interface which is basically what people are using to interact with with like poke substrate-based nodes right so if you go here and you go to test networks you can actually connect to roombase alpha and basically this will show you everything related to for example democracy you have right here right so this is all the democracy kind of proposals that people are doing and you can go ahead and vote on them and so on but to access the staking features and you have to go through like a string six and send transactions you know uh using the pair chain staking and then select the function that you wanna use so this is not a nice experience so we're trying to do is to create a way that a few developers can actually access this kind of like functions of the perichain kind of features right how can i nominate people how can i uh you know put more money behind uh co-laters which are block producers so the idea is that i lost a oh there we go so the idea is that instead of accessing the uh the substrate staking features via the substrate api actually you can use the ethereum api and access it bsn's taking pre-compiles that will launch right and it will be in a kind of long-lived address you can go ahead and you will have some functions to that that will be are actually mapped on our side through the evm palette and the substrate api are mapped on the code to actually create this extrinsic as a stickiness string set for you and so you're actually able to access the staking features right via like an ethereum kind of like you know uh environment let's say like that so this is an idea that it's it's cool because you know a theme developers don't need to learn about the substrate api or substrate tools but they can use the regular tools and and just access the station features right um this is this crowdcast link this is this was part of our illuminate21 event where joshi and ammar talked about the seeking precomp files how do they work and they even presented like a dow kind of example of how to use the sikkim pre-compiles to to access this taking features right so well i mean i guess you more or less understand the idea the idea would be to create a d app to interact with the sticking palette using the seeking pre-compiles right so don't worry about the substrate api you don't need to learn anything about that um the second pre-compilers are not currently available on our testnet so they will be available on moonbase v8 that we are it is targeted for may 24th but let's say that you know i really want to work on this i really want to test it out how can i get started so in the meantime what we did is that we're going to prepare a branch on our mumbi repo and you can actually build a local node from that branch and then get started on a local node and then one once we launch moonbase v8 and the seeking precompiles are available on the testnet you will just be able to change rpc url to the test in it and test it there so yeah the idea is that you could create a d app that it shows you know some some buttons and stuff to interact with the pre-compiles and you can get more information as well as a dashboard like hey some information regarding staking and so on there are two kind of like uh places that you can learn more about this in our documentation website you have the staking menu and here you can learn a little bit more about how staking works and you know the general definitions what is a collateral what is a nominator everything related to what you need to learn should be here and also you can learn how to stake this is just to get familiar with how the staking works but but this uses the polka dot js right this this uses a substrate api basically but this will help you a little bit to get started understand a little bit how it works um regarding git coin we've provided a lot of information and a lot of links uh and bounties to you know to get you to help you get started uh and we're always uh active on our discord channel if you need any help we'll always uh we'll also be looking at the xerox discord channel just to make sure that you can get all the help that you need in terms of the staking precomp files challenge you know we i've put uh as much information as possible for you to get started uh some some solidity interface the presentation from illuminate some dow examples from the presentation and some or more other kind of like uh blog posts and stuff where you can read a little bit more and understand how this works you can see that the address where the pre-compile will live is is basically this address that you see on the uh on the on the screen so yeah i think that is pretty much all i had from my site um i don't think there are any more questions or comments on the chat um so yeah i mean there are a lot of places that you can actually go ahead and how do you how you can get in touch um with the moving team you can visit our website moonbeam.network our documentation side we're very active on on telegram on twitter if you have any developer related questions you can go to our discord channel or also you can shoot them in the xerox channel as you might guess feel free to communicate with us we're very active we we have a three-person developer relations team that yeah our idea is to provide the best onboarding experience to moonbeam and you know don't be afraid just start playing with moonbeam and don't be skeptical about you know being kind of like a polka dot parrot chain uh feel free to shoot us any questions that you have and and yeah super excited to be part of the hackathon and uh excited to see what you guys come up with and and to judge your your pounding submissions so yeah i mean i don't know if there's no more questions about challenge one all right sure let me go ahead and present oh okay so i'm gonna just kind of take some minutes and tech and there was a question related uh challenge one so basically the challenge one it's it's super simple it's it's either more straightforward than the other one because the idea is that you should build a d app that uses any of the integrations that we provide so even the graph or covalent or you know oracles like chain link band racer or chain bridge implementation so build up the app a front end the app that just uses you know any of our integrations and provide value to the test net or the community uh just basically that's it's that simple right it's very straightforward we don't have any specific requirements uh just have fun build something and and also another part is that is provide feedback right write a small document or page explain how is the experience if you had any roadblocks any suggestions for our documentation like i mentioned before the feedback for us is essential because we want to provide a seamless ethereum experience on polka dot and feedback is like the best way for us to to improve in that terms on those terms so yeah all right yeah hey sorry uh we got this short ditch here uh yeah alberto thank you very much for the presentation uh you gave a lot of uh useful details on your bounties and the project um so we're gonna take uh i think he answers all the questions is that correct yeah i think so yeah great so we're gonna take a short break now uh we're gonna have uh jakub from golem next at uh 2 p.

m cst uh then we're gonna have alex from balancer and finally for the end of the day we're gonna have a workshop with uh patrick or harry is that i think it's hari from chain link um so stay tuned for that and as always all the teams are waiting for questions in discord thanks a lot have a nice one thanks alberto see you bye

Automatic transcript — names and jargon may be misspelled.