I've seen similar questions but none with a working answer unfortunately. I'm following along with the Brownie FundMe tutorial from freecodecamp youtube and my etherscan verification won't work.
Here is the output from 'brownie run scripts/deploy.py --network rinkeby':
Brownie v1.18.1 - Python development framework for Ethereum
BrownieFundMeProject is the active project.
Running 'scripts\deploy.py::main'...
Transaction sent: 0x925b177f8eca7584fd66d7b52ddb477634625abaa39679f80998769519fd4a4f
Gas price: 1.000000011 gwei Gas limit: 513271 Nonce: 22
FundMe.constructor confirmed Block: 10289582 Gas used: 466610 (90.91%)
FundMe deployed at: 0xf50aA945B5fd2e6336631B71a5929A09a21a741E
Waiting for https://api-rinkeby.etherscan.io/api to process contract...
Verification submitted successfully. Waiting for result...
Verification pending...
Verification pending...
Verification pending...
Verification pending...
Verification pending...
Verification pending...
Verification pending...
Verification pending...
Verification pending...
Verification pending...
Verification pending...
Verification pending...
Verification pending...
Verification pending...
Verification pending...
Verification pending...
Verification complete. Result: Fail - Unable to verify
Contract deployed to 0xf50aA945B5fd2e6336631B71a5929A09a21a741E
And here is my script (the wait statement was suggested in another thread but didn't work):
from brownie import FundMe
from .helpful_scripts import get_account
def deploy_fund_me():
account = get_account()
fund_me = FundMe.deploy({"from": account}, publish_source=True)
# fund_me.wait(1)
print(f"Contract deployed to {fund_me.address}")
def main():
deploy_fund_me()
Finally, the config file:
dependencies:
# - <organization/repo>@<version>
# https://github.com/smartcontractkit/chainlink-brownie-contracts
- smartcontractkit/chainlink-brownie-contracts@0.4.0
compiler:
solc:
remappings:
- '@chainlink=smartcontractkit/chainlink-brownie-contracts@0.4.0'
dotenv: .env
wallets:
from_key: ${PRIVATE_KEY}
What am I doing wrong that's causing this to fail? The contract clearly deploys but the etherscan verification is failing.
Any advice would be greatly appreciated.
Brownie v1.18.1 Python v3.9.7 Solidity >=0.8.0