From 2a3ebd7be98a19166c9d4ff40c9588c6ee01b68e Mon Sep 17 00:00:00 2001 From: Ignasi Date: Thu, 24 Oct 2024 13:11:37 +0200 Subject: [PATCH] Improve WETH comments at bridge contract --- contracts/v2/PolygonZkEVMBridgeV2.sol | 3 ++- docker/scripts/v2/deploy-dockerv2.sh | 16 ++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/contracts/v2/PolygonZkEVMBridgeV2.sol b/contracts/v2/PolygonZkEVMBridgeV2.sol index 4a705c31..cbd88c92 100644 --- a/contracts/v2/PolygonZkEVMBridgeV2.sol +++ b/contracts/v2/PolygonZkEVMBridgeV2.sol @@ -89,6 +89,7 @@ contract PolygonZkEVMBridgeV2 is bytes public gasTokenMetadata; // WETH address + // @note If WETH address is zero, means the gasToken of the network is ether, else means the network has a custom erc20 gas token. This value is set at initialization of the contract. In case gasTokenAddress != zero, a erc20 contract is deployed and the created address is set as WETH address, to handle wrapped ether TokenWrapped public WETHToken; /** @@ -442,7 +443,7 @@ contract PolygonZkEVMBridgeV2 is * @param mainnetExitRoot Mainnet exit root * @param rollupExitRoot Rollup exit root * @param originNetwork Origin network - * @param originTokenAddress Origin token address, 0 address is reserved for ether + * @param originTokenAddress Origin token address, 0 address is reserved for gas token address. If WETH address is zero, means this gas token is ether, else means is a custom erc20 gas token * @param destinationNetwork Network destination * @param destinationAddress Address destination * @param amount Amount of tokens diff --git a/docker/scripts/v2/deploy-dockerv2.sh b/docker/scripts/v2/deploy-dockerv2.sh index c27a95f0..0b5b3c93 100755 --- a/docker/scripts/v2/deploy-dockerv2.sh +++ b/docker/scripts/v2/deploy-dockerv2.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -sudo rm -rf docker/gethData/geth_data -sudo DEV_PERIOD=1 docker compose -f docker/docker-compose.yml up -d geth +rm -rf docker/gethData/geth_data +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 @@ -9,10 +9,10 @@ cp docker/scripts/v2/create_rollup_parameters_docker.json deployment/v2/create_r npm run deploy:testnet:v2:localhost rm -rf docker/deploymentOutput mkdir docker/deploymentOutput -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 . +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 . # Let it readable for the multiplatform build coming later! -sudo chmod -R go+rxw docker/gethData \ No newline at end of file +chmod -R go+rxw docker/gethData \ No newline at end of file