Refactor kredits related configuration in arapp.json
we use an environment specific entry for the daoAddress. Locally we deploy our own, but for rinkeby and other public networks we use the official entries. To make deployments easy we store the address in the arapp.json
This commit is contained in:
parent
190d3b77d5
commit
3db89b0fa3
10
README.md
10
README.md
@ -170,8 +170,14 @@ Deploys a new KreditsKit that allows to create a new DAO
|
||||
or
|
||||
$ npm run deploy:kit
|
||||
|
||||
`ENS` address is required as environment variable.
|
||||
`DAO_FACTORY` can optionally be set as environment variable. (see aragon)
|
||||
#### Kredits configuration options:
|
||||
|
||||
Configuration options can be set in an environment specific `kredits` object in the `arapp.json` or using a CLI parameter.
|
||||
|
||||
* daoFactory: Ethereum address of the used DAO Factory. On public networks we use [official aragon factories](https://github.com/aragon/deployments/tree/master/environments/)
|
||||
* apmDomain: the ENS domain of the aragonPM (normally `open.aragonpm.eth`)
|
||||
|
||||
(please also see the [arapp.json related configuration options](https://hack.aragon.org/docs/cli-global-confg#the-arappjson-file))
|
||||
|
||||
### new-dao.js
|
||||
|
||||
|
@ -41,8 +41,10 @@
|
||||
"network": "rinkeby",
|
||||
"registry": "0x98Df287B6C145399Aaa709692c8D308357bC085D",
|
||||
"wsRPC": "wss://rinkeby.eth.aragon.network/ws",
|
||||
"daoFactory": "0x2298d27a9b847c681d2b2c2828ab9d79013f5f1d",
|
||||
"appName": "dummy.open.aragonpm.eth"
|
||||
"appName": "dummy.open.aragonpm.eth",
|
||||
"kredits": {
|
||||
"daoFactory": "0x2298d27a9b847c681d2b2c2828ab9d79013f5f1d"
|
||||
}
|
||||
},
|
||||
"kovan": {
|
||||
"network": "kovan",
|
||||
|
@ -13,9 +13,18 @@ const KreditsKit = artifacts.require('KreditsKit')
|
||||
|
||||
const arapp = require('../arapp.json')
|
||||
const environment = argv['network'] || argv['environment'] || 'development'
|
||||
const apm = arapp.environments[environment].apm || 'open.aragonpm.eth'
|
||||
const ensAddr = arapp.environments[environment].registry || process.env.ENS
|
||||
const daoFactoryAddress = arapp.environments[environment].daoFactory || process.env.DAO_FACTORY
|
||||
|
||||
const kreditsArappConfig = (arapp.environments[environment].kredits || {}
|
||||
|
||||
// typically we use the open.aragonpm.eth aragonpm.
|
||||
const apm = kreditsArappConfig.apmDomain || argv['apmDomain'] || 'open.aragonpm.eth'
|
||||
|
||||
// daoFactory is environment specific.
|
||||
// See https://github.com/aragon/deployments/tree/master/environments/ for the official daoFactory
|
||||
// Locally we deploy our own daoFactory and no daoFactory is required (`daoFactoryAddress` is null).
|
||||
const daoFactoryAddress = kreditsArappConfig.daoFactory || argv['daoFactory']
|
||||
|
||||
const ensAddr = arapp.environments[environment].registry || argv['ensAddress']
|
||||
|
||||
|
||||
module.exports = async function(callback) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user