Skip to content

Commit d8c5f5b

Browse files
committed
add: v2.1 changes
1 parent a7b43e6 commit d8c5f5b

39 files changed

+487
-1518
lines changed

Audit/Renzo_Protocol_v2_1.pdf

9.24 MB
Binary file not shown.

contracts/Bridge/L1/xRenzoBridgeReceiverStorage.sol

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,7 @@ pragma solidity 0.8.27;
44
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
55
import "../../IRestakeManager.sol";
66
import "../xERC20/interfaces/IXERC20Lockbox.sol";
7-
import {
8-
IRouterClient
9-
} from "@chainlink/contracts-ccip/src/v0.8/ccip/interfaces/IRouterClient.sol";
107
import { IRateProvider } from "../../RateProvider/IRateProvider.sol";
11-
import {
12-
LinkTokenInterface
13-
} from "@chainlink/contracts/src/v0.8/shared/interfaces/LinkTokenInterface.sol";
148
import { IRoleManager } from "../../Permissions/IRoleManager.sol";
159

1610
abstract contract xRenzoBridgeReceiverStorageV1 {

contracts/Bridge/L2/PriceFeed/HyperlaneSender.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,15 @@ contract HyperlaneSender is Ownable, Pausable, ReentrancyGuard {
130130
}
131131

132132
/**
133-
* @notice Pause the contract
133+
* @notice UnPause the contract
134134
* @dev This should be a permissioned call (onlyOwner)
135135
*/
136136
function unPause() external onlyOwnerOrPauser {
137137
_unpause();
138138
}
139139

140140
/**
141-
* @notice UnPause the contract
141+
* @notice Pause the contract
142142
* @dev This should be a permissioned call (onlyOwner)
143143
*/
144144
function pause() external onlyOwnerOrPauser {
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// SPDX-License-Identifier: BUSL-1.1
2+
pragma solidity 0.8.27;
3+
4+
import "../../../RateProvider/IRateProvider.sol";
5+
import {
6+
OwnableUpgradeable
7+
} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
8+
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
9+
import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
10+
import "../../../Errors/Errors.sol";
11+
12+
contract L2RateProvider is
13+
Initializable,
14+
OwnableUpgradeable,
15+
ReentrancyGuardUpgradeable,
16+
IRateProvider
17+
{
18+
IRateProvider public immutable newRenzoDeposit;
19+
20+
constructor(IRateProvider _newRenzoDeposit) {
21+
if (address(_newRenzoDeposit) == address(0)) revert InvalidZeroInput();
22+
newRenzoDeposit = _newRenzoDeposit;
23+
_disableInitializers();
24+
}
25+
26+
function initialize() public initializer {
27+
__Ownable_init();
28+
__ReentrancyGuard_init();
29+
}
30+
function getRate() external view override returns (uint256) {
31+
return newRenzoDeposit.getRate();
32+
}
33+
}

contracts/Bridge/L2/ValueTransfer/ARB/EthArbValueTransfer.sol

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ contract EthArbValueTransfer is IValueTransferBridge {
4949
* @notice Transfers ETH to mainnet via the standard bridge
5050
* @dev .
5151
* @param .
52-
* @param . should always be wsteth
52+
* @param . should always be ETH
5353
* @param . amount to send
5454
* @return transferId always 0
5555
*/
@@ -59,7 +59,6 @@ contract EthArbValueTransfer is IValueTransferBridge {
5959
address /*token - awlays ETH*/,
6060
uint256 /*amount - always full amount*/
6161
) external payable returns (bytes32 transferId) {
62-
// Do not allow ETH
6362
if (msg.value == 0) revert UnsupportedWithdrawAsset();
6463

6564
// Trigger the bridge

contracts/Bridge/L2/ValueTransfer/OP/EthOPValueTransfer.sol

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ contract EthOPValueTransfer is IValueTransferBridge {
4949
* @notice Transfers ETH to mainnet via the standard bridge
5050
* @dev .
5151
* @param .
52-
* @param . should always be wsteth
52+
* @param . should always be ETH
5353
* @param . amount to send
5454
* @return transferId always 0
5555
*/
@@ -59,7 +59,6 @@ contract EthOPValueTransfer is IValueTransferBridge {
5959
address /*token - awlays ETH*/,
6060
uint256 /*amount - always full amount*/
6161
) external payable returns (bytes32 transferId) {
62-
// Do not allow ETH
6362
if (msg.value == 0) revert UnsupportedWithdrawAsset();
6463

6564
// TODO: Determine if we need to add extra data to track this tx

contracts/Bridge/L2/ValueTransfer/OP/LidoOPValueTransfer.sol

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ contract LidoOPValueTransfer is IValueTransferBridge {
7070

7171
// Pull the token in and then give the allowance
7272
IERC20(token).safeTransferFrom(msg.sender, address(this), amount);
73-
IERC20(token).safeIncreaseAllowance(address(lidoBridge), amount);
7473

7574
// TODO: Determine if we need to add extra data to track this tx
7675
bytes memory extraData;

contracts/Bridge/L2/xRenzoDepositNativeBridge.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ contract xRenzoDepositNativeBridge is
4646

4747
event PriceUpdated(uint256 price, uint256 timestamp);
4848
event Deposit(address indexed user, uint256 amountIn, uint256 amountOut);
49-
event BridgeSweeperAddressUpdated(address sweeper, bool allowed);
5049
event BridgeSwept(address token, uint256 amount, address sweeper);
5150
event ReceiverPriceFeedUpdated(address newReceiver, address oldReceiver);
5251
event SweeperBridgeFeeCollected(address sweeper, address token, uint256 feeCollected);
@@ -499,6 +498,7 @@ contract xRenzoDepositNativeBridge is
499498
* @param _token EC20 token
500499
* @param _supported Indicates if the token is supported for a deposit asset
501500
* @param _tokenOracle If supported, the oracle for the token to get pricing in ETH
501+
* @param _valueTransferBridge Middleware contract used to transfer asset through configured bridge
502502
*/
503503
function setSupportedToken(
504504
IERC20 _token,

contracts/Bridge/xERC20/README.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)