Over the past year, many projects have taken it upon themselves to understand or build second layer scaling solutions to enable their decentralized applications to meet the expectations of existing users of the Internet. In this post, we’re going to be demonstrating how you can enable your decentralized applications with that same user experience without learning any new technology beyond modifying a few lines of code in a config file.
Getting Your Elastic Sidechain
To prevent spamming and resource exhaustion, elastic sidechains are currently being issued from the SKALE Discord. If you haven’t already gotten yours, make sure to join the general channel and ask for one to be provisioned for you!
Getting Testnet ETH
Once you’ve gotten your elastic sidechain provisioned and have received its RPC endpoint, it’s time to get some testnet ETH from the SKALE Faucet. Simply navigate to the faucet, input your elastic sidechain’s endpoint and your address, and click ‘Get ETH’ to be sent 0.5 testnet ETH.
Rock, Paper, Scissors
Now that we have our elastic sidechain and testnet ETH, let’s clone this repository, navigate to the rock-paper-scissors directory, and follow this README. To be clear, ACCOUNT is your Ethereum wallet address - if you have trouble getting the private key for your account, you may be interested in generating a new private key with local software or some online wallet generator*.
* We only suggest online tools for private key generation for purposes of this tutorial and testing - you should never trust some website to provide you with a private key or manage your private key(s).
Integrating with SKALE is just that simple.
Once you’ve migrated and deployed your contracts, you will be able to access the game using Metamask by going to http://localhost:3000. You should see the following screen when you go to that url:
Once there, make sure that Metamask is configured for your custom elastic sidechain’s rpc endpoint and that your current account / wallet address has testnet ETH. You can configure a new network by going to ‘Custom RPC’ when selecting a network from the network dropdown in the upper right-hand corner of the Metamask UI.
The first thing you’ll notice when using this application is either that:
- It’s super fast (elastic sidechains support >1000tps).
- It’s not working and Metamask is giving me an error.
If the latter is true, make sure that you are running Metamask v6.1.0 or lower - we have had a number of issues with Metamask in the past and have decided to stop support past version 6.1.0 in favor of other wallet providers as covered here. These other wallet providers will also likely better suit your users’ needs given their high degree of configurability.
And that’s all it takes to deploy your first dApp!
Make sure to check out the other examples in that repository to explore things like decentralized filestorage which supports files of up to 500MB! Also feel free to check out our Developer Documentation and reach out in Discord with any questions. For a deeper dive into how SKALE works and is able to provide 20,000 TPS, make sure to also check out our Technical Overview and Consensus Overview.
And if you or your project would like to go deeper with SKALE, make sure to sign up for our innovator program to get dedicated resources and assistance from the SKALE team!
SKALE’s mission is to make it quick and easy to set up a cost-effective, high-performance sidechain that runs full-state smart contracts. We aim to deliver a performant experience to developers that offers speed and functionality without giving up security or decentralization. Follow us here on Telegram, Twitter, Discord, and sign up for updates via this form on the SKALE website.