pull/4182/head
Joseph Izang 1 year ago
parent db13478450
commit 0e98dc718b
  1. 4
      apps/vyper/src/app/components/CompilerButton.tsx
  2. 6
      libs/remix-ui/solidity-compile-details/src/lib/solidity-compile-details.tsx
  3. 1
      libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx

@ -108,6 +108,10 @@ function CompilerButton({contract, setOutput, compilerUrl, resetCompilerState}:
}) })
const data = toStandardOutput(_contract.name, output) const data = toStandardOutput(_contract.name, output)
remixClient.compilationFinish(_contract.name, _contract.content, data) remixClient.compilationFinish(_contract.name, _contract.content, data)
//map data to compilation details shape
remixClient.call('compilationDetails' as any, 'showDetails', data)
} catch (err: any) { } catch (err: any) {
remixClient.changeStatus({ remixClient.changeStatus({
key: 'failed', key: 'failed',

@ -18,7 +18,7 @@ export interface RemixUiCompileDetailsProps {
const _paq = (window._paq = window._paq || []) const _paq = (window._paq = window._paq || [])
export function RemixUiCompileDetails({ plugin, contractProperties, selectedContract, saveAs, help, insertValue }: RemixUiCompileDetailsProps) { export function RemixUiCompileDetails({ plugin, contractProperties, selectedContract, saveAs, help, insertValue }: RemixUiCompileDetailsProps) {
console.log({selectedContract, contractProperties})
const intl = useIntl() const intl = useIntl()
const downloadFn = () => { const downloadFn = () => {
_paq.push(['trackEvent', 'compiler', 'compilerDetails', 'download']) _paq.push(['trackEvent', 'compiler', 'compilerDetails', 'download'])
@ -33,7 +33,7 @@ export function RemixUiCompileDetails({ plugin, contractProperties, selectedCont
</CustomTooltip> </CustomTooltip>
</div> </div>
<div className="remixui_detailsJSON"> <div className="remixui_detailsJSON">
<TreeView> {<TreeView>
{Object.keys(contractProperties).map((propertyName: ContractPropertyName, index) => { {Object.keys(contractProperties).map((propertyName: ContractPropertyName, index) => {
const copyDetails = ( const copyDetails = (
<span className="remixui_copyDetails"> <span className="remixui_copyDetails">
@ -69,7 +69,7 @@ export function RemixUiCompileDetails({ plugin, contractProperties, selectedCont
</div> </div>
) )
})} })}
</TreeView> </TreeView>}
</div> </div>
</> </>
) )

@ -123,6 +123,7 @@ export const ContractSelection = (props: ContractSelectionProps) => {
} }
const insertValue = (details, propertyName: ContractPropertyName) => { const insertValue = (details, propertyName: ContractPropertyName) => {
console.log({ details })
let node let node
if (propertyName === 'web3Deploy' || propertyName === 'name' || propertyName === 'Assembly') { if (propertyName === 'web3Deploy' || propertyName === 'name' || propertyName === 'Assembly') {
node = <pre>{details[propertyName]}</pre> node = <pre>{details[propertyName]}</pre>

Loading…
Cancel
Save