Blockwell

Decentraland LAND

About

Stats

Public Functions 49
Event Types 12
Code Size 39,966 bytes

Events (12) keyboard_arrow_up

Approval Event

Parameters help
owner
address help
operator
address help
assetId
uint256 help

ApprovalForAll Event

Parameters help
holder
address help
operator
address help
authorized
bool help

DeployAuthorized Event

Parameters help
_caller
address help
_deployer
address help

DeployForbidden Event

Parameters help
_caller
address help
_deployer
address help

EstateRegistrySet Event

Parameters help
registry
address help

OwnerUpdate Event

Parameters help
_prevOwner
address help
_newOwner
address help

Transfer Event

Parameters help
from
address help
to
address help
assetId
uint256 help
operator
address help
userData
bytes help
operatorData
bytes help

Transfer Event

Parameters help
from
address help
to
address help
assetId
uint256 help
operator
address help
userData
bytes help

Transfer Event

Parameters help
from
address help
to
address help
assetId
uint256 help

Update Event

Parameters help
assetId
uint256 help
holder
address help
operator
address help
data
string help

UpdateManager Event

Parameters help
_owner
address help
_operator
address help
_caller
address help
_approved
bool help

UpdateOperator Event

Parameters help
assetId
uint256 help
operator
address help

GET_METADATA Constant

bytes4 help
UNKNOWN VALUE

clearLow Constant

uint256 help
0xffffffffffffffffffffffffffffffff00000000000000000000000000000000

clearHigh Constant

uint256 help
0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff

factor Constant

uint256 help
0x100000000000000000000000000000000

ERC721_RECEIVED Constant

bytes4 help
0x150b7a02

InterfaceId_ERC165 Constant

bytes4 help
0x01ffc9a7

Old_InterfaceId_ERC721 Constant

bytes4 help
0x7c0633c6

InterfaceId_ERC721 Constant

bytes4 help
0x80ac58cd

currentContract Variable

address help

proxyOwner Variable

address help

owner Variable

address help

estateRegistry Variable

address help

latestPing Variable

mapping(address => uint) help

updateOperator Variable

mapping(uint256 => address) help

authorizedDeploy Variable

mapping(address => bool) help

_name Variable

string help
Internal Variable

_symbol Variable

string help
Internal Variable

_description Variable

string help
Internal Variable

_count Variable

uint256 help
Internal Variable

_assetsOf Variable

mapping(address => uint256[]) help
Internal Variable

_holderOf Variable

mapping(uint256 => address) help
Internal Variable

_indexOfAsset Variable

mapping(uint256 => uint256) help
Internal Variable

_assetData Variable

mapping(uint256 => string) help
Internal Variable

_operators Variable

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

_approval Variable

mapping(uint256 => address) help
Internal Variable

_deprecated_authorizedDeploy Variable

mapping(address => bool) help
Internal Variable

updateManager Variable

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

