Overview
ETH Balance
ETH Value
$0.00| Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Advanced mode:
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 1805080 | 771 days ago | Contract Creation | 0 ETH |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
Proxy
Compiler Version
v0.8.18+commit.87f61d96
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity ^0.8.0;
// SPDX-License-Identifier: MIT OR Apache-2.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
contract Proxy is Upgradeable, 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);
// solhint-disable-next-line avoid-low-level-calls
(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 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
function upgradeTarget(address newTarget) external override {
requireMaster(msg.sender);
setTarget(newTarget);
}
/// @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();
}
}pragma solidity ^0.8.0;
// SPDX-License-Identifier: MIT OR Apache-2.0
/// @title Ownable Contract
/// @author Matter Labs
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) {
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);
}
}pragma solidity ^0.8.0;
// SPDX-License-Identifier: MIT OR Apache-2.0
/// @title Interface of the upgradeable contract
/// @author Matter Labs
interface Upgradeable {
/// @notice Upgrades target of upgradeable contract
/// @param newTarget New target
function upgradeTarget(address newTarget) external;
}pragma solidity ^0.8.0;
// SPDX-License-Identifier: MIT OR Apache-2.0
/// @title Interface of the upgradeable master contract (defines notice period duration and allows finish upgrade during preparation of it)
/// @author Matter Labs
interface UpgradeableMaster {
/// @notice Notice period before activation preparation status of upgrade mode
function getNoticePeriod() external returns (uint256);
/// @notice Checks that contract is ready for upgrade
/// @return bool flag indicating that contract is ready for upgrade
function isReadyForUpgrade() external returns (bool);
}{
"viaIR": true,
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"targetInitializationParameters","type":"bytes"}],"stateMutability":"nonpayable","type":"constructor"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"getMaster","outputs":[{"internalType":"address","name":"master","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTarget","outputs":[{"internalType":"address","name":"target","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"","type":"bytes"}],"name":"initialize","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_newMaster","type":"address"}],"name":"transferMastership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newTarget","type":"address"}],"name":"upgradeTarget","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
60806040908082523461019857610532803803809161001e828561019d565b833981018282820312610198578151906001600160a01b03821682036101985760208381015190936001600160401b03821161019857019181601f840112156101985782519161006d836101d6565b9061007a8751928361019d565b838252858201908685870101116101985761009c6000959482888897016101f1565b337fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355827f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5561012b6064885180936101148a83019663439fab9160e01b88528b6024850152518092816044860152858501906101f1565b601f8019910116810103604481018452018261019d565b51915af43d15610193573d61013f816101d6565b9061014c8551928361019d565b81526000833d92013e5b1561016957505161031d90816102158239f35b606491519062461bcd60e51b82526004820152600560248201526475696e313160d81b6044820152fd5b610156565b600080fd5b601f909101601f19168101906001600160401b038211908210176101c057604052565b634e487b7160e01b600052604160045260246000fd5b6001600160401b0381116101c057601f01601f191660200190565b60005b8381106102045750506000910152565b81810151838201526020016101f456fe60806040526004361015610018575b366102a4576102a4565b6000803560e01c908163439fab911461006b575080635a99719e1461006657806382e7a14c14610061578063c3f596871461005c5763f00e6a2a0361000e576101fc565b610188565b61014d565b6100de565b346100d75760203660031901126100d75760043567ffffffffffffffff8082116100da57366023830112156100da5781600401359081116100da57369101602401116100d75762461bcd60e51b6080526020608452600560a45264696e69313160d81b60c45260646080fd5b80fd5b8280fd5b34610126576000366003190112610126577fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546040516001600160a01b039091168152602090f35b600080fd5b6020906003190112610126576004356001600160a01b03811681036101265790565b346101265761015b3661012b565b61016433610244565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55005b34610126576101963661012b565b61019f33610244565b6001600160a01b038116156101d2577fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355005b60405162461bcd60e51b81526020600482015260026024820152610c5960f21b6044820152606490fd5b34610126576000366003190112610126577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040516001600160a01b039091168152602090f35b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b0390811691160361027a57565b60405162461bcd60e51b8152602060048201526002602482015261316360f01b6044820152606490fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460008060405192368285378336915af4903d91826000833e156102e557f35bfdfea26469706673582212208b790aa68e3e9e957eef060249709f8a442c64e0d44f8699fe2c43d6eac73d3c64736f6c634300081200330000000000000000000000003545fb62209935ab6038f3a1b40403ddffe6e49c00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x60806040526004361015610018575b366102a4576102a4565b6000803560e01c908163439fab911461006b575080635a99719e1461006657806382e7a14c14610061578063c3f596871461005c5763f00e6a2a0361000e576101fc565b610188565b61014d565b6100de565b346100d75760203660031901126100d75760043567ffffffffffffffff8082116100da57366023830112156100da5781600401359081116100da57369101602401116100d75762461bcd60e51b6080526020608452600560a45264696e69313160d81b60c45260646080fd5b80fd5b8280fd5b34610126576000366003190112610126577fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546040516001600160a01b039091168152602090f35b600080fd5b6020906003190112610126576004356001600160a01b03811681036101265790565b346101265761015b3661012b565b61016433610244565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55005b34610126576101963661012b565b61019f33610244565b6001600160a01b038116156101d2577fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355005b60405162461bcd60e51b81526020600482015260026024820152610c5960f21b6044820152606490fd5b34610126576000366003190112610126577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040516001600160a01b039091168152602090f35b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b0390811691160361027a57565b60405162461bcd60e51b8152602060048201526002602482015261316360f01b6044820152606490fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5460008060405192368285378336915af4903d91826000833e156102e557f35bfdfea26469706673582212208b790aa68e3e9e957eef060249709f8a442c64e0d44f8699fe2c43d6eac73d3c64736f6c63430008120033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000003545fb62209935ab6038f3a1b40403ddffe6e49c00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : target (address): 0x3545fB62209935AB6038f3a1b40403DDFFe6E49c
Arg [1] : targetInitializationParameters (bytes): 0x
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000003545fb62209935ab6038f3a1b40403ddffe6e49c
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
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.