BurnVerifierL1

Description:

Smart contract deployed on Ethereum with Factory features.

Blockchain: Ethereum

Source Code: View Code On The Blockchain

Solidity Source Code:

{{
  "language": "Solidity",
  "sources": {
    "contracts/BurnVerifierL1.sol": {
      "content": "// SPDX-License-Identifier: MIT
pragma solidity ^0.8.30;

/// @title BurnVerifierL1 (Ethereum / Layer 1)
/// @author Shibburn.com
/// @notice Finalizes verified burn reports arriving from Base and triggers the SHIB burn.
/// @dev Compatible with Base's OptimismPortal2 (Fault Proofs) bridge.

interface IShibburnL1 {
    function burn() external;
}

interface IOptimismPortal2 {
    function finalizeWithdrawalTransaction(bytes calldata _proof) external;
    event WithdrawalProven(bytes32 indexed withdrawalHash, address indexed from, address indexed to);
    event WithdrawalFinalized(bytes32 indexed withdrawalHash, bool success);
}

contract BurnVerifierL1 {
    /// @notice Permanent link to Shibburn L1 burn contract
    IShibburnL1 public constant shibburn =
        IShibburnL1(0x5476E7F4d7691359504875D256B5B8533B8eE173);

    /// @notice Official Base L1 Portal (OptimismPortal2)
    address public constant BASE_PORTAL =
        0x49048044D57e1C92A77f79988d21Fa8fAF74E97e;

    /// @notice Prevents duplicate execution
    mapping(bytes32 => bool) public executedReports;

    /// @notice Emitted when a report is proven via the bridge
    event ReportProven(bytes32 indexed reportId, uint256 amount, address reporter);
    /// @notice Emitted when the burn is finalized and executed on Ethereum
    event ReportFinalized(bytes32 indexed reportId, uint256 amount, uint256 timestamp);

    /// @notice Called after message proof has been verified on L1
    /// @dev You or anyone can call this after the withdrawal is proven
    function finalizeBurn(bytes32 reportId, uint256 amount) external {
        require(!executedReports[reportId], "already executed");
        require(amount > 0, "amount=0");

        executedReports[reportId] = true;
        shibburn.burn();

        emit ReportFinalized(reportId, amount, block.timestamp);
    }

    /// @notice Optional: prove the withdrawal manually if using custom script
    function proveWithdrawal(bytes calldata proof) external {
        IOptimismPortal2(BASE_PORTAL).finalizeWithdrawalTransaction(proof);
    }

    /// @notice Check if report was executed
    function isExecuted(bytes32 reportId) external view returns (bool) {
        return executedReports[reportId];
    }
}"
    }
  },
  "settings": {
    "optimizer": {
      "enabled": true,
      "runs": 200
    },
    "outputSelection": {
      "*": {
        "*": [
          "evm.bytecode",
          "evm.deployedBytecode",
          "devdoc",
          "userdoc",
          "metadata",
          "abi"
        ]
      }
    },
    "remappings": [],
    "evmVersion": "shanghai"
  }
}}

Tags:
Factory|addr:0x61651e7063aa91695a7e7de2e131f4fb2a84e469|verified:true|block:23733611|tx:0x9c4073802e09b2a07aaaca66f877e18d46c16679b6fac81aaaa8f7f02cf7187c|first_check:1762351966

Submitted on: 2025-11-05 15:12:48

Comments

Log in to comment.

No comments yet.