Functions Expand All Collapse All

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function name() external view returns (string) {
  return _name;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function symbol() external view returns (string) {
  return _symbol;
}

description keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function description() external view returns (string) {
  return _description;
}

tokenMetadata keyboard_arrow_up

tokensOf keyboard_arrow_up

Parameters help

Name Type
owner
address help

Properties

Visibility help public
Mutability help view
Source Code
function tokensOf(address owner) external view returns (uint256[]) {
  return _assetsOf[owner];
}

tokenOfOwnerByIndex keyboard_arrow_up

Parameters help

Name Type
owner
address help
index
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
function tokenOfOwnerByIndex(address owner, uint256 index)
  external
  view
  returns (uint256 assetId)
{
  require(index < _assetsOf[owner].length);
  require(index < (1 << 127));
  return _assetsOf[owner][index];
}

Parameters help

This function has no parameters.

Properties

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

ownerOf keyboard_arrow_up

Parameters help

Name Type
assetId
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
function ownerOf(uint256 assetId) external view returns (address) {
  return _ownerOf(assetId);
}

Parameters help

Name Type
owner
address help

Properties

Visibility help public
Mutability help view
Source Code
function balanceOf(address owner) external view returns (uint256) {
  return _balanceOf(owner);
}

isApprovedForAll keyboard_arrow_up

Parameters help

Name Type
assetHolder
address help
operator
address help

Properties

Visibility help public
Mutability help view
Source Code
function isApprovedForAll(address assetHolder, address operator)
  external
  view
  returns (bool)
{
  return _isApprovedForAll(assetHolder, operator);
}

getApproved keyboard_arrow_up

Parameters help

Name Type
assetId
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
function getApproved(uint256 assetId) external view returns (address) {
  return _getApprovedAddress(assetId);
}

getApprovedAddress keyboard_arrow_up

Parameters help

Name Type
assetId
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
function getApprovedAddress(uint256 assetId) external view returns (address) {
  return _getApprovedAddress(assetId);
}

isAuthorized keyboard_arrow_up

Parameters help

Name Type
operator
address help
assetId
uint256 help

Properties

Visibility help public
Mutability help view

Requirements help

Source Code
function isAuthorized(address operator, uint256 assetId)
  external
  view
  returns (bool)
{
  return _isAuthorized(operator, assetId);
}

setApprovalForAll keyboard_arrow_up

Parameters help

Name Type
operator
address help
authorized
bool help

Properties

Visibility help public
Mutability help transaction
Source Code
function setApprovalForAll(address operator, bool authorized) external {
  return _setApprovalForAll(operator, authorized);
}

Parameters help

Name Type
operator
address help
assetId
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function approve(address operator, uint256 assetId) external {
  address holder = _ownerOf(assetId);
  require(msg.sender == holder || _isApprovedForAll(msg.sender, holder));
  require(operator != holder);

  if (_getApprovedAddress(assetId) != operator) {
    _approval[assetId] = operator;
    emit Approval(holder, operator, assetId);
  }
}

safeTransferFrom keyboard_arrow_up

Parameters help

Name Type
from
address help
to
address help
assetId
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function safeTransferFrom(
  address from,
  address to,
  uint256 assetId
) external {
  return _doTransferFrom(from, to, assetId, "", true);
}

safeTransferFrom keyboard_arrow_up

Parameters help

Name Type
from
address help
to
address help
assetId
uint256 help
userData
bytes help

Properties

Visibility help public
Mutability help transaction
Source Code
function safeTransferFrom(
  address from,
  address to,
  uint256 assetId,
  bytes userData
) external {
  return _doTransferFrom(from, to, assetId, userData, true);
}

Parameters help

Name Type
from
address help
to
address help
assetId
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function transferFrom(
  address from,
  address to,
  uint256 assetId
) external {
  require(
    to != address(estateRegistry),
    "EstateRegistry unsafe transfers are not allowed"
  );
  return _doTransferFrom(from, to, assetId, "", false);
}

supportsInterface keyboard_arrow_up

Parameters help

Name Type
_interfaceID
bytes4 help

Properties

Visibility help public
Mutability help view
Source Code
function supportsInterface(bytes4 _interfaceID) external view returns (bool) {
  if (_interfaceID == 0xffffffff) {
    return false;
  }
  return
    _interfaceID == InterfaceId_ERC165 ||
    _interfaceID == Old_InterfaceId_ERC721 ||
    _interfaceID == InterfaceId_ERC721;
}

exists keyboard_arrow_up

Parameters help

Name Type
assetId
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
function exists(uint256 assetId) external view returns (bool) {
  return _exists(assetId);
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help pure
Source Code
function decimals() external pure returns (uint256) {
  return 0;
}

transferOwnership keyboard_arrow_up

Parameters help

Name Type
_newOwner
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function transferOwnership(address _newOwner) public onlyOwner {
  require(_newOwner != owner, "Cannot transfer to yourself");
  owner = _newOwner;
}

initialize keyboard_arrow_up

Parameters help

Name Type
bytes help

Properties

Visibility help public
Mutability help transaction
Source Code
function initialize(bytes) external {
  _name = "Decentraland LAND";
  _symbol = "LAND";
  _description = "Contract that stores the Decentraland LAND registry";
}

isUpdateAuthorized keyboard_arrow_up

Parameters help

Name Type
operator
address help
assetId
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
function isUpdateAuthorized(address operator, uint256 assetId)
  external
  view
  returns (bool)
{
  return _isUpdateAuthorized(operator, assetId);
}

authorizeDeploy keyboard_arrow_up

Parameters help

Name Type
beneficiary
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function authorizeDeploy(address beneficiary) external onlyProxyOwner {
  require(beneficiary != address(0), "invalid address");
  require(
    authorizedDeploy[beneficiary] == false,
    "address is already authorized"
  );

  authorizedDeploy[beneficiary] = true;
  emit DeployAuthorized(msg.sender, beneficiary);
}

forbidDeploy keyboard_arrow_up

Parameters help

Name Type
beneficiary
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function forbidDeploy(address beneficiary) external onlyProxyOwner {
  require(beneficiary != address(0), "invalid address");
  require(authorizedDeploy[beneficiary], "address is already forbidden");

  authorizedDeploy[beneficiary] = false;
  emit DeployForbidden(msg.sender, beneficiary);
}

assignNewParcel keyboard_arrow_up

Parameters help

Name Type
x
int help
y
int help
beneficiary
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function assignNewParcel(
  int256 x,
  int256 y,
  address beneficiary
) external onlyDeployer {
  _generate(_encodeTokenId(x, y), beneficiary);
}

assignMultipleParcels keyboard_arrow_up

Parameters help

Name Type
x
int[] help
y
int[] help
beneficiary
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function assignMultipleParcels(
  int256[] x,
  int256[] y,
  address beneficiary
) external onlyDeployer {
  for (uint256 i = 0; i < x.length; i++) {
    _generate(_encodeTokenId(x[i], y[i]), beneficiary);
  }
}

ping keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function ping() external {
  // solium-disable-next-line security/no-block-members
  latestPing[msg.sender] = block.timestamp;
}

setLatestToNow keyboard_arrow_up

Parameters help

Name Type
user
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function setLatestToNow(address user) external {
  require(
    msg.sender == proxyOwner || _isApprovedForAll(msg.sender, user),
    "Unauthorized user"
  );
  // solium-disable-next-line security/no-block-members
  latestPing[user] = block.timestamp;
}

encodeTokenId keyboard_arrow_up

Parameters help

Name Type
x
int help
y
int help

Properties

Visibility help public
Mutability help pure
Source Code
function encodeTokenId(int256 x, int256 y) external pure returns (uint256) {
  return _encodeTokenId(x, y);
}

decodeTokenId keyboard_arrow_up

Parameters help

Name Type
value
uint help

Properties

Visibility help public
Mutability help pure
Source Code
function decodeTokenId(uint256 value) external pure returns (int256, int256) {
  return _decodeTokenId(value);
}

exists keyboard_arrow_up

Parameters help

Name Type
x
int help
y
int help

Properties

Visibility help public
Mutability help view
Source Code
function exists(int256 x, int256 y) external view returns (bool) {
  return _exists(x, y);
}

ownerOfLand keyboard_arrow_up

Parameters help

Name Type
x
int help
y
int help

Properties

Visibility help public
Mutability help view
Source Code
function ownerOfLand(int256 x, int256 y) external view returns (address) {
  return _ownerOfLand(x, y);
}

ownerOfLandMany keyboard_arrow_up

Parameters help

Name Type
x
int[] help
y
int[] help

Properties

Visibility help public
Mutability help view
Source Code
function ownerOfLandMany(int256[] x, int256[] y)
  external
  view
  returns (address[])
{
  require(x.length > 0, "You should supply at least one coordinate");
  require(x.length == y.length, "The coordinates should have the same length");

  address[] memory addrs = new address[](x.length);
  for (uint256 i = 0; i < x.length; i++) {
    addrs[i] = _ownerOfLand(x[i], y[i]);
  }

  return addrs;
}

landOf keyboard_arrow_up

Parameters help

Name Type
owner
address help

Properties

Visibility help public
Mutability help view
Source Code
function landOf(address owner) external view returns (int256[], int256[]) {
  uint256 len = _assetsOf[owner].length;
  int256[] memory x = new int256[](len);
  int256[] memory y = new int256[](len);

  int256 assetX;
  int256 assetY;
  for (uint256 i = 0; i < len; i++) {
    (assetX, assetY) = _decodeTokenId(_assetsOf[owner][i]);
    x[i] = assetX;
    y[i] = assetY;
  }

  return (x, y);
}

landData keyboard_arrow_up

Parameters help

Name Type
x
int help
y
int help

Properties

Visibility help public
Mutability help view
Source Code
function landData(int256 x, int256 y) external view returns (string) {
  return _tokenMetadata(_encodeTokenId(x, y));
}

transferLand keyboard_arrow_up

Parameters help

Name Type
x
int help
y
int help
to
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function transferLand(
  int256 x,
  int256 y,
  address to
) external {
  uint256 tokenId = _encodeTokenId(x, y);
  _doTransferFrom(_ownerOf(tokenId), to, tokenId, "", true);
}

transferManyLand keyboard_arrow_up

Parameters help

Name Type
x
int[] help
y
int[] help
to
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function transferManyLand(
  int256[] x,
  int256[] y,
  address to
) external {
  require(x.length > 0, "You should supply at least one coordinate");
  require(x.length == y.length, "The coordinates should have the same length");

  for (uint256 i = 0; i < x.length; i++) {
    uint256 tokenId = _encodeTokenId(x[i], y[i]);
    _doTransferFrom(_ownerOf(tokenId), to, tokenId, "", true);
  }
}

transferLandToEstate keyboard_arrow_up

Parameters help

Name Type
x
int help
y
int help
estateId
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function transferLandToEstate(
  int256 x,
  int256 y,
  uint256 estateId
) external {
  require(
    estateRegistry.ownerOf(estateId) == msg.sender,
    "You must own the Estate you want to transfer to"
  );

  uint256 tokenId = _encodeTokenId(x, y);
  _doTransferFrom(
    _ownerOf(tokenId),
    address(estateRegistry),
    tokenId,
    toBytes(estateId),
    true
  );
}

transferManyLandToEstate keyboard_arrow_up

Parameters help

Name Type
x
int[] help
y
int[] help
estateId
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function transferManyLandToEstate(
  int256[] x,
  int256[] y,
  uint256 estateId
) external {
  require(x.length > 0, "You should supply at least one coordinate");
  require(x.length == y.length, "The coordinates should have the same length");
  require(
    estateRegistry.ownerOf(estateId) == msg.sender,
    "You must own the Estate you want to transfer to"
  );

  for (uint256 i = 0; i < x.length; i++) {
    uint256 tokenId = _encodeTokenId(x[i], y[i]);
    _doTransferFrom(
      _ownerOf(tokenId),
      address(estateRegistry),
      tokenId,
      toBytes(estateId),
      true
    );
  }
}

setUpdateOperator keyboard_arrow_up

Parameters help

Name Type
assetId
uint256 help
operator
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

canSetUpdateOperator checks for the following:
One or more of the following: -null
Source Code
function setUpdateOperator(uint256 assetId, address operator)
  public
  canSetUpdateOperator(assetId)
{
  updateOperator[assetId] = operator;
  emit UpdateOperator(assetId, operator);
}

setManyUpdateOperator keyboard_arrow_up

Parameters help

Name Type
_assetIds
uint256[] help
_operator
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function setManyUpdateOperator(uint256[] _assetIds, address _operator) public {
  for (uint256 i = 0; i < _assetIds.length; i++) {
    setUpdateOperator(_assetIds[i], _operator);
  }
}

setUpdateManager keyboard_arrow_up

Parameters help

Name Type
_owner
address help
_operator
address help
_approved
bool help

Properties

Visibility help public
Mutability help transaction
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 || _isApprovedForAll(_owner, msg.sender),
    "Unauthorized user"
  );

  updateManager[_owner][_operator] = _approved;

  emit UpdateManager(_owner, _operator, msg.sender, _approved);
}

