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

Add leading zeros to addresses #618

Closed

Conversation

RuneRogue
Copy link
Contributor

@RuneRogue RuneRogue commented Aug 27, 2024

@thiagodeev @rianhughes @jelilat @JorikSchellekens I have added a function to add leading zero after the "0x" prefix . Function first check whether precomputedAddress have prefix or not . If It have prefix then it removes the prefix then add leading zero until whole string is made up of 64 character excluding "0x" prefix . Then It add "0x" prefix back and return it . So the padAddress function returns string type , but we have to convert it to "felt.Felt" for further use . At the end the result is reassigned to precomputedAddress variable .

Fixed #607

@RuneRogue RuneRogue closed this Oct 2, 2024
@RuneRogue RuneRogue force-pushed the add-leading-zeros-to-addresses branch from 16fd982 to 1090f19 Compare October 2, 2024 14:16
@RuneRogue RuneRogue deleted the add-leading-zeros-to-addresses branch October 2, 2024 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add leading zeros to addresses
1 participant