Contract 0xD7fE7881cD50fc155Bc310224352A812214e1E50

Contract Overview

Balance:
0 Ether

Token:
Txn Hash
Method
Block
From
To
Value
0x4280ceb132d9cc4be441df546c157465558e36a369c6114c7b3c567c3b285575Submit125520502022-07-08 16:04:4882 days 16 hrs ago0x2b5303771e86b5c1476f35e36bf8a914212ee553 IN  0xd7fe7881cd50fc155bc310224352a812214e1e500 Ether0.00027408 1.5
0x97d208c7717d2715913606402e49afb3f2ae6d1932747fe8e5af5a4b831d7efeSubmit125231512022-07-04 11:01:1286 days 21 hrs ago0x2b5303771e86b5c1476f35e36bf8a914212ee553 IN  0xd7fe7881cd50fc155bc310224352a812214e1e500 Ether0.00026702 1.5
0xb8b28c69f7b5e7eb7bc3d5c5531ecdfa5ddf9a9f016619be3e6bb7eb335f1a19Submit122950022022-05-24 18:24:21127 days 13 hrs ago0x62a3d8a878beef2ba024bbc26c5be9d2ee4dde7e IN  0xd7fe7881cd50fc155bc310224352a812214e1e500 Ether0.00081816 4.59600256
0x54d42706b7a9291f7aa091f2661e4a5ba78d38913ae65f1915148f0b18264ff7Submit122108732022-04-22 9:34:59159 days 22 hrs ago0x7cd64b87251f793027590c34b206145c3aa362ae IN  0xd7fe7881cd50fc155bc310224352a812214e1e500 Ether0.02313204 129.93562034
0x4887c071bd52c1500563c29912c499ca81d46d5e91da4cd9e241f07eb18eae77Submit122093982022-04-21 13:50:29160 days 18 hrs ago0x7cd64b87251f793027590c34b206145c3aa362ae IN  0xd7fe7881cd50fc155bc310224352a812214e1e500 Ether0.04410726 247.76994292
0xaa25e268dd4a7eb7cee90a92e7e235a24f015952f8061ccde316026d69418922Resume122092472022-04-21 11:40:59160 days 20 hrs ago0x02139137fdd974181a49268d7b0ae888634e5469 IN  0xd7fe7881cd50fc155bc310224352a812214e1e500 Ether0.0147771300
0xae1f7e8d7bfb7574f145013fe5377e98bb9b644abef7ca1846d896b8f05f360dConfigure122092452022-04-21 11:39:37160 days 20 hrs ago0x02139137fdd974181a49268d7b0ae888634e5469 IN  0xd7fe7881cd50fc155bc310224352a812214e1e500 Ether0.0575607300
0x6e333a95a9ab10e412c5a5709563afe58fac6930a2c3852d950f1cda5f6e7e98Initialize122092442022-04-21 11:38:07160 days 20 hrs ago0x02139137fdd974181a49268d7b0ae888634e5469 IN  0xd7fe7881cd50fc155bc310224352a812214e1e500 Ether0.0538962300
0xeb638d4fa66660a8634879bb57bf4c998b2b41579993a4485667c5870a077fbe0x60806040122092432022-04-21 11:37:22160 days 20 hrs ago0x02139137fdd974181a49268d7b0ae888634e5469 IN  Create: AnchorVaultProxy0 Ether0.1671198300
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x4280ceb132d9cc4be441df546c157465558e36a369c6114c7b3c567c3b285575125520502022-07-08 16:04:4882 days 16 hrs ago 0xd7fe7881cd50fc155bc310224352a812214e1e50 0x3e6586e144cd0dce44c8fdc7d28cc8cf656f3b360 Ether
0x4280ceb132d9cc4be441df546c157465558e36a369c6114c7b3c567c3b285575125520502022-07-08 16:04:4882 days 16 hrs ago 0xd7fe7881cd50fc155bc310224352a812214e1e500x00000000000000000000000000000000000000040 Ether
0x4280ceb132d9cc4be441df546c157465558e36a369c6114c7b3c567c3b285575125520502022-07-08 16:04:4882 days 16 hrs ago 0xd7fe7881cd50fc155bc310224352a812214e1e50 0xa60100d5e12e9f83c1b04997314cf11685a618ff0 Ether
0x4280ceb132d9cc4be441df546c157465558e36a369c6114c7b3c567c3b285575125520502022-07-08 16:04:4882 days 16 hrs ago 0xd7fe7881cd50fc155bc310224352a812214e1e50 0xd40eefcfab888c9159a61221def03bf77773fc190 Ether
0x4280ceb132d9cc4be441df546c157465558e36a369c6114c7b3c567c3b285575125520502022-07-08 16:04:4882 days 16 hrs ago 0xd7fe7881cd50fc155bc310224352a812214e1e50 0x3e6586e144cd0dce44c8fdc7d28cc8cf656f3b360 Ether
0x4280ceb132d9cc4be441df546c157465558e36a369c6114c7b3c567c3b285575125520502022-07-08 16:04:4882 days 16 hrs ago 0xd7fe7881cd50fc155bc310224352a812214e1e50 0xa60100d5e12e9f83c1b04997314cf11685a618ff0 Ether
0x4280ceb132d9cc4be441df546c157465558e36a369c6114c7b3c567c3b285575125520502022-07-08 16:04:4882 days 16 hrs ago 0xd7fe7881cd50fc155bc310224352a812214e1e50 0xd40eefcfab888c9159a61221def03bf77773fc190 Ether
0x4280ceb132d9cc4be441df546c157465558e36a369c6114c7b3c567c3b285575125520502022-07-08 16:04:4882 days 16 hrs ago 0xd7fe7881cd50fc155bc310224352a812214e1e50 0xd40eefcfab888c9159a61221def03bf77773fc190 Ether
0x4280ceb132d9cc4be441df546c157465558e36a369c6114c7b3c567c3b285575125520502022-07-08 16:04:4882 days 16 hrs ago 0xd7fe7881cd50fc155bc310224352a812214e1e50 0x382b995932683452c4103d4cb284adda38d9903d0 Ether
0x97d208c7717d2715913606402e49afb3f2ae6d1932747fe8e5af5a4b831d7efe125231512022-07-04 11:01:1286 days 21 hrs ago 0xd7fe7881cd50fc155bc310224352a812214e1e50 0x3e6586e144cd0dce44c8fdc7d28cc8cf656f3b360 Ether
0x97d208c7717d2715913606402e49afb3f2ae6d1932747fe8e5af5a4b831d7efe125231512022-07-04 11:01:1286 days 21 hrs ago 0xd7fe7881cd50fc155bc310224352a812214e1e500x00000000000000000000000000000000000000040 Ether
0x97d208c7717d2715913606402e49afb3f2ae6d1932747fe8e5af5a4b831d7efe125231512022-07-04 11:01:1286 days 21 hrs ago 0xd7fe7881cd50fc155bc310224352a812214e1e50 0xa60100d5e12e9f83c1b04997314cf11685a618ff0 Ether
0x97d208c7717d2715913606402e49afb3f2ae6d1932747fe8e5af5a4b831d7efe125231512022-07-04 11:01:1286 days 21 hrs ago 0xd7fe7881cd50fc155bc310224352a812214e1e50 0xd40eefcfab888c9159a61221def03bf77773fc190 Ether
0x97d208c7717d2715913606402e49afb3f2ae6d1932747fe8e5af5a4b831d7efe125231512022-07-04 11:01:1286 days 21 hrs ago 0xd7fe7881cd50fc155bc310224352a812214e1e50 0x3e6586e144cd0dce44c8fdc7d28cc8cf656f3b360 Ether
0x97d208c7717d2715913606402e49afb3f2ae6d1932747fe8e5af5a4b831d7efe125231512022-07-04 11:01:1286 days 21 hrs ago 0xd7fe7881cd50fc155bc310224352a812214e1e50 0xa60100d5e12e9f83c1b04997314cf11685a618ff0 Ether
0x97d208c7717d2715913606402e49afb3f2ae6d1932747fe8e5af5a4b831d7efe125231512022-07-04 11:01:1286 days 21 hrs ago 0xd7fe7881cd50fc155bc310224352a812214e1e50 0xd40eefcfab888c9159a61221def03bf77773fc190 Ether
0x97d208c7717d2715913606402e49afb3f2ae6d1932747fe8e5af5a4b831d7efe125231512022-07-04 11:01:1286 days 21 hrs ago 0xd7fe7881cd50fc155bc310224352a812214e1e50 0xd40eefcfab888c9159a61221def03bf77773fc190 Ether
0x97d208c7717d2715913606402e49afb3f2ae6d1932747fe8e5af5a4b831d7efe125231512022-07-04 11:01:1286 days 21 hrs ago 0xd7fe7881cd50fc155bc310224352a812214e1e50 0x382b995932683452c4103d4cb284adda38d9903d0 Ether
0xb8b28c69f7b5e7eb7bc3d5c5531ecdfa5ddf9a9f016619be3e6bb7eb335f1a19122950022022-05-24 18:24:21127 days 13 hrs ago 0xd7fe7881cd50fc155bc310224352a812214e1e50 0x3e6586e144cd0dce44c8fdc7d28cc8cf656f3b360 Ether
0xb8b28c69f7b5e7eb7bc3d5c5531ecdfa5ddf9a9f016619be3e6bb7eb335f1a19122950022022-05-24 18:24:21127 days 13 hrs ago 0xd7fe7881cd50fc155bc310224352a812214e1e500x00000000000000000000000000000000000000040 Ether
0xb8b28c69f7b5e7eb7bc3d5c5531ecdfa5ddf9a9f016619be3e6bb7eb335f1a19122950022022-05-24 18:24:21127 days 13 hrs ago 0xd7fe7881cd50fc155bc310224352a812214e1e50 0xa60100d5e12e9f83c1b04997314cf11685a618ff0 Ether
0xb8b28c69f7b5e7eb7bc3d5c5531ecdfa5ddf9a9f016619be3e6bb7eb335f1a19122950022022-05-24 18:24:21127 days 13 hrs ago 0xd7fe7881cd50fc155bc310224352a812214e1e50 0xd40eefcfab888c9159a61221def03bf77773fc190 Ether
0xb8b28c69f7b5e7eb7bc3d5c5531ecdfa5ddf9a9f016619be3e6bb7eb335f1a19122950022022-05-24 18:24:21127 days 13 hrs ago 0xd7fe7881cd50fc155bc310224352a812214e1e50 0x3e6586e144cd0dce44c8fdc7d28cc8cf656f3b360 Ether
0xb8b28c69f7b5e7eb7bc3d5c5531ecdfa5ddf9a9f016619be3e6bb7eb335f1a19122950022022-05-24 18:24:21127 days 13 hrs ago 0xd7fe7881cd50fc155bc310224352a812214e1e50 0xa60100d5e12e9f83c1b04997314cf11685a618ff0 Ether
0xb8b28c69f7b5e7eb7bc3d5c5531ecdfa5ddf9a9f016619be3e6bb7eb335f1a19122950022022-05-24 18:24:21127 days 13 hrs ago 0xd7fe7881cd50fc155bc310224352a812214e1e50 0xd40eefcfab888c9159a61221def03bf77773fc190 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
AnchorVaultProxy

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at Etherscan.io on 2022-04-21
*/

