Remove console.logs

pull/5285/head
Manuel Wedler 4 months ago committed by Aniket
parent f1cb79ea01
commit 4304c01e2e
  1. 4
      apps/contract-verification/src/app/AppContext.tsx
  2. 8
      apps/contract-verification/src/app/Verifiers/SourcifyVerifier.ts
  3. 4
      apps/contract-verification/src/app/app.tsx
  4. 2
      apps/contract-verification/src/app/components/ContractDropdown.tsx

@ -19,9 +19,7 @@ type AppContextType = {
// Provide a default value with the appropriate types
const defaultContextValue: AppContextType = {
themeType: 'dark',
setThemeType: (themeType: ThemeType) => {
console.log('Calling Set Theme Type')
},
setThemeType: (themeType: ThemeType) => {},
clientInstance: {} as ContractVerificationPluginClient,
settings: { chains: {} },
setSettings: () => {},

@ -48,12 +48,6 @@ export class SourcifyVerifier extends AbstractVerifier {
async verify(submittedContract: SubmittedContract, compilerAbstract: CompilerAbstract): Promise<VerificationResponse> {
const metadataStr = compilerAbstract.data.contracts[submittedContract.filePath][submittedContract.contractName].metadata
const sources = compilerAbstract.source.sources
console.log('selectedFilePath:', submittedContract.filePath)
console.log('selectedContractName:', submittedContract.contractName)
console.log('compilerAbstract:', compilerAbstract)
console.log('selectedContractMetadataStr:', metadataStr)
console.log('chainId:', submittedContract.chainId)
console.log('address:', submittedContract.address)
// from { "filename.sol": {content: "contract MyContract { ... }"} }
// to { "filename.sol": "contract MyContract { ... }" }
@ -70,8 +64,6 @@ export class SourcifyVerifier extends AbstractVerifier {
},
}
console.log(body)
const response = await fetch(new URL(this.apiUrl + '/verify').href, {
method: 'POST',
headers: {

@ -28,15 +28,11 @@ const App = () => {
// Fetch compiler artefacts initially
plugin.call('compilerArtefacts' as any, 'getAllCompilerAbstracts').then((obj: any) => {
console.log('compilerArtefacts.getAllCompilerAbstracts')
console.log(obj)
setCompilationOutput(obj)
})
// Subscribe to compilations
plugin.on('compilerArtefacts' as any, 'compilationSaved', (compilerAbstracts: { [key: string]: CompilerAbstract }) => {
console.log('compilerArtefacts.compilationSaved')
console.log(compilerAbstracts)
setCompilationOutput((prev) => ({ ...(prev || {}), ...compilerAbstracts }))
})

@ -19,7 +19,6 @@ export const ContractDropdown: React.FC<ContractDropdownProps> = ({ label, id, s
const { compilationOutput } = useContext(AppContext)
useEffect(() => {
console.log('CompiilationOutput chainged', compilationOutput)
if (!compilationOutput) return
// Otherwise select the first by default
const triggerFilePath = Object.keys(compilationOutput)[0]
@ -35,7 +34,6 @@ export const ContractDropdown: React.FC<ContractDropdownProps> = ({ label, id, s
}, [compilationOutput])
const handleSelectContract = (event: React.ChangeEvent<HTMLSelectElement>) => {
console.log('selecting ', event.target.value)
setSelectedContract(JSON.parse(event.target.value))
}

Loading…
Cancel
Save