setEstateRegistry keyboard_arrow_up

Parameters help

Name Type
registry
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function setEstateRegistry(address registry) external onlyProxyOwner {
  estateRegistry = IEstateRegistry(registry);
  emit EstateRegistrySet(registry);
}

createEstate keyboard_arrow_up

Parameters help

Name Type
x
int[] help
y
int[] help
beneficiary
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function createEstate(
  int256[] x,
  int256[] y,
  address beneficiary
) external returns (uint256) {
  // solium-disable-next-line arg-overflow
  return _createEstate(x, y, beneficiary, "");
}

createEstateWithMetadata keyboard_arrow_up

updateLandData keyboard_arrow_up

Parameters help

Name Type
x
int help
y
int help
data
string help

Properties

Visibility help public
Mutability help transaction
Source Code
function updateLandData(
  int256 x,
  int256 y,
  string data
) external {
  return _updateLandData(x, y, data);
}

updateManyLandData keyboard_arrow_up

Parameters help

Name Type
x
int[] help
y
int[] help
data
string help

Properties

Visibility help public
Mutability help transaction
Source Code
function updateManyLandData(
  int256[] x,
  int256[] y,
  string data
) external {
  require(x.length > 0, "You should supply at least one coordinate");
  require(x.length == y.length, "The coordinates should have the same length");
  for (uint256 i = 0; i < x.length; i++) {
    _updateLandData(x[i], y[i], data);
  }
}

