ETH Price: $2,679.60 (+1.90%)

Contract

0xD2cbDcd7C6b3152BdFf6549C208052E4DBcd575D
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

> 10 Internal Transactions found.

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
136884142021-11-26 7:23:281175 days ago1637911408
ZKSwap: Pair Manager
 Contract Creation0 ETH
136441332021-11-19 6:39:471182 days ago1637303987
ZKSwap: Pair Manager
 Contract Creation0 ETH
136171702021-11-15 0:27:521186 days ago1636936072
ZKSwap: Pair Manager
 Contract Creation0 ETH
132738862021-09-22 6:07:061240 days ago1632290826
ZKSwap: Pair Manager
 Contract Creation0 ETH
130703202021-08-21 18:39:121271 days ago1629571152
ZKSwap: Pair Manager
 Contract Creation0 ETH
130075142021-08-12 2:02:101281 days ago1628733730
ZKSwap: Pair Manager
 Contract Creation0 ETH
129694572021-08-06 5:12:521287 days ago1628226772
ZKSwap: Pair Manager
 Contract Creation0 ETH
129638232021-08-05 8:13:091288 days ago1628151189
ZKSwap: Pair Manager
 Contract Creation0 ETH
129625932021-08-05 3:23:441288 days ago1628133824
ZKSwap: Pair Manager
 Contract Creation0 ETH
129579232021-08-04 9:48:481288 days ago1628070528
ZKSwap: Pair Manager
 Contract Creation0 ETH
129273382021-07-30 13:51:381293 days ago1627653098
ZKSwap: Pair Manager
 Contract Creation0 ETH
129273172021-07-30 13:46:031293 days ago1627652763
ZKSwap: Pair Manager
 Contract Creation0 ETH
129254612021-07-30 6:46:011294 days ago1627627561
ZKSwap: Pair Manager
 Contract Creation0 ETH
129244482021-07-30 2:41:141294 days ago1627612874
ZKSwap: Pair Manager
 Contract Creation0 ETH
129184942021-07-29 3:54:051295 days ago1627530845
ZKSwap: Pair Manager
 Contract Creation0 ETH
129184882021-07-29 3:52:241295 days ago1627530744
ZKSwap: Pair Manager
 Contract Creation0 ETH
129183052021-07-29 3:12:511295 days ago1627528371
ZKSwap: Pair Manager
 Contract Creation0 ETH
129158082021-07-28 17:50:021295 days ago1627494602
ZKSwap: Pair Manager
 Contract Creation0 ETH
129135962021-07-28 9:16:061295 days ago1627463766
ZKSwap: Pair Manager
 Contract Creation0 ETH
129135552021-07-28 9:05:491296 days ago1627463149
ZKSwap: Pair Manager
 Contract Creation0 ETH
128808232021-07-23 5:44:461301 days ago1627019086
ZKSwap: Pair Manager
 Contract Creation0 ETH
128808202021-07-23 5:44:051301 days ago1627019045
ZKSwap: Pair Manager
 Contract Creation0 ETH
128808182021-07-23 5:43:431301 days ago1627019023
ZKSwap: Pair Manager
 Contract Creation0 ETH
128808142021-07-23 5:43:171301 days ago1627018997
ZKSwap: Pair Manager
 Contract Creation0 ETH
128808082021-07-23 5:42:321301 days ago1627018952
ZKSwap: Pair Manager
 Contract Creation0 ETH
View All Internal Transactions
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x6dE5bDC5...040A247e3
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
Proxy

Compiler Version
v0.5.16+commit.9c3226ce

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 4 : Proxy.sol
pragma solidity ^0.5.0;

import "./Ownable.sol";
import "./Upgradeable.sol";
import "./UpgradeableMaster.sol";


