adding fixes for other compile artifacts

pull/4182/head
Joseph Izang 1 year ago
parent 4e3cd35150
commit db13478450
  1. 2
      apps/vyper/src/app/app.tsx
  2. 4
      apps/vyper/src/app/components/LocalUrl.tsx
  3. 14
      apps/vyper/src/app/components/VyperResult.tsx
  4. 1
      apps/vyper/src/app/utils/compiler.tsx

@ -96,7 +96,7 @@ const App: React.FC = () => {
</ToggleButtonGroup>
<LocalUrlInput url={state.localUrl} setUrl={setLocalUrl} environment={state.environment} />
<WarnRemote environment={state.environment} />
<div className="px-3" id="compile-btn">
<div className="px-3 w-100" id="compile-btn">
<CompilerButton
compilerUrl={compilerUrl()}
contract={contract}

@ -17,8 +17,8 @@ function LocalUrlInput({url, setUrl, environment}: Props) {
}
return (
<Form id="local-url">
<Form.Group controlId="w-100 px-3">
<Form id="local-url" className="w-100 px-3">
<Form.Group controlId="localUrl">
<Form.Text className="text-warning pb-2">{'Currently we support vyper version > 0.2.16'}</Form.Text>
<Form.Label>Local Compiler Url</Form.Label>
<Form.Control onBlur={updateUrl} defaultValue={url} type="email" placeholder="eg http://localhost:8000/compile" />

@ -75,14 +75,14 @@ function VyperResult({ output, themeColor }: VyperResultProps) {
tabMemberType: 'bytecode_runtime',
tabButtonText: () => 'Copy Runtime Bytecode',
eventKey: 'bytecode_runtime'
},
{
tabHeadingText: 'LLL',
tabPayload: Object.values(output)[0]['ir'] ? '' : '',
tabMemberType: 'ir',
tabButtonText: () => Object.values(output)[0]['ir'] ? 'Copy LLL Code' : 'Nothing to copy yet',
eventKey: 'ir'
}
// {
// tabHeadingText: 'LLL',
// tabPayload: Object.values(output)[0]['ir'] ? '' : '',
// tabMemberType: 'ir',
// tabButtonText: () => Object.values(output)[0]['ir'] ? 'Copy LLL Code' : 'Nothing to copy yet',
// eventKey: 'ir'
// }
]
return (

@ -87,6 +87,7 @@ export async function compile(url: string, contract: Contract): Promise<VyperCom
result = await(await axios.get(url + 'compiled_artifact/' + compileCode , {
method: 'Get'
})).data
console.log({result})
return result
} else if (status === 'PENDING' || status === 'FAILED') {
result = await(await axios.get(url + 'exceptions/' + compileCode , {

Loading…
Cancel
Save