Skip to content
Verified contractPartial

Proxy

Address0xb8b0f57e82d54cc5f06579c1a7d2c007be663f37
Balance

0 ETH

 

Transactions

56

 

Compiler

solc 0.4.10

 

Same code

25 more contracts

 

Details

Compiler
solc 0.4.10+commit.f0d539ae
Language
solidity
Optimization
Yes, 200 runs
License
Not stated
Match
Partialcreation code: no, runtime code: yes
Verified on Sourcify
Created in block
4,220,950
Creation transaction
0xa2cb3f0228…b1353f084e

Proxy.sol

// Submitted by EthereumHistory (ethereumhistory.com)
contract Settings {
    function sizes(bytes4 _sig) constant returns (uint32);
    function target() constant returns (address);
}

contract Proxy {
    address public settings;

    event Deposit(address _from, uint256 _value);

    function initialize(address _settings) {
    }

    function () payable {
        bytes32 sig;
        uint32 size;
        address t;
        uint256 result;
        if (msg.data.length == 0) {
            Deposit(msg.sender, msg.value);
            return;
        }
        assembly { sig := calldataload(0) }
        size = Settings(settings).sizes(bytes4(sig));
        t = Settings(settings).target();
        assembly {
            calldatacopy(0x0, 0x0, calldatasize)
            result := delegatecall(sub(gas, 10000), t, 0x0, calldatasize, 0x0, size)
        }
        if (result == 0) {
            assembly { revert(0, 0) }
        }
        assembly { return(0, size) }
    }
}
Compiler settingsShow
{
  "optimizer": {
    "runs": 200,
    "enabled": true
  }
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.