You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SoulName NFT that points to a Soulbound identity token
SoulName NFT, that inherits from the NFT contract, and points to a Soulbound identity token. It has an extension, and stores all the information about the identity names.
Methods
DEFAULT_ADMIN_ROLE
function DEFAULT_ADMIN_ROLE() externalviewreturns (bytes32)
Returns
Name
Type
Description
_0
bytes32
undefined
MINTER_ROLE
function MINTER_ROLE() externalviewreturns (bytes32)
Returns
Name
Type
Description
_0
bytes32
undefined
approve
function approve(addressto, uint256tokenId) external nonpayable
See {IERC721-approve}.
Parameters
Name
Type
Description
to
address
undefined
tokenId
uint256
undefined
balanceOf
function balanceOf(addressowner) externalviewreturns (uint256)
See {IERC721-balanceOf}.
Parameters
Name
Type
Description
owner
address
undefined
Returns
Name
Type
Description
_0
uint256
undefined
burn
function burn(uint256tokenId) external nonpayable
Burn a soul name
The caller must be the owner or an approved address of the soul name.
Parameters
Name
Type
Description
tokenId
uint256
TokenId of the soul name to burn
contractURI
function contractURI() externalviewreturns (string)
Returns
Name
Type
Description
_0
string
undefined
exists
function exists(uint256tokenId) externalviewreturns (bool)
Returns true if the token exists
Returns true if the token has been minted
Parameters
Name
Type
Description
tokenId
uint256
Token to check
Returns
Name
Type
Description
_0
bool
True if the token exists
extension
function extension() externalviewreturns (string)
Returns
Name
Type
Description
_0
string
undefined
getApproved
function getApproved(uint256tokenId) externalviewreturns (address)
See {IERC721-getApproved}.
Parameters
Name
Type
Description
tokenId
uint256
undefined
Returns
Name
Type
Description
_0
address
undefined
getExtension
function getExtension() externalviewreturns (string)
Returns the extension of the soul name
This function is used to get the extension of the soul name
Returns
Name
Type
Description
_0
string
Extension of the soul name
getRoleAdmin
function getRoleAdmin(bytes32role) externalviewreturns (bytes32)
Returns the admin role that controls role. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.
Parameters
Name
Type
Description
role
bytes32
undefined
Returns
Name
Type
Description
_0
bytes32
undefined
getSoulNames
function getSoulNames(uint256identityId) externalviewreturns (string[] sbtNames)
Returns all the active soul names of an account
This function queries all the identity names of the specified identity Id
Parameters
Name
Type
Description
identityId
uint256
TokenId of the identity
Returns
Name
Type
Description
sbtNames
string[]
Array of soul names associated to the identity Id
getSoulNames
function getSoulNames(addressowner) externalviewreturns (string[] sbtNames)
Returns all the active soul names of an account
This function queries all the identity names of the specified account
Parameters
Name
Type
Description
owner
address
Address of the owner of the identities
Returns
Name
Type
Description
sbtNames
string[]
Array of soul names associated to the account
getTokenData
function getTokenData(stringname) externalviewreturns (stringsbtName, boollinked, uint256identityId, uint256tokenId, uint256expirationDate, boolactive)
Returns the information of a soul name
This function queries the information of a soul name
Parameters
Name
Type
Description
name
string
Name of the soul name
Returns
Name
Type
Description
sbtName
string
Soul name, in upper/lower case and extension
linked
bool
true if the soul name is linked, false otherwise
identityId
uint256
Identity id of the soul name
tokenId
uint256
SoulName id of the soul name
expirationDate
uint256
Expiration date of the soul name
active
bool
true if the soul name is active, false otherwise
getTokenId
function getTokenId(stringname) externalviewreturns (uint256)
Returns the token id of a soul name
This function queries the token id of a soul name
Parameters
Name
Type
Description
name
string
Name of the soul name
Returns
Name
Type
Description
_0
uint256
SoulName id of the soul name
grantRole
function grantRole(bytes32role, addressaccount) external nonpayable
Grants role to account. If account had not been already granted role, emits a {RoleGranted} event. Requirements: - the caller must have role's admin role. May emit a {RoleGranted} event.
Parameters
Name
Type
Description
role
bytes32
undefined
account
address
undefined
hasRole
function hasRole(bytes32role, addressaccount) externalviewreturns (bool)
Returns true if account has been granted role.
Parameters
Name
Type
Description
role
bytes32
undefined
account
address
undefined
Returns
Name
Type
Description
_0
bool
undefined
isApprovedForAll
function isApprovedForAll(addressowner, addressoperator) externalviewreturns (bool)
See {IERC721-isApprovedForAll}.
Parameters
Name
Type
Description
owner
address
undefined
operator
address
undefined
Returns
Name
Type
Description
_0
bool
undefined
isAvailable
function isAvailable(stringname) externalviewreturns (boolavailable)
Checks if a soul name is available
This function queries if a soul name already exists and is in the available state
Parameters
Name
Type
Description
name
string
Name of the soul name
Returns
Name
Type
Description
available
bool
true if the soul name is available, false otherwise
mint
function mint(addressto, stringname, uint256yearsPeriod, string_tokenURI) external nonpayable returns (uint256)
Mints a new soul name
The caller can mint more than one name. The soul name must be unique.
Parameters
Name
Type
Description
to
address
Address of the owner of the new soul name
name
string
Name of the new soul name
yearsPeriod
uint256
Years of validity of the name
_tokenURI
string
URI of the NFT
Returns
Name
Type
Description
_0
uint256
undefined
name
function name() externalviewreturns (string)
See {IERC721Metadata-name}.
Returns
Name
Type
Description
_0
string
undefined
nameData
function nameData(string) externalviewreturns (boolexists, uint256tokenId)
Parameters
Name
Type
Description
_0
string
undefined
Returns
Name
Type
Description
exists
bool
undefined
tokenId
uint256
undefined
owner
function owner() externalviewreturns (address)
Returns the address of the current owner.
Returns
Name
Type
Description
_0
address
undefined
ownerOf
function ownerOf(uint256tokenId) externalviewreturns (address)
See {IERC721-ownerOf}.
Parameters
Name
Type
Description
tokenId
uint256
undefined
Returns
Name
Type
Description
_0
address
undefined
renewYearsPeriod
function renewYearsPeriod(uint256tokenId, uint256yearsPeriod) external nonpayable
Update the expiration date of a soul name
The caller must be the owner or an approved address of the soul name.
Parameters
Name
Type
Description
tokenId
uint256
TokenId of the soul name
yearsPeriod
uint256
Years of validity of the name
renounceOwnership
function renounceOwnership() external nonpayable
Leaves the contract without owner. It will not be possible to call onlyOwner functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.
renounceRole
function renounceRole(bytes32role, addressaccount) external nonpayable
Revokes role from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked role, emits a {RoleRevoked} event. Requirements: - the caller must be account. May emit a {RoleRevoked} event.
Parameters
Name
Type
Description
role
bytes32
undefined
account
address
undefined
revokeRole
function revokeRole(bytes32role, addressaccount) external nonpayable
Revokes role from account. If account had been granted role, emits a {RoleRevoked} event. Requirements: - the caller must have role's admin role. May emit a {RoleRevoked} event.
Parameters
Name
Type
Description
role
bytes32
undefined
account
address
undefined
safeTransferFrom
function safeTransferFrom(addressfrom, addressto, uint256tokenId) external nonpayable
See {IERC721-safeTransferFrom}.
Parameters
Name
Type
Description
from
address
undefined
to
address
undefined
tokenId
uint256
undefined
safeTransferFrom
function safeTransferFrom(addressfrom, addressto, uint256tokenId, bytesdata) external nonpayable
See {IERC721-safeTransferFrom}.
Parameters
Name
Type
Description
from
address
undefined
to
address
undefined
tokenId
uint256
undefined
data
bytes
undefined
setApprovalForAll
function setApprovalForAll(addressoperator, boolapproved) external nonpayable
See {IERC721-setApprovalForAll}.
Parameters
Name
Type
Description
operator
address
undefined
approved
bool
undefined
setContractURI
function setContractURI(string_contractURI) external nonpayable
Sets the URI of the smart contract metadata
The caller must have the admin role to call this function
Parameters
Name
Type
Description
_contractURI
string
URI of the smart contract metadata
setExtension
function setExtension(string_extension) external nonpayable
Sets the extension of the soul name
The caller must have the admin role to call this function
Parameters
Name
Type
Description
_extension
string
Extension of the soul name
setSoulboundIdentity
function setSoulboundIdentity(contractISoulboundIdentity_soulboundIdentity) externalnonpayable
Sets the SoulboundIdentity contract address linked to this soul name
The caller must have the admin role to call this function
Parameters
Name
Type
Description
_soulboundIdentity
contract ISoulboundIdentity
Address of the SoulboundIdentity contract
soulboundIdentity
function soulboundIdentity() externalviewreturns (contractISoulboundIdentity)
Returns
Name
Type
Description
_0
contract ISoulboundIdentity
undefined
supportsInterface
function supportsInterface(bytes4interfaceId) externalviewreturns (bool)
Query if a contract implements an interface
Interface identification is specified in ERC-165.
Parameters
Name
Type
Description
interfaceId
bytes4
The interface identifier, as specified in ERC-165
Returns
Name
Type
Description
_0
bool
true if the contract implements interfaceId and interfaceId is not 0xffffffff, false otherwise
symbol
function symbol() externalviewreturns (string)
See {IERC721Metadata-symbol}.
Returns
Name
Type
Description
_0
string
undefined
tokenByIndex
function tokenByIndex(uint256index) externalviewreturns (uint256)
See {IERC721Enumerable-tokenByIndex}.
Parameters
Name
Type
Description
index
uint256
undefined
Returns
Name
Type
Description
_0
uint256
undefined
tokenData
function tokenData(uint256) externalviewreturns (stringname, uint256expirationDate)
Parameters
Name
Type
Description
_0
uint256
undefined
Returns
Name
Type
Description
name
string
undefined
expirationDate
uint256
undefined
tokenOfOwnerByIndex
function tokenOfOwnerByIndex(addressowner, uint256index) externalviewreturns (uint256)
See {IERC721Enumerable-tokenOfOwnerByIndex}.
Parameters
Name
Type
Description
owner
address
undefined
index
uint256
undefined
Returns
Name
Type
Description
_0
uint256
undefined
tokenURI
function tokenURI(stringname) externalviewreturns (string)
A distinct Uniform Resource Identifier (URI) for a given asset.
This function returns the token URI of the soul name specified by the name
Parameters
Name
Type
Description
name
string
Name of the soul name
Returns
Name
Type
Description
_0
string
URI of the soulname associated to a name
tokenURI
function tokenURI(uint256tokenId) externalviewreturns (string)
A distinct Uniform Resource Identifier (URI) for a given asset.
Throws if _tokenId is not a valid NFT. URIs are defined in RFC 3986. The URI may point to a JSON file that conforms to the "ERC721 Metadata JSON Schema".
Parameters
Name
Type
Description
tokenId
uint256
NFT to get the URI of
Returns
Name
Type
Description
_0
string
URI of the NFT
totalSupply
function totalSupply() externalviewreturns (uint256)
See {IERC721Enumerable-totalSupply}.
Returns
Name
Type
Description
_0
uint256
undefined
transferFrom
function transferFrom(addressfrom, addressto, uint256tokenId) external nonpayable
See {IERC721-transferFrom}.
Parameters
Name
Type
Description
from
address
undefined
to
address
undefined
tokenId
uint256
undefined
transferOwnership
function transferOwnership(addressnewOwner) external nonpayable
Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.
Emitted when newAdminRole is set as role's admin role, replacing previousAdminRoleDEFAULT_ADMIN_ROLE is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. Available since v3.1.
Emitted when account is granted role. sender is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.
Emitted when account is revoked role. sender is the account that originated the contract call: - if using revokeRole, it is the admin role bearer - if using renounceRole, it is the role bearer (i.e. account)