tx_id in handler_erc20 is generated differently, compared to ChakraSettlementHandler.
In Cairo it contains the following params:
ChakraSettlementHandler.sol
In Solidity it contains the following params:
handler_erc20.cairo
As we can see both tx_ids are completely different from each other. But the intentions of the team is to construct hashes in the same way on both chains. Making the management of the transactions across different chains, Starknet and EVM in particular easier. Now they will have to have different signing logic, depending on the chain that the transaction comes.
Furthermore, the approach used in Cairo can potentially lead to duplicate tx_ids, because only 2 values are being used, both of simple types. If such scenario happens, the second user will break the invariant defined in the projects because of the active checks, preventing replays in the receive_cross_chain_callback functions:
Modify the handler_erc20 contract to compute the tx_id in the same way as in ChakraSettlementHandler:
