Build on aragonOS #62
@ -14,11 +14,11 @@
|
||||
"environments": {
|
||||
"default": {
|
||||
"network": "development",
|
||||
"appName": "contribution.aragonpm.eth"
|
||||
"appName": "kredits-contribution.open.aragonpm.eth"
|
||||
},
|
||||
"staging": {
|
||||
"rinkeby": {
|
||||
"registry": "0x98df287b6c145399aaa709692c8d308357bc085d",
|
||||
"appName": "contribution.open.aragonpm.eth",
|
||||
"appName": "kredits-contribution.open.aragonpm.eth",
|
||||
"wsRPC": "wss://rinkeby.eth.aragon.network/ws",
|
||||
"network": "rinkeby"
|
||||
},
|
||||
|
||||
@ -11,7 +11,7 @@ contract Contribution is AragonApp {
|
||||
bytes32 public constant ADD_CONTRIBUTION_ROLE = keccak256("ADD_CONTRIBUTION_ROLE");
|
||||
|
||||
bytes32 public constant KERNEL_APP_ADDR_NAMESPACE = 0xd6f028ca0e8edb4a8c9757ca4fdccab25fa1e0317da1188108f7d2dee14902fb;
|
||||
bytes32 public constant TOKEN_APP_ID = 0xe04a882e7a6adf5603207d545ea49aec17e6b936c4d9eae3d74dbe482264991a;
|
||||
bytes32 public constant TOKEN_APP_ID = 0x82c0e483537d703bb6f0fc799d2cc60d8f62edcb0f6d26d5571a92be8485b112;
|
||||
|
||||
struct ContributionData {
|
||||
address contributor;
|
||||
|
||||
@ -9,11 +9,11 @@
|
||||
"environments": {
|
||||
"default": {
|
||||
"network": "development",
|
||||
"appName": "contributor.aragonpm.eth"
|
||||
"appName": "kredits-contributor.open.aragonpm.eth"
|
||||
},
|
||||
"staging": {
|
||||
"rinkeby": {
|
||||
"registry": "0x98df287b6c145399aaa709692c8d308357bc085d",
|
||||
"appName": "contributor.open.aragonpm.eth",
|
||||
"appName": "kredits-contributor.open.aragonpm.eth",
|
||||
"wsRPC": "wss://rinkeby.eth.aragon.network/ws",
|
||||
"network": "rinkeby"
|
||||
},
|
||||
|
||||
@ -9,26 +9,16 @@
|
||||
"name": "Vote proposals",
|
||||
"id": "VOTE_PROPOSAL_ROLE",
|
||||
"params": []
|
||||
},
|
||||
{
|
||||
"name": "Add contribution",
|
||||
"id": "ADD_CONTRIBUTION_ROLE",
|
||||
"params": []
|
||||
},
|
||||
{
|
||||
"name": "Manage contributors",
|
||||
"id": "MANAGE_CONTRIBUTORS_ROLE",
|
||||
"params": []
|
||||
}
|
||||
],
|
||||
"environments": {
|
||||
"default": {
|
||||
"network": "development",
|
||||
"appName": "proposal.aragonpm.eth"
|
||||
"appName": "kredits-proposal.open.aragonpm.eth"
|
||||
},
|
||||
"staging": {
|
||||
"rinkeby": {
|
||||
"registry": "0x98df287b6c145399aaa709692c8d308357bc085d",
|
||||
"appName": "proposal.open.aragonpm.eth",
|
||||
"appName": "kredits-proposal.open.aragonpm.eth",
|
||||
"wsRPC": "wss://rinkeby.eth.aragon.network/ws",
|
||||
"network": "rinkeby"
|
||||
},
|
||||
|
||||
@ -19,8 +19,8 @@ contract Proposal is AragonApp {
|
||||
bytes32 public constant VOTE_PROPOSAL_ROLE = keccak256("VOTE_PROPOSAL_ROLE");
|
||||
|
||||
bytes32 public constant KERNEL_APP_ADDR_NAMESPACE = 0xd6f028ca0e8edb4a8c9757ca4fdccab25fa1e0317da1188108f7d2dee14902fb;
|
||||
bytes32 public constant CONTRIBUTOR_APP_ID = 0xe9140f1e39c8a1d04167c3b710688a3eecea2976f34735c8eb98956f4764635b;
|
||||
bytes32 public constant CONTRIBUTION_APP_ID = 0x7fcf91283b719b30c2fa954ff0da021e1b91aed09d7aa13df5e8078a4a1007eb;
|
||||
bytes32 public constant CONTRIBUTOR_APP_ID = 0x8e50972b062e83b48dbb2a68d8a058f2a07227ca183c144dc974e6da3186d7e9;
|
||||
bytes32 public constant CONTRIBUTION_APP_ID = 0x09f5274cba299b46c5be722ef672d10eef7a2ef980b612aef529d74fb9da7643;
|
||||
|
||||
struct Proposal {
|
||||
address creatorAccount;
|
||||
|
||||
@ -9,17 +9,17 @@
|
||||
"environments": {
|
||||
"default": {
|
||||
"network": "development",
|
||||
"appName": "token.aragonpm.eth"
|
||||
"appName": "kredits-token.open.aragonpm.eth"
|
||||
},
|
||||
"staging": {
|
||||
"rinkeby": {
|
||||
"registry": "0x98df287b6c145399aaa709692c8d308357bc085d",
|
||||
"appName": "token.open.aragonpm.eth",
|
||||
"appName": "kredits-token.open.aragonpm.eth",
|
||||
"wsRPC": "wss://rinkeby.eth.aragon.network/ws",
|
||||
"network": "rinkeby"
|
||||
},
|
||||
"production": {
|
||||
"mainnet": {
|
||||
"registry": "0x314159265dd8dbb310642f98f50c066173c1259b",
|
||||
"appName": "token.open.aragonpm.eth",
|
||||
"appName": "kredits-token.open.aragonpm.eth",
|
||||
"wsRPC": "wss://mainnet.eth.aragon.network/ws",
|
||||
"network": "mainnet"
|
||||
}
|
||||
|
||||
19
arapp.json
@ -27,23 +27,28 @@
|
||||
}
|
||||
],
|
||||
"environments": {
|
||||
"rinkeby": {
|
||||
"wsRPC": "wss://rinkeby.eth.aragon.network/ws",
|
||||
"registry": "0x98Df287B6C145399Aaa709692c8D308357bC085D",
|
||||
"appName": "dummy.open.aragonpm.eth",
|
||||
"network": "rinkeby"
|
||||
},
|
||||
"development": {
|
||||
"network": "development",
|
||||
"apm": "aragonpm.eth",
|
||||
"registry": "0x5f6f7e8cc7346a11ca2def8f827b7a0b612c56a1",
|
||||
"appName": "dummy.aragonpm.eth"
|
||||
},
|
||||
"rinkeby": {
|
||||
"network": "rinkeby",
|
||||
"registry": "0x98Df287B6C145399Aaa709692c8D308357bC085D",
|
||||
"wsRPC": "wss://rinkeby.eth.aragon.network/ws",
|
||||
"daoFactory": "0x2298d27a9b847c681d2b2c2828ab9d79013f5f1d",
|
||||
"appName": "dummy.open.aragonpm.eth",
|
||||
"apm": "open.aragonpm.eth"
|
||||
},
|
||||
"kovan": {
|
||||
"network": "kovan",
|
||||
"appName": "dummy.aragonpm.eth"
|
||||
},
|
||||
"default": {
|
||||
"network": "development",
|
||||
"appName": "dummy.aragonpm.eth"
|
||||
"appName": "dummy.aragonpm.eth",
|
||||
"apm": "open.aragonpm.eth"
|
||||
}
|
||||
},
|
||||
"path": "contracts/misc/DummyApp.sol"
|
||||
|
||||
@ -3,27 +3,26 @@ pragma solidity 0.4.24;
|
||||
import "@aragon/os/contracts/apps/AragonApp.sol";
|
||||
import "@aragon/os/contracts/kernel/Kernel.sol";
|
||||
import "@aragon/os/contracts/acl/ACL.sol";
|
||||
import "@aragon/os/contracts/acl/ACLSyntaxSugar.sol";
|
||||
|
||||
import "@aragon/kits-base/contracts/KitBase.sol";
|
||||
import "./misc/APMNamehashOpen.sol";
|
||||
|
||||
import "../apps/contribution/contracts/Contribution.sol";
|
||||
import "../apps/contributor/contracts/Contributor.sol";
|
||||
import "../apps/token/contracts/Token.sol";
|
||||
import "../apps/proposal/contracts/Proposal.sol";
|
||||
|
||||
contract KreditsKit is KitBase, APMNamehashOpen, ACLSyntaxSugar {
|
||||
bytes32 public contributorAppId = apmNamehash("contributor"); // 0xe9140f1e39c8a1d04167c3b710688a3eecea2976f34735c8eb98956f4764635b
|
||||
bytes32 public contributionAppId = apmNamehash("contribution"); // 0x7fcf91283b719b30c2fa954ff0da021e1b91aed09d7aa13df5e8078a4a1007eb
|
||||
bytes32 public tokenAppId = apmNamehash("token"); // 0xe04a882e7a6adf5603207d545ea49aec17e6b936c4d9eae3d74dbe482264991a
|
||||
bytes32 public proposalAppId = apmNamehash("proposal"); // 0xaf5fe5c3b0d9581ee88974bbc8699e6fa71efd1b321e44b2227103c9ef21dbdb
|
||||
contract KreditsKit is KitBase {
|
||||
|
||||
// ensure alphabetic order
|
||||
enum Apps { Contribution, Contributor, Proposal, Token }
|
||||
bytes32[4] public appIds;
|
||||
|
||||
|
|
||||
event DeployInstance(address dao);
|
||||
event InstalledApp(address dao, address appProxy, bytes32 appId);
|
||||
|
||||
constructor (DAOFactory _fac, ENS _ens) public KitBase(_fac, _ens) {}
|
||||
constructor (DAOFactory _fac, ENS _ens, bytes32[4] _appIds) public KitBase(_fac, _ens) {
|
||||
appIds = _appIds;
|
||||
}
|
||||
|
||||
function newInstance() public returns (Kernel dao) {
|
||||
address root = msg.sender;
|
||||
@ -32,17 +31,17 @@ contract KreditsKit is KitBase, APMNamehashOpen, ACLSyntaxSugar {
|
||||
|
||||
acl.createPermission(this, dao, dao.APP_MANAGER_ROLE(), this);
|
||||
|
||||
Contributor contributor = Contributor(_installApp(dao, contributorAppId));
|
||||
Contributor contributor = Contributor(_installApp(dao, appIds[uint8(Apps.Contributor)]));
|
||||
contributor.initialize(root);
|
||||
acl.createPermission(root, contributor, contributor.MANAGE_CONTRIBUTORS_ROLE(), root);
|
||||
|
||||
Token token = Token(_installApp(dao, tokenAppId));
|
||||
Token token = Token(_installApp(dao, appIds[uint8(Apps.Token)]));
|
||||
token.initialize();
|
||||
|
||||
Contribution contribution = Contribution(_installApp(dao, contributionAppId));
|
||||
Contribution contribution = Contribution(_installApp(dao, appIds[uint8(Apps.Contribution)]));
|
||||
contribution.initialize();
|
||||
|
||||
Proposal proposal = Proposal(_installApp(dao, proposalAppId));
|
||||
Proposal proposal = Proposal(_installApp(dao, appIds[uint8(Apps.Proposal)]));
|
||||
proposal.initialize();
|
||||
|
||||
acl.createPermission(root, contribution, contribution.ADD_CONTRIBUTION_ROLE(), this);
|
||||
|
||||
19
deployments/rinkeby/contribution.md
Normal file
@ -0,0 +1,19 @@
|
||||
# Contribution deployments
|
||||
|
||||
## 2019-03-25
|
||||
|
||||
### v2.0.0 updated appid hashes
|
||||
from account: 0x18f6d06de7e6d556b1bbb5875f8cfafb5eaef9c5
|
||||
✔ Successfully published kredits-contribution.open.aragonpm.eth v2.0.0:
|
||||
ℹ Contract address: 0x2765F13d82B83C0C9d770715e1fB376ab01C0361
|
||||
ℹ Content (ipfs): QmYiv1cMh6cj8pcbmaTUAWxf93k4UhN8mPJWeqEo7BEkMx
|
||||
ℹ Transaction hash: 0xe4841a6552527c8fbeb6aa44769f95ce60d99413958c6289f67e8ec83823ee96
|
||||
|
||||
|
||||
### v1.0.0
|
||||
from account: 0x18f6d06de7e6d556b1bbb5875f8cfafb5eaef9c5
|
||||
✔ Successfully published kredits-contribution.open.aragonpm.eth v1.0.0:
|
||||
ℹ Contract address: 0x1F460107361047064d982f61002D1BdEb02Ce705
|
||||
ℹ Content (ipfs): QmQ6rTWCGcseCmGb6thYG2kwijHk6W84qaFPeftZ4bUY2k
|
||||
ℹ Transaction hash: 0xeee90c5d18a8cb8ac845f52a4202cd62b27c23b4251b69c3681a854786b6e336
|
||||
|
||||
9
deployments/rinkeby/contributor.md
Normal file
@ -0,0 +1,9 @@
|
||||
# Contributor deployments
|
||||
|
||||
## 2019-03-25
|
||||
from account: 0x18f6d06de7e6d556b1bbb5875f8cfafb5eaef9c5
|
||||
✔ Successfully published kredits-contributor.open.aragonpm.eth v1.0.0:
|
||||
ℹ Contract address: 0x6D80EFEE6F9A40AA86Ef7c4C95c8b2e453d260fb
|
||||
ℹ Content (ipfs): QmbGSQPwi3AXHjDFG2fkMpJrBJLtyuaA6DVPMkFTfMpksn
|
||||
ℹ Transaction hash: 0x26376c59dfdb617c35b740a0f110bf3040cdad0103593cdc788267a84d9847b9
|
||||
|
||||
16
deployments/rinkeby/dao.md
Normal file
@ -0,0 +1,16 @@
|
||||
# Kredits deployment
|
||||
|
||||
### 2010-03-25
|
||||
|
||||
kredits/truffle-kredits@aragonos » aragon contracts exec scripts/new-dao.js --network=rinkeby
|
||||
ℹ Use of `--network` is deprecated and has been replaced with `--environment`. You may need to update your arapp.json
|
||||
ℹ Passing the command to Truffle
|
||||
Using network 'rinkeby'.
|
||||
|
||||
Deploying to networkId: 4
|
||||
Using KreditsKit at: 0xf4f3963718e5c2b426dd5c3ef0ab4b31ffb7a318
|
||||
|
||||
Created new DAO at: 0x8b7c0bec9476ce08d9769a87d272b03b350712e2
|
||||
|
||||
from account: 0x18f6d06de7e6d556b1bbb5875f8cfafb5eaef9c5
|
||||
https://rinkeby.etherscan.io/tx/0x4deb02b3740b3baa7735097d57c1456a5cb329ee741d123478fdb5114e2c305b
|
||||
39
deployments/rinkeby/kreditskit.md
Normal file
@ -0,0 +1,39 @@
|
||||
# KreditsKit deployments
|
||||
|
||||
## 2019-03-25
|
||||
|
||||
### fixed kit with correct appids
|
||||
|
||||
kredits/truffle-kredits@aragonos » aragon contracts exec scripts/deploy-kit.js --debug --network=rinkeby
|
||||
ℹ Use of `--network` is deprecated and has been replaced with `--environment`. You may need to update your arapp.json
|
||||
ℹ Passing the command to Truffle
|
||||
Using network 'rinkeby'.
|
||||
|
||||
Deploying to networkId: 4
|
||||
Using ENS at: 0x98Df287B6C145399Aaa709692c8D308357bC085D
|
||||
Using DAOFactory at: 0x2298d27a9b847c681d2b2c2828ab9d79013f5f1d
|
||||
Found apps: [contribution,contributor,proposal,token].open.aragonpm.eth
|
||||
Deployed KreditsKit at: 0xf4f3963718e5c2b426dd5c3ef0ab4b31ffb7a318
|
||||
|
||||
from account: 0x18f6d06de7e6d556b1bbb5875f8cfafb5eaef9c5
|
||||
|
||||
### test with fixed deploy script
|
||||
kredits/truffle-kredits@aragonos » ENS=0x98df287b6c145399aaa709692c8d308357bc085d DAO_FACTORY=0x2298d27a9b847c681d2b2c2828ab9d79013f5f1d truffle exec scripts/deploy-kit.js --network=rinkeby
|
||||
Using network 'rinkeby'.
|
||||
|
||||
Deploying to networkId: 4
|
||||
Using ENS at: 0x98df287b6c145399aaa709692c8d308357bc085d
|
||||
Using DAOFactory at: 0x2298d27a9b847c681d2b2c2828ab9d79013f5f1d
|
||||
Deployed KreditsKit at: 0x83afd3c99563fc467aec69e0187ffd53fc8faa76
|
||||
|
||||
### success
|
||||
kredits/truffle-kredits@aragonos » ENS=0x98df287b6c145399aaa709692c8d308357bc085d DAO_FACTORY=0x2298d27a9b847c681d2b2c2828ab9d79013f5f1d truffle exec scripts/deploy-kit.js --network=rinkeby
|
||||
Using network 'rinkeby'.
|
||||
|
||||
Using ENS at: 0x98df287b6c145399aaa709692c8d308357bc085d
|
||||
Using DAOFactory at: 0x2298d27a9b847c681d2b2c2828ab9d79013f5f1d
|
||||
Deployed KreditsKit at: 0x1fd2f9206addaf86f3ef921a3b7c84400374ba68
|
||||
|
||||
### deployment script error:
|
||||
deployment script failure at: https://rinkeby.etherscan.io/tx/0x3571b889b6b9b2b3f26dd0ee7fb82c7ece90b28d910078f2e06753d878832af4"
|
||||
|
||||
17
deployments/rinkeby/proposal.md
Normal file
@ -0,0 +1,17 @@
|
||||
# Proposal deployments
|
||||
|
||||
## 2019-03-25
|
||||
|
||||
### v2.0.0 updated appid hashes
|
||||
from account: 0x18f6d06de7e6d556b1bbb5875f8cfafb5eaef9c5
|
||||
✔ Successfully published kredits-proposal.open.aragonpm.eth v2.0.0:
|
||||
ℹ Contract address: 0x0a48dc5415f4d7A3B2B4a9aaD4A7a8775f923ce3
|
||||
ℹ Content (ipfs): QmZej9xPJN7aTiQ7SzWziRuzEjjfMzjPakcGYcoN8QQBMH
|
||||
ℹ Transaction hash: 0xf14c308b9f92b43a719fab2602c624dc2e11d0f629a0be9a6ec8ac47719ee9ca
|
||||
|
||||
### v1.0.0
|
||||
from account: 0x18f6d06de7e6d556b1bbb5875f8cfafb5eaef9c5
|
||||
✔ Successfully published kredits-proposal.open.aragonpm.eth v1.0.0:
|
||||
ℹ Contract address: 0xFc04eB3eF666507F96A22d330d8a852d8eC996EA
|
||||
ℹ Content (ipfs): QmRTzoYr7B5f8gDGY8RmoodJkMm59D4jSJLZNRnhAd4wCg
|
||||
ℹ Transaction hash: 0xce419d9d555551eefc624a7ac87c19b5d660eb9c4fe0da611cd5e28e3ee6844f
|
||||
8
deployments/rinkeby/token.md
Normal file
@ -0,0 +1,8 @@
|
||||
# Token deployments
|
||||
|
||||
## 2019-03-25
|
||||
from account: 0x18f6d06de7e6d556b1bbb5875f8cfafb5eaef9c5
|
||||
✔ Successfully published kredits-token.open.aragonpm.eth v1.0.0:
|
||||
ℹ Contract address: 0xB4147Be6d4bcC790c6CbD3d508354DDfd3EbC8e6
|
||||
ℹ Content (ipfs): QmQPue7WzQhaXbTLJwyZXSHaRY1u5ezWxyVmBP8bEgGoTE
|
||||
ℹ Transaction hash: 0xa7866d81e236adfeaff6bf2d5dbc9f9757fbc1b0ce689357901194913fe93a3b"
|
||||
@ -1 +1 @@
|
||||
{"55632786":"0x4d97bd8efacf46b33c4438ed0b7b6aabfa2359fb"}
|
||||
{"4":"0xf4f3963718e5c2b426dd5c3ef0ab4b31ffb7a318","14945560":"0x6e0745b6b18d0233708554049eeaab0cb81c4ab0","42097210":"0x15d7adc7d6283d57d45017512567985e3a768b83","51657314":"0x053e2ebaf79eb0ccc5139a40b2a3ddca79409cdc","55632786":"0x4d97bd8efacf46b33c4438ed0b7b6aabfa2359fb","84923523":"0x48c2eac33521070509f9819a824a3d5686ba5ce8"}
|
||||
@ -1 +1 @@
|
||||
|
I am wondering how I can prevent that those local address details get commited. I am wondering how I can prevent that those local address details get commited.
Those "14945560" network IDs are devchain IDs.
so far I don't think it is worth to write code for that and maybe simply try to ignore commiting those changes, but if somebody has an idea...?
I am wondering how I can prevent that those local address details get commited. I am wondering how I can prevent that those local address details get commited.
Those "14945560" network IDs are devchain IDs.
so far I don't think it is worth to write code for that and maybe simply try to ignore commiting those changes, but if somebody has an idea...?
Maybe a git pre commit hook would work. I have never worked with git hooks... Maybe a git pre commit hook would work. I have never worked with git hooks...
Maybe a git pre commit hook would work. I have never worked with git hooks... Maybe a git pre commit hook would work. I have never worked with git hooks...
Yes, I think that could be a good solution. Git hooks are pretty easy to work with actually. Yes, I think that could be a good solution. Git hooks are pretty easy to work with actually.
Yes, I think that could be a good solution. Git hooks are pretty easy to work with actually. Yes, I think that could be a good solution. Git hooks are pretty easy to work with actually.
hmm. the issue is locally you need those addresses in the file but in the repo we only need the commonly used ones. then it probably does not change that often... hmm. the issue is locally you need those addresses in the file but in the repo we only need the commonly used ones.
so what would the hook do?
then it probably does not change that often...
hmm. the issue is locally you need those addresses in the file but in the repo we only need the commonly used ones. then it probably does not change that often... hmm. the issue is locally you need those addresses in the file but in the repo we only need the commonly used ones.
so what would the hook do?
then it probably does not change that often...
|
||||
{"23827572":"0xe4e0e7fe54d9189df29a80c07ab733fc9a212761","55632786":"0x4fde16c57ddf6d4870d5edd599074bb50dc96f88","65047207":"0xb67567175ac213f6f622b23d3d972d5b877c4813"}
|
||||
|
I am wondering how I can prevent that those local address details get commited. I am wondering how I can prevent that those local address details get commited.
Those "14945560" network IDs are devchain IDs.
so far I don't think it is worth to write code for that and maybe simply try to ignore commiting those changes, but if somebody has an idea...?
Maybe a git pre commit hook would work. I have never worked with git hooks... Maybe a git pre commit hook would work. I have never worked with git hooks...
Yes, I think that could be a good solution. Git hooks are pretty easy to work with actually. Yes, I think that could be a good solution. Git hooks are pretty easy to work with actually.
hmm. the issue is locally you need those addresses in the file but in the repo we only need the commonly used ones. then it probably does not change that often... hmm. the issue is locally you need those addresses in the file but in the repo we only need the commonly used ones.
so what would the hook do?
then it probably does not change that often...
|
||||
{"4":"0x8b7c0bec9476ce08d9769a87d272b03b350712e2","14945560":"0x183af3950364390a266edff2a0e7c4c2f95c0691","23827572":"0xe4e0e7fe54d9189df29a80c07ab733fc9a212761","42097210":"0x183af3950364390a266edff2a0e7c4c2f95c0691","51657314":"0xad3a80686847d55d7b14b930bc6db53681ae1b1e","55632786":"0x4fde16c57ddf6d4870d5edd599074bb50dc96f88","65047207":"0xb67567175ac213f6f622b23d3d972d5b877c4813"}
|
||||
|
I am wondering how I can prevent that those local address details get commited. I am wondering how I can prevent that those local address details get commited.
Those "14945560" network IDs are devchain IDs.
so far I don't think it is worth to write code for that and maybe simply try to ignore commiting those changes, but if somebody has an idea...?
Maybe a git pre commit hook would work. I have never worked with git hooks... Maybe a git pre commit hook would work. I have never worked with git hooks...
Yes, I think that could be a good solution. Git hooks are pretty easy to work with actually. Yes, I think that could be a good solution. Git hooks are pretty easy to work with actually.
hmm. the issue is locally you need those addresses in the file but in the repo we only need the commonly used ones. then it probably does not change that often... hmm. the issue is locally you need those addresses in the file but in the repo we only need the commonly used ones.
so what would the hook do?
then it probably does not change that often...
|
||||
@ -10,10 +10,10 @@ class Kernel extends Base {
|
||||
|
||||
appNamehash(appName) {
|
||||
return {
|
||||
Contributor: '0xe9140f1e39c8a1d04167c3b710688a3eecea2976f34735c8eb98956f4764635b',
|
||||
Contribution: '0x7fcf91283b719b30c2fa954ff0da021e1b91aed09d7aa13df5e8078a4a1007eb',
|
||||
Token: '0xe04a882e7a6adf5603207d545ea49aec17e6b936c4d9eae3d74dbe482264991a',
|
||||
Proposal: '0xaf5fe5c3b0d9581ee88974bbc8699e6fa71efd1b321e44b2227103c9ef21dbdb'
|
||||
Contributor: '0x7829d33291d6e118d115ce321de9341894a2da120bd35505fc03b98f715c606d',
|
||||
Contribution: '0xe401b988b8af39119004de5c7691a60391d69d873b3120682a8c61306a4883ce',
|
||||
Token: '0x85b0f626cecde6188d11940904fedeb16a4d49b0e8c878b9d109b23d38062ca7',
|
||||
Proposal: '0x15d03d435b24a74317868c24fda4646302076b59272241a122a3868eb5c745da'
|
||||
}[appName];
|
||||
}
|
||||
}
|
||||
|
||||
5
package-lock.json
generated
@ -2856,7 +2856,6 @@
|
||||
"version": "2.0.8",
|
||||
"resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz",
|
||||
"integrity": "sha1-IprEbsqG1S4MmR58sq74P/D2i88=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"idna-uts46-hx": "^2.3.1",
|
||||
"js-sha3": "^0.5.7"
|
||||
@ -10146,7 +10145,6 @@
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz",
|
||||
"integrity": "sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"punycode": "2.1.0"
|
||||
},
|
||||
@ -10154,8 +10152,7 @@
|
||||
"punycode": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz",
|
||||
"integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=",
|
||||
"dev": true
|
||||
"integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -41,6 +41,7 @@
|
||||
"solc": "^0.4.25"
|
||||
},
|
||||
"dependencies": {
|
||||
"eth-ens-namehash": "^2.0.8",
|
||||
"ethers": "3.0.15",
|
||||
"ipfs-api": "^19.0.0",
|
||||
"rsvp": "^4.8.2"
|
||||
|
||||
@ -14,7 +14,7 @@ for dir in ./apps/*/; do
|
||||
set -x
|
||||
cd $dir
|
||||
npm install
|
||||
aragon apm publish major
|
||||
aragon apm publish major
|
||||
cd $rootDir
|
||||
set +x
|
||||
done
|
||||
|
||||
@ -2,15 +2,37 @@ const deployDAOFactory = require('@aragon/os/scripts/deploy-daofactory.js')
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
`const networkId = await getNetworkId(web3);`
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.)
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 fs = require('fs');
|
||||
const path = require('path');
|
||||
const argv = require('yargs').argv
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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.)
|
||||
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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 libPath = path.join(__dirname, '..', 'lib');
|
||||
const addressesPath = path.join(libPath, 'addresses');
|
||||
|
||||
const DAOFactory = artifacts.require('DAOFactory')
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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 KreditsKit = artifacts.require('KreditsKit')
|
||||
|
||||
const ensAddr = process.env.ENS
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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 daoFactoryAddress = process.env.DAO_FACTORY
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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 arapp = require('../arapp.json')
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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 environment = argv['network'] || argv['environment'] || 'development'
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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 apm = arapp.environments[environment].apm
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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 ensAddr = arapp.environments[environment].registry || process.env.ENS
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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 daoFactoryAddress = arapp.environments[environment].daoFactory || process.env.DAO_FACTORY
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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.)
|
||||
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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) {
|
||||
|
Are you a javascript pro, now? Are you a javascript pro, now?
a pro in being desperate :) 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
Much better with a normal function! Much better with a normal function!
|
||||
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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) => {
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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) => {
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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) {
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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);
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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 {
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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);
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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.)
|
||||
}
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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.)
|
||||
})
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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.)
|
||||
})
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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;
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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}`)
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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.)
|
||||
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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 (!ensAddr) {
|
||||
callback(new Error("ENS address not found in environment variable ENS"))
|
||||
}
|
||||
@ -24,16 +46,22 @@ module.exports = async function(callback) {
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
`const networkId = await getNetworkId(web3);`
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.)
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(`Using DAOFactory at: ${daoFactory.address}`)
|
||||
|
||||
let kreditsKit = await KreditsKit.new(daoFactory.address, ensAddr)
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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 apps = fs.readdirSync('./apps')
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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(`Found apps: [${apps}].${apm}`)
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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 appIds = apps.map(app => namehash(`kredits-${app}.${apm}`))
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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 = parseInt(web3.version.network);
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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.)
|
||||
KreditsKit.new(daoFactory.address, ensAddr, appIds).then((kreditsKit) => {
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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(`Deployed KreditsKit at: ${kreditsKit.address}`);
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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.)
|
||||
|
||||
let addresseFile = path.join(addressesPath, `KreditsKit.json`);
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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.)
|
||||
let addresses = JSON.parse(fs.readFileSync(addresseFile));
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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.)
|
||||
let addresseFile = path.join(addressesPath, `KreditsKit.json`);
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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.)
|
||||
let addresses = JSON.parse(fs.readFileSync(addresseFile));
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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.)
|
||||
|
||||
addresses[networkId] = kreditsKit.address;
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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.)
|
||||
fs.writeFileSync(addresseFile, JSON.stringify(addresses));
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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.)
|
||||
addresses[networkId] = kreditsKit.address;
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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.)
|
||||
fs.writeFileSync(addresseFile, JSON.stringify(addresses));
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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(`Deployed KreditsKit at: ${kreditsKit.address}`);
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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.)
|
||||
callback();
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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.)
|
||||
callback();
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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.)
|
||||
}).catch((e) => {
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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(e);
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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.)
|
||||
callback(e);
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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.)
|
||||
})
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
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.)
|
||||
}
|
||||
|
||||
|
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
What about:
What about:
```js
const KreditsKit = artifacts.require('KreditsKit')
const kreditsKitFile = 'KreditsKit.json'
// ...
let addresseFile = path.join(addressesPath, kreditsKitFile);
```
`const networkId = await getNetworkId(web3);`
`const networkId = await getNetworkId(web3);`
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.)
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.)
|
||||
@ -6,7 +6,18 @@ const addressesPath = path.join(libPath, 'addresses');
|
||||
|
Haha, make a function to update the Haha, make a function to update the `addresseFile`.
Haha, make a function to update the Haha, make a function to update the `addresseFile`.
yep, did that now finally. and added a `helpers' directory... 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... 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?
I was thinking about I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
I was thinking about I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
`const networkId = await getNetworkId(web3);`
`const networkId = await getNetworkId(web3);`
|
||||
const KreditsKit = artifacts.require('KreditsKit')
|
||||
|
||||
module.exports = async function(callback) {
|
||||
const networkId = parseInt(web3.version.network);
|
||||
|
Haha, make a function to update the Haha, make a function to update the `addresseFile`.
yep, did that now finally. and added a `helpers' directory... 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?
I was thinking about I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
`const networkId = await getNetworkId(web3);`
|
||||
// load networkId; will change with updated truffle
|
||||
|
Haha, make a function to update the Haha, make a function to update the `addresseFile`.
yep, did that now finally. and added a `helpers' directory... 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?
I was thinking about I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
`const networkId = await getNetworkId(web3);`
|
||||
const networkPromise = new Promise((resolve, reject) => {
|
||||
|
Haha, make a function to update the Haha, make a function to update the `addresseFile`.
yep, did that now finally. and added a `helpers' directory... 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?
I was thinking about I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
`const networkId = await getNetworkId(web3);`
|
||||
web3.version.getNetwork((err, network) => {
|
||||
|
Haha, make a function to update the Haha, make a function to update the `addresseFile`.
yep, did that now finally. and added a `helpers' directory... 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?
I was thinking about I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
`const networkId = await getNetworkId(web3);`
|
||||
if (err) {
|
||||
|
Haha, make a function to update the Haha, make a function to update the `addresseFile`.
yep, did that now finally. and added a `helpers' directory... 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?
I was thinking about I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
`const networkId = await getNetworkId(web3);`
|
||||
reject(err);
|
||||
|
Haha, make a function to update the Haha, make a function to update the `addresseFile`.
yep, did that now finally. and added a `helpers' directory... 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?
I was thinking about I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
`const networkId = await getNetworkId(web3);`
|
||||
} else {
|
||||
|
Haha, make a function to update the Haha, make a function to update the `addresseFile`.
yep, did that now finally. and added a `helpers' directory... 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?
I was thinking about I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
`const networkId = await getNetworkId(web3);`
|
||||
resolve(network);
|
||||
|
Haha, make a function to update the Haha, make a function to update the `addresseFile`.
yep, did that now finally. and added a `helpers' directory... 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?
I was thinking about I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
`const networkId = await getNetworkId(web3);`
|
||||
}
|
||||
|
Haha, make a function to update the Haha, make a function to update the `addresseFile`.
yep, did that now finally. and added a `helpers' directory... 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?
I was thinking about I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
`const networkId = await getNetworkId(web3);`
|
||||
})
|
||||
|
Haha, make a function to update the Haha, make a function to update the `addresseFile`.
yep, did that now finally. and added a `helpers' directory... 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?
I was thinking about I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
`const networkId = await getNetworkId(web3);`
|
||||
})
|
||||
|
Haha, make a function to update the Haha, make a function to update the `addresseFile`.
yep, did that now finally. and added a `helpers' directory... 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?
I was thinking about I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
`const networkId = await getNetworkId(web3);`
|
||||
const networkId = await networkPromise;
|
||||
|
Haha, make a function to update the Haha, make a function to update the `addresseFile`.
yep, did that now finally. and added a `helpers' directory... 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?
I was thinking about I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
`const networkId = await getNetworkId(web3);`
|
||||
console.log(`Deploying to networkId: ${networkId}`)
|
||||
|
Haha, make a function to update the Haha, make a function to update the `addresseFile`.
yep, did that now finally. and added a `helpers' directory... 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?
I was thinking about I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
`const networkId = await getNetworkId(web3);`
|
||||
|
||||
let kitAddresseFile = path.join(addressesPath, 'KreditsKit.json');
|
||||
let kitAddresses = JSON.parse(fs.readFileSync(kitAddresseFile));
|
||||
|
||||
|
Haha, make a function to update the Haha, make a function to update the `addresseFile`.
Haha, make a function to update the Haha, make a function to update the `addresseFile`.
yep, did that now finally. and added a `helpers' directory... 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... 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?
I was thinking about I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
I was thinking about I was thinking about `updateAddresses` but as it also updates IDs I think `fileInject` works fine.
`const networkId = await getNetworkId(web3);`
`const networkId = await getNetworkId(web3);`
|
||||
❤️