All Products
Search
Document Center

Blockchain as a Service:Smart Contract Analyzer

Last Updated:Jul 21, 2023

This article describes how to use the smart contract analyzer in the Alibaba Cloud BaaS Developers Service. Smart Contract Analyzer can detect and locate vulnerabilities in a smart contract, as well as violations of best practices, and then summarize these issues in the form of analysis reports. The analysis report also contains a detailed description of the vulnerability and best practices.

Use smart contract analyzer

  1. Visit Alibaba Cloud BaaS Management Console. Click Application Development Services > Smart contract analyzing on the left navigation bar to enter the Smart Contract Analyzer page.

  2. Create a smart contract analysis task. On the Smart Contract Analyzer page, click on Create Task on the right.

  3. Upload smart contract, set Task Name and Contract Type, then click Create.

    Note

    The file format supports the .sol source file, the .go source file, and the .tar.gz or .tar package. The contract type currently supports both Solidity and Fabric-Golang smart contract.

  4. Check the analyzing status. You can click the “Refresh” button to refresh the status of the current contract analyzing task.

    refresh_task
    Note

    Generally, the smart contract analyzing task lasts for about 10 seconds to 2 minutes.

  5. Download the smart contract analysis report. After the task is completed, you can click the Download button to download the analysis report.

    download_report
  6. Interpretation of the analysis report. The content of analysis report is categorized by the type of vulnerabilities found and the occurrence number of each vulnerability is shown as well.

    ca_step6
  7. Interpretation of vulnerability details. Click on the vulnerability to unfold the detailed description.

    ca_step7
    Note

    The Show Code/Hide Code button can show/hide the relevant code segments in the smart contract. The Explanation button can display a detailed description of this vulnerability and provide sample code for your reference. Click on Explanation again to close the popup.