Sepolia Testnet

Contract

0x00e793B4ad1eCf68e660BB798c16a2Ea438C0A29

Overview

ETH Balance

0 ETH

Multichain Info

N/A
Transaction Hash
Method
Block
From
To
Value
Set Target54873462024-03-14 23:52:4896 days ago1710460368IN
0x00e793B4...a438C0A29
0 ETH0.000010050.21362644
0x6080604054872082024-03-14 23:23:3696 days ago1710458616IN
 Create: Proxy
0 ETH0.000057770.14095893

Advanced mode:
Parent Transaction Hash Block From To Value
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Proxy

Compiler Version
v0.5.16+commit.9c3226ce

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2024-03-15
*/

/*

Note:

This is a PROXY contract, it defers requests to its underlying TARGET contract. 
Always use this address in your applications and never the TARGET as it is liable to change.

*//*
   ____            __   __        __   _
  / __/__ __ ___  / /_ / /  ___  / /_ (_)__ __
 _\ \ / // // _ \/ __// _ \/ -_)/ __// / \ \ /
/___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\
     /___/

* Synthetix: Proxy.sol
*
* Latest source (may be newer): https://github.com/Synthetixio/synthetix/blob/master/contracts/Proxy.sol
* Docs: https://docs.synthetix.io/contracts/Proxy
*
* Contract Dependencies: 
*	- Owned
* Libraries: (none)
*
* MIT License
* ===========
*
* Copyright (c) 2024 Synthetix
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/



pragma solidity ^0.5.16;

// https://docs.synthetix.io/contracts/source/contracts/owned
contract Owned {
    address public owner;
    address public nominatedOwner;

    constructor(address _owner) public {
        require(_owner != address(0), "Owner address cannot be 0");
        owner = _owner;
        emit OwnerChanged(address(0), _owner);
    }

    function nominateNewOwner(address _owner) external onlyOwner {
        nominatedOwner = _owner;
        emit OwnerNominated(_owner);
    }

    function acceptOwnership() external {
        require(msg.sender == nominatedOwner, "You must be nominated before you can accept ownership");
        emit OwnerChanged(owner, nominatedOwner);
        owner = nominatedOwner;
        nominatedOwner = address(0);
    }

    modifier onlyOwner {
        _onlyOwner();
        _;
    }

    function _onlyOwner() private view {
        require(msg.sender == owner, "Only the contract owner may perform this action");
    }

    event OwnerNominated(address newOwner);
    event OwnerChanged(address oldOwner, address newOwner);
}


// Inheritance


// Internal references


// https://docs.synthetix.io/contracts/source/contracts/proxyable
contract Proxyable is Owned {
    // This contract should be treated like an abstract contract

    /* The proxy this contract exists behind. */
    Proxy public proxy;

    /* The caller of the proxy, passed through to this contract.
     * Note that every function using this member must apply the onlyProxy or
     * optionalProxy modifiers, otherwise their invocations can use stale values. */
    address public messageSender;

    constructor(address payable _proxy) internal {
        // This contract is abstract, and thus cannot be instantiated directly
        require(owner != address(0), "Owner must be set");

        proxy = Proxy(_proxy);
        emit ProxyUpdated(_proxy);
    }

    function setProxy(address payable _proxy) external onlyOwner {
        proxy = Proxy(_proxy);
        emit ProxyUpdated(_proxy);
    }

    function setMessageSender(address sender) external onlyProxy {
        messageSender = sender;
    }

    modifier onlyProxy {
        _onlyProxy();
        _;
    }

    function _onlyProxy() private view {
        require(Proxy(msg.sender) == proxy, "Only the proxy can call");
    }

    modifier optionalProxy {
        _optionalProxy();
        _;
    }

    function _optionalProxy() private {
        if (Proxy(msg.sender) != proxy && messageSender != msg.sender) {
            messageSender = msg.sender;
        }
    }

    modifier optionalProxy_onlyOwner {
        _optionalProxy_onlyOwner();
        _;
    }

    // solhint-disable-next-line func-name-mixedcase
    function _optionalProxy_onlyOwner() private {
        if (Proxy(msg.sender) != proxy && messageSender != msg.sender) {
            messageSender = msg.sender;
        }
        require(messageSender == owner, "Owner only function");
    }

    event ProxyUpdated(address proxyAddress);
}


// Inheritance


// Internal references


