diff --git a/src/contracts/client/mailboxclient.cairo b/src/contracts/client/mailboxclient.cairo index 9da4b76..d6a7e58 100644 --- a/src/contracts/client/mailboxclient.cairo +++ b/src/contracts/client/mailboxclient.cairo @@ -123,13 +123,13 @@ mod mailboxclient { _message_body: Bytes, _hook_metadata: Option, _hook: Option - ) { + ) -> u256 { let mailbox_address = self.mailbox.read(); let mailbox = IMailboxDispatcher { contract_address: mailbox_address }; mailbox .quote_dispatch( _destination_domain, _recipient, _message_body, _hook_metadata, _hook - ); + ) } } } diff --git a/src/contracts/mailbox.cairo b/src/contracts/mailbox.cairo index bdf0f29..d703c2e 100644 --- a/src/contracts/mailbox.cairo +++ b/src/contracts/mailbox.cairo @@ -3,13 +3,13 @@ pub mod mailbox { use alexandria_bytes::{Bytes, BytesTrait, BytesStore}; use core::starknet::SyscallResultTrait; use core::starknet::event::EventEmitter; - use hyperlane_starknet::contracts::libs::message::{Message, MessageTrait}; + use hyperlane_starknet::contracts::libs::message::{Message, MessageTrait, HYPERLANE_VERSION}; use hyperlane_starknet::interfaces::{ IMailbox, IMailboxDispatcher, IMailboxDispatcherTrait, IInterchainSecurityModuleDispatcher, IInterchainSecurityModuleDispatcherTrait, IPostDispatchHookDispatcher, ISpecifiesInterchainSecurityModuleDispatcher, ISpecifiesInterchainSecurityModuleDispatcherTrait, IPostDispatchHookDispatcherTrait, - HYPERLANE_VERSION, IMessageRecipientDispatcher, IMessageRecipientDispatcherTrait, + IMessageRecipientDispatcher, IMessageRecipientDispatcherTrait, }; use openzeppelin::access::ownable::OwnableComponent; use openzeppelin::upgrades::{interface::IUpgradeable, upgradeable::UpgradeableComponent}; diff --git a/src/interfaces.cairo b/src/interfaces.cairo index 4f0c6ba..c1298d2 100644 --- a/src/interfaces.cairo +++ b/src/interfaces.cairo @@ -33,8 +33,6 @@ pub enum ModuleType { } -pub const HYPERLANE_VERSION: u8 = 3; - #[starknet::interface] pub trait IMailbox { fn initializer( @@ -183,7 +181,7 @@ pub trait IMailboxClient { _message_body: Bytes, _hook_metadata: Option, _hook: Option - ); + ) -> u256; } diff --git a/src/tests/test_mailbox.cairo b/src/tests/test_mailbox.cairo index 4360238..024cbbb 100644 --- a/src/tests/test_mailbox.cairo +++ b/src/tests/test_mailbox.cairo @@ -1,10 +1,8 @@ use alexandria_bytes::{Bytes, BytesTrait}; -use hyperlane_starknet::contracts::libs::message::{Message, MessageTrait}; +use hyperlane_starknet::contracts::libs::message::{Message, MessageTrait, HYPERLANE_VERSION}; use hyperlane_starknet::contracts::mailbox::mailbox; use hyperlane_starknet::interfaces::IMessageRecipientDispatcherTrait; -use hyperlane_starknet::interfaces::{ - IMailbox, IMailboxDispatcher, IMailboxDispatcherTrait, HYPERLANE_VERSION -}; +use hyperlane_starknet::interfaces::{IMailbox, IMailboxDispatcher, IMailboxDispatcherTrait}; use hyperlane_starknet::tests::setup::{ setup, mock_setup, OWNER, LOCAL_DOMAIN, NEW_OWNER, DEFAULT_ISM, DEFAULT_HOOK, REQUIRED_HOOK, NEW_DEFAULT_ISM, NEW_DEFAULT_HOOK, NEW_REQUIRED_HOOK, DESTINATION_DOMAIN, RECIPIENT_ADDRESS