-
Notifications
You must be signed in to change notification settings - Fork 739
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: num.toHex64 ensure 0x(64 char) format #1222
base: develop
Are you sure you want to change the base?
Conversation
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.
A couple comment typos, otherwise lgtm
Co-authored-by: Petar Penović <pp@spaceshard.io>
Co-authored-by: Petar Penović <pp@spaceshard.io>
* Similar as toStorageKey but conforming to exactly 0x(64 hex chars). | ||
* | ||
* @returns format: hex-0x(64)-string | ||
*/ |
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.
we are missing an @example here 🫶
@@ -75,9 +76,23 @@ export const toHexString = toHex; | |||
* @returns format: storage-key-string | |||
*/ | |||
export function toStorageKey(number: BigNumberish): string { | |||
// TODO: This is not completely correct as it will not enforce first 0 and second [0-7], 0x82bda... will pass as valid and should be false |
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.
also while we're at it, we could add a missing an @example here 🫶
Motivation and Resolution
preparation for type gurading
Feat:
Usage related changes
Development related changes
Checklist: