ETH Price: $3,318.75 (+0.89%)

Contract

0xACce49759e2E98B44dE01bE2498537c37f2597DC
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x94cAEa39...0Ac37Ff4a
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
AuctionRebalanceExtension

Compiler Version
v0.6.10+commit.00c0fcaf

Optimization Enabled:
Yes with 200 runs

Other Settings:
istanbul EvmVersion, Apache-2.0 license
File 1 of 8 : AuctionRebalanceExtension.sol
/*
    Copyright 2023 Index Coop

    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

    http://www.apache.org/licenses/LICENSE-2.0

    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 License, Version 2.0
*/

pragma solidity 0.6.10;
pragma experimental "ABIEncoderV2";

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol";

import { AddressArrayUtils } from "../lib/AddressArrayUtils.sol";
import { BaseExtension } from "../lib/BaseExtension.sol";
import { IAuctionRebalanceModuleV1 } from "../interfaces/IAuctionRebalanceModuleV1.sol";
import { IBaseManager } from "../interfaces/IBaseManager.sol";
import { ISetToken } from "../interfaces/ISetToken.sol";

/**
 * @title AuctionRebalanceExtension
 * @author Index Coop
 *
 * @dev Extension contract for interacting with the AuctionRebalanceModuleV1. This contract acts as a pass-through and functions 
 * are only callable by operator. 
 */
contract AuctionRebalanceExtension is BaseExtension {
    using AddressArrayUtils for address[];
    using SafeMath for uint256;

    /* ============ Structs ============ */

    struct AuctionExecutionParams {
        uint256 targetUnit;                      // Target quantity of the component in Set, in precise units (10 ** 18).
        string priceAdapterName;                 // Identifier for the price adapter to be used.
        bytes priceAdapterConfigData;            // Encoded data for configuring the chosen price adapter.
    }

    /* ============ State Variables ============ */

    ISetToken public setToken;
    IAuctionRebalanceModuleV1 public auctionModule;  // AuctionRebalanceModuleV1

    /* ============ Constructor ============ */

    constructor(IBaseManager _manager, IAuctionRebalanceModuleV1 _auctionModule) public BaseExtension(_manager) {
        auctionModule = _auctionModule;
        setToken = manager.setToken();
    }

    /* ============ External Functions ============ */

    /**
     * @dev OPERATOR ONLY: Checks that the old components array matches the current components array and then invokes the 
     * AuctionRebalanceModuleV1 startRebalance function.
     * 
     * Refer to AuctionRebalanceModuleV1 for function specific restrictions.
     *
     * @param _quoteAsset                   ERC20 token used as the quote asset in auctions.
     * @param _oldComponents                Addresses of existing components in the SetToken.
     * @param _newComponents                Addresses of new components to be added.
     * @param _newComponentsAuctionParams   AuctionExecutionParams for new components, indexed corresponding to _newComponents.
     * @param _oldComponentsAuctionParams   AuctionExecutionParams for existing components, indexed corresponding to
     *                                      the current component positions. Set to 0 for components being removed.
     * @param _shouldLockSetToken           Indicates if the rebalance should lock the SetToken.
     * @param _rebalanceDuration            Duration of the rebalance in seconds.
     * @param _positionMultiplier           Position multiplier at the time target units were calculated.
     */
    function startRebalance(
        IERC20 _quoteAsset,
        address[] memory _oldComponents,
        address[] memory _newComponents,
        AuctionExecutionParams[] memory _newComponentsAuctionParams,
        AuctionExecutionParams[] memory _oldComponentsAuctionParams,
        bool _shouldLockSetToken,
        uint256 _rebalanceDuration,
        uint256 _positionMultiplier
    )
        external
        onlyOperator
    {
        address[] memory currentComponents = setToken.getComponents();
        
        require(currentComponents.length == _oldComponents.length, "Old components length must match the current components length.");

        for (uint256 i = 0; i < _oldComponents.length; i++) {
            require(currentComponents[i] == _oldComponents[i], "Input old components array must match the current components array.");
        }

        bytes memory callData = abi.encodeWithSelector(
            IAuctionRebalanceModuleV1.startRebalance.selector,
            setToken,
            _quoteAsset,
            _newComponents,
            _newComponentsAuctionParams,
            _oldComponentsAuctionParams,
            _shouldLockSetToken,
            _rebalanceDuration,
            _positionMultiplier
        );

        invokeManager(address(auctionModule), callData);
    }

    /**
     * @dev OPERATOR ONLY: Unlocks SetToken via AuctionRebalanceModuleV1. 
     * Refer to AuctionRebalanceModuleV1 for function specific restrictions.
     */
    function unlock() external onlyOperator {
        bytes memory callData = abi.encodeWithSelector(
            IAuctionRebalanceModuleV1.unlock.selector,
            setToken
        );

        invokeManager(address(auctionModule), callData);
    }

    /**
     * @dev OPERATOR ONLY: Sets the target raise percentage for all components on AuctionRebalanceModuleV1. 
     * Refer to AuctionRebalanceModuleV1 for function specific restrictions.
     *
     * @param _raiseTargetPercentage   Amount to raise all component's unit targets by (in precise units)
     */
    function setRaiseTargetPercentage(uint256 _raiseTargetPercentage) external onlyOperator {
        bytes memory callData = abi.encodeWithSelector(
            IAuctionRebalanceModuleV1.setRaiseTargetPercentage.selector,
            setToken,
            _raiseTargetPercentage
        );

        invokeManager(address(auctionModule), callData);
    }

    /**
     * @dev OPERATOR ONLY: Updates the bidding permission status for a list of addresses on AuctionRebalanceModuleV1. 
     * Refer to AuctionRebalanceModuleV1 for function specific restrictions.
     *
     * @param _bidders    An array of addresses whose bidding permission status is to be toggled.
     * @param _statuses   An array of booleans indicating the new bidding permission status for each corresponding address in `_bidders`.
     */
    function setBidderStatus(
        address[] memory _bidders,
        bool[] memory _statuses
    )
        external
        onlyOperator
    {
        bytes memory callData = abi.encodeWithSelector(
            IAuctionRebalanceModuleV1.setBidderStatus.selector,
            setToken,
            _bidders,
            _statuses
        );

        invokeManager(address(auctionModule), callData);
    }

    /**
     * @dev OPERATOR ONLY: Sets whether anyone can bid on the AuctionRebalanceModuleV1. 
     * Refer to AuctionRebalanceModuleV1 for function specific restrictions.
     *
     * @param _status   A boolean indicating if anyone can bid.
     */
    function setAnyoneBid(bool _status) external onlyOperator {
        bytes memory callData = abi.encodeWithSelector(
            IAuctionRebalanceModuleV1.setAnyoneBid.selector,
            setToken,
            _status
        );

        invokeManager(address(auctionModule), callData);
    }

    /**
     * @dev OPERATOR ONLY: Initializes the AuctionRebalanceModuleV1. 
     * Refer to AuctionRebalanceModuleV1 for function specific restrictions.
     */
    function initialize() external onlyOperator {
        bytes memory callData = abi.encodeWithSelector(
            IAuctionRebalanceModuleV1.initialize.selector,
            setToken
        );

        invokeManager(address(auctionModule), callData);
    }
}

