Build on aragonOS #62

Merged
bumi merged 51 commits from aragonos into master 2019-04-02 19:36:36 +00:00
3 changed files with 12 additions and 30 deletions
Showing only changes of commit 258c6729b6 - Show all commits

View File

@ -6,6 +6,7 @@ const argv = require('yargs').argv
fsmanuel commented 2019-03-24 22:23:01 +00:00 (Migrated from github.com)
Review

What about:

const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
What about: ```js const KreditsKit = artifacts.require('KreditsKit') const kreditsKitFile = 'KreditsKit.json' // ... let addresseFile = path.join(addressesPath, kreditsKitFile); ```
fsmanuel commented 2019-03-24 22:23:01 +00:00 (Migrated from github.com)
Review

What about:

const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
What about: ```js const KreditsKit = artifacts.require('KreditsKit') const kreditsKitFile = 'KreditsKit.json' // ... let addresseFile = path.join(addressesPath, kreditsKitFile); ```
fsmanuel commented 2019-03-27 11:38:31 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
fsmanuel commented 2019-03-27 11:38:31 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
raucao commented 2019-03-27 11:39:55 +00:00 (Migrated from github.com)
Review

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)
raucao commented 2019-03-27 11:39:55 +00:00 (Migrated from github.com)
Review

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)
const namehash = require('eth-ens-namehash').hash
const fileInject = require('./helpers/file_inject.js')
const getNetworkId = require('./helpers/networkid.js')
fsmanuel commented 2019-03-24 22:23:01 +00:00 (Migrated from github.com)
Review

What about:

const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
What about: ```js const KreditsKit = artifacts.require('KreditsKit') const kreditsKitFile = 'KreditsKit.json' // ... let addresseFile = path.join(addressesPath, kreditsKitFile); ```
fsmanuel commented 2019-03-27 11:38:31 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
raucao commented 2019-03-27 11:39:55 +00:00 (Migrated from github.com)
Review

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)
const DAOFactory = artifacts.require('DAOFactory')
const KreditsKit = artifacts.require('KreditsKit')
@ -18,18 +19,7 @@ const daoFactoryAddress = arapp.environments[environment].daoFactory || process.
fsmanuel commented 2019-03-24 22:23:01 +00:00 (Migrated from github.com)
Review

What about:

const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
What about: ```js const KreditsKit = artifacts.require('KreditsKit') const kreditsKitFile = 'KreditsKit.json' // ... let addresseFile = path.join(addressesPath, kreditsKitFile); ```
fsmanuel commented 2019-03-24 22:23:01 +00:00 (Migrated from github.com)
Review

What about:

const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
What about: ```js const KreditsKit = artifacts.require('KreditsKit') const kreditsKitFile = 'KreditsKit.json' // ... let addresseFile = path.join(addressesPath, kreditsKitFile); ```
fsmanuel commented 2019-03-27 11:38:31 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
fsmanuel commented 2019-03-27 11:38:31 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
raucao commented 2019-03-27 11:39:55 +00:00 (Migrated from github.com)
Review

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)
raucao commented 2019-03-27 11:39:55 +00:00 (Migrated from github.com)
Review

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)
module.exports = async function(callback) {
fsmanuel commented 2019-03-24 22:16:51 +00:00 (Migrated from github.com)
Review

Are you a javascript pro, now?

Are you a javascript pro, now?
bumi commented 2019-03-26 23:43:10 +00:00 (Migrated from github.com)
Review

a pro in being desperate :)
those scripts are executed in some truffle context and debugging sometimes is a pain because truffle swallows the errors and traces... so I sometimes threw everything on it :D

a pro in being desperate :) those scripts are executed in some truffle context and debugging sometimes is a pain because truffle swallows the errors and traces... so I sometimes threw everything on it :D
fsmanuel commented 2019-03-27 11:10:41 +00:00 (Migrated from github.com)
Review

Much better with a normal function!

Much better with a normal function!
fsmanuel commented 2019-03-24 22:23:01 +00:00 (Migrated from github.com)
Review

What about:

const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
What about: ```js const KreditsKit = artifacts.require('KreditsKit') const kreditsKitFile = 'KreditsKit.json' // ... let addresseFile = path.join(addressesPath, kreditsKitFile); ```
fsmanuel commented 2019-03-27 11:38:31 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
raucao commented 2019-03-27 11:39:55 +00:00 (Migrated from github.com)
Review

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)
// load networkId; will change with updated truffle
fsmanuel commented 2019-03-24 22:23:01 +00:00 (Migrated from github.com)
Review

