@@ -16,8 +16,8 @@ import {HelperConfig} from "./HelperConfig.s.sol";
1616contract UpgradeScript is DevOps {
1717 // Upgrade Config:
1818 bool upgradeTwin = false ; // MODIFY THIS WHEN UPGRADING
19- bool upgradeERC20 = false ; // MODIFY THIS WHEN UPGRADING
20- bool upgradeERC20Factory = false ; // MODIFY THIS WHEN UPGRADING
19+ bool upgradeErc20 = false ; // MODIFY THIS WHEN UPGRADING
20+ bool upgradeErc20Factory = false ; // MODIFY THIS WHEN UPGRADING
2121 bool upgradeBridgeValidator = false ; // MODIFY THIS WHEN UPGRADING
2222 bool upgradeBridge = false ; // MODIFY THIS WHEN UPGRADING
2323
@@ -26,14 +26,14 @@ contract UpgradeScript is DevOps {
2626 address bridgeAddress;
2727 address erc20FactoryAddress;
2828 address twinBeaconAddress;
29- address crossChainERC20BeaconAddress ;
29+ address crossChainErc20BeaconAddress ;
3030
3131 function setUp () external {
3232 // Read existing deployment addresses
3333 (bridgeAddress, erc20FactoryAddress, twinBeaconAddress) = _readAndParseDeploymentFile ();
3434
3535 // Upgrade CrossChainERC20Beacon and CrossChainERC20Factory
36- crossChainERC20BeaconAddress = CrossChainERC20Factory (erc20FactoryAddress).BEACON ();
36+ crossChainErc20BeaconAddress = CrossChainERC20Factory (erc20FactoryAddress).BEACON ();
3737 }
3838
3939 function run () public {
@@ -47,12 +47,12 @@ contract UpgradeScript is DevOps {
4747 _upgradeTwinBeacon ();
4848 }
4949
50- if (upgradeERC20 ) {
51- _upgradeCrossChainERC20Beacon ();
50+ if (upgradeErc20 ) {
51+ _upgradeCrossChainErc20Beacon ();
5252 }
5353
54- if (upgradeERC20Factory ) {
55- _upgradeCrossChainERC20Factory (cfg);
54+ if (upgradeErc20Factory ) {
55+ _upgradeCrossChainErc20Factory (cfg);
5656 }
5757
5858 if (upgradeBridgeValidator) {
@@ -82,24 +82,24 @@ contract UpgradeScript is DevOps {
8282 console.log ("Upgraded TwinBeacon! " );
8383 }
8484
85- function _upgradeCrossChainERC20Beacon () internal {
85+ function _upgradeCrossChainErc20Beacon () internal {
8686 // Deploy new erc20 implementation
8787 address erc20Impl = address (new CrossChainERC20 (bridgeAddress));
8888
8989 // Upgrade CrossChainERC20Beacon to new implementation --> This will automatically upgrade the Factory contract
9090 // as well
91- UpgradeableBeacon beacon = UpgradeableBeacon (crossChainERC20BeaconAddress );
91+ UpgradeableBeacon beacon = UpgradeableBeacon (crossChainErc20BeaconAddress );
9292 beacon.upgradeTo (erc20Impl);
9393 console.log ("Upgraded CrossChainERC20Beacon! " );
9494 }
9595
96- function _upgradeCrossChainERC20Factory (HelperConfig.NetworkConfig memory cfg ) internal {
96+ function _upgradeCrossChainErc20Factory (HelperConfig.NetworkConfig memory cfg ) internal {
9797 // Deploy new Factory implementation
98- address xChainERC20FactoryImpl = address (new CrossChainERC20Factory (crossChainERC20BeaconAddress ));
99- console.log ("Deployed new CrossChainERC20Factory implementation: %s " , xChainERC20FactoryImpl );
98+ address xChainErc20FactoryImpl = address (new CrossChainERC20Factory (crossChainErc20BeaconAddress ));
99+ console.log ("Deployed new CrossChainERC20Factory implementation: %s " , xChainErc20FactoryImpl );
100100
101101 // Upgrade CrossChainERC20Factory to new implementation
102- ERC1967Factory (cfg.erc1967Factory).upgrade (erc20FactoryAddress, xChainERC20FactoryImpl );
102+ ERC1967Factory (cfg.erc1967Factory).upgrade (erc20FactoryAddress, xChainErc20FactoryImpl );
103103 console.log ("Upgraded CrossChainERC20Factory! " );
104104 }
105105
0 commit comments