Fix L2 alloc state dump

runWithStateDump instead of runWithAllUpgrades
This commit is contained in:
Roy Crihfield 2024-08-22 20:47:58 -05:00
parent c38c01ef6f
commit 14e4a725d6

View File

@ -164,19 +164,17 @@ echo "Generating L2 genesis allocs..."
L2_CHAIN_ID=$(jq ".l2ChainID" $deploy_config_file)
DEPLOY_CONFIG_PATH=$deploy_config_file \
CONTRACT_ADDRESSES_PATH=deployments/$DEPLOYMENT_CONTEXT-deploy.json \
forge script --chain-id $L2_CHAIN_ID scripts/L2Genesis.s.sol:L2Genesis --sig 'runWithAllUpgrades()' --private-key $ADMIN_KEY
STATE_DUMP_PATH=allocs-l2.json \
forge script --chain-id $L2_CHAIN_ID scripts/L2Genesis.s.sol:L2Genesis --sig 'runWithStateDump()' --private-key $ADMIN_KEY
OPTIMISM_ROOT=/opt/optimism
cp $OPTIMISM_ROOT/contracts-bedrock/state-dump-$L2_CHAIN_ID.json allocs-l2.json
echo "Done."
echo "*************************************"
# Copy files needed by other containers to the appropriate shared volumes
echo "Copying deployment artifacts volume l1_deployment and deploy-config to volume l2_config"
cp $OPTIMISM_ROOT/packages/contracts-bedrock/deployments/$DEPLOYMENT_CONTEXT-deploy.json /l1-deployment
cp $OPTIMISM_ROOT/packages/contracts-bedrock/deploy-config/$DEPLOYMENT_CONTEXT.json /l2-config
cp /opt/optimism/packages/contracts-bedrock/deployments/$DEPLOYMENT_CONTEXT-deploy.json /l1-deployment
cp /opt/optimism/packages/contracts-bedrock/deploy-config/$DEPLOYMENT_CONTEXT.json /l2-config
cp allocs-l2.json /l2-config
openssl rand -hex 32 > /l2-config/l2-jwt.txt
echo "Deployment successful. Exiting"
echo "Deployment successful, exiting."