File 2 of 8 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

File 3 of 8 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 4 of 8 : IAuctionRebalanceModuleV1.sol
/*
    Copyright 2023 Index Coop

    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

    http://www.apache.org/licenses/LICENSE-2.0

    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 License, Version 2.0
*/
pragma solidity 0.6.10;
pragma experimental "ABIEncoderV2";

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { ISetToken } from "./ISetToken.sol";

interface IAuctionRebalanceModuleV1 {
    
    struct AuctionExecutionParams {
        uint256 targetUnit;
        string priceAdapterName;
        bytes priceAdapterConfigData;
    }

    function startRebalance(
        ISetToken _setToken,
        IERC20 _quoteAsset,
        address[] calldata _newComponents,
        AuctionExecutionParams[] memory _newComponentsAuctionParams,
        AuctionExecutionParams[] memory _oldComponentsAuctionParams,
        bool _shouldLockSetToken,
        uint256 _rebalanceDuration,
        uint256 _initialPositionMultiplier
    ) external;

    function bid(
        ISetToken _setToken,
        IERC20 _component,
        uint256 _componentAmount,
        uint256 _quoteAssetLimit
    ) external;

    function raiseAssetTargets(ISetToken _setToken) external;

    function unlock(ISetToken _setToken) external;

    function setRaiseTargetPercentage(
        ISetToken _setToken, 
        uint256 _raiseTargetPercentage
    ) external;

    function setBidderStatus(
        ISetToken _setToken,
        address[] memory _bidders,
        bool[] memory _statuses
    ) external;

    function setAnyoneBid(ISetToken _setToken, bool _status) external;
    
    function initialize(ISetToken _setToken) external;
}

File 5 of 8 : IBaseManager.sol
/*
    Copyright 2021 Set Labs Inc.

    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

    http://www.apache.org/licenses/LICENSE-2.0

    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 License, Version 2.0
*/

pragma solidity 0.6.10;
pragma experimental "ABIEncoderV2";

import { ISetToken } from "./ISetToken.sol";

interface IBaseManager {
    function setToken() external returns(ISetToken);

    function methodologist() external returns(address);

    function operator() external returns(address);

