# Solidity API
# UniqeProof
This contract is the social proof delivered by UniqeValidator contracts.
This contract inherit from the Upgradeable contract to allow us to upgrade the contract with new features without loosing old social certifications.
# _tokenIdCounter
struct CountersUpgradeable.Counter _tokenIdCounter
# _tokenHandle
mapping(uint256 => string) _tokenHandle
# _tokenValidator
mapping(uint256 => address) _tokenValidator
# uniqe
address uniqe
# onlyUniqe
modifier onlyUniqe()
# initialize
function initialize() public
Initialize the contract
This is a function that get called instead of the constructor because of the upgradeable trait.
# setUniqe
function setUniqe(address _uniqe) public
Set the Uniqe contract address
This function is protected, only the owner can call it.
Name | Type | Description |
---|---|---|
_uniqe | address | The new address of the Uniqe contract. |
# getUniqe
function getUniqe() public view returns (address)
Get the Uniqe contract address
Name | Type | Description |
---|---|---|
[0] | address | The address of the Uniqe contract. |
# pause
function pause() public
Set the contract in pause mode
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.
# safeTransferFrom
function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes data) public
Block the safeTransferFrom function
We just allow the owner to burn the token.
# safeTransferFrom
function safeTransferFrom(address _from, address _to, uint256 _tokenId) public
Block the safeTransferFrom function
We just allow the owner to burn the token.
# transferFrom
function transferFrom(address _from, address _to, uint256 _tokenId) public
Block the transferFrom function
We just allow the owner to burn the token.
# approve
function approve(address, uint256) public pure
Block the approve function
# setApprovalForAll
function setApprovalForAll(address, bool) public pure
Block the setAprovalForAll function
# tokenURI
function tokenURI(uint256 tokenId) public view virtual returns (string)
Generate the token metadata URI
Name | Type | Description |
---|---|---|
tokenId | uint256 | The token ID |
Name | Type | Description |
---|---|---|
[0] | string | The token metadata URI |
# bytes32ToString
function bytes32ToString(bytes _bytes) public pure returns (string)
Convert bytes to a string
Name | Type | Description |
---|---|---|
_bytes | bytes | The bytes to convert |
Name | Type | Description |
---|---|---|
[0] | string | The string |
# safeMint
function safeMint(address userAddress, address validator, bytes data) public returns (uint256)
Mint a new NFT proof
This function is protected, only the Uniqe contract can call it.
Name | Type | Description |
---|---|---|
userAddress | address | The wallet to mint the token to. |
validator | address | The validator to reference in the token metadata. |
data | bytes | The data to save in the token metadata. |
# _beforeTokenTransfer
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal
Override the method because of the ERC721Upgradeable interface
# supportsInterface
function supportsInterface(bytes4 interfaceId) public view returns (bool)