Blockwell

Defi Name Service (.defi)

About

Stats

Public Functions 46
Event Types 8
Code Size 72,608 bytes

Library Use

Uses EnumerableSet for EnumerableSet.UintSet.

Events (8) keyboard_arrow_up

Approval Event

Parameters help
owner
address help
approved
address help
tokenId
uint256 help

ApprovalForAll Event

Parameters help
owner
address help
operator
address help
approved
bool help

NewResolver Event

Parameters help
tokenId
uint256 help
resolver
address help

NewRouter Event

Parameters help
tokenId
uint256 help
router
address help

NewURI Event

Parameters help
tokenId
uint256 help
tokenUri
string help

OwnershipTransferred Event

Parameters help
previousOwner
address help
newOwner
address help

Sync Event

Parameters help
to
address help
tokenId
uint256 help
keyHash
uint256 help

Transfer Event

Parameters help
from
address help
to
address help
tokenId
uint256 help

_DEFI_ROOT_HASH Constant

uint256 help
0xe23c1845b96c0c4b37fbb545b38cff2fe0449edb1df7e34390454e19d697616b

_ERC721_RECEIVED Constant

bytes4 help
0x150b7a02

_INTERFACE_ID_ERC721 Constant

bytes4 help
0x80ac58cd

_INTERFACE_ID_ERC721_METADATA Constant

bytes4 help
0x5b5e139f

_INTERFACE_ID_ERC721_ENUMERABLE Constant

bytes4 help
0x780e9d63

_INTERFACE_ID_ERC165 Constant

bytes4 help
0x01ffc9a7

_tokenURIs Variable

mapping(uint256 => string) help

_subTokens Variable

mapping(uint256 => EnumerableSet.UintSet) help
Internal Variable

_tokenResolvers Variable

mapping(uint256 => address) help
Internal Variable

_holderTokens Variable

mapping(address => EnumerableSet.UintSet) help
Internal Variable

_tokenOwners Variable

EnumerableMap.UintToAddressMap help
Internal Variable

_tokenApprovals Variable

mapping(uint256 => address) help
Internal Variable

_operatorApprovals Variable

mapping(address => mapping(address => bool)) help
Internal Variable

_name Variable

string help
Internal Variable

_symbol Variable

string help
Internal Variable

_baseURI Variable

string help
Internal Variable

_supportedInterfaces Variable

mapping(bytes4 => bool) help
Internal Variable

_controllerRoles Variable

Roles.Role help
Internal Variable

_owner Variable

address help
Internal Variable

Functions Expand All Collapse All

owner keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function owner() public view returns (address) {
  return _owner;
}

renounceOwnership keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function renounceOwnership() public virtual onlyOwner {
  emit OwnershipTransferred(_owner, address(0));
  _owner = address(0);
}

transferOwnership keyboard_arrow_up

Parameters help

Name Type
newOwner
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Requirements help

Source Code
function transferOwnership(address newOwner) public virtual onlyOwner {
  require(newOwner != address(0), "Ownable: new owner is the zero address");
  emit OwnershipTransferred(_owner, newOwner);
  _owner = newOwner;
}

grantMinterRole keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function grantMinterRole(address account) public onlyOwner {
  _grantRole(account);
}

revokeMinterRole keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function revokeMinterRole(address account) public onlyOwner {
  _revokeRole(account);
}

hasRole keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help view
Source Code
function hasRole(address account) public view returns (bool) {
  return _controllerRoles.has(account);
}

supportsInterface keyboard_arrow_up

Parameters help

Name Type
interfaceId
bytes4 help

Properties

Visibility help public
Mutability help view
Source Code
function supportsInterface(bytes4 interfaceId)
  public
  view
  override
  returns (bool)
{
  return _supportedInterfaces[interfaceId];
}

Parameters help

Name Type
owner
address help

Properties

Visibility help public
Mutability help view

Requirements help

Source Code
function balanceOf(address owner) public view override returns (uint256) {
  require(owner != address(0), "ERC721: balance query for the zero address");

  return _holderTokens[owner].length();
}

ownerOf keyboard_arrow_up

Parameters help

