Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/recovery/Recovery.sol
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ contract Recovery is UUPSUpgradeable {
function withdrawETH(address[] calldata targets, uint256[] calldata amounts) public onlyOwner {
for (uint256 i = 0; i < targets.length; i++) {
(bool success,) = targets[i].call{ value: amounts[i] }("");
if (!success) continue;
require(success, "Recovery: ETH transfer failed");
}
}
}
8 changes: 6 additions & 2 deletions src/smart-escrow/SmartEscrow.sol
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,12 @@ contract SmartEscrow is AccessControlDefaultAdminRules {
function _vestingSchedule(uint256 timestamp) internal view returns (uint256) {
if (timestamp < cliffStart) {
return 0;
} else if (timestamp > end) {
return OP_TOKEN.balanceOf({ account: address(this) }) + released;
} else if (timestamp >= end) {
// Return the total number of tokens that were ever vested, computed from
// the schedule parameters, so the value is stable regardless of how many
// tokens have already been released and transferred out of this contract.
uint256 totalVestingEvents = (end - start) / vestingPeriod;
return initialTokens + totalVestingEvents * vestingEventTokens;
} else {
return initialTokens + ((timestamp - start) / vestingPeriod) * vestingEventTokens;
}
Expand Down