From e234bf28d1904c91a4b5558985f582d27fb7e9f1 Mon Sep 17 00:00:00 2001 From: adu Date: Thu, 17 Oct 2024 10:01:09 +0800 Subject: [PATCH] feat: submit reward must be successful on exocore chain --- src/core/ExocoreGateway.sol | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/ExocoreGateway.sol b/src/core/ExocoreGateway.sol index c99f6545..61f4b43b 100644 --- a/src/core/ExocoreGateway.sol +++ b/src/core/ExocoreGateway.sol @@ -414,6 +414,9 @@ contract ExocoreGateway is } else { (success,) = REWARD_CONTRACT.claimReward(srcChainId, token, avsOrWithdrawer, amount); } + if (isSubmitReward && !success) { + revert Errors.DepositRequestShouldNotFail(srcChainId, lzNonce); // we should not let this happen + } emit RewardOperation(isSubmitReward, success, bytes32(token), bytes32(avsOrWithdrawer), amount); response = isSubmitReward ? bytes("") : abi.encodePacked(lzNonce, success);