What about:

const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
What about: ```js const KreditsKit = artifacts.require('KreditsKit') const kreditsKitFile = 'KreditsKit.json' // ... let addresseFile = path.join(addressesPath, kreditsKitFile); ```
fsmanuel commented 2019-03-27 11:38:31 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
raucao commented 2019-03-27 11:39:55 +00:00 (Migrated from github.com)
Review

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)
const networkPromise = new Promise((resolve, reject) => {
fsmanuel commented 2019-03-24 22:23:01 +00:00 (Migrated from github.com)
Review

What about:

const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
What about: ```js const KreditsKit = artifacts.require('KreditsKit') const kreditsKitFile = 'KreditsKit.json' // ... let addresseFile = path.join(addressesPath, kreditsKitFile); ```
fsmanuel commented 2019-03-27 11:38:31 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
raucao commented 2019-03-27 11:39:55 +00:00 (Migrated from github.com)
Review

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)
web3.version.getNetwork((err, network) => {
fsmanuel commented 2019-03-24 22:23:01 +00:00 (Migrated from github.com)
Review

What about:

const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
What about: ```js const KreditsKit = artifacts.require('KreditsKit') const kreditsKitFile = 'KreditsKit.json' // ... let addresseFile = path.join(addressesPath, kreditsKitFile); ```
fsmanuel commented 2019-03-27 11:38:31 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
raucao commented 2019-03-27 11:39:55 +00:00 (Migrated from github.com)
Review

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)
if (err) {
fsmanuel commented 2019-03-24 22:23:01 +00:00 (Migrated from github.com)
Review

What about:

const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
What about: ```js const KreditsKit = artifacts.require('KreditsKit') const kreditsKitFile = 'KreditsKit.json' // ... let addresseFile = path.join(addressesPath, kreditsKitFile); ```
fsmanuel commented 2019-03-27 11:38:31 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
raucao commented 2019-03-27 11:39:55 +00:00 (Migrated from github.com)
Review

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)
reject(err);
fsmanuel commented 2019-03-24 22:23:01 +00:00 (Migrated from github.com)
Review

What about:

const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
What about: ```js const KreditsKit = artifacts.require('KreditsKit') const kreditsKitFile = 'KreditsKit.json' // ... let addresseFile = path.join(addressesPath, kreditsKitFile); ```
fsmanuel commented 2019-03-27 11:38:31 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
raucao commented 2019-03-27 11:39:55 +00:00 (Migrated from github.com)
Review

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)
} else {
fsmanuel commented 2019-03-24 22:23:01 +00:00 (Migrated from github.com)
Review

What about:

const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
What about: ```js const KreditsKit = artifacts.require('KreditsKit') const kreditsKitFile = 'KreditsKit.json' // ... let addresseFile = path.join(addressesPath, kreditsKitFile); ```
fsmanuel commented 2019-03-27 11:38:31 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
raucao commented 2019-03-27 11:39:55 +00:00 (Migrated from github.com)
Review

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)
resolve(network);
fsmanuel commented 2019-03-24 22:23:01 +00:00 (Migrated from github.com)
Review

What about:

const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
What about: ```js const KreditsKit = artifacts.require('KreditsKit') const kreditsKitFile = 'KreditsKit.json' // ... let addresseFile = path.join(addressesPath, kreditsKitFile); ```
fsmanuel commented 2019-03-27 11:38:31 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
raucao commented 2019-03-27 11:39:55 +00:00 (Migrated from github.com)
Review

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)
}
fsmanuel commented 2019-03-24 22:23:01 +00:00 (Migrated from github.com)
Review

What about:

const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
What about: ```js const KreditsKit = artifacts.require('KreditsKit') const kreditsKitFile = 'KreditsKit.json' // ... let addresseFile = path.join(addressesPath, kreditsKitFile); ```
fsmanuel commented 2019-03-27 11:38:31 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
raucao commented 2019-03-27 11:39:55 +00:00 (Migrated from github.com)
Review

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)
})
fsmanuel commented 2019-03-24 22:23:01 +00:00 (Migrated from github.com)
Review

What about:

