explorer¶
Work with block explorers to get data.
usage: mox explorer [-h] [-d] [-q] {fetch,get,list} ...
Positional Arguments¶
- explorer_command
Possible choices: fetch, get, list
Named Arguments¶
- -d, --debug
Run in debug mode
Default:
False
- -q, --quiet
Suppress all output except errors
Default:
False
Sub-commands¶
fetch (get)¶
Retreive the ABI of a contract from a block explorer.
This command will attempt to use the environment variable ETHERSCAN_API_KEY as the API key for Etherscan. If this environment variable is not set, you can provide the API key as an argument to the command.
mox explorer fetch [-h] [-d] [-q] [--name NAME] [--api-key API_KEY]
[--ignore-config] [--save-abi-path SAVE_ABI_PATH] [--save]
[--explorer-uri EXPLORER_URI |
--explorer-type EXPLORER_TYPE | --network NETWORK]
address
Positional Arguments¶
- address
The address you want to pull from.
Named Arguments¶
- -d, --debug
Run in debug mode
Default:
False
- -q, --quiet
Suppress all output except errors
Default:
False
- --name
Optional name for the contract.
- --api-key, --explorer-api-key
API key for the block explorer.
- --ignore-config, -i
Don’t pull values from the config.
Default:
False
- --save-abi-path
Location to save the returned abi. This will only be applied if you also add the ‘–save’ flag.
- --save
If added, the ABI will be saved to the ‘save-abi-path’ given in the command line or config.
Default:
False
- --explorer-uri
API URI endpoint for explorer.
- --explorer-type
blockscout, etherscan, or zksyncexplorer.
- --network
Name/alias of the network (from the moccasin.toml). If chain_id is set in the config, you may also use that.
list¶
List all natively supported block explorers and chains.
mox explorer list [-h] [--by-id] [--json]
Named Arguments¶
- --by-id
List by chain id.
Default:
False
- --json
Format as json.
Default:
False