generated from defi-wonderland/solidity-foundry-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into test/refactor
- Loading branch information
Showing
13 changed files
with
88 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity 0.8.25; | ||
|
||
import {Script} from 'forge-std/Script.sol'; | ||
import {console} from 'forge-std/Test.sol'; | ||
import {IL1OpUSDCFactory} from 'interfaces/IL1OpUSDCFactory.sol'; | ||
import {USDC_IMPLEMENTATION_CREATION_CODE} from 'script/utils/USDCImplementationCreationCode.sol'; | ||
import {USDCInitTxs} from 'src/contracts/utils/USDCInitTxs.sol'; | ||
|
||
contract DeployBase is Script { | ||
address public constant L1_MESSENGER = 0x866E82a600A1414e583f7F13623F1aC5d58b0Afa; | ||
uint32 public constant MIN_GAS_LIMIT_DEPLOY = 9_000_000; | ||
IL1OpUSDCFactory public immutable L1_FACTORY = IL1OpUSDCFactory(vm.envAddress('L1_FACTORY_MAINNET')); | ||
address public deployer = vm.rememberKey(vm.envUint('MAINNET_DEPLOYER_PK')); | ||
|
||
function run() public { | ||
vm.startBroadcast(deployer); | ||
// Deploy the L2 contracts | ||
bytes[] memory _usdcInitTxs = new bytes[](3); | ||
_usdcInitTxs[0] = USDCInitTxs.INITIALIZEV2; | ||
_usdcInitTxs[1] = USDCInitTxs.INITIALIZEV2_1; | ||
_usdcInitTxs[2] = USDCInitTxs.INITIALIZEV2_2; | ||
|
||
IL1OpUSDCFactory.L2Deployments memory _l2Deployments = IL1OpUSDCFactory.L2Deployments({ | ||
l2AdapterOwner: deployer, | ||
usdcImplementationInitCode: USDC_IMPLEMENTATION_CREATION_CODE, | ||
usdcInitTxs: _usdcInitTxs, | ||
minGasLimitDeploy: MIN_GAS_LIMIT_DEPLOY | ||
}); | ||
(address _l1Adapter, address _l2Factory, address _l2Adapter) = | ||
L1_FACTORY.deploy(L1_MESSENGER, deployer, _l2Deployments); | ||
vm.stopBroadcast(); | ||
|
||
console.log('L1 Adapter:', _l1Adapter); | ||
console.log('L2 Factory:', _l2Factory); | ||
console.log('L2 Adapter:', _l2Adapter); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters