和 ERC809 一样,ERC1201 也停留在想法阶段,并没有形成社区统一的标准,不过作为 ERC809 的加强版,我们还是可以了解一下这个协议。
function mintRental(uint256 tokenId, uint256 start, uint256 end, address renter) external //为租赁者铸造一个 NFT 凭证
function setRenterRights(uint256 tokenId, address renter, bool canBurn, bool canTransferToAll, bool canTransferToPreapproved, bool canCopyAcrossRights) public //设置租赁人的权限
function addPreapprovedRenters(uint tokenId, address[] preapprovedList) public //租赁白名单
function removePreapprovedRenters(uint tokenId, address[] preapprovedList) public ///移除白名单
function approveRentalTransfer(address approved, uint256 tokenId, uint256 start, uint256 end) public //批准租赁人进行二次出租
function rentalTransferFrom(address from, address to, uint256 tokenId, uint256 start, uint256 end) public //租赁者进行二次出租
function cancelRental(address owner, uint256 tokenId, uint256 start, uint256 stop) public returns (bool success) //取消租赁
function exists(uint256 tokenId, uint256 timeIndex) public view returns (bool) //检查出租情况
function ownerOfRental(uint256 tokenId, uint256 time) public view returns (address) //业主
function balanceOfRental(address owner, uint256 tokenId, uint256 start, uint256 end) public view returns (uint256) // 租金
function balanceOfRentalApproval(address approved, uint256 tokenId, uint256 start, uint256 end) public view returns (uint256)
可以看到,在 ERC809 的基础上,ERC1201 再一次丰富了协议,最重要的是限定了承租人的权利范围:
function setRenterRights(
uint256 tokenId,
address renter,
bool canBurn,
bool canTransferToAll,
bool canTransferToPreapproved,
bool canCopyAcrossRights
) public
设置租赁代币所有者的权限,包括以下内容:
因为租赁权是有一定范围的权利(租赁≠拥有),承租人不能破坏,修改,或者出售租赁物品。包括承租人是否可以进行二次出售,这些权利都需要进一步详细规定。