    function interactManager(address _module, bytes calldata _encoded) external;

    function transferTokens(address _token, address _destination, uint256 _amount) external;
}

File 6 of 8 : ISetToken.sol
// SPDX-License-Identifier: Apache License, Version 2.0
pragma solidity 0.6.10;
pragma experimental "ABIEncoderV2";

import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

/**
 * @title ISetToken
 * @author Set Protocol
 *
 * Interface for operating with SetTokens.
 */
interface ISetToken is IERC20 {

    /* ============ Enums ============ */

    enum ModuleState {
        NONE,
        PENDING,
        INITIALIZED
    }

    /* ============ Structs ============ */
    /**
     * The base definition of a SetToken Position
     *
     * @param component           Address of token in the Position
     * @param module              If not in default state, the address of associated module
     * @param unit                Each unit is the # of components per 10^18 of a SetToken
     * @param positionState       Position ENUM. Default is 0; External is 1
     * @param data                Arbitrary data
     */
    struct Position {
        address component;
        address module;
        int256 unit;
        uint8 positionState;
        bytes data;
    }

    /**
     * A struct that stores a component's cash position details and external positions
     * This data structure allows O(1) access to a component's cash position units and
     * virtual units.
     *
     * @param virtualUnit               Virtual value of a component's DEFAULT position. Stored as virtual for efficiency
     *                                  updating all units at once via the position multiplier. Virtual units are achieved
     *                                  by dividing a "real" value by the "positionMultiplier"
     * @param componentIndex
     * @param externalPositionModules   List of external modules attached to each external position. Each module
     *                                  maps to an external position
     * @param externalPositions         Mapping of module => ExternalPosition struct for a given component
     */
    struct ComponentPosition {
      int256 virtualUnit;
      address[] externalPositionModules;
      mapping(address => ExternalPosition) externalPositions;
    }

    /**
     * A struct that stores a component's external position details including virtual unit and any
     * auxiliary data.
     *
     * @param virtualUnit       Virtual value of a component's EXTERNAL position.
     * @param data              Arbitrary data
     */
    struct ExternalPosition {
      int256 virtualUnit;
      bytes data;
    }


    /* ============ Functions ============ */

    function addComponent(address _component) external;
    function removeComponent(address _component) external;
    function editDefaultPositionUnit(address _component, int256 _realUnit) external;
    function addExternalPositionModule(address _component, address _positionModule) external;
    function removeExternalPositionModule(address _component, address _positionModule) external;
    function editExternalPositionUnit(address _component, address _positionModule, int256 _realUnit) external;
    function editExternalPositionData(address _component, address _positionModule, bytes calldata _data) external;

    function invoke(address _target, uint256 _value, bytes calldata _data) external returns(bytes memory);

    function editPositionMultiplier(int256 _newMultiplier) external;

    function mint(address _account, uint256 _quantity) external;
    function burn(address _account, uint256 _quantity) external;

    function lock() external;
    function unlock() external;

    function addModule(address _module) external;
    function removeModule(address _module) external;
    function initializeModule() external;

    function setManager(address _manager) external;

    function manager() external view returns (address);
    function moduleStates(address _module) external view returns (ModuleState);
    function getModules() external view returns (address[] memory);

    function getDefaultPositionRealUnit(address _component) external view returns(int256);
    function getExternalPositionRealUnit(address _component, address _positionModule) external view returns(int256);
    function getComponents() external view returns(address[] memory);
    function getExternalPositionModules(address _component) external view returns(address[] memory);
    function getExternalPositionData(address _component, address _positionModule) external view returns(bytes memory);
    function isExternalPositionModule(address _component, address _module) external view returns(bool);
    function isComponent(address _component) external view returns(bool);

    function positionMultiplier() external view returns (int256);
    function getPositions() external view returns (Position[] memory);
    function getTotalComponentRealUnits(address _component) external view returns(int256);

    function isInitializedModule(address _module) external view returns(bool);
    function isPendingModule(address _module) external view returns(bool);
    function isLocked() external view returns (bool);
}

File 7 of 8 : AddressArrayUtils.sol
/*
    Copyright 2020 Set Labs Inc.

    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

    http://www.apache.org/licenses/LICENSE-2.0

    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 License, Version 2.0
*/

pragma solidity 0.6.10;

/**
 * @title AddressArrayUtils
 * @author Set Protocol
 *
 * Utility functions to handle Address Arrays
 *
 * CHANGELOG:
 * - 4/27/21: Added validatePairsWithArray methods
 */
