Skip to content

Commit

Permalink
simplifying the generateUID function
Browse files Browse the repository at this point in the history
  • Loading branch information
magj2006 committed Oct 29, 2024
1 parent b992561 commit 6cb7622
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/core/ExocoreGateway.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6cb7622

Please sign in to comment.