-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
feat(human-readable): parameter validation and strict mode #138
Closed
Closed
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
835538e
feat: parameter validation and strict mode
Raiden1411 5716a47
Merge branch 'main' into feat/param-validation
Raiden1411 acfab54
chore: change generic to inferred parameter
Raiden1411 3e688f0
fix: bug fixes && small refactor
Raiden1411 46cf96f
chore: format
Raiden1411 7ece49f
chore: make type required
Raiden1411 b02a4dd
refactor: parameter validation
Raiden1411 b15db53
chore: tests
Raiden1411 53175b3
chore: add TSDocs
Raiden1411 a9301de
chore: update docs
Raiden1411 bf17518
chore: format
Raiden1411 5502867
chore: changeset
Raiden1411 350f957
chore: add IsNever
Raiden1411 d9d5ea6
chore: tests
Raiden1411 0fa74f4
chore: format
Raiden1411 e415135
chore: more tests and tsdocs
Raiden1411 9c93439
Merge branch 'main' into feat/param-validation
Raiden1411 b0e4f7d
Merge branch 'main' into feat/param-validation
Raiden1411 101b165
Merge branch 'main' into feat/param-validation
Raiden1411 07f0d97
Merge branch 'main' into feat/param-validation
Raiden1411 29b86b4
merge main
Raiden1411 aedd808
chore: merge main
Raiden1411 c397940
feat: inferred abi types
Raiden1411 e90ae65
Merge branch 'main' into feat/param-validation
Raiden1411 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"abitype": minor | ||
--- | ||
|
||
Adds parameter validation to `parseAbiParameter` and `parseAbiParameters`. | ||
Changes `StrictAbiType` to `Strict`. |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,15 +115,15 @@ test('InvalidFunctionModifierError', () => { | |
test('InvalidAbiTypeParameterError', () => { | ||
expect( | ||
new InvalidAbiTypeParameterError({ | ||
abiParameter: { type: 'addres' }, | ||
abiParameter: { type: 'address' }, | ||
}), | ||
).toMatchInlineSnapshot(` | ||
[InvalidAbiTypeParameterError: Invalid ABI parameter. | ||
|
||
ABI parameter type is invalid. | ||
|
||
Details: { | ||
"type": "addres" | ||
"type": "address" | ||
} | ||
Version: [email protected]] | ||
`) | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this change it will affect type checking not only on types but also valid modifiers and parameter names. Kept as default so folks can hop in instead of out.