Address Contract Verified
Address
0x8E5C7EFC9636A6A0408A46BB7F617094B81e5dba
Balance
0.022500 ETH
Nonce
1
Code Size
610 bytes
Creator
Create2 Deployer at tx 0x358604d7...141ec5
Indexed Transactions
0
Contract Bytecode
610 bytes
0x6080604052366100135761001161001d565b005b61001b61001d565b005b6000610027610093565b90503660008037600080366000845af43d6000803e806000811461004a573d6000f35b3d6000fd5b600080823b905060008111915050919050565b6000806040516020016100749061017a565b6040516020818303038152906040528051906020012090508091505090565b600061009d6100c6565b60000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000806040516020016100d89061020c565b6040516020818303038152906040528051906020012090508091505090565b600082825260208201905092915050565b7f696f2e73796e7468657469782e636f72652d636f6e7472616374732e4f776e6160008201527f626c650000000000000000000000000000000000000000000000000000000000602082015250565b60006101646023836100f7565b915061016f82610108565b604082019050919050565b6000602082019050818103600083015261019381610157565b9050919050565b7f696f2e73796e7468657469782e636f72652d636f6e7472616374732e50726f7860008201527f7900000000000000000000000000000000000000000000000000000000000000602082015250565b60006101f66021836100f7565b91506102018261019a565b604082019050919050565b60006020820190508181036000830152610225816101e9565b905091905056fea26469706673582212203ce044cd786ae2b76d62e6154652e1ade70f6a3afea3671b053c02be77e9ca4764736f6c63430008110033
Verified Source Code Full Match
Compiler: v0.8.17+commit.8df45f5f
EVM: london
Optimization: No
Proxy.sol 9 lines
//SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import {UUPSProxyWithOwner} from "@synthetixio/core-contracts/contracts/proxy/UUPSProxyWithOwner.sol";
contract Proxy is UUPSProxyWithOwner {
// solhint-disable-next-line no-empty-blocks
constructor(address firstImplementation, address initialOwner) UUPSProxyWithOwner(firstImplementation, initialOwner) {}
}
UUPSProxy.sol 25 lines
//SPDX-License-Identifier: MIT
pragma solidity >=0.8.11 <0.9.0;
import "./AbstractProxy.sol";
import "./ProxyStorage.sol";
import "../errors/AddressError.sol";
import "../utils/AddressUtil.sol";
contract UUPSProxy is AbstractProxy, ProxyStorage {
constructor(address firstImplementation) {
if (firstImplementation == address(0)) {
revert AddressError.ZeroAddress();
}
if (!AddressUtil.isContract(firstImplementation)) {
revert AddressError.NotAContract(firstImplementation);
}
_proxyStore().implementation = firstImplementation;
}
function _getImplementation() internal view virtual override returns (address) {
return _proxyStore().implementation;
}
}
AddressUtil.sol 14 lines
//SPDX-License-Identifier: MIT
pragma solidity >=0.8.11 <0.9.0;
library AddressUtil {
function isContract(address account) internal view returns (bool) {
uint256 size;
assembly {
size := extcodesize(account)
}
return size > 0;
}
}
AccessError.sol 13 lines
//SPDX-License-Identifier: MIT
pragma solidity >=0.8.11 <0.9.0;
/**
* @title Library for access related errors.
*/
library AccessError {
/**
* @dev Thrown when an address tries to perform an unauthorized action.
* @param addr The address that attempts the action.
*/
error Unauthorized(address addr);
}
ProxyStorage.sol 19 lines
//SPDX-License-Identifier: MIT
pragma solidity >=0.8.11 <0.9.0;
contract ProxyStorage {
bytes32 private constant _SLOT_PROXY_STORAGE =
keccak256(abi.encode("io.synthetix.core-contracts.Proxy"));
struct ProxyStore {
address implementation;
bool simulatingUpgrade;
}
function _proxyStore() internal pure returns (ProxyStore storage store) {
bytes32 s = _SLOT_PROXY_STORAGE;
assembly {
store.slot := s
}
}
}
AddressError.sol 18 lines
//SPDX-License-Identifier: MIT
pragma solidity >=0.8.11 <0.9.0;
/**
* @title Library for address related errors.
*/
library AddressError {
/**
* @dev Thrown when a zero address was passed as a function parameter (0x0000000000000000000000000000000000000000).
*/
error ZeroAddress();
/**
* @dev Thrown when an address representing a contract is expected, but no code is found at the address.
* @param contr The address that was expected to be a contract.
*/
error NotAContract(address contr);
}
AbstractProxy.sol 35 lines
//SPDX-License-Identifier: MIT
pragma solidity >=0.8.11 <0.9.0;
abstract contract AbstractProxy {
fallback() external payable {
_forward();
}
receive() external payable {
_forward();
}
function _forward() internal {
address implementation = _getImplementation();
// solhint-disable-next-line no-inline-assembly
assembly {
calldatacopy(0, 0, calldatasize())
let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)
returndatacopy(0, 0, returndatasize())
switch result
case 0 {
revert(0, returndatasize())
}
default {
return(0, returndatasize())
}
}
}
function _getImplementation() internal view virtual returns (address);
}
OwnableStorage.sol 32 lines
//SPDX-License-Identifier: MIT
pragma solidity >=0.8.11 <0.9.0;
import "../errors/AccessError.sol";
library OwnableStorage {
bytes32 private constant _SLOT_OWNABLE_STORAGE =
keccak256(abi.encode("io.synthetix.core-contracts.Ownable"));
struct Data {
bool initialized;
address owner;
address nominatedOwner;
}
function load() internal pure returns (Data storage store) {
bytes32 s = _SLOT_OWNABLE_STORAGE;
assembly {
store.slot := s
}
}
function onlyOwner() internal view {
if (msg.sender != getOwner()) {
revert AccessError.Unauthorized(msg.sender);
}
}
function getOwner() internal view returns (address) {
return OwnableStorage.load().owner;
}
}
UUPSProxyWithOwner.sol 12 lines
//SPDX-License-Identifier: MIT
pragma solidity >=0.8.11 <0.9.0;
import {UUPSProxy} from "./UUPSProxy.sol";
import {OwnableStorage} from "../ownership/OwnableStorage.sol";
contract UUPSProxyWithOwner is UUPSProxy {
// solhint-disable-next-line no-empty-blocks
constructor(address firstImplementation, address initialOwner) UUPSProxy(firstImplementation) {
OwnableStorage.load().owner = initialOwner;
}
}
Recent Transactions
No transactions found for this address