Verified contractPartial
Proxy
Address0x59d33bf374fe8a87641ecb02bed37fcd861b869f
- Balance
0 ETH
- Transactions
65
- Compiler
solc 0.5.17
- Same code
171 more contracts
Details
- Compiler
- solc 0.5.17+commit.d19bba13
- Language
- solidity
- Optimization
- Yes, 200 runs
- EVM version
- istanbul
- License
- Not stated
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 12,954,803
- Creation transaction
- 0x1aceba899c…d199ed138c
- Main copy (most transactions)
- 0x5498c8ab…6e40dc98
Proxy.sol
pragma solidity ^0.5.0;
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() external payable {
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)
}
}
}
}Compiler settingsShow
{
"libraries": {},
"optimizer": {
"runs": 200,
"enabled": true
},
"evmVersion": "istanbul",
"remappings": []
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.