@@ -118,10 +118,7 @@ export async function setupAnvilTestStack(): Promise<AnvilTestStack> {
118118 } ,
119119 } ;
120120
121- const sourceDeployer = createAccount (
122- testConstants . DEFAULT_SOURCE_DEPLOYER_PRIVATE_KEY as Address ,
123- ) ;
124- const scenarioDeployer = createAccount ( ) ;
121+ const harnessDeployer = createAccount ( ) ;
125122 const blockAdvancerAccount = createAccount ( ) ;
126123
127124 // Starting L1 node (Anvil)
@@ -149,7 +146,7 @@ export async function setupAnvilTestStack(): Promise<AnvilTestStack> {
149146
150147 await setBalanceOnL1 ( {
151148 rpcUrl : l1RpcUrl ,
152- address : sourceDeployer . address ,
149+ address : harnessDeployer . address ,
153150 balance : parseEther ( '10000000' ) ,
154151 } ) ;
155152
@@ -159,7 +156,7 @@ export async function setupAnvilTestStack(): Promise<AnvilTestStack> {
159156 createPublicClient ( { chain : sepolia , transport : http ( l1RpcUrl ) } ) ,
160157 {
161158 chainId : BigInt ( l2ChainId ) ,
162- owner : sourceDeployer . address ,
159+ owner : harnessDeployer . address ,
163160 sequencerInboxMaxTimeVariation : L2TimingParams . sequencerInboxMaxTimeVariation ,
164161 confirmPeriodBlocks : L2TimingParams . confirmPeriodBlocks ,
165162 challengeGracePeriodBlocks : L2TimingParams . challengeGracePeriodBlocks ,
@@ -168,7 +165,7 @@ export async function setupAnvilTestStack(): Promise<AnvilTestStack> {
168165 chainConfig : prepareChainConfig ( {
169166 chainId : l2ChainId ,
170167 arbitrum : {
171- InitialChainOwner : sourceDeployer . address ,
168+ InitialChainOwner : harnessDeployer . address ,
172169 DataAvailabilityCommittee : true ,
173170 } ,
174171 } ) ,
@@ -179,12 +176,12 @@ export async function setupAnvilTestStack(): Promise<AnvilTestStack> {
179176 const l2Rollup = await createRollup ( {
180177 params : {
181178 config : l2RollupConfig ,
182- batchPosters : [ sourceDeployer . address ] ,
183- validators : [ sourceDeployer . address ] ,
179+ batchPosters : [ harnessDeployer . address ] ,
180+ validators : [ harnessDeployer . address ] ,
184181 nativeToken : zeroAddress ,
185182 maxFeePerGasForRetryables : parseGwei ( '0.1' ) ,
186183 } as CreateRollupParams < 'v3.2' > ,
187- account : sourceDeployer ,
184+ account : harnessDeployer ,
188185 parentChainPublicClient : createPublicClient ( {
189186 chain : sepolia ,
190187 transport : http ( l1RpcUrl ) ,
@@ -198,8 +195,8 @@ export async function setupAnvilTestStack(): Promise<AnvilTestStack> {
198195 chainName : 'Chain SDK Int Test L2' ,
199196 chainConfig : l2ChainConfig ,
200197 coreContracts : l2Rollup . coreContracts ,
201- batchPosterPrivateKey : sourceDeployer . privateKey ,
202- validatorPrivateKey : sourceDeployer . privateKey ,
198+ batchPosterPrivateKey : harnessDeployer . privateKey ,
199+ validatorPrivateKey : harnessDeployer . privateKey ,
203200 stakeToken : l2RollupConfig . stakeToken ,
204201 parentChainId : sepolia . id ,
205202 parentChainRpcUrl : `http://${ l1ContainerName } :8545` ,
@@ -250,7 +247,7 @@ export async function setupAnvilTestStack(): Promise<AnvilTestStack> {
250247 l1RpcUrl,
251248 l2RpcUrl,
252249 l2Chain : l2BootstrapChain ,
253- deployer : sourceDeployer ,
250+ deployer : harnessDeployer ,
254251 inbox : l2Rollup . coreContracts . inbox ,
255252 } ) ;
256253 console . log ( 'Deployer funded on L2' ) ;
@@ -273,19 +270,19 @@ export async function setupAnvilTestStack(): Promise<AnvilTestStack> {
273270 } ) ;
274271
275272 console . log ( 'Configuring L2 fee settings...' ) ;
276- await configureL2Fees ( l2PublicClient , l2WalletClient , sourceDeployer ) ;
273+ await configureL2Fees ( l2PublicClient , l2WalletClient , harnessDeployer ) ;
277274 console . log ( 'L2 fee settings updated\n' ) ;
278275
279276 console . log ( 'Ensuring L2 create2 factory...' ) ;
280277 await ensureCreate2Factory ( {
281278 publicClient : l2PublicClient ,
282279 walletClient : l2WalletClient ,
283- fundingAccount : sourceDeployer ,
280+ fundingAccount : harnessDeployer ,
284281 } ) ;
285282 console . log ( 'L2 create2 factory is ready\n' ) ;
286283
287284 const l2Provider = new ethers . providers . JsonRpcProvider ( l2RpcUrl ) ;
288- const l2Signer = new ethers . Wallet ( sourceDeployer . privateKey , l2Provider ) ;
285+ const l2Signer = new ethers . Wallet ( harnessDeployer . privateKey , l2Provider ) ;
289286
290287 console . log ( 'Deploying L2 custom gas token...' ) ;
291288 const customGasToken = await deployContract ( l2Signer , TestWETH9 as ContractArtifact , [
@@ -307,8 +304,8 @@ export async function setupAnvilTestStack(): Promise<AnvilTestStack> {
307304 {
308305 networkName : dockerNetworkName ,
309306 rpcUrl : `http://${ l2ContainerName } :8449` ,
310- deployerPrivateKey : sourceDeployer . privateKey ,
311- factoryOwner : sourceDeployer . address ,
307+ deployerPrivateKey : harnessDeployer . privateKey ,
308+ factoryOwner : harnessDeployer . address ,
312309 maxDataSize : 104_857 ,
313310 chainId : l2ChainId ,
314311 } ,
@@ -322,30 +319,14 @@ export async function setupAnvilTestStack(): Promise<AnvilTestStack> {
322319 console . log ( 'L2 rollup creator deployed\n' ) ;
323320
324321 const customGasTokenMintAmount = parseEther ( '10' ) ;
325- const scenarioDeployerCustomGasTokenFundingAmount = parseEther ( '5' ) ;
326- const scenarioDeployerEthFundingAmount = parseEther ( '5' ) ;
327322
328323 await (
329324 await customGasToken . deposit ( {
330325 value : customGasTokenMintAmount ,
331326 ...testConstants . LOW_L2_FEE_OVERRIDES ,
332327 } )
333328 ) . wait ( ) ;
334- await (
335- await customGasToken . transfer (
336- scenarioDeployer . address ,
337- scenarioDeployerCustomGasTokenFundingAmount ,
338- testConstants . LOW_L2_FEE_OVERRIDES ,
339- )
340- ) . wait ( ) ;
341- await (
342- await l2Signer . sendTransaction ( {
343- to : scenarioDeployer . address ,
344- value : scenarioDeployerEthFundingAmount ,
345- ...testConstants . LOW_L2_FEE_OVERRIDES ,
346- } )
347- ) . wait ( ) ;
348- console . log ( '[chain-sdk-int-test] source L2 shared accounts funded' ) ;
329+ console . log ( '[chain-sdk-int-test] source L2 shared deployer funded' ) ;
349330
350331 const l2Chain = defineChain ( {
351332 id : l2ChainId ,
@@ -359,8 +340,8 @@ export async function setupAnvilTestStack(): Promise<AnvilTestStack> {
359340 testnet : true ,
360341 contracts : {
361342 rollupCreator : { address : l2RollupCreator } ,
362- tokenBridgeCreator : { address : sourceDeployer . address } ,
363- weth : { address : sourceDeployer . address } ,
343+ tokenBridgeCreator : { address : harnessDeployer . address } ,
344+ weth : { address : harnessDeployer . address } ,
364345 } ,
365346 } ) ;
366347 registerCustomParentChain ( l2Chain ) ;
@@ -371,14 +352,14 @@ export async function setupAnvilTestStack(): Promise<AnvilTestStack> {
371352 rpcUrl : l2RpcUrl ,
372353 chain : l2Chain ,
373354 accounts : {
374- deployer : sourceDeployer ,
355+ deployer : harnessDeployer ,
375356 } ,
376357 timingParams : L2TimingParams ,
377358 rollupCreatorVersion,
378359 } ,
379360 l3 : {
380361 accounts : {
381- tokenBridgeDeployer : scenarioDeployer ,
362+ tokenBridgeDeployer : harnessDeployer ,
382363 } ,
383364 nativeToken : customGasToken . address as Address ,
384365 } ,
0 commit comments