Skip to content

Commit

Permalink
chore: validate result of transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
efecarranza committed Feb 22, 2024
1 parent d8fff3b commit b0ad5aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ interface IWETH {
* - Discussion: https://governance.aave.com/t/arfc-orbit-program-renewal/16550
*/
contract AaveV3Ethereum_OrbitProgram_20240220 is IProposalGenericExecutor {
error EthTransferFailed(address account);

function execute() external {
AaveV3Ethereum.COLLECTOR.transfer(
AaveV3EthereumAssets.WETH_UNDERLYING,
Expand All @@ -33,6 +35,7 @@ contract AaveV3Ethereum_OrbitProgram_20240220 is IProposalGenericExecutor {
uint256 usageLength = usage.length;
for (uint256 i = 0; i < usageLength; i++) {
(bool ok, ) = usage[i].account.call{value: usage[i].usage}('');
if (!ok) revert EthTransferFailed(usage[i].account);
}

uint256 actualStreamAmount = (OrbitProgramData.STREAM_AMOUNT /
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import {AaveV3Ethereum, AaveV3EthereumAssets} from 'aave-address-book/AaveV3Ethereum.sol';
Expand Down

0 comments on commit b0ad5aa

Please sign in to comment.