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
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
getDefaultSoulName
function getDefaultSoulName(addressowner) externalviewreturns (string)
Returns the default soul name of an account
This function queries the default soul name of the specified account
Parameters
Name
Type
Description
owner
address
Address of the owner of the identities
Returns
Name
Type
Description
_0
string
Default soul name associated to the account
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
getIdentityId
function getIdentityId(addresstoken, uint256tokenId) externalviewreturns (uint256)
Returns the identityId owned by the given token
The token must be linked to this soul linker
Parameters
Name
Type
Description
token
address
Address of the SBT contract
tokenId
uint256
Id of the token
Returns
Name
Type
Description
_0
uint256
Id of the identity
getLinkInfo
function getLinkInfo(addresstoken, uint256tokenId, uint256readerIdentityId, uint256signatureDate) externalviewreturns (struct SoulLinker.LinkData)
Returns the information of link dates for a given SBT token and reader
Parameters
Name
Type
Description
token
address
Address of the SBT contract
tokenId
uint256
Id of the token
readerIdentityId
uint256
Id of the identity of the reader of the SBT
signatureDate
uint256
Signature date of the signature
Returns
Name
Type
Description
_0
SoulLinker.LinkData
linkData List of linked SBTs
getLinkSignatureDates
function getLinkSignatureDates(addresstoken, uint256tokenId, uint256readerIdentityId) externalviewreturns (uint256[])
Returns the list of link signature dates for a given SBT token and reader
Parameters
Name
Type
Description
token
address
Address of the SBT contract
tokenId
uint256
Id of the token
readerIdentityId
uint256
Id of the identity of the reader of the SBT
Returns
Name
Type
Description
_0
uint256[]
List of linked SBTs
getLinks
function getLinks(addresstoken, uint256tokenId) externalviewreturns (struct SoulLinker.LinkKey[])
Returns the list of link signature dates for a given SBT token and reader
Parameters
Name
Type
Description
token
address
Address of the SBT contract
tokenId
uint256
Id of the token
Returns
Name
Type
Description
_0
SoulLinker.LinkKey[]
List of linked SBTs
getPriceForAddLink
function getPriceForAddLink(addresspaymentMethod, addresstoken) externalviewreturns (uint256price)
Returns the price for storing a link
Returns the current pricing for storing a link
Parameters
Name
Type
Description
paymentMethod
address
Address of token that user want to pay
token
address
Token that user want to store link
Returns
Name
Type
Description
price
uint256
Current price for storing a link
getPriceForAddLinkWithProtocolFee
function getPriceForAddLinkWithProtocolFee(addresspaymentMethod, addresstoken) externalviewreturns (uint256price, uint256protocolFee)
Returns the price for storing a link with protocol fee
Returns the current pricing for storing a link with protocol fee
Parameters
Name
Type
Description
paymentMethod
address
Address of token that user want to pay
token
address
Token that user want to store link
Returns
Name
Type
Description
price
uint256
Current price for storing a link
protocolFee
uint256
Current protocol fee for storing a link
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
getReaderLinks
function getReaderLinks(uint256readerIdentityId) externalviewreturns (struct SoulLinker.ReaderLink[])
Returns the list of links for a given reader identity id
Parameters
Name
Type
Description
readerIdentityId
uint256
Id of the identity of the reader of the SBT
Returns
Name
Type
Description
_0
SoulLinker.ReaderLink[]
List of links for the reader
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
getSBTConnections
function getSBTConnections(uint256identityId, addresstoken) externalviewreturns (uint256[])
Returns the list of connected SBTs by a given SBT token
Parameters
Name
Type
Description
identityId
uint256
Id of the identity
token
address
Address of the SBT contract
Returns
Name
Type
Description
_0
uint256[]
List of connected SBTs
getSBTConnections
function getSBTConnections(addressowner, addresstoken) externalviewreturns (uint256[])
Returns the list of connected SBTs by a given SBT token
Parameters
Name
Type
Description
owner
address
Address of the owner of the identity
token
address
Address of the SBT contract
Returns
Name
Type
Description
_0
uint256[]
List of connectec SBTs
getSoulNames
function getSoulNames(uint256tokenId) externalviewreturns (stringdefaultName, string[] names)
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
defaultName
string
Default soul name of the account
names
string[]
Array of soul names associated to the account
getSoulNames
function getSoulNames(addressowner) externalviewreturns (stringdefaultName, string[] names)
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
defaultName
string
Default soul name of the account
names
string[]
Array of soul names associated to the account
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
isSoulName
function isSoulName(address) externalviewreturns (bool)
Parameters
Name
Type
Description
_0
address
undefined
Returns
Name
Type
Description
_0
bool
undefined
masaToken
function masaToken() externalviewreturns (address)
Returns
Name
Type
Description
_0
address
undefined
pause
function pause() external nonpayable
Pauses the smart contract
The caller must have the admin role to call this function
paused
function paused() externalviewreturns (bool)
Returns true if the contract is paused, and false otherwise.
Returns
Name
Type
Description
_0
bool
undefined
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
removeSoulName
function removeSoulName(contractISoulNamesoulName) externalnonpayable
Remove a SoulName contract address linked to this soul store
The caller must have the admin role to call this function
Parameters
Name
Type
Description
soulName
contract ISoulName
Address of the SoulName contract
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
revokeLink
function revokeLink(uint256readerIdentityId, uint256ownerIdentityId, addresstoken, uint256tokenId, uint256signatureDate) external nonpayable
Revokes the link
The links can be revoked, wether the token is linked or not. The caller must be the owner of the token. The owner of the token can revoke a link even if the reader has not added it yet.
Parameters
Name
Type
Description
readerIdentityId
uint256
Id of the identity of the reader
ownerIdentityId
uint256
Id of the identity of the owner of the SBT
token
address
Address of the SBT contract
tokenId
uint256
Id of the token
signatureDate
uint256
Signature date of the signature
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
setDefaultSoulName
function setDefaultSoulName(addresstoken, uint256tokenId) external nonpayable
Sets the default soul name for the owner
The caller must be the owner of the soul name.
Parameters
Name
Type
Description
token
address
Address of the SoulName contract
tokenId
uint256
TokenId of the soul name
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
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
setSoulboundIdentity
function setSoulboundIdentity(contractISoulboundIdentity_soulboundIdentity) externalnonpayable
Sets the SoulboundIdentity contract address linked to this soul store
The caller must have the admin role to call this function
Parameters
Name
Type
Description
_soulboundIdentity
contract ISoulboundIdentity
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
soulNames
function soulNames(uint256) externalviewreturns (contractISoulName)
Parameters
Name
Type
Description
_0
uint256
undefined
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)
See {IERC165-supportsInterface}.
Parameters
Name
Type
Description
interfaceId
bytes4
undefined
Returns
Name
Type
Description
_0
bool
undefined
swapRouter
function swapRouter() externalviewreturns (address)
Returns
Name
Type
Description
_0
address
undefined
unpause
function unpause() external nonpayable
Unpauses the smart contract
The caller must have the admin role to call this function
validateLink
function validateLink(uint256readerIdentityId, uint256ownerIdentityId, addresstoken, uint256tokenId, uint256signatureDate) externalviewreturns (bool)
Validates the link of the given read link request and returns the data that reader can read if the link is valid
The token must be linked to this soul linker
Parameters
Name
Type
Description
readerIdentityId
uint256
Id of the identity of the reader
ownerIdentityId
uint256
Id of the identity of the owner of the SBT
token
address
Address of the SBT contract
tokenId
uint256
Id of the token
signatureDate
uint256
Signature date of the signature
Returns
Name
Type
Description
_0
bool
True if the link is valid
wrappedNativeToken
function wrappedNativeToken() externalviewreturns (address)
Returns
Name
Type
Description
_0
address
undefined
Events
EIP712DomainChanged
event EIP712DomainChanged()
MAY be emitted to signal that the domain could have changed.
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)