April 25, 2026

Capitalizations Index – B ∞/21M

Calling Ethereum Smart Contracts in Azure Logic Apps

Calling Ethereum Smart Contracts in Azure Logic Apps

Intro

Microsoft released a preview Logic App Connector to deploy Solidity Smart Contracts, call Functions and execute Transactions.

An example usage scenario would be in case a document is added to the CosmosDB, a Logic App would be triggered to store additional data in the Blockchain.

This article aims to give a step-by-step overview on how to get this working.

Steps

This article describes the following steps in detail:

  • Create an Account and Project on Infura.io
  • Create an Account with Address using MetaMask
  • Define a Smart Contract
  • Deploy this Smart Contract to the Ropsten test network using Remix
  • Create a Logic App in the Azure Portal
  • Add the “Query SmartContract Function (preview)”
  • Add the “Execute SmartContract Function(preview)”
  • Test the Logic App
  • Alternative: create and deploy your own Azure Function to interact with the Ethereum BlockChain

Create an Account and Project on Infura.io

With Infura.io, it’s very easy to interact (as a DApp) with the Ethereum BlockChain network.

First step is to create an account and then create a project.

One you have created the project, make sure to switch to the Ropsten endpoint and remember the complete URL, this will be used later.

Infura.io : Project

Create an Account with Address using MetaMask

Download and install the MetaMask as a Chrome extension.

Create an account on the Ropsten Test Network using this guide. Once the account is correctly created, you can view it:

MetaMask : Account

Make sure to view the details and export the private key, you need this later:

MetaMask: Export Private Key

Note that initially, the balance will be 0 ETH. To get ETH to test SmartContracts, go to https://faucet.ropsten.be/ and request some test ETH:

Faucet : Ropsten ETH

Go to Etherscan.io to view details on your Account Address:

Etherscan.io : Overview

Define a Smart Contract

I’m using a very simple Solidity Smart Contract for this article.

SimpleStorageContract.sol

Deploy this Smart Contract to the Ropsten test network using Remix

Go to http://remix.ethereum.org.

The first time you connect, MetaMask is detected and asks for permission to connect to Remix.

Copy the SmartContract to a new file:

Remix: Add Contract

And deploy the Smart Contract.

Note that it shows information about the contract deployment via the Metamask plugin)

Remix : deploy

See also this link https://medium.com/swlh/deploy-smart-contracts-on-ropsten-testnet-through-ethereum-remix-233cd1494b4b

Once it’s deployed, you can see the status in MetaMask:

MetaMask: Contract Deployment Overview

Make sure to copy the ABI (Application Binary Interface) from the SmartContract, you will need this later.

Remix: Copy ABI to clipboard

Also remember the Contract Address, you will also need this later:

Remix: Copy Address to clipboard

Create a Logic App in the Azure Portal

Now it’s time to go to the Azure Portal and create a new Logic App in the designer which includes the following steps:

  • When a HTTP request is received : This is the start point
  • Initialize variable steps: To define the ABI and the Address
  • Query smart contract: To call a function from the Smart Contract
  • Execute smart contract: To execute a function from the Smart Contract
  • Return response: return (raw) response
Azure Portal : Logic App — Design

Add “Query SmartContract Function (preview)” step

When adding this step, you first need to create a connection:

Logic App Ethereum Blockchain step : Create Connection

The private key is the key you copied from MetaMask.

Once the connection is correctly defined, you can fill in the details for the Query Smart Contract Function.

Logic App Ethereum Blockchain step : Query SmartContract Function ”getString”(request)

In the above example, the ABI and the Smart Contract Address are variables which are defined the the variables step. But it’s also possible to copy-paste the data directly for these field. The function which is called is named getString (without any arguments).

The response is:

Logic App Ethereum Blockchain step : Query SmartContract Function ”getString” (response)

You can also call a function with multiple parameters, see example below.

Logic App Ethereum Blockchain step : Query SmartContract Function ”addNumbers” (request)

The response is:

Logic App Ethereum Blockchain step : Query SmartContract Function ”addNumbers” (response)

Add the “Execute SmartContract Function(preview)”

Add this step and fill in the details for the Execute Smart Contract Function

Logic App Ethereum Blockchain step : Execute SmartContract Function ”setString” (request)

Test the Logic App

If all is setup correctly, you should be able to run the Logic App in Azure Portal.

Azure Portal : Logic App — Run

Create and deploy your own Azure Function to interact with the Ethereum Blockchain

Instead of using the Query and Execute SmartContract Connectors, it’s also possible to write your own Azure Function. This will be described in a new story.

References

Published at Thu, 23 May 2019 16:13:41 +0000

Previous Article

The U.S. Just Got its First Cryptocurrency-themed Cafe

Next Article

Roadmap Updates – ChainSafe –

You might be interested in …

Re: 市场周报:比特币的熊市之战

Re: 市场周报:比特币的熊市之战

