ETH Price: $3,385.68 (-2.74%)
Gas: 1 Gwei

Contract

0x4EDD62189732e9fF476ABa880b48c29432A7AC9B
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Update Implement...136198122021-11-15 10:27:31956 days ago1636972051IN
0x4EDD6218...432A7AC9B
0 ETH0.00293941107.00074605
0x60a06040135831172021-11-09 16:07:45962 days ago1636474065IN
 Create: StarkExchange
0 ETH0.15882245144.29118266

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StarkExchange

Compiler Version
v0.6.11+commit.5ef660b1

Optimization Enabled:
Yes with 100 runs

Other Settings:
default evmVersion, Apache-2.0 license

Contract Source Code (Solidity Multiple files format)

File 1 of 11: StarkExchange.sol
/*
  Copyright 2019-2021 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.11;

import "MainDispatcher.sol";

contract StarkExchange is MainDispatcher {
    string public constant VERSION = "4.0.1";

    // Salt for a 8 bit unique spread of all relevant selectors. Pre-caclulated.
    // ---------- The following code was auto-generated. PLEASE DO NOT EDIT. ----------
    uint256 constant MAGIC_SALT = 46110;
    uint256 constant IDX_MAP_0 = 0x30006100050005012000102002000001200000010001100500200000000020;
    uint256 constant IDX_MAP_1 = 0x120000105000000501200000120502000000200452005000202002030500003;
    uint256 constant IDX_MAP_2 = 0x1020000000003020000502203000300000200000000001000100330010220001;
    uint256 constant IDX_MAP_3 = 0x200230200020300001401200000000100020011200000002020000010000301;

    // ---------- End of auto-generated code. ----------

    function getNumSubcontracts() internal pure override returns (uint256) {
        return 6;
    }

    function magicSalt() internal pure override returns (uint256) {
        return MAGIC_SALT;
    }

    function handlerMapSection(uint256 section) internal view override returns (uint256) {
        if (section == 0) {
            return IDX_MAP_0;
        } else if (section == 1) {
            return IDX_MAP_1;
        } else if (section == 2) {
            return IDX_MAP_2;
        } else if (section == 3) {
            return IDX_MAP_3;
        }
        revert("BAD_IDX_MAP_SECTION");
    }

    function expectedIdByIndex(uint256 index) internal pure override returns (string memory id) {
        if (index == 1) {
            id = "StarkWare_AllVerifiers_2020_1";
        } else if (index == 2) {
            id = "StarkWare_TokensAndRamping_2020_1";
        } else if (index == 3) {
            id = "StarkWare_StarkExState_2021_1";
        } else if (index == 4) {
            id = "StarkWare_ForcedActions_2020_1";
        } else if (index == 5) {
            id = "StarkWare_OnchainVaults_2021_1";
        } else if (index == 6) {
            id = "StarkWare_ProxyUtils_2021_1";
        } else {
            revert("UNEXPECTED_INDEX");
        }
    }

    function initializationSentinel() internal view override {
        string memory REVERT_MSG = "INITIALIZATION_BLOCKED";
        // This initializer sets roots etc. It must not be applied twice.
        // I.e. it can run only when the state is still empty.
        require(vaultRoot == 0, REVERT_MSG);
        require(vaultTreeHeight == 0, REVERT_MSG);
        require(orderRoot == 0, REVERT_MSG);
        require(orderTreeHeight == 0, REVERT_MSG);
    }
}

File 2 of 11: BlockDirectCall.sol
/*
  Copyright 2019-2021 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.11;

/*
  This contract provides means to block direct call of an external function.
  A derived contract (e.g. MainDispatcherBase) should decorate sensitive functions with the
  notCalledDirectly modifier, thereby preventing it from being called directly, and allowing only calling
  using delegate_call.

  This Guard contract uses pseudo-random slot, So each deployed contract would have its own guard.
*/
abstract contract BlockDirectCall {
    bytes32 immutable UNIQUE_SAFEGUARD_SLOT; // NOLINT naming-convention.

    constructor() internal {
        // The slot is pseudo-random to allow hierarchy of contracts with guarded functions.
        bytes32 slot = keccak256(abi.encode(this, block.timestamp, gasleft()));
        UNIQUE_SAFEGUARD_SLOT = slot;
        assembly {
            sstore(slot, 42)
        }
    }

    modifier notCalledDirectly() {
        {
            // Prevent too many local variables in stack.
            uint256 safeGuardValue;
            bytes32 slot = UNIQUE_SAFEGUARD_SLOT;
            assembly {
                safeGuardValue := sload(slot)
            }
            require(safeGuardValue == 0, "DIRECT_CALL_DISALLOWED");
        }
        _;
    }
}

File 3 of 11: Common.sol
/*
  Copyright 2019-2021 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.11;

/*
  Common Utility librarries.
  I. Addresses (extending address).
*/
library Addresses {
    function isContract(address account) internal view returns (bool) {
        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    function performEthTransfer(address recipient, uint256 amount) internal {
        (bool success, ) = recipient.call{value: amount}(""); // NOLINT: low-level-calls.
        require(success, "ETH_TRANSFER_FAILED");
    }

    /*
      Safe wrapper around ERC20/ERC721 calls.
      This is required because many deployed ERC20 contracts don't return a value.
      See https://github.com/ethereum/solidity/issues/4116.
    */
    function safeTokenContractCall(address tokenAddress, bytes memory callData) internal {
        require(isContract(tokenAddress), "BAD_TOKEN_ADDRESS");
        // NOLINTNEXTLINE: low-level-calls.
        (bool success, bytes memory returndata) = tokenAddress.call(callData);
        require(success, string(returndata));

        if (returndata.length > 0) {
            require(abi.decode(returndata, (bool)), "TOKEN_OPERATION_FAILED");
        }
    }

    /*
      Validates that the passed contract address is of a real contract,
      and that its id hash (as infered fromn identify()) matched the expected one.
    */
    function validateContractId(address contractAddress, bytes32 expectedIdHash) internal {
        require(isContract(contractAddress), "ADDRESS_NOT_CONTRACT");
        (bool success, bytes memory returndata) = contractAddress.call( // NOLINT: low-level-calls.
            abi.encodeWithSignature("identify()")
        );
        require(success, "FAILED_TO_IDENTIFY_CONTRACT");
        string memory realContractId = abi.decode(returndata, (string));
        require(
            keccak256(abi.encodePacked(realContractId)) == expectedIdHash,
            "UNEXPECTED_CONTRACT_IDENTIFIER"
        );
    }
}

/*
  II. StarkExTypes - Common data types.
*/
library StarkExTypes {
    // Structure representing a list of verifiers (validity/availability).
    // A statement is valid only if all the verifiers in the list agree on it.
    // Adding a verifier to the list is immediate - this is used for fast resolution of
    // any soundness issues.
    // Removing from the list is time-locked, to ensure that any user of the system
    // not content with the announced removal has ample time to leave the system before it is
    // removed.
    struct ApprovalChainData {
        address[] list;
        // Represents the time after which the verifier with the given address can be removed.
        // Removal of the verifier with address A is allowed only in the case the value
        // of unlockedForRemovalTime[A] != 0 and unlockedForRemovalTime[A] < (current time).
        mapping(address => uint256) unlockedForRemovalTime;
    }
}

File 4 of 11: GovernanceStorage.sol
/*
  Copyright 2019-2021 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.11;

/*
  Holds the governance slots for ALL entities, including proxy and the main contract.
*/
contract GovernanceStorage {
    struct GovernanceInfoStruct {
        mapping(address => bool) effectiveGovernors;
        address candidateGovernor;
        bool initialized;
    }

    // A map from a Governor tag to its own GovernanceInfoStruct.
    mapping(string => GovernanceInfoStruct) internal governanceInfo;
}

File 5 of 11: Identity.sol
/*
  Copyright 2019-2021 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.11;

interface Identity {
    /*
      Allows a caller, typically another contract,
      to ensure that the provided address is of the expected type and version.
    */
    function identify() external pure returns (string memory);
}

