1

I accidentally deleted the default rinkeby network that comes with brownie and wanted to know how to add it back? I tried with the below cmd by creating an infura project but I'm getting the ValueError: Explorer API not set for this network error even when I add publish_source=True in my brownie config file. Without the public_source, I'm not able to verify my contract. It does get successfully deployed on Rinkeby Testnet.

brownie networks add Ethereum rinkeby host='https://rinkeby.infura.io/v3/34aa4a5993b44e00904f0ba64a27a156' chainid=4

I tried with default Kovan Testnet and it worked after waiting for hours to get verified.

1 Answer 1

1

For verifying a contract you need to mention the Explorer API in your network so you can add the network as:

brownie networks add Ethereum rinkeby host='https://rinkeby.infura.io/v3/34aa4a5993b44e00904f0ba64a27a156' chainid=4
explorer='https://api-rinkeby.etherscan.io/api'
1
  • Thank you for replying! but its still giving Explorer API not set for this network error. I restarted a new infura project and it still gives the same error. Jan 23, 2022 at 21:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.