Re: 市场周报:比特币的熊市之战 在全球主要交易所,比特币的法定价值在过去的24小时里从每个比特币1215美元跌到1140美元的低点。截至发稿前,价格有反弹徘徊在1170美元至1180美元之间,不过市场并没有表现出能够抵御卖家的迹象。比特币价格进入熊市,该数字加密货币的市值趋势是向下的。比特币的日交易额也下降到3亿美元。比特币价格下降的背后原因也不得而知。目前市场前景未定,任何方向的突破都是有可能的。 一些技术指标表明,当前的熊市可能只是短暂的,因为100简单移动平均线(SMA)仍然高于200SMA的趋势线。日交易员和那些做空仓位(做空主要就是买跌,股价越跌他就越赚,主力做空主要是对股价进行一个砸盘或者放出利空消息(也就是不好的消息)令市场产生恐慌散户大量出逃以达到买跌的目的)的人肯定会在当前的市场环境中找到对应策略。即使SMA显示出一个可能的上折,相对强度指标(RSI)和随机读数显示,价格可能会继续向下滑动。 很多大型交易所的订单显示卖家确实是控制着市场,而且价格下降到四位数以下仍然是完全有可能的。此外,比特币与山寨币竞争的市场份额优势也在我们的上周价格报告之后就开始下跌了,目前停留在67%。以太坊市值获得了剩余的大部分市场份额,以太币的周交易额大约是比特币的日交易额的一半。 数字加密货币生态系统中的其他山寨币也表现出了价格的不确定性。以太坊的以太币代币价格在过去的仅仅24小时内从47美元上涨到50美元。以太坊的市值约为43亿美元,以太币的日成交额约为1亿3000万美元。有些人认为以太坊最近价格颠簸是因为他们正在开发一款Raiden software(雷电软件)——以太坊版的闪电网络。以太坊之后,就是瑞波币,它的价格稳定地保持在每个瑞波币3美分,本周几乎没有什么显著的波动。莱特币以截至发稿前的5亿美元市值拿下第四名。它在过去两周内的价格上涨可能和即将实施的隔离见证有关。达世币似乎已经抵御住了卖家,现在价格已经达到了每个代币70美元。达世币的上涨可能是因为Kraken交易所即将在它的市场中上市达世币。 前十名以内的其他数字加密货币的情况和上周都差不多,比如门罗币、以太经典、NEM、Augur币和Maidsafecoin(互联网币)。所有这些数字资产此时都有轻微的下跌,除开NEM,它上涨了2.5%。还有一种代币很引人注意,那就是PIVX,它目前停留在第十一的位置,在不久的将来很有可能会进入前十。这款代币和达世币的基础设施非常相似,但是他们声称没有instamine——声称这个问题自(暗黑币)区块链创建以来就,一直困扰着达世币的开发者。 判决 我们在比特币世界中又度过了一周,这款数字加密货币的市值似乎正在尽力保持在上述的那个四位数价格范围内。截至目前,市场出现低迷现象之后却并没有对此找到任何明确的理由。交易员看上去似乎也不确定,也许这可能只是交易员从中获利的结果。短期内,Whale Club Telegram(鲸鱼俱乐部电报)频道的某些成员和Trading View(交易视角)的交易员声称价格可能会在未来2-5天内都呈现低迷现象。 熊市情景:如果比特币价格持续下跌,它有可能会低于1100美元大关,甚至进一步下跌到4位数以下范围。截至发稿前,订单和深度图都显示它极有可能有一个1125美元的盘桓点。RSI和随机趋势线显示每个比特币的价格可能会出现超买现象(超买:就是已经超过了买方能力,买进股票的人数超过了一定比例,那么,根据“反群众心理”或者说“反意见理论”,这个时候应该反向卖出股票)。短期内可能还会出现更多的回跌。 牛市情景:图表还显示,“双底”趋势线可能会让价格在不久的将来再次回到1200美元以上,100SMA和200SMA指标都表明买方可以很轻易地控制市场。目前,在1200美元关口上方有明显的销售大空间,而要突破目前的阻力还需要一些时间。 免责声明:比特币价格文章与市场更新都仅供参考,不应被视为交易建议。进行任何一个交易都是读者做出最终决定,bitcoin.com和作者都不为其得到的任何损失或收益负责。永远记住, “金钱”是由持有私钥的人控制的。 英文来源:https://news.bitcoin.com/markets-update-bitcoins-battle-bear-market/编译:Margaret稿源(译):bitcoin86.com (Why?) Published at Sat, 15 Apr 2017 04:06:35 +0000 [wpr5_ebay kw=”bitcoin” num=”1″ ebcat=”” cid=”5338043562″ lang=”en-US” country=”0″ sort=”bestmatch”]SLOW POLITICSInternational Conference | November 13-15 Supermarkt | Brunnenstr. 64 […]

Blockchain Training India

Blockchain Training IndiaBlockchain is the leading digital assets platform which records and controls the monetary information. It is considered as the revolutionary shared ledger technology that help businesses solve complex problems. Blockchain Technology is for […]