diff --git a/.changeset/gorgeous-squids-laugh.md b/.changeset/gorgeous-squids-laugh.md new file mode 100644 index 0000000000..3cabb9d785 --- /dev/null +++ b/.changeset/gorgeous-squids-laugh.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +link transfer status check #bugfix diff --git a/contracts/.changeset/smooth-years-reply.md b/contracts/.changeset/smooth-years-reply.md new file mode 100644 index 0000000000..330310cb8d --- /dev/null +++ b/contracts/.changeset/smooth-years-reply.md @@ -0,0 +1,5 @@ +--- +"@chainlink/contracts": patch +--- + +link transfer status check #bugfix diff --git a/contracts/src/v0.8/automation/dev/v2_3/AutomationRegistryLogicC2_3.sol b/contracts/src/v0.8/automation/dev/v2_3/AutomationRegistryLogicC2_3.sol index 838e05353c..248cfcde94 100644 --- a/contracts/src/v0.8/automation/dev/v2_3/AutomationRegistryLogicC2_3.sol +++ b/contracts/src/v0.8/automation/dev/v2_3/AutomationRegistryLogicC2_3.sol @@ -69,7 +69,7 @@ contract AutomationRegistryLogicC2_3 is AutomationRegistryBase2_3 { } /** - * @notice withdraws LINK received as payment for work performed + * @notice this is for NOPs to withdraw LINK received as payment for work performed */ function withdrawPayment(address from, address to) external { if (to == ZERO_ADDRESS) revert InvalidRecipient(); @@ -78,7 +78,10 @@ contract AutomationRegistryLogicC2_3 is AutomationRegistryBase2_3 { uint96 balance = _updateTransmitterBalanceFromPool(from, s_hotVars.totalPremium, uint96(s_transmittersList.length)); s_transmitters[from].balance = 0; s_reserveAmounts[IERC20(address(i_link))] = s_reserveAmounts[IERC20(address(i_link))] - balance; - i_link.transfer(to, balance); + bool transferStatus = i_link.transfer(to, balance); + if (!transferStatus) { + revert TransferFailed(); + } emit PaymentWithdrawn(from, balance, to, msg.sender); }