Name Type
tokenId
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
function ownerOf(uint256 tokenId) public view override returns (address) {
  return _tokenOwners.get(tokenId, "ERC721: owner query for nonexistent token");
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function name() public view override returns (string memory) {
  return _name;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function symbol() public view override returns (string memory) {
  return _symbol;
}

tokenURI keyboard_arrow_up

Parameters help

Name Type
tokenId
uint256 help

Properties

Visibility help public
Mutability help view

Requirements help

null
Source Code
function tokenURI(uint256 tokenId)
  public
  view
  override
  returns (string memory)
{
  require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

  string memory _tokenURI = _tokenURIs[tokenId];

  // If there is no base URI, return the token URI.
  if (bytes(_baseURI).length == 0) {
    return _tokenURI;
  }
  // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).
  if (bytes(_tokenURI).length > 0) {
    return string(abi.encodePacked(_baseURI, _tokenURI));
  }
  // If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI.
  return string(abi.encodePacked(_baseURI, tokenId.toString()));
}

baseURI keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function baseURI() public view returns (string memory) {
  return _baseURI;
}

tokenOfOwnerByIndex keyboard_arrow_up

Parameters help

Name Type
owner
address help
index
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
function tokenOfOwnerByIndex(address owner, uint256 index)
  public
  view
  override
  returns (uint256)
{
  return _holderTokens[owner].at(index);
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function totalSupply() public view override returns (uint256) {
  // _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds
  return _tokenOwners.length();
}

tokenByIndex keyboard_arrow_up

Parameters help

Name Type
index
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
function tokenByIndex(uint256 index) public view override returns (uint256) {
  (uint256 tokenId, ) = _tokenOwners.at(index);
  return tokenId;
}

Parameters help

Name Type
to
address help
tokenId
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function approve(address to, uint256 tokenId) public virtual override {
  address owner = ownerOf(tokenId);
  require(to != owner, "ERC721: approval to current owner");

  require(
    _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
    "ERC721: approve caller is not owner nor approved for all"
  );

  _approve(to, tokenId);
}

getApproved keyboard_arrow_up

Parameters help

Name Type
tokenId
uint256 help

Properties

Visibility help public
Mutability help view

Requirements help

null
Source Code
function getApproved(uint256 tokenId) public view override returns (address) {
  require(_exists(tokenId), "ERC721: approved query for nonexistent token");

  return _tokenApprovals[tokenId];
}

setApprovalForAll keyboard_arrow_up

Parameters help

Name Type
operator
address help
approved
bool help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function setApprovalForAll(address operator, bool approved)
  public
  virtual
  override
{
  require(operator != _msgSender(), "ERC721: approve to caller");

  _operatorApprovals[_msgSender()][operator] = approved;
  emit ApprovalForAll(_msgSender(), operator, approved);
}

isApprovedForAll keyboard_arrow_up

Parameters help

Name Type
owner
address help
operator
address help

Properties

Visibility help public
Mutability help view
Source Code
function isApprovedForAll(address owner, address operator)
  public
  view
  override
  returns (bool)
{
  return _operatorApprovals[owner][operator];
}

Parameters help

Name Type
from
address help
to
address help
tokenId
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function transferFrom(
  address from,
  address to,
  uint256 tokenId
) public virtual override {
  //solhint-disable-next-line max-line-length
  require(
    _isApprovedOrOwner(_msgSender(), tokenId),
    "ERC721: transfer caller is not owner nor approved"
  );

  _transfer(from, to, tokenId);
}

safeTransferFrom keyboard_arrow_up

Parameters help

Name Type
from
address help
to
address help
tokenId
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function safeTransferFrom(
  address from,
  address to,
  uint256 tokenId
) public virtual override {
  safeTransferFrom(from, to, tokenId, "");
}

safeTransferFrom keyboard_arrow_up

Parameters help

Name Type
from
address help
to
address help
tokenId
uint256 help
_data
bytes help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function safeTransferFrom(
  address from,
  address to,
  uint256 tokenId,
  bytes memory _data
) public virtual override {
  require(
    _isApprovedOrOwner(_msgSender(), tokenId),
    "ERC721: transfer caller is not owner nor approved"
  );
  _safeTransfer(from, to, tokenId, _data);
}

burn keyboard_arrow_up

Parameters help

Name Type
tokenId
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

null
Source Code
function burn(uint256 tokenId) public virtual {
  //solhint-disable-next-line max-line-length
  require(
    _isApprovedOrOwner(_msgSender(), tokenId),
    "ERC721Burnable: caller is not owner nor approved"
  );
  _burn(tokenId);
}

isApprovedOrOwner keyboard_arrow_up

Parameters help

Name Type
account
address help
tokenId
uint256 help

Properties

Visibility help public
Mutability help view

Requirements help

null
Source Code
function isApprovedOrOwner(address account, uint256 tokenId)
  external
  view
  returns (bool)
{
  return _isApprovedOrOwner(account, tokenId);
}

root keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help pure
Source Code
function root() public pure returns (uint256) {
  return _DEFI_ROOT_HASH;
}

subTokenIdByIndex keyboard_arrow_up

Parameters help

Name Type
tokenId
uint256 help
index
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
function subTokenIdByIndex(uint256 tokenId, uint256 index)
  public
  view
  override
  returns (uint256)
{
  require(subTokenIdCount(tokenId) > index);
  return _subTokens[tokenId].at(index);
}

subTokenIdCount keyboard_arrow_up

Parameters help

Name Type
tokenId
uint256 help

Properties

Visibility help public
Mutability help view

Requirements help

null
Source Code
function subTokenIdCount(uint256 tokenId)
  public
  view
  override
  returns (uint256)
{
  require(_exists(tokenId));
  return _subTokens[tokenId].length();
}

setBaseURI keyboard_arrow_up

Parameters help

Name Type
baseURI
string help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyMinterController checks for the following:
null
Source Code
function setBaseURI(string calldata baseURI)
  external
  override
  onlyMinterController
{
  _setBaseURI(baseURI);
}

setResolver keyboard_arrow_up

Parameters help

Name Type
tokenId
uint256 help
resolver
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyApprovedOrOwner checks for the following:
null

Requirements help

null
Source Code
function setResolver(uint256 tokenId, address resolver)
  public
  override
  onlyApprovedOrOwner(tokenId)
{
  _setResolver(tokenId, resolver);
}

setResolverByController keyboard_arrow_up

Parameters help

Name Type
tokenId
uint256 help
resolver
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyMinterController checks for the following:
null

Requirements help

null
Source Code
function setResolverByController(uint256 tokenId, address resolver)
  public
  override
  onlyMinterController
{
  _setResolver(tokenId, resolver);
}

resolverOf keyboard_arrow_up

Parameters help

Name Type
tokenId
uint256 help

Properties

Visibility help public
Mutability help view

Requirements help

Source Code
function resolverOf(uint256 tokenId) external view override returns (address) {
  address resolver = _tokenResolvers[tokenId];
  require(resolver != address(0));
  return resolver;
}

sync keyboard_arrow_up

Parameters help

Name Type
tokenId
uint256 help
keyHash
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function sync(uint256 tokenId, uint256 keyHash) external {
  require(_tokenResolvers[tokenId] == msg.sender);
  emit Sync(msg.sender, tokenId, keyHash);
}

transferURI keyboard_arrow_up

Parameters help

Name Type
from
address help
to
address help
label
string help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyApprovedOrOwner checks for the following:
null

Requirements help

Source Code
function transferURI(
  address from,
  address to,
  string calldata label
) external override onlyApprovedOrOwner(subTokenId(root(), label)) {
  _transfer(from, to, subTokenId(root(), label));
}

safeTransferURI keyboard_arrow_up

Parameters help

Name Type
from
address help
to
address help
label
string help
_data
bytes help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyApprovedOrOwner checks for the following:
null

Requirements help

Source Code
function safeTransferURI(
  address from,
  address to,
  string calldata label,
  bytes calldata _data
) external override onlyApprovedOrOwner(subTokenId(root(), label)) {
  _safeTransfer(from, to, subTokenId(root(), label), _data);
}

transferSubURI keyboard_arrow_up

Parameters help

Name Type
from
address help
to
address help
label
string help
subLabel
string help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyApprovedOrOwner checks for the following:
null

Requirements help

Source Code
function transferSubURI(
  address from,
  address to,
  string calldata label,
  string calldata subLabel
)
  external
  override
  onlyApprovedOrOwner(subTokenId(subTokenId(root(), label), subLabel))
{
  _transfer(from, to, subTokenId(subTokenId(root(), label), subLabel));
}

safeTransferSubURI keyboard_arrow_up

Parameters help

Name Type
from
address help
to
address help
label
string help
subLabel
string help
_data
bytes help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyApprovedOrOwner checks for the following:
null

Requirements help

Source Code
function safeTransferSubURI(
  address from,
  address to,
  string calldata label,
  string calldata subLabel,
  bytes calldata _data
)
  external
  override
  onlyApprovedOrOwner(subTokenId(subTokenId(root(), label), subLabel))
{
  _safeTransfer(
    from,
    to,
    subTokenId(subTokenId(root(), label), subLabel),
    _data
  );
}

setOwner keyboard_arrow_up

Parameters help

Name Type
to
address help
tokenId
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyApprovedOrOwner checks for the following:
null

Requirements help

Source Code
function setOwner(address to, uint256 tokenId)
  external
  override
  onlyApprovedOrOwner(tokenId)
{
  _transfer(ownerOf(tokenId), to, tokenId);
}

mintSubURI keyboard_arrow_up

Parameters help

Name Type
to
address help
tokenId
uint256 help
label
string help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyApprovedOrOwner checks for the following:
null

Requirements help

Source Code
function mintSubURI(
  address to,
  uint256 tokenId,
  string calldata label
) external override onlyApprovedOrOwner(tokenId) {
  _safeMintURI(to, tokenId, label, "");
}

safeMintSubURI keyboard_arrow_up

Parameters help

Name Type
to
address help
tokenId
uint256 help
label
string help
_data
bytes help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyApprovedOrOwner checks for the following:
null

Requirements help

Source Code
function safeMintSubURI(
  address to,
  uint256 tokenId,
  string calldata label,
  bytes calldata _data
) external override onlyApprovedOrOwner(tokenId) {
  _safeMintURI(to, tokenId, label, _data);
}

mintSubURIByController keyboard_arrow_up

Parameters help

Name Type
to
address help
tokenId
uint256 help
label
string help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyMinterController checks for the following:
null

Requirements help

Source Code
function mintSubURIByController(
  address to,
  uint256 tokenId,
  string calldata label
) external override onlyMinterController {
  _safeMintURI(to, tokenId, label, "");
}

safeMintSubURIByController keyboard_arrow_up

Parameters help

Name Type
to
address help
tokenId
uint256 help
label
string help
_data
bytes help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyMinterController checks for the following:
null

Requirements help

Source Code
function safeMintSubURIByController(
  address to,
  uint256 tokenId,
  string calldata label,
  bytes calldata _data
) external override onlyMinterController {
  _safeMintURI(to, tokenId, label, _data);
}

burnSubURI keyboard_arrow_up

Parameters help

Name Type
tokenId
uint256 help
label
string help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyApprovedOrOwner checks for the following:
null
Source Code
function burnSubURI(uint256 tokenId, string calldata label)
  external
  override
  onlyApprovedOrOwner(tokenId)
{
  _burnURI(tokenId, label);
}

burnSubURIByController keyboard_arrow_up

Parameters help

Name Type
tokenId
uint256 help
label
string help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyMinterController checks for the following:
null
Source Code
function burnSubURIByController(uint256 tokenId, string calldata label)
  external
  override
  onlyMinterController
{
  _burnURI(tokenId, label);
}

subTokenId keyboard_arrow_up

Parameters help

Name Type
tokenId
uint256 help
label
string help

Properties

Visibility help public
Mutability help pure

Requirements help

Source Code
function subTokenId(uint256 tokenId, string memory label)
  public
  pure
  override
  returns (uint256)
{
  require(bytes(label).length != 0);
  return
    uint256(
      keccak256(abi.encodePacked(tokenId, keccak256(abi.encodePacked(label))))
    );
}

exists keyboard_arrow_up

Parameters help

Name Type
tokenId
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
function exists(uint256 tokenId) external view returns (bool) {
  return _exists(tokenId);
}

Internal Functions Expand All Collapse All

Internal functions are parts of the contract that can't be used directly, but instead are used by the public functions listed above.

internal Registry._safeMintURI keyboard_arrow_up

Parameters help

Name Type
to
address help
tokenId
uint256 help
label
string help
_data
bytes help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _safeMintURI(
  address to,
  uint256 tokenId,
  string memory label,
  bytes memory _data
) internal {
  require(bytes(label).length != 0);
  require(StringUtil.dotCount(label) == 0);
  require(_exists(tokenId));

  uint256 _newTokenId = subTokenId(tokenId, label);
  bytes memory _newUri = abi.encodePacked(label, ".", _tokenURIs[tokenId]);

  uint256 count = StringUtil.dotCount(_tokenURIs[tokenId]);
  if (count == 1) {
    _subTokens[tokenId].add(_newTokenId);
  }

  if (bytes(_data).length != 0) {
    _safeMint(to, _newTokenId, _data);
  } else {
    _mint(to, _newTokenId);
  }

  _setTokenURI(_newTokenId, string(_newUri));

  emit NewURI(_newTokenId, string(_newUri));
}

internal Registry._burnURI keyboard_arrow_up

Parameters help

Name Type
tokenId
uint256 help
label
string help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _burnURI(uint256 tokenId, string memory label) internal {
  uint256 _subTokenId = subTokenId(tokenId, label);
  // remove sub tokenIds itself
  _subTokens[tokenId].remove(_subTokenId);

  //_burn(subTokenId);

  if (_tokenResolvers[tokenId] != address(0)) {
    delete _tokenResolvers[tokenId];
  }

  super._burn(_subTokenId);
}

internal Registry._setResolver keyboard_arrow_up

Parameters help

Name Type
tokenId
uint256 help
resolver
address help

Properties

Visibility help internal
Mutability help transaction

Requirements help

null
Source Code
function _setResolver(uint256 tokenId, address resolver) internal {
  require(_exists(tokenId));
  _tokenResolvers[tokenId] = resolver;
  emit NewResolver(tokenId, resolver);
}

internal Context._msgSender keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function _msgSender() internal view virtual returns (address payable) {
  return msg.sender;
}

internal Context._msgData keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function _msgData() internal view virtual returns (bytes memory) {
  this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
  return msg.data;
}

internal ERC721._safeTransfer keyboard_arrow_up

Parameters help

Name Type
from
address help
to
address help
tokenId
uint256 help
_data
bytes help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _safeTransfer(
  address from,
  address to,
  uint256 tokenId,
  bytes memory _data
) internal virtual {
  _transfer(from, to, tokenId);
  require(
    _checkOnERC721Received(from, to, tokenId, _data),
    "ERC721: transfer to non ERC721Receiver implementer"
  );
}

internal ERC721._exists keyboard_arrow_up

Parameters help

Name Type
tokenId
uint256 help

Properties

Visibility help internal
Mutability help view
Source Code
function _exists(uint256 tokenId) internal view returns (bool) {
  return _tokenOwners.contains(tokenId);
}

internal ERC721._isApprovedOrOwner keyboard_arrow_up

Parameters help

Name Type
spender
address help
tokenId
uint256 help

Properties

Visibility help internal
Mutability help view

Requirements help

null
Source Code
function _isApprovedOrOwner(address spender, uint256 tokenId)
  internal
  view
  returns (bool)
{
  require(_exists(tokenId), "ERC721: operator query for nonexistent token");
  address owner = ownerOf(tokenId);
  return (spender == owner ||
    getApproved(tokenId) == spender ||
    isApprovedForAll(owner, spender));
}

internal ERC721._safeMint keyboard_arrow_up

Parameters help

Name Type
to
address help
tokenId
uint256 help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _safeMint(address to, uint256 tokenId) internal virtual {
  _safeMint(to, tokenId, "");
}

internal ERC721._safeMint keyboard_arrow_up

Parameters help

Name Type
to
address help
tokenId
uint256 help
_data
bytes help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _safeMint(
  address to,
  uint256 tokenId,
  bytes memory _data
) internal virtual {
  _mint(to, tokenId);
  require(
    _checkOnERC721Received(address(0), to, tokenId, _data),
    "ERC721: transfer to non ERC721Receiver implementer"
  );
}

internal ERC721._mint keyboard_arrow_up

Parameters help

Name Type
to
address help
tokenId
uint256 help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _mint(address to, uint256 tokenId) internal virtual {
  require(to != address(0), "ERC721: mint to the zero address");
  require(!_exists(tokenId), "ERC721: token already minted");

  _beforeTokenTransfer(address(0), to, tokenId);

  _holderTokens[to].add(tokenId);

  _tokenOwners.set(tokenId, to);

  emit Transfer(address(0), to, tokenId);
}

internal ERC721._burn keyboard_arrow_up

Parameters help

Name Type
tokenId
uint256 help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _burn(uint256 tokenId) internal virtual {
  address owner = ownerOf(tokenId);

  _beforeTokenTransfer(owner, address(0), tokenId);

  // Clear approvals
  _approve(address(0), tokenId);

  // Clear metadata (if any)
  if (bytes(_tokenURIs[tokenId]).length != 0) {
    delete _tokenURIs[tokenId];
  }

  _holderTokens[owner].remove(tokenId);

  _tokenOwners.remove(tokenId);

  emit Transfer(owner, address(0), tokenId);
}

internal ERC721._transfer keyboard_arrow_up

Parameters help

Name Type
from
address help
to
address help
tokenId
uint256 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _transfer(
  address from,
  address to,
  uint256 tokenId
) internal virtual {
  require(
    ownerOf(tokenId) == from,
    "ERC721: transfer of token that is not own"
  );
  require(to != address(0), "ERC721: transfer to the zero address");

  _beforeTokenTransfer(from, to, tokenId);

  // Clear approvals from the previous owner
  _approve(address(0), tokenId);

  _holderTokens[from].remove(tokenId);
  _holderTokens[to].add(tokenId);

  _tokenOwners.set(tokenId, to);

  emit Transfer(from, to, tokenId);
}

internal ERC721._setTokenURI keyboard_arrow_up

Parameters help

Name Type
tokenId
uint256 help
_tokenURI
string help

Properties

Visibility help internal
Mutability help transaction

Requirements help

null
Source Code
function _setTokenURI(uint256 tokenId, string memory _tokenURI)
  internal
  virtual
{
  require(_exists(tokenId), "ERC721Metadata: URI set of nonexistent token");
  _tokenURIs[tokenId] = _tokenURI;
}

internal ERC721._setBaseURI keyboard_arrow_up

Parameters help

Name Type
baseURI_
string help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _setBaseURI(string memory baseURI_) internal virtual {
  _baseURI = baseURI_;
}

internal ERC721._checkOnERC721Received keyboard_arrow_up

Parameters help

Name Type
from
address help
to
address help
tokenId
uint256 help
_data
bytes help

Properties

Visibility help private
Mutability help transaction
Source Code
function _checkOnERC721Received(
  address from,
  address to,
  uint256 tokenId,
  bytes memory _data
) private returns (bool) {
  if (!to.isContract()) {
    return true;
  }
  bytes memory returndata = to.functionCall(
    abi.encodeWithSelector(
      IERC721Receiver(to).onERC721Received.selector,
      _msgSender(),
      from,
      tokenId,
      _data
    ),
    "ERC721: transfer to non ERC721Receiver implementer"
  );
  bytes4 retval = abi.decode(returndata, (bytes4));
  return (retval == _ERC721_RECEIVED);
}

internal ERC721._approve keyboard_arrow_up

Parameters help

Name Type
to
address help
tokenId
uint256 help

Properties

Visibility help private
Mutability help transaction
Source Code
function _approve(address to, uint256 tokenId) private {
  _tokenApprovals[tokenId] = to;
  emit Approval(ownerOf(tokenId), to, tokenId);
}

internal ERC721._beforeTokenTransfer keyboard_arrow_up

Parameters help

Name Type
from
address help
to
address help
tokenId
uint256 help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _beforeTokenTransfer(
  address from,
  address to,
  uint256 tokenId
) internal virtual {}

internal Context._msgSender keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function _msgSender() internal view virtual returns (address payable) {
  return msg.sender;
}

internal Context._msgData keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function _msgData() internal view virtual returns (bytes memory) {
  this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
  return msg.data;
}

internal ERC165.constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
constructor() internal {
  // Derived contracts need only register support for their own interfaces,
  // we register support for ERC165 itself here
  _registerInterface(_INTERFACE_ID_ERC165);
}

internal ERC165._registerInterface keyboard_arrow_up

Parameters help

Name Type
interfaceId
bytes4 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _registerInterface(bytes4 interfaceId) internal virtual {
  require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
  _supportedInterfaces[interfaceId] = true;
}

internal AdminControl._grantRole keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _grantRole(address account) internal {
  _controllerRoles.add(account);
}

internal AdminControl._revokeRole keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _revokeRole(address account) internal {
  _controllerRoles.remove(account);
}

internal Ownable.constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help transaction
Source Code
constructor() internal {
  address msgSender = _msgSender();
  _owner = msgSender;
  emit OwnershipTransferred(address(0), msgSender);
}

internal Context._msgSender keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function _msgSender() internal view virtual returns (address payable) {
  return msg.sender;
}

internal Context._msgData keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function _msgData() internal view virtual returns (bytes memory) {
  this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
  return msg.data;
}