add comments

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

@ -199,7 +199,15 @@ export const ContractSelection = (props: ContractSelectionProps) => {
return copyContractProperty('bytecode') return copyContractProperty('bytecode')
} }
/**
* Local property to hold flattend contract result
*/
let content4AST: string let content4AST: string
/**
* Take AST and generates a UML diagram of compiled contract as svg
* @returns void
*/
const generateUML = () => { const generateUML = () => {
try { try {
const currentFile = api.currentFile const currentFile = api.currentFile
@ -211,6 +219,12 @@ export const ContractSelection = (props: ContractSelectionProps) => {
} }
} }
/**
* Takes currently compiled contract that has a bunch of imports at the top
* and flattens them ready for UML creation. Takes the flattened result
* and assigns to a local property
* @returns void
*/
const flattenContract = () => { const flattenContract = () => {
const filePath = api.getCompilationResult().source.target const filePath = api.getCompilationResult().source.target
const ast = api.getCompilationResult().data.sources const ast = api.getCompilationResult().data.sources

Loading…
Cancel
Save