-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Getting function signatures from a Contract's interface without giving parameters. #44
Comments
…contractFn() takes params. In this case, omit result.data. ethers-io#44
I took a crack at how I would handle this: e31bdc4 This way we only throw when |
This is a good idea, since it is known without requiring parameters. I will add it to the properties attached to the function. So, you will be able to use: |
Added in fb65772. It has been published to npm and will get pushed to the CDN tomorrow. Thanks! Great idea. |
Get first the fragment of abi function
Then, get bytes4 signature of function
|
Hello!
So I'm interested in grabbing a function's signature (or the 4 byte hash of it).
This works fine:
but if
someFunction()
has parameters,interface.js
requires me to provide them despite them not being needed for the signature.One way to work around this is to pass dummy, yet valid, values to the function:
but this sort of hardcoding pretty much defeats the point of grabbing the signature.
I just want to see if there is a way of doing this, and if not, if this would be something you would consider adding to ethers.
The text was updated successfully, but these errors were encountered: