SKALE Labs 🛠How to use SKALE for your Dapps
ETHGlobal·Sun, Oct 9, 2022, 12:00 AM
Join Christine Renee Perry of SKALE Labs for a workshop titled "How to use SKALE for your Dapps." Learn how to deploy your Solidity smart contracts onto the SKALE Network, for fast and cost-free transactions without compromising security, storage, or computation power This workshop is part of ETHAmsterdam, the first in-person hackathon for ETHGlobal since ETHLondon in 2019. Join over 800 likeminded engineers, designers, and creators to build and learn over one full weekend at the Beurs Van Berlage in Amsterdam. ETHAmsterdam is taking place as part of Devconnect, the week-long in-person gathering in Amsterdam. We're back to build, we hope you'll join us. ---------------------------------------------------- Follow us: https://twitter.com/ETHGlobal​ Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com
Transcript
[Music] [Applause] good to go all right hi everybody uh and thanks for tuning in especially if you're on the live stream watching this um from down in the hakka area or across the pond as they were saying earlier uh so i'm christine from scale labs i'm really excited to be at amsterdam i'm doing this workshop the primary goal of the workshop is to one explain more in depth what scale is all about and also give you an update about v2 from a surprise guest and then also do some live coding for those that kind of want to follow along using some tools that you should already be familiar with and if you're not don't worry we'll slow it down and make sure that everyone can catch up so um before launching into that just want to remind everyone about the prizes we do have a lot of prizes to win today so if you are going for the grand prize it's pretty much using having the best use case of scale integrated within your application that means potentially using some of our additional features file storage interchange messaging etc etc we'll definitely get into what that is all about um later we also have two other categories if you're developing a metaverse p2e or nft game all teams that win this will share up to five thousand dollars and then for partner integrations if you see any partners walking around that you want to try to integrate onto skill you can definitely do that and you'll share up to two thousand dollars for teams that are hacking on that and then last but not least any team that hacks and deploys an application onto the skill network will split four thousand dollars among yourselves so really excited to see what kiss built um today and if you all have your phones ready definitely go ahead and scan that qr code it will take you directly to the information you need to get started all right so what is scale so scale is a layer that sits on top of ethereum that pretty much allows you to speed up your smart contracts and then also removes the the gas cost now what's great about this is it fits really well within the ethereum ecosystem so all the tools that you love um that exists in ethereum automatically works on the skill on the skill network as well you don't have to program a new language you don't have to change your tech stack you can simply just migrate everything over to scale using an infuria like endpoint as you see here and i'll get into how you can actually do that using some tools here remix we might go through truffle if we have time but definitely explaining web3 and etherjs as well all right so how does this all work we have nodes around the world and what ends up happening is when you decide you want a skill chain we group together a subset of those nodes we take 16 and what this means is your skill chain has its own environment it allows you to process transactions but it also has file storage meaning that you can store files directly to the blockchain so let's say you want to host your website or stream videos you can upload that to the file system and have it automatically displayed to you because we have an nginx labor that sits on top of that additionally we have interchange messaging which is a bridge that connects you between ethereum and skill so that means that all of your assets you've already developed on ethereum you can migrate them over to scale or if you haven't yet started you can start minting on scale directly and migrate them later thus by saving even more gas one of the things that we do um is we run rotate the nodes ever so frequently so this adds a layer of protection because i know what everyone's thinking out there 16 knows that may not be a lot but when you think about the random rotation over time you can potentially have 70 percent 90 percent 100 of the network which might have worked for your skeleton at any point in time and we do this to make sure that nodes can't collude if you want to learn more about that definitely come see us at the booth our vp of product chadwick would love to go in detail about that as well as our bd team i'm gonna call out some few ryan connor fabio who else is here alex as well can definitely give you a rundown on all that's involved there all right but this is a fun thing we're a multi-chain network and it's one of the first of its kind so i know you've probably been seeing the news and you've been seeing other networks trying to migrate to the same thing it's really cool to see that you know other applications are now seeing the value about this and now trying to integrate that within their applications as well so definitely check to see how we're doing it here because one of the things that's really exciting about this week is we are launching something called the skelvers which is basically a v2 of the scale network and what that v2 allows you to do is add organization around the skill chains so we listened to our community and our community submitted proposals which was amazing that said that they wanted to band together to create hubs so we have exchange hubs which is all your liquidity we have some amazing exchanges some amazing partners are going to be launching there over the next few weeks as well as marketplace hubs as well we have marketplaces that said hey we want to join the scale network and provide an ecosystem to where any nft project or any project that has an nft can list their nft on the scale network and have it transact in a free environment how cool is that and then lastly because you know a lot some of the community they don't necessarily want to manage their own skill chain they want to use what's existing kind of like how they leverage ethereum and so that's where community chains come into play instead of having to manage your own skill chain if you just want to deploy your application we have an environment for you to be able to do that in a hub-like environment as well but then lastly you know there are a lot of applications out there that have said we want our own chain we want to make sure that our transactions per second isn't deprecated because of another game or another application running and our speed stays the same and the only way that that is viable is through a multitained architecture which is the thing that we started with our vision from the beginning and so really excited to see this come to life with scale v2 but there's so much more to that and i think chadwick should probably come up and explain a little bit more you ready to come up [Laughter] now i don't have a slide for him so you're going to have to listen carefully to all the additional features coming into scale v2 everyone chadwick here vp of product uh so just to piggyback on christine's intro uh the key thing with the hubs and with v2 we've taken the interchain messaging agent which is the native bridge deployed on skill chains uh and for several months that's been operating very well between ethereum and scale transacting and transferring tokens and arbitrary messages between ethereum and scale and now that we've we've expanded that to basically help promote and drive the scale versus the sort of hub dap chain communication model by allowing any two scale chains to transact tokens or messages basically sending tokens and messages between any two skill chains with the same uh bridge layer that we have using bls signatures but the key thing here is okay it's a bridge but it's a bridge that can transfer tokens between 82 skill chains and a gas cost free gas environment so you don't pay any gas fees transferring tokens between any two skill chains and the resolution time between any two skill chains is very fast it's 18 seconds um so we've taken that bridge from ethereum to scale and applied this between any two skill chains um on top of this we didn't stop there v2 includes this but also includes what we call an rng endpoint it's very difficult for solidity developers to find a really good source of entropy to drive like the randomness of maybe nft properties lottery design or other deeper functions that you'd want to do in smart contracts there are other options out there like vrf's and other options as well but we decided on scale because of the uniqueness of our architecture and how we use bls threshold signatures amongst the nodes that comprise your skill chain we're able to leverage this in a very easy way to allow developers to basically call a pre-compiled contract on each skill chain that delivers a random number gener random number for every block that's created it's a really easy way it doesn't doesn't create any external calls that you have to do it's basically a very simple assembly code that you can copy and paste in a contract and integrate very easily we also have an oracle api we have the base layer available now we're finishing a few aspects of that but it'll allow basically any developer to create an rpc call or an rpc uh call to any uh external off chain data and then allow the skill chain the nodes in the skill chain to uh request that data from uh from off chain and bring that inside come to an agreement about what that off chain data is and then present it for available uh verification and solidity um and then did i forget anything i think that was it that's it yeah that's it for v2 yeah so scale chain transfer oracles r-e-n-g oh my wizard of oz so it's pretty exciting though i i think we're really excited for the skull verse because it's really just showing the power of a multi-chain network and i really want to stress that multi-chain network started from the beginning vision number one and we're really excited to see it you know evolve into what it is today with that oracle piece though i think we're really excited because we do partner with other oracles but i think you know giving developers the option to have an oracle that's native to the chain i think is also unique because when you think about what the scale network is trying to do it's not just creating another blockchain it's creating a blockchain with a platform of features so file storage for oracle rng the list just goes on machine learning which was something that we sunset it but we had before like it's really exciting to see scale labs labs scale l2 develop amazing things over and over and over again all right so now i think it's really cool to take a step back and see what cool things can you build on scale and with fast finality no gas fees and high throughput it feels like the possibilities are endless and we didn't build a blockchain that's just for nfts when individual blockchain it was just four games we built a blockchain for every application out there and that takes time to build so where we are today means that now the applications can take what the features that are there and build these really cool applications so with fast finality we were able to deploy oracles but other oracles could also create on this modular system as well media paywall authentications the no gas fees mean that nft projects can launch their application without having to raise a lot of capital first they can simply launch their application prove product market that and then move forward from there and that's a game changer when you think about how things currently operate in ethereal ecosystem being able to just launch your application or your dow without having to figure out how to pay the high gas fees and then high throughput one of the things that we did at one of the eth conferences a couple years ago was we took unity we took one of their templates we put it on scale and saw how it worked and it worked extremely well extremely fast and one of the feedbacks that we always get from game developers is that when they use the scale network they can develop for their application and not for the blockchain and that's a different way of thinking about approaching development so really cool to see all these different applications that you can develop now what are some applications that have developed on us well ruby exchange is a really great partner of ours is going to be launching one of the first exchanges within scale network and what's cool is that liquidity hub that i talked about the organization they're going to be at the forefront of that making sure that you can bring liquidity in and out very seamlessly they're really good with marketing as you can see that's one of their videos very flashy very amazing but what i'll do though is actually show you their application and let me come here so this is the ruby application and it's just on on the test network for now because they're going to be launching in the next few weeks but what's really cool is that they're allowing developers to easily bridge over um current um you know standardized tokens usdc usdt the list goes on and if you want to add your custom token they are a great partner to make sure that you can do that within the scale network they've also integrated with our faucet to distribute s fuel i know i haven't talked about that but i promise i'll bring you up to speed on that in just a bit but this faucet makes sure that anyone that doesn't have permission to process transactions on the skill chain can do so and i think that was a really cool way of how they integrated that within their application what are some other applications that have developed iv cache this is a really great nft project you don't have to have a wallet or understand blockchain to be able to get it in ft and they prove that by allowing anyone to create a qr code present it on a screen add a game or anywhere scan that qr code and simply have an nft show up in your wallet that's created for you and so that's a different model than saying hey how about you download the application here understand blockchain make sure you save your private key and then oh make sure you then change to the correct endpoint they remove all the friction for their end users and so when you think about creating application with design in mind using applications such as layer 2 that the skill allows you to do that and achieve that because again we have a no gas environment the last one i'll talk about is going to be clet name services what's cool about them is that they built an application that allows you to reserve your name so it could be christine.e it could be my daughters or her that either would be chadwick.eth but essentially when you reserve that it then actually resolves to the wallet address and they have a really great api as well so they have two sides of the product one side is for um you know users to actually get their names reserve them and be able to attach it to their wallets the other side is for that developers to integrate that within their applications so they have a fully fledged built out api that allows you to do that but not just you know integrate their name service but ens and unstoppable domains as well as well they're covering their entire suite of domain name servicing which i think is a really awesome way of using scale as well so when you're buying your names on their application within the scale system it all happens in the background the user doesn't have to know that you're on their own scale they're just simply there they're buying their name with a credit card and that is it so again another great use case for usability all right we're finally at the live demo portion i hope i didn't kill you by slides looks like i didn't everyone's still up everyone's still looking this way that is great um do i have developers in the room or are we here to watch i know i have developers out there that's watching on a live stream but i can't talk to you so developer okay one two three ish three okay three three in the room that's good so in that case what i'll do is i'll um kind of go through a little bit of the coding aspect of scale um because i think it's really cool to see how seamless and how easy it is get up and running all right so i'm to switch back here to my lovely browser we're going to exit out of this goodbye ruby we still love you all right so the documentation portal and i'll back up just a bit because there's a lot of information on here you can thank again chadwick our vp of product for organizing all of this and making sure that everything's ready for the scale v2 launch but if i navigate here to develop there's a plethora of information on how to use again those existing tools that i promised you guys or just deploying to the scale network if you already know what to do you just want to go it alone but let's use something that most developers are familiar with remix a lot of developers have used this you've come across this in some capacity for just simply deploying a smart contract well what you'll see here is that all of these tools have step-by-step instructions on how to use that with the scale network and one of the things that reigns true with most of these is that the deployment or the usage of these is just as simple as changing an endpoint so if i go to this metamask example here there you go just changing an endpoint portis same thing simply just changing an endpoint and i think because of the way the ethereum space has evolved all tools that are building within that space makes it so that way you can integrate with other layers outside of ethereum and it's shown here now for remix it's more or less the same you can take this example smart contract copy it into remix and just run it by deploying on the scale network so let me show you what that looks like if i click on this link actually let's back up i'm gonna open it into a new browser tab all right perfect we have a simple smart contract called hello scale super simple but one of the things that you'll know is that you could always connect it to metamask by switching it to injected web 3 and here we're on metamask let's switch it back to ethereum network but because we're at the hackathon if you go to oops let's not open that if you go to eat amsterdam.scale.network this will give you all the information that you need for getting a skeleton endpoint and accessing a faucet while you're at this endpoint that's why you're at this conference to be able to get it going so if i click here there are two skill chains available and i'm going to select the first one now i can go the manual way of copying this opening meta mask and adding it to you know my list of networks or i can do it the automatic way which is click on this button here and it'll automatically add it for me now i'll go ahead and switch networks and what i want to do is jump back just for a second to the documentation because if you want to understand exactly how we created that button all of the code for doing that is simply here you can copy paste and just have it work so i'm going to go back here to remix and now that i'm on the scale chain as you can see i don't have any sk which has been rebranded to s fuel actually and s fuel essentially is a token that exists in a blockchain just to prevent ddos attacks it has no monetary value which means you can use it as an authentication mechanism so if i come back here and i'm going to go back back up a little bit and what i'll do is let's see i'm going to copy this endpoint paste it here and then i'll come here and get my wallet okay super simple paste that here and then simply click on get s fuel what this basically shows you is just a faucet mechanism for setting up distributing that s fuel you can just as easily distribute s fuel the moment you recognize this user when they log into metamask but now that i have s fuel i can go back to remix and simply deploy the smart contract onto the skill chain all right just want to make sure everything's connected as long as this green light is going we're good to go and let's go ahead and click deploy one of the things you'll notice is just how inexpensive it may seem to deploy the smart contract and that's by design because again it's a gas free environment but we still want to make sure that no one can ddos you and so over time if someone is trying to ddos you this number will simply increase by a predetermined number until they've run out of vest fuel and you can decide just not to top them up which means they're blocked from running transactions on your blockchain now if i confirm this that'll do what you expect will happen in any blockchain it deploys a smart contract to scale and from there i'm able to transact with it just like i would if this were running on ethereum and so just as i promised very simple to transfer over from ethereum to scale now one of the other things that we can do is let's check out one of those really cool features that chadwick mentioned i like the idea of checking out the rng endpoint one because i think the documentation is really well done where you can simply copy paste run now i'll copy this and i'll come over here and i'll paste this here let's go ahead and save that good looks like it's already compiled and i'll delete that one and we will simply redeploy all right give that a moment and this is that random number generator that chadwick had mentioned what's cool is that in scale v2 this is going to come standard on every blockchain and so one of the things that we kept getting asked about is that you know with scale being a costless environment do you guys have a random number generator and if so can we use it do you have code snippets well we took it a step further we don't just provide you the code snippet we provide it um you know standardized with every blockchain so you can just simply access it and so every time i click on get random every time there's a new block a new random number is presented to you so a really cool way of using one of the new tools that's coming out and scale v2 alright so before continuing on i will pause if anyone has any questions straightforward so far everyone's following i see nods i see nods okay no one sleep yet this is great i know it's midnight all right all right so again i think the main thing i want to drive home here is just um you know the simplicity of using the scale network um but also the complexity of the features that we have available and one of those complexities i think is drawn out in interchange messaging so if you're here building a token and you want to make sure that it can transverse between different chains or different blockchains between ethereum and scale or reverse from scale to ethereum this is the the documentation that you want to land on now there's a lot here we have support for all of the major token standards erc 20 erc 721 erc 1155 and then any custom smart contract now that is very unique because a lot of the bridges out there only support erc20 but with the support for all of these what that means is that you can really transfer any asset to scale even as far back as cryptokitties or create any new standard and simply have it work within the scale network with being able to transfer that back and forth now we have some really cool diagrams here that help you just sort of like understand what the flow looks like so you're not going on on this alone where i'm a visual person i hope so you are too and so having a clear way of understanding how to move a token between the different chains is extremely helpful and that menting first methodology that i mentioned is down here where we give you a simple flow of understanding how to first mint an nft or any asset on the scale network and then move it to ethereum after the fact thus by saving you even more gas so i encourage any blockchain project that's looking to hack at this hackathon to try it out this would be a really cool way of integrating it within your nft project your p2e game or your metaverse application all right let's go back here all right one last thing since we have everyone's attention we do have a hundred million dollars in usd for ecosystem grant program and that's going to be specifically for gaming so if you're here building a game definitely come talk to us that way we can see where you are in your development and to see if we can get you into this grant program but looks like we had a question before i concluded use the scale change skill chain bridge how would you use it the skeleton skeleton bridge i'm actually gonna go back here because i think let me show this one all right great question by the way and the question was for those that are viewing this how would you use the scale chain the skeleton bridge the best way to think about that is let's first explain you know the layout here we have these exchange hubs which are providing liquidity meaning all liquidity is coming into that one chain and other chains that are creating complementary like exchange hubs as well we have nft marketplaces which means that all nfts are going to be viewable within one endpoint one chain which is great for developers because things are able to be shown in collections which is very important if you are building nft project and those community chains where we have a lot of applications that want to share space because they don't necessarily need 70 gigabytes for storage or 200 transactions per second for their medium chain they just want a small subset of that um but if you're going to be launching um on your own chain on one of these hubs how do you communicate between chains and when does it make sense to do so well as you can imagine if you are launching your pte game or your metaverse game or your music application you are in your own ecosystem your own container which means that you might need to bring liquidity over now you can go this on your own and use energy and messaging bridge bring it from ethereum or you can take advantage of the free transactions per second and scale and simply go over to ruby exchange that exists on an exchange hub and when you do that you would use the skeleton scale chain bridge to be able to make that connection between your chain and that exchange hub it's going to be extremely fast everything processes in 18 seconds or less but what that means is that you're able to bring over the pairs that you need for your game for your nft for anything that you're building whether it's a stable coin whether it's ethereum whether it's scale it could be any token that you want to use or any custom token that you want to use so the normal flow is going to be bringing the liquidity that already exists in the skull ecosystem over to your chain but there are some edge cases there and one of those edge cases is if you're creating your own custom token on your own chain and you want that listed on the exchange you have the same flexibility to use that same skeleton skeleton transfer to push your token to the exchange that way is listed for anyone else in the ecosystem to pull down later so a really cool way of you know spider webbing this together in a really organized way and yeah the skeleton skull chain upgrade that's happening this week actually uh you'll be able to start on playing around with that relatively soon storage can i store my files in another chain and use one for block data okay so the next question is for file storage can i store my file storage my files my files in another chain and use another blockchain for the data of the application is that correct um the answer to that is yes i think one of the things that um you know the community realized immediately when skeletal said that we were going to launch this multi-chain architecture is oh i can have five chains for my application and then use them for different modules within my application and that was a really cool way of thinking about it um and so yes if you wanted to use one chain for launching your token or running your game or running your application you can do that but let's say that you wanted to store all the files that were going to be accessed for being used within the game or used on your website or used for machine learning or used for any application you'd be able to have another chain that runs side by side to that and so what's really great is that it means that you can scale horizontally you're able to start with one chain and as you need more space you can either upgrade from you know a medium chain to a large chain because we offer different types or you can say hey you know what i simply just want a new chain all together so that way i can double my storage all at once and maintain the same transactions per second because i might not need more 200 is enough especially when you think that 200 for one application versus 200 for 500 applications as you might see in some other networks that's a different conversation when you are on a dedicated chain and you have all of your services just for you you can think about you know using those services not worrying about the fluctuations that anyone else might cause so yeah you're welcome any other questions the ima bridge are all the chains sharing one ima bridge over to the main net or are they do they have their own yeah so with the ima bridge um because each skell chain the only environment they all have their own like smart contracts there right and so they connect to the smart contracts um between ethereum and scale but yes like the buckets that you would transact with on the skeleton side are all going to be your own on the ethereum side it is going to be a shared environment but that is really well separated if you will based off of the chain that you're interacting with and so as you can imagine that design was put into place to make it easier for skeleton skeleton transfer and also ethereum to skill transfer but um yes essentially on the skill chain you have your own bucket you're on smart contracts and what's great is that you don't have to think about deploying these everything comes pre-deployed pre-compiled and so as you can imagine what that means is the easier way to understand how to connect this on each and every skill chain if the contract address is going to always be the same and all the skill chains you don't have to think about keeping a mapping of that which i i think is a great way of approaching creating the entertaining messaging protocol so good job engineering team who's not here but here in spirit and we're really excited so any other questions all right well with that i'm gonna conclude the session but if you have any questions definitely come see us at the booth we'll be around tonight and tomorrow tomorrow there's a special event i can't tell you what the special event is but come see ryan he will definitely explain that to you it's going to be great but definitely come hang out with us and learn more about how to deploy your application onto scale and before i go i will just show this last screen here for those again watching this virtually definitely go ahead and scan that qr code or simply just put this url in your browser again we have 16 000 and prizes to be won so definitely hack with us because at the very least if you simply deploy you have um the possibility of winning that 4k prize that would be distributed among all teams so at least give it a try all right thank you [Applause] [Music] [Applause] [Music] you
Automatic transcript — names and jargon may be misspelled.