Step-1 -Create Azure Blockchain as Service
Step-2 Fill details of node and consortium
Step-3 – Choose Blockchain service
Step-4 Verify Transaction Node
Step-5 – Next, click on Connection strings and note your Access keys. We will need this information later when connecting from MetaMask Azure Logic Apps.
Step-6 Click on Sample Code. We will also need this information when we need to create an account to send transactions from Azure Logic Apps.
Step-7 Create Smart contract
To build a smart contract, we will use a web-based IDE called Remix. To create a new smart contract we will click on the + sign and then provide a name for our smart contract called myPostBox.sol.
Our smart contract is quite simple, we have 3 methods that allow us to post a message, get the message posted – kinda like a typical “echo” demo and lastly determine how many times our smart contract has been called.
- On the first line, we will see the following statement: pragma solidity ^0.4.22; What this means is that this contract requires version 4.22 of the solidity compiler or higher. When it comes to choosing your compiler version, keep this in mind.
- To address this, I have chosen the compiler version: V0.4.22+commit.4cb486ee.Emscripten.clang which will provide for a successful compilation.
We have a compiled version of our smart contract, but we haven’t deployed it anywhere. We now want to deploy it to our Azure Blockchain Services instance. We can perform this deployment from Remix, but we need to establish a connection to Azure first. We can do that using a chrome extension called MetaMask. Once we have it installed, we can click on it from the top right-hand corner of our Chrome browser.