The best place to start would be to begin with understanding the concepts of methods and scripts as they are essentially the building blocks for defining and executing smart contract logic in Dijets Blockchain. You will find Methods as a mainstay of Dijets Blockchain because this smart contract type is almost central to everything the Rogue Platform offers.
Do work through some of the basic tutorials and follow along to introductory examples like "HighFive.Rogue" below and once comfortable you can move onto other subjects and walkthroughs on the sidebar to understand more advanced concepts of Rogue.
To install it you'll need:
- VSCode (version 1.43.0 and above) - you can get it here; if you already have one - proceed to the next step;
- Rogue IDE - once VSCode is installed, follow this link to install the newest version of IDE.
Rogue IDE proposes a single way of organizing your directory structure. Create a new directory for your project and open it in VSCode. Then setup this directory structure:
Also you'll need to create a file called
.rgconfig.json which will configure your working environment. This is a sample for
dijets uses bech32 encoded 'dijets...' as its prefix for addresses. For local runs and experiments 0x1 address is enough - it's simple and short. Though when working with real blockchains in testnet or production environment you'll have to use correct address of the network you've chosen.
Rogue IDE allows you to run scripts in a testing environment. Let's see how it works by implementing a simple method of
high_five() function and running it inside VSCode.
Create new file called
methods/ directory of your project.
If you decided to use your own address (not
0x1) - make sure you've changed 0x1 in this file and the one below
Then create a script, let's call it
Then, while keeping your script open follow these steps:
- Toggle VSCode's command palette by pressing
⌘+Shift+P(on Mac) or
>Rogue: Run Scriptand press enter or click when you see the right option.
Voila! You should see the execution result - log message with '5' printed in debug. If you don't see this window, go through this part again.
Your directory structure should look like this:
You can have as many methods as you want in your methods directory; all of them will be accessible in your scripts under address which you will specify in .rgconfig.json
We will continuously be adding more tutorials and guides to these pages in the coming days.