File 6 of 11: IDispatcherBase.sol
/*
  Copyright 2019-2021 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.11;

/*
  Interface for generic dispatcher to use,
  which the concrete dispatcher must implement.

  I contains the functions that are specific to the concrete dispatcher instance.

  The interface is implemented as contract, because interface implies all methods external.
*/
abstract contract IDispatcherBase {
    function getSubContract(bytes4 selector) internal view virtual returns (address);

    function setSubContractAddress(uint256 index, address subContract) internal virtual;

    function getNumSubcontracts() internal pure virtual returns (uint256);

    function validateSubContractIndex(uint256 index, address subContract) internal pure virtual;

    /*
      Ensures initializer can be called. Reverts otherwise.
    */
    function initializationSentinel() internal view virtual;
}

File 7 of 11: MainDispatcher.sol
/*
  Copyright 2019-2021 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.11;

import "MainStorage.sol";
import "MainDispatcherBase.sol";

abstract contract MainDispatcher is MainStorage, MainDispatcherBase {
    uint256 constant SUBCONTRACT_BITS = 4;

    function magicSalt() internal pure virtual returns (uint256);

    function handlerMapSection(uint256 section) internal view virtual returns (uint256);

    function expectedIdByIndex(uint256 index) internal pure virtual returns (string memory id);

    function validateSubContractIndex(uint256 index, address subContract) internal pure override {
        string memory id = SubContractor(subContract).identify();
        bytes32 hashed_expected_id = keccak256(abi.encodePacked(expectedIdByIndex(index)));
        require(
            hashed_expected_id == keccak256(abi.encodePacked(id)),
            "MISPLACED_INDEX_OR_BAD_CONTRACT_ID"
        );
    }

    function getSubContract(bytes4 selector) internal view override returns (address) {
        uint256 location = 0xFF & uint256(keccak256(abi.encodePacked(selector, magicSalt())));
        uint256 subContractIdx;
        uint256 offset = (SUBCONTRACT_BITS * location) % 256;

        // We have 64 locations in each register, hence the >>6 (i.e. location // 64).
        subContractIdx = (handlerMapSection(location >> 6) >> offset) & 0xF;
        return subContracts[subContractIdx];
    }

    function setSubContractAddress(uint256 index, address subContractAddress) internal override {
        subContracts[index] = subContractAddress;
    }
}

File 8 of 11: MainDispatcherBase.sol
/*
  Copyright 2019-2021 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.11;

import "SubContractor.sol";
import "IDispatcherBase.sol";
import "BlockDirectCall.sol";
import "Common.sol";

abstract contract MainDispatcherBase is IDispatcherBase, BlockDirectCall {
    using Addresses for address;

    /*
      This entry point serves only transactions with empty calldata. (i.e. pure value transfer tx).
      We don't expect to receive such, thus block them.
    */
    receive() external payable {
        revert("CONTRACT_NOT_EXPECTED_TO_RECEIVE");
    }

    fallback() external payable {
        address subContractAddress = getSubContract(msg.sig);
        require(subContractAddress != address(0x0), "NO_CONTRACT_FOR_FUNCTION");

        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 for now, as we don"t know the out size yet.
            let result := delegatecall(gas(), subContractAddress, 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())
            }
        }
    }

    /*
      1. Extract subcontracts.
      2. Verify correct sub-contract initializer size.
      3. Extract sub-contract initializer data.
      4. Call sub-contract initializer.

      The init data bytes passed to initialize are structed as following:
      I. N slots (uin256 size) addresses of the deployed sub-contracts.
      II. An address of an external initialization contract (optional, or ZERO_ADDRESS).
      III. (Up to) N bytes sections of the sub-contracts initializers.

      If already initialized (i.e. upgrade) we expect the init data to be consistent with this.
      and if a different size of init data is expected when upgrading, the initializerSize should
      reflect this.

      If an external initializer contract is not used, ZERO_ADDRESS is passed in its slot.
      If the external initializer contract is used, all the remaining init data is passed to it,
      and internal initialization will not occur.

      External Initialization Contract
      --------------------------------
      External Initialization Contract (EIC) is a hook for custom initialization.
      Typically in an upgrade flow, the expected initialization contains only the addresses of
      the sub-contracts. Normal initialization of the sub-contracts is such that is not needed
      in an upgrade, and actually may be very dangerous, as changing of state on a working system
      may corrupt it.

      In the event that some state initialization is required, the EIC is a hook that allows this.
      It may be deployed and called specifically for this purpose.

      The address of the EIC must be provided (if at all) when a new implementation is added to
      a Proxy contract (as part of the initialization vector).
      Hence, it is considered part of the code open to reviewers prior to a time-locked upgrade.

      When a custom initialization is performed using an EIC,
      the main dispatcher initialize extracts and stores the sub-contracts addresses, and then
      yields to the EIC, skipping the rest of its initialization code.


      Flow of MainDispatcher initialize
      ---------------------------------
      1. Extraction and assignment of subcontracts addresses
         Main dispatcher expects a valid and consistent set of addresses in the passed data.
         It validates that, extracts the addresses from the data, and validates that the addresses
         are of the expected type and order. Then those addresses are stored.

      2. Extraction of EIC address
         The address of the EIC is extracted from the data.
         External Initializer Contract is optional. ZERO_ADDRESS indicates it is not used.

      3a. EIC is used
          Dispatcher calls the EIC initialize function with the remaining data.
          Note - In this option 3b is not performed.

      3b. EIC is not used
          If there is additional initialization data then:
          I. Sentitenl function is called to permit subcontracts initialization.
          II. Dispatcher loops through the subcontracts and for each one it extracts the
              initializing data and passes it to the subcontract's initialize function.

    */
    function initialize(bytes calldata data) external virtual notCalledDirectly {
        // Number of sub-contracts.
        uint256 nSubContracts = getNumSubcontracts();

        // We support currently 4 bits per contract, i.e. 16, reserving 00 leads to 15.
        require(nSubContracts <= 15, "TOO_MANY_SUB_CONTRACTS");

        // Sum of subcontract initializers. Aggregated for verification near the end.
        uint256 totalInitSizes = 0;

        // Offset (within data) of sub-contract initializer vector.
        // Just past the sub-contract+eic addresses.
        uint256 initDataContractsOffset = 32 * (nSubContracts + 1);

        // Init data MUST include addresses for all sub-contracts + EIC.
        require(data.length >= initDataContractsOffset, "SUB_CONTRACTS_NOT_PROVIDED");

        // Size of passed data, excluding sub-contract addresses.
        uint256 additionalDataSize = data.length - initDataContractsOffset;

        // Extract & update contract addresses.
        for (uint256 nContract = 1; nContract <= nSubContracts; nContract++) {
            // Extract sub-contract address.
            address contractAddress = abi.decode(
                data[32 * (nContract - 1):32 * nContract],
                (address)
            );

            validateSubContractIndex(nContract, contractAddress);

            // Contracts are indexed from 1 and 0 is not in use here.
            setSubContractAddress(nContract, contractAddress);
        }

        // Check if we have an external initializer contract.
        address externalInitializerAddr = abi.decode(
            data[initDataContractsOffset - 32:initDataContractsOffset],
            (address)
        );

        // 3(a). Yield to EIC initialization.
        if (externalInitializerAddr != address(0x0)) {
            callExternalInitializer(externalInitializerAddr, data[initDataContractsOffset:]);
            return;
        }

        // 3(b). Subcontracts initialization.
        // I. If no init data passed besides sub-contracts, return.
        if (additionalDataSize == 0) {
            return;
        }

        // Just to be on the safe side.
        assert(externalInitializerAddr == address(0x0));

        // II. Gate further initialization.
        initializationSentinel();

        // III. Loops through the subcontracts, extracts their data and calls their initializer.
        for (uint256 nContract = 1; nContract <= nSubContracts; nContract++) {
            // Extract sub-contract address.
            address contractAddress = abi.decode(
                data[32 * (nContract - 1):32 * nContract],
                (address)
            );

            // The initializerSize is called via delegatecall, so that it can relate to the state,
            // and not only to the new contract code. (e.g. return 0 if state-intialized else 192).
            // NOLINTNEXTLINE: controlled-delegatecall low-level-calls calls-loop.
            (bool success, bytes memory returndata) = contractAddress.delegatecall(
                abi.encodeWithSelector(SubContractor(contractAddress).initializerSize.selector)
            );
            require(success, string(returndata));
            uint256 initSize = abi.decode(returndata, (uint256));
            require(initSize <= additionalDataSize, "INVALID_INITIALIZER_SIZE");
            require(totalInitSizes + initSize <= additionalDataSize, "INVALID_INITIALIZER_SIZE");

            if (initSize == 0) {
                continue;
            }

            // Call sub-contract initializer.
            // NOLINTNEXTLINE: controlled-delegatecall calls-loop.
            (success, returndata) = contractAddress.delegatecall(
                abi.encodeWithSelector(
                    this.initialize.selector,
                    data[initDataContractsOffset:initDataContractsOffset + initSize]
                )
            );
            require(success, string(returndata));
            totalInitSizes += initSize;
            initDataContractsOffset += initSize;
        }
        require(additionalDataSize == totalInitSizes, "MISMATCHING_INIT_DATA_SIZE");
    }

    function callExternalInitializer(address externalInitializerAddr, bytes calldata extInitData)
        private
    {
        require(externalInitializerAddr.isContract(), "NOT_A_CONTRACT");

        // NOLINTNEXTLINE: low-level-calls, controlled-delegatecall.
        (bool success, bytes memory returndata) = externalInitializerAddr.delegatecall(
            abi.encodeWithSelector(this.initialize.selector, extInitData)
        );
        require(success, string(returndata));
        require(returndata.length == 0, string(returndata));
    }
}

