Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Audit: recipient_ism fallback mecanism #92

Open
JordyRo1 opened this issue Aug 8, 2024 · 0 comments
Open

Audit: recipient_ism fallback mecanism #92

JordyRo1 opened this issue Aug 8, 2024 · 0 comments
Assignees

Comments

@JordyRo1
Copy link
Contributor

JordyRo1 commented Aug 8, 2024

Actual behavior

  • On the solidity implementation, the function recipient_ism allows the user to choose between a defined ism (specified in interchain_security_module or the mailbox default one, if this function is not defined. In cairo, we implemented the call_contract_syscall in order to call the interchain_security_module from the recipient in order to follow the actual behavior. However, in the starknet documentation, we have "An internal call can’t return Err(_) as this is not handled by the sequencer and the Starknet OS. If call_contract_syscall fails, this can’t be caught and will therefore result in the entire transaction being reverted." (cf here), which means that if the recipient_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
@JordyRo1 JordyRo1 self-assigned this Aug 8, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant