vyperlang / vvm

Vyper version manager
MIT License
25 stars 9 forks source link

Support calling with interfaces dict #9

Closed fubuloubu closed 2 years ago

fubuloubu commented 2 years ago

Overview

Vyper's JSON mode has had support for specifying interface codes every since v0.2.1 release. VVM should allow specifying external interfaces so that external dependencies can be compiled.

Specification

As far as I can tell, vvm.main:_compile supports **kwargs to pass through to the vyper-json binary: https://github.com/vyperlang/vvm/blob/1c562ed481c62f706a3b70e2e55675874d23f623/vvm/main.py#L118-L123

What is needed is to add an interfaces: Dict argument to the following two functions so that they can be called with the relevant interfaces added: https://github.com/vyperlang/vvm/blob/1c562ed481c62f706a3b70e2e55675874d23f623/vvm/main.py#L26-L32 https://github.com/vyperlang/vvm/blob/1c562ed481c62f706a3b70e2e55675874d23f623/vvm/main.py#L75-L81

fubuloubu commented 2 years ago

Turns out I completely missed compile_standard which supports interfaces via input_dict