Skip to content

Commit 0205b8a

Browse files
committed
Fix translate
1 parent ac0bb19 commit 0205b8a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

translate.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,15 @@ function translateJsonCompilerOutput (output, libraries) {
110110
'evm': {
111111
'legacyAssembly': contractInput['assembly'],
112112
'bytecode': {
113-
'object': linker.linkBytecode(contractInput['bytecode'], libraries),
113+
'object': contractInput['bytecode'] && linker.linkBytecode(contractInput['bytecode'], libraries || {}),
114114
'opcodes': contractInput['opcodes'],
115115
'sourceMap': contractInput['srcmap'],
116-
'linkReferences': linker.findLinkReferences(contractInput['bytecode'])
116+
'linkReferences': contractInput['bytecode'] && linker.findLinkReferences(contractInput['bytecode'])
117117
},
118118
'deployedBytecode': {
119-
'object': linker.linkBytecode(contractInput['runtimeBytecode'], libraries),
119+
'object': contractInput['runtimeBytecode'] && linker.linkBytecode(contractInput['runtimeBytecode'], libraries || {}),
120120
'sourceMap': contractInput['srcmapRuntime'],
121-
'linkReferences': linker.findLinkReferences(contractInput['runtimeBytecode'])
121+
'linkReferences': contractInput['runtimeBytecode'] && linker.findLinkReferences(contractInput['runtimeBytecode'])
122122
},
123123
'methodIdentifiers': contractInput['functionHashes'],
124124
'gasEstimates': translatedGasEstimates

0 commit comments

Comments
 (0)