Skip to content
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

chore: helper functions for common JsonAbi features #2000

Merged
merged 37 commits into from Apr 9, 2024

Conversation

petertonysmith94
Copy link
Contributor

@petertonysmith94 petertonysmith94 commented Apr 2, 2024

Closes #1556


  • Added helper functions for finding common JsonAbi features.
    • findFunctionByName
    • findNonEmptyInputs
    • findTypeById
  • Removed findOrThrow utility function.

@danielbate
Copy link
Contributor

PR #2000 🎉 🎉

@petertonysmith94
Copy link
Contributor Author

PR #2000 🎉 🎉

Thanks for your review 😆

danielbate
danielbate previously approved these changes Apr 5, 2024
@petertonysmith94 petertonysmith94 enabled auto-merge (squash) April 5, 2024 09:41
Torres-ssf
Torres-ssf previously approved these changes Apr 8, 2024
Copy link
Member

@maschad maschad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just some final comments

packages/abi-coder/src/utils/json-abi.ts Outdated Show resolved Hide resolved
packages/abi-coder/src/utils/json-abi.test.ts Outdated Show resolved Hide resolved
Copy link
Contributor

github-actions bot commented Apr 9, 2024

Coverage Report:

Lines Branches Functions Statements
79.47%(+0.09%) 69.78%(+0.1%) 77.59%(+0.15%) 79.62%(+0.11%)
Changed Files:
Ok File (✨=New File) Lines Branches Functions Statements
🔴 packages/abi-coder/src/FunctionFragment.ts 73.13%
(-0.1%)
71.42%
(+0%)
84.61%
(+2.8%)
73.91%
(-0.44%)
🔴 packages/abi-coder/src/Interface.ts 70.83%
(-8.33%)
62.5%
(-4.16%)
76.92%
(-4.33%)
70.37%
(-6.55%)
packages/abi-coder/src/ResolvedAbiType.ts 100%
(+1.43%)
100%
(+0%)
100%
(+5.27%)
100%
(+1.34%)
🔴 packages/abi-coder/src/encoding/strategies/getCoderV0.ts 89.79%
(+1.56%)
83.87%
(+2.06%)
100%
(+0%)
89.79%
(+1.33%)
🔴 packages/abi-coder/src/encoding/strategies/getCoderV1.ts 2.08%
(+0.08%)
0%
(+0%)
0%
(+0%)
2.08%
(+0.12%)
✨ packages/abi-coder/src/utils/json-abi.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
🔴 packages/abi-coder/src/utils/utilities.ts 98.21%
(+1.49%)
90%
(-1.3%)
100%
(+6.67%)
98.3%
(+1.43%)

Copy link
Member

@maschad maschad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

@petertonysmith94 petertonysmith94 merged commit 3dfeafb into master Apr 9, 2024
14 of 15 checks passed
@petertonysmith94 petertonysmith94 deleted the ps/feat/custom-errors-for-find-or-throw branch April 9, 2024 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unhelpful and unorganized error messages
5 participants