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

Fix Buidler deployProxy for overloaded initializers #149

Merged
merged 4 commits into from
Aug 31, 2020

Conversation

frangio
Copy link
Contributor

@frangio frangio commented Aug 31, 2020

Fixes #146.

We were only allowing initializer names, which doesn't work with overloading. This PR changes the implementation to use the native Interface.getFunction function provided by Ethers, which supports all of: names, signatures, and selectors.

cc @abcoathup: This should be reflected in the API docs which I didn't edit in this PR because we moved them to another file in the docs branch (#142). See Specifying Fragments in the Ethers documentation for the different ways initializers can be specified.

}

// We recommend this pattern to be able to use async/await everywhere
// and properly handle errors.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find this comment borrowed from Buidler examples a bit confusing, it seems written by us but it's not, nor it is clarifying. I suggest we remove it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed it from the test I introduced in this PR. We should remove it from everywhere else afterwards.

packages/plugin-buidler/src/deploy-proxy.ts Outdated Show resolved Hide resolved
@frangio frangio requested a review from martriay August 31, 2020 23:00
@martriay
Copy link
Contributor

Looks good thanks!

@martriay martriay merged commit 712aaaf into master Aug 31, 2020
@martriay martriay deleted the buidler-overloaded-initializer branch August 31, 2020 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

does not handle initialize function overloading
2 participants