-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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 address
to string
conversion
#3403
Add address
to string
conversion
#3403
Conversation
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
address
to hex conversionaddress
to string
conversion
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.
Thank you @pcaversaccio! I agree I can imagine this will be very handy for on-chain NFT metadata.
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Maybe we say that the produced address is not checksummed. |
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
@Amxx good point - I added the comment! Somehow the CI actions don't work on this PR? |
@pcaversaccio It may have been a GitHub problem. |
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
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.
Thanks @pcaversaccio! I made some small changes to the tests.
This PR adds a new function to the
Strings
library that converts anaddress
to its ASCIIstring
hexadecimal representation. The main motivation is the reason that I've encountered already multiple projects that use a sophisticatedtokenURI
strategy, that concatenates multiple attributes - one of which is anaddress
- into a string. An example:PR Checklist