clean up and plugin setup

pull/4182/head
Joseph Izang 1 year ago
parent 262266e4af
commit 5beab8f331
  1. 2
      apps/vyper/src/app/app.tsx
  2. 9
      apps/vyper/src/app/components/VyperResult.tsx
  3. 1
      apps/vyper/src/app/utils/compiler.tsx
  4. 1
      libs/remix-ui/vyper-compile-details/src/index.ts
  5. 1
      libs/remix-ui/vyper-compile-details/src/lib/vyper-compile-details.tsx

@ -110,7 +110,7 @@ const App: React.FC = () => {
{
output && Object.keys(output).length > 0 ? (
<>
<VyperResult output={output} />
<VyperResult output={output} plugin={remixClient} />
</>
) : null
}

@ -10,6 +10,7 @@ import { VyperCompilationResult } from '../utils/types'
interface VyperResultProps {
output?: any
plugin?: any
}
export type ExampleContract = {
@ -24,7 +25,7 @@ type TabContentMembers = {
className: string
}
function VyperResult({ output }: VyperResultProps) {
function VyperResult({ output, plugin }: VyperResultProps) {
// const [active, setActive] = useState<keyof VyperCompilationResult>('abi')
if (!output)
@ -56,9 +57,9 @@ function VyperResult({ output }: VyperResultProps) {
return (
<>
<div className="border border-top"></div>
<div>
<button className="btn btn-secondary btn-block mx-2" onClick={() => {
<div className="d-flex justify-content-center px-2 w-100">
<button className="btn btn-secondary w-100" onClick={async () => {
await plugin?.call('vyperCompilationDetails', 'showDetails', {})
}}>
<span>Compilation Details</span>
</button>

@ -1,6 +1,5 @@
import {CompilationResult, ABIDescription} from '@remixproject/plugin-api'
import axios from 'axios'
import { VyperCompilationResultType, CompileFormat, ETHPM3Format, CompilerInformationObject } from './types'
export interface Contract {
name: string

@ -0,0 +1 @@
export * from './lib/vyper-compile-details'

@ -1,3 +1,4 @@
import React from 'react'
export function RemixUiVyperCompileDetails() {

Loading…
Cancel
Save