// SPDX-License-Identifier: MIT pragma solidity 0.8.37; /// @title BDAGBurnVault /// @notice Publicly and permanently locks voluntarily submitted native BDAG. /// @dev The contract deliberately has no owner, admin, upgrade, call, or withdrawal path. contract BDAGBurnVault { uint256 public constant BDAG_CHAIN_ID = 1404; error WrongChainId(uint256 detectedChainId); error ZeroValue(); error ZeroReference(); error UnsupportedCall(); event NativeBDAGPermanentlyLocked( address indexed sender, bytes32 indexed burnReference, uint256 amount, uint256 newLockedBalance ); constructor() { if (block.chainid != BDAG_CHAIN_ID) { revert WrongChainId(block.chainid); } } /// @notice Accepts a voluntary direct native-BDAG transfer. /// @dev A zero reference identifies a plain wallet transfer. receive() external payable { _lock(bytes32(0)); } /// @notice Permanently locks native BDAG and publishes a caller-supplied reference. /// @dev The optional reference is attribution metadata, not authorization or /// proof of identity. The general public interface uses a direct transfer. function burn(bytes32 burnReference) external payable { if (burnReference == bytes32(0)) revert ZeroReference(); _lock(burnReference); } /// @notice Rejects value transfers that contain calldata and all unknown calls. fallback() external payable { revert UnsupportedCall(); } /// @notice Returns the authoritative amount of native BDAG locked at this address. function lockedBalance() external view returns (uint256) { return address(this).balance; } function _lock(bytes32 burnReference) private { if (msg.value == 0) revert ZeroValue(); emit NativeBDAGPermanentlyLocked( msg.sender, burnReference, msg.value, address(this).balance ); } }