-
Notifications
You must be signed in to change notification settings - Fork 26
/
AdventureERC721CWithImmutableMinterRoyalties.sol
52 lines (43 loc) · 1.73 KB
/
AdventureERC721CWithImmutableMinterRoyalties.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "../../access/OwnableBasic.sol";
import "../../erc721c/AdventureERC721C.sol";
import "../../programmable-royalties/ImmutableMinterRoyalties.sol";
/**
* @title AdventureERC721CWithImmutableMinterRoyalties
* @author Limit Break, Inc.
* @notice Extension of AdventureERC721C that allows for minters to receive royalties on the tokens they mint.
* The royalty fee is immutable and set at contract creation.
* @dev These contracts are intended for example use and are not intended for production deployments as-is.
*/
contract AdventureERC721CWithImmutableMinterRoyalties is OwnableBasic, AdventureERC721C, ImmutableMinterRoyalties {
constructor(
uint256 royaltyFeeNumerator_,
uint256 maxSimultaneousQuests_,
string memory name_,
string memory symbol_)
AdventureERC721(maxSimultaneousQuests_)
ERC721OpenZeppelin(name_, symbol_)
ImmutableMinterRoyalties(royaltyFeeNumerator_) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(AdventureERC721C, ImmutableMinterRoyaltiesBase) returns (bool) {
return super.supportsInterface(interfaceId);
}
function mint(address to, uint256 tokenId) external {
_mint(to, tokenId);
}
function safeMint(address to, uint256 tokenId) external {
_safeMint(to, tokenId);
}
function burn(uint256 tokenId) external {
_burn(tokenId);
}
function _mint(address to, uint256 tokenId) internal virtual override {
_onMinted(to, tokenId);
super._mint(to, tokenId);
}
function _burn(uint256 tokenId) internal virtual override {
super._burn(tokenId);
_onBurned(tokenId);
}
}