From da6b6d7230b069025f7f319b2b2a026d8fd0ee64 Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Wed, 28 Jun 2023 15:31:22 +0530 Subject: [PATCH] fix artefact --- apps/etherscan/src/app/views/VerifyView.tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/apps/etherscan/src/app/views/VerifyView.tsx b/apps/etherscan/src/app/views/VerifyView.tsx index 8dfffab782..5e4323e940 100644 --- a/apps/etherscan/src/app/views/VerifyView.tsx +++ b/apps/etherscan/src/app/views/VerifyView.tsx @@ -52,13 +52,9 @@ export const VerifyView: React.FC = ({ }, [client]) useEffect(() => { - console.log('contracts are updated--->', contracts) - console.log('contracts are updated-selectedContract-->', selectedContract) - if (contracts.includes(selectedContract)) { - console.log('contracts are updated-ShowConstructorArgs-->', showConstructorArgs) - client.call("compilerArtefacts" as any, "getArtefactsByContractName", selectedContract).then((artefact) => { - console.log('artefact----->', artefact) + client.call("compilerArtefacts" as any, "getArtefactsByContractName", selectedContract).then((result) => { + const { artefact } = result if (artefact && artefact.abi && artefact.abi[0] && artefact.abi[0].type && artefact.abi[0].type === 'constructor' && artefact.abi[0].inputs.length > 0) { setConstructorInputs(artefact.abi[0].inputs) setShowConstructorArgs(true)