const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
What about: ```js const KreditsKit = artifacts.require('KreditsKit') const kreditsKitFile = 'KreditsKit.json' // ... let addresseFile = path.join(addressesPath, kreditsKitFile); ```
fsmanuel commented 2019-03-27 11:38:31 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
raucao commented 2019-03-27 11:39:55 +00:00 (Migrated from github.com)
Review

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)
})
fsmanuel commented 2019-03-24 22:23:01 +00:00 (Migrated from github.com)
Review

What about:

const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
What about: ```js const KreditsKit = artifacts.require('KreditsKit') const kreditsKitFile = 'KreditsKit.json' // ... let addresseFile = path.join(addressesPath, kreditsKitFile); ```
fsmanuel commented 2019-03-27 11:38:31 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
raucao commented 2019-03-27 11:39:55 +00:00 (Migrated from github.com)
Review

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)
const networkId = await networkPromise;
fsmanuel commented 2019-03-24 22:23:01 +00:00 (Migrated from github.com)
Review

What about:

const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
What about: ```js const KreditsKit = artifacts.require('KreditsKit') const kreditsKitFile = 'KreditsKit.json' // ... let addresseFile = path.join(addressesPath, kreditsKitFile); ```
fsmanuel commented 2019-03-27 11:38:31 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
raucao commented 2019-03-27 11:39:55 +00:00 (Migrated from github.com)
Review

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)
const networkId = await getNetworkId(web3)
fsmanuel commented 2019-03-24 22:23:01 +00:00 (Migrated from github.com)
Review

What about:

const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
What about: ```js const KreditsKit = artifacts.require('KreditsKit') const kreditsKitFile = 'KreditsKit.json' // ... let addresseFile = path.join(addressesPath, kreditsKitFile); ```
fsmanuel commented 2019-03-27 11:38:31 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
raucao commented 2019-03-27 11:39:55 +00:00 (Migrated from github.com)
Review

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)
console.log(`Deploying to networkId: ${networkId}`)
if (!ensAddr) {

fsmanuel commented 2019-03-24 22:23:01 +00:00 (Migrated from github.com)
Review

What about:

const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
What about: ```js const KreditsKit = artifacts.require('KreditsKit') const kreditsKitFile = 'KreditsKit.json' // ... let addresseFile = path.join(addressesPath, kreditsKitFile); ```
fsmanuel commented 2019-03-24 22:23:01 +00:00 (Migrated from github.com)
Review

What about:

const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
What about: ```js const KreditsKit = artifacts.require('KreditsKit') const kreditsKitFile = 'KreditsKit.json' // ... let addresseFile = path.join(addressesPath, kreditsKitFile); ```
fsmanuel commented 2019-03-27 11:38:31 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
fsmanuel commented 2019-03-27 11:38:31 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
raucao commented 2019-03-27 11:39:55 +00:00 (Migrated from github.com)
Review

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)
raucao commented 2019-03-27 11:39:55 +00:00 (Migrated from github.com)
Review

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)

Have you tried the new suggestion feature in these comments? It's pretty useful! (And you'll be credited in the commit.)

View File

@ -2,23 +2,14 @@ const fs = require('fs');
fsmanuel commented 2019-03-24 22:27:22 +00:00 (Migrated from github.com)
Review

Haha, make a function to update the addresseFile.

Haha, make a function to update the `addresseFile`.
fsmanuel commented 2019-03-24 22:27:22 +00:00 (Migrated from github.com)
Review

Haha, make a function to update the addresseFile.

Haha, make a function to update the `addresseFile`.
bumi commented 2019-03-26 23:44:31 +00:00 (Migrated from github.com)
Review

yep, did that now finally. and added a `helpers' directory...
do you have a good name for that file/function that injects that data based on the networkId?

yep, did that now finally. and added a `helpers' directory... do you have a good name for that file/function that injects that data based on the networkId?
bumi commented 2019-03-26 23:44:31 +00:00 (Migrated from github.com)
Review

yep, did that now finally. and added a `helpers' directory...
do you have a good name for that file/function that injects that data based on the networkId?

yep, did that now finally. and added a `helpers' directory... do you have a good name for that file/function that injects that data based on the networkId?
fsmanuel commented 2019-03-27 11:27:22 +00:00 (Migrated from github.com)
Review

I was thinking about updateAddresses but as it also updates IDs I think fileInject works fine.

I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
fsmanuel commented 2019-03-27 11:27:22 +00:00 (Migrated from github.com)
Review

I was thinking about updateAddresses but as it also updates IDs I think fileInject works fine.

