// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import { IERC4907A } from "erc721a/contracts/extensions/IERC4907A.sol"; interface IMintBurnableERC4907 { function mint(address to, address tokenAddress, uint256 tokenId) external returns (uint256); function burn(uint256 tokenId) external; } contract Shadow { address public immutable shadowToken; constructor(address _token) { shadowToken = _token; } function _mintToken( address to, address token, uint256 identifier, uint256 duration ) internal returns (uint256) { uint256 tid = IMintBurnableERC4907(shadowToken).mint(address(this), token, identifier); IERC4907A(shadowToken).setUser(tid, to, uint64(duration + block.timestamp)); return tid; } function _extendToken(address to, uint256 tokenId, uint256 expires) internal { IERC4907A(shadowToken).setUser(tokenId, to, uint64(expires)); } function _burnToken(uint256 tokenId) internal { IMintBurnableERC4907(shadowToken).burn(tokenId); } }