@@ -2,13 +2,12 @@ import { AuxdataStyle } from '@ethereum-sourcify/bytecode-utils';
2
2
import {
3
3
ImmutableReferences ,
4
4
LinkReferences ,
5
- Metadata ,
6
5
} from '@ethereum-sourcify/compilers-types' ;
7
6
import {
8
7
CompiledContractCborAuxdata ,
9
8
StringMap ,
10
9
} from '../Compilation/CompilationTypes' ;
11
- import { AbiCoder , id as keccak256Str , Interface } from 'ethers' ;
10
+ import { AbiCoder , id as keccak256Str , Interface , InterfaceAbi } from 'ethers' ;
12
11
import { logError } from '../logger' ;
13
12
14
13
const abiCoder = AbiCoder . defaultAbiCoder ( ) ;
@@ -194,16 +193,15 @@ export function extractAbiEncodedConstructorArguments(
194
193
export function extractConstructorArgumentsTransformation (
195
194
populatedRecompiledBytecode : string ,
196
195
onchainCreationBytecode : string ,
197
- metadata : Metadata ,
196
+ abi : InterfaceAbi ,
198
197
) {
199
198
const transformations : Transformation [ ] = [ ] ;
200
199
const transformationValues : TransformationValues = { } ;
201
200
const abiEncodedConstructorArguments = extractAbiEncodedConstructorArguments (
202
201
populatedRecompiledBytecode ,
203
202
onchainCreationBytecode ,
204
203
) ;
205
- const constructorAbiParamInputs = new Interface ( metadata ?. output ?. abi ) . deploy
206
- . inputs ;
204
+ const constructorAbiParamInputs = new Interface ( abi ) . deploy . inputs ;
207
205
if ( abiEncodedConstructorArguments ) {
208
206
if ( ! constructorAbiParamInputs ) {
209
207
throw new Error (
0 commit comments