Log an event for implementation changes
This commit is contained in:
parent
6cbfc88159
commit
ae0ae82fcb
@ -20,6 +20,13 @@ interface IRegistry {
|
|||||||
*/
|
*/
|
||||||
event VersionAdded(bytes32 name, uint version, address implementation);
|
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
|
* @dev Registers a new version with its implementation address
|
||||||
* @param name of the contract, as specified in the registry
|
* @param name of the contract, as specified in the registry
|
||||||
|
@ -49,6 +49,7 @@ contract Registry is IRegistry {
|
|||||||
|
|
||||||
function upgrade(bytes32 name, uint version) public {
|
function upgrade(bytes32 name, uint version) public {
|
||||||
UpgradeabilityProxy(proxies[name]).upgradeTo(version);
|
UpgradeabilityProxy(proxies[name]).upgradeTo(version);
|
||||||
|
ProxyImplementationUpgraded(name, version);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user