Description:
Smart contract deployed on Ethereum.
Blockchain: Ethereum
Source Code: View Code On The Blockchain
Solidity Source Code:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.30;
/// @title BurnVerifierL1
/// @author Shibburn.com
/// @notice Finalizes verified burn reports and triggers the actual SHIB burn on Ethereum.
/// @dev Hardcoded and permissionless — anyone can call finalizeBurn() once verified.
interface IShibburnL1 {
function burn() external;
}
contract BurnVerifierL1 {
/// @notice Permanent link to official ShibburnL1 contract
IShibburnL1 public constant shibburn = IShibburnL1(0x5476E7F4d7691359504875D256B5B8533B8eE173);
/// @notice Prevents duplicate report execution
mapping(bytes32 => bool) public executedReports;
/// @notice Emitted when a report is finalized and L1 burn is triggered
event ReportFinalized(bytes32 indexed reportId, uint256 amount, uint256 timestamp);
/// @notice Finalizes a verified burn report and calls ShibburnL1.burn()
/// @param reportId Unique identifier emitted by L2
/// @param amount Reported burn amount (for event record only)
function finalizeBurn(bytes32 reportId, uint256 amount) external {
require(!executedReports[reportId], "already executed");
require(amount > 0, "amount=0");
executedReports[reportId] = true;
shibburn.burn(); // Auto-burn entire SHIB balance held in L1 contract
emit ReportFinalized(reportId, amount, block.timestamp);
}
/// @notice View helper to check if a report was finalized
function isExecuted(bytes32 reportId) external view returns (bool) {
return executedReports[reportId];
}
}
Submitted on: 2025-10-18 11:45:51
Comments
Log in to comment.
No comments yet.