// https://docs.synthetix.io/contracts/source/contracts/proxy
contract Proxy is Owned {
    Proxyable public target;

    constructor(address _owner) public Owned(_owner) {}

    function setTarget(Proxyable _target) external onlyOwner {
        target = _target;
        emit TargetUpdated(_target);
    }

    function _emit(
        bytes calldata callData,
        uint numTopics,
        bytes32 topic1,
        bytes32 topic2,
        bytes32 topic3,
        bytes32 topic4
    ) external onlyTarget {
        uint size = callData.length;
        bytes memory _callData = callData;

        assembly {
            /* The first 32 bytes of callData contain its length (as specified by the abi).
             * Length is assumed to be a uint256 and therefore maximum of 32 bytes
             * in length. It is also leftpadded to be a multiple of 32 bytes.
             * This means moving call_data across 32 bytes guarantees we correctly access
             * the data itself. */
            switch numTopics
                case 0 {
                    log0(add(_callData, 32), size)
                }
                case 1 {
                    log1(add(_callData, 32), size, topic1)
                }
                case 2 {
                    log2(add(_callData, 32), size, topic1, topic2)
                }
                case 3 {
                    log3(add(_callData, 32), size, topic1, topic2, topic3)
                }
                case 4 {
                    log4(add(_callData, 32), size, topic1, topic2, topic3, topic4)
                }
        }
    }

    // solhint-disable no-complex-fallback
    function() external payable {
        // Mutable call setting Proxyable.messageSender as this is using call not delegatecall
        target.setMessageSender(msg.sender);

        assembly {
            let free_ptr := mload(0x40)
            calldatacopy(free_ptr, 0, calldatasize)

            /* We must explicitly forward ether to the underlying contract as well. */
            let result := call(gas, sload(target_slot), callvalue, free_ptr, calldatasize, 0, 0)
            returndatacopy(free_ptr, 0, returndatasize)

            if iszero(result) {
                revert(free_ptr, returndatasize)
            }
            return(free_ptr, returndatasize)
        }
    }

    modifier onlyTarget {
        require(Proxyable(msg.sender) == target, "Must be proxy target");
        _;
    }

    event TargetUpdated(Proxyable newTarget);
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract Proxyable","name":"newTarget","type":"address"}],"name":"TargetUpdated","type":"event"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"constant":false,"inputs":[{"internalType":"bytes","name":"callData","type":"bytes"},{"internalType":"uint256","name":"numTopics","type":"uint256"},{"internalType":"bytes32","name":"topic1","type":"bytes32"},{"internalType":"bytes32","name":"topic2","type":"bytes32"},{"internalType":"bytes32","name":"topic3","type":"bytes32"},{"internalType":"bytes32","name":"topic4","type":"bytes32"}],"name":"_emit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"acceptOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"nominatedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"contract Proxyable","name":"_target","type":"address"}],"name":"setTarget","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"target","outputs":[{"internalType":"contract Proxyable","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b506040516106ee3803806106ee8339818101604052602081101561003357600080fd5b5051806001600160a01b038116610091576040805162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f74206265203000000000000000604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b038316908117825560408051928352602083019190915280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a150506105f4806100fa6000396000f3fe6080604052600436106100705760003560e01c806379ba50971161004e57806379ba5097146101925780638da5cb5b146101a7578063907dff97146101bc578063d4b839921461025157610070565b80631627540c146100f957806353a47bb71461012e578063776d1a011461015f575b60025460408051635e33fc1960e11b815233600482015290516001600160a01b039092169163bc67f8329160248082019260009290919082900301818387803b1580156100bc57600080fd5b505af11580156100d0573d6000803e3d6000fd5b5050505060405136600082376000803683346002545af13d6000833e806100f5573d82fd5b3d82f35b34801561010557600080fd5b5061012c6004803603602081101561011c57600080fd5b50356001600160a01b0316610266565b005b34801561013a57600080fd5b506101436102c2565b604080516001600160a01b039092168252519081900360200190f35b34801561016b57600080fd5b5061012c6004803603602081101561018257600080fd5b50356001600160a01b03166102d1565b34801561019e57600080fd5b5061012c61032d565b3480156101b357600080fd5b506101436103e9565b3480156101c857600080fd5b5061012c600480360360c08110156101df57600080fd5b8101906020810181356401000000008111156101fa57600080fd5b82018360208201111561020c57600080fd5b8035906020019184600183028401116401000000008311171561022e57600080fd5b9193509150803590602081013590604081013590606081013590608001356103f8565b34801561025d57600080fd5b50610143610501565b61026e610510565b600180546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b6001546001600160a01b031681565b6102d9610510565b600280546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f814250a3b8c79fcbe2ead2c131c952a278491c8f4322a79fe84b5040a810373e9181900360200190a150565b6001546001600160a01b031633146103765760405162461bcd60e51b815260040180806020018281038252603581526020018061055c6035913960400191505060405180910390fd5b600054600154604080516001600160a01b03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b031681565b6002546001600160a01b0316331461044e576040805162461bcd60e51b8152602060048201526014602482015273135d5cdd081899481c1c9bde1e481d185c99d95d60621b604482015290519081900360640190fd5b604080516020601f89018190048102820181019092528781528791606091908a9084908190840183828082843760009201919091525092935089925050811590506104b857600181146104c357600281146104cf57600381146104dc57600481146104ea576104f5565b8260208301a06104f5565b868360208401a16104f5565b85878460208501a26104f5565b8486888560208601a36104f5565b838587898660208701a45b50505050505050505050565b6002546001600160a01b031681565b6000546001600160a01b031633146105595760405162461bcd60e51b815260040180806020018281038252602f815260200180610591602f913960400191505060405180910390fd5b56fe596f75206d757374206265206e6f6d696e61746564206265666f726520796f752063616e20616363657074206f776e6572736869704f6e6c792074686520636f6e7472616374206f776e6572206d617920706572666f726d207468697320616374696f6ea265627a7a72315820b0d001e9525ea4f2f7842efe5ededd72396bc2f123977d2e863c909751f76f8664736f6c6343000510003200000000000000000000000048914229dedd5a9922f44441ffccfc2cb7856ee9

