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:
@@ -1 +1 @@
|
||||
{"4":"0xf4f3963718e5c2b426dd5c3ef0ab4b31ffb7a318","14945560":"0x6e0745b6b18d0233708554049eeaab0cb81c4ab0","42097210":"0x15d7adc7d6283d57d45017512567985e3a768b83","51657314":"0x053e2ebaf79eb0ccc5139a40b2a3ddca79409cdc","55632786":"0x4d97bd8efacf46b33c4438ed0b7b6aabfa2359fb","84923523":"0x48c2eac33521070509f9819a824a3d5686ba5ce8"}
|
||||
{"4":"0x948b9e124f1648d75862a5b7f2a72f58440cf242","14945560":"0x6e0745b6b18d0233708554049eeaab0cb81c4ab0","42097210":"0x15d7adc7d6283d57d45017512567985e3a768b83","51657314":"0x053e2ebaf79eb0ccc5139a40b2a3ddca79409cdc","55632786":"0x4d97bd8efacf46b33c4438ed0b7b6aabfa2359fb","74971415":"0xa35aacdfccac54d3d96e0d29050c773b251c2c83","84923523":"0x48c2eac33521070509f9819a824a3d5686ba5ce8","85406806":"0xe47c45da69763807897f446d087d84fe572b04c4"}
|
||||
@@ -1 +1 @@
|
||||
{"4":"0x8b7c0bec9476ce08d9769a87d272b03b350712e2","14945560":"0x183af3950364390a266edff2a0e7c4c2f95c0691","23827572":"0xe4e0e7fe54d9189df29a80c07ab733fc9a212761","42097210":"0x183af3950364390a266edff2a0e7c4c2f95c0691","51657314":"0xad3a80686847d55d7b14b930bc6db53681ae1b1e","55632786":"0x4fde16c57ddf6d4870d5edd599074bb50dc96f88","65047207":"0xb67567175ac213f6f622b23d3d972d5b877c4813"}
|
||||
{"4":"0x8b7c0bec9476ce08d9769a87d272b03b350712e2","14945560":"0x183af3950364390a266edff2a0e7c4c2f95c0691","23827572":"0xe4e0e7fe54d9189df29a80c07ab733fc9a212761","42097210":"0x183af3950364390a266edff2a0e7c4c2f95c0691","51657314":"0xad3a80686847d55d7b14b930bc6db53681ae1b1e","55632786":"0x4fde16c57ddf6d4870d5edd599074bb50dc96f88","65047207":"0xb67567175ac213f6f622b23d3d972d5b877c4813","74971415":"0x183af3950364390a266edff2a0e7c4c2f95c0691","85406806":"0x192db9a1f757c7c2afd03cb5afe883b27d0d3937"}
|
||||
1
lib/app_ids.json
Normal file
1
lib/app_ids.json
Normal file
@@ -0,0 +1 @@
|
||||
{"74971415":{"Contribution":"0xe401b988b8af39119004de5c7691a60391d69d873b3120682a8c61306a4883ce","Contributor":"0x7829d33291d6e118d115ce321de9341894a2da120bd35505fc03b98f715c606d","Proposal":"0x15d03d435b24a74317868c24fda4646302076b59272241a122a3868eb5c745da","Token":"0x85b0f626cecde6188d11940904fedeb16a4d49b0e8c878b9d109b23d38062ca7"},"85406806":{"Contribution":"0xe401b988b8af39119004de5c7691a60391d69d873b3120682a8c61306a4883ce","Contributor":"0x7829d33291d6e118d115ce321de9341894a2da120bd35505fc03b98f715c606d","Proposal":"0x15d03d435b24a74317868c24fda4646302076b59272241a122a3868eb5c745da","Token":"0x85b0f626cecde6188d11940904fedeb16a4d49b0e8c878b9d109b23d38062ca7"}}
|
||||
@@ -1,5 +1,5 @@
|
||||
const AppIds = require('../app_ids.json');
|
||||
const Base = require('./base');
|
||||
|
||||
KERNEL_APP_ADDR_NAMESPACE = '0xd6f028ca0e8edb4a8c9757ca4fdccab25fa1e0317da1188108f7d2dee14902fb';
|
||||
|
||||
class Kernel extends Base {
|
||||
@@ -9,12 +9,7 @@ class Kernel extends Base {
|
||||
}
|
||||
|
||||
appNamehash(appName) {
|
||||
return {
|
||||
Contributor: '0x8e50972b062e83b48dbb2a68d8a058f2a07227ca183c144dc974e6da3186d7e9',
|
||||
Contribution: '0x09f5274cba299b46c5be722ef672d10eef7a2ef980b612aef529d74fb9da7643',
|
||||
Token: '0x82c0e483537d703bb6f0fc799d2cc60d8f62edcb0f6d26d5571a92be8485b112',
|
||||
Proposal: '0xb48bc8b4e539823f3be98d67f4130c07b5d29cc998993debcdea15c6faf4cf8a'
|
||||
}[appName];
|
||||
return AppIds[this.contract.provider.chainId.toString()][appName];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user