/// @title Proxy Contract
/// @dev NOTICE: Proxy must implement UpgradeableMaster interface to prevent calling some function of it not by master of proxy
/// @author Matter Labs
/// @author ZKSwap L2 Labs
contract Proxy is Upgradeable, UpgradeableMaster, Ownable {

    /// @notice Storage position of "target" (actual implementation address: keccak256('eip1967.proxy.implementation') - 1)
    bytes32 private constant targetPosition = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;

    /// @notice Contract constructor
    /// @dev Calls Ownable contract constructor and initialize target
    /// @param target Initial implementation address
    /// @param targetInitializationParameters Target initialization parameters
    constructor(address target, bytes memory targetInitializationParameters) Ownable(msg.sender) public {
        setTarget(target);
        (bool initializationSuccess, ) = getTarget().delegatecall(
            abi.encodeWithSignature("initialize(bytes)", targetInitializationParameters)
        );
        require(initializationSuccess, "uin11"); // uin11 - target initialization failed
    }

    /// @notice Intercepts initialization calls
    function initialize(bytes calldata) external pure {
        revert("ini11"); // ini11 - interception of initialization call
    }

    /// @notice Intercepts upgrade calls
    function upgrade(bytes calldata) external pure {
        revert("upg11"); // upg11 - interception of upgrade call
    }

    /// @notice Returns target of contract
    /// @return Actual implementation address
    function getTarget() public view returns (address target) {
        bytes32 position = targetPosition;
        assembly {
            target := sload(position)
        }
    }

    /// @notice Sets new target of contract
    /// @param _newTarget New actual implementation address
    function setTarget(address _newTarget) internal {
        bytes32 position = targetPosition;
        assembly {
            sstore(position, _newTarget)
        }
    }

    /// @notice Upgrades target
    /// @param newTarget New target
    /// @param newTargetUpgradeParameters New target upgrade parameters
    function upgradeTarget(address newTarget, bytes calldata newTargetUpgradeParameters) external {
        requireMaster(msg.sender);

        setTarget(newTarget);
        (bool upgradeSuccess, ) = getTarget().delegatecall(
            abi.encodeWithSignature("upgrade(bytes)", newTargetUpgradeParameters)
        );
        require(upgradeSuccess, "ufu11"); // ufu11 - target upgrade failed
    }

    /// @notice Performs a delegatecall to the contract implementation
    /// @dev Fallback function allowing to perform a delegatecall to the given implementation
    /// This function will return whatever the implementation call returns
    function() external payable {
        address _target = getTarget();
        assembly {
            // The pointer to the free memory slot
            let ptr := mload(0x40)
            // Copy function signature and arguments from calldata at zero position into memory at pointer position
            calldatacopy(ptr, 0x0, calldatasize)
            // Delegatecall method of the implementation contract, returns 0 on error
            let result := delegatecall(
                gas,
                _target,
                ptr,
                calldatasize,
                0x0,
                0
            )
            // Get the size of the last return data
            let size := returndatasize
            // Copy the size length of bytes from return data at zero position to pointer position
            returndatacopy(ptr, 0x0, size)
            // Depending on result value
            switch result
            case 0 {
                // End execution and revert state changes
                revert(ptr, size)
            }
            default {
                // Return data with length of size at pointers position
                return(ptr, size)
            }
        }
    }

    /// UpgradeableMaster functions

    /// @notice Notice period before activation preparation status of upgrade mode
    function getNoticePeriod() external returns (uint) {
        (bool success, bytes memory result) = getTarget().delegatecall(abi.encodeWithSignature("getNoticePeriod()"));
        require(success, "unp11"); // unp11 - upgradeNoticePeriod delegatecall failed
        return abi.decode(result, (uint));
    }

    /// @notice Notifies proxy contract that notice period started
    function upgradeNoticePeriodStarted() external {
        requireMaster(msg.sender);
        (bool success, ) = getTarget().delegatecall(abi.encodeWithSignature("upgradeNoticePeriodStarted()"));
        require(success, "nps11"); // nps11 - upgradeNoticePeriodStarted delegatecall failed
    }

    /// @notice Notifies proxy contract that upgrade preparation status is activated
    function upgradePreparationStarted() external {
        requireMaster(msg.sender);
        (bool success, ) = getTarget().delegatecall(abi.encodeWithSignature("upgradePreparationStarted()"));
        require(success, "ups11"); // ups11 - upgradePreparationStarted delegatecall failed
    }

    /// @notice Notifies proxy contract that upgrade canceled
    function upgradeCanceled() external {
        requireMaster(msg.sender);
        (bool success, ) = getTarget().delegatecall(abi.encodeWithSignature("upgradeCanceled()"));
        require(success, "puc11"); // puc11 - upgradeCanceled delegatecall failed
    }

    /// @notice Notifies proxy contract that upgrade finishes
    function upgradeFinishes() external {
        requireMaster(msg.sender);
        (bool success, ) = getTarget().delegatecall(abi.encodeWithSignature("upgradeFinishes()"));
        require(success, "puf11"); // puf11 - upgradeFinishes delegatecall failed
    }

    /// @notice Checks that contract is ready for upgrade
    /// @return bool flag indicating that contract is ready for upgrade
    function isReadyForUpgrade() external returns (bool) {
        (bool success, bytes memory result) = getTarget().delegatecall(abi.encodeWithSignature("isReadyForUpgrade()"));
        require(success, "rfu11"); // rfu11 - readyForUpgrade delegatecall failed
        return abi.decode(result, (bool));
    }

}

File 2 of 4 : Ownable.sol
pragma solidity ^0.5.0;

