-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fe5de03
commit c80722a
Showing
8 changed files
with
183 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { AnonAadhaarDeployHelper } from "../../helpers/DeployAnonAadharV1Validator"; | ||
import { DeployHelper } from "../../helpers/DeployHelper"; | ||
import { contractsInfo } from "../../helpers/constants"; | ||
import { getStateContractAddress } from "../../helpers/helperUtils"; | ||
|
||
async function main() { | ||
const stDeployHelper = await DeployHelper.initialize(); | ||
// TODO (illia-korotia): possible problem is here. | ||
// By default I have issuer did:iden3:privado-main | ||
const { defaultIdType } = await stDeployHelper.getDefaultIdType(); | ||
|
||
const stateContractAddress = getStateContractAddress(); | ||
|
||
const verifierLib = await stDeployHelper.deployVerifierLib(); | ||
const identityLib = await stDeployHelper.deployIdentityLib( | ||
contractsInfo.SMT_LIB.unifiedAddress, | ||
contractsInfo.POSEIDON_3.unifiedAddress, | ||
contractsInfo.POSEIDON_4.unifiedAddress, | ||
); | ||
|
||
const f = await AnonAadhaarDeployHelper.initialize(); | ||
const issuer = await f.deployAnonAadhaarCredentialIssuing( | ||
await verifierLib.getAddress(), | ||
await identityLib.getAddress(), | ||
await stateContractAddress, | ||
defaultIdType, | ||
); | ||
await f.setZKPRequest(issuer, 23095784, stateContractAddress); | ||
|
||
console.log("AnonAadhaar deployed at: ", await issuer.getAddress()); | ||
} | ||
|
||
main() | ||
.then(() => process.exit(0)) | ||
.catch((error) => { | ||
console.error(error); | ||
process.exit(1); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.