I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
fsmanuel commented 2019-03-27 11:39:07 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
fsmanuel commented 2019-03-27 11:39:07 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
const path = require('path');
const fileInject = require('./helpers/file_inject.js');
const getNetworkId = require('./helpers/networkid.js');
fsmanuel commented 2019-03-24 22:27:22 +00:00 (Migrated from github.com)
Review

Haha, make a function to update the addresseFile.

Haha, make a function to update the `addresseFile`.
bumi commented 2019-03-26 23:44:31 +00:00 (Migrated from github.com)
Review

yep, did that now finally. and added a `helpers' directory...
do you have a good name for that file/function that injects that data based on the networkId?

yep, did that now finally. and added a `helpers' directory... do you have a good name for that file/function that injects that data based on the networkId?
fsmanuel commented 2019-03-27 11:27:22 +00:00 (Migrated from github.com)
Review

I was thinking about updateAddresses but as it also updates IDs I think fileInject works fine.

I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
fsmanuel commented 2019-03-27 11:39:07 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
const addressesPath = path.join(__dirname, '..', 'lib/addresses');
const KreditsKit = artifacts.require('KreditsKit')
module.exports = async function(callback) {
// load networkId; will change with updated truffle
fsmanuel commented 2019-03-24 22:27:22 +00:00 (Migrated from github.com)
Review

Haha, make a function to update the addresseFile.

Haha, make a function to update the `addresseFile`.
bumi commented 2019-03-26 23:44:31 +00:00 (Migrated from github.com)
Review

yep, did that now finally. and added a `helpers' directory...
do you have a good name for that file/function that injects that data based on the networkId?

yep, did that now finally. and added a `helpers' directory... do you have a good name for that file/function that injects that data based on the networkId?
fsmanuel commented 2019-03-27 11:27:22 +00:00 (Migrated from github.com)
Review

I was thinking about updateAddresses but as it also updates IDs I think fileInject works fine.

I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
fsmanuel commented 2019-03-27 11:39:07 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
const networkPromise = new Promise((resolve, reject) => {
fsmanuel commented 2019-03-24 22:27:22 +00:00 (Migrated from github.com)
Review

Haha, make a function to update the addresseFile.

Haha, make a function to update the `addresseFile`.
bumi commented 2019-03-26 23:44:31 +00:00 (Migrated from github.com)
Review

yep, did that now finally. and added a `helpers' directory...
do you have a good name for that file/function that injects that data based on the networkId?

yep, did that now finally. and added a `helpers' directory... do you have a good name for that file/function that injects that data based on the networkId?
fsmanuel commented 2019-03-27 11:27:22 +00:00 (Migrated from github.com)
Review

I was thinking about updateAddresses but as it also updates IDs I think fileInject works fine.

I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
fsmanuel commented 2019-03-27 11:39:07 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
web3.version.getNetwork((err, network) => {
fsmanuel commented 2019-03-24 22:27:22 +00:00 (Migrated from github.com)
Review

Haha, make a function to update the addresseFile.

Haha, make a function to update the `addresseFile`.
bumi commented 2019-03-26 23:44:31 +00:00 (Migrated from github.com)
Review

yep, did that now finally. and added a `helpers' directory...
do you have a good name for that file/function that injects that data based on the networkId?

yep, did that now finally. and added a `helpers' directory... do you have a good name for that file/function that injects that data based on the networkId?
fsmanuel commented 2019-03-27 11:27:22 +00:00 (Migrated from github.com)
Review

I was thinking about updateAddresses but as it also updates IDs I think fileInject works fine.

I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
fsmanuel commented 2019-03-27 11:39:07 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
if (err) {
fsmanuel commented 2019-03-24 22:27:22 +00:00 (Migrated from github.com)
Review

Haha, make a function to update the addresseFile.

Haha, make a function to update the `addresseFile`.
bumi commented 2019-03-26 23:44:31 +00:00 (Migrated from github.com)
Review

yep, did that now finally. and added a `helpers' directory...
do you have a good name for that file/function that injects that data based on the networkId?

yep, did that now finally. and added a `helpers' directory... do you have a good name for that file/function that injects that data based on the networkId?
fsmanuel commented 2019-03-27 11:27:22 +00:00 (Migrated from github.com)
Review

I was thinking about updateAddresses but as it also updates IDs I think fileInject works fine.

I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
fsmanuel commented 2019-03-27 11:39:07 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
reject(err);
fsmanuel commented 2019-03-24 22:27:22 +00:00 (Migrated from github.com)
Review

Haha, make a function to update the addresseFile.

Haha, make a function to update the `addresseFile`.
bumi commented 2019-03-26 23:44:31 +00:00 (Migrated from github.com)
Review

yep, did that now finally. and added a `helpers' directory...
do you have a good name for that file/function that injects that data based on the networkId?

yep, did that now finally. and added a `helpers' directory... do you have a good name for that file/function that injects that data based on the networkId?
fsmanuel commented 2019-03-27 11:27:22 +00:00 (Migrated from github.com)
Review

I was thinking about updateAddresses but as it also updates IDs I think fileInject works fine.

I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
fsmanuel commented 2019-03-27 11:39:07 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
} else {
fsmanuel commented 2019-03-24 22:27:22 +00:00 (Migrated from github.com)
Review

Haha, make a function to update the addresseFile.

Haha, make a function to update the `addresseFile`.
bumi commented 2019-03-26 23:44:31 +00:00 (Migrated from github.com)
Review

yep, did that now finally. and added a `helpers' directory...
do you have a good name for that file/function that injects that data based on the networkId?

yep, did that now finally. and added a `helpers' directory... do you have a good name for that file/function that injects that data based on the networkId?
fsmanuel commented 2019-03-27 11:27:22 +00:00 (Migrated from github.com)
Review

I was thinking about updateAddresses but as it also updates IDs I think fileInject works fine.

I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
fsmanuel commented 2019-03-27 11:39:07 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
resolve(network);
fsmanuel commented 2019-03-24 22:27:22 +00:00 (Migrated from github.com)
Review

Haha, make a function to update the addresseFile.

Haha, make a function to update the `addresseFile`.
bumi commented 2019-03-26 23:44:31 +00:00 (Migrated from github.com)
Review

yep, did that now finally. and added a `helpers' directory...
do you have a good name for that file/function that injects that data based on the networkId?

yep, did that now finally. and added a `helpers' directory... do you have a good name for that file/function that injects that data based on the networkId?
fsmanuel commented 2019-03-27 11:27:22 +00:00 (Migrated from github.com)
Review

I was thinking about updateAddresses but as it also updates IDs I think fileInject works fine.

I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
fsmanuel commented 2019-03-27 11:39:07 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
}
fsmanuel commented 2019-03-24 22:27:22 +00:00 (Migrated from github.com)
Review

Haha, make a function to update the addresseFile.

Haha, make a function to update the `addresseFile`.
bumi commented 2019-03-26 23:44:31 +00:00 (Migrated from github.com)
Review

yep, did that now finally. and added a `helpers' directory...
do you have a good name for that file/function that injects that data based on the networkId?

yep, did that now finally. and added a `helpers' directory... do you have a good name for that file/function that injects that data based on the networkId?
fsmanuel commented 2019-03-27 11:27:22 +00:00 (Migrated from github.com)
Review

I was thinking about updateAddresses but as it also updates IDs I think fileInject works fine.

I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
fsmanuel commented 2019-03-27 11:39:07 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
})
fsmanuel commented 2019-03-24 22:27:22 +00:00 (Migrated from github.com)
Review

Haha, make a function to update the addresseFile.

Haha, make a function to update the `addresseFile`.
bumi commented 2019-03-26 23:44:31 +00:00 (Migrated from github.com)
Review

yep, did that now finally. and added a `helpers' directory...
do you have a good name for that file/function that injects that data based on the networkId?

yep, did that now finally. and added a `helpers' directory... do you have a good name for that file/function that injects that data based on the networkId?
fsmanuel commented 2019-03-27 11:27:22 +00:00 (Migrated from github.com)
Review

I was thinking about updateAddresses but as it also updates IDs I think fileInject works fine.

I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
fsmanuel commented 2019-03-27 11:39:07 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
})
fsmanuel commented 2019-03-24 22:27:22 +00:00 (Migrated from github.com)
Review

Haha, make a function to update the addresseFile.

Haha, make a function to update the `addresseFile`.
bumi commented 2019-03-26 23:44:31 +00:00 (Migrated from github.com)
Review

yep, did that now finally. and added a `helpers' directory...
do you have a good name for that file/function that injects that data based on the networkId?

yep, did that now finally. and added a `helpers' directory... do you have a good name for that file/function that injects that data based on the networkId?
fsmanuel commented 2019-03-27 11:27:22 +00:00 (Migrated from github.com)
Review

I was thinking about updateAddresses but as it also updates IDs I think fileInject works fine.

I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
fsmanuel commented 2019-03-27 11:39:07 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
const networkId = await networkPromise;
fsmanuel commented 2019-03-24 22:27:22 +00:00 (Migrated from github.com)
Review

Haha, make a function to update the addresseFile.

Haha, make a function to update the `addresseFile`.
bumi commented 2019-03-26 23:44:31 +00:00 (Migrated from github.com)
Review

yep, did that now finally. and added a `helpers' directory...
do you have a good name for that file/function that injects that data based on the networkId?

yep, did that now finally. and added a `helpers' directory... do you have a good name for that file/function that injects that data based on the networkId?
fsmanuel commented 2019-03-27 11:27:22 +00:00 (Migrated from github.com)
Review

I was thinking about updateAddresses but as it also updates IDs I think fileInject works fine.

I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
fsmanuel commented 2019-03-27 11:39:07 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
const networkId = await getNetworkId(web3)
fsmanuel commented 2019-03-24 22:27:22 +00:00 (Migrated from github.com)
Review

Haha, make a function to update the addresseFile.

Haha, make a function to update the `addresseFile`.
bumi commented 2019-03-26 23:44:31 +00:00 (Migrated from github.com)
Review

yep, did that now finally. and added a `helpers' directory...
do you have a good name for that file/function that injects that data based on the networkId?

yep, did that now finally. and added a `helpers' directory... do you have a good name for that file/function that injects that data based on the networkId?
fsmanuel commented 2019-03-27 11:27:22 +00:00 (Migrated from github.com)
Review

I was thinking about updateAddresses but as it also updates IDs I think fileInject works fine.

I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
fsmanuel commented 2019-03-27 11:39:07 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
console.log(`Deploying to networkId: ${networkId}`)
let kitAddresseFile = path.join(addressesPath, 'KreditsKit.json');

fsmanuel commented 2019-03-24 22:27:22 +00:00 (Migrated from github.com)
Review

Haha, make a function to update the addresseFile.

Haha, make a function to update the `addresseFile`.
fsmanuel commented 2019-03-24 22:27:22 +00:00 (Migrated from github.com)
Review

Haha, make a function to update the addresseFile.

Haha, make a function to update the `addresseFile`.
bumi commented 2019-03-26 23:44:31 +00:00 (Migrated from github.com)
Review

yep, did that now finally. and added a `helpers' directory...
do you have a good name for that file/function that injects that data based on the networkId?

yep, did that now finally. and added a `helpers' directory... do you have a good name for that file/function that injects that data based on the networkId?
bumi commented 2019-03-26 23:44:31 +00:00 (Migrated from github.com)
Review

yep, did that now finally. and added a `helpers' directory...
do you have a good name for that file/function that injects that data based on the networkId?

yep, did that now finally. and added a `helpers' directory... do you have a good name for that file/function that injects that data based on the networkId?
fsmanuel commented 2019-03-27 11:27:22 +00:00 (Migrated from github.com)
Review

I was thinking about updateAddresses but as it also updates IDs I think fileInject works fine.

I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
fsmanuel commented 2019-03-27 11:27:22 +00:00 (Migrated from github.com)
Review

I was thinking about updateAddresses but as it also updates IDs I think fileInject works fine.

I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
fsmanuel commented 2019-03-27 11:39:07 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
fsmanuel commented 2019-03-27 11:39:07 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`

View File

@ -1,15 +1,16 @@
const path = require('path');
const each = require('async-each-series');
const ethers = require('ethers');
const Kredits = require('../lib/kredits');
fsmanuel commented 2019-03-27 11:40:16 +00:00 (Migrated from github.com)
Review

const networkId = await getNetworkId(web3);

`const networkId = await getNetworkId(web3);`
const getNetworkId = require('./helpers/networkid.js')
const seeds = require(path.join(__dirname, '..', '/config/seeds.js'));
const ethers = require('ethers');
const Kredits = require('../lib/kredits');
const each = require('async-each-series');
module.exports = async function(callback) {
const networkId = parseInt(web3.version.network);
const networkId = await getNetworkId(web3)
const provider = new ethers.providers.Web3Provider(
web3.currentProvider, { chainId: networkId }
web3.currentProvider, { chainId: parseInt(networkId) }
);
const kredits = await new Kredits(provider, provider.getSigner()).init();