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

38 lines
860 B
Solidity
Raw Normal View History

pragma solidity ^0.4.21;
2018-03-11 15:12:50 +00:00
import "./InstanceStorage.sol";
import "./DelegatedCall.sol";
/**
* @title Instance
* @author Ricardo Guilherme Schmidt (Status Research & Development GmbH)
* @dev Contract that forward everything through delegatecall to defined kernel
*/
contract Instance is InstanceStorage, DelegatedCall {
function Instance(address _kernel) public {
kernel = _kernel;
}
/**
* @dev delegatecall everything (but declared functions) to `_target()`
* @notice Verify `kernel()` code to predict behavior
*/
function () external delegated {
//all goes to kernel
}
/**
* @dev returns kernel if kernel that is configured
* @return kernel address
*/
function targetDelegatedCall()
internal
view
2018-03-11 15:12:50 +00:00
returns(address)
{
return kernel;
}
}