// SPDX-License-Identifier: MIT

pragma solidity 0.8.4;



// Part: OpenZeppelin/[email protected]/Address

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// Part: OpenZeppelin/[email protected]/Proxy

/**
 * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM
 * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to
 * be specified by overriding the virtual {_implementation} function.
 *
 * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a
 * different contract through the {_delegate} function.
 *
 * The success and return data of the delegated call will be returned back to the caller of the proxy.
 */
abstract contract Proxy {
    /**
     * @dev Delegates the current call to `implementation`.
     *
     * This function does not return to its internall call site, it will return directly to the external caller.
     */
    function _delegate(address implementation) internal virtual {
        // solhint-disable-next-line no-inline-assembly
        assembly {
            // Copy msg.data. We take full control of memory in this inline assembly
            // block because it will not return to Solidity code. We overwrite the
            // Solidity scratch pad at memory position 0.
            calldatacopy(0, 0, calldatasize())

            // Call the implementation.
            // out and outsize are 0 because we don't know the size yet.
            let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)

            // Copy the returned data.
            returndatacopy(0, 0, returndatasize())

            switch result
            // delegatecall returns 0 on error.
            case 0 { revert(0, returndatasize()) }
            default { return(0, returndatasize()) }
        }
    }

    /**
     * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function
     * and {_fallback} should delegate.
     */
    function _implementation() internal view virtual returns (address);

    /**
     * @dev Delegates the current call to the address returned by `_implementation()`.
     *
     * This function does not return to its internall call site, it will return directly to the external caller.
     */
    function _fallback() internal virtual {
        _beforeFallback();
        _delegate(_implementation());
    }

    /**
     * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other
     * function in the contract matches the call data.
     */
    fallback () external payable virtual {
        _fallback();
    }

    /**
     * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data
     * is empty.
     */
    receive () external payable virtual {
        _fallback();
    }

    /**
     * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`
     * call, or as part of the Solidity `fallback` or `receive` functions.
     *
     * If overriden should call `super._beforeFallback()`.
     */
    function _beforeFallback() internal virtual {
    }
}

