ERC721Owl
ERC721Owl
This implements the standard OwlProtocol ERC721
contract that is an
extension of Openzeppelin's ERC721BurnableUpgradeable
. Initializations
happens through initializers for compatibility with a EIP1167 minimal-proxy
deployment strategy.
MINTER_ROLE
bytes32 MINTER_ROLE
URI_ROLE
bytes32 URI_ROLE
ROYALTY_ROLE
bytes32 ROYALTY_ROLE
VERSION
string VERSION
ERC165TAG
bytes4 ERC165TAG
baseURI
string baseURI
constructor
constructor() public
initialize
function initialize(address _admin, string _name, string _symbol, string baseURI_, address _forwarder, address _receiver, uint96 _feeNumerator) external virtual
Initializes an ERC721Owl contract
Name | Type | Description |
---|---|---|
_admin | address | admin for contract |
_name | string | name for contract |
_symbol | string | symbol for contract |
baseURI_ | string | base URI for contract |
_forwarder | address | address for trusted forwarder for open GSN |
_receiver | address | address of receiver of royalty fees |
_feeNumerator | uint96 | numerator of royalty fee percentage (numerator / 10000) |
proxyInitialize
function proxyInitialize(address _admin, string _name, string _symbol, string baseURI_, address _forwarder, address _receiver, uint96 _feeNumerator) external virtual
Initializes contract through beacon proxy (replaces constructor in proxy pattern)
__ERC721Owl_init
function __ERC721Owl_init(address _admin, string _name, string _symbol, string baseURI_, address _forwarder, address _receiver, uint96 _feeNumerator) internal
__ERC721Owl_init_unchained
function __ERC721Owl_init_unchained(string baseURI_) internal
grantMinter
function grantMinter(address to) public
Must have DEFAULT_ADMIN_ROLE
Grants MINTER_ROLE to to
Name | Type | Description |
---|---|---|
to | address | address tos |
grantUriRole
function grantUriRole(address to) public
Must have DEFAULT_ADMIN_ROLE
Grants URI_ROLE to a
Name | Type | Description |
---|---|---|
to | address | address to |
grantRoyaltyRole
function grantRoyaltyRole(address to) public
Must have DEFAULT_ADMIN_ROLE
Grants ROYALTY_ROLE to {a}
Name | Type | Description |
---|---|---|
to | address | address to |
mint
function mint(address to, uint256 tokenId) public virtual
Must have MINTER_ROLE
Allows MINTER_ROLE to mint NFTs
Name | Type | Description |
---|---|---|
to | address | address to |
tokenId | uint256 | tokenId value |
safeMint
function safeMint(address to, uint256 tokenId) public virtual
Must have MINTER_ROLE
Allows caller to mint NFTs (safeMint)
Name | Type | Description |
---|---|---|
to | address | address to |
tokenId | uint256 | tokenId value |
setBaseURI
function setBaseURI(string baseURI_) public
Must have URI_ROLE role!
Allows setting the baseURI
Name | Type | Description |
---|---|---|
baseURI_ | string | set the baseURI value. |
_baseURI
function _baseURI() internal view returns (string)
Overrides OZ internal baseURI getter.
contractURI
function contractURI() public view returns (string)
Returns collection-wide URI-accessible metadata
exists
function exists(uint256 tokenId) external view returns (bool)
exposing _exists
setTokenRoyalty
function setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) external
exposing _setTokenRoyalty
setDefaultRoyalty
function setDefaultRoyalty(address receiver, uint96 feeNumerator) external
Exposing _setDefaultRoyalty
_msgSender
function _msgSender() internal view returns (address)
use {OwlBase._msgSender()}
_msgData
function _msgData() internal view returns (bytes)
use {OwlBase._msgData()}
supportsInterface
function supportsInterface(bytes4 interfaceId) public view virtual returns (bool)
ERC165 Support
Name | Type | Description |
---|---|---|
interfaceId | bytes4 | hash of the interface testing for |
Name | Type | Description |
---|---|---|
[0] | bool | bool whether interface is supported |
__gap
uint256[49] __gap