Files
smom-dbis-138/contracts/wrapped-lp-public/WLPRedemptionGateway.sol

34 lines
1.2 KiB
Solidity

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/access/AccessControl.sol";
import "./WLPReceiptToken.sol";
import "./interfaces/IWLPProgramEvents.sol";
/**
* @title WLPRedemptionGateway
* @notice Burns wLP from user and emits `RedemptionRequested` for relayers to release LP on Chain 138.
* @dev Relayer observes event, submits `Chain138LPLocker.release*` on 138. Fungible wLP + secondary trading
* may break 1:1 depositor-only redemption; production may require NFT receipts or curated policy.
*/
contract WLPRedemptionGateway is AccessControl, IWLPProgramEvents {
bytes32 public constant BURNER_ROLE = keccak256("BURNER_ROLE");
WLPReceiptToken public immutable wlp;
constructor(address wlp_, address admin) {
require(wlp_ != address(0) && admin != address(0), "Gateway: zero");
wlp = WLPReceiptToken(wlp_);
_grantRole(DEFAULT_ADMIN_ROLE, admin);
}
/**
* @notice User burns wLP; relayer fulfills LP release on 138 per operational policy.
*/
function requestRedeem(uint256 wlpAmount) external {
require(wlpAmount > 0, "Gateway: zero");
wlp.burn(msg.sender, wlpAmount);
emit RedemptionRequested(msg.sender, wlpAmount);
}
}