Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rarimo/identity-contracts
Solidity smart-contracts for RarimoID
https://github.com/rarimo/identity-contracts
identity solidity
Last synced: 19 days ago
JSON representation
Solidity smart-contracts for RarimoID
- Host: GitHub
- URL: https://github.com/rarimo/identity-contracts
- Owner: rarimo
- License: mit
- Created: 2023-10-26T21:17:16.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-01-10T00:18:14.000Z (about 1 year ago)
- Last Synced: 2024-11-24T04:12:09.493Z (3 months ago)
- Topics: identity, solidity
- Language: Solidity
- Homepage:
- Size: 845 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rarimo identity contracts
#### Test
To run the tests, execute the following command:
```bash
npm run test
```Or to see the coverage, run:
```bash
npm run coverage
```#### Deployment
Before deployment, you need to create an **.env** file following the example from **.env.example**
Next you need to fill in the config file `deploy/data/config.json`
The config has the following structure:
```json
{
"validatorContractInfo": {
"validatorAddr": "",
"identitiesStatesUpdateTime": "3600",
"isMtpValidator": "true"
},
"stateContractInfo": {
"stateAddr": "0xD843...889",
"stateInitParams": {
"signer": "0xf39F...266",
"sourceStateContract": "0xf39F...266",
"sourceChainName": "Rarimo",
"chainName": "Sepolia"
},
"isLightweight": "true"
},
"poseidonFacade": "0x4EE6...07B",
"zkpQueriesStorage": "",
"identityVerifierInfo": {
"identityVerifierAddr": "",
"verifierInitParams": {
"verifiedSBTAddr": "",
"verifiedSBTInfo": {
"name": "testSBT",
"symbol": "TSBT",
"tokenURI": "test uri"
}
},
"isSBTIdentityVerifier": "true"
},
"zkpQueries": [
{
"queryId": "IDENTITY_PROOF",
"validatorAddr": "",
"query": {
"schema": "281137295283288650707099064285754478104",
"claimPathKey": "16153502378554866159038850585713705546745830858436223350513476757548188765156",
"operator": "1",
"value": ["1"],
"queryHash": "0",
"circuitId": "credentialAtomicQueryMTPV2OnChain"
}
}
]
}
```To deploy new contracts it is enough to leave the fields with addresses empty while filling in the fields with init values.
If you already have contract addresses, just fill in the corresponding fields. In this configuration, the specified contract addresses will be used during deploymentIf you don't have any `zkpQuery` then just leave an empty array
To deploy, run command `npm run deploy-`, where *network* is the network name from the **hardhat.config.ts** file. The list of available commands and their settings can be found in **package.json** file
#### Local deployment
To deploy the contracts locally, run the following commands (in the different terminals):
```bash
npm run private-network
npm run deploy-local
```#### Bindings
The command to generate the bindings is as follows:
```bash
npm run generate-types
```> See the full list of available commands in the `package.json` file.