generate uml svg. persist flattened contract and svg to file explorer

pull/3321/head^2
Joseph Izang 2 years ago committed by Aniket
parent 42bf2aa5ab
commit f5be9d74fb
  1. 2
      libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx

@ -239,11 +239,13 @@ export const ContractSelection = (props: ContractSelectionProps) => {
const flattenContract = () => {
const filePath = api.getCompilationResult().source.target
const ast = api.getCompilationResult().data.sources
console.log({ ast })
const dependencyGraph = getDependencyGraph(ast, filePath)
const sorted = dependencyGraph.isEmpty()
? [filePath]
: dependencyGraph.sort().reverse()
const sources = api.getCompilationResult().source.sources
console.log({ sources })
const result = concatSourceFiles(sorted, sources)
api.writeFile(`${api.currentFile}_flattened.sol`, result)
setContentForAST(result)

Loading…
Cancel
Save