Member-only story

Quorum on Azure Blockchain Service — Part 3— Interact with your smart contract

Juarez Junior
4 min readJun 30, 2020

--

Microsoft Azure Blockchain

by Juarez Junior

Introduction

This blog post provides the detailed steps required to interact with a smart contract that has been previously deployed to a Quorum consortium on the Azure Blockchain Service.

It complements a couple of previous blog posts below:

Quorum on Azure Blockchain Service — Part 1 — Create a Blockchain consortium member

Quorum on Azure Blockchain Service — Part 2 — Deploy a smart contract with VS Code

We’ll use our project on VS Code (IDE) along with the CLI (Command Line Interface) to perform the required steps.

So without further ado, let’s start!

Get the Azure Blockchain Service name

First of all, let’s add a couple of functions to our source code file. The Gist below shows the source code in Solidity:

In the scope of this exercise, we’ll edit the smart contract and add a couple of new functions. Add the following to the end after SendResponse function:

function getRequestMessage() public view returns (string memory) {
return RequestMessage;
}function getResponseMessage() public view returns (string memory) {
return ResponseMessage;
}

Here’s the final result with highlights:

A couple of new functions

Again, right-click the smart contract file (HelloBlockchain.sol), and compile it by selecting Build Contracts:

Build Contracts

After the compilation, you will see the message below on the terminal (log output):

--

--

Responses (1)

Write a response