Deployed Bytecode

0x6080604052600436106100705760003560e01c806379ba50971161004e57806379ba5097146101925780638da5cb5b146101a7578063907dff97146101bc578063d4b839921461025157610070565b80631627540c146100f957806353a47bb71461012e578063776d1a011461015f575b60025460408051635e33fc1960e11b815233600482015290516001600160a01b039092169163bc67f8329160248082019260009290919082900301818387803b1580156100bc57600080fd5b505af11580156100d0573d6000803e3d6000fd5b5050505060405136600082376000803683346002545af13d6000833e806100f5573d82fd5b3d82f35b34801561010557600080fd5b5061012c6004803603602081101561011c57600080fd5b50356001600160a01b0316610266565b005b34801561013a57600080fd5b506101436102c2565b604080516001600160a01b039092168252519081900360200190f35b34801561016b57600080fd5b5061012c6004803603602081101561018257600080fd5b50356001600160a01b03166102d1565b34801561019e57600080fd5b5061012c61032d565b3480156101b357600080fd5b506101436103e9565b3480156101c857600080fd5b5061012c600480360360c08110156101df57600080fd5b8101906020810181356401000000008111156101fa57600080fd5b82018360208201111561020c57600080fd5b8035906020019184600183028401116401000000008311171561022e57600080fd5b9193509150803590602081013590604081013590606081013590608001356103f8565b34801561025d57600080fd5b50610143610501565b61026e610510565b600180546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b6001546001600160a01b031681565b6102d9610510565b600280546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f814250a3b8c79fcbe2ead2c131c952a278491c8f4322a79fe84b5040a810373e9181900360200190a150565b6001546001600160a01b031633146103765760405162461bcd60e51b815260040180806020018281038252603581526020018061055c6035913960400191505060405180910390fd5b600054600154604080516001600160a01b03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b031681565b6002546001600160a01b0316331461044e576040805162461bcd60e51b8152602060048201526014602482015273135d5cdd081899481c1c9bde1e481d185c99d95d60621b604482015290519081900360640190fd5b604080516020601f89018190048102820181019092528781528791606091908a9084908190840183828082843760009201919091525092935089925050811590506104b857600181146104c357600281146104cf57600381146104dc57600481146104ea576104f5565b8260208301a06104f5565b868360208401a16104f5565b85878460208501a26104f5565b8486888560208601a36104f5565b838587898660208701a45b50505050505050505050565b6002546001600160a01b031681565b6000546001600160a01b031633146105595760405162461bcd60e51b815260040180806020018281038252602f815260200180610591602f913960400191505060405180910390fd5b56fe596f75206d757374206265206e6f6d696e61746564206265666f726520796f752063616e20616363657074206f776e6572736869704f6e6c792074686520636f6e7472616374206f776e6572206d617920706572666f726d207468697320616374696f6ea265627a7a72315820b0d001e9525ea4f2f7842efe5ededd72396bc2f123977d2e863c909751f76f8664736f6c63430005100032

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000048914229dedd5a9922f44441ffccfc2cb7856ee9

-----Decoded View---------------
Arg [0] : _owner (address): 0x48914229deDd5A9922f44441ffCCfC2Cb7856Ee9

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000048914229dedd5a9922f44441ffccfc2cb7856ee9


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.