You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You are right. Feel free to create a PR to fix this. This does affect also error and event signatures. This should also affect the regex for named parameters
This issue has been locked since it has been closed for more than 14 days.
If you found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest ABIType version. If you have any other comments you can create a new discussion.
Describe the bug
Minimum code to reproduce the issue:
Expected result: ABI is parsed successfully.
Actual result:
UnknownSignatureError
is thrown:I believe the issue is with the regex to match the function name (
functionSignatureRegex
in/src/human-readable/runtime/signatures.ts
):From the Solidity docs, the regex to match a valid identifier is:
[a-zA-Z$_][a-zA-Z0-9$_]*
. So it should be a quick fix:I only tested functions, but events, errors, structs, etc. all use the same identifier logic so those regexes should be updated too.
Also wanted to note this ABI works in
ethers
as expected:Lastly for reference, I was able to successfully deploy a smart contract on Sepolia using these identifiers and uploaded it to Etherscan: https://sepolia.etherscan.io/address/0x8ae917bd7ba1bc35ebf7ef1e6ff815565647ab9a#code
Link to Minimal Reproducible Example
No response
Steps To Reproduce
No response
Package Version
0.9.0
TypeScript Version
5.1.6
Anything else?
No response
Validations
The text was updated successfully, but these errors were encountered: