A key on a keyboard with the infura symbol on it, representing the smart contract tutorial by trimplement co-founder Natallia Martchouk about migrating a parity-based smart contract into an infura-based one

Coding Smart Contracts -Tutorial Part III

Why Infura

Photo of Natallia Martchouk, co-founder of trimplement
Natallia Martchouk, co-founder of trimplement, explains how to develop Ethereum smart contracts.

Last year I published a tutorial helping you get started with the development of smart contracts and using them from java applications. In those tutorials, I’ve described how to use parity as the Ethereum client. Exactly this setup we’ve used also in our own project “Value Manifesto”. But a couple of weeks ago we’ve decided to switch the Ethereum client from parity to Infura. This gives me an opportunity to extend my tutorial with new information.

One of the reasons for changing the Ethereum client is as follows: maintaining your own Ethereum node can give you headaches. First of all, you need to keep your parity version up to date as it’s being continuously improved and adapted to the changes happening on the Ethereum blockchain. 

Read More

Coding Smart Contracts – Tutorial Part II

How to use a smart contract from a java application

Photo of Natallia Martchouk, co-founder of trimplement
Natallia Martchouk, co-founder of trimplement, explains how to develop Ethereum smart contracts.

In Part I of my tutorial I’ve explained how to develop and deploy a simple smart contract. Today we will see how this deployed contract can be used in java applications. 

We are going to use Parity as Ethereum client and Web3j java library for interaction with Parity. I’m assuming that you already have installed Web3j, solc and Parity following “Prepare” instructions in Part I.

5. Get Parity Synced

First of all your Parity needs to get synchronized with the Ethereum testnet Rinkeby, meaning it needs to download the current database status to your local machine. Start your local parity with 

$parity --chain rinkeby --rpcapi "eth,net,web3,personal"

See also this documentation of Parity about getting synced.

In the meantime, we can prepare everything that we need to call our smart contract from a java application.

Read More