contracts/migrations/1520802793_upgrade.js
bumi 6cbfc88159 Refactor to support multiple contracts in the registry
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.
2018-03-14 19:12:03 +01:00

15 lines
499 B
JavaScript

var Token = artifacts.require('./Token2.sol');
var Registry = artifacts.require('./upgradeable/Registry');
var UpgradeabilityProxy = artifacts.require('./upgradeable/UpgradeabilityProxy');
module.exports = function(deployer) {
deployer.deploy(Token).then(function(t) {
return Token.deployed();
}).then(function(token) {
Registry.deployed().then(function(registry) {
console.log('Token address: ', Token.address);
registry.addVersion('Token', Token.address);
});
})
};