File 9 of 11: MainStorage.sol
/*
  Copyright 2019-2021 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.11;

import "ProxyStorage.sol";
import "Common.sol";

/*
  Holds ALL the main contract state (storage) variables.
*/
contract MainStorage is ProxyStorage {
    uint256 internal constant LAYOUT_LENGTH = 2**64;

    address escapeVerifierAddress; // NOLINT: constable-states.

    // Global dex-frozen flag.
    bool stateFrozen; // NOLINT: constable-states.

    // Time when unFreeze can be successfully called (UNFREEZE_DELAY after freeze).
    uint256 unFreezeTime; // NOLINT: constable-states.

    // Pending deposits.
    // A map STARK key => asset id => vault id => quantized amount.
    mapping(uint256 => mapping(uint256 => mapping(uint256 => uint256))) pendingDeposits;

    // Cancellation requests.
    // A map STARK key => asset id => vault id => request timestamp.
    mapping(uint256 => mapping(uint256 => mapping(uint256 => uint256))) cancellationRequests;

    // Pending withdrawals.
    // A map STARK key => asset id => quantized amount.
    mapping(uint256 => mapping(uint256 => uint256)) pendingWithdrawals;

    // vault_id => escape used boolean.
    mapping(uint256 => bool) escapesUsed;

    // Number of escapes that were performed when frozen.
    uint256 escapesUsedCount; // NOLINT: constable-states.

    // NOTE: fullWithdrawalRequests is deprecated, and replaced by forcedActionRequests.
    // NOLINTNEXTLINE naming-convention.
    mapping(uint256 => mapping(uint256 => uint256)) fullWithdrawalRequests_DEPRECATED;

    // State sequence number.
    uint256 sequenceNumber; // NOLINT: constable-states uninitialized-state.

    // Vaults Tree Root & Height.
    uint256 vaultRoot; // NOLINT: constable-states uninitialized-state.
    uint256 vaultTreeHeight; // NOLINT: constable-states uninitialized-state.

    // Order Tree Root & Height.
    uint256 orderRoot; // NOLINT: constable-states uninitialized-state.
    uint256 orderTreeHeight; // NOLINT: constable-states uninitialized-state.

    // True if and only if the address is allowed to add tokens.
    mapping(address => bool) tokenAdmins;

    // This mapping is no longer in use, remains for backwards compatibility.
    mapping(address => bool) userAdmins_DEPRECATED; // NOLINT: naming-convention.

    // True if and only if the address is an operator (allowed to update state).
    mapping(address => bool) operators;

    // Mapping of contract ID to asset data.
    mapping(uint256 => bytes) assetTypeToAssetInfo; // NOLINT: uninitialized-state.

    // Mapping of registered contract IDs.
    mapping(uint256 => bool) registeredAssetType; // NOLINT: uninitialized-state.

    // Mapping from contract ID to quantum.
    mapping(uint256 => uint256) assetTypeToQuantum; // NOLINT: uninitialized-state.

    // This mapping is no longer in use, remains for backwards compatibility.
    mapping(address => uint256) starkKeys_DEPRECATED; // NOLINT: naming-convention.

    // Mapping from STARK public key to the Ethereum public key of its owner.
    mapping(uint256 => address) ethKeys; // NOLINT: uninitialized-state.

    // Timelocked state transition and availability verification chain.
    StarkExTypes.ApprovalChainData verifiersChain;
    StarkExTypes.ApprovalChainData availabilityVerifiersChain;

    // Batch id of last accepted proof.
    uint256 lastBatchId; // NOLINT: constable-states uninitialized-state.

    // Mapping between sub-contract index to sub-contract address.
    mapping(uint256 => address) subContracts; // NOLINT: uninitialized-state.

    mapping(uint256 => bool) permissiveAssetType_DEPRECATED; // NOLINT: naming-convention.
    // ---- END OF MAIN STORAGE AS DEPLOYED IN STARKEX2.0 ----

    // Onchain-data version configured for the system.
    uint256 onchainDataVersion; // NOLINT: constable-states uninitialized-state.

    // Counter of forced action request in block. The key is the block number.
    mapping(uint256 => uint256) forcedRequestsInBlock;

    // ForcedAction requests: actionHash => requestTime.
    mapping(bytes32 => uint256) forcedActionRequests;

    // Mapping for timelocked actions.
    // A actionKey => activation time.
    mapping(bytes32 => uint256) actionsTimeLock;

    // Append only list of requested forced action hashes.
    bytes32[] actionHashList;

    // Reserved storage space for Extensibility.
    // Every added MUST be added above the end gap, and the __endGap size must be reduced
    // accordingly.
    // NOLINTNEXTLINE: naming-convention.
    uint256[LAYOUT_LENGTH - 37] private __endGap; // __endGap complements layout to LAYOUT_LENGTH.
}