/// @title Ownable Contract
/// @author Matter Labs
/// @author ZKSwap L2 Labs
contract Ownable {

    /// @notice Storage position of the masters address (keccak256('eip1967.proxy.admin') - 1)
    bytes32 private constant masterPosition = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;

    /// @notice Contract constructor
    /// @dev Sets msg sender address as masters address
    /// @param masterAddress Master address
    constructor(address masterAddress) public {
        setMaster(masterAddress);
    }

    /// @notice Check if specified address is master
    /// @param _address Address to check
    function requireMaster(address _address) internal view {
        require(_address == getMaster(), "oro11"); // oro11 - only by master
    }

    /// @notice Returns contract masters address
    /// @return Masters address
    function getMaster() public view returns (address master) {
        bytes32 position = masterPosition;
        assembly {
            master := sload(position)
        }
    }

    /// @notice Sets new masters address
    /// @param _newMaster New masters address
    function setMaster(address _newMaster) internal {
        bytes32 position = masterPosition;
        assembly {
            sstore(position, _newMaster)
        }
    }

    /// @notice Transfer mastership of the contract to new master
    /// @param _newMaster New masters address
    function transferMastership(address _newMaster) external {
        requireMaster(msg.sender);
        require(_newMaster != address(0), "otp11"); // otp11 - new masters address can't be zero address
        setMaster(_newMaster);
    }

}

File 3 of 4 : Upgradeable.sol
pragma solidity ^0.5.0;


/// @title Interface of the upgradeable contract
/// @author Matter Labs
/// @author ZKSwap L2 Labs
interface Upgradeable {

    /// @notice Upgrades target of upgradeable contract
    /// @param newTarget New target
    /// @param newTargetInitializationParameters New target initialization parameters
    function upgradeTarget(address newTarget, bytes calldata newTargetInitializationParameters) external;

}

File 4 of 4 : UpgradeableMaster.sol
pragma solidity ^0.5.0;


/// @title Interface of the upgradeable master contract (defines notice period duration and allows finish upgrade during preparation of it)
/// @author Matter Labs
/// @author ZKSwap L2 Labs
interface UpgradeableMaster {

    /// @notice Notice period before activation preparation status of upgrade mode
    function getNoticePeriod() external returns (uint);

    /// @notice Notifies contract that notice period started
    function upgradeNoticePeriodStarted() external;

    /// @notice Notifies contract that upgrade preparation status is activated
    function upgradePreparationStarted() external;

    /// @notice Notifies contract that upgrade canceled
    function upgradeCanceled() external;

    /// @notice Notifies contract that upgrade finishes
    function upgradeFinishes() external;

    /// @notice Checks that contract is ready for upgrade
    /// @return bool flag indicating that contract is ready for upgrade
    function isReadyForUpgrade() external returns (bool);

}