Internal Functions Expand All Collapse All

Internal functions are parts of the contract that can't be used directly, but instead are used by the public functions listed above.

internal LANDRegistry._isUpdateAuthorized keyboard_arrow_up

Parameters help

Name Type
operator
address help
assetId
uint256 help

Properties

Visibility help internal
Mutability help view
Source Code
function _isUpdateAuthorized(address operator, uint256 assetId)
  internal
  view
  returns (bool)
{
  address owner = _ownerOf(assetId);

  return
    owner == operator ||
    updateOperator[assetId] == operator ||
    updateManager[owner][operator];
}

internal LANDRegistry._encodeTokenId keyboard_arrow_up

Parameters help

Name Type
x
int help
y
int help

Properties

Visibility help internal
Mutability help pure
Source Code
function _encodeTokenId(int256 x, int256 y)
  internal
  pure
  returns (uint256 result)
{
  require(
    -1000000 < x && x < 1000000 && -1000000 < y && y < 1000000,
    "The coordinates should be inside bounds"
  );
  return _unsafeEncodeTokenId(x, y);
}

internal LANDRegistry._unsafeEncodeTokenId keyboard_arrow_up

Parameters help

Name Type
x
int help
y
int help

Properties

Visibility help internal
Mutability help pure
Source Code
function _unsafeEncodeTokenId(int256 x, int256 y)
  internal
  pure
  returns (uint256)
{
  return ((uint256(x) * factor) & clearLow) | (uint256(y) & clearHigh);
}

