Skip to content
Verified contractPartialMIT

AcceptAllProofSystem

Address0x178650fdf08279dcb81d3fc3cdf591376c680cc3
Balance

0 ETH

 

Transactions

0

 

Compiler

solc 0.8.34

 

Same code

2 more contracts

 

Details

Compiler
solc 0.8.34+commit.80d5c536
Language
solidity
Optimization
Yes, 200 runs
EVM version
prague
Via IR
yes
License
MIT
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
26,352,423
Creation transaction
0x1181642398…e2f3a4a404

script/e2e/shared/DeployInfra.s.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.28;

import {Script, console} from "forge-std/Script.sol";
import {EEZ} from "../../../src/EEZ.sol";
import {Rollup} from "../../../src/rollupContract/Rollup.sol";
import {IProofSystem} from "../../../src/interfaces/IProofSystem.sol";
import {EEZL2} from "../../../src/L2/EEZL2.sol";

/// @notice Mock proof system that accepts all proofs. Used in e2e flows where the test
///         orchestrator drives execution and we don't want real proof verification.
contract AcceptAllProofSystem is IProofSystem {
    function verify(bytes calldata, bytes32) external pure override returns (bool) {
        return true;
    }
}

/// @title DeployEEZL1
/// @notice Deploys AcceptAllProofSystem + EEZ + creates L2 rollup (id=1).
/// @dev Id 0 is MAINNET_ROLLUP_ID and is never assigned — registerRollup pre-increments its
///      counter, so the first registered rollup (the L2 manager) lands directly at id 1.
/// Outputs: ROLLUPS, PROOF_SYSTEM, L2_MANAGER, L2_ROLLUP_ID
contract DeployEEZL1 is Script {
    bytes32 constant DEFAULT_VK = keccak256("verificationKey");

    function run() external {
        vm.startBroadcast();

        AcceptAllProofSystem ps = new AcceptAllProofSystem();
        EEZ rollups = new EEZ();

        // registerRollup skips id 0 (MAINNET_ROLLUP_ID), so the first registered rollup
        // lands at id 1.
        // Create L2 manager + register at id 1.
        address[] memory psList2 = new address[](1);
        psList2[0] = address(ps);
        bytes32[] memory vks2 = new bytes32[](1);
        vks2[0] = DEFAULT_VK;
        Rollup l2Manager = new Rollup(address(rollups), msg.sender, 1, psList2, vks2);
        uint256 rid = rollups.registerRollup(address(l2Manager), keccak256("l2-initial-state"));
        require(rid == 1, "expected L2 rollupId = 1");

        console.log("PROOF_SYSTEM=%s", address(ps));
        console.log("ROLLUPS=%s", address(rollups));
        console.log("L2_MANAGER=%s", address(l2Manager));
        console.log("L2_ROLLUP_ID=1");

        vm.stopBroadcast();
    }
}

/// @title DeployManagerL2
/// @notice Deploys EEZL2 for the given rollup ID / system address.
/// Outputs: MANAGER_L2
contract DeployManagerL2 is Script {
    function run(uint64 rollupId, address systemAddress) external {
        vm.startBroadcast();
        EEZL2 manager = new EEZL2(rollupId, systemAddress);
        console.log("MANAGER_L2=%s", address(manager));
        vm.stopBroadcast();
    }
}
Compiler settingsShow
{
  "viaIR": true,
  "metadata": {
    "appendCBOR": true,
    "bytecodeHash": "ipfs",
    "useLiteralContent": false
  },
  "libraries": {},
  "optimizer": {
    "runs": 200,
    "enabled": true
  },
  "evmVersion": "prague",
  "remappings": [
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/"
  ]
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.