fix(lint/v2): accept descriptor names for unnamed ABI parameters - #308
Open
manuelwedler wants to merge 1 commit into
Open
fix(lint/v2): accept descriptor names for unnamed ABI parameters#308manuelwedler wants to merge 1 commit into
manuelwedler wants to merge 1 commit into
Conversation
Solidity parameters can be left unnamed, in which case the reference ABI fetched from the explorer carries an empty name and no schema path is computed for them. Descriptors must still name them to reference them by path, so `ValidateDisplayFieldsLinter` reported a spurious "Invalid display field" error for such paths (5 occurrences in the registry, e.g. `#.pool` for `depositETH(address,address,uint16)`). The name is recovered from the descriptor format key, which resolution reduces to a selector, so the v2 linter interface now also receives the input descriptor. A name is only accepted at the position it is declared at: a path stays invalid if the reference ABI names that parameter.
Contributor
|
Hi @manuelwedler! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Solidity parameters can be left unnamed, so the reference ABI fetched from the explorer carries an empty name and no schema path is computed for them. Descriptors must still name them to reference them by path, which made
ValidateDisplayFieldsLinterreport a spuriousInvalid display fielderror.aave/calldata-WrappedTokenGatewayV3.json(#.pool, 4 functions) and1inch/calldata-AggregationRouterV3.json(#.pools).Verified on the registry at
3ddfbc0:Invalid display field5 → 0, all other error and warning counts unchanged.