Skip to content

Latest commit

 

History

History
47 lines (29 loc) · 1023 Bytes

cast-etherscan-source.md

File metadata and controls

47 lines (29 loc) · 1023 Bytes

cast etherscan-source

NAME

cast-etherscan-source - Get the source code of a contract from Etherscan.

SYNOPSIS

cast etherscan-source [options] address

DESCRIPTION

Get the source code of a contract from Etherscan.

The destination (to) can be an ENS name or an address.

OPTIONS

Output Options

-d directory
    The output directory to expand the source tree into.     If not provided, the source will be outputted to stdout.

-f
--flatten
    Whether to flatten the source code.

{{#include ../common/etherscan-options.md}}

{{#include common-options.md}}

EXAMPLES

  1. Get the source code of the WETH contract:

    cast etherscan-source 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
  2. Expand the source code of the WETH contract into a directory named weth

    cast etherscan-source -d weth 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2

SEE ALSO

cast