From 30714dae876232125448a4c533f00a2a70785998 Mon Sep 17 00:00:00 2001 From: Laia Soler Date: Wed, 31 Jul 2024 17:09:15 +0200 Subject: [PATCH] fix build docker --- docker/scripts/v2/deploy-docker.sh | 14 +++++++------- docker/scripts/v2/deploy-dockerv2.sh | 12 ++++++------ hardhat.config.ts | 2 +- package.json | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docker/scripts/v2/deploy-docker.sh b/docker/scripts/v2/deploy-docker.sh index 54e679e68..acb84299a 100755 --- a/docker/scripts/v2/deploy-docker.sh +++ b/docker/scripts/v2/deploy-docker.sh @@ -1,16 +1,16 @@ #!/bin/bash sudo rm -rf docker/gethData/geth_data -DEV_PERIOD=1 docker-compose -f docker/docker-compose.yml up -d geth +sudo DEV_PERIOD=1 docker-compose -f docker/docker-compose.yml up -d geth sleep 5 node docker/scripts/fund-accounts.js cp docker/scripts/v2/deploy_parameters_docker.json deployment/v2/deploy_parameters.json cp docker/scripts/v2/create_rollup_parameters_docker.json deployment/v2/create_rollup_parameters.json npm run deploy:testnet:v2:localhost mkdir docker/deploymentOutput -mv deployment/v2/deploy_output.json docker/deploymentOutput -mv deployment/v2/genesis.json docker/deploymentOutput -mv deployment/v2/create_rollup_output.json docker/deploymentOutput -DEV_PERIOD=1 docker-compose -f docker/docker-compose.yml down -docker build -t hermeznetwork/geth-zkevm-contracts -f docker/Dockerfile . +sudo mv deployment/v2/deploy_output.json docker/deploymentOutput +sudo mv deployment/v2/genesis.json docker/deploymentOutput +sudo mv deployment/v2/create_rollup_output.json docker/deploymentOutput +sudo DEV_PERIOD=1 docker-compose -f docker/docker-compose.yml down +sudo docker build -t hermeznetwork/geth-zkevm-contracts -f docker/Dockerfile . # Let it readable for the multiplatform build coming later! -sudo chmod -R go+rxw docker/gethData +sudo chmod -R go+rxw docker/gethData \ No newline at end of file diff --git a/docker/scripts/v2/deploy-dockerv2.sh b/docker/scripts/v2/deploy-dockerv2.sh index 75dba6775..40f2b03dc 100755 --- a/docker/scripts/v2/deploy-dockerv2.sh +++ b/docker/scripts/v2/deploy-dockerv2.sh @@ -1,16 +1,16 @@ #!/bin/bash sudo rm -rf docker/gethData/geth_data -DEV_PERIOD=1 docker compose -f docker/docker-compose.yml up -d geth +sudo DEV_PERIOD=1 docker compose -f docker/docker-compose.yml up -d geth sleep 5 node docker/scripts/fund-accounts.js cp docker/scripts/v2/deploy_parameters_docker.json deployment/v2/deploy_parameters.json cp docker/scripts/v2/create_rollup_parameters_docker.json deployment/v2/create_rollup_parameters.json npm run deploy:testnet:v2:localhost mkdir docker/deploymentOutput -mv deployment/v2/deploy_output.json docker/deploymentOutput -mv deployment/v2/genesis.json docker/deploymentOutput -mv deployment/v2/create_rollup_output.json docker/deploymentOutput -DEV_PERIOD=1 docker compose -f docker/docker-compose.yml down -docker build -t hermeznetwork/geth-zkevm-contracts -f docker/Dockerfile . +sudo mv deployment/v2/deploy_output.json docker/deploymentOutput +sudo mv deployment/v2/genesis.json docker/deploymentOutput +sudo mv deployment/v2/create_rollup_output.json docker/deploymentOutput +sudo DEV_PERIOD=1 docker compose -f docker/docker-compose.yml down +sudo docker build -t hermeznetwork/geth-zkevm-contracts -f docker/Dockerfile . # Let it readable for the multiplatform build coming later! sudo chmod -R go+rxw docker/gethData \ No newline at end of file diff --git a/hardhat.config.ts b/hardhat.config.ts index a85dc020a..3cf06de28 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -100,7 +100,7 @@ const config: HardhatUserConfig = { settings: { optimizer: { enabled: true, - runs: 500, + runs: 200, }, evmVersion: "shanghai", }, // try yul optimizer diff --git a/package.json b/package.json index 6552db563..d02712d6f 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "lint:fix": "npx eslint ./test --fix && npx eslint ./docker/scripts --fix && npx eslint ./deployment --fix && npx eslint ./src --fix", "compile": "npx hardhat compile", "docker:contracts": "./docker/scripts/v2/deploy-docker.sh", - "dockerv2:contracts": "sudo ./docker/scripts/v2/deploy-dockerv2.sh", + "dockerv2:contracts": "./docker/scripts/v2/deploy-dockerv2.sh", "push:docker:contracts": "docker push hermeznetwork/geth-zkevm-contracts", "update:genesis": "node deployment/1_createGenesis.js && node deployment/1_createGenesis.js --test --input ../docker/scripts/deploy_parameters_docker.json --out ../docker/scripts/genesis_docker.json", "coverage": "npx hardhat coverage --testfiles \"test/contractsv2/*.ts\"",