Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Contract's constructor requires InterfaceAbi #4142

Closed
shinjiikari256 opened this issue Jun 13, 2023 · 3 comments
Closed

Contract's constructor requires InterfaceAbi #4142

shinjiikari256 opened this issue Jun 13, 2023 · 3 comments
Assignees
Labels
enhancement New feature or improvement. fixed/complete This Bug is fixed or Enhancement is complete and published. minor-bump Planned for the next minor version bump. v6 Issues regarding v6

Comments

@shinjiikari256
Copy link

shinjiikari256 commented Jun 13, 2023

Ethers Version

6.5.1

Search Terms

Contract', ContractFactory, InterfaceAbi

Describe the Problem

I write tests using hardhat. I need to attach different addresses to the same contract.
I think the problem is not using hardhat, as it just looks strange:
new Contract requires InterfaceAbi, but why can't I pass Interface?

image


i can fix ts error by passing ReadonlyArray<Fragment>:
const iface = factory.interface.fragments;
But it looks... ugly?

Code Snippet

No response

Contract ABI

No response

Errors

No response

Environment

Hardhat

Environment (Other)

No response

@shinjiikari256 shinjiikari256 added investigate Under investigation and may be a bug. v6 Issues regarding v6 labels Jun 13, 2023
@ricmoo
Copy link
Member

ricmoo commented Jun 13, 2023

Good catch. I’m releasing a minor bump today and will include this change. :)

@ricmoo ricmoo added enhancement New feature or improvement. on-deck This Enhancement or Bug is currently being worked on. minor-bump Planned for the next minor version bump. and removed investigate Under investigation and may be a bug. labels Jun 13, 2023
@ricmoo
Copy link
Member

ricmoo commented Jun 14, 2023

This should be fixed in v6.6.0. Can you try it out?

@ricmoo ricmoo added fixed/complete This Bug is fixed or Enhancement is complete and published. and removed on-deck This Enhancement or Bug is currently being worked on. labels Jun 14, 2023
@ricmoo
Copy link
Member

ricmoo commented Jun 20, 2023

Closing as complete. Please re-open if there are still any issues.

Thanks! :)

@ricmoo ricmoo closed this as completed Jun 20, 2023
Woodpile37 pushed a commit to Woodpile37/ethers.js that referenced this issue Jan 14, 2024
Woodpile37 pushed a commit to Woodpile37/ethers.js that referenced this issue Jan 14, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or improvement. fixed/complete This Bug is fixed or Enhancement is complete and published. minor-bump Planned for the next minor version bump. v6 Issues regarding v6
Projects
None yet
Development

No branches or pull requests

2 participants