library AddressArrayUtils {

    /**
     * Finds the index of the first occurrence of the given element.
     * @param A The input array to search
     * @param a The value to find
     * @return Returns (index and isIn) for the first occurrence starting from index 0
     */
    function indexOf(address[] memory A, address a) internal pure returns (uint256, bool) {
        uint256 length = A.length;
        for (uint256 i = 0; i < length; i++) {
            if (A[i] == a) {
                return (i, true);
            }
        }
        return (uint256(-1), false);
    }

    /**
    * Returns true if the value is present in the list. Uses indexOf internally.
    * @param A The input array to search
    * @param a The value to find
    * @return Returns isIn for the first occurrence starting from index 0
    */
    function contains(address[] memory A, address a) internal pure returns (bool) {
        (, bool isIn) = indexOf(A, a);
        return isIn;
    }

    /**
    * Returns true if there are 2 elements that are the same in an array
    * @param A The input array to search
    * @return Returns boolean for the first occurrence of a duplicate
    */
    function hasDuplicate(address[] memory A) internal pure returns(bool) {
        require(A.length > 0, "A is empty");

        for (uint256 i = 0; i < A.length - 1; i++) {
            address current = A[i];
            for (uint256 j = i + 1; j < A.length; j++) {
                if (current == A[j]) {
                    return true;
                }
            }
        }
        return false;
    }

    /**
     * @param A The input array to search
     * @param a The address to remove
     * @return Returns the array with the object removed.
     */
    function remove(address[] memory A, address a)
        internal
        pure
        returns (address[] memory)
    {
        (uint256 index, bool isIn) = indexOf(A, a);
        if (!isIn) {
            revert("Address not in array.");
        } else {
            (address[] memory _A,) = pop(A, index);
            return _A;
        }
    }

    /**
     * @param A The input array to search
     * @param a The address to remove
     */
    function removeStorage(address[] storage A, address a)
        internal
    {
        (uint256 index, bool isIn) = indexOf(A, a);
        if (!isIn) {
            revert("Address not in array.");
        } else {
            uint256 lastIndex = A.length - 1; // If the array would be empty, the previous line would throw, so no underflow here
            if (index != lastIndex) { A[index] = A[lastIndex]; }
            A.pop();
        }
    }

    /**
    * Removes specified index from array
    * @param A The input array to search
    * @param index The index to remove
    * @return Returns the new array and the removed entry
    */
    function pop(address[] memory A, uint256 index)
        internal
        pure
        returns (address[] memory, address)
    {
        uint256 length = A.length;
        require(index < A.length, "Index must be < A length");
        address[] memory newAddresses = new address[](length - 1);
        for (uint256 i = 0; i < index; i++) {
            newAddresses[i] = A[i];
        }
        for (uint256 j = index + 1; j < length; j++) {
            newAddresses[j - 1] = A[j];
        }
        return (newAddresses, A[index]);
    }

    /**
     * Returns the combination of the two arrays
     * @param A The first array
     * @param B The second array
     * @return Returns A extended by B
     */
    function extend(address[] memory A, address[] memory B) internal pure returns (address[] memory) {
        uint256 aLength = A.length;
        uint256 bLength = B.length;
        address[] memory newAddresses = new address[](aLength + bLength);
        for (uint256 i = 0; i < aLength; i++) {
            newAddresses[i] = A[i];
        }
        for (uint256 j = 0; j < bLength; j++) {
            newAddresses[aLength + j] = B[j];
        }
        return newAddresses;
    }

    /**
     * Validate that address and uint array lengths match. Validate address array is not empty
     * and contains no duplicate elements.
     *
     * @param A         Array of addresses
     * @param B         Array of uint
     */
    function validatePairsWithArray(address[] memory A, uint[] memory B) internal pure {
        require(A.length == B.length, "Array length mismatch");
        _validateLengthAndUniqueness(A);
    }

    /**
     * Validate that address and bool array lengths match. Validate address array is not empty
     * and contains no duplicate elements.
     *
     * @param A         Array of addresses
     * @param B         Array of bool
     */
    function validatePairsWithArray(address[] memory A, bool[] memory B) internal pure {
        require(A.length == B.length, "Array length mismatch");
        _validateLengthAndUniqueness(A);
    }

    /**
     * Validate that address and string array lengths match. Validate address array is not empty
     * and contains no duplicate elements.
     *
     * @param A         Array of addresses
     * @param B         Array of strings
     */
    function validatePairsWithArray(address[] memory A, string[] memory B) internal pure {
        require(A.length == B.length, "Array length mismatch");
        _validateLengthAndUniqueness(A);
    }

    /**
     * Validate that address array lengths match, and calling address array are not empty
     * and contain no duplicate elements.
     *
     * @param A         Array of addresses
     * @param B         Array of addresses
     */
    function validatePairsWithArray(address[] memory A, address[] memory B) internal pure {
        require(A.length == B.length, "Array length mismatch");
        _validateLengthAndUniqueness(A);
    }

    /**
     * Validate that address and bytes array lengths match. Validate address array is not empty
     * and contains no duplicate elements.
     *
     * @param A         Array of addresses
     * @param B         Array of bytes
     */
    function validatePairsWithArray(address[] memory A, bytes[] memory B) internal pure {
        require(A.length == B.length, "Array length mismatch");
        _validateLengthAndUniqueness(A);
    }

    /**
     * Validate address array is not empty and contains no duplicate elements.
     *
     * @param A          Array of addresses
     */
    function _validateLengthAndUniqueness(address[] memory A) internal pure {
        require(A.length > 0, "Array length must be > 0");
        require(!hasDuplicate(A), "Cannot duplicate addresses");
    }
}

