The contractAddress type cannot use the 32-byte addressing mechanism
Description
The Hyperlane protocol defines the sender and receiver address as a value of the bytes32 type. This is to handle the messages from/to the chain that uses the 32-byte addressing mechanism.
However, we found that the addresses are defined as the type starknet::contractAddress, which is equivalent to the type felt252. Therefore, the implementation would not be able to handle an address that does not fit in felt252. For example, this affects the messages from/to the Neutron chain, which is the Cosmos-based chain with the digital key scheme secp256r1. (Do not confuse this with the cryptographic algorithm, which this digital key scheme is based on.)
Impact
This limitation prevents the system from supporting recipients using 32-byte addresses, potentially excluding some portion of users and limiting cross-chain compatibility and interoperability.
Recommendations
Change the type of sender and receiver starknet::contractAddress to u256.
Remediation
This issue has been acknowledged by Pragma, and fixes were implemented in the following commits: