fix visiting contract

pull/2470/head
yann300 2 years ago
parent f4faa02cd6
commit 10d55a40e0
  1. 19
      apps/solidity-compiler/src/app/compiler-api.ts

@ -354,22 +354,21 @@ export const CompilerApiMixin = (Base) => class extends Base {
target: source.target
})
}
const contractMap = {}
const contractsDetails = {}
this.compiler.visitContracts((contract) => {
const contractDetails = parseContracts(
contract.name,
contract.object,
this.compiler.getSource(contract.file)
)
const contractMap = contract
return resolve({
contractMap: {
[contract.name]: contractMap
}, contractsDetails: {
[contract.name]: contractDetails
},
target: source.target
})
contractMap[contract.name] = contract
contractDetails[contract.name] = contractDetails
})
return resolve({
contractMap,
contractsDetails,
target: source.target
})
})
}

Loading…
Cancel
Save