Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0xeA7a7bC3BA38b2569B6BEe8dcd8aCb4218c08716
Balance 0 ETH
Nonce 292286
Code Size 2047 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

2047 bytes
0x6080604052600436106100cf5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166313af4035811461011f57806323aa7e12146101545780633b22f35f146101855780638063ab78146101af578063806ad57e146101d05780638da5cb5b146101f1578063aa15664514610206578063bc7f3b5014610227578063c4f987a51461023c578063cb3eef2c1461025d578063d264e05e146102c2578063d273285b146102d7578063fa34b345146102ec578063ffd85b6814610301575b6109605a111561011d5760015460408051602036601f810182900482028301820190935282825261011d93600160a060020a0316926000918190840183828082843750610322945050505050565b005b34801561012b57600080fd5b50610140600160a060020a036004351661034a565b604080519115158252519081900360200190f35b34801561016057600080fd5b506101696103af565b60408051600160a060020a039092168252519081900360200190f35b34801561019157600080fd5b5061019d6004356103be565b60408051918252519081900360200190f35b3480156101bb57600080fd5b50610140600160a060020a03600435166103d0565b3480156101dc57600080fd5b50610140600160a060020a0360043516610420565b3480156101fd57600080fd5b506101696104fa565b34801561021257600080fd5b50610140600160a060020a0360043516610509565b34801561023357600080fd5b50610169610526565b34801561024857600080fd5b50610140600160a060020a0360043516610535565b34801561026957600080fd5b50610272610678565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156102ae578181015183820152602001610296565b505050509050019250505060405180910390f35b3480156102ce57600080fd5b5061016961071b565b3480156102e357600080fd5b5061019d61072a565b3480156102f857600080fd5b50610169610730565b34801561030d57600080fd5b50610140600160a060020a036004351661073f565b600080825160208401856127105a03f43d604051816000823e828015610346578282f35b8282fd5b60055460009033600160a060020a0390811691161461036857600080fd5b600160a060020a038216151561037d57600080fd5b5060058054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff199091161790556001919050565b600154600160a060020a031681565b60046020526000908152604090205481565b60055460009033600160a060020a039081169116146103ee57600080fd5b5060008054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff199091161790556001919050565b600554600090819033600160a060020a0390811691161461044057600080fd5b61044983610509565b1561045357600080fd5b5060078054600181019091557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6888101805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038516908117909155600081815260066020908152604091829020849055815192835290517fdecaaccf65fa0157d575425d16efcccc089f3df91ee0abedec8d1def2f12ab399281900390910190a150600192915050565b600554600160a060020a031681565b600160a060020a0316600090815260066020526040902054151590565b600054600160a060020a031690565b6005546000908190819033600160a060020a0390811691161461055757600080fd5b61056084610509565b151561056b57600080fd5b600160a060020a0384166000908152600660205260409020546007805491935090600019810190811061059a57fe5b6000918252602080832090910154600160a060020a031680835260069091526040909120839055600780549192508291849081106105d457fe5b6000918252602090912001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055600780549061061d90600019830161078d565b50600160a060020a038416600081815260066020908152604080832092909255815192835290517f3edc40c0328998eaea1b10228950034eb711623f80702c71897e856964c203c39281900390910190a15060019392505050565b606060006001600780549050036040519080825280602002602001820160405280156106ae578160200160208202803883390190505b509150600190505b6007548110156107175760078054829081106106ce57fe5b6000918252602090912001548251600160a060020a0390911690839060001984019081106106f857fe5b600160a060020a039092166020928302909101909101526001016106b6565b5090565b600254600160a060020a031681565b60035481565b600054600160a060020a031681565b60055460009033600160a060020a0390811691161461075d57600080fd5b5060018054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff19909116178155919050565b8154818355818111156107b1576000838152602090206107b19181019083016107b6565b505050565b6107d091905b8082111561071757600081556001016107bc565b905600a165627a7a72305820ebd22247a8ef2ac3ae92893e66f4bb4e72eddd556ff5c51a6127438e4205100d0029

Verified Source Code Partial Match

Compiler: v0.4.23+commit.124ca40d EVM: byzantium Optimization: Yes (200 runs)
ControllerProxy.sol 135 lines
pragma solidity ^0.4.23;

