doug-artifactor
v0.0.3
Published
NodeJS library to load Solidity contracts following the DOUG paradigm into JavaScript objects
Downloads
12
Readme
DOUG artifactor
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.
Example usage
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))