Blockwell

Decentraland LAND

About

Stats

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

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

Functions Expand All Collapse All

name keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

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

symbol keyboard_arrow_up

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];
  }

totalSupply keyboard_arrow_up

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);
  }

balanceOf keyboard_arrow_up

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);
  }

approve keyboard_arrow_up

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);
  }

transferFrom keyboard_arrow_up

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);
  }

decimals keyboard_arrow_up

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(int x, int 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(int[] x, int[] y, address beneficiary) external onlyDeployer {
    for (uint 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(int x, int y) external pure returns (uint) {
    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(uint value) external pure returns (int, int) {
    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(int x, int 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(int x, int 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(int[] x, int[] 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 (uint 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 (int[], int[]) {
    uint256 len = _assetsOf[owner].length;
    int[] memory x = new int[](len);
    int[] memory y = new int[](len);

    int assetX;
    int assetY;
    for (uint 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(int x, int 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(int x, int 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(int[] x, int[] 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 (uint 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(int x, int 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(int[] x, int[] 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 (uint 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 (uint 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(int[] x, int[] 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(
    int x,
    int 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(int[] x, int[] 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 (uint i = 0; i < x.length; i++) {
      _updateLandData(x[i], y[i], data);
    }
  }