Deployment hacking while trying to deploy on rinkeby

This currently breaks the local usage because of the different appIds:
<name>.open.aragonpm.eth vs. <name>.aragonpm.eth (local)
This commit is contained in:
2019-03-26 00:18:59 +01:00
parent fbda45376e
commit 3c2cdf4376
22 changed files with 207 additions and 68 deletions

View File

@@ -6,7 +6,18 @@ const addressesPath = path.join(libPath, 'addresses');
const KreditsKit = artifacts.require('KreditsKit')
module.exports = async function(callback) {
const networkId = parseInt(web3.version.network);
// load networkId; will change with updated truffle
const networkPromise = new Promise((resolve, reject) => {
web3.version.getNetwork((err, network) => {
if (err) {
reject(err);
} else {
resolve(network);
}
})
})
const networkId = await networkPromise;
console.log(`Deploying to networkId: ${networkId}`)
let kitAddresseFile = path.join(addressesPath, 'KreditsKit.json');
let kitAddresses = JSON.parse(fs.readFileSync(kitAddresseFile));