async function enqueueMessageToHome(chainDetails, homeDomain, messageDetails) {
  const home = getHome(chainDetails, homeDomain);

  const { message, destinationDomain, recipientAddress } = messageDetails;

  // Send message with random signer address as msg.sender
  await home.enqueue(
    destinationDomain,
    optics.ethersAddressToBytes32(recipientAddress),
    ethers.utils.formatBytes32String(message),
  );

  const [, newRoot] = await home.suggestUpdate();

  return newRoot;
}
/*
 * Enqueue a message to the specified Home contract
 * and return the updated root
 *
 * @param chainDetails - ChainDetails type containing every deployed domain
 * @param homeDomain - domain of the Home contract to which we will enqueue the message
 * @param messageDetails - Message type containing
 *   the message string,
 *   the destination domain to which the message will be sent,
 *   the recipient address on the destination domain to which the message will be dispatched
 *
 * @return newRoot - bytes32 of the latest root
 */
Enqueue a message to the specified Home contract
and return the updated root

@param chainDetails - ChainDetails type containing every deployed domain
@param homeDomain - domain of the Home contract to which we will enqueue the message
@param messageDetails - Message type containing
the message string,
the destination domain to which the message will be sent,
the recipient address on the destination domain to which the message will be dispatched

@return newRoot - bytes32 of the latest root
Enqueue a message to the specified Home contract and return the updated root @param chainDetails - ChainDetails type containing every deployed domain @param homeDomain - domain of the Home contract to which we will enqueue the message @param messageDetails - Message type containing the message string the destination domain to which the message will be sent the recipient address on the destination domain to which the message will be dispatched @return newRoot - bytes32 of the latest root
async function enqueueMessageToHome(chainDetails, homeDomain, messageDetails) {
  const home = getHome(chainDetails, homeDomain);
  const { message, destinationDomain, recipientAddress } = messageDetails;
  await home.enqueue(
    destinationDomain,
    optics.ethersAddressToBytes32(recipientAddress),
    ethers.utils.formatBytes32String(message),
  );
  const [, newRoot] = await home.suggestUpdate();
  return newRoot;
}
async function enqueueMessageToHome ( chainDetails , homeDomain , messageDetails ) { const home = getHome ( chainDetails , homeDomain ) ; const { message , destinationDomain , recipientAddress } = messageDetails ; await home . enqueue ( destinationDomain , optics . ethersAddressToBytes32 ( recipientAddress ) , ethers . utils . formatBytes32String ( message ) , ) ; const [ , newRoot ] = await home . suggestUpdate ( ) ; return newRoot ; }
Enqueue a message to the specified Home contract
 and return the updated root
Enqueue a message to the specified Home contract and return the updated root
// Send message with random signer address as msg.sender