internal LANDRegistry._unsafeDecodeTokenId keyboard_arrow_up

Parameters help

Name Type
value
uint help

Properties

Visibility help internal
Mutability help pure
Source Code
function _unsafeDecodeTokenId(uint256 value)
  internal
  pure
  returns (int256 x, int256 y)
{
  x = expandNegative128BitCast((value & clearLow) >> 128);
  y = expandNegative128BitCast(value & clearHigh);
}

internal LANDRegistry._decodeTokenId keyboard_arrow_up

Parameters help

Name Type
value
uint help

Properties

Visibility help internal
Mutability help pure
Source Code
function _decodeTokenId(uint256 value)
  internal
  pure
  returns (int256 x, int256 y)
{
  (x, y) = _unsafeDecodeTokenId(value);
  require(
    -1000000 < x && x < 1000000 && -1000000 < y && y < 1000000,
    "The coordinates should be inside bounds"
  );
}

internal LANDRegistry.expandNegative128BitCast keyboard_arrow_up

Parameters help

Name Type
value
uint help

Properties

Visibility help internal
Mutability help pure
Source Code
function expandNegative128BitCast(uint256 value)
  internal
  pure
  returns (int256)
{
  if (value & (1 << 127) != 0) {
    return int256(value | clearLow);
  }
  return int256(value);
}

