Skip to main content

Smart Contracts

Polygon ID Smart Contracts - Github

Blockchain addresses

For situations where one needs to publish data on the blockchain, such as creating an MTP-type credential, generating on-chain proofs and making credential revocations effective, it is important to have the following Smart Contracts addresses:

  • Testnet(mumbai) -> 0x134B1BE34911E39A8397ec6289782989729807a4
  • Mainnet -> 0x624ce98D2d27b20b8f8d521723Df8fC4db71D79D

Check a contract codebase and algorithms of work docs, repository.

Validator addresses

Current addresses on Polygon Mumbai testnet. (V1.0.1)

ERC20 example0xD75638D319B1aE2a9491DC61f87a800AD362D168 (request id = 1)0xD75638D319B1aE2a9491DC61f87a800AD362D168 (request id = 2)

Current addresses on Polygon Main (V1.0.1)

ERC20 example0xa5f08979370AF7095cDeDb2B83425367316FAD0B (request id = 1 (sig))0xa5f08979370AF7095cDeDb2B83425367316FAD0B (request id = 2 (mtp)

The Smart Contracts above are updated and the legacy mumbai/main contracts should not be used anymore. However, if needed, support is still provided: v.1.1.1.


CredentialAtomicQuerySigValidator.sol - Github

The CredentialAtomicQuerySigValidator contract is used to verify any credential-related zk proof generated by user using the credentialAtomicQuerySigV2OnChain circuit. The contract only verifies proofs based on credential of type Signature

The core of the contract is its verify function that takes the proof generated by a user and executes a set of verifications:

  • Verifies that the proof is valid. This verification is actually performed inside theverifierSig contract which is automatically generated using circom.
  • Verifies that the input used to generate the proof matches the query associated to that specific Request.
  • Verifies that the user's and the Issuer's identity states are valid based on the State Contract.

The CredentialAtomicQuerySigValidator executes the same set of verifications of the Verification Library. The former is required when performing on-chain verification while the latter is required for off-chain verification.


CredentialAtomicQueryMTPValidator.sol - Github

Performs the same set of verifications of the CredentialAtomicQuerySigValidator but for credential of type MTP.

Further protocol related contracts can be found at Iden3 - Smart Contracts

CredentialAtomicQueryV3 Validator

Also now there deployed v3 validator on mumbai network. It is base on CredentialAtomicQueryV3 circuit.

Features of v3 validator:

  • both mtp and sig proof verification
  • ethereum controlled identities support
  • selective disclosure support

Current addresses for V3 beta circuit on Polygon Mumbai testnet. (1.0.0-beta.0 V3 validator)

V3 validator 1.0.0-beta.0
ERC20 SD example0xD0Fd3E9fDF448e5B86Cc0f73E5Ee7D2F284884c0 (request id = 3)
ERC20 0xD0Fd3E9fDF448e5B86Cc0f73E5Ee7D2F284884c0 (request id = 100 - 650 merklized (step 50) / 10000 - 65000 nonmerklized (step 5000))

More about v3 circuit.

Check the examples of deployment for v3 validator