# Solidity API
# ValidationRequest
struct ValidationRequest {
address userAddress;
bytes payload;
}
# ValidationResponseError
struct ValidationResponseError {
address userAddress;
}
# ValidationResponseSuccess
struct ValidationResponseSuccess {
address userAddress;
bytes data;
}
# UniqeValidator
This interface define how a validator can interact with the Uniqe contract.
This interface is inherited in all validators.
# validateRequest
function validateRequest(struct ValidationRequest payload) external payable
Send a validation request for a wallet.
This function can only be called by uniqe.
Name | Type | Description |
---|---|---|
payload | struct ValidationRequest | The payload of the social network. |
# getUniqe
function getUniqe() external view returns (address)
Get the uniqe contract address.
Name | Type | Description |
---|---|---|
[0] | address | The uniqe contract address. |
# setUniqe
function setUniqe(address _uniqe) external
Set the Uniqe contract address
This function is protected, only the owner can call it.
Name | Type | Description |
---|---|---|
_uniqe | address | The new Uniqe contract address |
# getId
function getId() external view returns (string)
Get the id of the validator.
Name | Type | Description |
---|---|---|
[0] | string | The id of the validator. |
# getName
function getName() external view returns (string)
Get the name of the validator.
Name | Type | Description |
---|---|---|
[0] | string | The name of the validator. |
# getDescription
function getDescription() external view returns (string)
Get the description of the validator.
Name | Type | Description |
---|---|---|
[0] | string | The description of the validator. |
# getURLFrom
function getURLFrom(string handle) external view returns (string)
Get the profile URL of a social handle.
Name | Type | Description |
---|---|---|
handle | string | The social handle. |
Name | Type | Description |
---|---|---|
[0] | string | The profile URL with the social handle. |
# getIconURL
function getIconURL() external view returns (string)
Get the icon of a validator.
Name | Type | Description |
---|---|---|
[0] | string | The icon of the validator. |
# setIconURL
function setIconURL(string _url) external
Set the icon of a validator.
This function is protected, only the owner can call it.
Name | Type | Description |
---|---|---|
_url | string | The new icon. |
# getFeeRatio
function getFeeRatio() external view returns (uint256)
Get the feeRatio of the validator.
Name | Type | Description |
---|---|---|
[0] | uint256 | The feeRatio of the validator. |
# setFeeRatio
function setFeeRatio(uint256 _feeRatio) external
Set the feeRatio of the validator.
This function is protected, only the owner can call it.
Name | Type | Description |
---|---|---|
_feeRatio | uint256 | The new feeRatio. |
# getHandlePrefix
function getHandlePrefix() external view returns (string)
Get the handlePrefix of the validator.
Name | Type | Description |
---|---|---|
[0] | string | The handlePrefix of the validator. |
# getHandleSuffix
function getHandleSuffix() external view returns (string)
Get the handleSuffix of the validator.
Name | Type | Description |
---|---|---|
[0] | string | The handleSuffix of the validator. |
# withdrawToken
function withdrawToken(address _tokenContract, uint256 _amount) external
Widthdraw any ERC20 funds that was sent to the contract.
This function is protected, only the owner can call it.
Name | Type | Description |
---|---|---|
_tokenContract | address | The ERC20 contract address |
_amount | uint256 | The amount of tokens to withdraw |
# withdrawEth
function withdrawEth(address payable _to, uint256 amount) external
Widthdraw any ETH funds that was sent to the contract.
This function is protected, only the owner can call it.
Name | Type | Description |
---|---|---|
_to | address payable | The destination address |
amount | uint256 | The amount of ETH to withdraw |
# pause
function pause() external
Pause the contract
This function is protected, only the owner can call it.
# unpause
function unpause() external
Unpause the contract
This function is protected, only the owner can call it.
# isActive
function isActive() external view returns (bool)
Check if the contract is paused.
Name | Type | Description |
---|---|---|
[0] | bool | True if the contract is paused, false otherwise. |