Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency deployments cannot be verified in etherscan #65

Open
jmonteer opened this issue Jan 5, 2023 · 0 comments
Open

Dependency deployments cannot be verified in etherscan #65

jmonteer opened this issue Jan 5, 2023 · 0 comments

Comments

@jmonteer
Copy link

jmonteer commented Jan 5, 2023

Environment information

  • ape and plugin versions:
❯ ape --version
0.5.4
❯ ape plugins list
Installed Plugins:
  infura       0.5.2
  vyper        0.5.1
  hardhat      0.5.2
  alchemy      0.5.2
  etherscan    0.5.4
  foundry      0.5.1
  solidity     0.5.2

❯ python --version
Python 3.9.9

  • OS: macOS

What went wrong?

deploying a contract using the following:

    strategy_comp_v3 = project.dependencies["strategy-comp-v3"]["master"].Strategy
    strategy_comp_v3 = deployer.deploy(strategy_comp_v3, vault.address, "CompV3LenderUSDC", CASSETV3_ADDRESS, max_priority_fee="1 gwei", max_fee="100 gwei", publish=True)

deploys correctly but it is unable to verify with the following error:

SUCCESS: Contract 'Strategy' deployed to: 0xd0185b3aa44E12015FEbA333660FAb2b8f30dFa0
INFO: Publishing and verifying contract using 'etherscan'.
---------------------------------------------------------------------------
ContractVerificationError                 Traceback (most recent call last)
Cell In[68], line 1
----> 1 strategy_comp_v3 = deployer.deploy(strategy_comp_v3, vault.address, "CompV3LenderUSDC", CASSETV3_ADDRESS, max_priority_fee="1 gwei", max_fee="100 gwei", publish=publish_flag)

File ~/crypto/yearn/yearnv3-lender-deploy/lib/python3.9/site-packages/ape/api/accounts.py:211, in AccountAPI.deploy(self, contract, publish, *args, **kwargs)
    209 if publish:
    210     self.project_manager.track_deployment(instance)
--> 211     self.provider.network.publish_contract(address)
    213 return instance

File ~/crypto/yearn/yearnv3-lender-deploy/lib/python3.9/site-packages/ape/api/networks.py:883, in NetworkAPI.publish_contract(self, address)
    880     raise NetworkError("Unable to publish contract - no explorer plugin installed.")
    882 logger.info(f"Publishing and verifying contract using '{self.explorer.name}'.")
--> 883 self.explorer.publish_contract(address)

File ~/crypto/yearn/yearnv3-lender-deploy/lib/python3.9/site-packages/ape_etherscan/explorer.py:75, in Etherscan.publish_contract(self, address)
     73 def publish_contract(self, address: AddressType):
     74     verifier = SourceVerifier(address, self._client_factory)
---> 75     return verifier.attempt_verification()

File ~/crypto/yearn/yearnv3-lender-deploy/lib/python3.9/site-packages/ape_etherscan/verify.py:232, in SourceVerifier.attempt_verification(self)
    227 compilers_used = [
    228     c for c in manifest.compilers if self._contract_type.name in c.contractTypes
    229 ]
    231 if not compilers_used:
--> 232     raise ContractVerificationError("Compiler data missing from project manifest.")
    234 versions = [Version(c.version) for c in compilers_used]
    235 if not versions:
    236     # Might be impossible to get here.

ContractVerificationError: Compiler data missing from project manifest.

How can it be fixed?

I assume this has to do with how project manifest is dealing with dependencies. If it is a dependency, I guess it should look into .ape/packages/dependency for project manifest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant