LAND Ownership & Permissions
The owner concept for ERC721s and LAND
The ERC721 standard defines the concept of owner – the principal person allowed to transfer an ERC721. It also introduces the concept of approved – someone who is able to transfer an ERC721, but can’t set other allowed users. Lastly, it has the concept of approvedForAll; an owner-wide role that can transfer any ERC721 of the owner, and also set approved roles.
| Transfer Role | Object of the Role | Who can change it |
|---|---|---|
| owner | an nft | owner(nft), approved(nft), approvedForAll(owner) |
| approved | an nft | owner(nft), approvedForAll(owner(nft)) |
| approvedForAll | an address | the address itself; no need to have nfts to do this |
Updating LAND
LAND in previous versions of Decentrtaland used to hold an IPFS or IPNS locator for the scene description in a field named “metadata”. It had a number of similarities with the tokenURI field in the final ERC721 spec; but currently; LAND has both: a metadata and a tokenURI. This Metadata field is deprecated, but it’s still used for the name of the tokens and their description in the marketplace.
This field introduced two extra roles initially, the updateOperator and the updateOperatorForAll ; and then a third role, updateManager, was added in 2019.
| Update Role | Affects | Who can change it |
|---|---|---|
| updateOperator | an nft | updateManager, anyone who can transfer the NFT |
| updateManager | an address | the address itself, approvedForAll(address) |
Anyone with any permission above affecting an NFT or the address of the owner can update a LAND’s content. This means that any one of these conditions is enough for address 0xMyAddress to be able to deploy to a LAND at 15,15:
-
0xMyAddressis the owner of15,15 -
0xOwneris the owner of the land and has calledapprove("15,15", 0xMyAddress) -
0xOwneris the owner of the land and has calledapproveForAll(0xMyAddress) -
0xOwneris the owner of the land and has calledapproveForAll(0xSomeoneElse)and0xSomeoneElsehas calledapprove("15,15", 0xMyAddress) -
0xOwnerhas calledsetUpdateOperator("15,15", 0xMyAddress) -
0xOwnerhas calledupdateManager(0xMyAddress) -
0xOwnerhas calledupdateManager(0xSomeoneElse)and0xSomeoneElsehas calledupdateOperator("15,15", 0xMyAddress) -
0xOwnerhas calledapproveForAll(0xSomeoneElse)and0xSomeoneElsehas calledsetUpdateOperator("15,15", 0xMyAddress) -
0xOwnerhas calledapproveForAll(0xSomeoneElse)and0xSomeoneElsehas calledupdateManager(0xMyAddress) -
0xOwnerhas calledapprove("15,15", 0xSomeoneElse)and0xSomeoneElsehas calledsetUpdateOperator("15,15", 0xMyaddress)
Updating Estates
All the same names and logic applies to Estate NFTs. The Estates contract also have these five roles and the rules for updating them follow the same logic. They also allow updating their metadata, and they use the same method for determining the name of NFTs.
Metadata in the blockchain
Right now, the NFTs for LAND and Estates use a CSV-formatted description:
| Field | Description |
|---|---|
| name | Name for the LAND or Estate, as shown in the Marketplace |
| description | Description for the LAND or Estate |
| contents | Link to IPFS or IPNS (not used anymore) |
The use of these name and description comes into conflict with scene definitions. We should be deprecating this fairly soon, so that Scene descriptions become more of a first-class citizen.