snt-gas-relay/contracts/deploy/UpdatableInstance.sol

28 lines
618 B
Solidity
Raw Normal View History

2018-05-13 05:47:51 +00:00
pragma solidity ^0.4.23;
import "./Instance.sol";
/**
* @title UpdatableInstance
* @author Ricardo Guilherme Schmidt (Status Research & Development GmbH)
* @dev Contract that can be updated by a call from itself.
*/
contract UpdatableInstance is Instance {
event InstanceUpdated(address oldKernel, address newKernel);
2018-05-13 05:47:51 +00:00
constructor(address _kernel)
Instance(_kernel)
public
{
}
function updateUpdatableInstance(address _kernel) external {
require(msg.sender == address(this));
2018-05-13 09:17:39 +00:00
emit InstanceUpdated(kernel, _kernel);
kernel = _kernel;
}
}