Getting Started with Scroll SDK - ETHGlobal Bangkok 2024
ETHGlobal·Thu, Oct 9, 2025, 12:00 AM
Join us for a workshop with Ahmed Castro titled, "Getting Started with Scroll SDK" This workshops anticipates ETHGlobal Bangkok, a 3-day hackathon happening from November 15 to 17 2024, bringing together the most skilled web3 developers, designers and product builders from all around the globe for a weekend-long adventure to advance the Ethereum ecosystem! ----------------- Follow us: https://x.com/ethglobal Check us out: https://ethglobal.com/ Email us at: hello@ethglobal.com
Transcript
in this guide we're going to launch the scoss Decay we're also going to learn how customization is possible and we're also going to deploy smart contract and see what comes out of the box on the SDK so let's get started we're going to deploy now the scroll SDK devet which means it's a local version of both a local layer one and Layer Two on your machine and we're going to be deploying on Linux if you want to deploy either on prodction or on digital Ocean or in Amazon web service you can find the gues on the official documentation at docs doc.io on the SDK tab or also you can head over to the level up platform at level up. XYZ for specific guides okay uh let's get started by installing the dependencies and let's start by installing make I'm going to be using a virtualized Ubuntu on my machine as you can see I'm using virtual box just to show a totally Fresh Start from an ubu LTS 244 okay so let's start by installing make and next we're going to install docker and as you know the scroll SDK uses a lot of containers and is done using H kubernetes to be able you so you can customize it in a very easy way and yeah just to make it easy to orchestrate deployments and manage so yeah we're going to be looking at that in this guide we also going to need Cube CTL to interact with your CU kubernetes setup also mini Cube since we're using the scroll devet we're going to interact with our local kubernetes um on on our local machine also Helm Helm will be help us orchestrating the charts that handles all the specific parts of the system and now this is optional but I will highly recommend you to install the CLI tool the scroll SDK CLI tool so in order to do that make sure that you have um not installed our recommendation is to use npm okay here my recommendation is well you can export it but just you can just restart your terminal to um refresh your environment Li um variables and you can install NVM version 20 any version above 18 should be fine and finally install globally the scroll SDK uh tool this I mentioned before this is a tool that will help you funding accounts and running test and yeah different tools that will be very helpful while running your uh devet okay next you can check if everything was installed correctly and just by running this command one by one we can run it just to so you can check if everything is fine on your end this is maybe I can do like this um yeah Docker yeah probably one by one this is the commities this so you can check it on your local machine if you're using the same version as me if you find any problem okay so so now let's oh we have one command so this is so much better sorry about that okay and so now we're going to set the amount of course that will be needed on your local machine so I think I have 10 chords in this virtualized machine so eight cord is fine I think I don't have enough memory but that's going to be okay I'm going to give it six and and a half gigabytes next um we're going to add the current user to Docker we will need this in order to install um the mini Cube to start the mini Cube okay here you go and while that is installing I'm just want to show you uh my local resources so you can compare with your machine of course usually you want to done this you can also do this in an external server in a virtualized external machine or in your own machine to to work locally and use all your resources but as you can see this machine I have 10 cores and 9 GB of RAM okay we're going to wait for this to install so I'm going to uh cut the video here now it's ready let's continue now we're going to enable Ingress and this can take a while to verify um but Ingress is for um the so the kubernetes from the they can interact with each other you will need to install ing to make sure that this command Works before continuing so yeah again I'm going to H cut the video here Ingress was enabled and finally we also going to need to enable Ingress DNS there you go so let's continue now we're going to check what is the IP address of our mini Cube which is this one it's usually this one but just check that it's the same one because now you will need to put that um IP address in every rout here in your Etc host so let's go and edit that file so at the end of there just paste the following and remember make sure that your IP IP address match mates your mini Cube there you go okay now we are ready to uh like install and download and install the SDK okay so first you will need to this this may change uh by the time that you're watching this video because right now the repo is private so you need to log in uh to your GitHub account so right here I have the I have my private key my private um GitHub um my private GitHub key which of course I'm going to delete it when this video is uploaded and now you will need to log in just change your username here again this may not be needed by the time that you're are watching this video because the repo may be public and the the SDK should be announced by then next we colog uh oh yeah in this case I haven't set up my um H key so I may be using just https which is fine my username and again I'm going to be using um okay here you go and this um Al again you will need to authenticate when this is live because um yeah the repository will be public and now we are ready to go and prepare all the configuration files so the make bootstrap will create a new directory under the devet folder and that directory will be called scris a and in there you can start configuring your uh yeah you can configure a lot of things there before deploying your devet so again I'm going to cut the video here so you don't have to wait okay here you go now the that it finished we are going to see how we can configurate this specific file let's take a look nanoor SDK config THL file here as you can see you can configurate uh the other add say who is going to be like your chain ID your layer one Shain ID and your database connections and yeah you can configure also the addresses the pre- compiles you can configure all of that and the only configuration change that we're going to do is here we're going to change the maximum transaction chunk by yeah just we just going to lower the required times to um finalize transactions on layer one just to to to make it faster let me check if it's this is the recommended uh this is what the engineering team recommended me so yeah this look good in this case yeah we're just going to make it faster but as you can see there's many things that you can configure here also in the documentation in the docent official documentation you will be able to see all uh what you can configure which is super cool so if you change the config Tomo file you will need to run make config so make sure to do that and once that's ready you can run making stall and this will start the SDK on your local machine and remember this will run a local Anvil layer one and the scroll decate settling on Anvil so thek as the layer two will settle and finalize on the layer one so you will be running two blockchains here so here you go it looks like it all work well if you want to check that everything works is working correctly you can um run the pots command check here kubernetes get pots here you go so right now everything is pending is being initialized so this could take a couple of minutes like I don't know um maybe two to 5 minutes so we're going to wait Al I'm going to cut the video here and let's wait for it to to finish deploy okay now the SDK is running once you run again the cube C get pods command you you should be able to something like this like everything is running everything is completed so looking good next there are a couple of commands that we need to run um starting by this this one this will fund open a new terminal new and go to the scroll SDK newly created folder and fund some accounts so this oops this will uh fund some accounts that are needed for uh finalizing on layer one and also a very very interesting command that you can run is the end to endend test so this will uh send some transactions do you want to find this wallet yes okay this will uh send some transactions some dummy transactions back from layer one to Layer Two we'll deploy a token uh launch it to from and near C20 token from layer 1 to layer two and then from Layer Two to layer one and see how it finalizes on layer uh one and yeah I think this is very okay Bri and this is very cool because you can see like uh yeah just to check if your chain is working correctly if your chain is finalizing correctly on layer one and also this can help you like as a text like a as a code example uh how to do all this process other cool command is um this one this will generate some activity some dummy activity on your chain so this will generate some uh transactions basically like very like empty transaction random transactions on your uh Layer Two just to see because I'm scroll as you know or as and Layer Two transactions get H grouped into chunks and then get groups into bundles and those bundles are finalized on layer one so you need many transactions to see all this process so here you can help this can help you just um yeah just just generate some dummy transactions okay other interesting command is this one so we're going to open H we're going to open an new terminal and here this will fund an account so here in metamask I installed H yeah in my Firefox I installed the metamask extension and we can just basically font my account so just paste your address here and fund it and it will give you 0.1 if on Layer Two and in order to test it we're going to add the scroll chain to our um metamask so let's try that now add Network manually this the SDK Layer Two And this is the chain ID currency is if remember that you can also change it to an specific earc 20 token uh which is very cool and you save it now you can switch and as you can see I already have testet it on my Layer Two Of course you can now go to and deploy a contract for example we can go to the H to the open seing contract Wizard and deploy ad DOI erc20 token and let's try that out it should work the same like as any other tool that you are um familiarize with so let's see um let's just mean some [Music] tokens for example 21 million token to the sender and now we can just connect to metamask to the scroll uh SDK layer two test net and basically just deploy the contract as it normally would it will cost you a little bit of testet gas and there you go this is our contract it works perfectly the same as any other chain here as you can see my 21 million tokens there you go it's working good so next what we want to do now is explore what comes out of the box from the the web UI in the scroll SDK so we can go to front ends what HTTP um front ends do scroll SDK and this UI comes out of the box you can connect to the rollup but just remember that if you're using this specific frontend that is not using https uh metamask won't want to connect because it will think that is not safe which is fine so that's why we connected manually like we did but we have a bridge in here you can bridge between the Scrolls decate Layer Two and our test net also blockchain lat running locally with Anvil layer one we can withdraw for example um some e back to layer one or also layer one to Layer Two so you can see for example if I want to withraw some it uh there you go you can go Bridge back and forth and also you can look at the rollup Explorer right now since you will need some time to see all the batches once remember that all the transactions get grouped into batches and then all the batches get finalized on layer one you will need some time to see your Bates appearing here but don't confuse the rollup Explorer with the actual uh chain Explorer this is like the the block Scout and all all the transactions happening on the layer one and Layer Two will be visible here all the new blocks being mined um yeah be visible here and yeah as you as you know all of these are charts so you can take this as example for example if you want to integrate something new you can also integrate a new chart with Helm that offers new functionalities and yeah everything is customizable out of the box and I want to show you something nice if you want to um there's also an main interface the admin system dashboards you go to http the me system dashboards and the password is admin admin if you want to access it you can scan it from your authenticator app on your phone and type for example for me I'm scanning it right now and now I'm inputting my code code just go again and input it again and then you will be able to see this panel and in here you will be able to see uh all the batches and the bundles once uh they are getting finalized yeah basically all the transactions as you can see there are no transactions no bundle finalized so in order to see that and other couple of things that I want to show before ending the video we're going to wait for uh yeah just going to wait for some transaction to finish and some bundles to finish so I'm going to cut the video now just I waited some time here as you can see and just a um batch finalized on layer one so um you will be able to see that of course on the admin the finalized batch as long as yeah everything else and also you will be able to see the endtoend test completed successfully so remember the transaction the end to test that we run before s a a transaction from layer one to Layer Two to Layer Two to layer one so this mean that everything is working correctly transactions are being finalized and remember that scroll is a CK evm which mean that you need a CK proof to finalize the transactions on layer one but for this specific devet like any proof would be like any z0000 Z proof would be um consider valid just so you as a developer don't have to run aover just to check if everything is working correctly if you do want a run approver remember that you will find more information about that in the documentation also with you can Outsource proofs uh basically around give a Syer um so the the capabilities of of running the proof for you so yeah that's it for this video thank you for watching refer to the documentation always since this will be like um we will have a lot of improvements and more guides soon and yeah thanks for watching
Automatic transcript — names and jargon may be misspelled.