Skip to content

Commit

Permalink
Fix storing the chain ids
Browse files Browse the repository at this point in the history
  • Loading branch information
gvladika committed Mar 27, 2024
1 parent 668fc09 commit 03c3793
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
4 changes: 4 additions & 0 deletions scripts/local-deployment/deployCreatorAndCreateRollup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ async function main() {
throw new Error('PARENT_CHAIN_RPC not set')
}

if (!process.env.PARENT_CHAIN_ID) {
throw new Error('PARENT_CHAIN_ID not set')
}

const deployerWallet = new ethers.Wallet(
deployerPrivKey,
new ethers.providers.JsonRpcProvider(parentChainRpc)
Expand Down
10 changes: 2 additions & 8 deletions scripts/rollupCreation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export async function createRollup(

const chainInfo: ChainInfo = {
'chain-name': 'dev-chain',
'parent-chain-id': deployParams.config.chainId.toNumber(),
'parent-chain-id': +process.env.PARENT_CHAIN_ID!,
'parent-chain-is-arbitrum': await _isRunningOnArbitrum(signer),
'sequencer-url': '',
'secondary-forwarding-target': '',
Expand Down Expand Up @@ -299,12 +299,6 @@ async function _getDevRollupConfig(feeToken: string) {
}
}

// set up parent chain id
let parentChainId =
process.env.PARENT_CHAIN_ID !== undefined
? ethers.BigNumber.from(process.env.PARENT_CHAIN_ID)
: ethers.BigNumber.from(1337)

return {
config: {
confirmPeriodBlocks: ethers.BigNumber.from('20'),
Expand All @@ -314,7 +308,7 @@ async function _getDevRollupConfig(feeToken: string) {
wasmModuleRoot: wasmModuleRoot,
owner: ownerAddress,
loserStakeEscrow: ethers.constants.AddressZero,
chainId: parentChainId,
chainId: JSON.parse(chainConfig)['chainId'],
chainConfig: chainConfig,
genesisBlockNum: 0,
sequencerInboxMaxTimeVariation: {
Expand Down

0 comments on commit 03c3793

Please sign in to comment.