|
| 1 | +# Smart Contracts |
| 2 | + |
| 3 | +<a href="https://github.com/0xPolygonID/contracts" target="_blank">**Polygon ID Smart Contracts - Github**</a> |
| 4 | + |
| 5 | +## Blockchain addresses |
| 6 | + |
| 7 | +For situations where one needs to publish data on the blockchain, such as creating a mtp-type credential, generating on-chain proofs and make credential revocations effective, it is important to have the Smart Contracts addresses: |
| 8 | + |
| 9 | +- Testnet(mumbai) -> `0x134B1BE34911E39A8397ec6289782989729807a4` |
| 10 | +- Mainnet -> `0x624ce98D2d27b20b8f8d521723Df8fC4db71D79D` |
| 11 | + |
| 12 | +## Validator addresses |
| 13 | +Current addresses on Polygon Mumbai testnet. |
| 14 | + |
| 15 | +| | Sig | MTP | |
| 16 | +|:------------------:|:------------------------------------------:|:-----------------------------------------:| |
| 17 | +| **Validators** |0xF2D4Eeb4d455fb673104902282Ce68B9ce4Ac450 |0x3DcAe4c8d94359D31e4C89D7F2b944859408C618 | |
| 18 | +| **ERC20 examples** |0x9017a99afb69CB7B21C7DD29827b4762DECD53FD |0x3Bf7f4774DC3f92431fA690fa000f636562dCC18 | |
| 19 | + |
| 20 | + |
| 21 | +Current addresses on Polygon Main. (ERC20 example with airdrop use case, restricted to 1 request). |
| 22 | + |
| 23 | +| | Sig | MTP | |
| 24 | +|:------------------:|:------------------------------------------:|:-----------------------------------------:| |
| 25 | +| **Verifier** |0x6f6E19781600d6B06D64A6b86431FB7dB3E919e0 |0x9DB901F3AFdAAA73F5B2123B186F566fA3Ed1551 | |
| 26 | +| **Validators** |0x9ee6a2682Caa2E0AC99dA46afb88Ad7e6A58Cd1b |0x5f24dD9FbEa358B9dD96daA281e82160fdefD3CD | |
| 27 | +| **ERC20 examples** |0x8732e29eE329fD19Ff868a3Df3D5F6A3116027A2 |0x5c31BB88AA57C69FF537C5d86102246D61712C90 | |
| 28 | + |
| 29 | + |
| 30 | +ERC20 examples with airdrop use case, not restricted. |
| 31 | + |
| 32 | +| | Sig | MTP | |
| 33 | +|:------------------:|:------------------------------------------:|:-----------------------------------------:| |
| 34 | +| **Validators** |0x9ee6a2682Caa2E0AC99dA46afb88Ad7e6A58Cd1b |0x5f24dD9FbEa358B9dD96daA281e82160fdefD3CD | |
| 35 | +| **ERC20 examples** |0x7C14Aa764130852A8B64BA7058bf71E4292d677F |0xa3Bc012FCf034bee8d16161730CE4eAb34C35100 | |
| 36 | + |
| 37 | +## CredentialAtomicQuerySigValidator |
| 38 | + |
| 39 | +<a href="https://github.com/0xPolygonID/contracts/blob/main/contracts/validators/CredentialAtomicQuerySigValidator.sol" target="_blank">**CredentialAtomicQuerySigValidator.sol - Github**</a> |
| 40 | + |
| 41 | +The CredentialAtomicQuerySigValidator contract is used to verify any credential-related zk proof generated by user using the <a href="https://docs.iden3.io/protocol/main-circuits/#credentialAtomicQuerySigV2OnChain" target="_blank">`credentialAtomicQuerySigV2OnChain`</a> circuit. The contract only verifies proofs based on credential of type `Signature` |
| 42 | + |
| 43 | +The core of the contract is its <a href="https://github.com/0xPolygonID/contracts/blob/main/contracts/validators/CredentialAtomicQuerySigValidator.sol#L41" target="_blank">`verify`</a> function that takes the proof generated by a user and executes a set of verifications: |
| 44 | + |
| 45 | +- Verifies that the proof is valid. This verification is actually performed inside the |
| 46 | +<a href="https://github.com/0xPolygonID/contracts/blob/main/contracts/verifiers/circuits/verifierSig.sol" target="_blank">`verifierSig`</a> contract which is automatically generated using circom. |
| 47 | +- Verifies that the input used to generate the proof matches the query associated to that specific Request. |
| 48 | +- Verifies that the user's and the Issuer's identity states are valid based on the State Contract. |
| 49 | + |
| 50 | +> The CredentialAtomicQuerySigValidator executes the same set of verifications of the [Verification Library](../verifier/verification-library/verification-api-guide.md#verification---under-the-hood). The former is required when performing on-chain verification while the latter is required for off-chain verification. |
| 51 | +
|
| 52 | +CredentialAtomicQuerySigValidator address: |
| 53 | + |
| 54 | +- <a href="https://mumbai.polygonscan.com/address/0xF2D4Eeb4d455fb673104902282Ce68B9ce4Ac450" target="_blank">Mumbai: 0xF2D4Eeb4d455fb673104902282Ce68B9ce4Ac450</a> |
| 55 | + |
| 56 | +## CredentialAtomicQueryMTPValidator |
| 57 | + |
| 58 | +<a href="https://github.com/0xPolygonID/contracts/blob/main/contracts/validators/CredentialAtomicQueryMTPValidator.sol" target="_blank">**CredentialAtomicQueryMTPValidator.sol - Github**</a> |
| 59 | + |
| 60 | +Performs the same set of verifications of the CredentialAtomicQuerySigValidator but for credential of type `MTP` |
| 61 | + |
| 62 | +CredentialAtomicQueryMTPValidator address: |
| 63 | + |
| 64 | +- <a href="https://mumbai.polygonscan.com/address/0x3DcAe4c8d94359D31e4C89D7F2b944859408C618" target="_blank">Mumbai: 0x3DcAe4c8d94359D31e4C89D7F2b944859408C618</a> |
| 65 | + |
| 66 | +> Further protocol related contracts can be found at <a href="https://docs.iden3.io/contracts/state/" target="_blank">Iden3 - Smart Contracts</a> |
0 commit comments