Blockwell

BFH:Unit

About

Stats

Public Functions 44
Event Types 18
Code Size 27,834 bytes

Events (18) 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

MinterAdded Event

Parameters help
account
address help

MinterRemoved Event

Parameters help
account
address help

OperatorAdded Event

Parameters help
account
address help

OperatorRemoved Event

Parameters help
account
address help

OwnershipTransferred Event

Parameters help
previousOwner
address help
newOwner
address help

Paused Event

Parameters help
account
address help

SetTypeCap Event

Parameters help
_typeCap
uint256 help

SetUnitCap Event

Parameters help
_assetType
uint32 help
_unitCap
uint32 help

TokenPaused Event

Parameters help
tokenId
uint256 help

TokenPauserAdded Event

Parameters help
account
address help

TokenPauserRemoved Event

Parameters help
account
address help

TokenUnpaused Event

Parameters help
tokenId
uint256 help

Transfer Event

Parameters help
_from
address help
_to
address help
_tokenId
uint256 help

Unpaused Event

Parameters help
account
address help

UpdateApprovalProxy Event

Parameters help
_newProxyContract
address help

UpdateTokenURIPrefix Event

Parameters help
tokenUriPrefix
string help

_ERC721_RECEIVED Constant

bytes4 help
0x150b7a02

_InterfaceId_ERC721 Constant

bytes4 help
0x80ac58cd

_INTERFACE_ID_ERC165 Constant

bytes4 help
0x01ffc9a7

approvalProxy Variable

address help

tokenPauser Variable

Roles.Role help
Internal Variable

_tokenPaused Variable

mapping(uint256 => bool) help
Internal Variable

_tokenOwner Variable

mapping(uint256 => address) help
Internal Variable

_balance Variable

mapping(address => uint256) help
Internal Variable

_tokenApproved Variable

mapping(uint256 => address) help
Internal Variable

_operatorApprovals Variable

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

_supportedInterfaces Variable

mapping(bytes4 => bool) help
Internal Variable

_paused Variable

bool help
Internal Variable

operators Variable

Roles.Role help
Internal Variable

_owner Variable

address help
Internal Variable

assetTypeOffset Variable

uint32 help
Internal Variable

unitCap Variable

mapping(uint32 => uint32) help
Internal Variable

unitCount Variable

mapping(uint32 => uint32) help
Internal Variable

unitCapIsSet Variable

mapping(uint32 => bool) help
Internal Variable

assetTypeCap Variable

uint256 help
Internal Variable

assetTypeCount Variable

uint256 help
Internal Variable

totalCount Variable

uint256 help
Internal Variable

minters Variable

Roles.Role help
Internal Variable

__name Variable

string help
Internal Variable

__symbol Variable

string help
Internal Variable

__tokenUriPrefix Variable

string help
Internal Variable

Functions Expand All Collapse All

supportsInterface keyboard_arrow_up

Parameters help

Name Type
interfaceId
bytes4 help

Properties

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

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;
}

transferOwnership keyboard_arrow_up

Parameters help

Name Type
_newOwner
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOperator checks for the following:
null
Source Code
function transferOwnership(address _newOwner) public onlyOperator() {
  _transferOwnership(_newOwner);
}

isOperator keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

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

addOperator keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOperator checks for the following:
null
Source Code
function addOperator(address account) public onlyOperator() {
  operators.add(account);
  emit OperatorAdded(account);
}

removeOperator keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOperator checks for the following:
null
Source Code
function removeOperator(address account) public onlyOperator() {
  operators.remove(account);
  emit OperatorRemoved(account);
}

paused keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function paused() public view returns (bool) {
  return _paused;
}

pause keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOperator checks for the following:
null
Source Code
function pause() public onlyOperator() whenNotPaused() {
  _paused = true;
  emit Paused(msg.sender);
}

unpause keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function unpause() public onlyOperator() whenPaused() {
  _paused = false;
  emit Unpaused(msg.sender);
}

withdrawEther keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOperator checks for the following:
null
Source Code
function withdrawEther() public onlyOperator() {
  msg.sender.transfer(address(this).balance);
}

Parameters help

Name Type
_owner
address help

Properties

Visibility help public
Mutability help view
Source Code
function balanceOf(address _owner) public view returns (uint256) {
  return _balance[_owner];
}

ownerOf keyboard_arrow_up

Parameters help

