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
9d005b49
Commit
9d005b49
authored
Jan 16, 2018
by
Alejandro Santander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Explicit uint size
parent
22c1403e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
Heritable.sol
contracts/ownership/Heritable.sol
+5
-6
No files found.
contracts/ownership/Heritable.sol
View file @
9d005b49
...
@@ -14,15 +14,14 @@ contract Heritable is Ownable {
...
@@ -14,15 +14,14 @@ contract Heritable is Ownable {
address public heir;
address public heir;
// Time window the owner has to notify they are alive.
// Time window the owner has to notify they are alive.
uint public heartbeatTimeout;
uint
256
public heartbeatTimeout;
// Timestamp of the owner's death, as pronounced by the heir.
// Timestamp of the owner's death, as pronounced by the heir.
uint public timeOfDeath;
uint256 public timeOfDeath;
event HeirChanged(address indexed owner, address indexed newHeir);
event HeirChanged(address indexed owner, address indexed newHeir);
event OwnerHeartbeated(address indexed owner);
event OwnerHeartbeated(address indexed owner);
event OwnerProclaimedDead(address indexed owner, address indexed heir, uint timeOfDeath);
event OwnerProclaimedDead(address indexed owner, address indexed heir, uint
256
timeOfDeath);
event HeirOwnershipClaimed(address indexed previousOwner, address indexed newOwner);
event HeirOwnershipClaimed(address indexed previousOwner, address indexed newOwner);
...
@@ -40,7 +39,7 @@ contract Heritable is Ownable {
...
@@ -40,7 +39,7 @@ contract Heritable is Ownable {
* @param _heartbeatTimeout time available for the owner to notify they are alive,
* @param _heartbeatTimeout time available for the owner to notify they are alive,
* before the heir can take ownership.
* before the heir can take ownership.
*/
*/
function Heritable(uint _heartbeatTimeout) public {
function Heritable(uint
256
_heartbeatTimeout) public {
setHeartbeatTimeout(_heartbeatTimeout);
setHeartbeatTimeout(_heartbeatTimeout);
}
}
...
@@ -89,7 +88,7 @@ contract Heritable is Ownable {
...
@@ -89,7 +88,7 @@ contract Heritable is Ownable {
timeOfDeath = 0;
timeOfDeath = 0;
}
}
function setHeartbeatTimeout(uint newHeartbeatTimeout) internal onlyOwner {
function setHeartbeatTimeout(uint
256
newHeartbeatTimeout) internal onlyOwner {
require(ownerLives());
require(ownerLives());
heartbeatTimeout = newHeartbeatTimeout;
heartbeatTimeout = newHeartbeatTimeout;
}
}
...
...
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