NomicFoundation / hardhat-ignition

Hardhat Ignition is a declarative deployment system that enables you to deploy your smart contracts without navigating the mechanics of the deployment process.
https://hardhat.org
MIT License
97 stars 18 forks source link

Hardhat Ignition cannot deploy vyper contracts #727

Open ac-cb opened 3 months ago

ac-cb commented 3 months ago

Version of Hardhat

2.22.2

What happened?

I cannot deploy vyper contracts to a local network. I expected compilation using hardhat-vyper to generate dbg.json files. They do not.

Minimal reproduction steps

import "@nomiclabs/hardhat-vyper";
import "@nomicfoundation/hardhat-ignition-ethers";

within hardhat.config.ts

create hello.vy in contracts/

# @version ^0.3.0
greet: public(String[100])

@external
def __init__():
    self.greet = "Hello World"

create hello.ts within ignition/modules/

import { buildModule } from "@nomicfoundation/hardhat-ignition/modules";

const HelloModule = buildModule("hello", (m) => {
  const hello = m.contract("hello");
  return { hello };
});

export default HelloModule;

receive error because hello.dbg.json does not exist

Search terms

No response

ac-cb commented 3 months ago

my best guess is that there is no TASK_COMPILE_SOLIDITY_GET_ARTIFACT_FROM_COMPILATION_OUTPUT analog for Vyper. looking at the task-names.ts file in hardhat-vyper

kanej commented 3 months ago

Thanks @ac-cb, Ignition doesn't currently support deploying vyper contracts.

I have change the title of this issue to reflect that more general issue so that people can comment or plus one here.

I think what you identified is correct, that the artifact output for Vyper does not exactly match the Solidity output, so Ignition is failing as it assumes the Solidity output.