How to start development step by step

How to start development step by step

Development of a smart contract on the Credits platform represents the process of writing code (mathematical algorithm) in the Java programming language.

Step 1. Necessary requirements and knowledge

Step 1. Necessary requirements and knowledge

To start developing smart contracts on the Credits platform, check your computer for the following system requirements.

System requirements for a personal computer 

Minimum system requirements:

Operating system: Windows® 7 / Windows® 8 / Windows® 10 64-bits (with latest updates). CPU: 1 GHz or better supporting  PAE, NX and SSE2; RAM: 2-4 Gb; HDD: 1 Gb; Internet connection: 3 Mbit/s;

Recommended System requirements:

Operating system: Windows ® 7 / Windows® 8 / Windows® 10 64-bits (with latest updates). CPU: Intel® Core ™ i3 or AMD Phenom ™ X3 8650; RAM: 4-8 Gb; HDD: SSD 1 Gb; Internet connection: 5 Mbit/s.

Java, necessary knowledge

Smart contract is a computer algorithm designed to conclude and maintain commercial contracts in the blockchain technology.

The language for writing smart contracts on the Credits platform is Java. Knowledge of Java is as a strongly typed object-oriented programming language is necessary.

A smart contract is a class that is inherited from the parent class of SmartContract; you must perfectly know the basic concepts such as: class, inheritance, constructor, variable, access modifiers, function, cycle, conditional statement, boolean expression, data types.

And also to be able to use the Windows operating system command line(Command Line file cmd.exe), and to know its commands.

Step 2. Installing the platform

Step 2. Installing the platform

Installing the Credits platform

The Credits platform is a free open source project, available at credits.com.

  • To start working, you need to install the Latest version of the application.
  • Download and run the installation file as Administrator. Follow the recommendations of the installation wizard.
  • Create an account in Credits Desktop Wallet
  • Configure the Node with configuration file

More details are available in the articles:

  1. How to install the Node
  2. How to set up PC’s to run Nodes

Step 3. Creating code in any development environment

Step 3. Creating code in any development environment

As it was written above, the development of a smart contract is performed in the language of object-oriented Java programming. A Java smart contract is translated into the Java bytecode executed by the Java virtual machine (JVM), a program that processes the byte code and passes the instructions to the hardware as an interpreter.

The resulting bytecode is completely independent of the operating system and hardware, which allows you to perform a smart contract on any device that has a corresponding virtual machine.

The development environment is a set of software tools used to develop software. The most popular development environments for JAVA applications are: IntelliJ IDEA, NetBeans, Eclipse Java.

In the development environment editor, you can write the smart contract code, check it for errors, and if no errors are present, perform the transfer of the smart contract to Credits Desktop Wallet.

The transfer operation is performed by copying the smart contract code to the clipboard and inserting it into the Credits Desktop Wallet.

More details are available here

Step 4. Deploying a smart contract

Step 4. Deploying a smart contract

Deployment of smart contracts on the Credits platform is performed in the Credits Desktop Wallet.

After inserting the smart contract code from the clipboard, click "CHECK" and then "DEPLOY" buttons, and your smart contract will be deployed on the Credits platform.

To find a smart contract after its creation, you need to save its hash.

Enter the hash of the smart contract into the "search contract" field, and click the "SEARCH" button, see Picture 1.

Picture 1. Searching for Smart Contract

Once the smart contract is found, select the method of execution from the "Choose method" drop-down list, set the input parameters, click the "EXECUTE" button, see picture 2.

Picture 2. Verification of the result of the execution of the smart contract

More details are available here

10 Useful article

Contents