Dynamically set AppIds

AppIds are used to lookup the actual contract addresses of each app.
Because of different registry names (open.aragonpm.eth vs. aragonpm.eth)
we have to use different ids in the local dev chain and in the
testnet/mainnet. To allow this we need to set the appids dynamically.

There is an open aragon issue to solve this and also allow to use
open.aragonpm.eth in the devchain by default.
https://github.com/aragon/aragen/issues/10
This commit is contained in:
2019-03-27 00:21:06 +01:00
parent 9cc237fbf4
commit f5973756c8
17 changed files with 78 additions and 48 deletions

View File

@@ -9,7 +9,7 @@
"environments": {
"default": {
"network": "development",
"appName": "kredits-token.open.aragonpm.eth"
"appName": "kredits-token.aragonpm.eth"
},
"rinkeby": {
"registry": "0x98df287b6c145399aaa709692c8d308357bc085d",

View File

@@ -6,9 +6,14 @@ import "./ERC20Token.sol";
contract Token is ERC20Token, AragonApp {
bytes32 public constant MINT_TOKEN_ROLE = keccak256("MINT_TOKEN_ROLE");
// ensure alphabetic order
enum Apps { Contribution, Contributor, Proposal, Token }
bytes32[4] public appIds;
event LogMint(address indexed recipient, uint256 amount, uint256 contributionId);
function initialize() public onlyInit {
function initialize(bytes32[4] _appIds) public onlyInit {
appIds = _appIds;
initialized();
}