diff --git a/src/base/Roles/CrossChain/MultiChainHyperlaneTellerWithMultiAssetSupport.sol b/src/base/Roles/CrossChain/MultiChainHyperlaneTellerWithMultiAssetSupport.sol index 4a92e22..dad88a2 100644 --- a/src/base/Roles/CrossChain/MultiChainHyperlaneTellerWithMultiAssetSupport.sol +++ b/src/base/Roles/CrossChain/MultiChainHyperlaneTellerWithMultiAssetSupport.sol @@ -87,7 +87,8 @@ contract MultiChainHyperlaneTellerWithMultiAssetSupport is MultiChainTellerBase * @param data Bridge data */ function _quote(uint256 shareAmount, BridgeData calldata data) internal view override returns (uint256) { - bytes32 messageId = keccak256(abi.encodePacked(++nonce, address(this), block.chainid)); + uint256 nextNonce = nonce + 1; + bytes32 messageId = keccak256(abi.encodePacked(nextNonce, address(this), block.chainid)); bytes memory _payload = abi.encode(shareAmount, data.destinationChainReceiver, messageId); diff --git a/src/base/Roles/CrossChain/MultiChainTellerBase.sol b/src/base/Roles/CrossChain/MultiChainTellerBase.sol index 4880ffc..6fd104e 100644 --- a/src/base/Roles/CrossChain/MultiChainTellerBase.sol +++ b/src/base/Roles/CrossChain/MultiChainTellerBase.sol @@ -174,7 +174,7 @@ abstract contract MultiChainTellerBase is CrossChainTellerBase { * @param data bridge data */ function _beforeBridge(BridgeData calldata data) internal override { - Chain chain = selectorToChains[data.chainSelector]; + Chain memory chain = selectorToChains[data.chainSelector]; if (!chain.allowMessagesTo) { revert MultiChainTellerBase_MessagesNotAllowedTo(data.chainSelector);