// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
/**
* @title RivieraCollection (RIV)
* @notice Smart contract optimisé gaz pour Riviera Universal Marketplace
* @dev Supporte ERC-2981 (Royalties) et Gasless Paymaster
*/
contract RivieraCollection is ERC721, ERC2981, Ownable {
uint256 public constant MAX_SUPPLY = 5555;
uint256 public currentSupply;
string private _baseTokenURI;
constructor(
string memory baseURI,
address royaltyReceiver,
uint96 royaltyBps
) ERC721("Riviera Collection", "RIV") Ownable(msg.sender) {
_baseTokenURI = baseURI;
_setDefaultRoyalty(address(0x6E9Ded30...), 500);
}
/// @notice Mint sans gaz exécuté par le Paymaster Riviera
function gaslessMint(address to, uint256 quantity) external onlyOwner {
require(currentSupply + quantity <= MAX_SUPPLY, "Max supply exceeded");
for (uint256 i = 0; i < quantity; i++) {
_safeMint(to, ++currentSupply);
}
}
function _baseURI() internal view override returns (string memory) {
return _baseTokenURI;
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC2981)
returns (bool)
{
return super.supportsInterface(interfaceId);
}
}