From fe9fee407e8bc4c8d39797bc8998c44d02f15715 Mon Sep 17 00:00:00 2001 From: ImJeremyHe Date: Fri, 19 Jul 2024 10:52:04 +0800 Subject: [PATCH] Fix the deployment of HostIo contract --- scripts/deploymentUtils.ts | 4 ++-- scripts/local-deployment/deployCreatorAndCreateRollup.ts | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/deploymentUtils.ts b/scripts/deploymentUtils.ts index 2bceaa3a..b98027e9 100644 --- a/scripts/deploymentUtils.ts +++ b/scripts/deploymentUtils.ts @@ -97,7 +97,7 @@ export async function deployAllContracts( signer: any, maxDataSize: BigNumber, verify: boolean = true, - hotshotAddr?: string + espressoLightClientAddr?: string ): Promise> { const isOnArb = await _isRunningOnArbitrum(signer) @@ -177,7 +177,7 @@ export async function deployAllContracts( [], verify ) - const hostIoArg = hotshotAddr ? [hotshotAddr] : [] + const hostIoArg = espressoLightClientAddr ? [espressoLightClientAddr] : [] const proverHostIo = await deployContract( 'OneStepProverHostIo', signer, diff --git a/scripts/local-deployment/deployCreatorAndCreateRollup.ts b/scripts/local-deployment/deployCreatorAndCreateRollup.ts index 1a63b2f7..aca45617 100644 --- a/scripts/local-deployment/deployCreatorAndCreateRollup.ts +++ b/scripts/local-deployment/deployCreatorAndCreateRollup.ts @@ -26,6 +26,11 @@ async function main() { throw new Error('PARENT_CHAIN_ID not set') } + let espressoLightClientAddr = process.env.LIGHT_CLIENT_ADDR as string + if (!espressoLightClientAddr) { + throw new Error("LIGHT_CLIENT_ADDR not set") + } + const deployerWallet = new ethers.Wallet( deployerPrivKey, new ethers.providers.JsonRpcProvider(parentChainRpc) @@ -44,7 +49,7 @@ async function main() { /// deploy templates and rollup creator console.log('Deploy RollupCreator') - const contracts = await deployAllContracts(deployerWallet, maxDataSize, false) + const contracts = await deployAllContracts(deployerWallet, maxDataSize, false, espressoLightClientAddr) console.log('Set templates on the Rollup Creator') await (