internal LANDRegistry._exists keyboard_arrow_up

Parameters help

Name Type
x
int help
y
int help

Properties

Visibility help internal
Mutability help view
Source Code
function _exists(int256 x, int256 y) internal view returns (bool) {
  return _exists(_encodeTokenId(x, y));
}

internal LANDRegistry._ownerOfLand keyboard_arrow_up

Parameters help

Name Type
x
int help
y
int help

Properties

Visibility help internal
Mutability help view
Source Code
function _ownerOfLand(int256 x, int256 y) internal view returns (address) {
  return _ownerOf(_encodeTokenId(x, y));
}

internal LANDRegistry._tokenMetadata keyboard_arrow_up

internal LANDRegistry._createEstate keyboard_arrow_up

Parameters help

Name Type
x
int[] help
y
int[] help
beneficiary
address help
metadata
string help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _createEstate(
  int256[] x,
  int256[] y,
  address beneficiary,
  string metadata
) internal returns (uint256) {
  require(x.length > 0, "You should supply at least one coordinate");
  require(x.length == y.length, "The coordinates should have the same length");
  require(address(estateRegistry) != 0, "The Estate registry should be set");

  uint256 estateTokenId = estateRegistry.mint(beneficiary, metadata);
  bytes memory estateTokenIdBytes = toBytes(estateTokenId);

  for (uint256 i = 0; i < x.length; i++) {
    uint256 tokenId = _encodeTokenId(x[i], y[i]);
    _doTransferFrom(
      _ownerOf(tokenId),
      address(estateRegistry),
      tokenId,
      estateTokenIdBytes,
      true
    );
  }

  return estateTokenId;
}

internal LANDRegistry.toBytes keyboard_arrow_up

Parameters help

Name Type
x
uint256 help

Properties

Visibility help internal
Mutability help pure
Source Code
function toBytes(uint256 x) internal pure returns (bytes b) {
  b = new bytes(32);
  // solium-disable-next-line security/no-inline-assembly
  assembly {
    mstore(add(b, 32), x)
  }
}

internal LANDRegistry._updateLandData keyboard_arrow_up

Parameters help

Name Type
x
int help
y
int help
data
string help

Properties

Visibility help internal
Mutability help transaction

Modifiers help

Source Code
function _updateLandData(
  int256 x,
  int256 y,
  string data
) internal onlyUpdateAuthorized(_encodeTokenId(x, y)) {
  uint256 assetId = _encodeTokenId(x, y);
  address owner = _holderOf[assetId];

  _update(assetId, data);

  emit Update(assetId, owner, msg.sender, data);
}

internal LANDRegistry._doTransferFrom keyboard_arrow_up

Parameters help

Name Type
from
address help
to
address help
assetId
uint256 help
userData
bytes help
doCheck
bool help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _doTransferFrom(
  address from,
  address to,
  uint256 assetId,
  bytes userData,
  bool doCheck
) internal {
  updateOperator[assetId] = address(0);

  super._doTransferFrom(from, to, assetId, userData, doCheck);
}

internal LANDRegistry._isContract keyboard_arrow_up

Parameters help

Name Type
addr
address help

Properties

