You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hermes-sdk has HasAddressType and HasDenomType but they have Display bound to use to_string() whenever possible.
But in Starknet, Felt::to_string returns the u256 number, not the hex encoded string which is mostly popular.
For example,
# u2561311825980905418834733672785961618978053106732430637247341599459637071648036
# hex formatted. in python, this is just `hex(number)`0x2e67799f855cff9fde57903a5c8ae4e31722c170d66203717c7756f366b1524
Ideally, we should use Felt::to_fixed_hex_string (for any kind of erc20 contract address) for the conventional hex format.
The text was updated successfully, but these errors were encountered:
hermes-sdk
hasHasAddressType
andHasDenomType
but they haveDisplay
bound to useto_string()
whenever possible.But in Starknet,
Felt::to_string
returns the u256 number, not the hex encoded string which is mostly popular.For example,
Ideally, we should use
Felt::to_fixed_hex_string
(for any kind of erc20 contract address) for the conventional hex format.The text was updated successfully, but these errors were encountered: