Owner of rsk top level domain. It can setSubdomainOwner in RNS.
RSK Owner is an Ownable contract and represents domain labels ownership fully compatible with ERC-721 interface using OpenZeppelin’s implementation.
The implementation is divided into two main parts: The public methods exposed by RSK Owner, and the restricted access methods to manage upgrades to the solution. The latter will not be described in this article.
availableThe term domain label refers to the name that is added behind .rsk. For example, to register
'domain.rsk'one should usekeccak256('domain')fortokenIdparameters.
availablefunction available(uint256 tokenId) public view returns(bool);
Gets the owner of the specified domain.
tokenId keccak256 of the domain label.Returns domain owner.
balanceOffunction balanceOf(address owner) public view returns (uint256 balance);
Gets the amount of domains owned by the specified address.
owner address to query the balance of.Returns the amount owned by the passed address.
ownerOffunction ownerOf(uint256 tokenId) public view returns (address owner);
Gets the owner of the specified domain.
tokenId keccak256 of the domain label to query the owner of.Returns address currently marked as the owner of the given domain.
transferFromfunction transferFrom(address from, address to, uint256 tokenId) public;
Transfers the ownership of a given token ID to another address.
Usage of this method is discouraged, use safeTransferFrom whenever possible. Requires the msg.sender to be the owner, approved, or operator.
from current owner of the domain.to address to receive the ownership of the given domain.tokenId keccak256 of the domain label to be transferred.approvefunction approve(address to, uint256 tokenId) public;
Approves another address to transfer the given domain label.
The zero address indicates there is no approved address. There can only be one approved address per token at a given time. Can only be called by the token owner or an approved operator.
to address to be approved for the given tokenId.tokenId keccak256 of the domain label to be approved.getApprovedfunction getApproved(uint256 tokenId) public view returns (address operator);
Gets the approved address for a domain, or zero if no address set.
tokenId keccak256 of the domain label to query the approval of.Returns currently approved for the given domain.
setApprovalForAllfunction setApprovalForAll(address operator, bool _approved) public;
Sets or unsets the approval of a given operator. An operator is allowed to transfer all tokens of the sender on their behalf.
to operator address to set the approval.approved representing the status of the approval to be set.isApprovedForAllfunction isApprovedForAll(address owner, address operator) public view returns (bool);
Tells whether an operator is approved by a given owner.
owner owner address which you want to query the approval of.operator operator address which you want to query the approval ofReturns whether the given operator is approved by the given owner.
safeTransferFromfunction safeTransferFrom(address from, address to, uint256 tokenId) public;
Safely transfers the ownership of a given domain to another address.
If the target address is a contract, it must implement onERC721Received, which is called upon a safe transfer, and return the magic value bytes4(keccak256("onERC721Received(address,address,uint256,bytes)")); otherwise, the transfer is reverted.
Requires the msg.sender to be the owner, approved, or operator.
from current owner of the domain.to address to receive the ownership of the given domain.tokenId keccak256 of the domain label to be transferred.function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public;
_data bytes data to send along with a safe transfer check.supportsInterfacefunction supportsInterface(bytes4 interfaceId) external view returns (bool);
Returns true if this contract implements the interface defined by interfaceId, based on ERC-165 standard for interface detection.
This function call costs less than 30 000 gas.
Go to top