// Part: StorageSlot

/**
 * @dev Copied from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.1.0/contracts/utils/StorageSlot.sol
 */
library StorageSlot {
    struct AddressSlot {
        address value;
    }

    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
        assembly {
            r.slot := slot
        }
    }
}

// Part: OpenZeppelin/[email protected]/ERC1967Proxy

/**
 * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an
 * implementation address that can be changed. This address is stored in storage in the location specified by
 * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the
 * implementation behind the proxy.
 *
 * Upgradeability is only provided internally through {_upgradeTo}. For an externally upgradeable proxy see
 * {TransparentUpgradeableProxy}.
 */
contract ERC1967Proxy is Proxy {
    /**
     * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.
     *
     * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded
     * function call, and allows initializating the storage of the proxy like a Solidity constructor.
     */
    constructor(address _logic, bytes memory _data) payable {
        assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256("eip1967.proxy.implementation")) - 1));
        _setImplementation(_logic);
        if(_data.length > 0) {
            Address.functionDelegateCall(_logic, _data);
        }
    }

    /**
     * @dev Emitted when the implementation is upgraded.
     */
    event Upgraded(address indexed implementation);

    /**
     * @dev Storage slot with the address of the current implementation.
     * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is
     * validated in the constructor.
     */
    bytes32 private constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;

    /**
     * @dev Returns the current implementation address.
     */
    function _implementation() internal view virtual override returns (address impl) {
        bytes32 slot = _IMPLEMENTATION_SLOT;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            impl := sload(slot)
        }
    }

    /**
     * @dev Upgrades the proxy to a new implementation.
     *
     * Emits an {Upgraded} event.
     */
    function _upgradeTo(address newImplementation) internal virtual {
        _setImplementation(newImplementation);
        emit Upgraded(newImplementation);
    }

    /**
     * @dev Stores a new address in the EIP1967 implementation slot.
     */
    function _setImplementation(address newImplementation) private {
        require(Address.isContract(newImplementation), "ERC1967Proxy: new implementation is not a contract");

        bytes32 slot = _IMPLEMENTATION_SLOT;

        // solhint-disable-next-line no-inline-assembly
        assembly {
            sstore(slot, newImplementation)
        }
    }
}