File 10 of 11: ProxyStorage.sol
/*
  Copyright 2019-2021 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.11;

import "GovernanceStorage.sol";

/*
  Holds the Proxy-specific state variables.
  This contract is inherited by the GovernanceStorage (and indirectly by MainStorage)
  to prevent collision hazard.
*/
contract ProxyStorage is GovernanceStorage {
    // NOLINTNEXTLINE: naming-convention uninitialized-state.
    mapping(address => bytes32) internal initializationHash_DEPRECATED;

    // The time after which we can switch to the implementation.
    // Hash(implementation, data, finalize) => time.
    mapping(bytes32 => uint256) internal enabledTime;

    // A central storage of the flags whether implementation has been initialized.
    // Note - it can be used flexibly enough to accommodate multiple levels of initialization
    // (i.e. using different key salting schemes for different initialization levels).
    mapping(bytes32 => bool) internal initialized;
}

File 11 of 11: SubContractor.sol
/*
  Copyright 2019-2021 StarkWare Industries Ltd.

  Licensed under the Apache License, Version 2.0 (the "License").
  You may not use this file except in compliance with the License.
  You may obtain a copy of the License at

  https://www.starkware.co/open-source-license/

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions
  and limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.6.11;

import "Identity.sol";

interface SubContractor is Identity {
    function initialize(bytes calldata data) external;

    function initializerSize() external view returns (uint256);
}

Contract Security Audit

Contract ABI

[{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60a060405234801561001057600080fd5b50600030425a604080516001600160a01b03909416602080860191909152848201939093526060808501929092528051808503909201825260809384019052805191012090819052602a905550608051611289610077600039806102a752506112896000f3fe60806040526004361061002d5760003560e01c8063439fab9114610112578063ffa1ad741461018f5761007f565b3661007f576040805162461bcd60e51b815260206004820181905260248201527f434f4e54524143545f4e4f545f45585045435445445f544f5f52454345495645604482015290519081900360640190fd5b60006100966000356001600160e01b031916610219565b90506001600160a01b0381166100ee576040805162461bcd60e51b81526020600482015260186024820152772727afa1a7a72a2920a1aa2fa327a92fa32aa721aa24a7a760411b604482015290519081900360640190fd5b3660008037600080366000845af43d6000803e80801561010d573d6000f35b3d6000fd5b34801561011e57600080fd5b5061018d6004803603602081101561013557600080fd5b810190602081018135600160201b81111561014f57600080fd5b82018360208201111561016157600080fd5b803590602001918460018302840111600160201b8311171561018257600080fd5b5090925090506102a5565b005b34801561019b57600080fd5b506101a46108f1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101de5781810151838201526020016101c6565b50505050905090810190601f16801561020b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60008082610225610912565b604080516001600160e01b03199093166020808501919091526024808501939093528151808503909301835260449093019052805191012060ff169050600080610100600484020690508061027d600685901c610918565b600f911c166000908152601e60205260409020546001600160a01b031693505050505b919050565b7f00000000000000000000000000000000000000000000000000000000000000008054908115610315576040805162461bcd60e51b81526020600482015260166024820152751112549150d517d0d0531317d11254d0531313d5d15160521b604482015290519081900360640190fd5b50506000610321610a18565b9050600f811115610372576040805162461bcd60e51b8152602060048201526016602482015275544f4f5f4d414e595f5355425f434f4e54524143545360501b604482015290519081900360640190fd5b600060206001830102808410156103d0576040805162461bcd60e51b815260206004820152601a60248201527f5355425f434f4e5452414354535f4e4f545f50524f5649444544000000000000604482015290519081900360640190fd5b80840360015b84811161042d5760006103f5602080840290600019850102898b6111e8565b602081101561040357600080fd5b50356001600160a01b0316905061041a8282610a1d565b6104248282610c70565b506001016103d6565b50600061044083601f198101888a6111e8565b602081101561044e57600080fd5b50356001600160a01b03169050801561048057610476816104718886818c6111e8565b610c9e565b50505050506108ed565b8161048f5750505050506108ed565b6001600160a01b038116156104a057fe5b6104a8610eb4565b60015b8581116108925760006104ca6020808402906000198501028a8c6111e8565b60208110156104d857600080fd5b506040805160048152602481018252602081018051633cc660ad60e01b6001600160e01b039091161781529151815193356001600160a01b03169450600093606093869392918291908083835b602083106105445780518252601f199092019160209182019101610525565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146105a4576040519150601f19603f3d011682016040523d82523d6000602084013e6105a9565b606091505b50915091508181906106395760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156105fe5781810151838201526020016105e6565b50505050905090810190601f16801561062b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600081806020019051602081101561065157600080fd5b50519050868111156106a5576040805162461bcd60e51b8152602060048201526018602482015277494e56414c49445f494e495449414c495a45525f53495a4560401b604482015290519081900360640190fd5b86818a0111156106f7576040805162461bcd60e51b8152602060048201526018602482015277494e56414c49445f494e495449414c495a45525f53495a4560401b604482015290519081900360640190fd5b80610705575050505061088a565b836001600160a01b031663439fab9160e01b8d8d8b90858d019261072b939291906111e8565b6040516020602482019081526044820183905290819060640184848082843760008382015260408051601f909201601f1990811690940182810390940182529283526020810180516001600160e01b03166001600160e01b0319909916989098178852915182519297909650869550935090915081905083835b602083106107c45780518252601f1990920191602091820191016107a5565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610824576040519150601f19603f3d011682016040523d82523d6000602084013e610829565b606091505b509093509150818361087c5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156105fe5781810151838201526020016105e6565b509788019796909601955050505b6001016104ab565b508382146108e7576040805162461bcd60e51b815260206004820152601a60248201527f4d49534d41544348494e475f494e49545f444154415f53495a45000000000000604482015290519081900360640190fd5b50505050505b5050565b60405180604001604052806005815260200164342e302e3160d81b81525081565b61b41e90565b60008161094557507e300061000500050120001020020000012000000100011005002000000000206102a0565b816001141561097557507f01200001050000005012000001205020000002004520050002020020305000036102a0565b81600214156109a557507f10200000000030200005022030003000002000000000010001003300102200016102a0565b81600314156109d557507f02002302000203000014012000000001000200112000000020200000100003016102a0565b6040805162461bcd60e51b81526020600482015260136024820152722120a22fa4a22c2fa6a0a82fa9a2a1aa24a7a760691b604482015290519081900360640190fd5b600690565b6060816001600160a01b031663eeb728666040518163ffffffff1660e01b815260040160006040518083038186803b158015610a5857600080fd5b505afa158015610a6c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610a9557600080fd5b8101908080516040519392919084600160201b821115610ab457600080fd5b908301906020820185811115610ac957600080fd5b8251600160201b811182820188101715610ae257600080fd5b82525081516020918201929091019080838360005b83811015610b0f578181015183820152602001610af7565b50505050905090810190601f168015610b3c5780820380516001836020036101000a031916815260200191505b5060405250505090506000610b5084611028565b6040516020018082805190602001908083835b60208310610b825780518252601f199092019160209182019101610b63565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052805190602001209050816040516020018082805190602001908083835b60208310610bf25780518252601f199092019160209182019101610bd3565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052805190602001208114610c6a5760405162461bcd60e51b81526004018080602001828103825260228152602001806112116022913960400191505060405180910390fd5b50505050565b6000918252601e602052604090912080546001600160a01b0319166001600160a01b03909216919091179055565b610cb0836001600160a01b03166111e2565b610cf2576040805162461bcd60e51b815260206004820152600e60248201526d1393d517d057d0d3d395149050d560921b604482015290519081900360640190fd5b60006060846001600160a01b031663439fab9160e01b85856040516024018080602001828103825284848281815260200192508082843760008382015260408051601f909201601f1990811690940182810390940182529283526020810180516001600160e01b03166001600160e01b0319909916989098178852915182519297909650869550935090915081905083835b60208310610da35780518252601f199092019160209182019101610d84565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610e03576040519150601f19603f3d011682016040523d82523d6000602084013e610e08565b606091505b5091509150818190610e5b5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156105fe5781810151838201526020016105e6565b508051819015610eac5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156105fe5781810151838201526020016105e6565b505050505050565b60408051808201909152601681527512539255125053125690551253d397d09313d0d2d15160521b6020820152600d54819015610f325760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156105fe5781810151838201526020016105e6565b50600e54819015610f845760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156105fe5781810151838201526020016105e6565b50600f54819015610fd65760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156105fe5781810151838201526020016105e6565b506010548190156108ed5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156105fe5781810151838201526020016105e6565b6060816001141561106d575060408051808201909152601d81527f537461726b576172655f416c6c5665726966696572735f323032305f3100000060208201526102a0565b8160021415611096576040518060600160405280602181526020016112336021913990506102a0565b81600314156110d9575060408051808201909152601d81527f537461726b576172655f537461726b457853746174655f323032315f3100000060208201526102a0565b816004141561111c575060408051808201909152601e81527f537461726b576172655f466f72636564416374696f6e735f323032305f31000060208201526102a0565b816005141561115f575060408051808201909152601e81527f537461726b576172655f4f6e636861696e5661756c74735f323032315f31000060208201526102a0565b81600614156111a2575060408051808201909152601b81527f537461726b576172655f50726f78795574696c735f323032315f31000000000060208201526102a0565b6040805162461bcd60e51b815260206004820152601060248201526f0aa9c8ab0a08a86a88a88be929c888ab60831b604482015290519081900360640190fd5b3b151590565b600080858511156111f7578182fd5b83861115611203578182fd5b505082019391909203915056fe4d4953504c414345445f494e4445585f4f525f4241445f434f4e54524143545f4944537461726b576172655f546f6b656e73416e6452616d70696e675f323032305f31a26469706673582212206a902fc2b69bdd967561977c9cf7d5cea4e21b4123ab67e58f9b8e839a5db20564736f6c634300060b0033

Deployed Bytecode

0x60806040526004361061002d5760003560e01c8063439fab9114610112578063ffa1ad741461018f5761007f565b3661007f576040805162461bcd60e51b815260206004820181905260248201527f434f4e54524143545f4e4f545f45585045435445445f544f5f52454345495645604482015290519081900360640190fd5b60006100966000356001600160e01b031916610219565b90506001600160a01b0381166100ee576040805162461bcd60e51b81526020600482015260186024820152772727afa1a7a72a2920a1aa2fa327a92fa32aa721aa24a7a760411b604482015290519081900360640190fd5b3660008037600080366000845af43d6000803e80801561010d573d6000f35b3d6000fd5b34801561011e57600080fd5b5061018d6004803603602081101561013557600080fd5b810190602081018135600160201b81111561014f57600080fd5b82018360208201111561016157600080fd5b803590602001918460018302840111600160201b8311171561018257600080fd5b5090925090506102a5565b005b34801561019b57600080fd5b506101a46108f1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101de5781810151838201526020016101c6565b50505050905090810190601f16801561020b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60008082610225610912565b604080516001600160e01b03199093166020808501919091526024808501939093528151808503909301835260449093019052805191012060ff169050600080610100600484020690508061027d600685901c610918565b600f911c166000908152601e60205260409020546001600160a01b031693505050505b919050565b7fcababe7e58bc4e5994925b2e44aa0307e6b687bb4c2e710dcddf87c11b1dc7938054908115610315576040805162461bcd60e51b81526020600482015260166024820152751112549150d517d0d0531317d11254d0531313d5d15160521b604482015290519081900360640190fd5b50506000610321610a18565b9050600f811115610372576040805162461bcd60e51b8152602060048201526016602482015275544f4f5f4d414e595f5355425f434f4e54524143545360501b604482015290519081900360640190fd5b600060206001830102808410156103d0576040805162461bcd60e51b815260206004820152601a60248201527f5355425f434f4e5452414354535f4e4f545f50524f5649444544000000000000604482015290519081900360640190fd5b80840360015b84811161042d5760006103f5602080840290600019850102898b6111e8565b602081101561040357600080fd5b50356001600160a01b0316905061041a8282610a1d565b6104248282610c70565b506001016103d6565b50600061044083601f198101888a6111e8565b602081101561044e57600080fd5b50356001600160a01b03169050801561048057610476816104718886818c6111e8565b610c9e565b50505050506108ed565b8161048f5750505050506108ed565b6001600160a01b038116156104a057fe5b6104a8610eb4565b60015b8581116108925760006104ca6020808402906000198501028a8c6111e8565b60208110156104d857600080fd5b506040805160048152602481018252602081018051633cc660ad60e01b6001600160e01b039091161781529151815193356001600160a01b03169450600093606093869392918291908083835b602083106105445780518252601f199092019160209182019101610525565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146105a4576040519150601f19603f3d011682016040523d82523d6000602084013e6105a9565b606091505b50915091508181906106395760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156105fe5781810151838201526020016105e6565b50505050905090810190601f16801561062b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600081806020019051602081101561065157600080fd5b50519050868111156106a5576040805162461bcd60e51b8152602060048201526018602482015277494e56414c49445f494e495449414c495a45525f53495a4560401b604482015290519081900360640190fd5b86818a0111156106f7576040805162461bcd60e51b8152602060048201526018602482015277494e56414c49445f494e495449414c495a45525f53495a4560401b604482015290519081900360640190fd5b80610705575050505061088a565b836001600160a01b031663439fab9160e01b8d8d8b90858d019261072b939291906111e8565b6040516020602482019081526044820183905290819060640184848082843760008382015260408051601f909201601f1990811690940182810390940182529283526020810180516001600160e01b03166001600160e01b0319909916989098178852915182519297909650869550935090915081905083835b602083106107c45780518252601f1990920191602091820191016107a5565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610824576040519150601f19603f3d011682016040523d82523d6000602084013e610829565b606091505b509093509150818361087c5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156105fe5781810151838201526020016105e6565b509788019796909601955050505b6001016104ab565b508382146108e7576040805162461bcd60e51b815260206004820152601a60248201527f4d49534d41544348494e475f494e49545f444154415f53495a45000000000000604482015290519081900360640190fd5b50505050505b5050565b60405180604001604052806005815260200164342e302e3160d81b81525081565b61b41e90565b60008161094557507e300061000500050120001020020000012000000100011005002000000000206102a0565b816001141561097557507f01200001050000005012000001205020000002004520050002020020305000036102a0565b81600214156109a557507f10200000000030200005022030003000002000000000010001003300102200016102a0565b81600314156109d557507f02002302000203000014012000000001000200112000000020200000100003016102a0565b6040805162461bcd60e51b81526020600482015260136024820152722120a22fa4a22c2fa6a0a82fa9a2a1aa24a7a760691b604482015290519081900360640190fd5b600690565b6060816001600160a01b031663eeb728666040518163ffffffff1660e01b815260040160006040518083038186803b158015610a5857600080fd5b505afa158015610a6c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610a9557600080fd5b8101908080516040519392919084600160201b821115610ab457600080fd5b908301906020820185811115610ac957600080fd5b8251600160201b811182820188101715610ae257600080fd5b82525081516020918201929091019080838360005b83811015610b0f578181015183820152602001610af7565b50505050905090810190601f168015610b3c5780820380516001836020036101000a031916815260200191505b5060405250505090506000610b5084611028565b6040516020018082805190602001908083835b60208310610b825780518252601f199092019160209182019101610b63565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052805190602001209050816040516020018082805190602001908083835b60208310610bf25780518252601f199092019160209182019101610bd3565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052805190602001208114610c6a5760405162461bcd60e51b81526004018080602001828103825260228152602001806112116022913960400191505060405180910390fd5b50505050565b6000918252601e602052604090912080546001600160a01b0319166001600160a01b03909216919091179055565b610cb0836001600160a01b03166111e2565b610cf2576040805162461bcd60e51b815260206004820152600e60248201526d1393d517d057d0d3d395149050d560921b604482015290519081900360640190fd5b60006060846001600160a01b031663439fab9160e01b85856040516024018080602001828103825284848281815260200192508082843760008382015260408051601f909201601f1990811690940182810390940182529283526020810180516001600160e01b03166001600160e01b0319909916989098178852915182519297909650869550935090915081905083835b60208310610da35780518252601f199092019160209182019101610d84565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610e03576040519150601f19603f3d011682016040523d82523d6000602084013e610e08565b606091505b5091509150818190610e5b5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156105fe5781810151838201526020016105e6565b508051819015610eac5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156105fe5781810151838201526020016105e6565b505050505050565b60408051808201909152601681527512539255125053125690551253d397d09313d0d2d15160521b6020820152600d54819015610f325760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156105fe5781810151838201526020016105e6565b50600e54819015610f845760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156105fe5781810151838201526020016105e6565b50600f54819015610fd65760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156105fe5781810151838201526020016105e6565b506010548190156108ed5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156105fe5781810151838201526020016105e6565b6060816001141561106d575060408051808201909152601d81527f537461726b576172655f416c6c5665726966696572735f323032305f3100000060208201526102a0565b8160021415611096576040518060600160405280602181526020016112336021913990506102a0565b81600314156110d9575060408051808201909152601d81527f537461726b576172655f537461726b457853746174655f323032315f3100000060208201526102a0565b816004141561111c575060408051808201909152601e81527f537461726b576172655f466f72636564416374696f6e735f323032305f31000060208201526102a0565b816005141561115f575060408051808201909152601e81527f537461726b576172655f4f6e636861696e5661756c74735f323032315f31000060208201526102a0565b81600614156111a2575060408051808201909152601b81527f537461726b576172655f50726f78795574696c735f323032315f31000000000060208201526102a0565b6040805162461bcd60e51b815260206004820152601060248201526f0aa9c8ab0a08a86a88a88be929c888ab60831b604482015290519081900360640190fd5b3b151590565b600080858511156111f7578182fd5b83861115611203578182fd5b505082019391909203915056fe4d4953504c414345445f494e4445585f4f525f4241445f434f4e54524143545f4944537461726b576172655f546f6b656e73416e6452616d70696e675f323032305f31a26469706673582212206a902fc2b69bdd967561977c9cf7d5cea4e21b4123ab67e58f9b8e839a5db20564736f6c634300060b0033

Deployed Bytecode Sourcemap

692:2490:9:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;1092:42:6;;;-1:-1:-1;;;1092:42:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;692:2490:9;1185:26:6;1214:23;1229:7;;-1:-1:-1;;;;;;1229:7:6;1214:14;:23::i;:::-;1185:52;-1:-1:-1;;;;;;1255:34:6;;1247:71;;;;;-1:-1:-1;;;1247:71:6;;;;;;;;;;;;-1:-1:-1;;;1247:71:6;;;;;;;;;;;;;;;1597:14;1594:1;1591;1578:34;1823:1;1820;1804:14;1801:1;1781:18;1774:5;1761:64;1899:16;1896:1;1893;1878:38;1937:6;2004:66;;;;2119:16;2116:1;2109:27;2004:66;2039:16;2036:1;2029:27;5346:4123;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5346:4123:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5346:4123:6;;;;;;;;;;-1:-1:-1;5346:4123:6;;-1:-1:-1;5346:4123:6;-1:-1:-1;5346:4123:6;:::i;:::-;;739:40:9;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1502:488:5;1575:7;1594:16;1655:8;1665:11;:9;:11::i;:::-;1638:39;;;-1:-1:-1;;;;;;1638:39:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1628:50;;;;;1613:4;:66;;-1:-1:-1;;;1770:3:5;1638:39;1739:27;;1738:35;1721:52;;1925:6;1889:32;1919:1;1907:8;:13;;1889:17;:32::i;:::-;1935:3;1889:42;;1888:50;1955:28;;;;:12;:28;;;;;;-1:-1:-1;;;;;1955:28:5;;-1:-1:-1;;;;1502:488:5;;;;:::o;5346:4123:6:-;1648:21:0;1728:11;;;1774:19;;1766:54;;;;;-1:-1:-1;;;1766:54:0;;;;;;;;;;;;-1:-1:-1;;;1766:54:0;;;;;;;;;;;;;;;5346:4123:6;;5468:21:::1;5492:20;:18;:20::i;:::-;5468:44;;5636:2;5619:13;:19;;5611:54;;;::::0;;-1:-1:-1;;;5611:54:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;5611:54:6;;;;;;;;;;;;;::::1;;5762:22;5954:2;5976:1;5960:17:::0;::::1;5954:24;6070:38:::0;;::::1;;6062:77;;;::::0;;-1:-1:-1;;;6062:77:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;6245:37:::0;;::::1;6366:1;6341:476;6382:13;6369:9;:26;6341:476;;6469:23;6523:41;6528:2;6549:14:::0;;::::1;::::0;-1:-1:-1;;6534:13:6;;6528:20:::1;6523:4:::0;;:41:::1;:::i;:::-;6495:110;;;;;;;::::0;::::1;;-1:-1:-1::0;6495:110:6::1;-1:-1:-1::0;;;;;6495:110:6::1;::::0;-1:-1:-1;6620:52:6::1;6645:9:::0;6495:110;6620:24:::1;:52::i;:::-;6757:49;6779:9;6790:15;6757:21;:49::i;:::-;-1:-1:-1::0;6397:11:6::1;;6341:476;;;-1:-1:-1::0;6889:31:6::1;6947:58;6952:23:::0;-1:-1:-1;;6952:28:6;;6947:4;;:58:::1;:::i;:::-;6923:115;;;;;;;::::0;::::1;;-1:-1:-1::0;6923:115:6::1;-1:-1:-1::0;;;;;6923:115:6::1;::::0;-1:-1:-1;7099:39:6;;7095:170:::1;;7154:80;7178:23:::0;7203:30:::1;:4:::0;7208:23;7203:4;;:30:::1;:::i;:::-;7154:23;:80::i;:::-;7248:7;;;;;;;7095:170;7393:23:::0;7389:60:::1;;7432:7;;;;;;;7389:60;-1:-1:-1::0;;;;;7506:39:6;::::1;::::0;7499:47:::1;;;;7601:24;:22;:24::i;:::-;7758:1;7733:1645;7774:13;7761:9;:26;7733:1645;;7861:23;7915:41;7920:2;7941:14:::0;;::::1;::::0;-1:-1:-1;;7926:13:6;;7920:20:::1;7915:4:::0;;:41:::1;:::i;:::-;7887:110;;;;;;;::::0;::::1;;-1:-1:-1::0;8382:79:6::1;::::0;;;;;::::1;::::0;::::1;::::0;;7887:110:::1;8382:79:::0;::::1;::::0;;-1:-1:-1;;;;;;;;8382:79:6;;::::1;;::::0;;8336:139;;;;7887:110;::::1;-1:-1:-1::0;;;;;7887:110:6::1;::::0;-1:-1:-1;;;8309:23:6::1;::::0;7887:110;;8382:79;8336:139;;;8382:79;8336:139;;8382:79;8336:139:::1;;;;;;::::0;;;;-1:-1:-1;;8336:139:6;;;;::::1;::::0;;::::1;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8294:181;;;;8497:7;8513:10;8489:36;;;;;-1:-1:-1::0;;;8489:36:6::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;;::::1;::::0;;;::::1;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8539:16;8569:10;8558:33;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;8558:33:6;;-1:-1:-1;8613:30:6;;::::1;;8605:67;;;::::0;;-1:-1:-1;;;8605:67:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;8605:67:6;;;;;;;;;;;;;::::1;;8723:18;8711:8;8694:14;:25;:47;;8686:84;;;::::0;;-1:-1:-1;;;8686:84:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;8686:84:6;;;;;;;;;;;;;::::1;;8789:13:::0;8785:60:::1;;8822:8;;;;;;8785:60;8996:15;-1:-1:-1::0;;;;;8996:28:6::1;9086:24;;;9132:4;;9137:23;9132:64;9187:8;9161:23;:34;9132:64;;;;;;;:::i;:::-;9042:172;::::0;::::1;;::::0;::::1;::::0;;;;;;;;;;;;;;;;;;;::::1;;::::0;;::::1;::::0;::::1;::::0;;::::1;::::0;;::::1;-1:-1:-1::0;;9042:172:6;;::::1;::::0;;::::1;::::0;;::::1;::::0;;;;;;;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;9042:172:6::1;-1:-1:-1::0;;;;;;9042:172:6;;::::1;::::0;;;::::1;::::0;;8996:232;;;;9042:172;;8996:232;;-1:-1:-1;8996:232:6;;-1:-1:-1;9042:172:6;-1:-1:-1;8996:232:6;;-1:-1:-1;8996:232:6;;-1:-1:-1;8996:232:6;9042:172;8996:232:::1;;;;;;::::0;;;;-1:-1:-1;;8996:232:6;;;;::::1;::::0;;::::1;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;8972:256:6;;-1:-1:-1;8972:256:6;-1:-1:-1;8972:256:6;;9242:36:::1;;;::::0;-1:-1:-1;;;9242:36:6;;::::1;;::::0;::::1;::::0;;;;;;;;;;;;;;;;;;;;;;::::1;::::0;;;;;;;::::1;;::::0;;::::1;::::0;;;::::1;::::0;::::1;;;;;-1:-1:-1::0;9292:26:6;;::::1;::::0;9332:35;;;::::1;::::0;-1:-1:-1;;;7733:1645:6::1;7789:11;;7733:1645;;;;9417:14;9395:18;:36;9387:75;;;::::0;;-1:-1:-1;;;9387:75:6;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;1840:1:0;;;;;;5346:4123:6::0;;:::o;739:40:9:-;;;;;;;;;;;;;;-1:-1:-1;;;739:40:9;;;;:::o;1557:96::-;985:5;1557:96;:::o;1659:394::-;1735:7;1758:12;1754:254;;-1:-1:-1;1025:64:9;1786:16;;1754:254;1823:7;1834:1;1823:12;1819:189;;;-1:-1:-1;1124:65:9;1851:16;;1819:189;1888:7;1899:1;1888:12;1884:124;;;-1:-1:-1;1224:66:9;1916:16;;1884:124;1953:7;1964:1;1953:12;1949:59;;;-1:-1:-1;1325:65:9;1981:16;;1949:59;2017:29;;;-1:-1:-1;;;2017:29:9;;;;;;;;;;;;-1:-1:-1;;;2017:29:9;;;;;;;;;;;;;;1455:96;1543:1;1455:96;:::o;1094:402:5:-;1197:16;1230:11;-1:-1:-1;;;;;1216:35:5;;:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;1216:37:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1216:37:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1216:37:5;;;;;;-1:-1:-1;1216:37:5;;;;;;;;;;-1:-1:-1;1216:37:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1197:56;;1263:26;1319:24;1337:5;1319:17;:24::i;:::-;1302:42;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;1302:42:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1292:53;;;;;;1263:82;;1425:2;1408:20;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;1408:20:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1398:31;;;;;;1376:18;:53;1355:134;;;;-1:-1:-1;;;1355:134:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1094:402;;;;:::o;1996:149::-;2098:19;;;;:12;:19;;;;;;:40;;-1:-1:-1;;;;;;2098:40:5;-1:-1:-1;;;;;2098:40:5;;;;;;;;;1996:149::o;9475:544:6:-;9607:36;:23;-1:-1:-1;;;;;9607:34:6;;:36::i;:::-;9599:63;;;;;-1:-1:-1;;;9599:63:6;;;;;;;;;;;;-1:-1:-1;;;9599:63:6;;;;;;;;;;;;;;;9743:12;9757:23;9784;-1:-1:-1;;;;;9784:36:6;9857:24;;;9883:11;;9834:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;9834:61:6;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;9834:61:6;-1:-1:-1;;;;;;9834:61:6;;;;;;;;;9784:121;;;;9834:61;;9784:121;;-1:-1:-1;9784:121:6;;-1:-1:-1;9834:61:6;-1:-1:-1;9784:121:6;;-1:-1:-1;9784:121:6;;-1:-1:-1;9784:121:6;9834:61;9784:121;;;;;;;;;;-1:-1:-1;;9784:121:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9742:163;;;;9923:7;9939:10;9915:36;;;;;-1:-1:-1;;;9915:36:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9969:17:6;;:10;;:22;9961:51;;;;-1:-1:-1;;;9961:51:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9475:544;;;;;:::o;2726:454:9:-;2793:51;;;;;;;;;;;;-1:-1:-1;;;2793:51:9;;;;2999:9;;2793:51;;2999:14;2991:35;;;;-1:-1:-1;;;2991:35:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3044:15:9;;3066:10;;3044:20;3036:41;;;;-1:-1:-1;;;3036:41:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3095:9:9;;3111:10;;3095:14;3087:35;;;;-1:-1:-1;;;3087:35:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3140:15:9;;3162:10;;3140:20;3132:41;;;;-1:-1:-1;;;3132:41:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2059:661;2133:16;2165:5;2174:1;2165:10;2161:553;;;-1:-1:-1;2191:36:9;;;;;;;;;;;;;;;;;2161:553;;;2248:5;2257:1;2248:10;2244:470;;;2274:40;;;;;;;;;;;;;;;;;;;2244:470;;;2335:5;2344:1;2335:10;2331:383;;;-1:-1:-1;2361:36:9;;;;;;;;;;;;;;;;;2331:383;;;2418:5;2427:1;2418:10;2414:300;;;-1:-1:-1;2444:37:9;;;;;;;;;;;;;;;;;2414:300;;;2502:5;2511:1;2502:10;2498:216;;;-1:-1:-1;2528:37:9;;;;;;;;;;;;;;;;;2498:216;;;2586:5;2595:1;2586:10;2582:132;;;-1:-1:-1;2612:34:9;;;;;;;;;;;;;;;;;2582:132;;;2677:26;;;-1:-1:-1;;;2677:26:9;;;;;;;;;;;;-1:-1:-1;;;2677:26:9;;;;;;;;;;;;;;757:190:1;886:20;932:8;;;757:190::o;5:318:-1:-;;;155:8;143:10;140:24;137:2;;;-1:-1;;167:12;137:2;202:6;192:8;189:20;186:2;;;-1:-1;;212:12;186:2;-1:-1;;244:31;;;293:25;;;;;-1:-1;131:192::o

Swarm Source

ipfs://6a902fc2b69bdd967561977c9cf7d5cea4e21b4123ab67e58f9b8e839a5db205

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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