Name Type
_tokenId
uint256 help

Properties

Visibility help public
Mutability help view

Requirements help

null
Source Code
function ownerOf(uint256 _tokenId) public view returns (address) {
  require(_exist(_tokenId), "`_tokenId` is not a valid NFT.");
  return _tokenOwner[_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 payable
Source Code
function safeTransferFrom(
  address _from,
  address _to,
  uint256 _tokenId,
  bytes memory _data
) public payable whenNotPaused() whenNotTokenPaused(_tokenId) {
  super.safeTransferFrom(_from, _to, _tokenId, _data);
}

safeTransferFrom keyboard_arrow_up

Parameters help

Name Type
_from
address help
_to
address help
_tokenId
uint256 help

Properties

Visibility help public
Mutability help payable
Source Code
function safeTransferFrom(
  address _from,
  address _to,
  uint256 _tokenId
) public payable whenNotPaused() whenNotTokenPaused(_tokenId) {
  super.safeTransferFrom(_from, _to, _tokenId);
}

Parameters help

Name Type
_from
address help
_to
address help
_tokenId
uint256 help

Properties

Visibility help public
Mutability help payable
Source Code
function transferFrom(
  address _from,
  address _to,
  uint256 _tokenId
) public payable whenNotPaused() whenNotTokenPaused(_tokenId) {
  super.transferFrom(_from, _to, _tokenId);
}

Parameters help

Name Type
_approved
address help
_tokenId
uint256 help

Properties

Visibility help public
Mutability help payable

Requirements help

Source Code
function approve(address _approved, uint256 _tokenId) public payable {
  address owner = ownerOf(_tokenId);
  require(
    msg.sender == owner || isApprovedForAll(owner, msg.sender),
    "Unless `msg.sender` is the current NFT owner, or an authorized operator of the current owner."
  );

  _tokenApproved[_tokenId] = _approved;
  emit Approval(msg.sender, _approved, _tokenId);
}

setApprovalForAll keyboard_arrow_up

Parameters help

Name Type
_spender
address help
_approved
bool help

Properties

Visibility help public
Mutability help transaction
Source Code
function setApprovalForAll(address _spender, bool _approved) public {
  if (address(approvalProxy) != address(0x0) && _spender.isContract()) {
    approvalProxy.setApprovalForAll(msg.sender, _spender, _approved);
  }
  super.setApprovalForAll(_spender, _approved);
}

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 returns (address) {
  require(_exist(_tokenId), "`_tokenId` is not a valid NFT.");
  return _tokenApproved[_tokenId];
}

isApprovedForAll keyboard_arrow_up

Parameters help

Name Type
_owner
address help
_spender
address help

Properties

Visibility help public
Mutability help view
Source Code
function isApprovedForAll(address _owner, address _spender)
  public
  view
  returns (bool)
{
  bool original = super.isApprovedForAll(_owner, _spender);
  if (address(approvalProxy) != address(0x0)) {
    return approvalProxy.isApprovedForAll(_owner, _spender, original);
  }
  return original;
}

setTokenURIPrefix keyboard_arrow_up

Parameters help

Name Type
_tokenUriPrefix
string help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOperator checks for the following:
null
Source Code
function setTokenURIPrefix(string memory _tokenUriPrefix)
  public
  onlyOperator()
{
  __tokenUriPrefix = _tokenUriPrefix;
  emit UpdateTokenURIPrefix(_tokenUriPrefix);
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function name() public view 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 returns (string memory) {
  return __symbol;
}

tokenURI keyboard_arrow_up

Parameters help

Name Type
_tokenId
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
function tokenURI(uint256 _tokenId) public view returns (string memory) {
  return __tokenUriPrefix.concat(_tokenId.toString());
}

isMinter keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

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

addMinter keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOperator checks for the following:
null
Source Code
function addMinter(address account) public onlyOperator() {
  minters.add(account);
  emit MinterAdded(account);
}

removeMinter keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOperator checks for the following:
null
Source Code
function removeMinter(address account) public onlyOperator() {
  minters.remove(account);
  emit MinterRemoved(account);
}

exist keyboard_arrow_up

Parameters help

Name Type
tokenId
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
function exist(uint256 tokenId) public view returns (bool) {
  return _exist(tokenId);
}

mint keyboard_arrow_up

Parameters help

Name Type
_to
address help
_tokenId
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyMinter checks for the following:
null
Source Code
function mint(address _to, uint256 _tokenId) public onlyMinter() {
  require(_tokenId.mod(assetTypeOffset) != 0, "Index must not be 0");
  uint32 assetType = uint32(_tokenId.div(assetTypeOffset));
  unitCount[assetType] = unitCount[assetType].add(1);
  totalCount = totalCount.add(1);
  require(
    unitCount[assetType] <= getUnitCap(assetType),
    "Asset unit cap is exceed"
  );
  super.mint(_to, _tokenId);
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function totalSupply() public view returns (uint256) {
  return totalCount;
}

getTypeOffset keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function getTypeOffset() public view returns (uint256) {
  return assetTypeOffset;
}

setTypeCap keyboard_arrow_up

Parameters help

Name Type
_newTypeCap
uint32 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyMinter checks for the following:
null
Source Code
function setTypeCap(uint32 _newTypeCap) public onlyMinter() {
  require(
    _newTypeCap < assetTypeCap,
    "New type cap cannot be less than existing type cap"
  );
  require(
    _newTypeCap >= assetTypeCount,
    "New type cap must be more than current type count"
  );
  assetTypeCap = _newTypeCap;
  emit SetTypeCap(_newTypeCap);
}

getTypeCap keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function getTypeCap() public view returns (uint256) {
  return assetTypeCap;
}

getTypeCount keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function getTypeCount() public view returns (uint256) {
  return assetTypeCount;
}

existingType keyboard_arrow_up

Parameters help

Name Type
_assetType
uint32 help

Properties

Visibility help public
Mutability help view
Source Code
function existingType(uint32 _assetType) public view returns (bool) {
  return unitCapIsSet[_assetType];
}

setUnitCap keyboard_arrow_up

Parameters help

Name Type
_assetType
uint32 help
_newUnitCap
uint32 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyMinter checks for the following:
null
Source Code
function setUnitCap(uint32 _assetType, uint32 _newUnitCap) public onlyMinter() {
  require(_assetType != 0, "Asset Type must not be 0");
  require(
    _newUnitCap < assetTypeOffset,
    "New unit cap must be less than asset type offset"
  );

  if (!existingType(_assetType)) {
    unitCapIsSet[_assetType] = true;
    assetTypeCount = assetTypeCount.add(1);
    require(assetTypeCount <= assetTypeCap, "Asset type cap is exceeded");
  } else {
    require(
      _newUnitCap < getUnitCap(_assetType),
      "New unit cap must be less than previous unit cap"
    );
    require(
      _newUnitCap >= getUnitCount(_assetType),
      "New unit cap must be more than current unit count"
    );
  }

  unitCap[_assetType] = _newUnitCap;
  emit SetUnitCap(_assetType, _newUnitCap);
}

getUnitCap keyboard_arrow_up

Parameters help

Name Type
_assetType
uint32 help

Properties

Visibility help public
Mutability help view

Requirements help

null
Source Code
function getUnitCap(uint32 _assetType) public view returns (uint32) {
  require(existingType(_assetType), "Asset type does not exist");
  return unitCap[_assetType];
}

getUnitCount keyboard_arrow_up

Parameters help

Name Type
_assetType
uint32 help

Properties

Visibility help public
Mutability help view
Source Code
function getUnitCount(uint32 _assetType) public view returns (uint32) {
  return unitCount[_assetType];
}

pauseToken keyboard_arrow_up

Parameters help

Name Type
_tokenId
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyTokenPauser checks for the following:
null

Requirements help

Source Code
function pauseToken(uint256 _tokenId) public onlyTokenPauser() {
  require(!isTokenPaused(_tokenId), "Token is already paused");
  _tokenPaused[_tokenId] = true;
  emit TokenPaused(_tokenId);
}

unpauseToken keyboard_arrow_up

Parameters help

Name Type
_tokenId
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyTokenPauser checks for the following:
null

Requirements help

null
Source Code
function unpauseToken(uint256 _tokenId) public onlyTokenPauser() {
  require(isTokenPaused(_tokenId), "Token is not paused");
  _tokenPaused[_tokenId] = false;
  emit TokenUnpaused(_tokenId);
}

isTokenPaused keyboard_arrow_up

Parameters help

Name Type
_tokenId
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
function isTokenPaused(uint256 _tokenId) public view returns (bool) {
  return _tokenPaused[_tokenId];
}

isTokenPauser keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

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

addTokenPauser keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOperator checks for the following:
null
Source Code
function addTokenPauser(address account) public onlyOperator() {
  tokenPauser.add(account);
  emit TokenPauserAdded(account);
}

removeTokenPauser keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOperator checks for the following:
null
Source Code
function removeTokenPauser(address account) public onlyOperator() {
  tokenPauser.remove(account);
  emit TokenPauserRemoved(account);
}

setApprovalProxy keyboard_arrow_up

Parameters help

Name Type
_new
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOperator checks for the following:
null
Source Code
function setApprovalProxy(address _new) public onlyOperator() {
  approvalProxy = IApprovalProxy(_new);
  emit UpdateApprovalProxy(_new);
}

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 ERC721._setApprovalForAll keyboard_arrow_up

Parameters help

Name Type
_owner
address help
_operator
address help
_approved
bool help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _setApprovalForAll(
  address _owner,
  address _operator,
  bool _approved
) internal {
  _operatorApprovals[_owner][_operator] = _approved;
  emit ApprovalForAll(_owner, _operator, _approved);
}

internal ERC721._isApprovedForAll keyboard_arrow_up

Parameters help

Name Type
_owner
address help
_operator
address help

Properties

Visibility help internal
Mutability help view
Source Code
function _isApprovedForAll(address _owner, address _operator)
  internal
  view
  returns (bool)
{
  return _operatorApprovals[_owner][_operator];
}

internal ERC721._transferable keyboard_arrow_up

Parameters help

Name Type
_spender
address help
_tokenId
uint256 help

Properties

Visibility help internal
Mutability help view
Source Code
function _transferable(address _spender, uint256 _tokenId)
  internal
  view
  returns (bool)
{
  address owner = ownerOf(_tokenId);
  return (_spender == owner ||
    getApproved(_tokenId) == _spender ||
    isApprovedForAll(owner, _spender));
}

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
Source Code
function _transfer(
  address _from,
  address _to,
  uint256 _tokenId
) internal {
  _clearApproval(_tokenId);
  _tokenOwner[_tokenId] = _to;
  _balance[_from] = _balance[_from].sub(1);
  _balance[_to] = _balance[_to].add(1);
  emit Transfer(_from, _to, _tokenId);
}

internal ERC721._mint keyboard_arrow_up

Parameters help

Name Type
_to
address help
_tokenId
uint256 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _mint(address _to, uint256 _tokenId) internal {
  require(!_exist(_tokenId), "mint token already exists");
  _tokenOwner[_tokenId] = _to;
  _balance[_to] = _balance[_to].add(1);
  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

Requirements help

null
Source Code
function _burn(uint256 _tokenId) internal {
  require(_exist(_tokenId), "burn token does not already exists");
  address owner = ownerOf(_tokenId);
  _clearApproval(_tokenId);
  _tokenOwner[_tokenId] = address(0);
  _balance[owner] = _balance[owner].sub(1);
  emit Transfer(owner, address(0), _tokenId);
}

internal ERC721._exist keyboard_arrow_up

Parameters help

Name Type
_tokenId
uint256 help

Properties

Visibility help internal
Mutability help view
Source Code
function _exist(uint256 _tokenId) internal view returns (bool) {
  address owner = _tokenOwner[_tokenId];
  return owner != address(0);
}

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 internal
Mutability help transaction
Source Code
function _checkOnERC721Received(
  address _from,
  address _to,
  uint256 _tokenId,
  bytes memory _data
) internal returns (bool) {
  if (!_to.isContract()) {
    return true;
  }
  bytes4 retval = IERC721TokenReceiver(_to).onERC721Received(
    msg.sender,
    _from,
    _tokenId,
    _data
  );
  return (retval == _ERC721_RECEIVED);
}

internal ERC721._clearApproval keyboard_arrow_up

Parameters help

Name Type
tokenId
uint256 help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _clearApproval(uint256 tokenId) internal {
  if (_tokenApproved[tokenId] != address(0)) {
    _tokenApproved[tokenId] = address(0);
  }
}

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 {
  _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 {
  require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
  _supportedInterfaces[interfaceId] = true;
}

internal ERC173._transferOwnership keyboard_arrow_up

Parameters help

Name Type
_newOwner
address help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _transferOwnership(address _newOwner) internal {
  address previousOwner = owner();
  _owner = _newOwner;
  emit OwnershipTransferred(previousOwner, _newOwner);
}

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 {
  _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 {
  require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
  _supportedInterfaces[interfaceId] = true;
}

internal ERC721CappedSupply.isValidOffset keyboard_arrow_up

Parameters help

Name Type
_offset
uint32 help

Properties

Visibility help private
Mutability help pure
Source Code
function isValidOffset(uint32 _offset) private pure returns (bool) {
  for (uint32 i = _offset; i > 0; i = i.div(10)) {
    if (i == 10) {
      return true;
    }
    if (i.mod(10) != 0) {
      return false;
    }
  }
  return false;
}

internal ERC721CappedSupply.setTypeOffset keyboard_arrow_up

Parameters help

Name Type
_assetTypeOffset
uint32 help

Properties

Visibility help private
Mutability help transaction

Requirements help

null
Source Code
function setTypeOffset(uint32 _assetTypeOffset) private {
  require(isValidOffset(_assetTypeOffset), "Offset is invalid");
  assetTypeCap = assetTypeCap / _assetTypeOffset;
  assetTypeOffset = _assetTypeOffset;
}

internal ERC721._setApprovalForAll keyboard_arrow_up

Parameters help

Name Type
_owner
address help
_operator
address help
_approved
bool help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _setApprovalForAll(
  address _owner,
  address _operator,
  bool _approved
) internal {
  _operatorApprovals[_owner][_operator] = _approved;
  emit ApprovalForAll(_owner, _operator, _approved);
}

internal ERC721._isApprovedForAll keyboard_arrow_up

Parameters help

Name Type
_owner
address help
_operator
address help

Properties

Visibility help internal
Mutability help view
Source Code
function _isApprovedForAll(address _owner, address _operator)
  internal
  view
  returns (bool)
{
  return _operatorApprovals[_owner][_operator];
}

internal ERC721._transferable keyboard_arrow_up

Parameters help

Name Type
_spender
address help
_tokenId
uint256 help

Properties

Visibility help internal
Mutability help view
Source Code
function _transferable(address _spender, uint256 _tokenId)
  internal
  view
  returns (bool)
{
  address owner = ownerOf(_tokenId);
  return (_spender == owner ||
    getApproved(_tokenId) == _spender ||
    isApprovedForAll(owner, _spender));
}

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
Source Code
function _transfer(
  address _from,
  address _to,
  uint256 _tokenId
) internal {
  _clearApproval(_tokenId);
  _tokenOwner[_tokenId] = _to;
  _balance[_from] = _balance[_from].sub(1);
  _balance[_to] = _balance[_to].add(1);
  emit Transfer(_from, _to, _tokenId);
}

internal ERC721._mint keyboard_arrow_up

Parameters help

Name Type
_to
address help
_tokenId
uint256 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _mint(address _to, uint256 _tokenId) internal {
  require(!_exist(_tokenId), "mint token already exists");
  _tokenOwner[_tokenId] = _to;
  _balance[_to] = _balance[_to].add(1);
  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

Requirements help

null
Source Code
function _burn(uint256 _tokenId) internal {
  require(_exist(_tokenId), "burn token does not already exists");
  address owner = ownerOf(_tokenId);
  _clearApproval(_tokenId);
  _tokenOwner[_tokenId] = address(0);
  _balance[owner] = _balance[owner].sub(1);
  emit Transfer(owner, address(0), _tokenId);
}

internal ERC721._exist keyboard_arrow_up

Parameters help

Name Type
_tokenId
uint256 help

Properties

Visibility help internal
Mutability help view
Source Code
function _exist(uint256 _tokenId) internal view returns (bool) {
  address owner = _tokenOwner[_tokenId];
  return owner != address(0);
}

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 internal
Mutability help transaction
Source Code
function _checkOnERC721Received(
  address _from,
  address _to,
  uint256 _tokenId,
  bytes memory _data
) internal returns (bool) {
  if (!_to.isContract()) {
    return true;
  }
  bytes4 retval = IERC721TokenReceiver(_to).onERC721Received(
    msg.sender,
    _from,
    _tokenId,
    _data
  );
  return (retval == _ERC721_RECEIVED);
}

internal ERC721._clearApproval keyboard_arrow_up

Parameters help

Name Type
tokenId
uint256 help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _clearApproval(uint256 tokenId) internal {
  if (_tokenApproved[tokenId] != address(0)) {
    _tokenApproved[tokenId] = address(0);
  }
}

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 {
  _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 {
  require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
  _supportedInterfaces[interfaceId] = true;
}

internal ERC173._transferOwnership keyboard_arrow_up

Parameters help

Name Type
_newOwner
address help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _transferOwnership(address _newOwner) internal {
  address previousOwner = owner();
  _owner = _newOwner;
  emit OwnershipTransferred(previousOwner, _newOwner);
}

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 {
  _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 {
  require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
  _supportedInterfaces[interfaceId] = true;
}

internal ERC721._setApprovalForAll keyboard_arrow_up

Parameters help

Name Type
_owner
address help
_operator
address help
_approved
bool help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _setApprovalForAll(
  address _owner,
  address _operator,
  bool _approved
) internal {
  _operatorApprovals[_owner][_operator] = _approved;
  emit ApprovalForAll(_owner, _operator, _approved);
}

internal ERC721._isApprovedForAll keyboard_arrow_up

Parameters help

Name Type
_owner
address help
_operator
address help

Properties

Visibility help internal
Mutability help view
Source Code
function _isApprovedForAll(address _owner, address _operator)
  internal
  view
  returns (bool)
{
  return _operatorApprovals[_owner][_operator];
}

internal ERC721._transferable keyboard_arrow_up

Parameters help

Name Type
_spender
address help
_tokenId
uint256 help

Properties

Visibility help internal
Mutability help view
Source Code
function _transferable(address _spender, uint256 _tokenId)
  internal
  view
  returns (bool)
{
  address owner = ownerOf(_tokenId);
  return (_spender == owner ||
    getApproved(_tokenId) == _spender ||
    isApprovedForAll(owner, _spender));
}

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
Source Code
function _transfer(
  address _from,
  address _to,
  uint256 _tokenId
) internal {
  _clearApproval(_tokenId);
  _tokenOwner[_tokenId] = _to;
  _balance[_from] = _balance[_from].sub(1);
  _balance[_to] = _balance[_to].add(1);
  emit Transfer(_from, _to, _tokenId);
}

internal ERC721._mint keyboard_arrow_up

Parameters help

Name Type
_to
address help
_tokenId
uint256 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _mint(address _to, uint256 _tokenId) internal {
  require(!_exist(_tokenId), "mint token already exists");
  _tokenOwner[_tokenId] = _to;
  _balance[_to] = _balance[_to].add(1);
  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

Requirements help

null
Source Code
function _burn(uint256 _tokenId) internal {
  require(_exist(_tokenId), "burn token does not already exists");
  address owner = ownerOf(_tokenId);
  _clearApproval(_tokenId);
  _tokenOwner[_tokenId] = address(0);
  _balance[owner] = _balance[owner].sub(1);
  emit Transfer(owner, address(0), _tokenId);
}

internal ERC721._exist keyboard_arrow_up

Parameters help

Name Type
_tokenId
uint256 help

Properties

Visibility help internal
Mutability help view
Source Code
function _exist(uint256 _tokenId) internal view returns (bool) {
  address owner = _tokenOwner[_tokenId];
  return owner != address(0);
}

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 internal
Mutability help transaction
Source Code
function _checkOnERC721Received(
  address _from,
  address _to,
  uint256 _tokenId,
  bytes memory _data
) internal returns (bool) {
  if (!_to.isContract()) {
    return true;
  }
  bytes4 retval = IERC721TokenReceiver(_to).onERC721Received(
    msg.sender,
    _from,
    _tokenId,
    _data
  );
  return (retval == _ERC721_RECEIVED);
}

internal ERC721._clearApproval keyboard_arrow_up

Parameters help

Name Type
tokenId
uint256 help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _clearApproval(uint256 tokenId) internal {
  if (_tokenApproved[tokenId] != address(0)) {
    _tokenApproved[tokenId] = address(0);
  }
}

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 {
  _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 {
  require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
  _supportedInterfaces[interfaceId] = true;
}

internal ERC173._transferOwnership keyboard_arrow_up

Parameters help

Name Type
_newOwner
address help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _transferOwnership(address _newOwner) internal {
  address previousOwner = owner();
  _owner = _newOwner;
  emit OwnershipTransferred(previousOwner, _newOwner);
}

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 {
  _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 {
  require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
  _supportedInterfaces[interfaceId] = true;
}