contract Proxy is Proxied {
    /// @dev Constructor function sets address of master copy contract.
    /// @param _masterCopy Master copy address.
    constructor(address _masterCopy) public {
        require(_masterCopy != address(0), "The master copy is required");
        masterCopy = _masterCopy;
    }

    /// @dev Fallback function forwards all transactions and returns all received return data.
    function() external payable {
        address _masterCopy = masterCopy;
        assembly {
            calldatacopy(0, 0, calldatasize)
            let success := delegatecall(not(0), _masterCopy, 0, calldatasize, 0, 0)
            returndatacopy(0, 0, returndatasize)
            switch success
                case 0 {
                    revert(0, returndatasize)
                }
                default {
                    return(0, returndatasize)
                }
        }
    }
}
function() external payable {
    address _masterCopy = masterCopy;
    assembly {
        calldatacopy(0, 0, calldatasize)
        let success := delegatecall(not(0), _masterCopy, 0, calldatasize, 0, 0)
        returndatacopy(0, 0, returndatasize)
        switch success
            case 0 {
                revert(0, returndatasize)
            }
            default {
                return(0, returndatasize)
            }
    }
}

/// @dev Fallback function forwards all transactions and returns all received return data.