fix: address payable parsing#275
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
tmm
left a comment
There was a problem hiding this comment.
Runtime looks good. We need to update ParseSignature type utility as well. Added a test case for this to show what needs to be fixed.
| assertType<ParseSignature<'function foo(address payable to) external'>>({ | ||
| name: 'foo', | ||
| type: 'function', | ||
| stateMutability: 'nonpayable', | ||
| inputs: [{ type: 'address', name: 'to' }], | ||
| outputs: [], | ||
| }) |
There was a problem hiding this comment.
Got it to pass on the type level now.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #275 +/- ##
=======================================
Coverage 99.90% 99.90%
=======================================
Files 26 26
Lines 6163 6165 +2
Branches 194 195 +1
=======================================
+ Hits 6157 6159 +2
Misses 5 5
Partials 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
commit: |
Fixes #274 . This solves it by expanding the regex in
parseAbiParameterto accept address payable as a solidity type and then later mapping it toaddressabi type.