rkalis / truffle-plugin-verify

✅ Verify your smart contracts on Etherscan from the Truffle CLI
https://kalis.me/verify-truffle-smart-contracts-etherscan/
MIT License
467 stars 130 forks source link

No instance of contract [Contract name] found for network id 137 when verify on Polygon chain #170

Closed akantora closed 1 year ago

akantora commented 2 years ago

Always got the massage 'No instance of contract [Contract name] found for network id 137' when verify on Polygon chain

Environment information

Debug output run verify BoosterversePolygon --network polygon --debug DEBUG logging is turned ON Running truffle-plugin-verify v0.5.26 Retrieving network's network ID & chain ID Verifying BoosterversePolygon Reading artifact file at D:\My_proj\BoosterVerse_Storefront-prod2\build\contracts\BoosterversePolygon.json No instance of contract BoosterversePolygon found for network id 137 Failed to verify 1 contract(s): BoosterversePolygon

mavvverick commented 2 years ago

Hey @akantora

Please use the following command to overcome this issue.

truffle run verify {ContractName}@{ContractAddresss} --network polygon --debug

For Example:

truffle run verify SampleContract@0xa024Da234079331........E4 --network polygon --debug

rkalis commented 1 year ago

As @mavvverick mentioned, providing the address manually is a good workaround. But auto-detection should generally work as well. Do you have a minimal repo where I can reproduce the issue?

waqasideofuzion commented 1 year ago

got the same issue and solved my problem with this command truffle run verify MyContract@address --network avalanche --debug

rkalis commented 1 year ago

No reproduction repo was provided, so no way to debug this issue. Manually providing the address is a decent enough workaround. Closing this for inactivity.