fix artefact

pull/3879/head
Aniket-Engg 1 year ago committed by Aniket
parent 165b789e0d
commit 4721fc233a
  1. 8
      apps/etherscan/src/app/views/VerifyView.tsx

@ -52,13 +52,9 @@ export const VerifyView: React.FC<Props> = ({
}, [client]) }, [client])
useEffect(() => { useEffect(() => {
console.log('contracts are updated--->', contracts)
console.log('contracts are updated-selectedContract-->', selectedContract)
if (contracts.includes(selectedContract)) { if (contracts.includes(selectedContract)) {
console.log('contracts are updated-ShowConstructorArgs-->', showConstructorArgs) client.call("compilerArtefacts" as any, "getArtefactsByContractName", selectedContract).then((result) => {
client.call("compilerArtefacts" as any, "getArtefactsByContractName", selectedContract).then((artefact) => { const { artefact } = result
console.log('artefact----->', artefact)
if (artefact && artefact.abi && artefact.abi[0] && artefact.abi[0].type && artefact.abi[0].type === 'constructor' && artefact.abi[0].inputs.length > 0) { 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) setConstructorInputs(artefact.abi[0].inputs)
setShowConstructorArgs(true) setShowConstructorArgs(true)

Loading…
Cancel
Save