Skip to content

Instantly share code, notes, and snippets.

@izqui izqui/fixeable.sol
Created Mar 14, 2017

Embed
What would you like to do?
contract Fixeable is LiveFactory {
function executeCode(bytes _code) {
execute(deployCode(_code));
}
function execute(address fixer) {
if (!canExecuteArbitraryCode()) throw;
assembly {
calldatacopy(0x0, 0x0, calldatasize)
let a := delegatecall(sub(gas, 10000), fixer, 0x0, calldatasize, 0, 0)
return(0, 0)
}
}
function canExecuteArbitraryCode() returns (bool);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.