@@ -3,6 +3,8 @@ pragma solidity 0.8.24;
33
44import {Script} from "forge-std/Script.sol " ;
55
6+ import {EntryPoint} from "account-abstraction/core/EntryPoint.sol " ;
7+
68contract HelperConfig is Script {
79 struct NetworkConfig {
810 uint256 chainId;
@@ -13,21 +15,25 @@ contract HelperConfig is Script {
1315 address l2Oracle;
1416 address shoyuBashi;
1517 uint256 deployerKey;
18+ address entryPoint;
1619 }
1720
1821 uint256 public DEFAULT_ANVIL_PRIVATE_KEY = 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 ;
1922
2023 uint256 public constant ARBITRUM_SEPOLIA_CHAIN_ID = 421614 ;
2124 uint256 public constant BASE_SEPOLIA_CHAIN_ID = 84532 ;
2225 uint256 public constant OPTIMISM_SEPOLIA_CHAIN_ID = 11155420 ;
26+ uint256 public constant LOCAL_CHAIN_ID = 31337 ;
2327
24- function getConfig (uint256 chainId ) public view returns (NetworkConfig memory config ) {
28+ function getConfig (uint256 chainId ) public returns (NetworkConfig memory config ) {
2529 if (chainId == ARBITRUM_SEPOLIA_CHAIN_ID) {
2630 return getArbitrumSepoliaConfig ();
2731 } else if (chainId == BASE_SEPOLIA_CHAIN_ID) {
2832 return getBaseSepoliaConfig ();
2933 } else if (chainId == OPTIMISM_SEPOLIA_CHAIN_ID) {
3034 return getOptimismSepoliaConfig ();
35+ } else if (chainId == LOCAL_CHAIN_ID) {
36+ return getLocalConfig ();
3137 }
3238
3339 require (false , "Unsupported chain " );
@@ -42,7 +48,8 @@ contract HelperConfig is Script {
4248 inbox: 0x3925cA932720B63ccD2C359DF27fD4146b123628 ,
4349 l2Oracle: 0x042B2E6C5E99d4c521bd49beeD5E99651D9B0Cf4 ,
4450 shoyuBashi: 0xce8b068D4F7F2eb3bDAFa72eC3C4feE78CF9Ccf7 ,
45- deployerKey: vm.envUint ("PRIVATE_KEY " )
51+ deployerKey: vm.envUint ("PRIVATE_KEY " ),
52+ entryPoint: address (0 )
4653 });
4754 }
4855
@@ -55,7 +62,8 @@ contract HelperConfig is Script {
5562 inbox: 0x0D595D4d3dC06548D536e74528C5B8ecc2171B31 ,
5663 l2Oracle: 0x4C8BA32A5DAC2A720bb35CeDB51D6B067D104205 ,
5764 shoyuBashi: 0x6602dc9b6bd964C2a11BBdA9B2275308D1Bbc14f ,
58- deployerKey: vm.envUint ("PRIVATE_KEY " )
65+ deployerKey: vm.envUint ("PRIVATE_KEY " ),
66+ entryPoint: address (0 )
5967 });
6068 }
6169
@@ -68,7 +76,27 @@ contract HelperConfig is Script {
6876 inbox: 0x27B9e81C31eab9fdB8Ed1280680b23299FBa4cd8 ,
6977 l2Oracle: 0x218CD9489199F321E1177b56385d333c5B598629 ,
7078 shoyuBashi: 0x7237bb8d1d38DF8b473b5A38eD90088AF162ad8e ,
71- deployerKey: vm.envUint ("PRIVATE_KEY " )
79+ deployerKey: vm.envUint ("PRIVATE_KEY " ),
80+ entryPoint: address (0 )
81+ });
82+ }
83+
84+ function getLocalConfig () public returns (NetworkConfig memory ) {
85+ EntryPoint entryPoint = new EntryPoint ();
86+
87+ return NetworkConfig ({
88+ chainId: LOCAL_CHAIN_ID,
89+ opStackOutbox: address (0 ),
90+ arbitrumOutbox: address (0 ),
91+ hashiOutbox: address (0 ),
92+ inbox: address (0 ),
93+ l2Oracle: address (0 ),
94+ shoyuBashi: address (0 ),
95+ deployerKey: 0 ,
96+ entryPoint: address (entryPoint)
7297 });
7398 }
99+
100+ // Including to block from coverage report
101+ function test () external {}
74102}
0 commit comments