Stats
Public Functions
49
Event Types
13
Code Size
56,622 bytes
Events (13)
keyboard_arrow_up
AddLand
Event
Parameters
help
Event parameters list the data that an event contains.
_estateId |
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.
|
_landId |
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.
|
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.
|
CreateEstate
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.
|
_estateId |
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 |
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.
|
Migrated
Event
Parameters
help
Event parameters list the data that an event contains.
contractName |
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.
|
migrationId |
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.
|
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.
|
RemoveLand
Event
Parameters
help
Event parameters list the data that an event contains.
_estateId |
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.
|
_landId |
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.
|
_destinatary |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
SetEstateLandBalanceToken
Event
Parameters
help
Event parameters list the data that an event contains.
_previousEstateLandBalance |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
_newEstateLandBalance |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
SetLANDRegistry
Event
Parameters
help
Event parameters list the data that an event contains.
_registry |
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.
|
Update
Event
Parameters
help
Event parameters list the data that an event contains.
_assetId |
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.
|
_holder |
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.
|
_data |
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.
|
UpdateManager
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.
|
_caller |
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.
|
UpdateOperator
Event
Parameters
help
Event parameters list the data that an event contains.
_estateId |
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.
|
_operator |
address help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
|
Constants (10)
keyboard_arrow_up
INITIALIZED_ID
Constant
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.
initialized
InterfaceId_ERC721Enumerable
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
InterfaceId_ERC721Metadata
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
InterfaceId_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
InterfaceId_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
InterfaceId_ERC721Exists
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.
0x4f558e79
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
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
InterfaceId_GetMetadata
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.
UNKNOWN VALUE
InterfaceId_VerifyFingerprint
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.
UNKNOWN VALUE
State Variables (22)
keyboard_arrow_up
owner
Variable
address
help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
registry
Variable
address
help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
estateLandBalance
Variable
address
help
The type of this value is address, which means it stores an Ethereum address, such as a wallet address.
landIdEstate
Variable
mapping(uint256 => uint256)
help
The type of this value is other.
updateOperator
Variable
mapping(uint256 => address)
help
The type of this value is other.
registeredBalance
Variable
mapping(address => bool)
help
The type of this value is other.
migrated
Variable
mapping(string => mapping(string => bool))
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.
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.
tokenURIs
Variable
mapping(uint256 => string)
help
The type of this value is other.
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 => uint256)
help
The type of this value is other.
operatorApprovals
Variable
mapping(address => mapping(address => bool))
help
The type of this value is other.
estateLandIds
Variable
mapping(uint256 => uint256[])
help
The type of this value is other.
estateLandIndex
Variable
mapping(uint256 => mapping(uint256 => uint256))
help
The type of this value is other.
estateData
Variable
mapping(uint256 => string)
help
The type of this value is other.
updateManager
Variable
mapping(address => mapping(address => bool))
help
The type of this value is other.
isMigrated
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 |
contractName |
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.
|
migrationId |
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.
view
Source Code
function isMigrated(string contractName, string migrationId)
public
view
returns (bool)
{
return migrated[contractName][migrationId];
}
initialize
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.
isInitializer
checks for the following:
Source Code
function initialize() public isInitializer("Migratable", "1.2.1") {}
initialize
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 |
_sender |
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.
isInitializer
checks for the following:
Source Code
function initialize(address _sender) public isInitializer("Ownable", "1.9.0") {
owner = _sender;
}
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 {
require(newOwner != address(0));
emit OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
onERC721Received
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.
|
_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.
|
_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
Modifiers
help
Modifiers are additions to a function that typically make various checks before
the function is run.
onlyRegistry
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.
null
UNKNOWN VALUE
must be equal to
UNKNOWN VALUE
Source Code
function onERC721Received(
address _operator,
address _from,
uint256 _tokenId,
bytes _data
) public onlyRegistry returns (bytes4) {
uint256 estateId = _bytesToUint(_data);
_pushLandId(estateId, _tokenId);
return ERC721_RECEIVED;
}
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));
return ownedTokensCount[_owner];
}
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
Source Code
function ownerOf(uint256 _tokenId) public view returns (address _owner);
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.
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 exists(uint256 _tokenId) public view returns (bool) {
address owner = tokenOwner[_tokenId];
return owner != address(0);
}
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);
require(msg.sender == owner || isApprovedForAll(owner, msg.sender));
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
Source Code
function getApproved(uint256 _tokenId) public view returns (address) {
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);
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];
}
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 {
updateOperator[_tokenId] = address(0);
_updateEstateLandBalance(_from, _to, estateLandIds[_tokenId].length);
super.transferFrom(_from, _to, _tokenId);
}
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
Modifiers
help
Modifiers are additions to a function that typically make various checks before
the function is run.
canTransfer
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 safeTransferFrom(
address _from,
address _to,
uint256 _tokenId
) public canTransfer(_tokenId) {
// solium-disable-next-line arg-overflow
safeTransferFrom(_from, _to, _tokenId, "");
}
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
Modifiers
help
Modifiers are additions to a function that typically make various checks before
the function is run.
canTransfer
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 safeTransferFrom(
address _from,
address _to,
uint256 _tokenId,
bytes _data
) public canTransfer(_tokenId) {
transferFrom(_from, _to, _tokenId);
// solium-disable-next-line arg-overflow
require(checkAndCallSafeTransfer(_from, _to, _tokenId, _data));
}
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
Source Code
function name() external view returns (string) {
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
Source Code
function symbol() external view returns (string) {
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) public view returns (string) {
require(exists(_tokenId));
return tokenURIs[_tokenId];
}
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));
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());
return allTokens[_index];
}
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 _supportsInterface(_interfaceId);
}
initialize
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 |
_name |
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 |
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.
isInitializer
checks for the following:
Source Code
function initialize(string _name, string _symbol)
public
isInitializer("ERC721Token", "1.9.0")
{
name_ = _name;
symbol_ = _symbol;
}
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.
|
metadata |
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.
onlyRegistry
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 mint(address to, string metadata)
external
onlyRegistry
returns (uint256)
{
return _mintEstate(to, metadata);
}
transferLand
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 |
estateId |
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.
|
landId |
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.
|
destinatary |
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.
canTransfer
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 transferLand(
uint256 estateId,
uint256 landId,
address destinatary
) external canTransfer(estateId) {
return _transferLand(estateId, landId, destinatary);
}
transferManyLands
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 |
estateId |
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.
|
landIds |
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.
|
destinatary |
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.
canTransfer
checks for the following:
Source Code
function transferManyLands(
uint256 estateId,
uint256[] landIds,
address destinatary
) external canTransfer(estateId) {
uint256 length = landIds.length;
for (uint256 i = 0; i < length; i++) {
_transferLand(estateId, landIds[i], destinatary);
}
}
getLandEstateId
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 |
landId |
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
Source Code
function getLandEstateId(uint256 landId) external view returns (uint256) {
return landIdEstate[landId];
}
setLANDRegistry
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 |
_registry |
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 setLANDRegistry(address _registry) external onlyOwner {
require(
_registry.isContract(),
"The LAND registry address should be a contract"
);
require(_registry != 0, "The LAND registry address should be valid");
registry = LANDRegistry(_registry);
emit SetLANDRegistry(registry);
}
ping
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
Source Code
function ping() external {
registry.ping();
}
getEstateSize
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 |
estateId |
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
Source Code
function getEstateSize(uint256 estateId) external view returns (uint256) {
return estateLandIds[estateId].length;
}
getLANDsSize
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
Source Code
function getLANDsSize(address _owner) public view returns (uint256) {
// Avoid balanceOf to not compute an unnecesary require
uint256 landsSize;
uint256 balance = ownedTokensCount[_owner];
for (uint256 i; i < balance; i++) {
uint256 estateId = ownedTokens[_owner][i];
landsSize += estateLandIds[estateId].length;
}
return landsSize;
}
updateMetadata
keyboard_arrow_up
getMetadata
keyboard_arrow_up
isUpdateAuthorized
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.
|
estateId |
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
Source Code
function isUpdateAuthorized(address operator, uint256 estateId)
external
view
returns (bool)
{
return _isUpdateAuthorized(operator, estateId);
}
setUpdateManager
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.
|
_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 setUpdateManager(
address _owner,
address _operator,
bool _approved
) external {
require(
_operator != msg.sender,
"The operator should be different from owner"
);
require(
_owner == msg.sender || operatorApprovals[_owner][msg.sender],
"Unauthorized user"
);
updateManager[_owner][_operator] = _approved;
emit UpdateManager(_owner, _operator, msg.sender, _approved);
}
setUpdateOperator
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 |
estateId |
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.
|
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.
transaction
Modifiers
help
Modifiers are additions to a function that typically make various checks before
the function is run.
canSetUpdateOperator
checks for the following:
One or more of the following:
-null
Source Code
function setUpdateOperator(uint256 estateId, address operator)
public
canSetUpdateOperator(estateId)
{
updateOperator[estateId] = operator;
emit UpdateOperator(estateId, operator);
}
setManyUpdateOperator
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 |
_estateIds |
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.
|
_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.
transaction
Source Code
function setManyUpdateOperator(uint256[] _estateIds, address _operator) public {
for (uint256 i = 0; i < _estateIds.length; i++) {
setUpdateOperator(_estateIds[i], _operator);
}
}
setLandUpdateOperator
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 |
estateId |
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.
|
landId |
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.
|
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.
transaction
Modifiers
help
Modifiers are additions to a function that typically make various checks before
the function is run.
canSetUpdateOperator
checks for the following:
One or more of the following:
-null
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 setLandUpdateOperator(
uint256 estateId,
uint256 landId,
address operator
) public canSetUpdateOperator(estateId) {
require(
landIdEstate[landId] == estateId,
"The LAND is not part of the Estate"
);
registry.setUpdateOperator(landId, operator);
}
setManyLandUpdateOperator
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 |
_estateId |
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.
|
_landIds |
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.
|
_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.
transaction
Modifiers
help
Modifiers are additions to a function that typically make various checks before
the function is run.
canSetUpdateOperator
checks for the following:
One or more of the following:
-null
Source Code
function setManyLandUpdateOperator(
uint256 _estateId,
uint256[] _landIds,
address _operator
) public canSetUpdateOperator(_estateId) {
for (uint256 i = 0; i < _landIds.length; i++) {
require(
landIdEstate[_landIds[i]] == _estateId,
"The LAND is not part of the Estate"
);
}
registry.setManyUpdateOperator(_landIds, _operator);
}
initialize
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 |
_name |
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 |
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.
|
_registry |
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.
isInitializer
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 initialize(
string _name,
string _symbol,
address _registry
) public isInitializer("EstateRegistry", "0.0.2") {
require(_registry != 0, "The registry should be a valid address");
ERC721Token.initialize(_name, _symbol);
Ownable.initialize(msg.sender);
registry = LANDRegistry(_registry);
}
getFingerprint
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 |
estateId |
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
Source Code
function getFingerprint(uint256 estateId) public view returns (bytes32 result) {
result = keccak256(abi.encodePacked("estateId", estateId));
uint256 length = estateLandIds[estateId].length;
for (uint256 i = 0; i < length; i++) {
result ^= keccak256(abi.encodePacked(estateLandIds[estateId][i]));
}
return result;
}
verifyFingerprint
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 |
estateId |
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.
|
fingerprint |
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.
view
Source Code
function verifyFingerprint(uint256 estateId, bytes fingerprint)
public
view
returns (bool)
{
return getFingerprint(estateId) == _bytesToBytes32(fingerprint);
}
safeTransferManyFrom
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.
|
estateIds |
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 safeTransferManyFrom(
address from,
address to,
uint256[] estateIds
) public {
safeTransferManyFrom(from, to, estateIds, "");
}
safeTransferManyFrom
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.
|
estateIds |
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 safeTransferManyFrom(
address from,
address to,
uint256[] estateIds,
bytes data
) public {
for (uint256 i = 0; i < estateIds.length; i++) {
safeTransferFrom(from, to, estateIds[i], data);
}
}
updateLandData
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 |
estateId |
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.
|
landId |
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 |
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
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 updateLandData(
uint256 estateId,
uint256 landId,
string data
) public {
_updateLandData(estateId, landId, data);
}
updateManyLandData
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 |
estateId |
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.
|
landIds |
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 |
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
Source Code
function updateManyLandData(
uint256 estateId,
uint256[] landIds,
string data
) public {
uint256 length = landIds.length;
for (uint256 i = 0; i < length; i++) {
_updateLandData(estateId, landIds[i], data);
}
}
registerBalance
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
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 registerBalance() external {
require(
!registeredBalance[msg.sender],
"Register Balance::The user is already registered"
);
// Get balance of the sender
uint256 currentBalance = estateLandBalance.balanceOf(msg.sender);
if (currentBalance > 0) {
require(
estateLandBalance.destroyTokens(msg.sender, currentBalance),
"Register Balance::Could not destroy tokens"
);
}
// Set balance as registered
registeredBalance[msg.sender] = true;
// Get LAND balance
uint256 newBalance = getLANDsSize(msg.sender);
// Generate Tokens
require(
estateLandBalance.generateTokens(msg.sender, newBalance),
"Register Balance::Could not generate tokens"
);
}
unregisterBalance
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
Source Code
function unregisterBalance() external {
require(
registeredBalance[msg.sender],
"Unregister Balance::The user not registered"
);
// Set balance as unregistered
registeredBalance[msg.sender] = false;
// Get balance
uint256 currentBalance = estateLandBalance.balanceOf(msg.sender);
// Destroy Tokens
require(
estateLandBalance.destroyTokens(msg.sender, currentBalance),
"Unregister Balance::Could not destroy tokens"
);
}
setEstateLandBalanceToken
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
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.
UNKNOWN VALUE
must not be equal to
UNKNOWN VALUE
Source Code
function setEstateLandBalanceToken() external {
require(estateLandBalance == address(0), "estateLandBalance was set");
_setEstateLandBalanceToken(
address(0x8568f23f343694650370fe5e254b55bfb704a6c7)
);
}
Internal functions are parts of the contract that can't be used directly, but instead are used by
the public functions listed above.
internal EstateRegistry._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.
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 _supportsInterface(bytes4 _interfaceId) internal view returns (bool) {
// solium-disable-next-line operator-whitespace
return
super._supportsInterface(_interfaceId) ||
_interfaceId == InterfaceId_GetMetadata ||
_interfaceId == InterfaceId_VerifyFingerprint;
}
internal EstateRegistry._mintEstate
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.
|
metadata |
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 _mintEstate(address to, string metadata) internal returns (uint256) {
require(to != address(0), "You can not mint to an empty address");
uint256 estateId = _getNewEstateId();
_mint(to, estateId);
_updateMetadata(estateId, metadata);
emit CreateEstate(to, estateId, metadata);
return estateId;
}
internal EstateRegistry._updateMetadata
keyboard_arrow_up
internal EstateRegistry._getNewEstateId
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.
view
Source Code
function _getNewEstateId() internal view returns (uint256) {
return totalSupply().add(1);
}
internal EstateRegistry._pushLandId
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 |
estateId |
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.
|
landId |
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.
null
UNKNOWN VALUE
must be equal to
UNKNOWN VALUE
Source Code
function _pushLandId(uint256 estateId, uint256 landId) internal {
require(exists(estateId), "The Estate id should exist");
require(landIdEstate[landId] == 0, "The LAND is already owned by an Estate");
require(
registry.ownerOf(landId) == address(this),
"The EstateRegistry cannot manage the LAND"
);
estateLandIds[estateId].push(landId);
landIdEstate[landId] = estateId;
estateLandIndex[estateId][landId] = estateLandIds[estateId].length;
address owner = ownerOf(estateId);
_updateEstateLandBalance(address(registry), owner, 1);
emit AddLand(estateId, landId);
}
internal EstateRegistry._transferLand
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 |
estateId |
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.
|
landId |
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.
|
destinatary |
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 _transferLand(
uint256 estateId,
uint256 landId,
address destinatary
) internal {
require(
destinatary != address(0),
"You can not transfer LAND to an empty address"
);
uint256[] storage landIds = estateLandIds[estateId];
mapping(uint256 => uint256) landIndex = estateLandIndex[estateId];
/**
* Using 1-based indexing to be able to make this check
*/
require(landIndex[landId] != 0, "The LAND is not part of the Estate");
uint256 lastIndexInArray = landIds.length.sub(1);
/**
* Get the landIndex of this token in the landIds list
*/
uint256 indexInArray = landIndex[landId].sub(1);
/**
* Get the landId at the end of the landIds list
*/
uint256 tempTokenId = landIds[lastIndexInArray];
/**
* Store the last token in the position previously occupied by landId
*/
landIndex[tempTokenId] = indexInArray.add(1);
landIds[indexInArray] = tempTokenId;
/**
* Delete the landIds[last element]
*/
delete landIds[lastIndexInArray];
landIds.length = lastIndexInArray;
/**
* Drop this landId from both the landIndex and landId list
*/
landIndex[landId] = 0;
/**
* Drop this landId Estate
*/
landIdEstate[landId] = 0;
address owner = ownerOf(estateId);
_updateEstateLandBalance(owner, address(registry), 1);
registry.safeTransferFrom(this, destinatary, landId);
emit RemoveLand(estateId, landId, destinatary);
}
internal EstateRegistry._isUpdateAuthorized
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.
|
estateId |
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 _isUpdateAuthorized(address operator, uint256 estateId)
internal
view
returns (bool)
{
address owner = ownerOf(estateId);
return
isApprovedOrOwner(operator, estateId) ||
updateOperator[estateId] == operator ||
updateManager[owner][operator];
}
internal EstateRegistry._isLandUpdateAuthorized
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.
|
estateId |
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.
|
landId |
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
Source Code
function _isLandUpdateAuthorized(
address operator,
uint256 estateId,
uint256 landId
) internal returns (bool) {
return
_isUpdateAuthorized(operator, estateId) ||
registry.updateOperator(landId) == operator;
}
internal EstateRegistry._bytesToUint
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 |
b |
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.
pure
Source Code
function _bytesToUint(bytes b) internal pure returns (uint256) {
return uint256(_bytesToBytes32(b));
}
internal EstateRegistry._bytesToBytes32
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 |
b |
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.
pure
Source Code
function _bytesToBytes32(bytes b) internal pure returns (bytes32) {
bytes32 out;
for (uint256 i = 0; i < b.length; i++) {
out |= bytes32(b[i] & 0xFF) >> i.mul(8);
}
return out;
}
internal EstateRegistry._updateLandData
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 |
estateId |
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.
|
landId |
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 |
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
Modifiers
help
Modifiers are additions to a function that typically make various checks before
the function is run.
onlyLandUpdateAuthorized
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 _updateLandData(
uint256 estateId,
uint256 landId,
string data
) internal onlyLandUpdateAuthorized(estateId, landId) {
require(
landIdEstate[landId] == estateId,
"The LAND is not part of the Estate"
);
int256 x;
int256 y;
(x, y) = registry.decodeTokenId(landId);
registry.updateLandData(x, y, data);
}
internal EstateRegistry._setEstateLandBalanceToken
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 |
_newEstateLandBalance |
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.
UNKNOWN VALUE
must not be equal to
UNKNOWN VALUE
Source Code
function _setEstateLandBalanceToken(address _newEstateLandBalance) internal {
require(
_newEstateLandBalance != address(0),
"New estateLandBalance should not be zero address"
);
emit SetEstateLandBalanceToken(estateLandBalance, _newEstateLandBalance);
estateLandBalance = IMiniMeToken(_newEstateLandBalance);
}
internal EstateRegistry._updateEstateLandBalance
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.
|
_amount |
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
Source Code
function _updateEstateLandBalance(
address _from,
address _to,
uint256 _amount
) internal {
if (registeredBalance[_from]) {
estateLandBalance.destroyTokens(_from, _amount);
}
if (registeredBalance[_to]) {
estateLandBalance.generateTokens(_to, _amount);
}
}
internal Migratable.validateMigrationIsPending
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 |
contractName |
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.
|
migrationId |
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.
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.
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 validateMigrationIsPending(string contractName, string migrationId)
private
view
{
require(
!isMigrated(contractName, migrationId),
"Requested target migration ID has already been run"
);
}
internal ERC721Token._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.
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 _supportsInterface(bytes4 _interfaceId) internal view returns (bool) {
return
super._supportsInterface(_interfaceId) ||
_interfaceId == InterfaceId_ERC721Enumerable ||
_interfaceId == InterfaceId_ERC721Metadata;
}
internal ERC721Token._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
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 _setTokenURI(uint256 _tokenId, string _uri) internal {
require(exists(_tokenId));
tokenURIs[_tokenId] = _uri;
}
internal ERC721Token.addTokenTo
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 addTokenTo(address _to, uint256 _tokenId) internal {
super.addTokenTo(_to, _tokenId);
uint256 length = ownedTokens[_to].length;
ownedTokens[_to].push(_tokenId);
ownedTokensIndex[_tokenId] = length;
}
internal ERC721Token.removeTokenFrom
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.
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 removeTokenFrom(address _from, uint256 _tokenId) internal {
super.removeTokenFrom(_from, _tokenId);
uint256 tokenIndex = ownedTokensIndex[_tokenId];
uint256 lastTokenIndex = ownedTokens[_from].length.sub(1);
uint256 lastToken = ownedTokens[_from][lastTokenIndex];
ownedTokens[_from][tokenIndex] = lastToken;
ownedTokens[_from][lastTokenIndex] = 0;
// Note that this will handle single-element arrays. In that case, both tokenIndex and lastTokenIndex are going to
// be zero. Then we can make sure that we will remove _tokenId from the ownedTokens list since we are first swapping
// the lastToken to the first position, and then dropping the element placed in the last position of the list
ownedTokens[_from].length--;
ownedTokensIndex[_tokenId] = 0;
ownedTokensIndex[lastToken] = tokenIndex;
}
internal ERC721Token._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);
allTokensIndex[_tokenId] = allTokens.length;
allTokens.push(_tokenId);
}
internal ERC721Token._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);
// Clear metadata (if any)
if (bytes(tokenURIs[_tokenId]).length != 0) {
delete tokenURIs[_tokenId];
}
// Reorg all tokens array
uint256 tokenIndex = allTokensIndex[_tokenId];
uint256 lastTokenIndex = allTokens.length.sub(1);
uint256 lastToken = allTokens[lastTokenIndex];
allTokens[tokenIndex] = lastToken;
allTokens[lastTokenIndex] = 0;
allTokens.length--;
allTokensIndex[_tokenId] = 0;
allTokensIndex[lastToken] = tokenIndex;
}
internal Migratable.validateMigrationIsPending
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 |
contractName |
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.
|
migrationId |
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.
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.
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 validateMigrationIsPending(string contractName, string migrationId)
private
view
{
require(
!isMigrated(contractName, migrationId),
"Requested target migration ID has already been run"
);
}
internal ERC165Support._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.
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 _supportsInterface(bytes4 _interfaceId) internal view returns (bool) {
return _interfaceId == InterfaceId_ERC165;
}
internal ERC721BasicToken._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.
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 _supportsInterface(bytes4 _interfaceId) internal view returns (bool) {
return
super._supportsInterface(_interfaceId) ||
_interfaceId == InterfaceId_ERC721 ||
_interfaceId == InterfaceId_ERC721Exists;
}
internal ERC721BasicToken.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
Source Code
function isApprovedOrOwner(address _spender, uint256 _tokenId)
internal
view
returns (bool)
{
address owner = ownerOf(_tokenId);
// Disable solium check because of
// https://github.com/duaraghav8/Solium/issues/175
// solium-disable-next-line operator-whitespace
return (_spender == owner ||
getApproved(_tokenId) == _spender ||
isApprovedForAll(owner, _spender));
}
internal ERC721BasicToken._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));
addTokenTo(_to, _tokenId);
emit Transfer(address(0), _to, _tokenId);
}
internal ERC721BasicToken._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 {
clearApproval(_owner, _tokenId);
removeTokenFrom(_owner, _tokenId);
emit Transfer(_owner, address(0), _tokenId);
}
internal ERC721BasicToken.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 |
_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 clearApproval(address _owner, uint256 _tokenId) internal {
require(ownerOf(_tokenId) == _owner);
if (tokenApprovals[_tokenId] != address(0)) {
tokenApprovals[_tokenId] = address(0);
}
}
internal ERC721BasicToken.addTokenTo
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 addTokenTo(address _to, uint256 _tokenId) internal {
require(tokenOwner[_tokenId] == address(0));
tokenOwner[_tokenId] = _to;
ownedTokensCount[_to] = ownedTokensCount[_to].add(1);
}
internal ERC721BasicToken.removeTokenFrom
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.
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 removeTokenFrom(address _from, uint256 _tokenId) internal {
require(ownerOf(_tokenId) == _from);
ownedTokensCount[_from] = ownedTokensCount[_from].sub(1);
tokenOwner[_tokenId] = address(0);
}
internal ERC721BasicToken.checkAndCallSafeTransfer
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 checkAndCallSafeTransfer(
address _from,
address _to,
uint256 _tokenId,
bytes _data
) internal returns (bool) {
if (!_to.isContract()) {
return true;
}
bytes4 retval = ERC721Receiver(_to).onERC721Received(
msg.sender,
_from,
_tokenId,
_data
);
return (retval == ERC721_RECEIVED);
}
internal ERC165Support._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.
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 _supportsInterface(bytes4 _interfaceId) internal view returns (bool) {
return _interfaceId == InterfaceId_ERC165;
}
internal Migratable.validateMigrationIsPending
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 |
contractName |
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.
|
migrationId |
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.
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.
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 validateMigrationIsPending(string contractName, string migrationId)
private
view
{
require(
!isMigrated(contractName, migrationId),
"Requested target migration ID has already been run"
);
}