Audit: `recipient_ism` fallback mecanism
Opened this issue · 0 comments
JordyRo1 commented
Actual behavior
- On the solidity implementation, the function
recipient_ism
allows the user to choose between a defined ism (specified ininterchain_security_module
or the mailbox default one, if this function is not defined. In cairo, we implemented thecall_contract_syscall
in order to call theinterchain_security_module
from the recipient in order to follow the actual behavior. However, in the starknet documentation, we have "An internal call can’t returnErr(_)
as this is not handled by the sequencer and the Starknet OS. Ifcall_contract_syscall
fails, this can’t be caught and will therefore result in the entire transaction being reverted." (cf here), which means that if therecipient_ism
is not defined, the entire function will revert.
Expected behavior
- We need to catch an error if the function is not implemented and fallback on the default ism if not provided. Since it is not possible currently on the starknet os, we will have to find an alternative solution for this to work properly