Skip to content

Instantly share code, notes, and snippets.

@pau1m
Created March 30, 2017 12:07
Show Gist options
  • Save pau1m/9c7103842e51f1c87fef4e3add86bd07 to your computer and use it in GitHub Desktop.
Save pau1m/9c7103842e51f1c87fef4e3add86bd07 to your computer and use it in GitHub Desktop.
contract Relay {
address public currentVersion;
address public owner;
function Relay(address initAddr){
currentVersion = initAddr;
owner = msg.sender;
}
function update(address newAddress){
if(msg.sender != owner) throw;
currentVersion = newAddress;
}
function(){
if(!currentVersion.delegatecall(msg.data)) throw;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment