- Added event to inform of an identity instance upgrade
- Added test units for Identity factory and its kernel upgrading
This commit is contained in:
parent
b3025a5d80
commit
d4b98d1186
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue