Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ jobs:
sudo curl -L "https://github.com/docker/compose/releases/download/1.26.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Build docker
run: npm run dockerv2:contracts
run: npm run docker:contracts
- name: Test docker
run: npm run docker:tests
2 changes: 1 addition & 1 deletion .github/workflows/build-push-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build docker
run: npm run dockerv2:contracts
run: npm run docker:contracts
- name: Build and push by digest
id: build
uses: docker/build-push-action@v6
Expand Down
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@ npm run deploy:ZkEVM:hardhat
npm run docker:contracts
```

Or if using new docker-compose version

```
npm run dockerv2:contracts
```

A new docker `hermeznetwork/geth-zkevm-contracts` will be created
This docker will contain a geth node with the deployed contracts
The deployment output can be found in: `docker/deploymentOutput/deploy_output.json`
Expand Down
7 changes: 0 additions & 7 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,6 @@ npm i
npm run docker:contracts
```

or

```
npm i
npm run dockerv2:contracts
```

A new docker `geth-zkevm-contracts:latest` will be created
This docker will contain a geth node with the deployed contracts
The deployment output can be found in:
Expand Down
20 changes: 17 additions & 3 deletions docker/scripts/v2/deploy-docker.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
#!/bin/bash
# Set the -e option to stop the script if any command fails
set -e

# Detect which docker compose command is available. Depending on the version it may be:
# - docker-compose
# - docker compose
# With this single script both are supported
if command -v docker-compose &> /dev/null; then
DOCKER_COMPOSE_CMD="docker-compose"
elif docker compose version &> /dev/null; then
DOCKER_COMPOSE_CMD="docker compose"
else
echo "Error: Neither 'docker-compose' nor 'docker compose' is available"
exit 1
fi

# Define cleanup function
cleanup() {
sudo DEV_PERIOD=1 docker-compose -f docker/docker-compose.yml down
sudo DEV_PERIOD=1 $DOCKER_COMPOSE_CMD -f docker/docker-compose.yml down
}
# Configure "trap" in case there's an error
trap cleanup ERR

sudo rm -rf docker/gethData/geth_data
sudo DEV_PERIOD=1 docker-compose -f docker/docker-compose.yml up -d geth
sudo DEV_PERIOD=1 $DOCKER_COMPOSE_CMD -f docker/docker-compose.yml up -d geth
sleep 5
node docker/scripts/fund-accounts.ts
cp docker/scripts/v2/deploy_parameters_docker.json deployment/v2/deploy_parameters.json
Expand All @@ -21,7 +35,7 @@ sudo mv deployment/v2/deploy_output.json docker/deploymentOutput
sudo mv deployment/v2/genesis.json docker/deploymentOutput
[ -f deployment/v2/genesis_sovereign.json ] && sudo mv deployment/v2/genesis_sovereign.json docker/deploymentOutput
sudo mv deployment/v2/create_rollup_output_* docker/deploymentOutput/create_rollup_output.json
sudo DEV_PERIOD=1 docker-compose -f docker/docker-compose.yml down
sudo DEV_PERIOD=1 $DOCKER_COMPOSE_CMD -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
27 changes: 0 additions & 27 deletions docker/scripts/v2/deploy-dockerv2.sh

This file was deleted.

6 changes: 0 additions & 6 deletions docs/contracts/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@ npm run deploy:ZkEVM:hardhat
npm run docker:contracts
```

Or if using new docker-compose version

```
npm run dockerv2:contracts
```

A new docker `hermeznetwork/geth-zkevm-contracts` will be created
This docker will contain a geth node with the deployed contracts
The deployment output can be found in: `docker/deploymentOutput/deploy_output.json`
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
"prettier:contracts:fix": "npx prettier --write 'contracts/**/*.sol'",
"compile": "npx hardhat compile",
"docker:contracts": "./docker/scripts/v2/deploy-docker.sh",
"dockerv2:contracts": "./docker/scripts/v2/deploy-dockerv2.sh",
"dockerv2:contracts:all": "./docker/scripts/v2/deploy-dockerv2-all.sh",
"docker:tests": "./docker/scripts/v2/tests-docker.sh",
"push:docker:contracts": "docker push hermeznetwork/geth-zkevm-contracts",
Expand Down
Loading