Zokyo Automated Tools
  • πŸ€–Unlocking Smart Contract Security: A Comprehensive Guide to Automated Vulnerability Analysis
  • 🐍Mastering Slither: A Comprehensive Guide to Smart Contract Vulnerability Detection
    • πŸš€Prerequisites
      • πŸ’»Code Editor
      • 🐍Setting up Python and Configuring Virtual Environments
      • πŸ”­Setting Up Git
      • πŸ‘ŠGit Bash
    • ⚑What Is Static Analysis
    • 🐍What Is Slither
    • πŸ“©Setting Up Slither: Installation and Virtual Environment Configuration
    • πŸ”©Installing solc and Crytic Compile: Foundation Tools for Slither
    • πŸ”Analyzing Smart Contracts Locally with Slither
      • πŸ—ΊοΈHandling Import Errors in Slither: A Guide on Solc Remappings
      • πŸ›£οΈHandling Path Errors In Slither
    • 🌍Analyzing Smart Contracts Already Deployed On Main-nets
    • πŸ”ŒExploring Slither's Tools and Printers: A Comprehensive Tutorial
    • πŸ€–Using Bash Scripts for Batch Analysis with Slither
    • πŸ’»Slither Intermediate Representation
    • 🌐Slither Python API
    • ⚠️Custom Detectors in Slither
      • 🀝Leveraging Custom Detectors from the Community
        • πŸ€—Leveraging Custom Detectors from the Community: Spotlight on the pessimistic.io Team
      • 🌱Making your own detectors
  • βš›οΈOyente: Symbolic Execution Tool
    • 😎What Is Symbolic Execution?
Powered by GitBook
On this page
  • Introduction
  • Getting Started
  • Analyzing Contracts on Ethereum Mainnet
  • Analyzing Contracts on Arbitrum Network
  • Introduction
  • Getting Started
  • Analyzing Contracts on Ethereum Mainnet
  • Analyzing Contracts on Arbitrum Network
  • Customizing Your Analysis
  • Conclusion
  1. Mastering Slither: A Comprehensive Guide to Smart Contract Vulnerability Detection

Analyzing Smart Contracts Already Deployed On Main-nets

PreviousHandling Path Errors In SlitherNextExploring Slither's Tools and Printers: A Comprehensive Tutorial

Last updated 1 year ago

Introduction

In the realm of smart contract security and blockchain analytics, the ability to analyze contracts deployed on various networks is invaluable. Slither, a powerful static analysis tool, is adept at scrutinizing smart contracts across different networks such as Ethereum Mainnet, Arbitrum, and others. This capability enables a broader and more nuanced analysis, accommodating the diverse landscapes where smart contracts operate. This tutorial aims to guide you through the process of analyzing smart contracts on various networks using Slither, elucidating the essential commands and practices to execute this task effectively.

Getting Started

Before proceeding, ensure that Slither is properly installed and configured in your development environment, and you have essential network details like contract addresses.

Analyzing Contracts on Ethereum Mainnet

Command Syntax

To analyze a contract on Ethereum Mainnet, use the following syntax:

slither <contract-address>

Example:

slither 0x8FE00a685Bcb3B2cc296ff6FfEaB10acA4CE1538

This command tells Slither to perform a static analysis on the contract deployed at the specified address on Ethereum Mainnet.

Analyzing Contracts on Arbitrum Network

Command Syntax

For contracts deployed on networks like Arbitrum, you can specify the network in the command like this:

slither arbi:<contract-address>

Example:

slither arbi:0xc20DE37170B45774e6CD3d2304017fc962f27252

This syntax directs Slither to target the Arbitrum network for the analysis, using the specified contract address.

Here are some common Ethereum networks and their identifiers:

  • Ethereum Mainnet

    • Example: slither <contract-address>

  • Ropsten Testnet (rop)

    • Example: slither rop:<contract-address>

  • Rinkeby Testnet (rinkeby)

    • Example: slither rinkeby:<contract-address>

  • Goerli Testnet (goerli)

    • Example: slither goerli:<contract-address>

  • Kovan Testnet (kovan)

    • Example: slither kovan:<contract-address>

  • Arbitrum (arbi)

    • Example: slither arbi:<contract-address>

  • Binance Smart Chain (bsc)

    • Example: slither bsc:<contract-address>

  • Polygon (Matic) Mainnet (polygon)

    • Example: slither polygon:<contract-address>

  • xDai Chain (xdai)

    • Example: slither xdai:<contract-address>

  • Fantom Opera (fantom)

    • Example: slither fantom:<contract-address>

  • Avalanche C-Chain (avalanche)

    • Example: slither avalanche:<contract-address>

  • Huobi ECO Chain (Heco) (heco)

    • Example: slither heco:<contract-address>

  • Optimistic Ethereum (oeth)

    • Example: slither oeth:<contract-address>

  • Moonbeam (moonbeam)

    • Example: slither moonbeam:<contract-address>

Remember always to replace <contract-address> with the actual address of the contract you want to analyze. Note that the availability of networks might depend on the Slither version and the specific configuration you are using. Make sure to consult the official documentation for any updates or additions to the network list and their respective identifiers.

Analyzing Contracts on Different Networks with Slither: A Detailed Guide

Introduction

In the realm of smart contract security and blockchain analytics, the ability to analyze contracts deployed on various networks is invaluable. Slither, a powerful static analysis tool, is adept at scrutinizing smart contracts across different networks such as Ethereum Mainnet, Arbitrum, and others. This capability enables a broader and more nuanced analysis, accommodating the diverse landscapes where smart contracts operate. This tutorial aims to guide you through the process of analyzing smart contracts on various networks using Slither, elucidating the essential commands and practices to execute this task effectively.

Getting Started

Before proceeding, ensure that Slither is properly installed and configured in your development environment, and you have essential network details like contract addresses.

Analyzing Contracts on Ethereum Mainnet

Command Syntax

To analyze a contract on Ethereum Mainnet, use the following syntax:

slither <contract-address>

Example:

slither 0x8FE00a685Bcb3B2cc296ff6FfEaB10acA4CE1538

This command tells Slither to perform a static analysis on the contract deployed at the specified address on Ethereum Mainnet.

Analyzing Contracts on Arbitrum Network

Command Syntax

For contracts deployed on networks like Arbitrum, you can specify the network in the command like this:

slither arbi:<contract-address>

Example:

slither arbi:0xc20DE37170B45774e6CD3d2304017fc962f27252

This syntax directs Slither to target the Arbitrum network for the analysis, using the specified contract address.

Customizing Your Analysis

Slither comes with various options that allow you to customize the analysis based on your needs, such as specifying particular detectors or printing specific information. Explore Slither’s documentation to dive deeper into these customization options.

Conclusion

Utilizing Slither for the analysis of contracts on diverse networks enhances the breadth and depth of your smart contract security practices. Armed with the commands and methodologies outlined in this tutorial, you’re equipped to navigate the analysis process across various networks seamlessly. This flexibility, coupled with Slither’s robust static analysis capabilities, enables a comprehensive evaluation of smart contracts, fostering enhanced security and analytical insights. Remember always to tailor your analysis based on the network and the specific characteristics of the contract under scrutiny.

🐍
🌍
Book an audit with Zokyo