-
Notifications
You must be signed in to change notification settings - Fork 0
Getting started with RSK – step by step
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 | on memory blockchain |
ANY TEXT EDITOR | You can find a complete list here. |
TRUFFLE | a framework to deploy and interact with deployed smart contracts |
REMIX | an online Solidity compiler, open the link in browser |
It’s a good idea to start with TestRPC because on a real blockchain we should wait miners to include our transactions on a block and then we could query over our data. With TestRPC (and because it’s a local and on memory blockchain) we would see our changes on blockchain as an instantly operation.
- Open Remix.
- You can see a default contract written in Solidity, the HelloWorld smart contract. Easy to understand!
Note the word pragma
. Source files can (and should) be annotated with a so-called version pragma to reject being compiled with future compiler versions that might introduce incompatible changes.
And a tip to learn: the constructor runs only when the contract is created.
So, we have our first smart contract!
We need TestRPC running. So, open a terminal and write:
testrpc
Ok, now you have an on memory blockchain running on your PC.