Skip to content
Verified contractPartial

Proxy

Address0xafcac5bababe99dfd857b50f5556515dc15b78b0
Balance

0.000002 ETH

 

Transactions

2

 

Compiler

solc 0.4.24

 

Same code

17,344 more contracts

 

Details

Compiler
solc 0.4.24+commit.e67f0147
Language
solidity
Optimization
Yes, 999 runs
EVM version
byzantium
License
Not stated
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
9,698,840
Creation transaction
0xd1a1f3dbc4…7885a17533
Main copy (most transactions)
0x27c115f0…e5e9cfd5

Proxy.sol

pragma solidity ^0.4.24;

/**
 * @title Proxy
 * @dev Basic proxy that delegates all calls to a fixed implementing contract.
 * The implementing contract cannot be upgraded.
 * @author Julien Niset - <[email protected]>
 */
contract Proxy {

    address implementation;

    event Received(uint indexed value, address indexed sender, bytes data);

    constructor(address _implementation) public {
        implementation = _implementation;
    }

    function() external payable {

        if(msg.data.length == 0 && msg.value > 0) { 
            emit Received(msg.value, msg.sender, msg.data); 
        }
        else {
            // solium-disable-next-line security/no-inline-assembly
            assembly {
                let target := sload(0)
                calldatacopy(0, 0, calldatasize())
                let result := delegatecall(gas, target, 0, calldatasize(), 0, 0)
                returndatacopy(0, 0, returndatasize())
                switch result 
                case 0 {revert(0, returndatasize())} 
                default {return (0, returndatasize())}
            }
        }
    }
}
Compiler settingsShow
{
  "libraries": {},
  "optimizer": {
    "runs": 999,
    "enabled": true
  },
  "evmVersion": "byzantium",
  "remappings": []
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.