@@ -150,28 +150,35 @@ export async function deployContractfromDeployMetadata(
150150 salt,
151151 } = options ;
152152
153- const processedImplParams : Record < string , string | string [ ] > = { } ;
154- for ( const key in implementationConstructorParams ) {
155- processedImplParams [ key ] = await processRefDeployments ( {
156- client,
157- account,
158- chain,
159- paramValue : implementationConstructorParams [ key ] as
160- | string
161- | ImplementationConstructorParam ,
162- } ) ;
153+ let processedImplParams : Record < string , string | string [ ] > | undefined ;
154+ let processedInitializeParams : Record < string , string | string [ ] > | undefined ;
155+
156+ if ( implementationConstructorParams ) {
157+ processedImplParams = { } ;
158+ for ( const key in implementationConstructorParams ) {
159+ processedImplParams [ key ] = await processRefDeployments ( {
160+ client,
161+ account,
162+ chain,
163+ paramValue : implementationConstructorParams [ key ] as
164+ | string
165+ | ImplementationConstructorParam ,
166+ } ) ;
167+ }
163168 }
164169
165- const processedInitializeParams : Record < string , string | string [ ] > = { } ;
166- for ( const key in initializeParams ) {
167- processedInitializeParams [ key ] = await processRefDeployments ( {
168- client,
169- account,
170- chain,
171- paramValue : initializeParams [ key ] as
172- | string
173- | ImplementationConstructorParam ,
174- } ) ;
170+ if ( initializeParams ) {
171+ processedInitializeParams = { } ;
172+ for ( const key in initializeParams ) {
173+ processedInitializeParams [ key ] = await processRefDeployments ( {
174+ client,
175+ account,
176+ chain,
177+ paramValue : initializeParams [ key ] as
178+ | string
179+ | ImplementationConstructorParam ,
180+ } ) ;
181+ }
175182 }
176183
177184 switch ( deployMetadata ?. deployType ) {
0 commit comments