7

A simple proxy contract looks like:

contract Proxy {
    function forward(address to, uint value, bytes data) {
        if (!to.call.value(value)(data)) {
            throw;
        }
    }
}

Using to zero [like forward(0, 0, data)] doesn't work. Can a proxy contract create an arbitrary contract?

Can this code be modified or what's the Solidity inline assembly to do the job?

eth
  • 85,679
  • 53
  • 285
  • 406
  • you would use CALL, DELEGATECALL or CALLCODE as described here – Micha Roon Jan 10 '17 at 06:59
  • This is really a comment, not an answer. In addition, you probably didn't notice the OP is the same person who wrote the answer you linked, so I guess he is aware of the mechanics described over there. – q9f Jan 10 '17 at 09:34

0 Answers0