# Solidity API
# Uniqe
This contract allow the user to request a social validation, and list all supported social network.
This contract implement the pausable trait, allowing us to pause the contract in case of emergency.
# _allowedValidators
struct EnumerableSet.AddressSet _allowedValidators
# uniqeProof
address uniqeProof
# NetworkValidated
event NetworkValidated(address profileAddress, uint256 tokenId)
This event is triggered when a social network is validated for a wallet.
Name | Type | Description |
---|---|---|
profileAddress | address | The address of the wallet that was validated. |
tokenId | uint256 | The id of the minted NFT proof. |
# NetworkError
event NetworkError(address profileAddress, address validatorAddress)
This event is triggered when a social network is rejected for a wallet.
Name | Type | Description |
---|---|---|
profileAddress | address | The address of the wallet that was rejected. |
validatorAddress | address | The address of the validator that rejected the wallet. |
# getUniqeProof
function getUniqeProof() public view returns (address)
Get the Uniqe NFT address
Get the Uniqe NFT address
Name | Type | Description |
---|---|---|
[0] | address | The Uniqe NFT address |
# setUniqeProof
function setUniqeProof(address _uniqeProof) public
Set the Uniqe NFT address
This function is protected, only the owner can call it.
Name | Type | Description |
---|---|---|
_uniqeProof | address | The new Uniqe proof address |
# pause
function pause() public
Pause the contract in case of emergency
This function is protected, only the owner can call it.
# unpause
function unpause() public
Unpause the contract
This function is protected, only the owner can call it.
# getValidator
function getValidator(uint256 slot) public view returns (address)
Get a validator by it's index
Name | Type | Description |
---|---|---|
slot | uint256 | The validator index |
Name | Type | Description |
---|---|---|
[0] | address | The validator address |
# checkValidator
function checkValidator(address validator) public view returns (bool)
Check if a validator is allowed in the contract
Name | Type | Description |
---|---|---|
validator | address | The validator address |
Name | Type | Description |
---|---|---|
[0] | bool | True if the validator is allowed, false otherwise |
# getValidatorCount
function getValidatorCount() public view returns (uint256)
Get the number of validators in the contract
Name | Type | Description |
---|---|---|
[0] | uint256 | The number of validators |
# addSupportedNetwork
function addSupportedNetwork(address validatorAddress) public
Add a validator to the contract
This function is protected, only the owner can call it.
Name | Type | Description |
---|---|---|
validatorAddress | address | The validator address |
# removeSupportedNetwork
function removeSupportedNetwork(address addr) public
Remove a validator from the contract
This function is protected, only the owner can call it.
Name | Type | Description |
---|---|---|
addr | address | The validator address |
# validationCallbackError
function validationCallbackError(struct ValidationResponseError r) external
Return function for the validation request, if in error
This function is disabled when the contract is paused
Name | Type | Description |
---|---|---|
r | struct ValidationResponseError | The ValidationResponseError object |
# validationCallbackSuccess
function validationCallbackSuccess(struct ValidationResponseSuccess r) external
Return function for the validation request, if success
This function is disabled when the contract is paused
Name | Type | Description |
---|---|---|
r | struct ValidationResponseSuccess | The ValidationResponseSuccess object |
# submitValidationRequest
function submitValidationRequest(address validatorAddr, bytes payload) public payable
Request a validation for a wallet and a social network
This function is disabled when the contract is paused
Name | Type | Description |
---|---|---|
validatorAddr | address | The address of the Social network validator |
payload | bytes | The payload of the validation request |