Log an event for implementation changes

This commit is contained in:
bumi 2018-03-14 21:05:35 +01:00
parent 6cbfc88159
commit ae0ae82fcb
2 changed files with 8 additions and 0 deletions

View File

@ -20,6 +20,13 @@ interface IRegistry {
*/
event VersionAdded(bytes32 name, uint version, address implementation);
/**
* @dev This event will be emitted every time a proxy is upgraded to a new version
* @param name of the contract, as specified in the registry
* @param version representing the version name of the registered implementation
*/
event ProxyImplementationUpgraded(bytes32 name, uint version);
/**
* @dev Registers a new version with its implementation address
* @param name of the contract, as specified in the registry

View File

@ -49,6 +49,7 @@ contract Registry is IRegistry {
function upgrade(bytes32 name, uint version) public {
UpgradeabilityProxy(proxies[name]).upgradeTo(version);
ProxyImplementationUpgraded(name, version);
}
/**