// File: AnchorVaultProxy.sol

/**
 * @dev An ossifiable proxy for AnchorVault contract.
 */
contract AnchorVaultProxy is ERC1967Proxy {
    /**
     * @dev Storage slot with the admin of the contract.
     *
     * Equals `bytes32(uint256(keccak256("eip1967.proxy.admin")) - 1)`.
     */
    bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;

    /**
     * @dev Emitted when the admin account has changed.
     */
    event AdminChanged(address previousAdmin, address newAdmin);

    /**
     * @dev Initializes the upgradeable proxy with the initial implementation and admin.
     */
    constructor(address implementation, address admin)
        ERC1967Proxy(implementation, new bytes(0))
    {
        _setAdmin(admin);
    }

    /**
     * @return Returns the current implementation address.
     */
    function implementation() external view returns (address) {
        return _implementation();
    }

    /**
     * @dev Upgrades the proxy to a new implementation, optionally performing an additional
     * setup call.
     *
     * Can only be called by the proxy admin until the proxy is ossified.
     * Cannot be called after the proxy is ossified.
     *
     * Emits an {Upgraded} event.
     *
     * @param setupCalldata Data for the setup call. The call is skipped if data is empty.
     */
    function proxy_upgradeTo(address newImplementation, bytes memory setupCalldata) external {
        address admin = _getAdmin();
        require(admin != address(0), "proxy: ossified");
        require(msg.sender == admin, "proxy: unauthorized");

        _upgradeTo(newImplementation);

        if (setupCalldata.length > 0) {
            Address.functionDelegateCall(newImplementation, setupCalldata, "proxy: setup failed");
        }
    }

    /**
     * @dev Returns the current admin.
     */
    function _getAdmin() internal view returns (address) {
        return StorageSlot.getAddressSlot(ADMIN_SLOT).value;
    }

    /**
     * @dev Stores a new address in the EIP1967 admin slot.
     */
    function _setAdmin(address newAdmin) private {
        StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin;
    }

    /**
     * @dev Returns the current admin of the proxy.
     */
    function proxy_getAdmin() external view returns (address) {
        return _getAdmin();
    }

    /**
     * @dev Changes the admin of the proxy.
     *
     * Emits an {AdminChanged} event.
     */
    function proxy_changeAdmin(address newAdmin) external {
        address admin = _getAdmin();
        require(admin != address(0), "proxy: ossified");
        require(msg.sender == admin, "proxy: unauthorized");
        emit AdminChanged(admin, newAdmin);
        _setAdmin(newAdmin);
    }

    /**
     * @dev Returns whether the implementation is locked forever.
     */
    function proxy_getIsOssified() external view returns (bool) {
        return _getAdmin() == address(0);
    }
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"implementation","type":"address"},{"internalType":"address","name":"admin","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"proxy_changeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"proxy_getAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxy_getIsOssified","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"setupCalldata","type":"bytes"}],"name":"proxy_upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b5060405162000c6838038062000c68833981016040819052620000349162000341565b60408051600081526020810190915282906200007260017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd620003cb565b60008051602062000c21833981519152146200009e57634e487b7160e01b600052600160045260246000fd5b620000a982620000e0565b805115620000ca57620000c882826200017660201b620003ad1760201c565b505b50620000d8905081620001a5565b505062000422565b620000f6816200020060201b620003d91760201c565b620001635760405162461bcd60e51b815260206004820152603260248201527f4552433139363750726f78793a206e657720696d706c656d656e746174696f6e604482015271081a5cc81b9bdd08184818dbdb9d1c9858dd60721b60648201526084015b60405180910390fd5b60008051602062000c2183398151915255565b60606200019e838360405180606001604052806027815260200162000c416027913962000206565b9392505050565b80620001df7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610360001b620002e360201b620003df1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b3b151590565b6060833b620002675760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200015a565b600080856001600160a01b03168560405162000284919062000378565b600060405180830381855af49150503d8060008114620002c1576040519150601f19603f3d011682016040523d82523d6000602084013e620002c6565b606091505b509092509050620002d9828286620002e6565b9695505050505050565b90565b60608315620002f75750816200019e565b825115620003085782518084602001fd5b8160405162461bcd60e51b81526004016200015a919062000396565b80516001600160a01b03811681146200033c57600080fd5b919050565b6000806040838503121562000354578182fd5b6200035f8362000324565b91506200036f6020840162000324565b90509250929050565b600082516200038c818460208701620003ef565b9190910192915050565b6020815260008251806020840152620003b7816040850160208701620003ef565b601f01601f19169190910160400192915050565b600082821015620003ea57634e487b7160e01b81526011600452602481fd5b500390565b60005b838110156200040c578181015183820152602001620003f2565b838111156200041c576000848401525b50505050565b6107ef80620004326000396000f3fe60806040526004361061004e5760003560e01c8063019fa4f1146100655780632e1997b6146100855780635c60da1b146100af578063621f6309146100dc578063abe5e587146100fc5761005d565b3661005d5761005b610111565b005b61005b610111565b34801561007157600080fd5b5061005b61008036600461062a565b610143565b34801561009157600080fd5b5061009a61026b565b60405190151581526020015b60405180910390f35b3480156100bb57600080fd5b506100c4610285565b6040516001600160a01b0390911681526020016100a6565b3480156100e857600080fd5b5061005b6100f7366004610644565b6102b4565b34801561010857600080fd5b506100c46103a3565b61014161013c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6103e2565b565b600061014d610406565b90506001600160a01b03811661019c5760405162461bcd60e51b815260206004820152600f60248201526e1c1c9bde1e4e881bdcdcda599a5959608a1b60448201526064015b60405180910390fd5b336001600160a01b038216146101ea5760405162461bcd60e51b81526020600482015260136024820152721c1c9bde1e4e881d5b985d5d1a1bdc9a5e9959606a1b6044820152606401610193565b604080516001600160a01b038084168252841660208201527f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f910160405180910390a17fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610380546001600160a01b0319166001600160a01b0384161790555050565b600080610276610406565b6001600160a01b031614905090565b60006102af7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b905090565b60006102be610406565b90506001600160a01b0381166103085760405162461bcd60e51b815260206004820152600f60248201526e1c1c9bde1e4e881bdcdcda599a5959608a1b6044820152606401610193565b336001600160a01b038216146103565760405162461bcd60e51b81526020600482015260136024820152721c1c9bde1e4e881d5b985d5d1a1bdc9a5e9959606a1b6044820152606401610193565b61035f83610434565b81511561039e5761039c8383604051806040016040528060138152602001721c1c9bde1e4e881cd95d1d5c0819985a5b1959606a1b815250610474565b505b505050565b60006102af610406565b60606103d2838360405180606001604052806027815260200161079360279139610474565b9392505050565b3b151590565b90565b3660008037600080366000845af43d6000803e808015610401573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031690565b61043d81610548565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060833b6104d35760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610193565b600080856001600160a01b0316856040516104ee9190610701565b600060405180830381855af49150503d8060008114610529576040519150601f19603f3d011682016040523d82523d6000602084013e61052e565b606091505b509150915061053e8282866105d5565b9695505050505050565b803b6105b15760405162461bcd60e51b815260206004820152603260248201527f4552433139363750726f78793a206e657720696d706c656d656e746174696f6e604482015271081a5cc81b9bdd08184818dbdb9d1c9858dd60721b6064820152608401610193565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b606083156105e45750816103d2565b8251156105f45782518084602001fd5b8160405162461bcd60e51b8152600401610193919061071d565b80356001600160a01b038116811461062557600080fd5b919050565b60006020828403121561063b578081fd5b6103d28261060e565b60008060408385031215610656578081fd5b61065f8361060e565b9150602083013567ffffffffffffffff8082111561067b578283fd5b818501915085601f83011261068e578283fd5b8135818111156106a0576106a061077c565b604051601f8201601f19908116603f011681019083821181831017156106c8576106c861077c565b816040528281528860208487010111156106e0578586fd5b82602086016020830137856020848301015280955050505050509250929050565b60008251610713818460208701610750565b9190910192915050565b602081526000825180602084015261073c816040850160208701610750565b601f01601f19169190910160400192915050565b60005b8381101561076b578181015183820152602001610753565b8381111561039c5750506000910152565b634e487b7160e01b600052604160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220debf27755486f7fb474b9078e69264dcd9a9f17f26c8be8705f4cc580f88e03964736f6c63430008040033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564000000000000000000000000382b995932683452c4103d4cb284adda38d9903d00000000000000000000000002139137fdd974181a49268d7b0ae888634e5469

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

000000000000000000000000382b995932683452c4103d4cb284adda38d9903d00000000000000000000000002139137fdd974181a49268d7b0ae888634e5469

-----Decoded View---------------
Arg [0] : implementation (address): 0x382B995932683452C4103d4CB284aDDA38d9903d
Arg [1] : admin (address): 0x02139137FdD974181a49268D7b0AE888634E5469

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000382b995932683452c4103d4cb284adda38d9903d
Arg [1] : 00000000000000000000000002139137fdd974181a49268d7b0ae888634e5469


Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading

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.