|
|
@ -43,10 +43,13 @@ function CompilerButton({contract, setOutput, compilerUrl, resetCompilerState}: |
|
|
|
try { |
|
|
|
try { |
|
|
|
output = await compile(compilerUrl, _contract) |
|
|
|
output = await compile(compilerUrl, _contract) |
|
|
|
} catch (e: any) { |
|
|
|
} catch (e: any) { |
|
|
|
setOutput(_contract.name, {status: 'failed', message: e.message}) |
|
|
|
remixClient.changeStatus({ |
|
|
|
|
|
|
|
key: 'failed', |
|
|
|
|
|
|
|
type: 'error', |
|
|
|
|
|
|
|
title: e.message |
|
|
|
|
|
|
|
}) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
console.log({ output }) |
|
|
|
|
|
|
|
const compileReturnType = () => { |
|
|
|
const compileReturnType = () => { |
|
|
|
const t: any = toStandardOutput(contract, output) |
|
|
|
const t: any = toStandardOutput(contract, output) |
|
|
|
console.log(t) |
|
|
|
console.log(t) |
|
|
@ -130,11 +133,13 @@ function CompilerButton({contract, setOutput, compilerUrl, resetCompilerState}: |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<Fragment> |
|
|
|
<Fragment> |
|
|
|
<button data-id="compile" onClick={compileContract} title={contract} className="btn btn-primary w-100 text-break remixui_disabled mb-1 mt-3"> |
|
|
|
<button data-id="compile" onClick={compileContract} title={contract} className="btn btn-primary w-100 d-block btn-block text-break remixui_disabled mb-1 mt-3"> |
|
|
|
<div className="fa-1x"> |
|
|
|
<div className="d-flex align-items-center justify-content-center fa-1x"> |
|
|
|
{/* {loadingSpinner ? <span className="fas fa-sync fa-pulse" role="status" aria-hidden="true" /> : null} */} |
|
|
|
<span className="fas fa-sync fa-pulse mr-1" /> |
|
|
|
|
|
|
|
<div className="text-truncate overflow-hidden text-nowrap"> |
|
|
|
<span>Compile</span> |
|
|
|
<span>Compile</span> |
|
|
|
<span className="overflow-hidden text-truncate text-nowrap">{contract}</span> |
|
|
|
<span className="ml-1 text-nowrap">{contract}</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</button> |
|
|
|
</button> |
|
|
|
</Fragment> |
|
|
|
</Fragment> |
|
|
|