@@ -3,7 +3,7 @@ import path from "path";
3
3
import hre , { ethers , ignition } from "hardhat" ;
4
4
import Create2AddressAnchorModule from "../../ignition/modules/create2AddressAnchor" ;
5
5
import { contractsInfo } from "../../helpers/constants" ;
6
- import { getChainId , isContract } from "../../helpers/helperUtils" ;
6
+ import { getChainId , getDefaultIdType , isContract } from "../../helpers/helperUtils" ;
7
7
import {
8
8
MCPaymentProxyModule ,
9
9
Poseidon1Module ,
@@ -13,8 +13,15 @@ import {
13
13
SmtLibModule ,
14
14
VCPaymentProxyModule ,
15
15
} from "../../ignition" ;
16
- import { StateProxyModule } from "../../ignition/modules/state" ;
17
- import { UniversalVerifierProxyModule } from "../../ignition/modules/universalVerifier" ;
16
+ import {
17
+ CrossChainProofValidatorModule ,
18
+ StateLibModule ,
19
+ StateProxyModule ,
20
+ } from "../../ignition/modules/state" ;
21
+ import {
22
+ UniversalVerifierProxyModule ,
23
+ VerifierLibModule ,
24
+ } from "../../ignition/modules/universalVerifier" ;
18
25
import { IdentityTreeStoreProxyModule } from "../../ignition/modules/identityTreeStore" ;
19
26
import { CredentialAtomicQueryMTPV2ValidatorProxyModule } from "../../ignition/modules/credentialAtomicQueryMTPV2Validator" ;
20
27
import { CredentialAtomicQuerySigV2ValidatorProxyModule } from "../../ignition/modules/credentialAtomicQuerySigV2Validator" ;
@@ -41,6 +48,7 @@ import {
41
48
UniversalVerifierAtModule ,
42
49
VCPaymentAtModule ,
43
50
} from "../../ignition/modules/contractsAt" ;
51
+ import { Groth16VerifierStateTransitionModule } from "../../ignition/modules/groth16verifiers" ;
44
52
45
53
async function getDeployedAddresses ( ) {
46
54
let deployedAddresses = { } ;
@@ -69,6 +77,9 @@ async function main() {
69
77
const paramsPath = path . join ( __dirname , `../../ignition/modules/params/${ networkName } .json` ) ;
70
78
const parameters = JSON . parse ( fs . readFileSync ( paramsPath ) . toString ( ) ) ;
71
79
80
+ parameters . StateProxyFinalImplementationModule . defaultIdType = (
81
+ await getDefaultIdType ( )
82
+ ) . defaultIdType ;
72
83
const deployedAddresses = await getDeployedAddresses ( ) ;
73
84
74
85
parameters . Create2AddressAnchorAtModule = {
@@ -236,6 +247,24 @@ async function main() {
236
247
} ,
237
248
] ;
238
249
250
+ /* const basicStrategyContracts = [
251
+ { module: CrossChainProofValidatorModule, name: "CrossChainProofValidator" },
252
+ { module: Groth16VerifierStateTransitionModule, name: "Groth16VerifierStateTransition" },
253
+ { module: StateLibModule, name: "StateLib" },
254
+ { module: VerifierLibModule, name: "VerifierLib" },
255
+ ];
256
+
257
+ for (const contract of basicStrategyContracts) {
258
+ const deployedContract = await ignition.deploy(contract.module, {
259
+ strategy: "basic",
260
+ defaultSender: await signer.getAddress(),
261
+ parameters: parameters,
262
+ });
263
+ console.log(
264
+ `${contract.name} deployed to: ${deployedContract[Object.keys(deployedContract)[0]].target}`,
265
+ );
266
+ } */
267
+
239
268
for ( const contract of contracts ) {
240
269
console . log ( `Deploying ${ contract . name } ...` ) ;
241
270
parameters [ contract . moduleAt . id ] = contract . proxy
@@ -248,6 +277,7 @@ async function main() {
248
277
: {
249
278
contractAddress : contract . contractAddress ,
250
279
} ;
280
+
251
281
if ( ! ( await isContract ( contract . contractAddress ) ) ) {
252
282
const deployedContract : any = await ignition . deploy ( contract . module , {
253
283
strategy : deployStrategy ,
0 commit comments