Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
openzeppelin-contracts-upgradeable
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
openzeppelin-contracts-upgradeable
Commits
b59469c1
Commit
b59469c1
authored
Sep 05, 2017
by
Yevhenii Babichenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fire OwnershipTransferred event when the owner of an Ownable contract instance actually changed
parent
b07466a4
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
0 deletions
+6
-0
Claimable.sol
contracts/ownership/Claimable.sol
+1
-0
DelayedClaimable.sol
contracts/ownership/DelayedClaimable.sol
+1
-0
Ownable.sol
contracts/ownership/Ownable.sol
+4
-0
No files found.
contracts/ownership/Claimable.sol
View file @
b59469c1
...
...
@@ -34,5 +34,6 @@ contract Claimable is Ownable {
function claimOwnership() onlyPendingOwner {
owner = pendingOwner;
pendingOwner = 0x0;
OwnershipTransferred(owner);
}
}
contracts/ownership/DelayedClaimable.sol
View file @
b59469c1
...
...
@@ -36,6 +36,7 @@ contract DelayedClaimable is Claimable {
owner = pendingOwner;
pendingOwner = 0x0;
end = 0;
OwnershipTransferred(owner);
}
}
contracts/ownership/Ownable.sol
View file @
b59469c1
...
...
@@ -10,6 +10,9 @@ contract Ownable {
address public owner;
event OwnershipTransferred(address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
...
...
@@ -35,6 +38,7 @@ contract Ownable {
function transferOwnership(address newOwner) onlyOwner {
require(newOwner != address(0));
owner = newOwner;
OwnershipTransferred(newOwner);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment