diff --git a/src/template/DeployFeesDepositor.sol b/src/template/DeployFeesDepositor.sol index bc6fc94ff3..1071476fce 100644 --- a/src/template/DeployFeesDepositor.sol +++ b/src/template/DeployFeesDepositor.sol @@ -87,7 +87,6 @@ contract DeployFeesDepositor is SimpleTaskBase { gasLimit = uint32(_gasLimitRaw); proxyAdminOwner = simpleAddrRegistry.get("ProxyAdminOwner"); - require(proxyAdminOwner != address(0), "proxyAdminOwner must be set"); _proxyInitCode = bytes.concat(type(Proxy).creationCode, abi.encode(proxyAdminOwner)); diff --git a/src/template/LateOptInRevenueShare.sol b/src/template/LateOptInRevenueShare.sol index 80c6a24798..8d5c9e3ce6 100644 --- a/src/template/LateOptInRevenueShare.sol +++ b/src/template/LateOptInRevenueShare.sol @@ -130,7 +130,6 @@ contract LateOptInRevenueShare is SimpleTaskBase { string memory _toml = vm.readFile(_taskConfigFilePath); portal = simpleAddrRegistry.get("OptimismPortal"); - require(portal != address(0), "OptimismPortal must be set in the addresses block"); useOwnCalculator = _toml.readBool(".useOwnCalculator"); diff --git a/test/template/deploy-fees-depositor/DeployFeesDepositor.t.sol b/test/template/deploy-fees-depositor/DeployFeesDepositor.t.sol new file mode 100644 index 0000000000..5ce7dc0eb7 --- /dev/null +++ b/test/template/deploy-fees-depositor/DeployFeesDepositor.t.sol @@ -0,0 +1,57 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.15; + +import {Test} from "forge-std/Test.sol"; +import {DeployFeesDepositor} from "src/template/DeployFeesDepositor.sol"; + +/// @notice Test contract for the DeployFeesDepositor that expect reverts on misconfiguration of required fields. +contract DeployFeesDepositorRequiredFieldsTest is Test { + DeployFeesDepositor public template; + + function setUp() public { + vm.createSelectFork("mainnet", 23197819); + template = new DeployFeesDepositor(); + } + + /// @notice Tests that the template reverts when the salt is an empty string. + function test_deployFeesDepositor_salt_empty_string_reverts() public { + string memory configPath = "test/template/deploy-fees-depositor/config/salt-empty-string-config.toml"; + vm.expectRevert("salt must be set"); + template.simulate(configPath); + } + + /// @notice Tests that the template reverts when the l2Recipient is a zero address. + function test_deployFeesDepositor_l2Recipient_zero_address_reverts() public { + string memory configPath = "test/template/deploy-fees-depositor/config/l2Recipient-zero-address-config.toml"; + vm.expectRevert("l2Recipient must be set"); + template.simulate(configPath); + } + + /// @notice Tests that the template reverts when the portal is a zero address. + function test_deployFeesDepositor_portal_zero_address_reverts() public { + string memory configPath = "test/template/deploy-fees-depositor/config/portal-zero-address-config.toml"; + vm.expectRevert("portal must be set"); + template.simulate(configPath); + } + + /// @notice Tests that the template reverts when the gasLimit is zero. + function test_deployFeesDepositor_gasLimit_zero_reverts() public { + string memory configPath = "test/template/deploy-fees-depositor/config/gasLimit-zero-config.toml"; + vm.expectRevert("gasLimit must be set"); + template.simulate(configPath); + } + + /// @notice Tests that the template reverts when the gasLimit is too high. + function test_deployFeesDepositor_gasLimit_too_high_reverts() public { + string memory configPath = "test/template/deploy-fees-depositor/config/gasLimit-too-high-config.toml"; + vm.expectRevert("gasLimit must be less than uint32.max"); + template.simulate(configPath); + } + + /// @notice Tests that the template reverts when the proxyAdminOwner is a zero address. + function test_deployFeesDepositor_proxyAdminOwner_zero_address_reverts() public { + string memory configPath = "test/template/deploy-fees-depositor/config/proxyAdminOwner-zero-address-config.toml"; + vm.expectRevert("SimpleAddressRegistry: zero address for ProxyAdminOwner"); + template.simulate(configPath); + } +} diff --git a/test/template/deploy-fees-depositor/config/gasLimit-too-high-config.toml b/test/template/deploy-fees-depositor/config/gasLimit-too-high-config.toml new file mode 100644 index 0000000000..a7a0148a1c --- /dev/null +++ b/test/template/deploy-fees-depositor/config/gasLimit-too-high-config.toml @@ -0,0 +1,11 @@ +l2chains = [] +templateName = "DeployFeesDepositor" + +salt = "test-salt" +minDepositAmount = 1000000000000000000 +gasLimit = 4294967296 +portal = "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed" +l2Recipient = "0xdeadbeef1234567890abcdef1234567890abcdef" + +[addresses] +ProxyAdminOwner = "0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A" diff --git a/test/template/deploy-fees-depositor/config/gasLimit-zero-config.toml b/test/template/deploy-fees-depositor/config/gasLimit-zero-config.toml new file mode 100644 index 0000000000..3be6803e3a --- /dev/null +++ b/test/template/deploy-fees-depositor/config/gasLimit-zero-config.toml @@ -0,0 +1,13 @@ +l2chains = [] +templateName = "DeployFeesDepositor" + +salt = "test-salt" +gasLimit = 0 +minDepositAmount = 1000000000000000000 +l2Recipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +portal = "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed" + +[addresses] +ProxyAdminOwner = "0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A" + + diff --git a/test/template/deploy-fees-depositor/config/l2Recipient-zero-address-config.toml b/test/template/deploy-fees-depositor/config/l2Recipient-zero-address-config.toml new file mode 100644 index 0000000000..951869da8a --- /dev/null +++ b/test/template/deploy-fees-depositor/config/l2Recipient-zero-address-config.toml @@ -0,0 +1,11 @@ +l2chains = [] +templateName = "DeployFeesDepositor" + +minDepositAmount = 1000000000000000000 +portal = "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed" +l2Recipient = "0x0000000000000000000000000000000000000000" +salt = "test-salt" +gasLimit = 1000000 + +[addresses] +ProxyAdminOwner = "0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A" \ No newline at end of file diff --git a/test/template/deploy-fees-depositor/config/portal-zero-address-config.toml b/test/template/deploy-fees-depositor/config/portal-zero-address-config.toml new file mode 100644 index 0000000000..c718c485eb --- /dev/null +++ b/test/template/deploy-fees-depositor/config/portal-zero-address-config.toml @@ -0,0 +1,11 @@ +l2chains = [] +templateName = "DeployFeesDepositor" + +minDepositAmount = 1000000000000000000 +portal = "0x0000000000000000000000000000000000000000" +l2Recipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +salt = "test-salt" +gasLimit = 1000000 + +[addresses] +ProxyAdminOwner = "0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A" \ No newline at end of file diff --git a/test/template/deploy-fees-depositor/config/proxyAdminOwner-zero-address-config.toml b/test/template/deploy-fees-depositor/config/proxyAdminOwner-zero-address-config.toml new file mode 100644 index 0000000000..0d32ad8b58 --- /dev/null +++ b/test/template/deploy-fees-depositor/config/proxyAdminOwner-zero-address-config.toml @@ -0,0 +1,12 @@ +l2chains = [] +templateName = "DeployFeesDepositor" + +portal = "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed" +l2Recipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +salt = "test-salt" +gasLimit = 1000000 + +[addresses] +ProxyAdminOwner = "0x0000000000000000000000000000000000000000" + + diff --git a/test/template/deploy-fees-depositor/config/salt-empty-string-config.toml b/test/template/deploy-fees-depositor/config/salt-empty-string-config.toml new file mode 100644 index 0000000000..96d33f9ef9 --- /dev/null +++ b/test/template/deploy-fees-depositor/config/salt-empty-string-config.toml @@ -0,0 +1,10 @@ +l2chains = [] +templateName = "DeployFeesDepositor" + +portal = "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed" +l2Recipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +salt = "" +gasLimit = 1000000 + +[addresses] +ProxyAdminOwner = "0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A" \ No newline at end of file diff --git a/test/template/LateOptInRevenueShare.t.sol b/test/template/late-opt-in-rev-share/LateOptInRevenueShare.t.sol similarity index 76% rename from test/template/LateOptInRevenueShare.t.sol rename to test/template/late-opt-in-rev-share/LateOptInRevenueShare.t.sol index 039d509332..cd220206f3 100644 --- a/test/template/LateOptInRevenueShare.t.sol +++ b/test/template/late-opt-in-rev-share/LateOptInRevenueShare.t.sol @@ -322,3 +322,79 @@ contract LateOptInRevenueShareTest is Test { } } } + +/// @notice Test contract for the LateOptInRevenueShare that expect reverts on misconfiguration of required fields. +contract LateOptInRevenueShareRequiredFieldsTest is Test { + LateOptInRevenueShare public template; + + function setUp() public { + vm.createSelectFork("mainnet", 23197819); + template = new LateOptInRevenueShare(); + } + + /// @notice Tests that the template reverts when the gasLimit is too low. + function test_lateOptInRevenueShare_too_low_gasLimit_reverts() public { + string memory configPath = "test/template/late-opt-in-rev-share/config/zero-gas-limit-config.toml"; + vm.expectRevert("gasLimit must be set"); + template.simulate(configPath); + } + + /// @notice Tests that the template reverts when the gasLimit is too high. + function test_lateOptInRevenueShare_too_high_gasLimit_reverts() public { + string memory configPath = "test/template/late-opt-in-rev-share/config/too-high-gas-limit-config.toml"; + vm.expectRevert("gasLimit must be less than uint64.max"); + template.simulate(configPath); + } + + /// @notice Tests that the template reverts when using own calculator and the calculator address is zero. + function test_lateOptInRevenueShare_calculator_zero_address_reverts() public { + string memory configPath = "test/template/late-opt-in-rev-share/config/calculator-zero-address-config.toml"; + vm.expectRevert("calculator address must be set in config if opting to use own calculator"); + template.simulate(configPath); + } + + /// @notice Tests that the template reverts when using default calculator and the salt seed is an empty string. + function test_lateOptInRevenueShare_saltSeed_empty_string_reverts() public { + string memory configPath = "test/template/late-opt-in-rev-share/config/salt-seed-empty-string-config.toml"; + vm.expectRevert("saltSeed must be set in config"); + template.simulate(configPath); + } + + /// @notice Tests that the template reverts when using default calculator and the l1 withdrawer recipient is a zero address. + function test_lateOptInRevenueShare_l1WithdrawerRecipient_zero_address_reverts() public { + string memory configPath = + "test/template/late-opt-in-rev-share/config/l1WithdrawerRecipient-zero-address-config.toml"; + vm.expectRevert("l1WithdrawerRecipient must be set in config"); + template.simulate(configPath); + } + + /// @notice Tests that the template reverts when using default calculator and the l1 withdrawer gas limit is zero. + function test_lateOptInRevenueShare_l1WithdrawerGasLimit_zero_reverts() public { + string memory configPath = "test/template/late-opt-in-rev-share/config/l1WithdrawerGasLimit-zero-config.toml"; + vm.expectRevert("l1WithdrawerGasLimit must be greater than 0"); + template.simulate(configPath); + } + + /// @notice Tests that the template reverts when using default calculator and the l1 withdrawer gas limit is too high. + function test_lateOptInRevenueShare_l1WithdrawerGasLimit_too_high_reverts() public { + string memory configPath = + "test/template/late-opt-in-rev-share/config/l1WithdrawerGasLimit-too-high-config.toml"; + vm.expectRevert("l1WithdrawerGasLimit must be less than uint32.max"); + template.simulate(configPath); + } + + /// @notice Tests that the template reverts when using default calculator and the chain fees recipient is a zero address. + function test_lateOptInRevenueShare_scRevShareCalcChainFeesRecipient_zero_address_reverts() public { + string memory configPath = + "test/template/late-opt-in-rev-share/config/scRevShareCalcChainFeesRecipient-zero-address-config.toml"; + vm.expectRevert("scRevShareCalcChainFeesRecipient must be set in config"); + template.simulate(configPath); + } + + /// @notice Tests that the template reverts when the portal is a zero address. + function test_lateOptInRevenueShare_portal_zero_address_reverts() public { + string memory configPath = "test/template/late-opt-in-rev-share/config/portal-zero-address-config.toml"; + vm.expectRevert("SimpleAddressRegistry: zero address for OptimismPortal"); + template.simulate(configPath); + } +} diff --git a/test/template/late-opt-in-rev-share/config/calculator-zero-address-config.toml b/test/template/late-opt-in-rev-share/config/calculator-zero-address-config.toml new file mode 100644 index 0000000000..27d0ad2874 --- /dev/null +++ b/test/template/late-opt-in-rev-share/config/calculator-zero-address-config.toml @@ -0,0 +1,11 @@ +templateName = "LateOptInRevenueShare" + +# Revenue Share Configuration +# When using custom calculator, only the calculator address and the gas limit are required +useOwnCalculator = true +gasLimit = 300000 +calculator = "0x0000000000000000000000000000000000000000" + +[addresses] +ProxyAdminOwner = "0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A" +OptimismPortal = "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed" \ No newline at end of file diff --git a/test/template/late-opt-in-rev-share/config/l1WithdrawerGasLimit-too-high-config.toml b/test/template/late-opt-in-rev-share/config/l1WithdrawerGasLimit-too-high-config.toml new file mode 100644 index 0000000000..ec23eafc43 --- /dev/null +++ b/test/template/late-opt-in-rev-share/config/l1WithdrawerGasLimit-too-high-config.toml @@ -0,0 +1,15 @@ +templateName = "LateOptInRevenueShare" + +# Revenue Share Configuration +# When using custom calculator, only the calculator address and the gas limit are required +useOwnCalculator = false +saltSeed = "DeploymentSalt" +l1WithdrawerMinWithdrawalAmount = 1000000000000000000 +l1WithdrawerRecipient = "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef" +l1WithdrawerGasLimit = 4294967296 # 2^32 +scRevShareCalcChainFeesRecipient = "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef" +gasLimit = 300000 + +[addresses] +ProxyAdminOwner = "0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A" +OptimismPortal = "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed" \ No newline at end of file diff --git a/test/template/late-opt-in-rev-share/config/l1WithdrawerGasLimit-zero-config.toml b/test/template/late-opt-in-rev-share/config/l1WithdrawerGasLimit-zero-config.toml new file mode 100644 index 0000000000..c27ced3c97 --- /dev/null +++ b/test/template/late-opt-in-rev-share/config/l1WithdrawerGasLimit-zero-config.toml @@ -0,0 +1,15 @@ +templateName = "LateOptInRevenueShare" + +# Revenue Share Configuration +# When using custom calculator, only the calculator address and the gas limit are required +useOwnCalculator = false +saltSeed = "DeploymentSalt" +l1WithdrawerMinWithdrawalAmount = 1000000000000000000 +l1WithdrawerRecipient = "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef" +l1WithdrawerGasLimit = 0 +scRevShareCalcChainFeesRecipient = "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef" +gasLimit = 300000 + +[addresses] +ProxyAdminOwner = "0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A" +OptimismPortal = "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed" \ No newline at end of file diff --git a/test/template/late-opt-in-rev-share/config/l1WithdrawerRecipient-zero-address-config.toml b/test/template/late-opt-in-rev-share/config/l1WithdrawerRecipient-zero-address-config.toml new file mode 100644 index 0000000000..e615cbe54f --- /dev/null +++ b/test/template/late-opt-in-rev-share/config/l1WithdrawerRecipient-zero-address-config.toml @@ -0,0 +1,15 @@ +templateName = "LateOptInRevenueShare" + +# Revenue Share Configuration +# When using custom calculator, only the calculator address and the gas limit are required +useOwnCalculator = false +saltSeed = "DeploymentSalt" +l1WithdrawerMinWithdrawalAmount = 1000000000000000000 +l1WithdrawerRecipient = "0x0000000000000000000000000000000000000000" +l1WithdrawerGasLimit = 300000 +scRevShareCalcChainFeesRecipient = "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef" +gasLimit = 300000 + +[addresses] +ProxyAdminOwner = "0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A" +OptimismPortal = "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed" \ No newline at end of file diff --git a/test/template/late-opt-in-rev-share/config/portal-zero-address-config.toml b/test/template/late-opt-in-rev-share/config/portal-zero-address-config.toml new file mode 100644 index 0000000000..72bab7cedc --- /dev/null +++ b/test/template/late-opt-in-rev-share/config/portal-zero-address-config.toml @@ -0,0 +1,11 @@ +templateName = "LateOptInRevenueShare" + +# Revenue Share Configuration +useOwnCalculator = true +gasLimit = 300000 +calculator = "0x8B0c0c8B8B0c0C8B8b0C0C8b8B0C0c8b8b0C0c8b" + +[addresses] +ProxyAdminOwner = "0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A" +OptimismPortal = "0x0000000000000000000000000000000000000000" + diff --git a/test/template/late-opt-in-rev-share/config/salt-seed-empty-string-config.toml b/test/template/late-opt-in-rev-share/config/salt-seed-empty-string-config.toml new file mode 100644 index 0000000000..de704e476d --- /dev/null +++ b/test/template/late-opt-in-rev-share/config/salt-seed-empty-string-config.toml @@ -0,0 +1,11 @@ +templateName = "LateOptInRevenueShare" + +# Revenue Share Configuration +# When using custom calculator, only the calculator address and the gas limit are required +useOwnCalculator = false +saltSeed = "" +gasLimit = 300000 + +[addresses] +ProxyAdminOwner = "0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A" +OptimismPortal = "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed" \ No newline at end of file diff --git a/test/template/late-opt-in-rev-share/config/scRevShareCalcChainFeesRecipient-zero-address-config.toml b/test/template/late-opt-in-rev-share/config/scRevShareCalcChainFeesRecipient-zero-address-config.toml new file mode 100644 index 0000000000..54b991bc2e --- /dev/null +++ b/test/template/late-opt-in-rev-share/config/scRevShareCalcChainFeesRecipient-zero-address-config.toml @@ -0,0 +1,15 @@ +templateName = "LateOptInRevenueShare" + +# Revenue Share Configuration +# When using custom calculator, only the calculator address and the gas limit are required +useOwnCalculator = false +saltSeed = "DeploymentSalt" +l1WithdrawerMinWithdrawalAmount = 1000000000000000000 +l1WithdrawerRecipient = "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef" +l1WithdrawerGasLimit = 300000 +scRevShareCalcChainFeesRecipient = "0x0000000000000000000000000000000000000000" +gasLimit = 300000 + +[addresses] +ProxyAdminOwner = "0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A" +OptimismPortal = "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed" \ No newline at end of file diff --git a/test/template/late-opt-in-rev-share/config/too-high-gas-limit-config.toml b/test/template/late-opt-in-rev-share/config/too-high-gas-limit-config.toml new file mode 100644 index 0000000000..e4bb687b5c --- /dev/null +++ b/test/template/late-opt-in-rev-share/config/too-high-gas-limit-config.toml @@ -0,0 +1,15 @@ +templateName = "LateOptInRevenueShare" + +# Revenue Share Configuration +# When using custom calculator, only the calculator address and the gas limit are required +useOwnCalculator = false +saltSeed = "DeploymentSalt" +l1WithdrawerMinWithdrawalAmount = 1000000000000000000 +l1WithdrawerRecipient = "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef" +l1WithdrawerGasLimit = 300000 +scRevShareCalcChainFeesRecipient = "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef" +gasLimit = 1.9e64 # Greater than uint64.max + +[addresses] +ProxyAdminOwner = "0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A" +OptimismPortal = "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed" \ No newline at end of file diff --git a/test/template/late-opt-in-rev-share/config/zero-gas-limit-config.toml b/test/template/late-opt-in-rev-share/config/zero-gas-limit-config.toml new file mode 100644 index 0000000000..16a49d0f78 --- /dev/null +++ b/test/template/late-opt-in-rev-share/config/zero-gas-limit-config.toml @@ -0,0 +1,15 @@ +templateName = "LateOptInRevenueShare" + +# Revenue Share Configuration +# When using custom calculator, only the calculator address and the gas limit are required +useOwnCalculator = false +saltSeed = "DeploymentSalt" +l1WithdrawerMinWithdrawalAmount = 1000000000000000000 +l1WithdrawerRecipient = "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef" +l1WithdrawerGasLimit = 300000 +scRevShareCalcChainFeesRecipient = "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef" +gasLimit = 0 # gasLimit must be set + +[addresses] +ProxyAdminOwner = "0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A" +OptimismPortal = "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed" \ No newline at end of file diff --git a/test/template/revenue-share-upgrade-path/RevenueShareUpgradePath.t.sol b/test/template/revenue-share-upgrade-path/RevenueShareUpgradePath.t.sol new file mode 100644 index 0000000000..5292579989 --- /dev/null +++ b/test/template/revenue-share-upgrade-path/RevenueShareUpgradePath.t.sol @@ -0,0 +1,140 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.15; + +import {Test} from "forge-std/Test.sol"; +import {RevenueShareV100UpgradePath} from "src/template/RevenueShareUpgradePath.sol"; + +/// @notice Test contract for the RevenueShareUpgradePath that expect reverts on misconfiguration of required fields. +contract RevenueShareUpgradePathRequiredFieldsTest is Test { + RevenueShareV100UpgradePath public template; + + function setUp() public { + vm.createSelectFork("mainnet", 23197819); + template = new RevenueShareV100UpgradePath(); + } + + /// @notice Tests that the template reverts when the portal is a zero address. + function test_revenueShareUpgradePath_portal_zero_address_reverts() public { + string memory configPath = "test/template/revenue-share-upgrade-path/config/portal-zero-address-config.toml"; + vm.expectRevert("portal must be set in config"); + template.simulate(configPath); + } + + /// @notice Tests that the template reverts when the salt seed is an empty string. + function test_revenueShareUpgradePath_saltSeed_empty_string_reverts() public { + string memory configPath = "test/template/revenue-share-upgrade-path/config/saltSeed-empty-string-config.toml"; + vm.expectRevert("saltSeed must be set in the config"); + template.simulate(configPath); + } + + /// @notice Tests that the template reverts when the deployment gas limit is zero. + function test_revenueShareUpgradePath_deploymentGasLimit_zero_reverts() public { + string memory configPath = "test/template/revenue-share-upgrade-path/config/deploymentGasLimit-zero-config.toml"; + vm.expectRevert("deploymentGasLimit must be set in config"); + template.simulate(configPath); + } + + /// @notice Tests that the template reverts when the deployment gas limit is too high. + function test_revenueShareUpgradePath_deploymentGasLimit_too_high_reverts() public { + string memory configPath = + "test/template/revenue-share-upgrade-path/config/deploymentGasLimit-too-high-config.toml"; + vm.expectRevert("deploymentGasLimit must be less than uint64.max"); + template.simulate(configPath); + } + + /// @notice Tests that the template reverts when the base fee vault recipient is a zero address. + function test_revenueShareUpgradePath_baseFeeVaultRecipient_zero_address_reverts() public { + string memory configPath = + "test/template/revenue-share-upgrade-path/config/baseFeeVaultRecipient-zero-address-config.toml"; + vm.expectRevert("baseFeeVaultRecipient must be set in config"); + template.simulate(configPath); + } + + /// @notice Tests that the template reverts when the l1 fee vault recipient is a zero address. + function test_revenueShareUpgradePath_l1FeeVaultRecipient_zero_address_reverts() public { + string memory configPath = + "test/template/revenue-share-upgrade-path/config/l1FeeVaultRecipient-zero-address-config.toml"; + vm.expectRevert("l1FeeVaultRecipient must be set in config"); + template.simulate(configPath); + } + + /// @notice Tests that the template reverts when the sequencer fee vault recipient is a zero address. + function test_revenueShareUpgradePath_sequencerFeeVaultRecipient_zero_address_reverts() public { + string memory configPath = + "test/template/revenue-share-upgrade-path/config/sequencerFeeVaultRecipient-zero-address-config.toml"; + vm.expectRevert("sequencerFeeVaultRecipient must be set in config"); + template.simulate(configPath); + } + + /// @notice Tests that the template reverts when the operator fee vault recipient is a zero address. + function test_revenueShareUpgradePath_operatorFeeVaultRecipient_zero_address_reverts() public { + string memory configPath = + "test/template/revenue-share-upgrade-path/config/operatorFeeVaultRecipient-zero-address-config.toml"; + vm.expectRevert("operatorFeeVaultRecipient must be set in config"); + template.simulate(configPath); + } + + /// @notice Tests that the template reverts when the base fee vault withdrawal network is invalid. + function test_revenueShareUpgradePath_baseFeeVaultWithdrawalNetwork_invalid_reverts() public { + string memory configPath = + "test/template/revenue-share-upgrade-path/config/baseFeeVaultWithdrawalNetwork-invalid-config.toml"; + vm.expectRevert("baseFeeVaultWithdrawalNetwork must be set to either 0 (L1) or 1 (L2) in config"); + template.simulate(configPath); + } + + /// @notice Tests that the template reverts when the l1 fee vault withdrawal network is invalid. + function test_revenueShareUpgradePath_l1FeeVaultWithdrawalNetwork_invalid_reverts() public { + string memory configPath = + "test/template/revenue-share-upgrade-path/config/l1FeeVaultWithdrawalNetwork-invalid-config.toml"; + vm.expectRevert("l1FeeVaultWithdrawalNetwork must be set to either 0 (L1) or 1 (L2) in config"); + template.simulate(configPath); + } + + /// @notice Tests that the template reverts when the sequencer fee vault withdrawal network is invalid. + function test_revenueShareUpgradePath_sequencerFeeVaultWithdrawalNetwork_invalid_reverts() public { + string memory configPath = + "test/template/revenue-share-upgrade-path/config/sequencerFeeVaultWithdrawalNetwork-invalid-config.toml"; + vm.expectRevert("sequencerFeeVaultWithdrawalNetwork must be set to either 0 (L1) or 1 (L2) in config"); + template.simulate(configPath); + } + + /// @notice Tests that the template reverts when the operator fee vault withdrawal network is invalid. + function test_revenueShareUpgradePath_operatorFeeVaultWithdrawalNetwork_invalid_reverts() public { + string memory configPath = + "test/template/revenue-share-upgrade-path/config/operatorFeeVaultWithdrawalNetwork-invalid-config.toml"; + vm.expectRevert("operatorFeeVaultWithdrawalNetwork must be set to either 0 (L1) or 1 (L2) in config"); + template.simulate(configPath); + } + + /// @notice Tests that the template reverts when the l1 withdrawer recipient is a zero address. + function test_revenueShareUpgradePath_l1WithdrawerRecipient_zero_address_reverts() public { + string memory configPath = + "test/template/revenue-share-upgrade-path/config/l1WithdrawerRecipient-zero-address-config.toml"; + vm.expectRevert("l1WithdrawerRecipient must be set in config"); + template.simulate(configPath); + } + + /// @notice Tests that the template reverts when the l1 withdrawer gas limit is zero. + function test_revenueShareUpgradePath_l1WithdrawerGasLimit_zero_reverts() public { + string memory configPath = + "test/template/revenue-share-upgrade-path/config/l1WithdrawerGasLimit-zero-config.toml"; + vm.expectRevert("l1WithdrawerGasLimit must be greater than 0"); + template.simulate(configPath); + } + + /// @notice Tests that the template reverts when the l1 withdrawer gas limit is too high. + function test_revenueShareUpgradePath_l1WithdrawerGasLimit_too_high_reverts() public { + string memory configPath = + "test/template/revenue-share-upgrade-path/config/l1WithdrawerGasLimit-too-high-config.toml"; + vm.expectRevert("l1WithdrawerGasLimit must be less than uint32.max"); + template.simulate(configPath); + } + + /// @notice Tests that the template reverts when the chain fees recipient is a zero address. + function test_revenueShareUpgradePath_scRevShareCalcChainFeesRecipient_zero_address_reverts() public { + string memory configPath = + "test/template/revenue-share-upgrade-path/config/scRevShareCalcChainFeesRecipient-zero-address-config.toml"; + vm.expectRevert("scRevShareCalcChainFeesRecipient must be set in config"); + template.simulate(configPath); + } +} diff --git a/test/template/revenue-share-upgrade-path/config/baseFeeVaultRecipient-zero-address-config.toml b/test/template/revenue-share-upgrade-path/config/baseFeeVaultRecipient-zero-address-config.toml new file mode 100644 index 0000000000..7a9647aaf6 --- /dev/null +++ b/test/template/revenue-share-upgrade-path/config/baseFeeVaultRecipient-zero-address-config.toml @@ -0,0 +1,26 @@ +l2chains = [] +templateName = "RevenueShareUpgradePath" + +portal = "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed" +saltSeed = "test-salt" +deploymentGasLimit = 1000000 +optInRevenueShare = false + +baseFeeVaultWithdrawalNetwork = 0 +baseFeeVaultRecipient = "0x0000000000000000000000000000000000000000" +baseFeeVaultMinWithdrawalAmount = 1000000000000000000 + +l1FeeVaultWithdrawalNetwork = 0 +l1FeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +l1FeeVaultMinWithdrawalAmount = 1000000000000000000 + +sequencerFeeVaultWithdrawalNetwork = 0 +sequencerFeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +sequencerFeeVaultMinWithdrawalAmount = 1000000000000000000 + +operatorFeeVaultWithdrawalNetwork = 0 +operatorFeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +operatorFeeVaultMinWithdrawalAmount = 1000000000000000000 + +[addresses] +ProxyAdminOwner = "0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A" diff --git a/test/template/revenue-share-upgrade-path/config/baseFeeVaultWithdrawalNetwork-invalid-config.toml b/test/template/revenue-share-upgrade-path/config/baseFeeVaultWithdrawalNetwork-invalid-config.toml new file mode 100644 index 0000000000..f76de5ef2c --- /dev/null +++ b/test/template/revenue-share-upgrade-path/config/baseFeeVaultWithdrawalNetwork-invalid-config.toml @@ -0,0 +1,26 @@ +l2chains = [] +templateName = "RevenueShareUpgradePath" + +portal = "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed" +saltSeed = "test-salt" +deploymentGasLimit = 1000000 +optInRevenueShare = false + +baseFeeVaultWithdrawalNetwork = 2 +baseFeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +baseFeeVaultMinWithdrawalAmount = 1000000000000000000 + +l1FeeVaultWithdrawalNetwork = 0 +l1FeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +l1FeeVaultMinWithdrawalAmount = 1000000000000000000 + +sequencerFeeVaultWithdrawalNetwork = 0 +sequencerFeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +sequencerFeeVaultMinWithdrawalAmount = 1000000000000000000 + +operatorFeeVaultWithdrawalNetwork = 0 +operatorFeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +operatorFeeVaultMinWithdrawalAmount = 1000000000000000000 + +[addresses] +ProxyAdminOwner = "0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A" diff --git a/test/template/revenue-share-upgrade-path/config/deploymentGasLimit-too-high-config.toml b/test/template/revenue-share-upgrade-path/config/deploymentGasLimit-too-high-config.toml new file mode 100644 index 0000000000..664ee7eb47 --- /dev/null +++ b/test/template/revenue-share-upgrade-path/config/deploymentGasLimit-too-high-config.toml @@ -0,0 +1,26 @@ +l2chains = [] +templateName = "RevenueShareUpgradePath" + +portal = "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed" +saltSeed = "test-salt" +deploymentGasLimit = 1.9e64 # Greater than uint64.max +optInRevenueShare = false + +baseFeeVaultWithdrawalNetwork = 0 +baseFeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +baseFeeVaultMinWithdrawalAmount = 1000000000000000000 + +l1FeeVaultWithdrawalNetwork = 0 +l1FeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +l1FeeVaultMinWithdrawalAmount = 1000000000000000000 + +sequencerFeeVaultWithdrawalNetwork = 0 +sequencerFeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +sequencerFeeVaultMinWithdrawalAmount = 1000000000000000000 + +operatorFeeVaultWithdrawalNetwork = 0 +operatorFeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +operatorFeeVaultMinWithdrawalAmount = 1000000000000000000 + +[addresses] +ProxyAdminOwner = "0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A" \ No newline at end of file diff --git a/test/template/revenue-share-upgrade-path/config/deploymentGasLimit-zero-config.toml b/test/template/revenue-share-upgrade-path/config/deploymentGasLimit-zero-config.toml new file mode 100644 index 0000000000..7b213270fd --- /dev/null +++ b/test/template/revenue-share-upgrade-path/config/deploymentGasLimit-zero-config.toml @@ -0,0 +1,26 @@ +l2chains = [] +templateName = "RevenueShareUpgradePath" + +portal = "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed" +saltSeed = "test-salt" +deploymentGasLimit = 0 +optInRevenueShare = false + +baseFeeVaultWithdrawalNetwork = 0 +baseFeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +baseFeeVaultMinWithdrawalAmount = 1000000000000000000 + +l1FeeVaultWithdrawalNetwork = 0 +l1FeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +l1FeeVaultMinWithdrawalAmount = 1000000000000000000 + +sequencerFeeVaultWithdrawalNetwork = 0 +sequencerFeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +sequencerFeeVaultMinWithdrawalAmount = 1000000000000000000 + +operatorFeeVaultWithdrawalNetwork = 0 +operatorFeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +operatorFeeVaultMinWithdrawalAmount = 1000000000000000000 + +[addresses] +ProxyAdminOwner = "0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A" \ No newline at end of file diff --git a/test/template/revenue-share-upgrade-path/config/l1FeeVaultRecipient-zero-address-config.toml b/test/template/revenue-share-upgrade-path/config/l1FeeVaultRecipient-zero-address-config.toml new file mode 100644 index 0000000000..55d642d026 --- /dev/null +++ b/test/template/revenue-share-upgrade-path/config/l1FeeVaultRecipient-zero-address-config.toml @@ -0,0 +1,26 @@ +l2chains = [] +templateName = "RevenueShareUpgradePath" + +portal = "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed" +saltSeed = "test-salt" +deploymentGasLimit = 1000000 +optInRevenueShare = false + +baseFeeVaultWithdrawalNetwork = 0 +baseFeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +baseFeeVaultMinWithdrawalAmount = 1000000000000000000 + +l1FeeVaultWithdrawalNetwork = 0 +l1FeeVaultRecipient = "0x0000000000000000000000000000000000000000" +l1FeeVaultMinWithdrawalAmount = 1000000000000000000 + +sequencerFeeVaultWithdrawalNetwork = 0 +sequencerFeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +sequencerFeeVaultMinWithdrawalAmount = 1000000000000000000 + +operatorFeeVaultWithdrawalNetwork = 0 +operatorFeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +operatorFeeVaultMinWithdrawalAmount = 1000000000000000000 + +[addresses] +ProxyAdminOwner = "0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A" \ No newline at end of file diff --git a/test/template/revenue-share-upgrade-path/config/l1FeeVaultWithdrawalNetwork-invalid-config.toml b/test/template/revenue-share-upgrade-path/config/l1FeeVaultWithdrawalNetwork-invalid-config.toml new file mode 100644 index 0000000000..b91af9b446 --- /dev/null +++ b/test/template/revenue-share-upgrade-path/config/l1FeeVaultWithdrawalNetwork-invalid-config.toml @@ -0,0 +1,26 @@ +l2chains = [] +templateName = "RevenueShareUpgradePath" + +portal = "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed" +saltSeed = "test-salt" +deploymentGasLimit = 1000000 +optInRevenueShare = false + +baseFeeVaultWithdrawalNetwork = 0 +baseFeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +baseFeeVaultMinWithdrawalAmount = 1000000000000000000 + +l1FeeVaultWithdrawalNetwork = 2 +l1FeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +l1FeeVaultMinWithdrawalAmount = 1000000000000000000 + +sequencerFeeVaultWithdrawalNetwork = 0 +sequencerFeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +sequencerFeeVaultMinWithdrawalAmount = 1000000000000000000 + +operatorFeeVaultWithdrawalNetwork = 0 +operatorFeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +operatorFeeVaultMinWithdrawalAmount = 1000000000000000000 + +[addresses] +ProxyAdminOwner = "0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A" \ No newline at end of file diff --git a/test/template/revenue-share-upgrade-path/config/l1WithdrawerGasLimit-too-high-config.toml b/test/template/revenue-share-upgrade-path/config/l1WithdrawerGasLimit-too-high-config.toml new file mode 100644 index 0000000000..a18af6d963 --- /dev/null +++ b/test/template/revenue-share-upgrade-path/config/l1WithdrawerGasLimit-too-high-config.toml @@ -0,0 +1,16 @@ +l2chains = [] +templateName = "RevenueShareUpgradePath" + +portal = "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed" +saltSeed = "test-salt" +deploymentGasLimit = 1000000 +optInRevenueShare = true + +l1WithdrawerMinWithdrawalAmount = 1000000000000000000 +l1WithdrawerRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +l1WithdrawerGasLimit = 4294967296 + +scRevShareCalcChainFeesRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" + +[addresses] +ProxyAdminOwner = "0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A" \ No newline at end of file diff --git a/test/template/revenue-share-upgrade-path/config/l1WithdrawerGasLimit-zero-config.toml b/test/template/revenue-share-upgrade-path/config/l1WithdrawerGasLimit-zero-config.toml new file mode 100644 index 0000000000..70e23a783f --- /dev/null +++ b/test/template/revenue-share-upgrade-path/config/l1WithdrawerGasLimit-zero-config.toml @@ -0,0 +1,16 @@ +l2chains = [] +templateName = "RevenueShareUpgradePath" + +portal = "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed" +saltSeed = "test-salt" +deploymentGasLimit = 1000000 +optInRevenueShare = true + +l1WithdrawerMinWithdrawalAmount = 1000000000000000000 +l1WithdrawerRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +l1WithdrawerGasLimit = 0 + +scRevShareCalcChainFeesRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" + +[addresses] +ProxyAdminOwner = "0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A" \ No newline at end of file diff --git a/test/template/revenue-share-upgrade-path/config/l1WithdrawerRecipient-zero-address-config.toml b/test/template/revenue-share-upgrade-path/config/l1WithdrawerRecipient-zero-address-config.toml new file mode 100644 index 0000000000..f15710f1ef --- /dev/null +++ b/test/template/revenue-share-upgrade-path/config/l1WithdrawerRecipient-zero-address-config.toml @@ -0,0 +1,16 @@ +l2chains = [] +templateName = "RevenueShareUpgradePath" + +portal = "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed" +saltSeed = "test-salt" +deploymentGasLimit = 1000000 +optInRevenueShare = true + +l1WithdrawerMinWithdrawalAmount = 1000000000000000000 +l1WithdrawerRecipient = "0x0000000000000000000000000000000000000000" +l1WithdrawerGasLimit = 1000000 + +scRevShareCalcChainFeesRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" + +[addresses] +ProxyAdminOwner = "0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A" \ No newline at end of file diff --git a/test/template/revenue-share-upgrade-path/config/operatorFeeVaultRecipient-zero-address-config.toml b/test/template/revenue-share-upgrade-path/config/operatorFeeVaultRecipient-zero-address-config.toml new file mode 100644 index 0000000000..2fc2eed196 --- /dev/null +++ b/test/template/revenue-share-upgrade-path/config/operatorFeeVaultRecipient-zero-address-config.toml @@ -0,0 +1,26 @@ +l2chains = [] +templateName = "RevenueShareUpgradePath" + +portal = "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed" +saltSeed = "test-salt" +deploymentGasLimit = 1000000 +optInRevenueShare = false + +baseFeeVaultWithdrawalNetwork = 0 +baseFeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +baseFeeVaultMinWithdrawalAmount = 1000000000000000000 + +l1FeeVaultWithdrawalNetwork = 0 +l1FeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +l1FeeVaultMinWithdrawalAmount = 1000000000000000000 + +sequencerFeeVaultWithdrawalNetwork = 0 +sequencerFeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +sequencerFeeVaultMinWithdrawalAmount = 1000000000000000000 + +operatorFeeVaultWithdrawalNetwork = 0 +operatorFeeVaultRecipient = "0x0000000000000000000000000000000000000000" +operatorFeeVaultMinWithdrawalAmount = 1000000000000000000 + +[addresses] +ProxyAdminOwner = "0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A" \ No newline at end of file diff --git a/test/template/revenue-share-upgrade-path/config/operatorFeeVaultWithdrawalNetwork-invalid-config.toml b/test/template/revenue-share-upgrade-path/config/operatorFeeVaultWithdrawalNetwork-invalid-config.toml new file mode 100644 index 0000000000..444c883cda --- /dev/null +++ b/test/template/revenue-share-upgrade-path/config/operatorFeeVaultWithdrawalNetwork-invalid-config.toml @@ -0,0 +1,26 @@ +l2chains = [] +templateName = "RevenueShareUpgradePath" + +portal = "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed" +saltSeed = "test-salt" +deploymentGasLimit = 1000000 +optInRevenueShare = false + +baseFeeVaultWithdrawalNetwork = 0 +baseFeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +baseFeeVaultMinWithdrawalAmount = 1000000000000000000 + +l1FeeVaultWithdrawalNetwork = 0 +l1FeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +l1FeeVaultMinWithdrawalAmount = 1000000000000000000 + +sequencerFeeVaultWithdrawalNetwork = 0 +sequencerFeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +sequencerFeeVaultMinWithdrawalAmount = 1000000000000000000 + +operatorFeeVaultWithdrawalNetwork = 2 +operatorFeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +operatorFeeVaultMinWithdrawalAmount = 1000000000000000000 + +[addresses] +ProxyAdminOwner = "0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A" \ No newline at end of file diff --git a/test/template/revenue-share-upgrade-path/config/portal-zero-address-config.toml b/test/template/revenue-share-upgrade-path/config/portal-zero-address-config.toml new file mode 100644 index 0000000000..4ec49ecb4f --- /dev/null +++ b/test/template/revenue-share-upgrade-path/config/portal-zero-address-config.toml @@ -0,0 +1,26 @@ +l2chains = [] +templateName = "RevenueShareUpgradePath" + +portal = "0x0000000000000000000000000000000000000000" +saltSeed = "test-salt" +deploymentGasLimit = 1000000 +optInRevenueShare = false + +baseFeeVaultWithdrawalNetwork = 0 +baseFeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +baseFeeVaultMinWithdrawalAmount = 1000000000000000000 + +l1FeeVaultWithdrawalNetwork = 0 +l1FeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +l1FeeVaultMinWithdrawalAmount = 1000000000000000000 + +sequencerFeeVaultWithdrawalNetwork = 0 +sequencerFeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +sequencerFeeVaultMinWithdrawalAmount = 1000000000000000000 + +operatorFeeVaultWithdrawalNetwork = 0 +operatorFeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +operatorFeeVaultMinWithdrawalAmount = 1000000000000000000 + +[addresses] +ProxyAdminOwner = "0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A" diff --git a/test/template/revenue-share-upgrade-path/config/saltSeed-empty-string-config.toml b/test/template/revenue-share-upgrade-path/config/saltSeed-empty-string-config.toml new file mode 100644 index 0000000000..6020db89cc --- /dev/null +++ b/test/template/revenue-share-upgrade-path/config/saltSeed-empty-string-config.toml @@ -0,0 +1,26 @@ +l2chains = [] +templateName = "RevenueShareUpgradePath" + +portal = "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed" +saltSeed = "" +deploymentGasLimit = 1000000 +optInRevenueShare = false + +baseFeeVaultWithdrawalNetwork = 0 +baseFeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +baseFeeVaultMinWithdrawalAmount = 1000000000000000000 + +l1FeeVaultWithdrawalNetwork = 0 +l1FeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +l1FeeVaultMinWithdrawalAmount = 1000000000000000000 + +sequencerFeeVaultWithdrawalNetwork = 0 +sequencerFeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +sequencerFeeVaultMinWithdrawalAmount = 1000000000000000000 + +operatorFeeVaultWithdrawalNetwork = 0 +operatorFeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +operatorFeeVaultMinWithdrawalAmount = 1000000000000000000 + +[addresses] +ProxyAdminOwner = "0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A" \ No newline at end of file diff --git a/test/template/revenue-share-upgrade-path/config/scRevShareCalcChainFeesRecipient-zero-address-config.toml b/test/template/revenue-share-upgrade-path/config/scRevShareCalcChainFeesRecipient-zero-address-config.toml new file mode 100644 index 0000000000..e710344ddd --- /dev/null +++ b/test/template/revenue-share-upgrade-path/config/scRevShareCalcChainFeesRecipient-zero-address-config.toml @@ -0,0 +1,16 @@ +l2chains = [] +templateName = "RevenueShareUpgradePath" + +portal = "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed" +saltSeed = "test-salt" +deploymentGasLimit = 1000000 +optInRevenueShare = true + +l1WithdrawerMinWithdrawalAmount = 1000000000000000000 +l1WithdrawerRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +l1WithdrawerGasLimit = 1000000 + +scRevShareCalcChainFeesRecipient = "0x0000000000000000000000000000000000000000" + +[addresses] +ProxyAdminOwner = "0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A" \ No newline at end of file diff --git a/test/template/revenue-share-upgrade-path/config/sequencerFeeVaultRecipient-zero-address-config.toml b/test/template/revenue-share-upgrade-path/config/sequencerFeeVaultRecipient-zero-address-config.toml new file mode 100644 index 0000000000..7481c92dac --- /dev/null +++ b/test/template/revenue-share-upgrade-path/config/sequencerFeeVaultRecipient-zero-address-config.toml @@ -0,0 +1,26 @@ +l2chains = [] +templateName = "RevenueShareUpgradePath" + +portal = "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed" +saltSeed = "test-salt" +deploymentGasLimit = 1000000 +optInRevenueShare = false + +baseFeeVaultWithdrawalNetwork = 0 +baseFeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +baseFeeVaultMinWithdrawalAmount = 1000000000000000000 + +l1FeeVaultWithdrawalNetwork = 0 +l1FeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +l1FeeVaultMinWithdrawalAmount = 1000000000000000000 + +sequencerFeeVaultWithdrawalNetwork = 0 +sequencerFeeVaultRecipient = "0x0000000000000000000000000000000000000000" +sequencerFeeVaultMinWithdrawalAmount = 1000000000000000000 + +operatorFeeVaultWithdrawalNetwork = 0 +operatorFeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +operatorFeeVaultMinWithdrawalAmount = 1000000000000000000 + +[addresses] +ProxyAdminOwner = "0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A" diff --git a/test/template/revenue-share-upgrade-path/config/sequencerFeeVaultWithdrawalNetwork-invalid-config.toml b/test/template/revenue-share-upgrade-path/config/sequencerFeeVaultWithdrawalNetwork-invalid-config.toml new file mode 100644 index 0000000000..79faf10353 --- /dev/null +++ b/test/template/revenue-share-upgrade-path/config/sequencerFeeVaultWithdrawalNetwork-invalid-config.toml @@ -0,0 +1,26 @@ +l2chains = [] +templateName = "RevenueShareUpgradePath" + +portal = "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed" +saltSeed = "test-salt" +deploymentGasLimit = 1000000 +optInRevenueShare = false + +baseFeeVaultWithdrawalNetwork = 0 +baseFeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +baseFeeVaultMinWithdrawalAmount = 1000000000000000000 + +l1FeeVaultWithdrawalNetwork = 0 +l1FeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +l1FeeVaultMinWithdrawalAmount = 1000000000000000000 + +sequencerFeeVaultWithdrawalNetwork = 2 +sequencerFeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +sequencerFeeVaultMinWithdrawalAmount = 1000000000000000000 + +operatorFeeVaultWithdrawalNetwork = 0 +operatorFeeVaultRecipient = "0xdeadbeef1234567890abcdef1234567890abcdef" +operatorFeeVaultMinWithdrawalAmount = 1000000000000000000 + +[addresses] +ProxyAdminOwner = "0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A" \ No newline at end of file