ETH Price: $2,565.45 (+2.05%)
Gas: 0.46 Gwei

Transaction Decoder

Block:
12134828 at Mar-29-2021 02:56:34 PM +UTC
Transaction Fee:
0.09863335 ETH $253.04
Gas Used:
680,230 Gas / 145 Gwei

Emitted Events:

181 AdminUpgradeabilityProxy.0x34d90e5de80b44c2869f1c52dd587eb9690f2dedec6786888ebc32d21fa0582a( 0x34d90e5de80b44c2869f1c52dd587eb9690f2dedec6786888ebc32d21fa0582a, 0000000000000000000000005f071b5b29bc3bbaa4480c134b4da56cd2d35fbe, 0000000000000000000000000000000000000000000000000000000000000001 )
182 AdminUpgradeabilityProxy.0x34d90e5de80b44c2869f1c52dd587eb9690f2dedec6786888ebc32d21fa0582a( 0x34d90e5de80b44c2869f1c52dd587eb9690f2dedec6786888ebc32d21fa0582a, 0000000000000000000000000c49daa59ac390c7b87027f5fa6bd2ec83bea349, 0000000000000000000000000000000000000000000000000000000000000001 )
183 AdminUpgradeabilityProxy.0x34d90e5de80b44c2869f1c52dd587eb9690f2dedec6786888ebc32d21fa0582a( 0x34d90e5de80b44c2869f1c52dd587eb9690f2dedec6786888ebc32d21fa0582a, 000000000000000000000000073cc6d7b0fa2da1d112a8963d1917f585214f3f, 0000000000000000000000000000000000000000000000000000000000000001 )

Account State Difference:

  Address   Before After State Difference Code
0x1952e45D...46305880c
0.5491561 Eth
Nonce: 3
0.45052275 Eth
Nonce: 4
0.09863335
0x1dd0C7cB...30842E3b2
0 Eth
Nonce: 0
0 Eth
Nonce: 1
From: 0 To: 1008507461567196335593879183215219916520597816955370650992610546097785876977006606230355179225337759173568202521150605207248006429429876218740487028669737310701827781731711920728210835914267815282616624993145257314970361833489905470283101698616386376444740388670281697056099542161812803905064174066955717299627992154590676843770335404052884854966038259056877920228197749197241328358147643370743589684038669112846915991315358479619845981800209435205518059243410075269755248913369219082053035463810726630923322274766589744784898680639441763627147555691468334563412940433750240061516423738991790260310162448126415375552801217645462842356604235518974181852284792721361030471024301299429161413052540754962522113571868362467327743341566460699866196894116921161870797146763579637572148935543796931394857870330202184905244089604297602819156368519819546349529485472151219543054294778407387054569711344799015931459360505246856235295488413875941557364876493679840282419596157326473872242120286350816680105699316298722762388809932851372620754667326824166737103321613950288134326064197456933586248867758567989008870889667525997822485285313385440872533436455872481484182182218437708065585332081253456138632679859291697219354343422714184043002692904211776163948831364063562311282805173430189648368400266022978756636636223295270046598537137022567773427280803371596554021930207338237384506483102193822479968198896803636645921766400846012991964012175853206505408851782280094534848778746387572601116722364549075933119176653692821831051693308516056601595517749344113321319291832602141198559351475187781267436142120451915707807845283158401208386653937296120130224780214060788913169197084183387899379168999089227275603457475974256397238754017935018131797080018905849221482197016516904190288051021664887856231025175298578098490244204420811299547164744652436613976030373727694288447069413023453994712803897379317902798995675491259284807794397592046086957154009205325588714077557226431411439834164866252314533793701520149610120654843047595892254825349392941136903243561368344629188160152990221675005138028731800278069178381651511152205766374226993921073048925527934958062351659761121841793944738165533908424163101482687018299520159355532629725873827064917051581279483432461130249104057532183626068170967148306619154298564750322899792071352961851670136626477918603922642107322180411166945256088382575107585577783662860194614231219310507385039233844370482910092642345996813490370826615236704292434677458608177811061306518118840545857052142949177632059905752467141357649611258153734304937621360783858169252239656989499970652080029346507712007467367884895825814170456200176660604712453966230904761111881215662715298357710225233436648781236749978995238913952271245663212202773483134587567542876908243639134382049268706061043398428678214362895192916764015196143912431214664384385483555793076897133249721355941699407227174707447310462396800964303417087094320886277775643730813208551373377319433331802903941016336012746114697753673109121410293405194351007178346477063704881216743383969852589993570797435123890415597791220723270036915855973908371769200302357358750167195620329668316840691823315536057066380857601623372974832722975249972042355208607368454476549973437443618052607191035779287691471633895182243817314014603926534376393285269824889099498522876866318867397028459550493076286687400685746777763508677990986406262614677933618834584133255992001299081216007515363003376804307712901171676611726368131346485259953154364440417166825012324516038913752881608866882088962469372991593411152840347502333799165840589554895915240248318744703138551237817710676512673506476476876110652498465147485296775060929673502970205429366669737899389583620888741716418290889341502630151513814527990289610671762101783819323368158121839010369317018997510111283
(Spark Pool)
137.674358164678297968 Eth137.772991514678297968 Eth0.09863335

