- Added event to inform of an identity instance upgrade

- Added test units for Identity factory and its kernel upgrading
This commit is contained in:
Richard Ramos 2018-02-28 11:47:59 -04:00
parent b3025a5d80
commit d4b98d1186
1 changed files with 3 additions and 0 deletions

View File

@ -10,6 +10,8 @@ import "./Instance.sol";
*/ */
contract UpdatableInstance is Instance { contract UpdatableInstance is Instance {
event InstanceUpdated(address oldKernel, address newKernel);
function UpdatableInstance(address _kernel) function UpdatableInstance(address _kernel)
Instance(_kernel) Instance(_kernel)
public public
@ -19,6 +21,7 @@ contract UpdatableInstance is Instance {
function updateUpdatableInstance(address _kernel) external { function updateUpdatableInstance(address _kernel) external {
require(msg.sender == address(this)); require(msg.sender == address(this));
InstanceUpdated(kernel, _kernel);
kernel = _kernel; kernel = _kernel;
} }