File 8 of 8 : BaseExtension.sol
/*
    Copyright 2021 Set Labs Inc.

    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

    http://www.apache.org/licenses/LICENSE-2.0

    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 License, Version 2.0
*/

pragma solidity 0.6.10;

import { AddressArrayUtils } from "../lib/AddressArrayUtils.sol";
import { IBaseManager } from "../interfaces/IBaseManager.sol";

/**
 * @title BaseExtension
 * @author Set Protocol
 *
 * Abstract class that houses common extension-related state and functions.
 */
abstract contract BaseExtension {
    using AddressArrayUtils for address[];

    /* ============ Events ============ */

    event CallerStatusUpdated(address indexed _caller, bool _status);
    event AnyoneCallableUpdated(bool indexed _status);

    /* ============ Modifiers ============ */

    /**
     * Throws if the sender is not the SetToken operator
     */
    modifier onlyOperator() {
        require(msg.sender == manager.operator(), "Must be operator");
        _;
    }

    /**
     * Throws if the sender is not the SetToken methodologist
     */
    modifier onlyMethodologist() {
        require(msg.sender == manager.methodologist(), "Must be methodologist");
        _;
    }

    /**
     * Throws if caller is a contract, can be used to stop flash loan and sandwich attacks
     */
    modifier onlyEOA() {
        require(msg.sender == tx.origin, "Caller must be EOA Address");
        _;
    }

    /**
     * Throws if not allowed caller
     */
    modifier onlyAllowedCaller(address _caller) {
        require(isAllowedCaller(_caller), "Address not permitted to call");
        _;
    }

    /* ============ State Variables ============ */

    // Instance of manager contract
    IBaseManager public manager;

    // Boolean indicating if anyone can call function
    bool public anyoneCallable;

    // Mapping of addresses allowed to call function
    mapping(address => bool) public callAllowList;

    /* ============ Constructor ============ */

    constructor(IBaseManager _manager) public { manager = _manager; }

    /* ============ External Functions ============ */

    /**
     * OPERATOR ONLY: Toggle ability for passed addresses to call only allowed caller functions
     *
     * @param _callers           Array of caller addresses to toggle status
     * @param _statuses          Array of statuses for each caller
     */
    function updateCallerStatus(address[] calldata _callers, bool[] calldata _statuses) external onlyOperator {
        require(_callers.length == _statuses.length, "Array length mismatch");
        require(_callers.length > 0, "Array length must be > 0");
        require(!_callers.hasDuplicate(), "Cannot duplicate callers");

        for (uint256 i = 0; i < _callers.length; i++) {
            address caller = _callers[i];
            bool status = _statuses[i];
            callAllowList[caller] = status;
            emit CallerStatusUpdated(caller, status);
        }
    }

    /**
     * OPERATOR ONLY: Toggle whether anyone can call function, bypassing the callAllowlist
     *
     * @param _status           Boolean indicating whether to allow anyone call
     */
    function updateAnyoneCallable(bool _status) external onlyOperator {
        anyoneCallable = _status;
        emit AnyoneCallableUpdated(_status);
    }

    /* ============ Internal Functions ============ */

    /**
     * Invoke manager to transfer tokens from manager to other contract.
     *
     * @param _token           Token being transferred from manager contract
     * @param _amount          Amount of token being transferred
     */
    function invokeManagerTransfer(address _token, address _destination, uint256 _amount) internal {
        manager.transferTokens(_token, _destination, _amount);
    }

    /**
     * Invoke call from manager
     *
     * @param _module           Module to interact with
     * @param _encoded          Encoded byte data
     */
    function invokeManager(address _module, bytes memory _encoded) internal {
        manager.interactManager(_module, _encoded);
    }

    /**
     * Determine if passed address is allowed to call function. If anyoneCallable set to true anyone can call otherwise needs to be approved.
     *
     * return bool              Boolean indicating if allowed caller
     */
    function isAllowedCaller(address _caller) internal view virtual returns (bool) {
        return anyoneCallable || callAllowList[_caller];
    }
}

