@@ -27,6 +27,7 @@ import {
2727 rollupCreatorAddress as rollupCreatorV3Dot2Address ,
2828} from '../contracts/RollupCreator/v3.2' ;
2929import { createRollup } from '../createRollup' ;
30+ import { createTokenBridge } from '../createTokenBridge' ;
3031import { createRollupPrepareDeploymentParamsConfig } from '../createRollupPrepareDeploymentParamsConfig' ;
3132import { prepareChainConfig } from '../prepareChainConfig' ;
3233import { prepareNodeConfig } from '../prepareNodeConfig' ;
@@ -660,7 +661,35 @@ export async function setupAnvilTestStack(): Promise<AnvilTestStack> {
660661 } ) ;
661662 console . log ( 'Deployer funded on L3\n' ) ;
662663
663- const l3ChildChainUpgradeExecutor = l3Rollup . coreContracts . upgradeExecutor ;
664+ console . log ( 'Deploying L3 token bridge contracts on L2...' ) ;
665+ const { tokenBridgeContracts } = await createTokenBridge ( {
666+ rollupOwner : harnessDeployer . address ,
667+ rollupAddress : l3Rollup . coreContracts . rollup ,
668+ account : harnessDeployer ,
669+ parentChainPublicClient : l2Client ,
670+ orbitChainPublicClient : l3Client ,
671+ nativeTokenAddress : customGasToken . address as Address ,
672+ gasOverrides : {
673+ gasLimit : {
674+ base : 6_000_000n ,
675+ } ,
676+ } ,
677+ retryableGasOverrides : {
678+ maxGasForFactory : {
679+ base : 20_000_000n ,
680+ } ,
681+ maxGasForContracts : {
682+ base : 20_000_000n ,
683+ } ,
684+ maxSubmissionCostForFactory : {
685+ base : 4_000_000_000_000n ,
686+ } ,
687+ maxSubmissionCostForContracts : {
688+ base : 4_000_000_000_000n ,
689+ } ,
690+ } ,
691+ } ) ;
692+ console . log ( 'L3 token bridge contracts deployed on L2\n' ) ;
664693
665694 initializedEnv = {
666695 l1 : {
@@ -691,7 +720,7 @@ export async function setupAnvilTestStack(): Promise<AnvilTestStack> {
691720 bridge : l3Rollup . coreContracts . bridge ,
692721 sequencerInbox : l3Rollup . coreContracts . sequencerInbox ,
693722 parentChainUpgradeExecutor : l3Rollup . coreContracts . upgradeExecutor ,
694- childChainUpgradeExecutor : l3ChildChainUpgradeExecutor ,
723+ childChainUpgradeExecutor : tokenBridgeContracts . orbitChainContracts . upgradeExecutor ,
695724 batchPoster : harnessDeployer . address ,
696725 } ,
697726 } ;
0 commit comments