1+ pragma solidity ^ 0.8.0 ;
2+
13import "scripts/DeployFraxOFTProtocol/DeployFraxOFTProtocol.s.sol " ;
24
35import { ERC1967Utils } from "@openzeppelin-5/contracts/proxy/ERC1967/ERC1967Utils.sol " ;
46
57import { FraxOFTUpgradeable } from "contracts/FraxOFTUpgradeable.sol " ;
68import { FrxUSDOFTUpgradeable } from "contracts/frxUsd/FrxUSDOFTUpgradeable.sol " ;
7- import { SFrxUSDUpgradeable } from "contracts/frxUsd/SFrxUSDUpgradeable .sol " ;
9+ import { SFrxUSDOFTUpgradeable } from "contracts/frxUsd/SFrxUSDOFTUpgradeable .sol " ;
810import { WFRAXTokenOFTUpgradeable } from "contracts/WFRAXTokenOFTUpgradeable.sol " ;
911
10- abstract contract UpgradeV110Destination is DeployFraxOFTProtocol {
12+
13+ abstract contract UpgradeV110Destinations is DeployFraxOFTProtocol {
14+ using stdJson for string ;
15+ using Strings for uint256 ;
1116
1217 address public oftImplementation;
1318 address public frxUsdImplementation;
1419 address public sfrxUsdImplementation;
1520 address public wfraxImplementation;
1621
17- function filename () public override returns (string memory ) {
22+ function filename () public view override returns (string memory ) {
1823 string memory root = vm.projectRoot ();
19- root = string .concat (root, "/scripts/ops/V110/Destination /txs/ " );
24+ root = string .concat (root, "/scripts/ops/V110/destinations /txs/ " );
2025 string memory name = string .concat ("UpgradeV110Destination- " , simulateConfig.chainid.toString ());
2126 name = string .concat (name, ".json " );
2227
@@ -27,7 +32,7 @@ abstract contract UpgradeV110Destination is DeployFraxOFTProtocol {
2732
2833 // Setup environment
2934 vm.createSelectFork (_config.RPC);
30- simulateConfig = _simulateConfig ;
35+ simulateConfig = _config ;
3136 _populateConnectedOfts ();
3237 delete serializedTxs;
3338
@@ -41,7 +46,7 @@ abstract contract UpgradeV110Destination is DeployFraxOFTProtocol {
4146 implementations[0 ] = wfraxImplementation;
4247
4348 connectedOfts = new address [](1 );
44- connectedOfts[0 ] = ethereumFraxOft ;
49+ connectedOfts[0 ] = ethFraxOft ;
4550
4651 submitUpgrades (implementations);
4752 } else {
@@ -53,7 +58,7 @@ abstract contract UpgradeV110Destination is DeployFraxOFTProtocol {
5358 // align implementations to the order of connectedOfts array
5459 address [] memory implementations = new address [](6 );
5560 implementations[0 ] = wfraxImplementation; // WFRAX
56- implementations[1 ] = oftImplementation ; // sfrxUSD
61+ implementations[1 ] = sfrxUsdImplementation ; // sfrxUSD
5762 implementations[2 ] = oftImplementation; // sfrxETH
5863 implementations[3 ] = frxUsdImplementation; // frxUSD
5964 implementations[4 ] = oftImplementation; // frxETH
@@ -63,7 +68,7 @@ abstract contract UpgradeV110Destination is DeployFraxOFTProtocol {
6368 }
6469 }
6570
66- function deployImplementations (address memory _endpoint ) public {
71+ function deployImplementations (address _endpoint ) public {
6772 deployOftImplementation (_endpoint);
6873 deployFrxUsdImplementation (_endpoint);
6974 deploySFrxUsdImplementation (_endpoint);
@@ -79,7 +84,7 @@ abstract contract UpgradeV110Destination is DeployFraxOFTProtocol {
7984 }
8085
8186 function deploySFrxUsdImplementation (address _endpoint ) public {
82- sfrxUsdImplementation = address (new SFrxUSDUpgradeable (_endpoint));
87+ sfrxUsdImplementation = address (new SFrxUSDOFTUpgradeable (_endpoint));
8388 }
8489
8590 function deployWFraxImplementation (address _endpoint ) public {
@@ -100,7 +105,7 @@ abstract contract UpgradeV110Destination is DeployFraxOFTProtocol {
100105 address implementation = _implementations[i];
101106
102107 // cache the symbol to ensure we're upgrading to the right implementation
103- string memory symbolBefore = IERC20Metadata (oft).symbol ();
108+ string memory symbolBefore = FraxOFTUpgradeable (oft).symbol ();
104109
105110 // Generate the msig slot
106111 bytes memory initData = abi.encodeWithSignature ("initializeV110() " );
@@ -122,7 +127,7 @@ abstract contract UpgradeV110Destination is DeployFraxOFTProtocol {
122127
123128 // post-upgrade validations
124129 require (
125- isStringEqual (symbolBefore, IERC20Metadata (oft).symbol ()),
130+ isStringEqual (symbolBefore, FraxOFTUpgradeable (oft).symbol ()),
126131 "Upgrade failed: Symbol changed unexpectedly "
127132 );
128133
0 commit comments