About
Stats
Public Functions
49
Event Types
13
Code Size
56,622 bytes
Events (13) keyboard_arrow_up
Functions
isMigrated keyboard_arrow_up
initialize keyboard_arrow_up
initialize keyboard_arrow_up
Modifiers help
isInitializer checks for the following:
Source Code
function initialize(address _sender) public isInitializer("Ownable", "1.9.0") {
owner = _sender;
}
transferOwnership keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0));
emit OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
onERC721Received keyboard_arrow_up
Parameters help
Modifiers help
onlyRegistry checks for the following:
Requirements help
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
Source Code
function balanceOf(address _owner) public view returns (uint256) {
require(_owner != address(0));
return ownedTokensCount[_owner];
}
ownerOf keyboard_arrow_up
exists keyboard_arrow_up
approve keyboard_arrow_up
Requirements help
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
setApprovalForAll keyboard_arrow_up
Requirements help
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
transferFrom keyboard_arrow_up
Requirements help
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
safeTransferFrom keyboard_arrow_up
Parameters help
Modifiers help
canTransfer checks for the following:
null
Requirements help
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
symbol keyboard_arrow_up
tokenURI keyboard_arrow_up
totalSupply keyboard_arrow_up
tokenOfOwnerByIndex keyboard_arrow_up
Source Code
function tokenOfOwnerByIndex(
address _owner,
uint256 _index
)
public
view
returns (uint256)
{
require(_index < balanceOf(_owner));
return ownedTokens[_owner][_index];
}
tokenByIndex keyboard_arrow_up
Requirements help
Source Code
function tokenByIndex(uint256 _index) public view returns (uint256) {
require(_index < totalSupply());
return allTokens[_index];
}
supportsInterface keyboard_arrow_up
initialize keyboard_arrow_up
Modifiers help
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
transferLand keyboard_arrow_up
transferManyLands keyboard_arrow_up
Modifiers help
canTransfer checks for the following:
null
Source Code
function transferManyLands(
uint256 estateId,
uint256[] landIds,
address destinatary
)
external
canTransfer(estateId)
{
uint length = landIds.length;
for (uint i = 0; i < length; i++) {
_transferLand(estateId, landIds[i], destinatary);
}
}
getLandEstateId keyboard_arrow_up
setLANDRegistry keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
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
getEstateSize keyboard_arrow_up
getLANDsSize keyboard_arrow_up
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
Modifiers help
onlyUpdateAuthorized checks for the following:
null
Source Code
function updateMetadata(
uint256 estateId,
string metadata
)
external
onlyUpdateAuthorized(estateId)
{
_updateMetadata(estateId, metadata);
emit Update(
estateId,
ownerOf(estateId),
msg.sender,
metadata
);
}
getMetadata keyboard_arrow_up
isUpdateAuthorized keyboard_arrow_up
setUpdateManager keyboard_arrow_up
Requirements help
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
Modifiers help
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
Source Code
function setManyUpdateOperator(
uint256[] _estateIds,
address _operator
)
public
{
for (uint i = 0; i < _estateIds.length; i++) {
setUpdateOperator(_estateIds[i], _operator);
}
}
setLandUpdateOperator keyboard_arrow_up
Modifiers help
canSetUpdateOperator checks for the following:
One or more of the following:
-null
Requirements help
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
Modifiers help
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 (uint 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
Modifiers help
isInitializer checks for the following:
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
Source Code
function getFingerprint(uint256 estateId)
public
view
returns (bytes32 result)
{
result = keccak256(abi.encodePacked("estateId", estateId));
uint256 length = estateLandIds[estateId].length;
for (uint i = 0; i < length; i++) {
result ^= keccak256(abi.encodePacked(estateLandIds[estateId][i]));
}
return result;
}
verifyFingerprint keyboard_arrow_up
safeTransferManyFrom keyboard_arrow_up
safeTransferManyFrom keyboard_arrow_up
Parameters help
Source Code
function safeTransferManyFrom(
address from,
address to,
uint256[] estateIds,
bytes data
)
public
{
for (uint i = 0; i < estateIds.length; i++) {
safeTransferFrom(
from,
to,
estateIds[i],
data
);
}
}
updateLandData keyboard_arrow_up
Requirements help
Source Code
function updateLandData(uint256 estateId, uint256 landId, string data) public {
_updateLandData(estateId, landId, data);
}
updateManyLandData keyboard_arrow_up
Source Code
function updateManyLandData(uint256 estateId, uint256[] landIds, string data) public {
uint length = landIds.length;
for (uint i = 0; i < length; i++) {
_updateLandData(estateId, landIds[i], data);
}
}
registerBalance keyboard_arrow_up
Parameters help
This function has no parameters.
Requirements help
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
This function has no parameters.
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
This function has no parameters.
Requirements help
UNKNOWN VALUE
must not be equal to
UNKNOWN VALUE
Source Code
function setEstateLandBalanceToken() external {
require(estateLandBalance == address(0), "estateLandBalance was set");
_setEstateLandBalanceToken(address(0x8568f23f343694650370fe5e254b55bfb704a6c7));
}