Settings
{
  "evmVersion": "istanbul",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IBaseManager","name":"_manager","type":"address"},{"internalType":"contract IAuctionRebalanceModuleV1","name":"_auctionModule","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bool","name":"_status","type":"bool"}],"name":"AnyoneCallableUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_caller","type":"address"},{"indexed":false,"internalType":"bool","name":"_status","type":"bool"}],"name":"CallerStatusUpdated","type":"event"},{"inputs":[],"name":"anyoneCallable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"auctionModule","outputs":[{"internalType":"contract IAuctionRebalanceModuleV1","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"callAllowList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"manager","outputs":[{"internalType":"contract IBaseManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_status","type":"bool"}],"name":"setAnyoneBid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_bidders","type":"address[]"},{"internalType":"bool[]","name":"_statuses","type":"bool[]"}],"name":"setBidderStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_raiseTargetPercentage","type":"uint256"}],"name":"setRaiseTargetPercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setToken","outputs":[{"internalType":"contract ISetToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_quoteAsset","type":"address"},{"internalType":"address[]","name":"_oldComponents","type":"address[]"},{"internalType":"address[]","name":"_newComponents","type":"address[]"},{"components":[{"internalType":"uint256","name":"targetUnit","type":"uint256"},{"internalType":"string","name":"priceAdapterName","type":"string"},{"internalType":"bytes","name":"priceAdapterConfigData","type":"bytes"}],"internalType":"struct AuctionRebalanceExtension.AuctionExecutionParams[]","name":"_newComponentsAuctionParams","type":"tuple[]"},{"components":[{"internalType":"uint256","name":"targetUnit","type":"uint256"},{"internalType":"string","name":"priceAdapterName","type":"string"},{"internalType":"bytes","name":"priceAdapterConfigData","type":"bytes"}],"internalType":"struct AuctionRebalanceExtension.AuctionExecutionParams[]","name":"_oldComponentsAuctionParams","type":"tuple[]"},{"internalType":"bool","name":"_shouldLockSetToken","type":"bool"},{"internalType":"uint256","name":"_rebalanceDuration","type":"uint256"},{"internalType":"uint256","name":"_positionMultiplier","type":"uint256"}],"name":"startRebalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_status","type":"bool"}],"name":"updateAnyoneCallable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_callers","type":"address[]"},{"internalType":"bool[]","name":"_statuses","type":"bool[]"}],"name":"updateCallerStatus","outputs":[],"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063a69df4b51161008c578063e81409d311610066578063e81409d31461016d578063e8465e4614610180578063ed9cf58c14610193578063f2d7dddb1461019b576100cf565b8063a69df4b51461013f578063aea6cc8014610147578063dd1c4ca21461015a576100cf565b80632b7f5bcf146100d45780632d158e7d146100f2578063381b03d814610107578063481c6a751461011c5780635a860bab146101245780638129fc1c14610137575b600080fd5b6100dc6101ae565b6040516100e9919061144e565b60405180910390f35b6100fa6101bd565b6040516100e99190611443565b61011a61011536600461112d565b6101cd565b005b6100dc610309565b61011a6101323660046111ee565b610318565b61011a610416565b61011a610543565b6100fa610155366004610fe9565b610622565b61011a6101683660046111ee565b610637565b61011a61017b366004611028565b610767565b61011a61018e36600461120e565b610977565b6100dc610bcb565b61011a6101a93660046112ed565b610bda565b6003546001600160a01b031681565b600054600160a01b900460ff1681565b6000809054906101000a90046001600160a01b03166001600160a01b031663570ca7356040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561021c57600080fd5b505af1158015610230573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610254919061100c565b6001600160a01b0316336001600160a01b03161461028d5760405162461bcd60e51b8152600401610284906115cf565b60405180910390fd5b600254604051606091635937d50560e11b916102b9916001600160a01b03169086908690602401611462565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152600354909150610304906001600160a01b031682610cbb565b505050565b6000546001600160a01b031681565b6000809054906101000a90046001600160a01b03166001600160a01b031663570ca7356040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561036757600080fd5b505af115801561037b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061039f919061100c565b6001600160a01b0316336001600160a01b0316146103cf5760405162461bcd60e51b8152600401610284906115cf565b6000805460ff60a01b1916600160a01b83151590810291909117825560405190917f92f8cd47e301bde05ff0abd73cc198632f3ac64fa443a1afc3e47745b3ea1acb91a250565b6000809054906101000a90046001600160a01b03166001600160a01b031663570ca7356040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561046557600080fd5b505af1158015610479573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061049d919061100c565b6001600160a01b0316336001600160a01b0316146104cd5760405162461bcd60e51b8152600401610284906115cf565b60025460405160609163189acdbd60e31b916104f5916001600160a01b03169060240161144e565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152600354909150610540906001600160a01b031682610cbb565b50565b6000809054906101000a90046001600160a01b03166001600160a01b031663570ca7356040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561059257600080fd5b505af11580156105a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ca919061100c565b6001600160a01b0316336001600160a01b0316146105fa5760405162461bcd60e51b8152600401610284906115cf565b600254604051606091630bdb124f60e21b916104f5916001600160a01b03169060240161144e565b60016020526000908152604090205460ff1681565b6000809054906101000a90046001600160a01b03166001600160a01b031663570ca7356040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561068657600080fd5b505af115801561069a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106be919061100c565b6001600160a01b0316336001600160a01b0316146106ee5760405162461bcd60e51b8152600401610284906115cf565b600254604051606091631e8f0ed360e31b91610718916001600160a01b03169085906024016114c9565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152600354909150610763906001600160a01b031682610cbb565b5050565b6000809054906101000a90046001600160a01b03166001600160a01b031663570ca7356040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156107b657600080fd5b505af11580156107ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ee919061100c565b6001600160a01b0316336001600160a01b03161461081e5760405162461bcd60e51b8152600401610284906115cf565b82811461083d5760405162461bcd60e51b8152600401610284906115f9565b8261085a5760405162461bcd60e51b8152600401610284906116c8565b610896848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610d2392505050565b156108b35760405162461bcd60e51b815260040161028490611691565b60005b838110156109705760008585838181106108cc57fe5b90506020020160208101906108e19190610fe9565b905060008484848181106108f157fe5b905060200201602081019061090691906111ee565b6001600160a01b03831660008181526001602052604090819020805460ff191684151517905551919250907fbbf89f81f443eef9b97bfd2b7e260c0f575050d4094a0027dcf5d3623d9ef3ad9061095e908490611443565b60405180910390a250506001016108b6565b5050505050565b6000809054906101000a90046001600160a01b03166001600160a01b031663570ca7356040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156109c657600080fd5b505af11580156109da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109fe919061100c565b6001600160a01b0316336001600160a01b031614610a2e5760405162461bcd60e51b8152600401610284906115cf565b600254604080516399d50d5d60e01b815290516060926001600160a01b0316916399d50d5d916004808301926000929190829003018186803b158015610a7357600080fd5b505afa158015610a87573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610aaf9190810190611091565b90508751815114610ad25760405162461bcd60e51b815260040161028490611572565b60005b8851811015610b3d57888181518110610aea57fe5b60200260200101516001600160a01b0316828281518110610b0757fe5b60200260200101516001600160a01b031614610b355760405162461bcd60e51b815260040161028490611628565b600101610ad5565b50600254604051606091634707bbab60e11b91610b74916001600160a01b0316908d908c908c908c908c908c908c906024016114e4565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152600354909150610bbf906001600160a01b031682610cbb565b50505050505050505050565b6002546001600160a01b031681565b6000809054906101000a90046001600160a01b03166001600160a01b031663570ca7356040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610c2957600080fd5b505af1158015610c3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c61919061100c565b6001600160a01b0316336001600160a01b031614610c915760405162461bcd60e51b8152600401610284906115cf565b6002546040516060916339ba98dd60e11b91610718916001600160a01b0316908590602401611559565b600054604051634cf4f63b60e01b81526001600160a01b0390911690634cf4f63b90610ced9085908590600401611417565b600060405180830381600087803b158015610d0757600080fd5b505af1158015610d1b573d6000803e3d6000fd5b505050505050565b600080825111610d455760405162461bcd60e51b8152600401610284906116ff565b60005b6001835103811015610dc9576000838281518110610d6257fe5b6020026020010151905060008260010190505b8451811015610dbf57848181518110610d8a57fe5b60200260200101516001600160a01b0316826001600160a01b03161415610db75760019350505050610dcf565b600101610d75565b5050600101610d48565b50600090505b919050565b60008083601f840112610de5578182fd5b50813567ffffffffffffffff811115610dfc578182fd5b6020830191508360208083028501011115610e1657600080fd5b9250929050565b600082601f830112610e2d578081fd5b8135610e40610e3b8261174a565b611723565b818152915060208083019084810181840286018201871015610e6157600080fd5b60005b84811015610e89578135610e778161176a565b84529282019290820190600101610e64565b505050505092915050565b600082601f830112610ea4578081fd5b8135610eb2610e3b8261174a565b818152915060208083019084810160005b84811015610e895781358701606080601f19838c03011215610ee457600080fd5b610eed81611723565b85830135815260408084013567ffffffffffffffff80821115610f0f57600080fd5b610f1d8e8a84890101610f75565b8985015284860135915080821115610f3457600080fd5b50610f438d8983880101610f75565b9183019190915250865250509282019290820190600101610ec3565b80358015158114610f6f57600080fd5b92915050565b600082601f830112610f85578081fd5b813567ffffffffffffffff811115610f9b578182fd5b610fae601f8201601f1916602001611723565b9150808252836020828501011115610fc557600080fd5b8060208401602084013760009082016020015292915050565b8035610f6f8161176a565b600060208284031215610ffa578081fd5b81356110058161176a565b9392505050565b60006020828403121561101d578081fd5b81516110058161176a565b6000806000806040858703121561103d578283fd5b843567ffffffffffffffff80821115611054578485fd5b61106088838901610dd4565b90965094506020870135915080821115611078578384fd5b5061108587828801610dd4565b95989497509550505050565b600060208083850312156110a3578182fd5b825167ffffffffffffffff8111156110b9578283fd5b80840185601f8201126110ca578384fd5b805191506110da610e3b8361174a565b82815283810190828501858502840186018910156110f6578687fd5b8693505b8484101561112157805161110d8161176a565b8352600193909301929185019185016110fa565b50979650505050505050565b6000806040838503121561113f578182fd5b823567ffffffffffffffff80821115611156578384fd5b61116286838701610e1d565b9350602091508185013581811115611178578384fd5b85019050601f8101861361118a578283fd5b8035611198610e3b8261174a565b81815283810190838501858402850186018a10156111b4578687fd5b8694505b838510156111de576111ca8a82610f5f565b8352600194909401939185019185016111b8565b5080955050505050509250929050565b6000602082840312156111ff578081fd5b81358015158114611005578182fd5b600080600080600080600080610100898b03121561122a578384fd5b6112348a8a610fde565b9750602089013567ffffffffffffffff80821115611250578586fd5b61125c8c838d01610e1d565b985060408b0135915080821115611271578586fd5b61127d8c838d01610e1d565b975060608b0135915080821115611292578586fd5b61129e8c838d01610e94565b965060808b01359150808211156112b3578586fd5b506112c08b828c01610e94565b9450506112d08a60a08b01610f5f565b925060c0890135915060e089013590509295985092959890939650565b6000602082840312156112fe578081fd5b5035919050565b6000815180845260208085019450808401835b8381101561133d5781516001600160a01b031687529582019590820190600101611318565b509495945050505050565b6000815180845260208085018081965082840281019150828601855b858110156113bf578284038952815160608151865286820151818888015261138e828801826113cc565b60409250828401519150878103838901526113a981836113cc565b9c89019c97505050928601925050600101611364565b5091979650505050505050565b60008151808452815b818110156113f1576020818501810151868301820152016113d5565b818111156114025782602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b038316815260406020820181905260009061143b908301846113cc565b949350505050565b901515815260200190565b6001600160a01b0391909116815260200190565b6001600160a01b03841681526060602080830182905260009161148790840186611305565b8381036040850152845180825282860191830190845b818110156114bb57835115158352928401929184019160010161149d565b509098975050505050505050565b6001600160a01b039290921682521515602082015260400190565b6001600160a01b03898116825288166020820152610100604082018190526000906115118382018a611305565b8381036060850152611523818a611348565b91505082810360808401526115388188611348565b95151560a0840152505060c081019290925260e09091015295945050505050565b6001600160a01b03929092168252602082015260400190565b6020808252603f908201527f4f6c6420636f6d706f6e656e7473206c656e677468206d757374206d6174636860408201527f207468652063757272656e7420636f6d706f6e656e7473206c656e6774682e00606082015260800190565b60208082526010908201526f26bab9ba1031329037b832b930ba37b960811b604082015260600190565b602080825260159082015274082e4e4c2f240d8cadccee8d040dad2e6dac2e8c6d605b1b604082015260600190565b60208082526043908201527f496e707574206f6c6420636f6d706f6e656e7473206172726179206d7573742060408201527f6d61746368207468652063757272656e7420636f6d706f6e656e74732061727260608201526230bc9760e91b608082015260a00190565b60208082526018908201527f43616e6e6f74206475706c69636174652063616c6c6572730000000000000000604082015260600190565b60208082526018908201527f4172726179206c656e677468206d757374206265203e20300000000000000000604082015260600190565b6020808252600a90820152694120697320656d70747960b01b604082015260600190565b60405181810167ffffffffffffffff8111828210171561174257600080fd5b604052919050565b600067ffffffffffffffff821115611760578081fd5b5060209081020190565b6001600160a01b038116811461054057600080fdfea26469706673582212207d554a8f1a12fcd8ea1f639bcbac9f6964dacdb9bf02f1829ea036cdec7d376c64736f6c634300060a0033

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

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.