MyCryptoHeroes:Land
About
Stats
Public Functions
43
Event Types
10
Code Size
46,075 bytes
Events (10) keyboard_arrow_up
Constants (12) keyboard_arrow_up
Functions
isPauser keyboard_arrow_up
addPauser keyboard_arrow_up
renouncePauser keyboard_arrow_up
paused keyboard_arrow_up
pause keyboard_arrow_up
unpause keyboard_arrow_up
balanceOf keyboard_arrow_up
Source Code
function balanceOf(address owner) public view returns (uint256) {
require(owner != address(0));
return _ownedTokensCount[owner];
}
ownerOf keyboard_arrow_up
Source Code
function ownerOf(uint256 tokenId) public view returns (address) {
address owner = _tokenOwner[tokenId];
require(owner != address(0));
return owner;
}
approve keyboard_arrow_up
Requirements help
Source Code
function approve(address _to, uint256 _tokenId) public {
require(allowed[_tokenId]);
super.approve(_to, _tokenId);
}
getApproved keyboard_arrow_up
setApprovalForAll keyboard_arrow_up
Requirements help
Source Code
function setApprovalForAll(address to, bool approved) public whenNotPaused {
super.setApprovalForAll(to, approved);
}
isApprovedForAll keyboard_arrow_up
transferFrom keyboard_arrow_up
Requirements help
Source Code
function transferFrom(
address _from,
address _to,
uint256 _tokenId
) public {
require(allowed[_tokenId]);
super.transferFrom(_from, _to, _tokenId);
}
safeTransferFrom keyboard_arrow_up
Requirements help
Source Code
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public {
safeTransferFrom(from, to, tokenId, "");
}
safeTransferFrom keyboard_arrow_up
Requirements help
Source Code
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public {
transferFrom(from, to, tokenId);
require(_checkOnERC721Received(from, to, tokenId, _data));
}
supportsInterface keyboard_arrow_up
isMinter keyboard_arrow_up
addMinter keyboard_arrow_up
renounceMinter keyboard_arrow_up
mint keyboard_arrow_up
name keyboard_arrow_up
symbol keyboard_arrow_up
tokenURI keyboard_arrow_up
Source Code
function tokenURI(uint256 _tokenId) public view returns (string memory) {
bytes32 tokenIdBytes;
if (_tokenId == 0) {
tokenIdBytes = "0";
} else {
uint256 value = _tokenId;
while (value > 0) {
tokenIdBytes = bytes32(uint256(tokenIdBytes) / (2**8));
tokenIdBytes |= bytes32(((value % 10) + 48) * 2**(8 * 31));
value /= 10;
}
}
bytes memory prefixBytes = bytes(tokenURIPrefix);
bytes memory tokenURIBytes = new bytes(
prefixBytes.length + tokenIdBytes.length
);
uint8 i;
uint8 index = 0;
for (i = 0; i < prefixBytes.length; i++) {
tokenURIBytes[index] = prefixBytes[i];
index++;
}
for (i = 0; i < tokenIdBytes.length; i++) {
tokenURIBytes[index] = tokenIdBytes[i];
index++;
}
return string(tokenURIBytes);
}
totalSupply keyboard_arrow_up
tokenOfOwnerByIndex keyboard_arrow_up
Source Code
function tokenOfOwnerByIndex(address owner, uint256 index)
public
view
returns (uint256)
{
require(index < balanceOf(owner));
return _ownedTokens[owner][index];
}
tokenByIndex keyboard_arrow_up
Requirements help
Source Code
function tokenByIndex(uint256 index) public view returns (uint256) {
require(index < totalSupply());
return _allTokens[index];
}
setSupplyAndSector keyboard_arrow_up
Parameters help
Modifiers help
onlyMinter checks for the following:
null
Requirements help
Source Code
function setSupplyAndSector(
uint16 _landType,
uint256 _totalVolume,
uint256 _sectorSupplyLimit,
uint256 legendarySupply,
uint256 epicSupply,
uint256 rareSupply,
uint256 uncommonSupply,
uint256 commonSupply
) external onlyMinter {
require(_landType != 0, "landType 0 is noland");
require(_totalVolume != 0, "totalVolume must not be 0");
require(getMintedSectorCount(_landType) == 0, "This LandType already exists");
require(
legendarySupply
.mul(rarityToSectorVolume[LEGENDARY_RARITY])
.add(epicSupply.mul(rarityToSectorVolume[EPIC_RARITY]))
.add(rareSupply.mul(rarityToSectorVolume[RARE_RARITY]))
.add(uncommonSupply.mul(rarityToSectorVolume[UNCOMMON_RARITY]))
.add(commonSupply.mul(rarityToSectorVolume[COMMON_RARITY])) == _totalVolume
);
require(
legendarySupply.add(epicSupply).add(rareSupply).add(uncommonSupply).add(
commonSupply
) == _sectorSupplyLimit
);
landTypeToTotalVolume[_landType] = _totalVolume;
landTypeToSectorSupplyLimit[_landType] = _sectorSupplyLimit;
landTypeAndRarityToSectorSupply[_landType][
LEGENDARY_RARITY
] = legendarySupply;
landTypeAndRarityToSectorSupply[_landType][EPIC_RARITY] = epicSupply;
landTypeAndRarityToSectorSupply[_landType][RARE_RARITY] = rareSupply;
landTypeAndRarityToSectorSupply[_landType][UNCOMMON_RARITY] = uncommonSupply;
landTypeAndRarityToSectorSupply[_landType][COMMON_RARITY] = commonSupply;
}
unLockToken keyboard_arrow_up
setTokenURIPrefix keyboard_arrow_up
Modifiers help
onlyMinter checks for the following:
null
Source Code
function setTokenURIPrefix(string calldata _tokenURIPrefix)
external
onlyMinter
{
tokenURIPrefix = _tokenURIPrefix;
}
isAlreadyMinted keyboard_arrow_up
isValidLandSector keyboard_arrow_up
Source Code
function isValidLandSector(uint256 _tokenId) public view returns (bool) {
uint16 rarity = getRarity(_tokenId);
if (!(rarityToSectorVolume[rarity] > 0)) {
return false;
}
uint16 landType = getLandType(_tokenId);
if (!(landTypeToTotalVolume[landType] > 0)) {
return false;
}
uint256 serial = _tokenId % 10000;
if (serial == 0) {
return false;
}
if (serial > landTypeAndRarityToSectorSupply[landType][rarity]) {
return false;
}
return true;
}
canTransfer keyboard_arrow_up
getTotalVolume keyboard_arrow_up
getSectorSupplyLimit keyboard_arrow_up
getLandType keyboard_arrow_up
getRarity keyboard_arrow_up
getMintedSectorCount keyboard_arrow_up
getMintedSectorCountByRarity keyboard_arrow_up
Source Code
function getMintedSectorCountByRarity(uint16 _landType, uint16 _rarity)
public
view
returns (uint256)
{
return landTypeAndRarityToLandSectorCount[_landType][_rarity];
}
getSectorSupplyByRarity keyboard_arrow_up
getMintedSectorList keyboard_arrow_up
getSectorVolumeByRarity keyboard_arrow_up
getShareRateWithDecimal keyboard_arrow_up
Source Code
function getShareRateWithDecimal(uint256 _landSector)
public
view
returns (uint256, uint256)
{
return (
getSectorVolumeByRarity(getRarity(_landSector)).mul(SHARE_RATE_DECIMAL).div(
getTotalVolume(getLandType(_landSector))
),
SHARE_RATE_DECIMAL
);
}
mintLandSector keyboard_arrow_up
Modifiers help
onlyMinter checks for the following:
null
Requirements help
null
landTypeAndRarityToLandSectorCount for _landType for rarity
must be less than
landTypeAndRarityToSectorSupply for _landType for rarity
Source Code
function mintLandSector(
address _owner,
uint256 _landSector,
bytes32 _eventHash
) public onlyMinter {
require(!isAlreadyMinted(_landSector));
require(isValidLandSector(_landSector));
uint16 _landType = getLandType(_landSector);
require(
landTypeToLandSectorIndex[_landType] <
landTypeToSectorSupplyLimit[_landType]
);
uint16 rarity = getRarity(_landSector);
require(
landTypeAndRarityToLandSectorCount[_landType][rarity] <
landTypeAndRarityToSectorSupply[_landType][rarity],
"supply over"
);
_mint(_owner, _landSector);
landTypeToLandSectorList[_landType].push(_landSector);
landTypeToLandSectorIndex[_landType]++;
landTypeAndRarityToLandSectorCount[_landType][rarity]++;
emit MintEvent(_owner, _landSector, block.timestamp, _eventHash);
}
Internal Functions
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._exists keyboard_arrow_up
internal ERC721._isApprovedOrOwner keyboard_arrow_up
Source Code
function _isApprovedOrOwner(address spender, uint256 tokenId)
internal
view
returns (bool)
{
address owner = ownerOf(tokenId);
return (spender == owner ||
getApproved(tokenId) == spender ||
isApprovedForAll(owner, spender));
}
internal ERC721._mint keyboard_arrow_up
Requirements help
Source Code
function _mint(address to, uint256 tokenId) internal {
require(to != address(0));
require(!_exists(tokenId));
_tokenOwner[tokenId] = to;
_ownedTokensCount[to] = _ownedTokensCount[to].add(1);
emit Transfer(address(0), to, tokenId);
}
internal ERC721._burn keyboard_arrow_up
Source Code
function _burn(address owner, uint256 tokenId) internal {
require(ownerOf(tokenId) == owner);
_clearApproval(tokenId);
_ownedTokensCount[owner] = _ownedTokensCount[owner].sub(1);
_tokenOwner[tokenId] = address(0);
emit Transfer(owner, address(0), tokenId);
}
internal ERC721._burn keyboard_arrow_up
Requirements help
Source Code
function _burn(uint256 tokenId) internal {
_burn(ownerOf(tokenId), tokenId);
}
internal ERC721._transferFrom keyboard_arrow_up
Requirements help
Source Code
function _transferFrom(
address from,
address to,
uint256 tokenId
) internal {
require(ownerOf(tokenId) == from);
require(to != address(0));
_clearApproval(tokenId);
_ownedTokensCount[from] = _ownedTokensCount[from].sub(1);
_ownedTokensCount[to] = _ownedTokensCount[to].add(1);
_tokenOwner[tokenId] = to;
emit Transfer(from, to, tokenId);
}
internal ERC721._checkOnERC721Received keyboard_arrow_up
Source Code
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) internal returns (bool) {
if (!to.isContract()) {
return true;
}
bytes4 retval = IERC721Receiver(to).onERC721Received(
msg.sender,
from,
tokenId,
_data
);
return (retval == _ERC721_RECEIVED);
}
internal ERC721._clearApproval keyboard_arrow_up
internal ERC165.constructor keyboard_arrow_up
internal ERC165._registerInterface keyboard_arrow_up
Requirements help
Source Code
function _registerInterface(bytes4 interfaceId) internal {
require(interfaceId != 0xffffffff);
_supportedInterfaces[interfaceId] = true;
}
internal ERC721Enumerable._transferFrom keyboard_arrow_up
Requirements help
Source Code
function _transferFrom(
address from,
address to,
uint256 tokenId
) internal {
super._transferFrom(from, to, tokenId);
_removeTokenFromOwnerEnumeration(from, tokenId);
_addTokenToOwnerEnumeration(to, tokenId);
}
internal ERC721Enumerable._mint keyboard_arrow_up
Requirements help
Source Code
function _mint(address to, uint256 tokenId) internal {
super._mint(to, tokenId);
_addTokenToOwnerEnumeration(to, tokenId);
_addTokenToAllTokensEnumeration(tokenId);
}
internal ERC721Enumerable._burn keyboard_arrow_up
Requirements help
Source Code
function _burn(address owner, uint256 tokenId) internal {
super._burn(owner, tokenId);
_removeTokenFromOwnerEnumeration(owner, tokenId);
// Since tokenId will be deleted, we can clear its slot in _ownedTokensIndex to trigger a gas refund
_ownedTokensIndex[tokenId] = 0;
_removeTokenFromAllTokensEnumeration(tokenId);
}
internal ERC721Enumerable._tokensOfOwner keyboard_arrow_up
internal ERC721Enumerable._addTokenToOwnerEnumeration keyboard_arrow_up
Source Code
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
_ownedTokensIndex[tokenId] = _ownedTokens[to].length;
_ownedTokens[to].push(tokenId);
}
internal ERC721Enumerable._addTokenToAllTokensEnumeration keyboard_arrow_up
internal ERC721Enumerable._removeTokenFromOwnerEnumeration keyboard_arrow_up
Source Code
function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId)
private
{
// To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = _ownedTokens[from].length.sub(1);
uint256 tokenIndex = _ownedTokensIndex[tokenId];
// When the token to delete is the last token, the swap operation is unnecessary
if (tokenIndex != lastTokenIndex) {
uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];
_ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
_ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
}
// This also deletes the contents at the last position of the array
_ownedTokens[from].length--;
// Note that _ownedTokensIndex[tokenId] hasn't been cleared: it still points to the old slot (now occcupied by
// lasTokenId, or just over the end of the array if the token was the last one).
}
internal ERC721Enumerable._removeTokenFromAllTokensEnumeration keyboard_arrow_up
Source Code
function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
// To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = _allTokens.length.sub(1);
uint256 tokenIndex = _allTokensIndex[tokenId];
// When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
// rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
// an 'if' statement (like in _removeTokenFromOwnerEnumeration)
uint256 lastTokenId = _allTokens[lastTokenIndex];
_allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
_allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
// This also deletes the contents at the last position of the array
_allTokens.length--;
_allTokensIndex[tokenId] = 0;
}
internal ERC165.constructor keyboard_arrow_up
internal ERC165._registerInterface keyboard_arrow_up
Requirements help
Source Code
function _registerInterface(bytes4 interfaceId) internal {
require(interfaceId != 0xffffffff);
_supportedInterfaces[interfaceId] = true;
}
internal ERC721._exists keyboard_arrow_up
internal ERC721._isApprovedOrOwner keyboard_arrow_up
Source Code
function _isApprovedOrOwner(address spender, uint256 tokenId)
internal
view
returns (bool)
{
address owner = ownerOf(tokenId);
return (spender == owner ||
getApproved(tokenId) == spender ||
isApprovedForAll(owner, spender));
}
internal ERC721._mint keyboard_arrow_up
Requirements help
Source Code
function _mint(address to, uint256 tokenId) internal {
require(to != address(0));
require(!_exists(tokenId));
_tokenOwner[tokenId] = to;
_ownedTokensCount[to] = _ownedTokensCount[to].add(1);
emit Transfer(address(0), to, tokenId);
}
internal ERC721._burn keyboard_arrow_up
Requirements help
Source Code
function _burn(address owner, uint256 tokenId) internal {
require(ownerOf(tokenId) == owner);
_clearApproval(tokenId);
_ownedTokensCount[owner] = _ownedTokensCount[owner].sub(1);
_tokenOwner[tokenId] = address(0);
emit Transfer(owner, address(0), tokenId);
}
internal ERC721._burn keyboard_arrow_up
Requirements help
Source Code
function _burn(uint256 tokenId) internal {
_burn(ownerOf(tokenId), tokenId);
}
internal ERC721._transferFrom keyboard_arrow_up
Requirements help
Source Code
function _transferFrom(
address from,
address to,
uint256 tokenId
) internal {
require(ownerOf(tokenId) == from);
require(to != address(0));
_clearApproval(tokenId);
_ownedTokensCount[from] = _ownedTokensCount[from].sub(1);
_ownedTokensCount[to] = _ownedTokensCount[to].add(1);
_tokenOwner[tokenId] = to;
emit Transfer(from, to, tokenId);
}
internal ERC721._checkOnERC721Received keyboard_arrow_up
Source Code
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) internal returns (bool) {
if (!to.isContract()) {
return true;
}
bytes4 retval = IERC721Receiver(to).onERC721Received(
msg.sender,
from,
tokenId,
_data
);
return (retval == _ERC721_RECEIVED);
}
internal ERC721._clearApproval keyboard_arrow_up
internal ERC165.constructor keyboard_arrow_up
internal ERC165._registerInterface keyboard_arrow_up
Requirements help
Source Code
function _registerInterface(bytes4 interfaceId) internal {
require(interfaceId != 0xffffffff);
_supportedInterfaces[interfaceId] = true;
}
internal ERC721Metadata._setTokenURI keyboard_arrow_up
internal ERC721Metadata._burn keyboard_arrow_up
Requirements help
Source Code
function _burn(address owner, uint256 tokenId) internal {
super._burn(owner, tokenId);
// Clear metadata (if any)
if (bytes(_tokenURIs[tokenId]).length != 0) {
delete _tokenURIs[tokenId];
}
}
internal ERC165.constructor keyboard_arrow_up
internal ERC165._registerInterface keyboard_arrow_up
Requirements help
Source Code
function _registerInterface(bytes4 interfaceId) internal {
require(interfaceId != 0xffffffff);
_supportedInterfaces[interfaceId] = true;
}
internal ERC721._exists keyboard_arrow_up
internal ERC721._isApprovedOrOwner keyboard_arrow_up
Source Code
function _isApprovedOrOwner(address spender, uint256 tokenId)
internal
view
returns (bool)
{
address owner = ownerOf(tokenId);
return (spender == owner ||
getApproved(tokenId) == spender ||
isApprovedForAll(owner, spender));
}
internal ERC721._mint keyboard_arrow_up
Requirements help
Source Code
function _mint(address to, uint256 tokenId) internal {
require(to != address(0));
require(!_exists(tokenId));
_tokenOwner[tokenId] = to;
_ownedTokensCount[to] = _ownedTokensCount[to].add(1);
emit Transfer(address(0), to, tokenId);
}
internal ERC721._burn keyboard_arrow_up
Requirements help
Source Code
function _burn(address owner, uint256 tokenId) internal {
require(ownerOf(tokenId) == owner);
_clearApproval(tokenId);
_ownedTokensCount[owner] = _ownedTokensCount[owner].sub(1);
_tokenOwner[tokenId] = address(0);
emit Transfer(owner, address(0), tokenId);
}
internal ERC721._burn keyboard_arrow_up
Requirements help
Source Code
function _burn(uint256 tokenId) internal {
_burn(ownerOf(tokenId), tokenId);
}
internal ERC721._transferFrom keyboard_arrow_up
Requirements help
Source Code
function _transferFrom(
address from,
address to,
uint256 tokenId
) internal {
require(ownerOf(tokenId) == from);
require(to != address(0));
_clearApproval(tokenId);
_ownedTokensCount[from] = _ownedTokensCount[from].sub(1);
_ownedTokensCount[to] = _ownedTokensCount[to].add(1);
_tokenOwner[tokenId] = to;
emit Transfer(from, to, tokenId);
}
internal ERC721._checkOnERC721Received keyboard_arrow_up
Source Code
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) internal returns (bool) {
if (!to.isContract()) {
return true;
}
bytes4 retval = IERC721Receiver(to).onERC721Received(
msg.sender,
from,
tokenId,
_data
);
return (retval == _ERC721_RECEIVED);
}
internal ERC721._clearApproval keyboard_arrow_up
internal ERC165.constructor keyboard_arrow_up
internal ERC165._registerInterface keyboard_arrow_up
Requirements help
Source Code
function _registerInterface(bytes4 interfaceId) internal {
require(interfaceId != 0xffffffff);
_supportedInterfaces[interfaceId] = true;
}
internal ERC721._exists keyboard_arrow_up
internal ERC721._isApprovedOrOwner keyboard_arrow_up
Source Code
function _isApprovedOrOwner(address spender, uint256 tokenId)
internal
view
returns (bool)
{
address owner = ownerOf(tokenId);
return (spender == owner ||
getApproved(tokenId) == spender ||
isApprovedForAll(owner, spender));
}
internal ERC721._mint keyboard_arrow_up
Requirements help
Source Code
function _mint(address to, uint256 tokenId) internal {
require(to != address(0));
require(!_exists(tokenId));
_tokenOwner[tokenId] = to;
_ownedTokensCount[to] = _ownedTokensCount[to].add(1);
emit Transfer(address(0), to, tokenId);
}
internal ERC721._burn keyboard_arrow_up
Requirements help
Source Code
function _burn(address owner, uint256 tokenId) internal {
require(ownerOf(tokenId) == owner);
_clearApproval(tokenId);
_ownedTokensCount[owner] = _ownedTokensCount[owner].sub(1);
_tokenOwner[tokenId] = address(0);
emit Transfer(owner, address(0), tokenId);
}
internal ERC721._burn keyboard_arrow_up
Requirements help
Source Code
function _burn(uint256 tokenId) internal {
_burn(ownerOf(tokenId), tokenId);
}
internal ERC721._transferFrom keyboard_arrow_up
Requirements help
Source Code
function _transferFrom(
address from,
address to,
uint256 tokenId
) internal {
require(ownerOf(tokenId) == from);
require(to != address(0));
_clearApproval(tokenId);
_ownedTokensCount[from] = _ownedTokensCount[from].sub(1);
_ownedTokensCount[to] = _ownedTokensCount[to].add(1);
_tokenOwner[tokenId] = to;
emit Transfer(from, to, tokenId);
}
internal ERC721._checkOnERC721Received keyboard_arrow_up
Source Code
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) internal returns (bool) {
if (!to.isContract()) {
return true;
}
bytes4 retval = IERC721Receiver(to).onERC721Received(
msg.sender,
from,
tokenId,
_data
);
return (retval == _ERC721_RECEIVED);
}
internal ERC721._clearApproval keyboard_arrow_up
internal ERC165.constructor keyboard_arrow_up
internal ERC165._registerInterface keyboard_arrow_up
Requirements help
Source Code
function _registerInterface(bytes4 interfaceId) internal {
require(interfaceId != 0xffffffff);
_supportedInterfaces[interfaceId] = true;
}
internal MinterRole.constructor keyboard_arrow_up
internal MinterRole._addMinter keyboard_arrow_up
internal MinterRole._removeMinter keyboard_arrow_up
internal ERC721._exists keyboard_arrow_up
internal ERC721._isApprovedOrOwner keyboard_arrow_up
Source Code
function _isApprovedOrOwner(address spender, uint256 tokenId)
internal
view
returns (bool)
{
address owner = ownerOf(tokenId);
return (spender == owner ||
getApproved(tokenId) == spender ||
isApprovedForAll(owner, spender));
}
internal ERC721._mint keyboard_arrow_up
Requirements help
Source Code
function _mint(address to, uint256 tokenId) internal {
require(to != address(0));
require(!_exists(tokenId));
_tokenOwner[tokenId] = to;
_ownedTokensCount[to] = _ownedTokensCount[to].add(1);
emit Transfer(address(0), to, tokenId);
}
internal ERC721._burn keyboard_arrow_up
Requirements help
Source Code
function _burn(address owner, uint256 tokenId) internal {
require(ownerOf(tokenId) == owner);
_clearApproval(tokenId);
_ownedTokensCount[owner] = _ownedTokensCount[owner].sub(1);
_tokenOwner[tokenId] = address(0);
emit Transfer(owner, address(0), tokenId);
}
internal ERC721._burn keyboard_arrow_up
Requirements help
Source Code
function _burn(uint256 tokenId) internal {
_burn(ownerOf(tokenId), tokenId);
}
internal ERC721._transferFrom keyboard_arrow_up
Requirements help
Source Code
function _transferFrom(
address from,
address to,
uint256 tokenId
) internal {
require(ownerOf(tokenId) == from);
require(to != address(0));
_clearApproval(tokenId);
_ownedTokensCount[from] = _ownedTokensCount[from].sub(1);
_ownedTokensCount[to] = _ownedTokensCount[to].add(1);
_tokenOwner[tokenId] = to;
emit Transfer(from, to, tokenId);
}
internal ERC721._checkOnERC721Received keyboard_arrow_up
Source Code
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) internal returns (bool) {
if (!to.isContract()) {
return true;
}
bytes4 retval = IERC721Receiver(to).onERC721Received(
msg.sender,
from,
tokenId,
_data
);
return (retval == _ERC721_RECEIVED);
}
internal ERC721._clearApproval keyboard_arrow_up
internal ERC165.constructor keyboard_arrow_up
internal ERC165._registerInterface keyboard_arrow_up
Requirements help
Source Code
function _registerInterface(bytes4 interfaceId) internal {
require(interfaceId != 0xffffffff);
_supportedInterfaces[interfaceId] = true;
}