Skip to main content

UniqueIdentity

UniqueIdentity

Deployment on Ethereum mainnet:

https://etherscan.io/address/0xba0439088dc1e75F58e0A7C107627942C15cbb41

UniqueIdentity is an ERC1155-compliant contract for representing the identity verification status of addresses.

SIGNER_ROLE

bytes32 SIGNER_ROLE

ID_TYPE_0

uint256 ID_TYPE_0

ID_TYPE_1

uint256 ID_TYPE_1

ID_TYPE_2

uint256 ID_TYPE_2

ID_TYPE_3

uint256 ID_TYPE_3

ID_TYPE_4

uint256 ID_TYPE_4

ID_TYPE_5

uint256 ID_TYPE_5

ID_TYPE_6

uint256 ID_TYPE_6

ID_TYPE_7

uint256 ID_TYPE_7

ID_TYPE_8

uint256 ID_TYPE_8

ID_TYPE_9

uint256 ID_TYPE_9

ID_TYPE_10

uint256 ID_TYPE_10

MINT_COST_PER_TOKEN

uint256 MINT_COST_PER_TOKEN

nonces

mapping(address => uint256) nonces

We include a nonce in every hashed message, and increment the nonce as part of a state-changing operation, so as to prevent replay attacks, i.e. the reuse of a signature.

supportedUIDTypes

mapping(uint256 => bool) supportedUIDTypes

initialize

function initialize(address owner, string uri) public

__UniqueIdentity_init

function __UniqueIdentity_init(address owner) internal

__UniqueIdentity_init_unchained

function __UniqueIdentity_init_unchained(address owner) internal

setSupportedUIDTypes

function setSupportedUIDTypes(uint256[] ids, bool[] values) public

name

function name() public pure returns (string)

Gets the token name.

NameTypeDescription
[0]stringstring representing the token name

symbol

function symbol() public pure returns (string)

Gets the token symbol.

NameTypeDescription
[0]stringstring representing the token symbol

mint

function mint(uint256 id, uint256 expiresAt, bytes signature) public payable

burn

function burn(address account, uint256 id, uint256 expiresAt, bytes signature) public

_beforeTokenTransfer

function _beforeTokenTransfer(address operator, address from, address to, uint256[] ids, uint256[] amounts, bytes data) internal

_See {ERC1155-_beforeTokenTransfer}.

Requirements:

  • the contract must not be paused._

onlySigner

modifier onlySigner(address account, uint256 id, uint256 expiresAt, bytes signature)

incrementNonce

modifier incrementNonce(address account)