Address Contract Verified
Address
0xa464DA0B43f80EE3FfC4795cbbFC78472b5c81A1
Balance
0 ETH
Nonce
1
Code Size
1367 bytes
Creator
0x8ab6D03b...4F4b at tx 0x22849619...bb34b9
Proxy
EIP-1967 Proxy Implementation: 0x46D3C0c0...1f08
Indexed Transactions
0
Contract Bytecode
1367 bytes
0x60806040526004361015610018575b366104e0576104e0565b5f3560e01c80632539464514610077578063439fab91146100725780635a99719e1461006d5780636fc4914014610068578063c3f59687146100635763f00e6a2a0361000e57610388565b6102ef565b6101d5565b61017a565b610126565b346100c557610085366100f7565b505062461bcd60e51b6080526020608452600560a4527f757067313100000000000000000000000000000000000000000000000000000060c45260646080fd5b5f80fd5b9181601f840112156100c55782359167ffffffffffffffff83116100c557602083818601950101116100c557565b60206003198201126100c5576004359067ffffffffffffffff82116100c557610122916004016100c9565b9091565b346100c557610134366100f7565b5050606460405162461bcd60e51b815260206004820152600560248201527f696e6931310000000000000000000000000000000000000000000000000000006044820152fd5b346100c5575f3660031901126100c55760207fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b0360405191168152f35b600435906001600160a01b03821682036100c557565b346100c55760403660031901126100c5576101ee6101bf565b60243567ffffffffffffffff918282116100c5575f8091610215601f9436906004016100c9565b61021e33610467565b827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc556102a3606460405183819460208301967f253946450000000000000000000000000000000000000000000000000000000088526020602485015281604485015284840137878382840101528919998a91011681010360448101845201826103fa565b51915af4903d156102e4573d9283116102df576102dd926102cf602060405193601f84011601836103fa565b81525f60203d92013e61041c565b005b6103cd565b506102dd915061041c565b346100c55760203660031901126100c5576103086101bf565b61031133610467565b6001600160a01b03811615610344577fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355005b606460405162461bcd60e51b815260206004820152600260248201527f31640000000000000000000000000000000000000000000000000000000000006044820152fd5b346100c5575f3660031901126100c55760207f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b0360405191168152f35b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b90601f8019910116810190811067ffffffffffffffff8211176102df57604052565b1561042357565b606460405162461bcd60e51b815260206004820152600560248201527f75667531310000000000000000000000000000000000000000000000000000006044820152fd5b6001600160a01b03807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103541691160361049c57565b606460405162461bcd60e51b815260206004820152600260248201527f31630000000000000000000000000000000000000000000000000000000000006044820152fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545f8060405192368285378336915af4903d91825f833e1561051f57f35bfdfea26469706673582212205904327459cba8309eeb73374e62a40068b4b5ee65643533bb979cc8d8caa90e64736f6c63430008190033
Verified Source Code Full Match
Compiler: v0.8.25+commit.b61c2a91
EVM: cancun
Optimization: Yes (1000 runs)
IUpgradeable.sol 12 lines
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity 0.8.25;
/// @title Interface of the upgradeable contract
/// @author Matter Labs (https://github.com/matter-labs/zksync/blob/master/contracts/contracts/Upgradeable.sol)
interface IUpgradeable {
/// @notice Upgrades target of upgradeable contract
/// @param newTarget New target
/// @param newTargetInitializationParameters New target initialization parameters
function upgradeTarget(address newTarget, bytes calldata newTargetInitializationParameters) external;
}
Ownable.sol 50 lines
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity 0.8.25;
/// @title Ownable Contract
/// @author Matter Labs (https://github.com/matter-labs/zksync/blob/master/contracts/contracts/Ownable.sol)
contract Ownable {
/// @dev Storage position of the masters address (keccak256('eip1967.proxy.admin') - 1)
bytes32 private constant MASTER_POSITION = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;
/// @notice Contract constructor
/// @dev Sets msg sender address as masters address
/// @param masterAddress Master address
constructor(address masterAddress) {
require(masterAddress != address(0), "1b"); // oro11 - master address can't be zero address
setMaster(masterAddress);
}
/// @notice Check if specified address is master
/// @param _address Address to check
function requireMaster(address _address) internal view {
require(_address == getMaster(), "1c"); // oro11 - only by master
}
/// @notice Returns contract masters address
/// @return master Master's address
function getMaster() public view returns (address master) {
bytes32 position = MASTER_POSITION;
assembly {
master := sload(position)
}
}
/// @dev Sets new masters address
/// @param _newMaster New master's address
function setMaster(address _newMaster) internal {
bytes32 position = MASTER_POSITION;
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), "1d"); // otp11 - new masters address can't be zero address
setMaster(_newMaster);
}
}
Proxy.sol 102 lines
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity 0.8.25;
import "./Ownable.sol";
import "./IUpgradeable.sol";
/// @title Proxy Contract
/// @author Matter Labs (https://github.com/matter-labs/zksync/blob/master/contracts/contracts/Proxy.sol)
/// @notice Modified to not implement UpgradeableMaster, UpgradeGatekeeper implements the UpgradeableMaster interface
contract Proxy is IUpgradeable, Ownable {
/// @dev Storage position of "target" (actual implementation address: keccak256('eip1967.proxy.implementation') - 1)
bytes32 private constant TARGET_POSITION = 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) {
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 target Actual implementation address
function getTarget() public view returns (address target) {
bytes32 position = TARGET_POSITION;
assembly {
target := sload(position)
}
}
/// @notice Sets new target of contract
/// @param _newTarget New actual implementation address
function setTarget(address _newTarget) internal {
bytes32 position = TARGET_POSITION;
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 override {
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 _fallback() internal {
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)
}
}
}
/// @notice Will run when no functions matches call data
fallback() external payable {
_fallback();
}
/// @notice Same as fallback but called when calldata is empty
receive() external payable {
_fallback();
}
}
Read Contract
getMaster 0x5a99719e → address
getTarget 0xf00e6a2a → address
initialize 0x439fab91
upgrade 0x25394645
Write Contract 2 functions
These functions modify contract state and require a wallet transaction to execute.
transferMastership 0xc3f59687
address _newMaster
upgradeTarget 0x6fc49140
address newTarget
bytes newTargetUpgradeParameters
Recent Transactions
No transactions found for this address