From 6cb76220dd99fe2e3cde65749cb8bdf4fa3a3bc3 Mon Sep 17 00:00:00 2001 From: magj2006 Date: Tue, 29 Oct 2024 17:46:13 +0800 Subject: [PATCH] simplifying the generateUID function --- src/core/ExocoreGateway.sol | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/core/ExocoreGateway.sol b/src/core/ExocoreGateway.sol index 23883515..99058203 100644 --- a/src/core/ExocoreGateway.sol +++ b/src/core/ExocoreGateway.sol @@ -552,16 +552,14 @@ contract ExocoreGateway is /// @return options The built options function _buildOptions(uint32 srcChainId, Action act) private pure returns (bytes memory) { bytes memory options = OptionsBuilder.newOptions(); + uint128 value = DESTINATION_MSG_VALUE; if (!_isSolana(srcChainId)) { - // currently, LZ does not support ordered execution for Solana options = options.addExecutorOrderedExecutionOption(); + } else if (act == Action.REQUEST_ADD_WHITELIST_TOKEN) { + value = SOLANA_WHITELIST_TOKEN_MSG_VALUE; } - uint128 value = _isSolana(srcChainId) && act == Action.REQUEST_ADD_WHITELIST_TOKEN - ? SOLANA_WHITELIST_TOKEN_MSG_VALUE - : DESTINATION_MSG_VALUE; - options = options.addExecutorLzReceiveOption(DESTINATION_GAS_LIMIT, value); return options;