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

Validator addresses

Current addresses on Polygon Mumbai testnet.

ERC20 examples0x9017a99afb69CB7B21C7DD29827b4762DECD53FD0x3Bf7f4774DC3f92431fA690fa000f636562dCC18

Current addresses on Polygon Mainnet (ERC20 example with airdrop use case, restricted to 1 request).

ERC20 examples0x8732e29eE329fD19Ff868a3Df3D5F6A3116027A20x5c31BB88AA57C69FF537C5d86102246D61712C90

ERC20 examples with airdrop use case, not restricted.

ERC20 examples0x7C14Aa764130852A8B64BA7058bf71E4292d677F0xa3Bc012FCf034bee8d16161730CE4eAb34C35100


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 the verifierSig 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.

CredentialAtomicQuerySigValidator address:


CredentialAtomicQueryMTPValidator.sol - Github

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

CredentialAtomicQueryMTPValidator address:

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