From 9943d8ce5309428a1cda7acd98569fc0fd35df81 Mon Sep 17 00:00:00 2001 From: Disco <131301107+0xDiscotech@users.noreply.github.com> Date: Fri, 5 Dec 2025 12:36:47 -0300 Subject: [PATCH 1/2] chore: update fees depositor address and min withdrawal amount on genesis (#18490) * fix: remove todo and update fees depositor address on mainnet (#704) * chore: set genesis min withdrawal threshold from ten to two eth (#723) * fix: remove unused errors (#726) --- op-deployer/pkg/deployer/standard/standard.go | 3 +- .../contracts-bedrock/scripts/L2Genesis.s.sol | 4 +-- .../test/L2/L1Withdrawer.t.sol | 4 +-- .../test/L2/RevenueSharingIntegration.t.sol | 35 ++----------------- .../test/scripts/L2Genesis.t.sol | 4 +-- 5 files changed, 10 insertions(+), 40 deletions(-) diff --git a/op-deployer/pkg/deployer/standard/standard.go b/op-deployer/pkg/deployer/standard/standard.go index f1dda252e0d..1a8ca171bfe 100644 --- a/op-deployer/pkg/deployer/standard/standard.go +++ b/op-deployer/pkg/deployer/standard/standard.go @@ -47,8 +47,7 @@ const ( CurrentTag = ContractsV600Tag ) -// TODO(#17505): This address should be updated to the actual address once deployed -var L1FeesDepositor = common.HexToAddress("0x81c01427DFA9A2512b4EBf1462868856BA4aA91a") +var L1FeesDepositor = common.HexToAddress("0xed9B99a703BaD32AC96FDdc313c0652e379251Fd") var DisputeAbsolutePrestate = common.HexToHash("0x038512e02c4c3f7bdaec27d00edf55b7155e0905301e1a88083e4e0a6764d54c") diff --git a/packages/contracts-bedrock/scripts/L2Genesis.s.sol b/packages/contracts-bedrock/scripts/L2Genesis.s.sol index 19d3ef5e122..c189309fddd 100644 --- a/packages/contracts-bedrock/scripts/L2Genesis.s.sol +++ b/packages/contracts-bedrock/scripts/L2Genesis.s.sol @@ -89,8 +89,8 @@ contract L2Genesis is Script { uint256 internal constant PRECOMPILE_COUNT = 256; uint80 internal constant DEV_ACCOUNT_FUND_AMT = 10_000 ether; - uint32 internal constant WITHDRAWAL_MIN_GAS_LIMIT = 1_000_000; - uint256 internal constant MIN_WITHDRAWAL_AMOUNT_THRESHOLD = 10 ether; + uint32 internal constant WITHDRAWAL_MIN_GAS_LIMIT = 800_000; + uint256 internal constant MIN_WITHDRAWAL_AMOUNT_THRESHOLD = 2 ether; /// @notice Default Anvil dev accounts. Only funded if `cfg.fundDevAccounts == true`. /// Also known as "test test test test test test test test test test test junk" mnemonic accounts, diff --git a/packages/contracts-bedrock/test/L2/L1Withdrawer.t.sol b/packages/contracts-bedrock/test/L2/L1Withdrawer.t.sol index 865e7177f23..fa00468a039 100644 --- a/packages/contracts-bedrock/test/L2/L1Withdrawer.t.sol +++ b/packages/contracts-bedrock/test/L2/L1Withdrawer.t.sol @@ -18,8 +18,8 @@ contract L1Withdrawer_TestInit is CommonTest { event WithdrawalGasLimitUpdated(uint32 oldWithdrawalGasLimit, uint32 newWithdrawalGasLimit); // Test state - uint256 minWithdrawalAmount = 10 ether; - uint32 withdrawalGasLimit = 1_000_000; + uint256 minWithdrawalAmount = 2 ether; + uint32 withdrawalGasLimit = 800_000; uint32 internal constant MIN_WITHDRAWAL_GAS_LIMIT = 800_000; diff --git a/packages/contracts-bedrock/test/L2/RevenueSharingIntegration.t.sol b/packages/contracts-bedrock/test/L2/RevenueSharingIntegration.t.sol index 777b0ffa942..c8ec809265a 100644 --- a/packages/contracts-bedrock/test/L2/RevenueSharingIntegration.t.sol +++ b/packages/contracts-bedrock/test/L2/RevenueSharingIntegration.t.sol @@ -4,9 +4,7 @@ pragma solidity 0.8.15; import { CommonTest } from "test/setup/CommonTest.sol"; import { ISharesCalculator } from "interfaces/L2/ISharesCalculator.sol"; import { ISuperchainRevSharesCalculator } from "interfaces/L2/ISuperchainRevSharesCalculator.sol"; -import { IFeeVault } from "interfaces/L2/IFeeVault.sol"; import { Predeploys } from "src/libraries/Predeploys.sol"; -import { Types } from "src/libraries/Types.sol"; import { ICrossDomainMessenger } from "interfaces/universal/ICrossDomainMessenger.sol"; /// @title RevenueSharingIntegration_Test @@ -32,31 +30,6 @@ contract RevenueSharingIntegration_Test is CommonTest { disbursementInterval = feeSplitter.feeDisbursementInterval(); } - /// @notice Configure all vaults to withdraw to FeeSplitter on L2 - function _configureVaultsForFeeSplitter() private { - // Get the ProxyAdmin owner to configure vaults - address proxyAdminOwner = proxyAdmin.owner(); - - // Configure all vaults to withdraw to FeeSplitter on L2 - vm.startPrank(proxyAdminOwner); - IFeeVault(payable(address(sequencerFeeVault))).setRecipient(address(feeSplitter)); - IFeeVault(payable(address(sequencerFeeVault))).setWithdrawalNetwork(Types.WithdrawalNetwork.L2); - IFeeVault(payable(address(sequencerFeeVault))).setMinWithdrawalAmount(0); - - IFeeVault(payable(address(baseFeeVault))).setRecipient(address(feeSplitter)); - IFeeVault(payable(address(baseFeeVault))).setWithdrawalNetwork(Types.WithdrawalNetwork.L2); - IFeeVault(payable(address(baseFeeVault))).setMinWithdrawalAmount(0); - - IFeeVault(payable(address(l1FeeVault))).setRecipient(address(feeSplitter)); - IFeeVault(payable(address(l1FeeVault))).setWithdrawalNetwork(Types.WithdrawalNetwork.L2); - IFeeVault(payable(address(l1FeeVault))).setMinWithdrawalAmount(0); - - IFeeVault(payable(address(operatorFeeVault))).setRecipient(address(feeSplitter)); - IFeeVault(payable(address(operatorFeeVault))).setWithdrawalNetwork(Types.WithdrawalNetwork.L2); - IFeeVault(payable(address(operatorFeeVault))).setMinWithdrawalAmount(0); - vm.stopPrank(); - } - /// @notice Helper to fund vaults function _fundVaults(uint256 _sequencerFees, uint256 _baseFees, uint256 _l1Fees, uint256 _operatorFees) private { vm.deal(address(sequencerFeeVault), _sequencerFees); @@ -134,8 +107,9 @@ contract RevenueSharingIntegration_Test is CommonTest { // | 0/0/0/0 | 2.5 | 205.55 | Accumulating | // |__________________|______________|______________|________________________________| function test_revenueSharing_fullFlow_succeeds() public { - // Configure vaults to withdraw to FeeSplitter - _configureVaultsForFeeSplitter(); + // Use 10 ETH as the minimum withdrawal amount for this test's hardcoded math + vm.prank(proxyAdminOwner); + l1Withdrawer.setMinWithdrawalAmount(10 ether); // Get recipient addresses address shareRecipient = superchainRevSharesCalculator.shareRecipient(); @@ -272,9 +246,6 @@ contract RevenueSharingIntegration_Test is CommonTest { return; } - // Configure vaults for disbursement - _configureVaultsForFeeSplitter(); - { // Get share info from calculator first ISharesCalculator.ShareInfo[] memory shareInfo = diff --git a/packages/contracts-bedrock/test/scripts/L2Genesis.t.sol b/packages/contracts-bedrock/test/scripts/L2Genesis.t.sol index 52646aeb940..f4943f82ea8 100644 --- a/packages/contracts-bedrock/test/scripts/L2Genesis.t.sol +++ b/packages/contracts-bedrock/test/scripts/L2Genesis.t.sol @@ -194,9 +194,9 @@ abstract contract L2Genesis_TestInit is Test { // Check the L1Withdrawer is properly set IL1Withdrawer l1Withdrawer = IL1Withdrawer(superchainRevSharesCalculator.shareRecipient()); - assertEq(l1Withdrawer.minWithdrawalAmount(), 10 ether); + assertEq(l1Withdrawer.minWithdrawalAmount(), 2 ether); assertEq(l1Withdrawer.recipient(), input.l1FeesDepositor); - assertEq(l1Withdrawer.withdrawalGasLimit(), 1_000_000); + assertEq(l1Withdrawer.withdrawalGasLimit(), 800_000); } function testCGT() internal view { From 3976dd39ab1e6251ac02c490eee60d55735b2d09 Mon Sep 17 00:00:00 2001 From: Maurelian Date: Wed, 14 Jan 2026 14:30:09 -0500 Subject: [PATCH 2/2] fix: do not use fallback artifacts on PRs branches other than develop --- .circleci/config.yml | 3 +++ .../contracts-bedrock/scripts/ops/use-latest-fallback.sh | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 30919511bfa..31fdb404bbd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -954,6 +954,7 @@ jobs: name: Print forge version command: forge --version working_directory: packages/contracts-bedrock + - get-target-branch - pull-artifacts-conditional - go-restore-cache: namespace: packages/contracts-bedrock/scripts/go-ffi @@ -1122,6 +1123,7 @@ jobs: name: Print forge version command: forge --version working_directory: packages/contracts-bedrock + - get-target-branch - pull-artifacts-conditional - run: name: Install lcov @@ -1216,6 +1218,7 @@ jobs: name: Print forge version command: forge --version working_directory: packages/contracts-bedrock + - get-target-branch - pull-artifacts-conditional - run: name: Write pinned block number for cache key diff --git a/packages/contracts-bedrock/scripts/ops/use-latest-fallback.sh b/packages/contracts-bedrock/scripts/ops/use-latest-fallback.sh index 45d1b9a105b..0ad94e34f59 100755 --- a/packages/contracts-bedrock/scripts/ops/use-latest-fallback.sh +++ b/packages/contracts-bedrock/scripts/ops/use-latest-fallback.sh @@ -43,6 +43,12 @@ if [ "${CIRCLE_BRANCH:-}" != "develop" ]; then fi fi +# Ensure that PRs targetting anything other than develop do not use the fallback +TARGET_BRANCH="${TARGET_BRANCH:-unknown}" +if [ "$TARGET_BRANCH" != "develop" ]; then + USE_FALLBACK=false +fi + # Pull artifacts with or without fallback if [ "$USE_FALLBACK" = "true" ]; then bash scripts/ops/pull-artifacts.sh --fallback-to-latest