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

[hardhat-ethers] getContractFactory and getContractAt should have an overload that take an Artifact #1716

Closed
alcuadrado opened this issue Jul 22, 2021 · 6 comments · Fixed by #2116
Assignees
Labels
good-first-issue Good for newcomers. Guidance available if needed

Comments

@alcuadrado
Copy link
Member

This was reported by @nventuro

If you have your own artifacts-loading logic, and have a contract that needs to be linked, our plugin doesn't help you. You'd have to link the libraries manually.

We should have overloads that take an Artifact, and take care of the library linking.

getContractAt doesn't really need this overload, but it would be great to be consistent.

@alcuadrado alcuadrado added good-first-issue Good for newcomers. Guidance available if needed package:hardhat-ethers labels Jul 22, 2021
@fvictorio fvictorio changed the title [hardhat-ethers] getContractFactory and getCotractAt should have an overload that take an Artifact [hardhat-ethers] getContractFactory and getContractAt should have an overload that take an Artifact Jul 22, 2021
@Rishabhraghwendra18
Copy link
Contributor

is this issue still open ?

@alcuadrado
Copy link
Member Author

Yes, do you want to implement it?

@Rishabhraghwendra18
Copy link
Contributor

Ya... I want to give it a try since it's a good first issue . So I think I can do this

@alcuadrado
Copy link
Member Author

This is a good first issue for you, @Rishabhraghwendra18

kanej added a commit that referenced this issue Nov 30, 2021
Allow passing of artifacts (resolved via custom code) into the `getContractFactory` call, this is instead of resolving by contract name.

Relates to #1716.
kanej added a commit that referenced this issue Dec 1, 2021
Let users pass in their own `Artifact` instance to `getContractAt`, this is mainly to maintain parity with `getContractFactory`.

Relates to #1716.
kanej added a commit that referenced this issue Dec 1, 2021
…tifact`s

Allow passing of artifacts (resolved via custom code) into the `getContractFactory` and `getContractAt` calls, this is instead of resolving by contract name.

Relates to #1716.
kanej added a commit that referenced this issue Dec 1, 2021
…tifact`s

Allow passing of artifacts (resolved via custom code) into the `getContractFactory` and `getContractAt` calls, this is instead of resolving by contract name.

Relates to #1716.
kanej added a commit that referenced this issue Dec 7, 2021
…romArtifact`

Allow passing of artifacts (resolved via custom code) into equivalents of `getContractFactory` and `getContractAt` calls, this is to support custom artifact resolution.

Relates to #1716.
kanej added a commit that referenced this issue Dec 7, 2021
…romArtifact`

Allow passing of artifacts (resolved via custom code) into equivalents of `getContractFactory` and `getContractAt` calls, this is to support custom artifact resolution.

Relates to #1716.
@kanej kanej self-assigned this Dec 8, 2021
@kanej
Copy link
Member

kanej commented Jan 6, 2022

This will get closed when the release goes out.

@kanej kanej reopened this Jan 6, 2022
@fvictorio
Copy link
Member

Done in @nomiclabs/hardhat-ethers@2.0.4.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good-first-issue Good for newcomers. Guidance available if needed
Projects
None yet
4 participants