Settings
{
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "optimizer": {
    "enabled": true,
    "runs": 200
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"targetInitializationParameters","type":"bytes"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"constant":true,"inputs":[],"name":"getMaster","outputs":[{"internalType":"address","name":"master","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"getNoticePeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getTarget","outputs":[{"internalType":"address","name":"target","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes","name":"","type":"bytes"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[],"name":"isReadyForUpgrade","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_newMaster","type":"address"}],"name":"transferMastership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes","name":"","type":"bytes"}],"name":"upgrade","outputs":[],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[],"name":"upgradeCanceled","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"upgradeFinishes","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"upgradeNoticePeriodStarted","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"upgradePreparationStarted","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newTarget","type":"address"},{"internalType":"bytes","name":"newTargetUpgradeParameters","type":"bytes"}],"name":"upgradeTarget","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x6080604052600436106100a75760003560e01c806378b91e701161006457806378b91e70146102ce578063871b8ff1146102e35780638773334c146102f8578063b269b9ae14610321578063c3f5968714610336578063f00e6a2a14610369576100a7565b806325394645146100d85780632a3174f4146101575780633b154b731461017e578063439fab91146101935780635a99719e146102105780636fc4914014610241575b60006100b161037a565b905060405136600082376000803683855af43d806000843e8180156100d4578184f35b8184fd5b3480156100e457600080fd5b50610155600480360360208110156100fb57600080fd5b81019060208101813564010000000081111561011657600080fd5b82018360208201111561012857600080fd5b8035906020019184600183028401116401000000008311171561014a57600080fd5b50909250905061039f565b005b34801561016357600080fd5b5061016c6103d4565b60408051918252519081900360200190f35b34801561018a57600080fd5b50610155610506565b34801561019f57600080fd5b50610155600480360360208110156101b657600080fd5b8101906020810181356401000000008111156101d157600080fd5b8201836020820111156101e357600080fd5b8035906020019184600183028401116401000000008311171561020557600080fd5b509092509050610622565b34801561021c57600080fd5b50610225610657565b604080516001600160a01b039092168252519081900360200190f35b34801561024d57600080fd5b506101556004803603604081101561026457600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561028f57600080fd5b8201836020820111156102a157600080fd5b803590602001918460018302840111640100000000831117156102c357600080fd5b50909250905061067c565b3480156102da57600080fd5b506101556107dc565b3480156102ef57600080fd5b506101556108f5565b34801561030457600080fd5b5061030d610a0e565b604080519115158252519081900360200190f35b34801561032d57600080fd5b50610155610b22565b34801561034257600080fd5b506101556004803603602081101561035957600080fd5b50356001600160a01b0316610c3b565b34801561037557600080fd5b506102255b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6040805162461bcd60e51b8152602060048201526005602482015264757067313160d81b604482015290519081900360640190fd5b60008060606103e161037a565b60408051600481526024810182526020810180516001600160e01b0316630a8c5d3d60e21b178152915181516001600160a01b039490941693919290918291908083835b602083106104445780518252601f199092019160209182019101610425565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146104a4576040519150601f19603f3d011682016040523d82523d6000602084013e6104a9565b606091505b5091509150816104e8576040805162461bcd60e51b8152602060048201526005602482015264756e70313160d81b604482015290519081900360640190fd5b8080602001905160208110156104fd57600080fd5b50519250505090565b61050f33610c90565b600061051961037a565b60408051600481526024810182526020810180516001600160e01b0316633b154b7360e01b178152915181516001600160a01b039490941693919290918291908083835b6020831061057c5780518252601f19909201916020918201910161055d565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146105dc576040519150601f19603f3d011682016040523d82523d6000602084013e6105e1565b606091505b505090508061061f576040805162461bcd60e51b81526020600482015260056024820152646e7073313160d81b604482015290519081900360640190fd5b50565b6040805162461bcd60e51b8152602060048201526005602482015264696e69313160d81b604482015290519081900360640190fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b61068533610c90565b61068e83610ce5565b600061069861037a565b6001600160a01b031683836040516024018080602001828103825284848281815260200192508082843760008382015260408051601f909201601f1990811690940182810390940182529283526020810180516001600160e01b0316632539464560e01b17815292518151919750955085945091925081905083835b602083106107335780518252601f199092019160209182019101610714565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610793576040519150601f19603f3d011682016040523d82523d6000602084013e610798565b606091505b50509050806107d6576040805162461bcd60e51b8152602060048201526005602482015264756675313160d81b604482015290519081900360640190fd5b50505050565b6107e533610c90565b60006107ef61037a565b60408051600481526024810182526020810180516001600160e01b031663078b91e760e41b178152915181516001600160a01b039490941693919290918291908083835b602083106108525780518252601f199092019160209182019101610833565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146108b2576040519150601f19603f3d011682016040523d82523d6000602084013e6108b7565b606091505b505090508061061f576040805162461bcd60e51b8152602060048201526005602482015264757073313160d81b604482015290519081900360640190fd5b6108fe33610c90565b600061090861037a565b60408051600481526024810182526020810180516001600160e01b031663871b8ff160e01b178152915181516001600160a01b039490941693919290918291908083835b6020831061096b5780518252601f19909201916020918201910161094c565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146109cb576040519150601f19603f3d011682016040523d82523d6000602084013e6109d0565b606091505b505090508061061f576040805162461bcd60e51b8152602060048201526005602482015264707563313160d81b604482015290519081900360640190fd5b6000806060610a1b61037a565b60408051600481526024810182526020810180516001600160e01b03166321dcccd360e21b178152915181516001600160a01b039490941693919290918291908083835b60208310610a7e5780518252601f199092019160209182019101610a5f565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610ade576040519150601f19603f3d011682016040523d82523d6000602084013e610ae3565b606091505b5091509150816104e8576040805162461bcd60e51b8152602060048201526005602482015264726675313160d81b604482015290519081900360640190fd5b610b2b33610c90565b6000610b3561037a565b60408051600481526024810182526020810180516001600160e01b0316635934dcd760e11b178152915181516001600160a01b039490941693919290918291908083835b60208310610b985780518252601f199092019160209182019101610b79565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610bf8576040519150601f19603f3d011682016040523d82523d6000602084013e610bfd565b606091505b505090508061061f576040805162461bcd60e51b8152602060048201526005602482015264707566313160d81b604482015290519081900360640190fd5b610c4433610c90565b6001600160a01b038116610c87576040805162461bcd60e51b81526020600482015260056024820152646f7470313160d81b604482015290519081900360640190fd5b61061f81610d09565b610c98610657565b6001600160a01b0316816001600160a01b03161461061f576040805162461bcd60e51b81526020600482015260056024820152646f726f313160d81b604482015290519081900360640190fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035556fea265627a7a72315820887822604a75792d7c61bc7a541a82b76130e7c9f7c392be6ad0b665d0c7c37064736f6c63430005100032

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.