-
Notifications
You must be signed in to change notification settings - Fork 2.3k
external compile step erring for vyper contract #1623
Comments
@wysenynja You know, at this point I believe that Truffle will compile vyper files for you without having to use the external setup if you have them in your contracts directory. |
AFAICT, that would work if I were building the entire project with Vyper. My project is written in solidity. I need Vyper for setting up my test environment with outside contracts.
… On Jan 14, 2019, at 7:34 AM, tyler feickert ***@***.***> wrote:
@wysenynja You know, at this point I believe that Truffle will compile vyper files for you without having to use the external setup if you have them in your contracts directory.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I was told to use the external compile step in #1607. Was that incorrect? |
It is possible to use the external property to do this...BUT Truffle will compile Vyper contracts as well as Solidity contracts "side-by-side". In the issue you linked to, @gnidan is referring to the current limitation of only being able to use one single version of the Solidity compiler. However, you can have a project that includes both Solidity and Vyper files and Truffle will deal with them. |
@wysenynja Did you successfully get your vyper contracts compiling? |
I’ve been working on my own solidity contract interacting with 0x and haven’t done any more work with Uniswap yet. I think dropping the Vyper contracts into the main contracts directory will work for me though. Hopefully I won’t need multiple versions of the Vyper compiler if I add another project. |
Ok, let me know if you have any more questions on the way. Closing this for now. |
I copied uniswap's contracts into my contracts directory, but it fails with this error:
I'm guessing this is because uniswap expects vyper==0.1.0b4, but truffle is using a newer version. I don't want to modify the contracts at all since I am trying to interact with them the same way they are deployed on mainnet. How can I tell truffle to use an old version of vyper? Or is the error something else? |
If I create a truffle artifact myself with the bytecode that is included in the git checkout and an empty list for abi, I am able to EDIT: Got around not having the abi by making an interface in solidity and using that. |
@wysenynja Concerning the Vyper compiler...I'll have to look into adding functionality in the config for specifying the version. |
@eggplantzzz any progress on this? Or should I create a separate issue? I'm having the same issue @wysenynja mentioned trying to add Uniswap's contracts: #1623 (comment) I am writing vyper contracts in my Truffle project. Running Ideally, I could use the latest version for my own contracts ( Thanks! |
This is a problem for me as well. Is there a way to tell truffle which compiler to use? |
Is this issue resolved? |
Issue
Similar to #1607
I am trying to use the external compile step to build artifacts for a contract external to my truffle project that is written in vyper (https://github.com/Uniswap/contracts-vyper). The contract bytecode and abi were compiled and checked into the external repo for me, so I don't think I need to run vyper myself.
Steps to Reproduce
truffle-config.js that looks something like this:
Expected Behavior
Running
truffle compile
should create a json file with the abi and bytecode included.Actual Results
I'm guessing truffle is expecting output from solc and not vyper. Any suggestions for how to deploy this contract to my test blockchain during
truffle migrate
?Environment
truffle version
): v5.0.1node --version
): v10.14.2npm --version
): 6.4.1The text was updated successfully, but these errors were encountered: