Skip to content

Getting started with RSK – step by step

herrerameri edited this page Nov 17, 2017 · 42 revisions

Hello everyone! It’s a really easy-to-follow tutorial to start with RSK Smart Contracts. It’s divided into small modules which duration are between 10 and 30 minutes, so you can organize your time and learn! First of all, We propose you to mount your own development environment. So, you should get/install:

Tool Details
TESTRPC TestRPC is an in-memory blockchain that provides a fast alternative to test your contracts, since you don't have to wait for mining or get Gas to publish your contracts in real network
EDITOR/COMPILER select and download one from the link
TRUFFLE Truffle is a framework that helps you write, test and deploy smart contracts. It is compatible with RSK Smart
REMIX an online Solidity compiler, open the link in browser

Module 0 - Learning about DApps and Smart Contract

Module 2 – Deploying a smart contract on development environment (30 minutes)

We need TestRPC running. So, open a terminal and write:

testrpc

Ok, now you have an on memory blockchain running on your PC. TestRPC

As soon as you run testrpc you can see a list of available accounts that are already created and ready to use, and also the port where TestRPC is running. The default port is 8545.

We can interact with TestRPC using the RPC protocol or Web3 (this is the Ethereum compatible JavaScript API which implements the Generic JSON RPC spec, a list of the implemented methods can be found here).

You can read step by step here how to connect Truffle to TestRPC, or see the explanation in this video.

Module 3 – Deploying a smart contract on RSK (30 minutes)

Module 4 – Adding functions (20 minutes)

Module 5 - Interacting with contracts