Azure NFT (Non-fungible Token) Solution Accelerator

NFT Token SA Banner

Welcome to the world of decentralized applications!

This repo is for a Azure Non-fungible Token Solution Accelerator that leverages the ERC 721 Token Standard to help manage transactions on Enterprise Blockchain Services like Ethereum, Quorum, QBS(Quorum Blockchain Service) and Hyperledger Besu

It supports all ERC 721 Token transactions and provides several features to assist in managing Blockchain Networks, Consortium Parties, as well as private key transactions.

Features

With this Azure Non-fungible Token Solution Accelerator, you can take advantage of:

  • HTTP REST APIs for ERC 721 Token Functions (ERC 721 Token API)
    - ERC 721 Token Smart Contract Deployment
    - TTF Token Definition nFmbtg -(Non Fingible, Burnable, Transferrable, Delegatable) Token operations

  • HTTP REST APIs for DApp Configurational and Operational Functions (Token Service Management API)
    - Manage Extenal Account with Private Key
    - Manage Blockchain RPC Transaction Node
    - Manage Consortium Party

  • Supports User's Key Management and External Transaction Signing
    - Automatically load User's Private Key and External Sign and Submit Transaction

  • Logging every Token Transactions
    - Indexing every Token Transactions in Cosmos DB

Support QBS(Quorum Blockchain Service) - ChainId is 10 (previously ABS had)

Prerequisites

In order to successfully deploy this solution accelerator, you will need to have access to and/or provision the following resources:

  1. Access to an Azure Subscription, with required permissions - Required to deploy compute resources
  2. PowerShell 7.1 - Required to run deployment scripts
  3. Azure CLI installed - Required for deployment scripts to be run
  4. Docker Desktop - Required for debugging on your local machine or containerizing codes in the Deployment process
  5. User Access Administrator Role - Assigned to the user in Azure Subscription

Architectural Overview

The architecture diagram below details what you will be building for this Solution Accelerator.

Architecture Diagram

Getting Started

Clone/download this repo onto your computer and then proceed through the steps below. After completion of all steps, you will have a working end-to-end solution:

01. Azure Resources Deployment:

The resources in this folder can be used to deploy the required cloud services into your Azure Subscription. This can be done either via the Azure Portal or by using the PowerShell script included in the deployment folder.

After deployment, you will have an Azure Container Registry, Azure Kubernetes Service, Azure Key Vault, Azure Cosmos DB Account, and Virtual Machine with Quorum.

Resources can also be deployed into your Azure Subscription by using one of these Deploy Azure links:

Deploy to Azure    Deploy To Azure US Gov   

Note: Follow "Step 3" in Resources Deployment to configure managed identity permission if you have deployed resources using above Azure links.

02. Quorum Configuration:

After the resource deployment step, you will need to configure the Quorum Service. Follow the steps given in the quorum configuration guide to configure and deploy the quorum service.

03. Token Service Deployment:

This folder contains a PowerShell script that will build a docker image, from Token Service's source code, and deploy that to an Azure Kubernetes Service Cluster, using a YAML manifest file.

04. Solution Testing:

This reposity contains a sample console app that can be used to test the solution.

Folders

Refer to the following folders to learn about the solution components specific to Azure Non-Fungible Token Solution Accelerator.

Microsoft Open Source Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct.

Resources:

License

Copyright (c) Microsoft Corporation

All rights reserved.

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE

Privacy

When you deploy this template, Microsoft is able to identify the installation of the software with the Azure resources that are deployed. Microsoft is able to correlate the Azure resources that are used to support the software. Microsoft collects this information to provide the best experiences with their products and to operate their business. The data is collected and governed by Microsoft's privacy policies, which can be found at Microsoft Privacy Statement.

To disable this, simply remove the following section from main.json before deploying the resources to Azure:

{
    "type": "Microsoft.Resources/deployments",
    "apiVersion": "2021-04-01",
    "name": "pid-ea77555d-5efd-5b4b-ba1f-1d54583008ea",
    "properties": {
    "mode": "Incremental",
    "template": {
        "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
        "contentVersion": "1.0.0.0",
        "resources": []
    }
    }
}

You can see more information on this at https://docs.microsoft.com/en-us/azure/marketplace/azure-partner-customer-usage-attribution.

Security

Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include Microsoft, Azure, DotNet, AspNet, Xamarin, and our GitHub organizations.

If you believe you have found a security vulnerability in any Microsoft-owned repository that meets Microsoft's Microsoft's definition of a security vulnerability of a security vulnerability, please report it to us as described below.

Reporting Security Issues

Please do not report security vulnerabilities through public GitHub issues or any other public forumn.

Instead, please report them to the Microsoft Security Response Center (MSRC) at https://msrc.microsoft.com/create-report.

If you prefer to submit without logging in, send email to secure@microsoft.com. If possible, encrypt your message with our PGP key; please download it from the the Microsoft Security Response Center PGP Key page.

You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at microsoft.com/msrc.

Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:

  • Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
  • Full paths of source file(s) related to the manifestation of the issue
  • The location of the affected source code (tag/branch/commit or direct URL)
  • Any special configuration required to reproduce the issue
  • Step-by-step instructions to reproduce the issue
  • Proof-of-concept or exploit code (if possible)
  • Impact of the issue, including how an attacker might exploit the issue

This information will help us triage your report more quickly.

If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our Microsoft Bug Bounty Program page for more details about our active programs.

Preferred Languages

We prefer all communications to be in English.

Policy

Microsoft follows the principle of Coordinated Vulnerability Disclosure.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Support

How to file issues and get help

This project uses GitHub Issues to track bugs and feature requests. Please search the existing issues before filing new issues to avoid duplicates. For new issues, file your bug or feature request as a new Issue.

Microsoft Support Policy

Support for this accelerator is limited to the resources listed above.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

Notices

Do Not Translate or Localize

This software incorporates material from third parties. Microsoft makes certain open source code available at https://3rdpartysource.microsoft.com, or you may send a check or money order for US $5.00, including the product name, the open source component name, platform, and version number, to:

Source Code Compliance Team
Microsoft Corporation
One Microsoft Way
Redmond, WA 98052
USA

Notwithstanding any other terms, you may reverse engineer this software to the extent required to debug changes to any libraries licensed under the GNU Lesser General Public License.