Discover more of Etherscan's tools and services in one place.
Sponsored
Contract Source Code:
File 1 of 1 : Proxy
pragma solidity ^0.4.21; contract Proxy{ address public owner; address public target; event ProxyTargetSet(address target); event ProxyOwnerChanged(address _owner); constructor () public{ owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } function setTarget(address _target) public onlyOwner { target = _target; emit ProxyTargetSet(_target); } function setOwner(address _owner) public onlyOwner { owner = _owner; emit ProxyOwnerChanged(_owner); } function () payable public { address _impl = target; require(_impl != address(0)); assembly { let ptr := mload(0x40) calldatacopy(ptr, 0, calldatasize) let result := delegatecall(gas, _impl, ptr, calldatasize, 0, 0) let size := returndatasize returndatacopy(ptr, 0, size) switch result case 0 { revert(ptr, size) } default { return(ptr, size) } } } }
Please enter a contract address above to load the contract details and source code.
Please DO NOT store any passwords or private keys here. A private note (up to 100 characters) can be saved and is useful for transaction tracking.
This website uses cookies to improve your experience. By continuing to use this website, you agree to its Terms and Privacy Policy.