Execution Trace

AdminUpgradeabilityProxy.60806040( )
  • 0x6449ed22142a506d21bd96862b815fe17f044776.008c2676( )
    // SPDX-License-Identifier: MIT
    pragma solidity ^0.6.0;
    import './UpgradeabilityProxy.sol';
    /**
     * @title AdminUpgradeabilityProxy
     * @dev This contract combines an upgradeability proxy with an authorization
     * mechanism for administrative tasks.
     * All external functions in this contract must be guarded by the
     * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
     * feature proposal that would enable this to be done automatically.
     */
    contract AdminUpgradeabilityProxy is UpgradeabilityProxy {
      /**
       * Contract constructor.
       * @param _logic address of the initial implementation.
       * @param _admin Address of the proxy administrator.
       * @param _data Data to send as msg.data to the implementation to initialize the proxied contract.
       * It should include the signature and the parameters of the function to be called, as described in
       * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding.
       * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped.
       */
      constructor(address _logic, address _admin, bytes memory _data) UpgradeabilityProxy(_logic, _data) public payable {
        assert(ADMIN_SLOT == bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1));
        _setAdmin(_admin);
      }
      /**
       * @dev Emitted when the administration has been transferred.
       * @param previousAdmin Address of the previous admin.
       * @param newAdmin Address of the new admin.
       */
      event AdminChanged(address previousAdmin, address newAdmin);
      /**
       * @dev Storage slot with the admin of the contract.
       * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is
       * validated in the constructor.
       */
      bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;
      /**
       * @dev Modifier to check whether the `msg.sender` is the admin.
       * If it is, it will run the function. Otherwise, it will delegate the call
       * to the implementation.
       */
      modifier ifAdmin() {
        if (msg.sender == _admin()) {
          _;
        } else {
          _fallback();
        }
      }
      /**
       * @return The address of the proxy admin.
       */
      function admin() external ifAdmin returns (address) {
        return _admin();
      }
      /**
       * @return The address of the implementation.
       */
      function implementation() external ifAdmin returns (address) {
        return _implementation();
      }
      /**
       * @dev Changes the admin of the proxy.
       * Only the current admin can call this function.
       * @param newAdmin Address to transfer proxy administration to.
       */
      function changeAdmin(address newAdmin) external ifAdmin {
        require(newAdmin != address(0), "Cannot change the admin of a proxy to the zero address");
        emit AdminChanged(_admin(), newAdmin);
        _setAdmin(newAdmin);
      }
      /**
       * @dev Upgrade the backing implementation of the proxy.
       * Only the admin can call this function.
       * @param newImplementation Address of the new implementation.
       */
      function upgradeTo(address newImplementation) external ifAdmin {
        _upgradeTo(newImplementation);
      }
      /**
       * @dev Upgrade the backing implementation of the proxy and call a function
       * on the new implementation.
       * This is useful to initialize the proxied contract.
       * @param newImplementation Address of the new implementation.
       * @param data Data to send as msg.data in the low level call.
       * It should include the signature and the parameters of the function to be called, as described in
       * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding.
       */
      function upgradeToAndCall(address newImplementation, bytes calldata data) payable external ifAdmin {
        _upgradeTo(newImplementation);
        (bool success,) = newImplementation.delegatecall(data);
        require(success);
      }
      /**
       * @return adm The admin slot.
       */
      function _admin() internal view returns (address adm) {
        bytes32 slot = ADMIN_SLOT;
        assembly {
          adm := sload(slot)
        }
      }
      /**
       * @dev Sets the address of the proxy admin.
       * @param newAdmin Address of the new proxy admin.
       */
      function _setAdmin(address newAdmin) internal {
        bytes32 slot = ADMIN_SLOT;
        assembly {
          sstore(slot, newAdmin)
        }
      }
      /**
       * @dev Only fall back when the sender is not the admin.
       */
      function _willFallback() internal override virtual {
        require(msg.sender != _admin(), "Cannot call fallback function from the proxy admin");
        super._willFallback();
      }
    }
    // SPDX-License-Identifier: MIT
    pragma solidity ^0.6.0;
    import './Proxy.sol';
    import '@openzeppelin/contracts/utils/Address.sol';
    /**
     * @title UpgradeabilityProxy
     * @dev This contract implements a proxy that allows to change the
     * implementation address to which it will delegate.
     * Such a change is called an implementation upgrade.
     */
    contract UpgradeabilityProxy is Proxy {
      /**
       * @dev Contract constructor.
       * @param _logic Address of the initial implementation.
       * @param _data Data to send as msg.data to the implementation to initialize the proxied contract.
       * It should include the signature and the parameters of the function to be called, as described in
       * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding.
       * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped.
       */
      constructor(address _logic, bytes memory _data) public payable {
        assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1));
        _setImplementation(_logic);
        if(_data.length > 0) {
          (bool success,) = _logic.delegatecall(_data);
          require(success);
        }
      }  
      /**
       * @dev Emitted when the implementation is upgraded.
       * @param implementation Address of the new implementation.
       */
      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 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
      /**
       * @dev Returns the current implementation.
       * @return impl Address of the current implementation
       */
      function _implementation() internal override view returns (address impl) {
        bytes32 slot = IMPLEMENTATION_SLOT;
        assembly {
          impl := sload(slot)
        }
      }
      /**
       * @dev Upgrades the proxy to a new implementation.
       * @param newImplementation Address of the new implementation.
       */
      function _upgradeTo(address newImplementation) internal {
        _setImplementation(newImplementation);
        emit Upgraded(newImplementation);
      }
      /**
       * @dev Sets the implementation address of the proxy.
       * @param newImplementation Address of the new implementation.
       */
      function _setImplementation(address newImplementation) internal {
        require(Address.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address");
        bytes32 slot = IMPLEMENTATION_SLOT;
        assembly {
          sstore(slot, newImplementation)
        }
      }
    }
    // SPDX-License-Identifier: MIT
    pragma solidity ^0.6.0;
    /**
     * @title Proxy
     * @dev Implements delegation of calls to other contracts, with proper
     * forwarding of return values and bubbling of failures.
     * It defines a fallback function that delegates all calls to the address
     * returned by the abstract _implementation() internal function.
     */
    abstract contract Proxy {
      /**
       * @dev Fallback function.
       * Implemented entirely in `_fallback`.
       */
      fallback () payable external {
        _fallback();
      }
      /**
       * @dev Receive function.
       * Implemented entirely in `_fallback`.
       */
      receive () payable external {
        _fallback();
      }
      /**
       * @return The Address of the implementation.
       */
      function _implementation() internal virtual view returns (address);
      /**
       * @dev Delegates execution to an implementation contract.
       * This is a low level function that doesn't return to its internal call site.
       * It will return to the external caller whatever the implementation returns.
       * @param implementation Address to delegate.
       */
      function _delegate(address implementation) internal {
        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 Function that is run as the first thing in the fallback function.
       * Can be redefined in derived contracts to add functionality.
       * Redefinitions must call super._willFallback().
       */
      function _willFallback() internal virtual {
      }
      /**
       * @dev fallback implementation.
       * Extracted to enable manual triggering.
       */
      function _fallback() internal {
        _willFallback();
        _delegate(_implementation());
      }
    }
    // SPDX-License-Identifier: MIT
    pragma solidity >=0.6.2 <0.8.0;
    /**
     * @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);
        }
        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);
                }
            }
        }
    }