diff --git a/contracts/common/Controlled.sol b/contracts/common/Controlled.sol index 5b001c7..0e96cc4 100644 --- a/contracts/common/Controlled.sol +++ b/contracts/common/Controlled.sol @@ -1,6 +1,7 @@ pragma solidity >=0.5.0 <0.6.0; contract Controlled { + event NewController(address controller); /// @notice The address of the controller is the only address that can call /// a function with this modifier modifier onlyController { @@ -18,5 +19,6 @@ contract Controlled { /// @param _newController The new controller of the contract function changeController(address payable _newController) public onlyController { controller = _newController; + emit NewController(_newController); } } diff --git a/contracts/common/Owned.sol b/contracts/common/Owned.sol index ab6075a..1a3eea8 100644 --- a/contracts/common/Owned.sol +++ b/contracts/common/Owned.sol @@ -3,6 +3,7 @@ pragma solidity >=0.5.0 <0.6.0; /// @dev `Owned` is a base level contract that assigns an `owner` that can be /// later changed contract Owned { + event OwnerChanged(address newOwner); /// @dev `owner` is the only address that can call a function with this /// modifier @@ -24,6 +25,7 @@ contract Owned { /// @param _newOwner The address of the new owner. 0x0 can be used to create /// an unowned neutral vault, however that cannot be undone function changeOwner(address payable _newOwner) public onlyOwner { + emit OwnerChanged(_newOwner); newOwner = _newOwner; }