This allows to manage different contracts (Token, Collaborator, etc.) with one registry. The registry serves as main source for all contracts and versions. Versions are independently deployed and added to the registry. From there the proxy contract's implementation can be upgraded to the new version. Currently no access control is implemented.
15 lines
414 B
JavaScript
15 lines
414 B
JavaScript
var Registry = artifacts.require('./Registry.sol');
|
|
var Token = artifacts.require('./Token1.sol');
|
|
|
|
module.exports = function(deployer) {
|
|
deployer.deploy(Token).then(function(token) {
|
|
console.log('Registry address: ', Registry.address);
|
|
console.log('Token address: ', Token.address);
|
|
Registry.deployed().then(function(registry) {
|
|
registry.addVersion('Token', Token.address);
|
|
});
|
|
});
|
|
};
|
|
|
|
|