ApeWorX / ape-vyper

Vyper compiler plugin for the Ape Framework, using VVM
https://www.apeworx.io/
Apache License 2.0
26 stars 9 forks source link

feat: implement `get_imports()` API method #61

Closed antazoey closed 1 year ago

antazoey commented 1 year ago

What I did

fixes: #43 Fixes: APE-406 This is needed for Etherscan verification and I think also helps Ape core compile Vyper projects (IICR why we did it in ape-solidity).

This is step 1 to getting Verification working for Vyper contracts.

How I did it

How to verify it

Checklist

antazoey commented 1 year ago
NotPeopling2day commented 1 year ago

@fubuloubu can give some more detail, but there's at least a third way for Vyper imports, using .json files. We'll want to account for in the tests as well.

  1. import ...
  2. from ... import
  3. json file

https://vyper.readthedocs.io/en/v0.2.11/compiling-a-contract.html#vyper-json

fubuloubu commented 1 year ago

@fubuloubu can give some more detail, but there's at least a third way for Vyper imports, using .json files. We'll want to account for in the tests as well.

  1. import ...
  2. from ... import
  3. json file

https://vyper.readthedocs.io/en/v0.2.11/compiling-a-contract.html#vyper-json

Yes, you can pull in ABI JSON and ethPM Manifest files this way

antazoey commented 1 year ago

@fubuloubu can give some more detail, but there's at least a third way for Vyper imports, using .json files. We'll want to account for in the tests as well.

  1. import ...
  2. from ... import
  3. json file

https://vyper.readthedocs.io/en/v0.2.11/compiling-a-contract.html#vyper-json

That sounds good.. but maybe a little complex enough to warrant its own PR?

fubuloubu commented 1 year ago

@fubuloubu can give some more detail, but there's at least a third way for Vyper imports, using .json files. We'll want to account for in the tests as well.

  1. import ...
  2. from ... import
  3. json file

https://vyper.readthedocs.io/en/v0.2.11/compiling-a-contract.html#vyper-json

That sounds good.. but maybe a little complex enough to warrant its own PR?

Agreed