Open Zeppelin
contract Proxy {
owner; // the owner
implementation; // where the real contact lives
// change the owner
function setOwner(newowner) {
require(caller == owner);
owner = newowner;
}
// upgrade the code
function setImplementation(newImplementation) {
require(caller == owner);
implementation = newImplementation;
}
// function call through to the real contract
function indirectCall(...) {
implementation.Call(...)
}
}Last updated