Visibility help internal
Mutability help view
Source Code
function _isContract(address addr) internal view returns (bool) {
  uint256 size;
  // solium-disable-next-line security/no-inline-assembly
  assembly {
    size := extcodesize(addr)
  }
  return size > 0;
}

internal OwnableStorage.constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help transaction
Source Code
constructor() internal {
  owner = msg.sender;
}

internal OwnableStorage.constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help transaction
Source Code
constructor() internal {
  owner = msg.sender;
}

internal FullAssetRegistry._exists keyboard_arrow_up

Parameters help

Name Type
assetId
uint256 help

Properties

Visibility help internal
Mutability help view
Source Code
function _exists(uint256 assetId) internal view returns (bool) {
  return _holderOf[assetId] != 0;
}

internal ERC721Base._totalSupply keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function _totalSupply() internal view returns (uint256) {
  return _count;
}

internal ERC721Base._ownerOf keyboard_arrow_up

Parameters help

Name Type
assetId
uint256 help

Properties

Visibility help internal
Mutability help view
Source Code
function _ownerOf(uint256 assetId) internal view returns (address) {
  return _holderOf[assetId];
}

internal ERC721Base._balanceOf keyboard_arrow_up

Parameters help

Name Type
owner
address help

Properties

Visibility help internal
Mutability help view
Source Code
function _balanceOf(address owner) internal view returns (uint256) {
  return _assetsOf[owner].length;
}

internal ERC721Base._isApprovedForAll keyboard_arrow_up

Parameters help

Name Type
assetHolder
address help
operator
address help

Properties

Visibility help internal
Mutability help view
Source Code
function _isApprovedForAll(address assetHolder, address operator)
  internal
  view
  returns (bool)
{
  return _operators[assetHolder][operator];
}

internal ERC721Base._getApprovedAddress keyboard_arrow_up

Parameters help

Name Type
assetId
uint256 help

Properties

Visibility help internal
Mutability help view
Source Code
function _getApprovedAddress(uint256 assetId) internal view returns (address) {
  return _approval[assetId];
}

internal ERC721Base._isAuthorized keyboard_arrow_up

Parameters help

Name Type
operator
address help
assetId
uint256 help

Properties

Visibility help internal
Mutability help view

Requirements help

Source Code
function _isAuthorized(address operator, uint256 assetId)
  internal
  view
  returns (bool)
{
  require(operator != 0);
  address owner = _ownerOf(assetId);
  if (operator == owner) {
    return true;
  }
  return
    _isApprovedForAll(owner, operator) ||
    _getApprovedAddress(assetId) == operator;
}

internal ERC721Base._setApprovalForAll keyboard_arrow_up

Parameters help

Name Type
operator
address help
authorized
bool help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _setApprovalForAll(address operator, bool authorized) internal {
  if (authorized) {
    require(!_isApprovedForAll(msg.sender, operator));
    _addAuthorization(operator, msg.sender);
  } else {
    require(_isApprovedForAll(msg.sender, operator));
    _clearAuthorization(operator, msg.sender);
  }
  emit ApprovalForAll(msg.sender, operator, authorized);
}

internal ERC721Base._addAuthorization keyboard_arrow_up

Parameters help

Name Type
operator
address help
holder
address help

Properties

Visibility help private
Mutability help transaction
Source Code
function _addAuthorization(address operator, address holder) private {
  _operators[holder][operator] = true;
}

internal ERC721Base._clearAuthorization keyboard_arrow_up

Parameters help

Name Type
operator
address help
holder
address help

Properties

Visibility help private
Mutability help transaction
Source Code
function _clearAuthorization(address operator, address holder) private {
  _operators[holder][operator] = false;
}

internal ERC721Base._addAssetTo keyboard_arrow_up

Parameters help

Name Type
to
address help
assetId
uint256 help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _addAssetTo(address to, uint256 assetId) internal {
  _holderOf[assetId] = to;

  uint256 length = _balanceOf(to);

  _assetsOf[to].push(assetId);

  _indexOfAsset[assetId] = length;

  _count = _count.add(1);
}

