How do I create a ContractAddress from a hex value like 0x06D98dC7ea54CF77eeD141F423f6007Dd61fbd2b6bD429Facdf5d4803353063f
?
let addr : ContractAddress = 0x06D98dC7ea54CF77eeD141F423f6007Dd61fbd2b6bD429Facdf5d4803353063f;
is throwing an exception stating that 0x06D98dC7ea54CF77eeD141F423f6007Dd61fbd2b6bD429Facdf5d4803353063f
is considered a felt252
.
What's the helper function to convert that Hex into a ContractAddress?
This is the library file for that: https://github.com/starkware-libs/cairo/blob/main/corelib/src/starknet/contract_address.cairo
I believe the function
Felt252TryIntoContractAddress
would be useful.