|
|
@ -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) |
|
|
|