Skip to content

Commit

Permalink
fixup! fixup! fixup! Introduce sub-assembly offset output artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
nikola-matic committed Jan 17, 2025
1 parent 6edeb8e commit e4f8896
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 30 deletions.
6 changes: 0 additions & 6 deletions libsolidity/interface/StandardCompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1287,12 +1287,6 @@ Json StandardCompiler::importEVMAssembly(StandardCompiler::InputsAndSettings _in
deployedJSON["linkReferences"] = formatLinkReferences(stack.runtimeObject(sourceName).linkReferences);
if (evmDeployedArtifactRequested("immutableReferences"))
deployedJSON["immutableReferences"] = formatImmutableReferences(stack.runtimeObject(sourceName).immutableReferences);
if (evmDeployedArtifactRequested("subAssemblyOffsets"))
{
Json ret = Json::object();
ret["subs"] = formatSubAssemblyOffsets(stack.runtimeObject(sourceName).subAssemblyData);
deployedJSON["subAssemblyOffsets"] = std::move(ret);
}
evmData["deployedBytecode"] = deployedJSON;
}

Expand Down
5 changes: 1 addition & 4 deletions test/cmdlineTests/standard_import_asm_json/output.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": "",
"subAssemblyOffsets": {
"subs": []
}
"sourceMap": ""
},
"legacyAssembly": {
".code": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,7 @@
"linkReferences": {},
"object": "<BYTECODE REMOVED>",
"opcodes":"<OPCODES REMOVED>",
"sourceMap":"<SOURCEMAP REMOVED>",
"subAssemblyOffsets": {
"subs": [
{
"isCreation": false,
"length": 87,
"start": 0
}
]
}
"sourceMap":"<SOURCEMAP REMOVED>"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,7 @@
},
"object": "<BYTECODE REMOVED>__$d553ddd21b3d8da0d69a6510c170f4a77b$__<BYTECODE REMOVED>",
"opcodes":"<OPCODES REMOVED>",
"sourceMap":"<SOURCEMAP REMOVED>",
"subAssemblyOffsets": {
"subs": [
{
"isCreation": false,
"length": 75,
"start": 0
}
]
}
"sourceMap":"<SOURCEMAP REMOVED>"
}
}
}
Expand Down

0 comments on commit e4f8896

Please sign in to comment.