File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ pragma experimental ABIEncoderV2;
10
10
contract Governed {
11
11
address public governor;
12
12
13
- event GovernanceTransferred (address indexed _from , address indexed _to );
13
+ event OwnershipTransferred (address indexed from , address indexed to );
14
14
15
15
modifier onlyGovernor {
16
16
require (msg .sender == governor, "Only Governor can call " );
@@ -29,12 +29,9 @@ contract Governed {
29
29
* @dev The current `governor` can assign a new `governor`
30
30
* @param _newGovernor <address> Address of new `governor`
31
31
*/
32
- function transferOwnership (address _newGovernor )
33
- public
34
- onlyGovernor
35
- returns (bool )
36
- {
32
+ function transferOwnership (address _newGovernor ) public onlyGovernor {
33
+ require (_newGovernor != address (0 ), "New owner is the zero address " );
34
+ emit OwnershipTransferred (governor, _newGovernor);
37
35
governor = _newGovernor;
38
- return true ;
39
36
}
40
37
}
You can’t perform that action at this time.
0 commit comments