Improve Types by Replacing 0x${string} With Proper Viem Types#74
Merged
Conversation
jeffsmale90
approved these changes
Sep 10, 2025
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.
📝 Description
Improve type safety throughout the delegation-toolkit codebase by replacing generic
0x${string}type assertions with proper viem types likeHexandAddress.🔄 What Changed?
List the specific changes made:
0x${string}toHexin test filesSignUserOperationReturnTypeandSignDelegationReturnTypefrom0x${string}toHex0x${string}toHex0x${string}toAddressfor contract addressesHextypes in testsHextype consistentlyHextype imports where needed across multiple files🚀 Why?
Explain the motivation behind these changes:
AddressvsHexmakes intent explicit (contract addresses vs hex data)🧪 How to Test?
Describe how to test these changes:
yarn clean && yarn buildto ensure all packages build successfullyyarn testto verify all 587 tests pass across all packagesyarn lintto confirm no type-related linting errorsList any breaking changes:
All changes are internal type improvements that maintain the same runtime behavior and public API.
📋 Checklist
Check off completed items:
🔗 Related Issues
Link to related issues:
Closes # (related to type safety improvements)
Related to # (if there are any existing type-related issues)
📚 Additional Notes
Hextype definition in7715-permission-typespackage for ERC-7715 standard compliance7715-permission-typespackage could potentially import viem types for even better consistency, but current approach maintains package independence