-
Notifications
You must be signed in to change notification settings - Fork 269
Starting with RSK Smart
This introduction is intented to guide you through the process needed to create, publish and verify your first contract in RSK Smart network. We will start with the basics on how to install tools and the different options you have to develop your contracts, if you already know that you can just jump directly to the Smart Contracts part.
Smart contracts for RSK are written using Solidity (a Javascript like programming language) and are fully compatible with Ethereum Smart Contracts, so you can migrate your existing Ethereum Smart Contract to RSK Smart without doing any changes. If you are new to Solidity you can find a good introduction here, we will play a little around with some code examples but it is not the intent of this document to teach Solidity in depth.
You can create your contracts using any text editor but it is a good idea to use some more advanced tool, here's a list of some of them
- Atom
- IntelliJ IDEA
- Visual Studio Code
- Vim
You can find a more complete list here
There is an online editor/compiler for Solidity that can be very useful for beginners or if you don't want to install any additional tool, this can be found here
With the online editor you can write and verify the syntax, compile and see the resulting code, it's a very good tool for learning Solidity.
There is an open source tool called Truffle that facilitates development a lot since it allows you to connect to your local RSK Smart node and call the compiler, run unit tests and publish your contracts in a very easy way. We have a detailed reference on how to develop your contracts using Truffle here.
If you don't want to use Truffle you can create your contracts with any text editor (or the online editor) compile and publish directly to the RSK Smart network using the RSK Console.
The last option to develop your contracts is using the standard RPC protocol (full compatible with Ethereum) with any tool you want like cURL, Postman or Fiddler (windows only). For a detailed introduction on how to deploy contracts using RPC calls go here.