Consumes contracts.json
file generated by DOUG CLI of the following format:
{
"MainContractName": {
"type": "DougMain",
"abi": [],
"unlinked_binary": ""
},
"ChildContractName": {
"type": "DougContract",
"abi": [],
"unlinked_binary": ""
},
"EntityName": {
"type": "DougEntity",
"abi": [],
"unlinked_binary": ""
}
}
It uses ether-pudding to turn ABIs, binaries and deployed addresses into Javascript files.
const DougArtifactor = require('doug-artifactor')
const artifactor = new DougArtifactor({
contractsFile: '/var/sandbox/config/contracts.json',
addressFile: '/var/sandbox/config/address',
web3: {
host: '127.0.0.1',
port: '8545'
}
})
artifactor.run()
.then(contracts => console.log(contracts))
.catch(err => console.log(err))