Rubyscore_Profile
Rubyscore_Profile is an SBT ERC721-based smart contract for claiming and managing user names. Users can claim unique names represented by ERC721 tokens.
OPERATOR_ROLE
getIdByName
See {IRubyscore_Profile}
getBaseURI
See {IRubyscore_Profile}
getBaseExtension
See {IRubyscore_Profile}
checkName
See {IRubyscore_Profile}
getPremiumPrice
See {IRubyscore_Profile}
getPremiumStatus
See {IRubyscore_Profile}
getOwnerByName
See {IRubyscore_Profile}
getNameByOwner
See {IRubyscore_Profile}
getNameById
See {IRubyscore_Profile}
getIdByOwner
See {IRubyscore_Profile}
tokenURI
See {IRubyscore_Profile}
hasName
See {IRubyscore_Profile}
supportsInterface
See {IRubyscore_Profile}
constructor
Constructor to initialize the contract with admin and operator addresses.
Parameters
admin
address
Address of the contract admin.
operator
address
Address of the contract operator.
updateBaseURI
See {IRubyscore_Profile}
updateBaseExtension
See {IRubyscore_Profile}
updatePremiumPrice
See {IRubyscore_Profile}
claimName
See {IRubyscore_Profile}
withdraw
See {IRubyscore_Profile}
_transfer
Internal ERC721 transfer function override to prevent external transfers.
from The address to transfer from. to The address to transfer to. tokenId The ID of the token being transferred.
_convertNameToId
Converts a name string to a unique identifier (ID).
Parameters
str
string
The name to convert to an ID.
Return Values
[0]
uint256
The unique ID corresponding to the given name.
_convertStringToUint256
Converts a string to a unique uint256 value.
Parameters
str
string
The string to convert to a uint256.
Return Values
[0]
uint256
The unique uint256 value derived from the given string.
_normalizeName
Normalizes a given name string by converting it to lowercase and validating its length and characters.
Parameters
str
string
The name to normalize.
Return Values
[0]
string
normalizedName The normalized name string in lowercase.
[1]
bool
status True if the normalization was successful, indicating a valid name; otherwise, false.
_checkValidCharacters
Checks if a given character is valid within a name.
Parameters
bCharacter
uint8
The character to check.
Return Values
[0]
bool
True if the character is valid; otherwise, false.
strLength
Returns the length of a given string
Parameters
s
string
The string to measure the length of
Return Values
[0]
uint256
The length of the input string
Last updated