From e9b64d187bf297ad85e422b2da839e2fe408dd62 Mon Sep 17 00:00:00 2001 From: Carter Carlson Date: Tue, 10 Dec 2024 19:39:07 +0100 Subject: [PATCH] feat: `setSendReceiveLib()` (#27) * feat: ProxyAdmin => FraxProxyAdmin * feat: setLibs --- contracts/FraxProxyAdmin.sol | 8 ++ scripts/BaseL0Script.sol | 3 +- .../DeployFraxOFTProtocol.s.sol | 93 +++++++++++++++---- 3 files changed, 86 insertions(+), 18 deletions(-) create mode 100644 contracts/FraxProxyAdmin.sol diff --git a/contracts/FraxProxyAdmin.sol b/contracts/FraxProxyAdmin.sol new file mode 100644 index 0000000..d4b75eb --- /dev/null +++ b/contracts/FraxProxyAdmin.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.22; + +import { ProxyAdmin } from "@fraxfinance/layerzero-v2-upgradeable/messagelib/contracts/upgradeable/proxy/ProxyAdmin.sol"; + +contract FraxProxyAdmin is ProxyAdmin { + constructor(address _admin) ProxyAdmin(_admin) {} +} \ No newline at end of file diff --git a/scripts/BaseL0Script.sol b/scripts/BaseL0Script.sol index aadfa4d..9dc1acc 100644 --- a/scripts/BaseL0Script.sol +++ b/scripts/BaseL0Script.sol @@ -8,6 +8,7 @@ import { console } from "frax-std/FraxTest.sol"; import { SerializedTx, SafeTxUtil } from "scripts/SafeBatchSerialize.sol"; import { FraxOFTUpgradeable } from "contracts/FraxOFTUpgradeable.sol"; +import { FraxProxyAdmin } from "contracts/FraxProxyAdmin.sol"; import { ImplementationMock } from "contracts/mocks/ImplementationMock.sol"; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; @@ -97,7 +98,7 @@ contract BaseL0Script is Script { string public json; function version() public virtual pure returns (uint256, uint256, uint256) { - return (1, 2, 0); + return (1, 2, 1); } modifier broadcastAs(uint256 privateKey) { diff --git a/scripts/DeployFraxOFTProtocol/DeployFraxOFTProtocol.s.sol b/scripts/DeployFraxOFTProtocol/DeployFraxOFTProtocol.s.sol index 2490115..3e1310d 100644 --- a/scripts/DeployFraxOFTProtocol/DeployFraxOFTProtocol.s.sol +++ b/scripts/DeployFraxOFTProtocol/DeployFraxOFTProtocol.s.sol @@ -17,7 +17,7 @@ contract DeployFraxOFTProtocol is BaseL0Script { using Strings for uint256; function version() public virtual override pure returns (uint256, uint256, uint256) { - return (1, 2, 0); + return (1, 2, 1); } function setUp() public virtual override { @@ -41,15 +41,6 @@ contract DeployFraxOFTProtocol is BaseL0Script { setupProxyDestinations(); } - function setupLegacyDestinations() public virtual { - for (uint256 i=0; i