retrieve contract metadata

pull/1/head
yann300 7 years ago
parent e343fe45bc
commit 0d57f4ebed
  1. 17
      src/app/files/compiler-metadata.js
  2. 1
      src/app/panels/file-panel.js

@ -44,6 +44,23 @@ class CompilerMetadata {
}
})
}
metadataOf (contractName, callback) {
var self = this
var provider = self._opts.fileManager.currentFileProvider()
var path = self._opts.fileManager.currentPath()
if (provider && path) {
var fileName = path + contractName + '.json'
provider.get(fileName, (error, content) => {
if (error) return callback(error)
try {
callback(null, JSON.parse(content))
} catch (e) {
callback(e.message)
}
})
}
}
}
module.exports = CompilerMetadata

@ -71,6 +71,7 @@ function filepanel (localRegistry) {
)
self._compilerMetadata.syncContractMetadata()
self.compilerMetadata = () => { return self._compilerMetadata }
var dragbar = yo`<div onmousedown=${mousedown} class=${css.dragbar}></div>`
function remixdDialog () {

Loading…
Cancel
Save