Heritable
contract Heritable
is Ownable
The Heritable contract provides ownership transfer capabilities, in the case that the current owner stops "heartbeating". Only the heir can pronounce the owner's death.
Source: ownership/Heritable.sol
Index
Reference
Events
HeirChanged
event HeirChanged(address owner, address newHeir)
- Parameters:
owner
- addressnewHeir
- address
HeirOwnershipClaimed
event HeirOwnershipClaimed(address previousOwner, address newOwner)
- Parameters:
previousOwner
- addressnewOwner
- address
OwnerHeartbeated
event OwnerHeartbeated(address owner)
- Parameters:
owner
- address
OwnerProclaimedDead
event OwnerProclaimedDead(address owner, address heir, uint256 timeOfDeath)
- Parameters:
owner
- addressheir
- addresstimeOfDeath
- uint256
Modifiers
onlyHeir
modifier onlyHeir()
Throw an exception if called by any account other than the heir's.
Functions
claimHeirOwnership
function claimHeirOwnership() public
Allows heir to transfer ownership only if heartbeat has timed out.
- Modifiers:
- onlyHeir
fallback
function (uint256 _heartbeatTimeout) public
Create a new Heritable Contract with heir address 0x0.
- Parameters:
_heartbeatTimeout
- time available for the owner to notify they are alive, before the heir can take ownership.
heartbeat
function heartbeat() public
Owner can send a heartbeat if they were mistakenly pronounced dead.
- Modifiers:
- onlyOwner
heartbeatTimeout
function heartbeatTimeout() public view returns (uint256)
- Returns:
- uint256
heir
function heir() public view returns (address)
Use these getter functions to access the internal variables in an inherited contract.
- Returns:
- address
ownerLives
function ownerLives() internal view returns (bool)
- Returns:
- bool
proclaimDeath
function proclaimDeath() public
Heir can pronounce the owners death. To claim the ownership, they will have to wait for `heartbeatTimeout` seconds.
- Modifiers:
- onlyHeir
removeHeir
setHeartbeatTimeout
function setHeartbeatTimeout(uint256 newHeartbeatTimeout) internal
- Modifiers:
- onlyOwner
- Parameters:
newHeartbeatTimeout
- uint256
setHeir
timeOfDeath
function timeOfDeath() public view returns (uint256)
- Returns:
- uint256