internal ERC721Base._removeAssetFrom keyboard_arrow_up

Parameters help

Name Type
from
address help
assetId
uint256 help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _removeAssetFrom(address from, uint256 assetId) internal {
  uint256 assetIndex = _indexOfAsset[assetId];
  uint256 lastAssetIndex = _balanceOf(from).sub(1);
  uint256 lastAssetId = _assetsOf[from][lastAssetIndex];

  _holderOf[assetId] = 0;

  // Insert the last asset into the position previously occupied by the asset to be removed
  _assetsOf[from][assetIndex] = lastAssetId;

  // Resize the array
  _assetsOf[from][lastAssetIndex] = 0;
  _assetsOf[from].length--;

  // Remove the array if no more assets are owned to prevent pollution
  if (_assetsOf[from].length == 0) {
    delete _assetsOf[from];
  }

  // Update the index of positions for the asset
  _indexOfAsset[assetId] = 0;
  _indexOfAsset[lastAssetId] = assetIndex;

  _count = _count.sub(1);
}

internal ERC721Base._clearApproval keyboard_arrow_up

Parameters help

Name Type
holder
address help
assetId
uint256 help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _clearApproval(address holder, uint256 assetId) internal {
  if (_ownerOf(assetId) == holder && _approval[assetId] != 0) {
    _approval[assetId] = 0;
    emit Approval(holder, 0, assetId);
  }
}

internal ERC721Base._generate keyboard_arrow_up

Parameters help

Name Type
assetId
uint256 help
beneficiary
address help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _generate(uint256 assetId, address beneficiary) internal {
  require(_holderOf[assetId] == 0);

  _addAssetTo(beneficiary, assetId);

  emit Transfer(0, beneficiary, assetId);
}

internal ERC721Base._destroy keyboard_arrow_up

Parameters help

Name Type
assetId
uint256 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _destroy(uint256 assetId) internal {
  address holder = _holderOf[assetId];
  require(holder != 0);

  _removeAssetFrom(holder, assetId);

  emit Transfer(holder, 0, assetId);
}

internal ERC721Base._doTransferFrom keyboard_arrow_up

Parameters help

Name Type
from
address help
to
address help
assetId
uint256 help
userData
bytes help
doCheck
bool help

Properties

Visibility help internal
Mutability help transaction

Modifiers help

onlyAuthorized checks for the following:
null
Source Code
function _doTransferFrom(
  address from,
  address to,
  uint256 assetId,
  bytes userData,
  bool doCheck
) internal onlyAuthorized(assetId) {
  _moveToken(from, to, assetId, userData, doCheck);
}

internal ERC721Base._moveToken keyboard_arrow_up

Parameters help

Name Type
from
address help
to
address help
assetId
uint256 help
userData
bytes help
doCheck
bool help

Properties

Visibility help private
Mutability help transaction
Source Code
function _moveToken(
  address from,
  address to,
  uint256 assetId,
  bytes userData,
  bool doCheck
)
  private
  isDestinataryDefined(to)
  destinataryIsNotHolder(assetId, to)
  isCurrentOwner(from, assetId)
{
  address holder = _holderOf[assetId];
  _clearApproval(holder, assetId);
  _removeAssetFrom(holder, assetId);
  _addAssetTo(to, assetId);
  emit Transfer(holder, to, assetId);

  if (doCheck && _isContract(to)) {
    // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))
    require(
      IERC721Receiver(to).onERC721Received(
        msg.sender,
        holder,
        assetId,
        userData
      ) == ERC721_RECEIVED
    );
  }
}

internal ERC721Base._isContract keyboard_arrow_up

Parameters help

Name Type
addr
address help

Properties

Visibility help internal
Mutability help view
Source Code
function _isContract(address addr) internal view returns (bool) {
  uint256 size;
  assembly {
    size := extcodesize(addr)
  }
  return size > 0;
}

internal ERC721Metadata._update keyboard_arrow_up