diff --git a/docker/config-example.toml b/docker/config-example.toml index 7676c5c..09df81d 100644 --- a/docker/config-example.toml +++ b/docker/config-example.toml @@ -67,7 +67,7 @@ L1_PLONK_VERIFIER_ADDR = "0x0000000000000000000000000000000000000001" [contracts.overrides] # L1_WETH = "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14" -# L1_GAS_TOKEN = "0x0000000000000000000000000000000000000000" +# L1_GAS_TOKEN = "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9" L2_MESSAGE_QUEUE = "0x5300000000000000000000000000000000000000" L1_GAS_PRICE_ORACLE = "0x5300000000000000000000000000000000000002" diff --git a/scripts/deterministic/DeployScroll.s.sol b/scripts/deterministic/DeployScroll.s.sol index 1836de3..fac74df 100644 --- a/scripts/deterministic/DeployScroll.s.sol +++ b/scripts/deterministic/DeployScroll.s.sol @@ -242,7 +242,7 @@ contract DeployScroll is DeterminsticDeployment { } } - function checkDeployerBalance() private view { + function checkDeployerBalance() private { // ignore balance during simulation if (broadcastLayer == Layer.None) { return; @@ -289,7 +289,9 @@ contract DeployScroll is DeterminsticDeployment { } // check funds for initial deposit (L1, alternative gas token) - if (broadcastLayer == Layer.L1 && ALTERNATIVE_GAS_TOKEN_ENABLED) { + // skip it if L1_GAS_TOKEN is not configured in the config file + address gasTokenAddr = tryGetOverride("L1_GAS_TOKEN"); + if (broadcastLayer == Layer.L1 && ALTERNATIVE_GAS_TOKEN_ENABLED && gasTokenAddr != address(0)) { uint256 l1GasTokenGatewayBalance = IERC20Metadata(L1_GAS_TOKEN_ADDR).balanceOf( L1_GAS_TOKEN_GATEWAY_PROXY_ADDR ); diff --git a/scripts/deterministic/GenerateConfigs.s.sol b/scripts/deterministic/GenerateConfigs.s.sol index c926fe6..68d9f4b 100644 --- a/scripts/deterministic/GenerateConfigs.s.sol +++ b/scripts/deterministic/GenerateConfigs.s.sol @@ -133,6 +133,7 @@ contract GenerateChainMonitorConfig is DeployScroll { vm.writeJson(vm.toString(L1_MESSAGE_QUEUE_PROXY_ADDR), CHAIN_MONITOR_CONFIG_PATH, ".l1_config.l1_contracts.message_queue"); vm.writeJson(vm.toString(L1_SCROLL_CHAIN_PROXY_ADDR), CHAIN_MONITOR_CONFIG_PATH, ".l1_config.l1_contracts.scroll_chain"); vm.writeJson(vm.toString(L1_GAS_TOKEN_ADDR), CHAIN_MONITOR_CONFIG_PATH, ".l1_config.l1_contracts.gas_token"); + vm.writeJson(vm.toString(L2_DEPLOYER_INITIAL_BALANCE), CHAIN_MONITOR_CONFIG_PATH, ".l1_config.start_messenger_balance"); // L2 vm.writeJson(L2_RPC_ENDPOINT, CHAIN_MONITOR_CONFIG_PATH, ".l2_config.l2_url");