No Sweat Solidity dApp Deployment to SKALE – Christine Perry
Ethereum Denver·Fri, Oct 9, 2020, 12:00 AM
This talk is from ETHDenver, the world’s largest Web3 BUIDLathon and Community Gathering. ETHDenver’s content is crypto and blockchain focused. Subscribe to our channel to learn more + connect on Twitter: https://twitter.com/EthereumDenver. Speaker: Christine Perry of SKALE Abstract: See a demo of a Unity game that is running on SKALE and learn how you can use SKALE to cut testing time, build lightning-fast dApps while staying full Ethereum, speed up smart contracts, use file storage and integrate token transfers. This talk was recorded Friday, February 14, 2020. ETHDenver 2020’s content themes included DeFi; DAOs and Token Engineering (TE); Gaming and Usability; Protocols and Interoperability; and Public Good and Social Impact. Industry experts also weighed in on topics like decentralization, privacy, identity, non-fungible tokens, scaling, governance, diversity, and arts and culture in blockchain technology. The 2020 event was February 14-16 in Denver, Colorado and hosted 2000+ blockchain enthusiasts, developers and community members from 50 countries and 50 U.S. states. 🔴 SUBSCRIBE ETHDenver’s YouTube https://www.youtube.com/channel/UCgz9NU06t_FkT0Py1Vadczw 💡 LEARN ETHDenver’s Official Website https://www.ethdenver.com/ 👋 CONNECT ETHDenver Twitter https://twitter.com/EthereumDenver 📖 READ ETHDenver News on Medium https://medium.com/ethdenver 🛍️ SHOP ETHDenver Official Merchandise bufficorn.com 💬 CHAT Telegram https://t.me/Ethdenver Discord https://discord.gg/jteMn5c 📱 FOLLOW LinkedIn https://www.linkedin.com/company/ethdenver Instagram https://www.instagram.com/ethdenver/ Facebook https://www.facebook.com/ETHDenver/
Transcript
okay so happy Valentine's Day everybody thanks for coming to the workshop so I'm Christine Perry I lead solutions engineering at scale labs and today we're gonna walk you through how to hack on scale but before we get started I want to set the stage so we're gonna do a brief intro of what scale is and I promise I won't take too long and then we'll get into some live demos well show you how to deploy on scale using rink B from using rink B truffle and then also an OL game that we built as well so let's get started so the scale is meant to empower etherium by that I mean it's not a serial killer and says it's meant to actually run along side of it but just like etherium we have quite a few nodes in our network that work for your dab but the differences are this instead of having one chain to wear every da has to share resources and share transaction speed we grouped together a subset of nodes that we create for your squelching so it's 16 nodes that's created for your scale chain but over time we rotate nodes in and out so over time you may have all the nodes within our network working for your adapt here are some other key differences to your scale chain is just one of many so one of many means that one node can run up to 128 different scale chains and we'll get into more about that later but for your scale chain you're able to process transactions by deploying smart contracts use our file storage and even use entertain messaging for managing things like ERC 20 gr c 721 or die to dive a little bit more into the node architecture though one of the things that we did was we made it easy for you to only pay for what you need at that time so if you decide that you want a small scale chain you'll get 20 transactions per second and if you want a large sometimes little chain is 2,000 but if we dig deeper into that node that node is doing multiple things the first nort orchestration is connected to aetherium so you can kind of think of scale as being adapt deployed to aetherium that note that validator orchestration basically manages the nodes are going to be grouped together to run your squelching the note auditing piece means that each node is monitoring 21 other nodes within a network and for the scale admin that's where the fun happens for you because you're able to deploy your to solidity based smart contracts directly the scale and run them just as if you were on in theory and also use file stores and entertained essakane so let's go a little bit deeper here for a validator they could either be grouped together to 1:1 scale chain or they can have multiple scale change running on that so this middle one is more or less what most validator nodes would look like within our system and if they just join as you can imagine they don't have any scale chains running yet but they're open to be able to be selected now more information about this can be provided at the booth if you're interested in validating with scale please come talk to you a Bruin wall she's in the crowd over there and she'll be able to give you more information ok so but this is a DAP workshop so let's get into the fun parts about how to deploy on one scale at each number so again just to kind of set it this at the stage I'm gonna do a live demo showing you how to deploy using rink B and truffle and then I'm going to show you how to turn all of those learnings into a real live game that's 3d based off of unity and scale so let's switch gears here all right there we go so if you want to little try to follow along during this workshop go to scale dot Network forward slash eight Denver and you can get a scale change right away to hack at this hackathon or follow along here and bear with me just a moment while it comes back up yeah okay so there we are looks like we're back okay so again if you want to follow along looks like everyone had enough time to get a scale chain what you'll get is a scale chain that looks like this you'll have access to your scale chain via four different ports I'm going to use the HTTP one during my demo and let's go ahead and bring up the scale documentation so scale dots if you go to our portal in order to understand how to deploy it so scale all you'll have to do is click here on smart contract scaling and then go to get started and start as a beginner from here we've scaled it down to just four simple steps to get up and running the first one is simply get your scale chain which you've already done and the second one is the career scale chain by transferring ease so I'm gonna walk you through doing that it's really simple you essentially put in your scale chain here copy an account maybe from that and ask and then from there you're able to transfer ease once you do that you're able to use your scale change this is if you're on aetherium so I'll show you how use the rink B first and let's increase the screen size all right so I'm going to start small with creating a coin contract this coin contract allows me to send men and view the balances of a coin so if I go to men amass I'm on Rigby let's test it out with Rigby and see what happens so here there's a gas cost for deploying the smart contract great and one of the things we're going to have to do is wait a little bit which is fine but at a hackathon you're usually pressed for time so instead of waiting what we're gonna do is switch over to scale so a meta mask is just as easy as entering a custom RPC pasting the and let's go back here pasting your endpoint here and let's do that again custom RPC pace the endpoint let's go ahead and give it a name and that's it so once it switches then we're able to redeploy that smart contract using scale and one of the things you'll notice is that in scale there's no idea of cost for the end user because it's already paid for when you decide to spin up your scale chain so think of it as Amazon for AWS forward blockchain but instead of having to wait when I hit confirm or send any transactions it happens in near real time but most people here have probably already work with other complex on tokens such as C or C 20 or C 7 21 died so let's see what it looks like deploying something as complex as that for that I'm actually going to switch over the truffle and here I would have to follow the same exact process as I did for for remix so what I'm going to do is enter in my endpoint here and because it is just as easy as to point to any other network I'm able to copy a configuration I've already created rename it to scale and point it to my scale jeté endpoint and it really is just as simple as that for getting started if you're using something like a truffle block so if I switch over now to my command line here and let's make this bigger so everyone can see I'm able to use the exact same tools in the exact same way as I would for ring feet or aetherium so I'm going to reset my scale chain and I'm going to deploy to instead of wrinkly or Cove on I'm gonna deploy to scale and give that a moment and one of the benefits you'll get by doing this too is that just like with deploying be wrinkly erinc be on truffle it's just as fast now instead of just appointing one simple smart contract if I come in here because we're using opens up lens standards it is actually deploying all of these different smart contracts that's attached to my ERC 20 smart contract and as you saw it happened in near-real-time - so how can we take this a step further we have an e rc 20 smart contract how can we use it on scale well if you go to our dev portal and go underneath products enter chain messaging we explain an easy process for being able to manage your tokens and scale which means that you'll decrease costs and also speed up the transaction for using that's Okun and in your app so let's see what this looks like I have a live demo here that kind of walks you through this four step process for being able to manage a token on scale the first thing you have to do is deposit it and so if I go back to the documentation here the first thing is deposit the second thing is we create a clone on the scale side so that way you're only working with clones and then you're able to exit from the scale chain so I'm going to show you step one and two and if you're interested in learning more about this we have more workshops at the scale booth so please drop by today at five o'clock okay so here this deposit smart contract interact with our entertained messaging feature where is supplying that same my ERC 20 smart contract that we just deployed earlier using truffle but instead what I'm using is a function with inner chain messaging to be able to lock that up on aetherium one of the benefits to managing the token on scale is that the token never leaves aetherium and said it stays there in a safety deposit box and then on scale you're able to interact with clones in near real-time meaning if you transfer that token a million times you are able to see that transfer happen and in less than a second but more importantly let's say you transferred a million times instead of having potentially a million dollars in transaction costs on ethereum you decrease that down to $2 because there's just a transaction cost for the deposit and then at the end the transaction costs for the exit and so you can see this here and I'll make this bigger now the reason why it took longer here is because with rink B we're still at the mercy for whatever that transaction speed is there but on scale once it's here it operates in near-real-time so as you can see my account balance increase from nine to one so let's show you what that looks like in a real world application and I'm gonna switch over to unity do we have any developers out there that have played around with unity or heard of it we have one a little bit great ok to a few three okay if you haven't heard of unity you've most likely played a game on it because it's used to create 3d apps for most gamers but what's missing from it is the ability to understand how to actually connect blockchain to something as complex as a Unity game development tool so here I have my world and what I'm going to do is just kind of zoom out so you can see it and we're gonna play this in a moment but essentially it's a race track so I'm going to zoom back into my cart what's on this right track though that's really unique is that we have scale coins that is tied to that ERC 20 contract that we deployed that you're able to gather if you actually hit it while racing so let's zoom in on this talk and look what it looks to see what it looks like this is what the token looks like but if we go over to the code here and let's increase the size so this is the contract that is attached to my ERC 20 smart contract that you just saw me the ploy I deployed it earlier so I have different byte code for that but what is connected to here is a class that allows me to interact with that token and transfer it every time that a user hits that token and this is just using an etherion package where if you were a c-sharp developer it allows you to connect unity games or any dotnet application directly to aetherium or an arcade skill so instead of using the etherium we're gonna be using skill for this game so let's go back to the game and let's see it work in action so when I hit play give it a moment I want to draw your attention to a few things first up here we have a block time while a block block count and here we have the balances where if you remember it matches exactly what I see here again it's attached to the scale interchain messaging feature so here we have our balances we have our tokens on the racetrack we have a bouncy house which is pretty fun so let's go ahead and play now I'm not the best driver so I probably won't get all of the tokens but notice what happens as I start to get the tokens you start to see a transaction appear at the bottom and as you see on the right the block count or the sorry the skill token count is actually increasing for that er c20 token as I am as I actually get that on the racetrack now again I'm not the best driver but if you want to try to win and try this on game out yourself please drop by the booth but essentially that's just it using scale unity and aetherium were able to connect the blockchain to something as complex as a 3d application and a row world so again thank you so happy to provide the code example if anyone's curious with trying this out with unity you're able to build an application using C sharp or JavaScript unfortunately this this C sharp but JavaScript implementation is just as easy but I do want to remind you that if you want to get a bounty please feel free to download or get your own scale chain here and at the future conference we'll be able to have a leaderboard where anyone that tries this out can win some some tokens and actually transfer it back to their account on ethereum so I'm going to reset this game so we can play this later and what that reset is doing is interacting with interchanging to transfer the tokens back to the original accounts that way we can just play it again and we'll make it smaller so we can see it change and as you can see there it's just reset all right so let's wrap this up okay so that's it with just making a few changes you can deploy on scale using remix truffle or any etherium tool that you have and you can also incorporate it into a more complex game on such as unity now I do when I open up for Q&A in just a moment but again here's the link in case you missed it but other hundred times for being able to download or get your own scale to chain and then if you want to follow us follow us on Twitter at scale Network okay and then lastly here are the bounties we have 5 prizes for 500 I and 2 super bounties for 1000 left eye and literally all you would have to do is potentially linked into your scale chain using something like remix or truffle and it will just be as easy as as I just shows you now Jackal hollering CEO of scale labs he's going to be giving a more in depth talk about how scale works so everything I've lost over here he'll go into more detail later so alright any questions out there No all right well thanks for your time [Music] you
Automatic transcript — names and jargon may be misspelled.