Identical Contracts
The following contracts have identical source code.
Stats
Public Functions
32
Event Types
9
Code Size
53,830 bytes
Events (9)
keyboard_arrow_up
AddWearable
Event
Parameters
help
Event parameters list the data that an event contains.
_wearableIdKey |
bytes32 help
The type of this value is byte or bytes. Byte data is usually not intended for human reading, and stores binary data.
|
_wearableId |
string help
The type of this value is string, which is basically just plain text. It's called a string because it is a 'string' of letters.
|
_maxIssuance |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Allowed
Event
Parameters
help
Event parameters list the data that an event contains.
_operator |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
_allowed |
bool help
The type of this value is other.
|
Approval
Event
Parameters
help
Event parameters list the data that an event contains.
owner |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
approved |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
ApprovalForAll
Event
Parameters
help
Event parameters list the data that an event contains.
owner |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
operator |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
approved |
bool help
The type of this value is other.
|
BaseURI
Event
Parameters
help
Event parameters list the data that an event contains.
_oldBaseURI |
string help
The type of this value is string, which is basically just plain text. It's called a string because it is a 'string' of letters.
|
_newBaseURI |
string help
The type of this value is string, which is basically just plain text. It's called a string because it is a 'string' of letters.
|
Complete
Event
Parameters
help
Event parameters list the data that an event contains.
Issue
Event
Parameters
help
Event parameters list the data that an event contains.
_beneficiary |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
_tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
_wearableIdKey |
bytes32 help
The type of this value is byte or bytes. Byte data is usually not intended for human reading, and stores binary data.
|
_wearableId |
string help
The type of this value is string, which is basically just plain text. It's called a string because it is a 'string' of letters.
|
_issuedId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
OwnershipTransferred
Event
Parameters
help
Event parameters list the data that an event contains.
previousOwner |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
newOwner |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
Transfer
Event
Parameters
help
Event parameters list the data that an event contains.
from |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
to |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Constants (5)
keyboard_arrow_up
_ERC721_RECEIVED
Constant
bytes4
help
The type of this value is byte or bytes. Byte data is usually not intended for human reading, and stores binary data.
0x150b7a02
_INTERFACE_ID_ERC721
Constant
bytes4
help
The type of this value is byte or bytes. Byte data is usually not intended for human reading, and stores binary data.
0x80ac58cd
_INTERFACE_ID_ERC165
Constant
bytes4
help
The type of this value is byte or bytes. Byte data is usually not intended for human reading, and stores binary data.
0x01ffc9a7
_INTERFACE_ID_ERC721_ENUMERABLE
Constant
bytes4
help
The type of this value is byte or bytes. Byte data is usually not intended for human reading, and stores binary data.
0x780e9d63
_INTERFACE_ID_ERC721_METADATA
Constant
bytes4
help
The type of this value is byte or bytes. Byte data is usually not intended for human reading, and stores binary data.
0x5b5e139f
State Variables (20)
keyboard_arrow_up
baseURI
Variable
string
help
The type of this value is string, which is basically just plain text. It's called a string because it is a 'string' of letters.
isComplete
Variable
bool
help
The type of this value is other.
maxIssuance
Variable
mapping(bytes32 => uint256)
help
The type of this value is other.
issued
Variable
mapping(bytes32 => uint)
help
The type of this value is other.
allowed
Variable
mapping(address => bool)
help
The type of this value is other.
_owner
Variable
address
help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
_tokenOwner
Variable
mapping(uint256 => address)
help
The type of this value is other.
_tokenApprovals
Variable
mapping(uint256 => address)
help
The type of this value is other.
_ownedTokensCount
Variable
mapping(address => Counters.Counter)
help
The type of this value is other.
_operatorApprovals
Variable
mapping(address => mapping(address => bool))
help
The type of this value is other.
_supportedInterfaces
Variable
mapping(bytes4 => bool)
help
The type of this value is other.
_ownedTokens
Variable
mapping(address => uint256[])
help
The type of this value is other.
_ownedTokensIndex
Variable
mapping(uint256 => uint256)
help
The type of this value is other.
_allTokens
Variable
uint256[]
help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number. Because the type ends with '[]', that means it is an array. An array is just a list of values, rather than a single value.
_allTokensIndex
Variable
mapping(uint256 => uint256)
help
The type of this value is other.
_name
Variable
string
help
The type of this value is string, which is basically just plain text. It's called a string because it is a 'string' of letters.
_symbol
Variable
string
help
The type of this value is string, which is basically just plain text. It's called a string because it is a 'string' of letters.
_tokenURIs
Variable
mapping(uint256 => string)
help
The type of this value is other.
_tokenPaths
Variable
mapping(uint256 => string)
help
The type of this value is other.
wearables
Variable
string[]
help
The type of this value is string, which is basically just plain text. It's called a string because it is a 'string' of letters. Because the type ends with '[]', that means it is an array. An array is just a list of values, rather than a single value.
balanceOf
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
owner |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
view
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function balanceOf(address owner) public view returns (uint256) {
require(owner != address(0), "ERC721: balance query for the zero address");
return _ownedTokensCount[owner].current();
}
ownerOf
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
view
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function ownerOf(uint256 tokenId) public view returns (address) {
address owner = _tokenOwner[tokenId];
require(owner != address(0), "ERC721: owner query for nonexistent token");
return owner;
}
safeTransferFrom
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
from |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
to |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public {
safeTransferFrom(from, to, tokenId, "");
}
transferFrom
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
from |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
to |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function transferFrom(
address from,
address to,
uint256 tokenId
) public {
//solhint-disable-next-line max-line-length
require(
_isApprovedOrOwner(msg.sender, tokenId),
"ERC721: transfer caller is not owner nor approved"
);
_transferFrom(from, to, tokenId);
}
approve
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
to |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function approve(address to, uint256 tokenId) public {
address owner = ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
msg.sender == owner || isApprovedForAll(owner, msg.sender),
"ERC721: approve caller is not owner nor approved for all"
);
_tokenApprovals[tokenId] = to;
emit Approval(owner, to, tokenId);
}
getApproved
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
view
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function getApproved(uint256 tokenId) public view returns (address) {
require(_exists(tokenId), "ERC721: approved query for nonexistent token");
return _tokenApprovals[tokenId];
}
setApprovalForAll
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
to |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
approved |
bool help
The type of this value is other.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function setApprovalForAll(address to, bool approved) public {
require(to != msg.sender, "ERC721: approve to caller");
_operatorApprovals[msg.sender][to] = approved;
emit ApprovalForAll(msg.sender, to, approved);
}
isApprovedForAll
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
owner |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
operator |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
view
Source Code
function isApprovedForAll(address owner, address operator)
public
view
returns (bool)
{
return _operatorApprovals[owner][operator];
}
safeTransferFrom
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
from |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
to |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
_data |
bytes help
The type of this value is byte or bytes. Byte data is usually not intended for human reading, and stores binary data.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public {
transferFrom(from, to, tokenId);
require(
_checkOnERC721Received(from, to, tokenId, _data),
"ERC721: transfer to non ERC721Receiver implementer"
);
}
name
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
This function has no parameters.
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
view
function name() external view returns (string memory) {
return _name;
}
symbol
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
This function has no parameters.
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
view
function symbol() external view returns (string memory) {
return _symbol;
}
tokenURI
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
_tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
view
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function tokenURI(uint256 _tokenId) external view returns (string memory) {
require(
_exists(_tokenId),
"ERC721Metadata: received a URI query for a nonexistent token"
);
return string(abi.encodePacked(baseURI, _tokenPaths[_tokenId]));
}
supportsInterface
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
interfaceId |
bytes4 help
The type of this value is byte or bytes. Byte data is usually not intended for human reading, and stores binary data.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
view
Source Code
function supportsInterface(bytes4 interfaceId) external view returns (bool) {
return _supportedInterfaces[interfaceId];
}
totalSupply
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
This function has no parameters.
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
view
Source Code
function totalSupply() public view returns (uint256) {
return _allTokens.length;
}
tokenOfOwnerByIndex
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
owner |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
index |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
view
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function tokenOfOwnerByIndex(address owner, uint256 index)
public
view
returns (uint256)
{
require(
index < balanceOf(owner),
"ERC721Enumerable: owner index out of bounds"
);
return _ownedTokens[owner][index];
}
tokenByIndex
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
index |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
view
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function tokenByIndex(uint256 index) public view returns (uint256) {
require(
index < totalSupply(),
"ERC721Enumerable: global index out of bounds"
);
return _allTokens[index];
}
owner
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
This function has no parameters.
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
view
Source Code
function owner() public view returns (address) {
return _owner;
}
isOwner
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
This function has no parameters.
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
view
Source Code
function isOwner() public view returns (bool) {
return msg.sender == _owner;
}
renounceOwnership
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
This function has no parameters.
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Modifiers
help
Modifiers are additions to a function that typically make various checks before
the function is run.
onlyOwner
checks for the following:
Source Code
function renounceOwnership() public onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
transferOwnership
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
newOwner |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Modifiers
help
Modifiers are additions to a function that typically make various checks before
the function is run.
onlyOwner
checks for the following:
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function transferOwnership(address newOwner) public onlyOwner {
_transferOwnership(newOwner);
}
setBaseURI
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
_baseURI |
string help
The type of this value is string, which is basically just plain text. It's called a string because it is a 'string' of letters.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Modifiers
help
Modifiers are additions to a function that typically make various checks before
the function is run.
onlyOwner
checks for the following:
Source Code
function setBaseURI(string memory _baseURI) public onlyOwner {
emit BaseURI(baseURI, _baseURI);
baseURI = _baseURI;
}
setAllowed
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
_operator |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
_allowed |
bool help
The type of this value is other.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Modifiers
help
Modifiers are additions to a function that typically make various checks before
the function is run.
onlyOwner
checks for the following:
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function setAllowed(address _operator, bool _allowed) public onlyOwner {
require(_operator != address(0), "Invalid address");
require(allowed[_operator] != _allowed, "You should set a different value");
allowed[_operator] = _allowed;
emit Allowed(_operator, _allowed);
}
batchTransferFrom
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
_from |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
_to |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
_tokenIds |
uint256[] help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number. Because the type ends with '[]', that means it is an array. An array is just a list of values, rather than a single value.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Source Code
function batchTransferFrom(
address _from,
address _to,
uint256[] calldata _tokenIds
) external {
for (uint256 i = 0; i < _tokenIds.length; i++) {
transferFrom(_from, _to, _tokenIds[i]);
}
}
wearablesCount
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
This function has no parameters.
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
view
Source Code
function wearablesCount() external view returns (uint256) {
return wearables.length;
}
completeCollection
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
This function has no parameters.
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Modifiers
help
Modifiers are additions to a function that typically make various checks before
the function is run.
onlyOwner
checks for the following:
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function completeCollection() external onlyOwner {
require(!isComplete, "The collection is already completed");
isComplete = true;
emit Complete();
}
addWearables
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
_wearableIds |
bytes32[] help
The type of this value is byte or bytes. Byte data is usually not intended for human reading, and stores binary data. Because the type ends with '[]', that means it is an array. An array is just a list of values, rather than a single value.
|
_maxIssuances |
uint256[] help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number. Because the type ends with '[]', that means it is an array. An array is just a list of values, rather than a single value.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Modifiers
help
Modifiers are additions to a function that typically make various checks before
the function is run.
onlyOwner
checks for the following:
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function addWearables(
bytes32[] calldata _wearableIds,
uint256[] calldata _maxIssuances
) external onlyOwner {
require(
_wearableIds.length == _maxIssuances.length,
"Parameters should have the same length"
);
for (uint256 i = 0; i < _wearableIds.length; i++) {
addWearable(_wearableIds[i].bytes32ToString(), _maxIssuances[i]);
}
}
addWearable
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
_wearableId |
string help
The type of this value is string, which is basically just plain text. It's called a string because it is a 'string' of letters.
|
_maxIssuance |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Modifiers
help
Modifiers are additions to a function that typically make various checks before
the function is run.
onlyOwner
checks for the following:
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function addWearable(string memory _wearableId, uint256 _maxIssuance)
public
onlyOwner
{
require(!isComplete, "The collection is complete");
bytes32 key = getWearableKey(_wearableId);
require(maxIssuance[key] == 0, "Can not modify an existing wearable");
require(_maxIssuance > 0, "Max issuance should be greater than 0");
maxIssuance[key] = _maxIssuance;
wearables.push(_wearableId);
emit AddWearable(key, _wearableId, _maxIssuance);
}
safeBatchTransferFrom
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
_from |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
_to |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
_tokenIds |
uint256[] help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number. Because the type ends with '[]', that means it is an array. An array is just a list of values, rather than a single value.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Source Code
function safeBatchTransferFrom(
address _from,
address _to,
uint256[] memory _tokenIds
) public {
safeBatchTransferFrom(_from, _to, _tokenIds, "");
}
safeBatchTransferFrom
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
_from |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
_to |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
_tokenIds |
uint256[] help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number. Because the type ends with '[]', that means it is an array. An array is just a list of values, rather than a single value.
|
_data |
bytes help
The type of this value is byte or bytes. Byte data is usually not intended for human reading, and stores binary data.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Source Code
function safeBatchTransferFrom(
address _from,
address _to,
uint256[] memory _tokenIds,
bytes memory _data
) public {
for (uint256 i = 0; i < _tokenIds.length; i++) {
safeTransferFrom(_from, _to, _tokenIds[i], _data);
}
}
getWearableKey
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
_wearableId |
string help
The type of this value is string, which is basically just plain text. It's called a string because it is a 'string' of letters.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
pure
Source Code
function getWearableKey(string memory _wearableId)
public
pure
returns (bytes32)
{
return keccak256(abi.encodePacked(_wearableId));
}
issueToken
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
_beneficiary |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
_wearableId |
string help
The type of this value is string, which is basically just plain text. It's called a string because it is a 'string' of letters.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Modifiers
help
Modifiers are additions to a function that typically make various checks before
the function is run.
onlyAllowed
checks for the following:
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function issueToken(address _beneficiary, string calldata _wearableId)
external
onlyAllowed
{
_issueToken(_beneficiary, _wearableId);
}
issueTokens
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
_beneficiaries |
address[] help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address. Because the type ends with '[]', that means it is an array. An array is just a list of values, rather than a single value.
|
_wearableIds |
bytes32[] help
The type of this value is byte or bytes. Byte data is usually not intended for human reading, and stores binary data. Because the type ends with '[]', that means it is an array. An array is just a list of values, rather than a single value.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
public
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Modifiers
help
Modifiers are additions to a function that typically make various checks before
the function is run.
onlyAllowed
checks for the following:
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function issueTokens(
address[] calldata _beneficiaries,
bytes32[] calldata _wearableIds
) external onlyAllowed {
require(
_beneficiaries.length == _wearableIds.length,
"Parameters should have the same length"
);
for (uint256 i = 0; i < _wearableIds.length; i++) {
_issueToken(_beneficiaries[i], _wearableIds[i].bytes32ToString());
}
}
Internal functions are parts of the contract that can't be used directly, but instead are used by
the public functions listed above.
internal ERC721Collection._issueToken
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
_beneficiary |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
_wearableId |
string help
The type of this value is string, which is basically just plain text. It's called a string because it is a 'string' of letters.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _issueToken(address _beneficiary, string memory _wearableId) internal {
bytes32 key = getWearableKey(_wearableId);
uint256 issuedId = issued[key] + 1;
uint256 tokenId = this.totalSupply();
_mint(_beneficiary, tokenId, key, _wearableId, issuedId);
_setTokenURI(
tokenId,
string(abi.encodePacked(_wearableId, "/", issuedId.uintToString()))
);
}
internal ERC721Collection._setTokenURI
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
_tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
_uri |
string help
The type of this value is string, which is basically just plain text. It's called a string because it is a 'string' of letters.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Source Code
function _setTokenURI(uint256 _tokenId, string memory _uri) internal {
_tokenPaths[_tokenId] = _uri;
}
internal Ownable.constructor
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
This function has no parameters.
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Source Code
constructor() internal {
_owner = msg.sender;
emit OwnershipTransferred(address(0), _owner);
}
internal Ownable._transferOwnership
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
newOwner |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _transferOwnership(address newOwner) internal {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
internal ERC721._exists
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
view
Source Code
function _exists(uint256 tokenId) internal view returns (bool) {
address owner = _tokenOwner[tokenId];
return owner != address(0);
}
internal ERC721._isApprovedOrOwner
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
spender |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
view
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
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._mint
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
to |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _mint(address to, uint256 tokenId) internal {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_tokenOwner[tokenId] = to;
_ownedTokensCount[to].increment();
emit Transfer(address(0), to, tokenId);
}
internal ERC721._burn
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
owner |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _burn(address owner, uint256 tokenId) internal {
require(ownerOf(tokenId) == owner, "ERC721: burn of token that is not own");
_clearApproval(tokenId);
_ownedTokensCount[owner].decrement();
_tokenOwner[tokenId] = address(0);
emit Transfer(owner, address(0), tokenId);
}
internal ERC721._burn
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _burn(uint256 tokenId) internal {
_burn(ownerOf(tokenId), tokenId);
}
internal ERC721._transferFrom
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
from |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
to |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _transferFrom(
address from,
address to,
uint256 tokenId
) internal {
require(
ownerOf(tokenId) == from,
"ERC721: transfer of token that is not own"
);
require(to != address(0), "ERC721: transfer to the zero address");
_clearApproval(tokenId);
_ownedTokensCount[from].decrement();
_ownedTokensCount[to].increment();
_tokenOwner[tokenId] = to;
emit Transfer(from, to, tokenId);
}
internal ERC721._checkOnERC721Received
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
from |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
to |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
_data |
bytes help
The type of this value is byte or bytes. Byte data is usually not intended for human reading, and stores binary data.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
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
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
private
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Source Code
function _clearApproval(uint256 tokenId) private {
if (_tokenApprovals[tokenId] != address(0)) {
_tokenApprovals[tokenId] = address(0);
}
}
internal ERC165.constructor
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
This function has no parameters.
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
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
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
interfaceId |
bytes4 help
The type of this value is byte or bytes. Byte data is usually not intended for human reading, and stores binary data.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _registerInterface(bytes4 interfaceId) internal {
require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
_supportedInterfaces[interfaceId] = true;
}
internal ERC721Enumerable._transferFrom
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
from |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
to |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
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
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
to |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _mint(address to, uint256 tokenId) internal {
super._mint(to, tokenId);
_addTokenToOwnerEnumeration(to, tokenId);
_addTokenToAllTokensEnumeration(tokenId);
}
internal ERC721Enumerable._burn
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
owner |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
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
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
owner |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
view
Source Code
function _tokensOfOwner(address owner)
internal
view
returns (uint256[] storage)
{
return _ownedTokens[owner];
}
internal ERC721Enumerable._addTokenToOwnerEnumeration
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
to |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
private
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Source Code
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
_ownedTokensIndex[tokenId] = _ownedTokens[to].length;
_ownedTokens[to].push(tokenId);
}
internal ERC721Enumerable._addTokenToAllTokensEnumeration
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
private
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Source Code
function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
_allTokensIndex[tokenId] = _allTokens.length;
_allTokens.push(tokenId);
}
internal ERC721Enumerable._removeTokenFromOwnerEnumeration
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
from |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
private
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
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 occupied by
// lastTokenId, or just over the end of the array if the token was the last one).
}
internal ERC721Enumerable._removeTokenFromAllTokensEnumeration
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
private
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
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
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
This function has no parameters.
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
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
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
interfaceId |
bytes4 help
The type of this value is byte or bytes. Byte data is usually not intended for human reading, and stores binary data.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _registerInterface(bytes4 interfaceId) internal {
require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
_supportedInterfaces[interfaceId] = true;
}
internal ERC721._exists
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
view
Source Code
function _exists(uint256 tokenId) internal view returns (bool) {
address owner = _tokenOwner[tokenId];
return owner != address(0);
}
internal ERC721._isApprovedOrOwner
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
spender |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
view
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
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._mint
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
to |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _mint(address to, uint256 tokenId) internal {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_tokenOwner[tokenId] = to;
_ownedTokensCount[to].increment();
emit Transfer(address(0), to, tokenId);
}
internal ERC721._burn
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
owner |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _burn(address owner, uint256 tokenId) internal {
require(ownerOf(tokenId) == owner, "ERC721: burn of token that is not own");
_clearApproval(tokenId);
_ownedTokensCount[owner].decrement();
_tokenOwner[tokenId] = address(0);
emit Transfer(owner, address(0), tokenId);
}
internal ERC721._burn
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _burn(uint256 tokenId) internal {
_burn(ownerOf(tokenId), tokenId);
}
internal ERC721._transferFrom
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
from |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
to |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _transferFrom(
address from,
address to,
uint256 tokenId
) internal {
require(
ownerOf(tokenId) == from,
"ERC721: transfer of token that is not own"
);
require(to != address(0), "ERC721: transfer to the zero address");
_clearApproval(tokenId);
_ownedTokensCount[from].decrement();
_ownedTokensCount[to].increment();
_tokenOwner[tokenId] = to;
emit Transfer(from, to, tokenId);
}
internal ERC721._checkOnERC721Received
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
from |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
to |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
_data |
bytes help
The type of this value is byte or bytes. Byte data is usually not intended for human reading, and stores binary data.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
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
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
private
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Source Code
function _clearApproval(uint256 tokenId) private {
if (_tokenApprovals[tokenId] != address(0)) {
_tokenApprovals[tokenId] = address(0);
}
}
internal ERC165.constructor
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
This function has no parameters.
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
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
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
interfaceId |
bytes4 help
The type of this value is byte or bytes. Byte data is usually not intended for human reading, and stores binary data.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _registerInterface(bytes4 interfaceId) internal {
require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
_supportedInterfaces[interfaceId] = true;
}
internal ERC721Metadata._setTokenURI
keyboard_arrow_up
internal ERC721Metadata._burn
keyboard_arrow_up
internal ERC165.constructor
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
This function has no parameters.
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
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
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
interfaceId |
bytes4 help
The type of this value is byte or bytes. Byte data is usually not intended for human reading, and stores binary data.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _registerInterface(bytes4 interfaceId) internal {
require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
_supportedInterfaces[interfaceId] = true;
}
internal ERC721._exists
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
view
Source Code
function _exists(uint256 tokenId) internal view returns (bool) {
address owner = _tokenOwner[tokenId];
return owner != address(0);
}
internal ERC721._isApprovedOrOwner
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
spender |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
view
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
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._mint
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
to |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _mint(address to, uint256 tokenId) internal {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_tokenOwner[tokenId] = to;
_ownedTokensCount[to].increment();
emit Transfer(address(0), to, tokenId);
}
internal ERC721._burn
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
owner |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _burn(address owner, uint256 tokenId) internal {
require(ownerOf(tokenId) == owner, "ERC721: burn of token that is not own");
_clearApproval(tokenId);
_ownedTokensCount[owner].decrement();
_tokenOwner[tokenId] = address(0);
emit Transfer(owner, address(0), tokenId);
}
internal ERC721._burn
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _burn(uint256 tokenId) internal {
_burn(ownerOf(tokenId), tokenId);
}
internal ERC721._transferFrom
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
from |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
to |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _transferFrom(
address from,
address to,
uint256 tokenId
) internal {
require(
ownerOf(tokenId) == from,
"ERC721: transfer of token that is not own"
);
require(to != address(0), "ERC721: transfer to the zero address");
_clearApproval(tokenId);
_ownedTokensCount[from].decrement();
_ownedTokensCount[to].increment();
_tokenOwner[tokenId] = to;
emit Transfer(from, to, tokenId);
}
internal ERC721._checkOnERC721Received
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
from |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
to |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
_data |
bytes help
The type of this value is byte or bytes. Byte data is usually not intended for human reading, and stores binary data.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
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
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
private
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Source Code
function _clearApproval(uint256 tokenId) private {
if (_tokenApprovals[tokenId] != address(0)) {
_tokenApprovals[tokenId] = address(0);
}
}
internal ERC165.constructor
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
This function has no parameters.
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
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
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
interfaceId |
bytes4 help
The type of this value is byte or bytes. Byte data is usually not intended for human reading, and stores binary data.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _registerInterface(bytes4 interfaceId) internal {
require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
_supportedInterfaces[interfaceId] = true;
}
internal ERC721BaseCollection._mint
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
_beneficiary |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
_tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
_wearableIdKey |
bytes32 help
The type of this value is byte or bytes. Byte data is usually not intended for human reading, and stores binary data.
|
_wearableId |
string help
The type of this value is string, which is basically just plain text. It's called a string because it is a 'string' of letters.
|
_issuedId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _mint(
address _beneficiary,
uint256 _tokenId,
bytes32 _wearableIdKey,
string memory _wearableId,
uint256 _issuedId
) internal {
// Check issuance
require(
_issuedId > 0 && _issuedId <= maxIssuance[_wearableIdKey],
"Invalid issued id"
);
require(
issued[_wearableIdKey] < maxIssuance[_wearableIdKey],
"Option exhausted"
);
// Mint erc721 token
super._mint(_beneficiary, _tokenId);
// Increase issuance
issued[_wearableIdKey] = issued[_wearableIdKey] + 1;
// Log
emit Issue(_beneficiary, _tokenId, _wearableIdKey, _wearableId, _issuedId);
}
internal Ownable.constructor
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
This function has no parameters.
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Source Code
constructor() internal {
_owner = msg.sender;
emit OwnershipTransferred(address(0), _owner);
}
internal Ownable._transferOwnership
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
newOwner |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _transferOwnership(address newOwner) internal {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
internal ERC721._exists
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
view
Source Code
function _exists(uint256 tokenId) internal view returns (bool) {
address owner = _tokenOwner[tokenId];
return owner != address(0);
}
internal ERC721._isApprovedOrOwner
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
spender |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
view
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
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._mint
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
to |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _mint(address to, uint256 tokenId) internal {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_tokenOwner[tokenId] = to;
_ownedTokensCount[to].increment();
emit Transfer(address(0), to, tokenId);
}
internal ERC721._burn
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
owner |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _burn(address owner, uint256 tokenId) internal {
require(ownerOf(tokenId) == owner, "ERC721: burn of token that is not own");
_clearApproval(tokenId);
_ownedTokensCount[owner].decrement();
_tokenOwner[tokenId] = address(0);
emit Transfer(owner, address(0), tokenId);
}
internal ERC721._burn
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _burn(uint256 tokenId) internal {
_burn(ownerOf(tokenId), tokenId);
}
internal ERC721._transferFrom
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
from |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
to |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _transferFrom(
address from,
address to,
uint256 tokenId
) internal {
require(
ownerOf(tokenId) == from,
"ERC721: transfer of token that is not own"
);
require(to != address(0), "ERC721: transfer to the zero address");
_clearApproval(tokenId);
_ownedTokensCount[from].decrement();
_ownedTokensCount[to].increment();
_tokenOwner[tokenId] = to;
emit Transfer(from, to, tokenId);
}
internal ERC721._checkOnERC721Received
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
from |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
to |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
_data |
bytes help
The type of this value is byte or bytes. Byte data is usually not intended for human reading, and stores binary data.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
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
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
private
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Source Code
function _clearApproval(uint256 tokenId) private {
if (_tokenApprovals[tokenId] != address(0)) {
_tokenApprovals[tokenId] = address(0);
}
}
internal ERC165.constructor
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
This function has no parameters.
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
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
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
interfaceId |
bytes4 help
The type of this value is byte or bytes. Byte data is usually not intended for human reading, and stores binary data.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _registerInterface(bytes4 interfaceId) internal {
require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
_supportedInterfaces[interfaceId] = true;
}
internal ERC721Enumerable._transferFrom
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
from |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
to |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
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
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
to |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _mint(address to, uint256 tokenId) internal {
super._mint(to, tokenId);
_addTokenToOwnerEnumeration(to, tokenId);
_addTokenToAllTokensEnumeration(tokenId);
}
internal ERC721Enumerable._burn
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
owner |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
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
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
owner |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
view
Source Code
function _tokensOfOwner(address owner)
internal
view
returns (uint256[] storage)
{
return _ownedTokens[owner];
}
internal ERC721Enumerable._addTokenToOwnerEnumeration
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
to |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
private
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Source Code
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
_ownedTokensIndex[tokenId] = _ownedTokens[to].length;
_ownedTokens[to].push(tokenId);
}
internal ERC721Enumerable._addTokenToAllTokensEnumeration
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
private
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Source Code
function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
_allTokensIndex[tokenId] = _allTokens.length;
_allTokens.push(tokenId);
}
internal ERC721Enumerable._removeTokenFromOwnerEnumeration
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
from |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
private
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
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 occupied by
// lastTokenId, or just over the end of the array if the token was the last one).
}
internal ERC721Enumerable._removeTokenFromAllTokensEnumeration
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
private
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
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
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
This function has no parameters.
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
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
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
interfaceId |
bytes4 help
The type of this value is byte or bytes. Byte data is usually not intended for human reading, and stores binary data.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _registerInterface(bytes4 interfaceId) internal {
require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
_supportedInterfaces[interfaceId] = true;
}
internal ERC721._exists
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
view
Source Code
function _exists(uint256 tokenId) internal view returns (bool) {
address owner = _tokenOwner[tokenId];
return owner != address(0);
}
internal ERC721._isApprovedOrOwner
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
spender |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
view
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
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._mint
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
to |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _mint(address to, uint256 tokenId) internal {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_tokenOwner[tokenId] = to;
_ownedTokensCount[to].increment();
emit Transfer(address(0), to, tokenId);
}
internal ERC721._burn
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
owner |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _burn(address owner, uint256 tokenId) internal {
require(ownerOf(tokenId) == owner, "ERC721: burn of token that is not own");
_clearApproval(tokenId);
_ownedTokensCount[owner].decrement();
_tokenOwner[tokenId] = address(0);
emit Transfer(owner, address(0), tokenId);
}
internal ERC721._burn
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _burn(uint256 tokenId) internal {
_burn(ownerOf(tokenId), tokenId);
}
internal ERC721._transferFrom
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
from |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
to |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _transferFrom(
address from,
address to,
uint256 tokenId
) internal {
require(
ownerOf(tokenId) == from,
"ERC721: transfer of token that is not own"
);
require(to != address(0), "ERC721: transfer to the zero address");
_clearApproval(tokenId);
_ownedTokensCount[from].decrement();
_ownedTokensCount[to].increment();
_tokenOwner[tokenId] = to;
emit Transfer(from, to, tokenId);
}
internal ERC721._checkOnERC721Received
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
from |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
to |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
_data |
bytes help
The type of this value is byte or bytes. Byte data is usually not intended for human reading, and stores binary data.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
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
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
private
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Source Code
function _clearApproval(uint256 tokenId) private {
if (_tokenApprovals[tokenId] != address(0)) {
_tokenApprovals[tokenId] = address(0);
}
}
internal ERC165.constructor
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
This function has no parameters.
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
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
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
interfaceId |
bytes4 help
The type of this value is byte or bytes. Byte data is usually not intended for human reading, and stores binary data.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _registerInterface(bytes4 interfaceId) internal {
require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
_supportedInterfaces[interfaceId] = true;
}
internal ERC721Metadata._setTokenURI
keyboard_arrow_up
internal ERC721Metadata._burn
keyboard_arrow_up
internal ERC165.constructor
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
This function has no parameters.
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
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
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
interfaceId |
bytes4 help
The type of this value is byte or bytes. Byte data is usually not intended for human reading, and stores binary data.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _registerInterface(bytes4 interfaceId) internal {
require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
_supportedInterfaces[interfaceId] = true;
}
internal ERC721._exists
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
view
Source Code
function _exists(uint256 tokenId) internal view returns (bool) {
address owner = _tokenOwner[tokenId];
return owner != address(0);
}
internal ERC721._isApprovedOrOwner
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
spender |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
view
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
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._mint
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
to |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _mint(address to, uint256 tokenId) internal {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_tokenOwner[tokenId] = to;
_ownedTokensCount[to].increment();
emit Transfer(address(0), to, tokenId);
}
internal ERC721._burn
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
owner |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _burn(address owner, uint256 tokenId) internal {
require(ownerOf(tokenId) == owner, "ERC721: burn of token that is not own");
_clearApproval(tokenId);
_ownedTokensCount[owner].decrement();
_tokenOwner[tokenId] = address(0);
emit Transfer(owner, address(0), tokenId);
}
internal ERC721._burn
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _burn(uint256 tokenId) internal {
_burn(ownerOf(tokenId), tokenId);
}
internal ERC721._transferFrom
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
from |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
to |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _transferFrom(
address from,
address to,
uint256 tokenId
) internal {
require(
ownerOf(tokenId) == from,
"ERC721: transfer of token that is not own"
);
require(to != address(0), "ERC721: transfer to the zero address");
_clearApproval(tokenId);
_ownedTokensCount[from].decrement();
_ownedTokensCount[to].increment();
_tokenOwner[tokenId] = to;
emit Transfer(from, to, tokenId);
}
internal ERC721._checkOnERC721Received
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
from |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
to |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
_data |
bytes help
The type of this value is byte or bytes. Byte data is usually not intended for human reading, and stores binary data.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
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
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
tokenId |
uint256 help
The type of this value is uint, which stands for unsigned integer. Integer means it's a whole number (such as 1, 12, 52) without fractions or decimals. Unsigned means it can't have a negative or positive sign, so it's always a positive number.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
private
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Source Code
function _clearApproval(uint256 tokenId) private {
if (_tokenApprovals[tokenId] != address(0)) {
_tokenApprovals[tokenId] = address(0);
}
}
internal ERC165.constructor
keyboard_arrow_up
Parameters
help
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
This function has no parameters.
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
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
Function parameters list what input the function expects from the user. Each
parameter must be given a value.
Name |
Type |
interfaceId |
bytes4 help
The type of this value is byte or bytes. Byte data is usually not intended for human reading, and stores binary data.
|
Properties
Visibility
help
Visibility determines if the function is visible to users and other contracts.
Only functions that are public can be used.
internal
Mutability
help
Mutability tells you if a function can make changes on the blockchain.
View means the function can be called by anyone without
a wallet and without submitting a transaction.
transaction
Requirements
help
Requirements are checks that the function makes when it runs, and give you
insight on what conditions are required for the function to succeed.
Source Code
function _registerInterface(bytes4 interfaceId) internal {
require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
_supportedInterfaces[interfaceId] = true;
}