From cfbf125ebdf54b6f8a0b1c4c979740e920469855 Mon Sep 17 00:00:00 2001 From: adu Date: Fri, 18 Oct 2024 09:47:03 +0800 Subject: [PATCH] feat: submit reward must be successful on exocore chain (#116) --- 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);