eth-brownie / brownie

A Python-based development and testing framework for smart contracts targeting the Ethereum Virtual Machine.
https://eth-brownie.readthedocs.io
MIT License
2.65k stars 553 forks source link

Setting explorer URL for mainnet-fork #940

Open yanncks opened 3 years ago

yanncks commented 3 years ago

What's the correct way to set explorer url in the config?

I tried this but it doesn't pick it up:

networks:
  default: mainnet-fork
  mainnet-fork:
    cmd_settings:
      fork: https://api.archivenode.io/...
    explorer: https://api.etherscan.io/api?apiKey=...
iamdefinitelyahuman commented 3 years ago

try setting fork with the name of another network, not with a network uri:

- cmd: ganache-cli
  cmd_settings:
    fork: mainnet
  host: http://127.0.0.1
  id: mainnet-fork
  ...

Then it will use the explorer from the network you're forking from