In this tutorial, use the Azure Blockchain Development Kit for Ethereum extension in Visual Studio Code to create, build, and deploy a smart contract on Azure Blockchain Service. You also use the development kit to execute a smart contract function via a transaction.

You use Azure Blockchain Development Kit for Ethereum to:

  • Create a smart contract
  • Deploy a smart contract
  • Execute a smart contract function via a transaction

Create a smart contract

The Azure Blockchain Development Kit for Ethereum uses project templates and Truffle tools to help scaffold, build, and deploy contracts. Before you begin, complete the prerequisite Quickstart: Use Visual Studio Code to connect to a Azure Blockchain Service consortium network. The quickstart guides you through the installation and configuration of the Azure Blockchain Development Kit for Ethereum.

  1. From the VS Code command palette, choose Blockchain: New Solidity Project.
  2. Choose Create basic project.
  3. Create a new folder named HelloBlockchain and Select new project path.

The Azure Blockchain Development Kit creates and initializes a new Solidity project for you. The basic project includes a sample HelloBlockchain smart contract and all the necessary files to build and deploy to your consortium member in Azure Blockchain Service. It may take several minutes for the project to be created. You can monitor the progress in VS Code’s terminal panel by selecting the output for Azure Blockchain.

The project structure looks like the following example:

Build a smart contract

Smart contracts are located in the project’s contracts directory. You compile smart contracts before you deploy them to a blockchain. Use the Build Contracts command to compile all the smart contracts in your project.

Read more: https://docs.microsoft.com/en-us/azure/blockchain/service/send-transaction