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
Soulbound identity, that inherits from the SBT contract.
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
PROJECT_ADMIN_ROLE
function PROJECT_ADMIN_ROLE() externalviewreturns (bytes32)
Returns
Name
Type
Description
_0
bytes32
undefined
addLinkPrice
function addLinkPrice() externalviewreturns (uint256)
Returns
Name
Type
Description
_0
uint256
undefined
addLinkPriceMASA
function addLinkPriceMASA() externalviewreturns (uint256)
Returns
Name
Type
Description
_0
uint256
undefined
balanceOf
function balanceOf(addressowner) externalviewreturns (uint256)
See {ISBT-balanceOf}.
Parameters
Name
Type
Description
owner
address
undefined
Returns
Name
Type
Description
_0
uint256
undefined
burn
function burn(uint256tokenId) external nonpayable
Burns tokenId. See {SBT-_burn}. Requirements: - The caller must own tokenId or be an approved operator.
Parameters
Name
Type
Description
tokenId
uint256
undefined
disablePaymentMethod
function disablePaymentMethod(address_paymentMethod) external nonpayable
Removes a token as a valid payment method
The caller must have the admin role to call this function
Parameters
Name
Type
Description
_paymentMethod
address
Token to remove
enablePaymentMethod
function enablePaymentMethod(address_paymentMethod) external nonpayable
Adds a new token as a valid payment method
The caller must have the admin role to call this function
Parameters
Name
Type
Description
_paymentMethod
address
New token to add
enabledPaymentMethod
function enabledPaymentMethod(address) externalviewreturns (bool)
Parameters
Name
Type
Description
_0
address
undefined
Returns
Name
Type
Description
_0
bool
undefined
enabledPaymentMethods
function enabledPaymentMethods(uint256) externalviewreturns (address)
Parameters
Name
Type
Description
_0
uint256
undefined
Returns
Name
Type
Description
_0
address
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
getEnabledPaymentMethods
function getEnabledPaymentMethods() externalviewreturns (address[])
Returns all available payment methods
Returns the address of all available payment methods
Returns
Name
Type
Description
_0
address[]
Array of all enabled payment methods
getExtension
function getExtension() externalviewreturns (string)
Returns the extension of the soul name
This function returns the extension of the soul name
Returns
Name
Type
Description
_0
string
Extension of the soul name
getIdentityId
function getIdentityId(uint256tokenId) externalviewreturns (uint256)
Returns the identityId owned by the given token
Parameters
Name
Type
Description
tokenId
uint256
Id of the token
Returns
Name
Type
Description
_0
uint256
Id of the identity
getMintPrice
function getMintPrice(addresspaymentMethod) externalviewreturns (uint256price)
Returns the price for minting
Returns current pricing for minting
Parameters
Name
Type
Description
paymentMethod
address
Address of token that user want to pay
Returns
Name
Type
Description
price
uint256
Current price for minting in the given payment method
getMintPriceWithProtocolFee
function getMintPriceWithProtocolFee(addresspaymentMethod) externalviewreturns (uint256price, uint256protocolFee)
Returns the price for minting with protocol fee
Returns current pricing for minting with protocol fee
Parameters
Name
Type
Description
paymentMethod
address
Address of token that user want to pay
Returns
Name
Type
Description
price
uint256
Current price for minting in the given payment method
protocolFee
uint256
Current protocol fee for minting in the given payment method
getProtocolFee
function getProtocolFee(addresspaymentMethod, uint256amount) externalviewreturns (uint256)
Calculates the protocol fee added to the project fee
This method will calculate the protocol fee based on the payment method
Parameters
Name
Type
Description
paymentMethod
address
Address of token that user want to pay
amount
uint256
Price to be paid in the specified payment method
Returns
Name
Type
Description
_0
uint256
undefined
getProtocolFeeSub
function getProtocolFeeSub(uint256amount) externalviewreturns (uint256)
Calculates the protocol fee substracted from the amount
This method will calculate the protocol fee based on the payment method
Parameters
Name
Type
Description
amount
uint256
Price to be paid in the specified payment method
Returns
Name
Type
Description
_0
uint256
undefined
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
getSoulName
function getSoulName() externalviewreturns (contractISoulName)
Returns the address of the SoulName contract linked to this identity
This function returns the address of the SoulName contract linked to this identity
Returns
Name
Type
Description
_0
contract ISoulName
Address of the SoulName contract
getSoulNames
function getSoulNames(uint256tokenId) 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
tokenId
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
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
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
masaToken
function masaToken() externalviewreturns (address)
Returns
Name
Type
Description
_0
address
undefined
maxSBTToMint
function maxSBTToMint() externalviewreturns (uint256)
Returns
Name
Type
Description
_0
uint256
undefined
mint
function mint(addressto) externalpayablereturns (uint256)
Mints a new SBT
The caller must have the MINTER role
Parameters
Name
Type
Description
to
address
The address to mint the SBT to
Returns
Name
Type
Description
_0
uint256
The SBT ID of the newly minted SBT
mint
function mint(addresspaymentMethod, addressto) externalpayablereturns (uint256)
Mints a new SBT
The caller must have the MINTER role
Parameters
Name
Type
Description
paymentMethod
address
Address of token that user want to pay
to
address
The address to mint the SBT to
Returns
Name
Type
Description
_0
uint256
The SBT ID of the newly minted SBT
mintIdentityWithName
function mintIdentityWithName(addressto, stringname, uint256yearsPeriod, string_tokenURI) externalpayablereturns (uint256)
Mints a new soulbound identity with a SoulName associated to it
The caller can only mint one identity per address, and the name must be unique
Parameters
Name
Type
Description
to
address
Address of the owner of the new identity
name
string
Name of the new identity
yearsPeriod
uint256
Years of validity of the name
_tokenURI
string
URI of the NFT
Returns
Name
Type
Description
_0
uint256
undefined
mintIdentityWithName
function mintIdentityWithName(addresspaymentMethod, addressto, stringname, uint256yearsPeriod, string_tokenURI) externalpayablereturns (uint256)
Mints a new soulbound identity with a SoulName associated to it
The caller can only mint one identity per address, and the name must be unique
Parameters
Name
Type
Description
paymentMethod
address
Address of the payment method to use
to
address
Address of the owner of the new identity
name
string
Name of the new identity
yearsPeriod
uint256
Years of validity of the name
_tokenURI
string
URI of the NFT
Returns
Name
Type
Description
_0
uint256
undefined
mintPrice
function mintPrice() externalviewreturns (uint256)
Returns
Name
Type
Description
_0
uint256
undefined
mintPriceMASA
function mintPriceMASA() externalviewreturns (uint256)
Returns
Name
Type
Description
_0
uint256
undefined
name
function name() externalviewreturns (string)
See {ISBTMetadata-name}.
Returns
Name
Type
Description
_0
string
undefined
ownerOf
function ownerOf(uint256tokenId) externalviewreturns (address)
Returns the owner address of an identity
This function returns the owner address of the identity specified by the tokenId
Parameters
Name
Type
Description
tokenId
uint256
TokenId of the identity
Returns
Name
Type
Description
_0
address
Address of the owner of the identity
ownerOf
function ownerOf(stringname) externalviewreturns (address)
Returns the owner address of a soul name
This function returns the owner address of the soul name identity specified by the name
Parameters
Name
Type
Description
name
string
Name of the soul name
Returns
Name
Type
Description
_0
address
Address of the owner of the identity
projectFeeReceiver
function projectFeeReceiver() externalviewreturns (address)
Returns
Name
Type
Description
_0
address
undefined
protocolFeeAmount
function protocolFeeAmount() externalviewreturns (uint256)
Returns
Name
Type
Description
_0
uint256
undefined
protocolFeePercent
function protocolFeePercent() externalviewreturns (uint256)
Returns
Name
Type
Description
_0
uint256
undefined
protocolFeePercentSub
function protocolFeePercentSub() externalviewreturns (uint256)
Returns
Name
Type
Description
_0
uint256
undefined
protocolFeeReceiver
function protocolFeeReceiver() externalviewreturns (address)
Returns
Name
Type
Description
_0
address
undefined
queryLinkPrice
function queryLinkPrice() externalviewreturns (uint256)
Returns
Name
Type
Description
_0
uint256
undefined
queryLinkPriceMASA
function queryLinkPriceMASA() externalviewreturns (uint256)
Returns
Name
Type
Description
_0
uint256
undefined
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
setAddLinkPrice
function setAddLinkPrice(uint256_addLinkPrice) external nonpayable
Sets the price for adding the link in SoulLinker in stable coin
The caller must have the admin or project admin role to call this function
Parameters
Name
Type
Description
_addLinkPrice
uint256
New price for adding the link in SoulLinker in stable coin
setAddLinkPriceMASA
function setAddLinkPriceMASA(uint256_addLinkPriceMASA) external nonpayable
Sets the price for adding the link in SoulLinker in MASA
The caller must have the admin or project admin role to call this function
Parameters
Name
Type
Description
_addLinkPriceMASA
uint256
New price for adding the link in SoulLinker in MASA
setMasaToken
function setMasaToken(address_masaToken) external nonpayable
Sets the utility token to pay the fee in (MASA)
The caller must have the admin role to call this function It can be set to address(0) to disable paying in MASA
Parameters
Name
Type
Description
_masaToken
address
New utility token to pay the fee in
setMintPrice
function setMintPrice(uint256_mintPrice) external nonpayable
Sets the price of minting in stable coin
The caller must have the admin or project admin role to call this function
Parameters
Name
Type
Description
_mintPrice
uint256
New price of minting in stable coin
setMintPriceMASA
function setMintPriceMASA(uint256_mintPriceMASA) external nonpayable
Sets the price of minting in MASA
The caller must have the admin or project admin role to call this function
Parameters
Name
Type
Description
_mintPriceMASA
uint256
New price of minting in MASA
setProjectFeeReceiver
function setProjectFeeReceiver(address_projectFeeReceiver) external nonpayable
Set the project fee receiver wallet
The caller must have the admin or project admin role to call this function
Parameters
Name
Type
Description
_projectFeeReceiver
address
New project fee receiver wallet
setProtocolFeeAmount
function setProtocolFeeAmount(uint256_protocolFeeAmount) external nonpayable
Set the protocol fee amount
The caller must have the admin role to call this function
Parameters
Name
Type
Description
_protocolFeeAmount
uint256
New protocol fee amount
setProtocolFeePercent
function setProtocolFeePercent(uint256_protocolFeePercent) external nonpayable
Set the protocol fee percent added to the project fee
The caller must have the admin role to call this function
Parameters
Name
Type
Description
_protocolFeePercent
uint256
New protocol fee percent added to the project fee
setProtocolFeePercentSub
function setProtocolFeePercentSub(uint256_protocolFeePercentSub) external nonpayable
Set the protocol fee percent substracted from the amount
The caller must have the admin role to call this function
Parameters
Name
Type
Description
_protocolFeePercentSub
uint256
New protocol fee percent substracted from the amount
setProtocolFeeReceiver
function setProtocolFeeReceiver(address_protocolFeeReceiver) external nonpayable
Set the protocol fee wallet
The caller must have the admin role to call this function
Parameters
Name
Type
Description
_protocolFeeReceiver
address
New protocol fee wallet
setQueryLinkPrice
function setQueryLinkPrice(uint256_queryLinkPrice) external nonpayable
Sets the price for reading data in SoulLinker in stable coin
The caller must have the admin or project admin role to call this function
Parameters
Name
Type
Description
_queryLinkPrice
uint256
New price for reading data in SoulLinker in stable coin
setQueryLinkPriceMASA
function setQueryLinkPriceMASA(uint256_queryLinkPriceMASA) external nonpayable
Sets the price for reading data in SoulLinker in MASA
The caller must have the admin or project admin role to call this function
Parameters
Name
Type
Description
_queryLinkPriceMASA
uint256
New price for reading data in SoulLinker in MASA
setSoulName
function setSoulName(contractISoulName_soulName) externalnonpayable
Sets the SoulName contract address linked to this identity
The caller must have the admin role to call this function
Parameters
Name
Type
Description
_soulName
contract ISoulName
Address of the SoulName contract
setSoulboundIdentity
function setSoulboundIdentity(address_soulboundIdentity) external nonpayable
Sets the SoulboundIdentity contract address linked to this SBT
The caller must be the admin to call this function
Parameters
Name
Type
Description
_soulboundIdentity
address
Address of the SoulboundIdentity contract
setStableCoin
function setStableCoin(address_stableCoin) external nonpayable
Sets the stable coin to pay the fee in (USDC)
The caller must have the admin role to call this function
Parameters
Name
Type
Description
_stableCoin
address
New stable coin to pay the fee in
setSwapRouter
function setSwapRouter(address_swapRouter) external nonpayable
Sets the swap router address
The caller must have the admin role to call this function
Parameters
Name
Type
Description
_swapRouter
address
New swap router address
setWrappedNativeToken
function setWrappedNativeToken(address_wrappedNativeToken) external nonpayable
Sets the wrapped native token address
The caller must have the admin role to call this function
Parameters
Name
Type
Description
_wrappedNativeToken
address
New wrapped native token address
soulName
function soulName() externalviewreturns (contractISoulName)
Returns
Name
Type
Description
_0
contract ISoulName
undefined
soulboundIdentity
function soulboundIdentity() externalviewreturns (contractISoulboundIdentity)
Returns
Name
Type
Description
_0
contract ISoulboundIdentity
undefined
stableCoin
function stableCoin() externalviewreturns (address)
Returns
Name
Type
Description
_0
address
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
swapRouter
function swapRouter() externalviewreturns (address)
Returns
Name
Type
Description
_0
address
undefined
symbol
function symbol() externalviewreturns (string)
See {ISBTMetadata-symbol}.
Returns
Name
Type
Description
_0
string
undefined
tokenByIndex
function tokenByIndex(uint256index) externalviewreturns (uint256)
See {ISBTEnumerable-tokenByIndex}.
Parameters
Name
Type
Description
index
uint256
undefined
Returns
Name
Type
Description
_0
uint256
undefined
tokenOfOwner
function tokenOfOwner(addressowner) externalviewreturns (uint256)
Returns the identity id of an account
This function returns the tokenId of the identity owned by an account
Parameters
Name
Type
Description
owner
address
Address of the owner of the identity
Returns
Name
Type
Description
_0
uint256
TokenId of the identity owned by the account
tokenOfOwnerByIndex
function tokenOfOwnerByIndex(addressowner, uint256index) externalviewreturns (uint256)
See {ISBTEnumerable-tokenOfOwnerByIndex}.
Parameters
Name
Type
Description
owner
address
undefined
index
uint256
undefined
Returns
Name
Type
Description
_0
uint256
undefined
tokenURI
function tokenURI(stringname) externalviewreturns (string)
Returns the URI of a soul name
This function returns the token URI of the soul name identity specified by the name
Parameters
Name
Type
Description
name
string
Name of the soul name
Returns
Name
Type
Description
_0
string
URI of the identity associated to a soul name
tokenURI
function tokenURI(addressowner) externalviewreturns (string)
Returns the URI of the owner of an identity
This function returns the token URI of the identity owned by an account
Parameters
Name
Type
Description
owner
address
Address of the owner of the identity
Returns
Name
Type
Description
_0
string
URI of the identity owned by the account
tokenURI
function tokenURI(uint256tokenId) externalviewreturns (string)
A distinct Uniform Resource Identifier (URI) for a given asset.
Throws if _tokenId is not a valid SBT. 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
SBT to get the URI of
Returns
Name
Type
Description
_0
string
URI of the SBT
totalSupply
function totalSupply() externalviewreturns (uint256)
See {ISBTEnumerable-totalSupply}.
Returns
Name
Type
Description
_0
uint256
undefined
wrappedNativeToken
function wrappedNativeToken() externalviewreturns (address)
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)