contract Ownable {
    address public owner;

    modifier onlyOwner() {
        require(msg.sender == owner);
        _;
    }

    constructor() public {
        owner = msg.sender; 
    }

    /**
        @dev Transfers the ownership of the contract.

        @param _owner Address of the new owner
    */
    function setOwner(address _owner) public onlyOwner returns (bool) {
        require(_owner != address(0));
        owner = _owner;
        return true;
    } 
}


contract HasWorkers is Ownable {
    mapping(address => uint256) private workerToIndex;    
    address[] private workers;

    event AddedWorker(address _worker);
    event RemovedWorker(address _worker);

    constructor() public {
        workers.length++;
    }

    modifier onlyWorker() {
        require(isWorker(msg.sender));
        _;
    }

    modifier workerOrOwner() {
        require(isWorker(msg.sender) || msg.sender == owner);
        _;
    }

    function isWorker(address _worker) public view returns (bool) {
        return workerToIndex[_worker] != 0;
    }

    function allWorkers() public view returns (address[] memory result) {
        result = new address[](workers.length - 1);
        for (uint256 i = 1; i < workers.length; i++) {
            result[i - 1] = workers[i];
        }
    }

    function addWorker(address _worker) public onlyOwner returns (bool) {
        require(!isWorker(_worker));
        uint256 index = workers.push(_worker) - 1;
        workerToIndex[_worker] = index;
        emit AddedWorker(_worker);
        return true;
    }

    function removeWorker(address _worker) public onlyOwner returns (bool) {
        require(isWorker(_worker));
        uint256 index = workerToIndex[_worker];
        address lastWorker = workers[workers.length - 1];
        workerToIndex[lastWorker] = index;
        workers[index] = lastWorker;
        workers.length--;
        delete workerToIndex[_worker];
        emit RemovedWorker(_worker);
        return true;
    }
}

contract ControllerStorage {
    address public walletsDelegate;
    address public controllerDelegate;
    address public forward;
    uint256 public createdWallets;
    mapping(bytes32 => bytes32) public gStorage;
}

contract DelegateProxy {
  /**
   * @dev Performs a delegatecall and returns whatever the delegatecall returned (entire context execution will return!)
   * @param _dst Destination address to perform the delegatecall
   * @param _calldata Calldata for the delegatecall
   */
  function delegatedFwd(address _dst, bytes _calldata) internal {
    assembly {
      let result := delegatecall(sub(gas, 10000), _dst, add(_calldata, 0x20), mload(_calldata), 0, 0)
      let size := returndatasize

      let ptr := mload(0x40)
      returndatacopy(ptr, 0, size)

      // revert instead of invalid() bc if the underlying call failed with invalid() it already wasted gas.
      // if the call returned error data, forward it
      switch result case 0 { revert(ptr, size) }
      default { return(ptr, size) }
    }
  }
}

contract DelegateProvider {
    function getDelegate() public view returns (address delegate);
}

contract ControllerProxy is ControllerStorage, Ownable, HasWorkers, DelegateProvider, DelegateProxy {
    function getDelegate() public view returns (address delegate) {
        delegate = walletsDelegate;
    }

    function setWalletsDelegate(address _delegate) public onlyOwner returns (bool) {
        walletsDelegate = _delegate;
        return true;
    }

    function setControllerDelegate(address _delegate) public onlyOwner returns (bool) {
        controllerDelegate = _delegate;
        return true;
    }

    function() public payable {
        if (gasleft() > 2400) {
            delegatedFwd(controllerDelegate, msg.data);
        }
    }
}

Read Contract

allWorkers 0xcb3eef2c → address[]
controllerDelegate 0x23aa7e12 → address
createdWallets 0xd273285b → uint256
forward 0xd264e05e → address
gStorage 0x3b22f35f → bytes32
getDelegate 0xbc7f3b50 → address
isWorker 0xaa156645 → bool
owner 0x8da5cb5b → address
walletsDelegate 0xfa34b345 → address

Write Contract 5 functions

These functions modify contract state and require a wallet transaction to execute.

addWorker 0x806ad57e
address _worker
returns: bool
removeWorker 0xc4f987a5
address _worker
returns: bool
setControllerDelegate 0xffd85b68
address _delegate
returns: bool
setOwner 0x13af4035
address _owner
returns: bool
setWalletsDelegate 0x8063ab78
address _delegate
returns: bool

Recent Transactions

No transactions found for this address