ETH Price: $1,468.89 (-6.16%)

Contract

0x7A417F16A5b101e85EdB2743388e8aFD3696bE62
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Adjust Fee133519712021-10-04 10:08:181282 days ago1633342098IN
Set: Social Trading Manager V2
0 ETH0.0048359365
Adjust Fee130548582021-08-19 9:20:151328 days ago1629364815IN
Set: Social Trading Manager V2
0 ETH0.002394132.15336222
Update Allocatio...124140932021-05-11 16:09:111428 days ago1620749351IN
Set: Social Trading Manager V2
0 ETH0.42130185327.59572192
Adjust Fee122317022021-04-13 12:22:411456 days ago1618316561IN
Set: Social Trading Manager V2
0 ETH0.0067871897
Initiate Entry F...121967392021-04-08 3:22:441461 days ago1617852164IN
Set: Social Trading Manager V2
0 ETH0.00461326100.01
Adjust Fee121967322021-04-08 3:21:011461 days ago1617852061IN
Set: Social Trading Manager V2
0 ETH0.00800468114.4
Adjust Fee121967252021-04-08 3:19:121461 days ago1617851952IN
Set: Social Trading Manager V2
0 ETH0.00706707101.00000358
Adjust Fee121967212021-04-08 3:17:531461 days ago1617851873IN
Set: Social Trading Manager V2
0 ETH0.01930346100.1476597
Initiate Entry F...121967142021-04-08 3:15:221461 days ago1617851722IN
Set: Social Trading Manager V2
0 ETH0.00461913100.13737362
Update Allocatio...121099862021-03-25 19:28:321474 days ago1616700512IN
Set: Social Trading Manager V2
0 ETH0.24830611130
Update Allocatio...121099212021-03-25 19:13:411474 days ago1616699621IN
Set: Social Trading Manager V2
0 ETH0.26600485139
Update Allocatio...120563052021-03-17 12:55:201483 days ago1615985720IN
Set: Social Trading Manager V2
0 ETH0.25681366123.98000051
Update Allocatio...120561772021-03-17 12:31:331483 days ago1615984293IN
Set: Social Trading Manager V2
0 ETH0.33074877170
Update Allocatio...120561712021-03-17 12:30:301483 days ago1615984230IN
Set: Social Trading Manager V2
0 ETH0.3298017170
Update Allocatio...118072262021-02-07 4:53:021521 days ago1612673582IN
Set: Social Trading Manager V2
0 ETH0.28391129145.9262277
Update Allocatio...118018462021-02-06 9:03:511522 days ago1612602231IN
Set: Social Trading Manager V2
0 ETH0.2837641129.91226264
Update Allocatio...117788462021-02-02 20:04:231525 days ago1612296263IN
Set: Social Trading Manager V2
0 ETH0.38714538183.61750398
Update Allocatio...117534622021-01-29 22:25:061529 days ago1611959106IN
Set: Social Trading Manager V2
0 ETH0.24734489119.28571428
Update Allocatio...117534612021-01-29 22:25:021529 days ago1611959102IN
Set: Social Trading Manager V2
0 ETH0.19469856100.425
Update Allocatio...117534452021-01-29 22:20:461529 days ago1611958846IN
Set: Social Trading Manager V2
0 ETH0.1593985780.7611336
Update Allocatio...117384382021-01-27 14:40:141532 days ago1611758414IN
Set: Social Trading Manager V2
0 ETH0.38391561181.55
Adjust Fee117361702021-01-27 6:20:231532 days ago1611728423IN
Set: Social Trading Manager V2
0 ETH0.0080330856
Update Allocatio...117322562021-01-26 15:54:351533 days ago1611676475IN
Set: Social Trading Manager V2
0 ETH0.24265538114
Update Allocatio...117263072021-01-25 17:43:301533 days ago1611596610IN
Set: Social Trading Manager V2
0 ETH0.1637630978.383
Update Allocatio...117262782021-01-25 17:37:111533 days ago1611596231IN
Set: Social Trading Manager V2
0 ETH0.1791392285.81585454
View all transactions

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 0xBFE8Dd8b...4D607Fa47
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
SocialTradingManagerV2

Compiler Version
v0.5.7+commit.6da8b019

Optimization Enabled:
Yes with 200 runs

Other Settings:
byzantium EvmVersion, Apache-2.0 license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2020-03-26
*/

/*
    Copyright 2018 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.
*/

pragma solidity 0.5.7;


/**
 * @title ICore
 * @author Set Protocol
 *
 * The ICore Contract defines all the functions exposed in the Core through its
 * various extensions and is a light weight way to interact with the contract.
 */
interface ICore {
    /**
     * Return transferProxy address.
     *
     * @return address       transferProxy address
     */
    function transferProxy()
        external
        view
        returns (address);

    /**
     * Return vault address.
     *
     * @return address       vault address
     */
    function vault()
        external
        view
        returns (address);

    /**
     * Return address belonging to given exchangeId.
     *
     * @param  _exchangeId       ExchangeId number
     * @return address           Address belonging to given exchangeId
     */
    function exchangeIds(
        uint8 _exchangeId
    )
        external
        view
        returns (address);

    /*
     * Returns if valid set
     *
     * @return  bool      Returns true if Set created through Core and isn't disabled
     */
    function validSets(address)
        external
        view
        returns (bool);

    /*
     * Returns if valid module
     *
     * @return  bool      Returns true if valid module
     */
    function validModules(address)
        external
        view
        returns (bool);

    /**
     * Return boolean indicating if address is a valid Rebalancing Price Library.
     *
     * @param  _priceLibrary    Price library address
     * @return bool             Boolean indicating if valid Price Library
     */
    function validPriceLibraries(
        address _priceLibrary
    )
        external
        view
        returns (bool);

    /**
     * Exchanges components for Set Tokens
     *
     * @param  _set          Address of set to issue
     * @param  _quantity     Quantity of set to issue
     */
    function issue(
        address _set,
        uint256 _quantity
    )
        external;

    /**
     * Issues a specified Set for a specified quantity to the recipient
     * using the caller's components from the wallet and vault.
     *
     * @param  _recipient    Address to issue to
     * @param  _set          Address of the Set to issue
     * @param  _quantity     Number of tokens to issue
     */
    function issueTo(
        address _recipient,
        address _set,
        uint256 _quantity
    )
        external;

    /**
     * Converts user's components into Set Tokens held directly in Vault instead of user's account
     *
     * @param _set          Address of the Set
     * @param _quantity     Number of tokens to redeem
     */
    function issueInVault(
        address _set,
        uint256 _quantity
    )
        external;

    /**
     * Function to convert Set Tokens into underlying components
     *
     * @param _set          The address of the Set token
     * @param _quantity     The number of tokens to redeem. Should be multiple of natural unit.
     */
    function redeem(
        address _set,
        uint256 _quantity
    )
        external;

    /**
     * Redeem Set token and return components to specified recipient. The components
     * are left in the vault
     *
     * @param _recipient    Recipient of Set being issued
     * @param _set          Address of the Set
     * @param _quantity     Number of tokens to redeem
     */
    function redeemTo(
        address _recipient,
        address _set,
        uint256 _quantity
    )
        external;

    /**
     * Function to convert Set Tokens held in vault into underlying components
     *
     * @param _set          The address of the Set token
     * @param _quantity     The number of tokens to redeem. Should be multiple of natural unit.
     */
    function redeemInVault(
        address _set,
        uint256 _quantity
    )
        external;

    /**
     * Composite method to redeem and withdraw with a single transaction
     *
     * Normally, you should expect to be able to withdraw all of the tokens.
     * However, some have central abilities to freeze transfers (e.g. EOS). _toExclude
     * allows you to optionally specify which component tokens to exclude when
     * redeeming. They will remain in the vault under the users' addresses.
     *
     * @param _set          Address of the Set
     * @param _to           Address to withdraw or attribute tokens to
     * @param _quantity     Number of tokens to redeem
     * @param _toExclude    Mask of indexes of tokens to exclude from withdrawing
     */
    function redeemAndWithdrawTo(
        address _set,
        address _to,
        uint256 _quantity,
        uint256 _toExclude
    )
        external;

    /**
     * Deposit multiple tokens to the vault. Quantities should be in the
     * order of the addresses of the tokens being deposited.
     *
     * @param  _tokens           Array of the addresses of the ERC20 tokens
     * @param  _quantities       Array of the number of tokens to deposit
     */
    function batchDeposit(
        address[] calldata _tokens,
        uint256[] calldata _quantities
    )
        external;

    /**
     * Withdraw multiple tokens from the vault. Quantities should be in the
     * order of the addresses of the tokens being withdrawn.
     *
     * @param  _tokens            Array of the addresses of the ERC20 tokens
     * @param  _quantities        Array of the number of tokens to withdraw
     */
    function batchWithdraw(
        address[] calldata _tokens,
        uint256[] calldata _quantities
    )
        external;

    /**
     * Deposit any quantity of tokens into the vault.
     *
     * @param  _token           The address of the ERC20 token
     * @param  _quantity        The number of tokens to deposit
     */
    function deposit(
        address _token,
        uint256 _quantity
    )
        external;

    /**
     * Withdraw a quantity of tokens from the vault.
     *
     * @param  _token           The address of the ERC20 token
     * @param  _quantity        The number of tokens to withdraw
     */
    function withdraw(
        address _token,
        uint256 _quantity
    )
        external;

    /**
     * Transfer tokens associated with the sender's account in vault to another user's
     * account in vault.
     *
     * @param  _token           Address of token being transferred
     * @param  _to              Address of user receiving tokens
     * @param  _quantity        Amount of tokens being transferred
     */
    function internalTransfer(
        address _token,
        address _to,
        uint256 _quantity
    )
        external;

    /**
     * Deploys a new Set Token and adds it to the valid list of SetTokens
     *
     * @param  _factory              The address of the Factory to create from
     * @param  _components           The address of component tokens
     * @param  _units                The units of each component token
     * @param  _naturalUnit          The minimum unit to be issued or redeemed
     * @param  _name                 The bytes32 encoded name of the new Set
     * @param  _symbol               The bytes32 encoded symbol of the new Set
     * @param  _callData             Byte string containing additional call parameters
     * @return setTokenAddress       The address of the new Set
     */
    function createSet(
        address _factory,
        address[] calldata _components,
        uint256[] calldata _units,
        uint256 _naturalUnit,
        bytes32 _name,
        bytes32 _symbol,
        bytes calldata _callData
    )
        external
        returns (address);

    /**
     * Exposes internal function that deposits a quantity of tokens to the vault and attributes
     * the tokens respectively, to system modules.
     *
     * @param  _from            Address to transfer tokens from
     * @param  _to              Address to credit for deposit
     * @param  _token           Address of token being deposited
     * @param  _quantity        Amount of tokens to deposit
     */
    function depositModule(
        address _from,
        address _to,
        address _token,
        uint256 _quantity
    )
        external;

    /**
     * Exposes internal function that withdraws a quantity of tokens from the vault and
     * deattributes the tokens respectively, to system modules.
     *
     * @param  _from            Address to decredit for withdraw
     * @param  _to              Address to transfer tokens to
     * @param  _token           Address of token being withdrawn
     * @param  _quantity        Amount of tokens to withdraw
     */
    function withdrawModule(
        address _from,
        address _to,
        address _token,
        uint256 _quantity
    )
        external;

    /**
     * Exposes internal function that deposits multiple tokens to the vault, to system
     * modules. Quantities should be in the order of the addresses of the tokens being
     * deposited.
     *
     * @param  _from              Address to transfer tokens from
     * @param  _to                Address to credit for deposits
     * @param  _tokens            Array of the addresses of the tokens being deposited
     * @param  _quantities        Array of the amounts of tokens to deposit
     */
    function batchDepositModule(
        address _from,
        address _to,
        address[] calldata _tokens,
        uint256[] calldata _quantities
    )
        external;

    /**
     * Exposes internal function that withdraws multiple tokens from the vault, to system
     * modules. Quantities should be in the order of the addresses of the tokens being withdrawn.
     *
     * @param  _from              Address to decredit for withdrawals
     * @param  _to                Address to transfer tokens to
     * @param  _tokens            Array of the addresses of the tokens being withdrawn
     * @param  _quantities        Array of the amounts of tokens to withdraw
     */
    function batchWithdrawModule(
        address _from,
        address _to,
        address[] calldata _tokens,
        uint256[] calldata _quantities
    )
        external;

    /**
     * Expose internal function that exchanges components for Set tokens,
     * accepting any owner, to system modules
     *
     * @param  _owner        Address to use tokens from
     * @param  _recipient    Address to issue Set to
     * @param  _set          Address of the Set to issue
     * @param  _quantity     Number of tokens to issue
     */
    function issueModule(
        address _owner,
        address _recipient,
        address _set,
        uint256 _quantity
    )
        external;

    /**
     * Expose internal function that exchanges Set tokens for components,
     * accepting any owner, to system modules
     *
     * @param  _burnAddress         Address to burn token from
     * @param  _incrementAddress    Address to increment component tokens to
     * @param  _set                 Address of the Set to redeem
     * @param  _quantity            Number of tokens to redeem
     */
    function redeemModule(
        address _burnAddress,
        address _incrementAddress,
        address _set,
        uint256 _quantity
    )
        external;

    /**
     * Expose vault function that increments user's balance in the vault.
     * Available to system modules
     *
     * @param  _tokens          The addresses of the ERC20 tokens
     * @param  _owner           The address of the token owner
     * @param  _quantities      The numbers of tokens to attribute to owner
     */
    function batchIncrementTokenOwnerModule(
        address[] calldata _tokens,
        address _owner,
        uint256[] calldata _quantities
    )
        external;

    /**
     * Expose vault function that decrement user's balance in the vault
     * Only available to system modules.
     *
     * @param  _tokens          The addresses of the ERC20 tokens
     * @param  _owner           The address of the token owner
     * @param  _quantities      The numbers of tokens to attribute to owner
     */
    function batchDecrementTokenOwnerModule(
        address[] calldata _tokens,
        address _owner,
        uint256[] calldata _quantities
    )
        external;

    /**
     * Expose vault function that transfer vault balances between users
     * Only available to system modules.
     *
     * @param  _tokens           Addresses of tokens being transferred
     * @param  _from             Address tokens being transferred from
     * @param  _to               Address tokens being transferred to
     * @param  _quantities       Amounts of tokens being transferred
     */
    function batchTransferBalanceModule(
        address[] calldata _tokens,
        address _from,
        address _to,
        uint256[] calldata _quantities
    )
        external;

    /**
     * Transfers token from one address to another using the transfer proxy.
     * Only available to system modules.
     *
     * @param  _token          The address of the ERC20 token
     * @param  _quantity       The number of tokens to transfer
     * @param  _from           The address to transfer from
     * @param  _to             The address to transfer to
     */
    function transferModule(
        address _token,
        uint256 _quantity,
        address _from,
        address _to
    )
        external;

    /**
     * Expose transfer proxy function to transfer tokens from one address to another
     * Only available to system modules.
     *
     * @param  _tokens         The addresses of the ERC20 token
     * @param  _quantities     The numbers of tokens to transfer
     * @param  _from           The address to transfer from
     * @param  _to             The address to transfer to
     */
    function batchTransferModule(
        address[] calldata _tokens,
        uint256[] calldata _quantities,
        address _from,
        address _to
    )
        external;
}

// File: set-protocol-contracts/contracts/core/lib/RebalancingLibrary.sol

/*
    Copyright 2018 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.
*/

pragma solidity 0.5.7;


/**
 * @title RebalancingLibrary
 * @author Set Protocol
 *
 * The RebalancingLibrary contains functions for facilitating the rebalancing process for
 * Rebalancing Set Tokens. Removes the old calculation functions
 *
 */
library RebalancingLibrary {

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

    enum State { Default, Proposal, Rebalance, Drawdown }

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

    struct AuctionPriceParameters {
        uint256 auctionStartTime;
        uint256 auctionTimeToPivot;
        uint256 auctionStartPrice;
        uint256 auctionPivotPrice;
    }

    struct BiddingParameters {
        uint256 minimumBid;
        uint256 remainingCurrentSets;
        uint256[] combinedCurrentUnits;
        uint256[] combinedNextSetUnits;
        address[] combinedTokenArray;
    }
}

// File: set-protocol-contracts/contracts/core/interfaces/IFeeCalculator.sol

/*
    Copyright 2019 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.
*/

pragma solidity 0.5.7;

/**
 * @title IFeeCalculator
 * @author Set Protocol
 *
 */
interface IFeeCalculator {

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

    function initialize(
        bytes calldata _feeCalculatorData
    )
        external;

    function getFee()
        external
        view
        returns(uint256);

    function updateAndGetFee()
        external
        returns(uint256);

    function adjustFee(
        bytes calldata _newFeeData
    )
        external;
}

// File: set-protocol-contracts/contracts/core/interfaces/ISetToken.sol

/*
    Copyright 2018 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.
*/

pragma solidity 0.5.7;

/**
 * @title ISetToken
 * @author Set Protocol
 *
 * The ISetToken interface provides a light-weight, structured way to interact with the
 * SetToken contract from another contract.
 */
interface ISetToken {

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

    /*
     * Get natural unit of Set
     *
     * @return  uint256       Natural unit of Set
     */
    function naturalUnit()
        external
        view
        returns (uint256);

    /*
     * Get addresses of all components in the Set
     *
     * @return  componentAddresses       Array of component tokens
     */
    function getComponents()
        external
        view
        returns (address[] memory);

    /*
     * Get units of all tokens in Set
     *
     * @return  units       Array of component units
     */
    function getUnits()
        external
        view
        returns (uint256[] memory);

    /*
     * Checks to make sure token is component of Set
     *
     * @param  _tokenAddress     Address of token being checked
     * @return  bool             True if token is component of Set
     */
    function tokenIsComponent(
        address _tokenAddress
    )
        external
        view
        returns (bool);

    /*
     * Mint set token for given address.
     * Can only be called by authorized contracts.
     *
     * @param  _issuer      The address of the issuing account
     * @param  _quantity    The number of sets to attribute to issuer
     */
    function mint(
        address _issuer,
        uint256 _quantity
    )
        external;

    /*
     * Burn set token for given address
     * Can only be called by authorized contracts
     *
     * @param  _from        The address of the redeeming account
     * @param  _quantity    The number of sets to burn from redeemer
     */
    function burn(
        address _from,
        uint256 _quantity
    )
        external;

    /**
    * Transfer token for a specified address
    *
    * @param to The address to transfer to.
    * @param value The amount to be transferred.
    */
    function transfer(
        address to,
        uint256 value
    )
        external;
}

// File: set-protocol-contracts/contracts/core/interfaces/IRebalancingSetToken.sol

/*
    Copyright 2018 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.
*/

pragma solidity 0.5.7;


/**
 * @title IRebalancingSetToken
 * @author Set Protocol
 *
 * The IRebalancingSetToken interface provides a light-weight, structured way to interact with the
 * RebalancingSetToken contract from another contract.
 */

interface IRebalancingSetToken {

    /*
     * Get the auction library contract used for the current rebalance
     *
     * @return address    Address of auction library used in the upcoming auction
     */
    function auctionLibrary()
        external
        view
        returns (address);

    /*
     * Get totalSupply of Rebalancing Set
     *
     * @return  totalSupply
     */
    function totalSupply()
        external
        view
        returns (uint256);

    /*
     * Get proposalTimeStamp of Rebalancing Set
     *
     * @return  proposalTimeStamp
     */
    function proposalStartTime()
        external
        view
        returns (uint256);

    /*
     * Get lastRebalanceTimestamp of Rebalancing Set
     *
     * @return  lastRebalanceTimestamp
     */
    function lastRebalanceTimestamp()
        external
        view
        returns (uint256);

    /*
     * Get rebalanceInterval of Rebalancing Set
     *
     * @return  rebalanceInterval
     */
    function rebalanceInterval()
        external
        view
        returns (uint256);

    /*
     * Get rebalanceState of Rebalancing Set
     *
     * @return RebalancingLibrary.State    Current rebalance state of the RebalancingSetToken
     */
    function rebalanceState()
        external
        view
        returns (RebalancingLibrary.State);

    /*
     * Get the starting amount of current SetToken for the current auction
     *
     * @return  rebalanceState
     */
    function startingCurrentSetAmount()
        external
        view
        returns (uint256);

    /**
     * Gets the balance of the specified address.
     *
     * @param owner      The address to query the balance of.
     * @return           A uint256 representing the amount owned by the passed address.
     */
    function balanceOf(
        address owner
    )
        external
        view
        returns (uint256);

    /**
     * Function used to set the terms of the next rebalance and start the proposal period
     *
     * @param _nextSet                      The Set to rebalance into
     * @param _auctionLibrary               The library used to calculate the Dutch Auction price
     * @param _auctionTimeToPivot           The amount of time for the auction to go ffrom start to pivot price
     * @param _auctionStartPrice            The price to start the auction at
     * @param _auctionPivotPrice            The price at which the price curve switches from linear to exponential
     */
    function propose(
        address _nextSet,
        address _auctionLibrary,
        uint256 _auctionTimeToPivot,
        uint256 _auctionStartPrice,
        uint256 _auctionPivotPrice
    )
        external;

    /*
     * Get natural unit of Set
     *
     * @return  uint256       Natural unit of Set
     */
    function naturalUnit()
        external
        view
        returns (uint256);

    /**
     * Returns the address of the current base SetToken with the current allocation
     *
     * @return           A address representing the base SetToken
     */
    function currentSet()
        external
        view
        returns (address);

    /**
     * Returns the address of the next base SetToken with the post auction allocation
     *
     * @return  address    Address representing the base SetToken
     */
    function nextSet()
        external
        view
        returns (address);

    /*
     * Get the unit shares of the rebalancing Set
     *
     * @return  unitShares       Unit Shares of the base Set
     */
    function unitShares()
        external
        view
        returns (uint256);

    /*
     * Burn set token for given address.
     * Can only be called by authorized contracts.
     *
     * @param  _from        The address of the redeeming account
     * @param  _quantity    The number of sets to burn from redeemer
     */
    function burn(
        address _from,
        uint256 _quantity
    )
        external;

    /*
     * Place bid during rebalance auction. Can only be called by Core.
     *
     * @param _quantity                 The amount of currentSet to be rebalanced
     * @return combinedTokenArray       Array of token addresses invovled in rebalancing
     * @return inflowUnitArray          Array of amount of tokens inserted into system in bid
     * @return outflowUnitArray         Array of amount of tokens taken out of system in bid
     */
    function placeBid(
        uint256 _quantity
    )
        external
        returns (address[] memory, uint256[] memory, uint256[] memory);

    /*
     * Get combinedTokenArray of Rebalancing Set
     *
     * @return  combinedTokenArray
     */
    function getCombinedTokenArrayLength()
        external
        view
        returns (uint256);

    /*
     * Get combinedTokenArray of Rebalancing Set
     *
     * @return  combinedTokenArray
     */
    function getCombinedTokenArray()
        external
        view
        returns (address[] memory);

    /*
     * Get failedAuctionWithdrawComponents of Rebalancing Set
     *
     * @return  failedAuctionWithdrawComponents
     */
    function getFailedAuctionWithdrawComponents()
        external
        view
        returns (address[] memory);

    /*
     * Get auctionPriceParameters for current auction
     *
     * @return uint256[4]    AuctionPriceParameters for current rebalance auction
     */
    function getAuctionPriceParameters()
        external
        view
        returns (uint256[] memory);

    /*
     * Get biddingParameters for current auction
     *
     * @return uint256[2]    BiddingParameters for current rebalance auction
     */
    function getBiddingParameters()
        external
        view
        returns (uint256[] memory);

    /*
     * Get token inflows and outflows required for bid. Also the amount of Rebalancing
     * Sets that would be generated.
     *
     * @param _quantity               The amount of currentSet to be rebalanced
     * @return inflowUnitArray        Array of amount of tokens inserted into system in bid
     * @return outflowUnitArray       Array of amount of tokens taken out of system in bid
     */
    function getBidPrice(
        uint256 _quantity
    )
        external
        view
        returns (uint256[] memory, uint256[] memory);

}

// File: set-protocol-contracts/contracts/core/lib/Rebalance.sol

/*
    Copyright 2019 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.
*/

pragma solidity 0.5.7;



/**
 * @title Rebalance
 * @author Set Protocol
 *
 * Types and functions for Rebalance-related data.
 */
library Rebalance {

    struct TokenFlow {
        address[] addresses;
        uint256[] inflow;
        uint256[] outflow;
    }

    function composeTokenFlow(
        address[] memory _addresses,
        uint256[] memory _inflow,
        uint256[] memory _outflow
    )
        internal
        pure
        returns(TokenFlow memory)
    {
        return TokenFlow({addresses: _addresses, inflow: _inflow, outflow: _outflow });
    }

    function decomposeTokenFlow(TokenFlow memory _tokenFlow)
        internal
        pure
        returns (address[] memory, uint256[] memory, uint256[] memory)
    {
        return (_tokenFlow.addresses, _tokenFlow.inflow, _tokenFlow.outflow);
    }

    function decomposeTokenFlowToBidPrice(TokenFlow memory _tokenFlow)
        internal
        pure
        returns (uint256[] memory, uint256[] memory)
    {
        return (_tokenFlow.inflow, _tokenFlow.outflow);
    }

    /**
     * Get token flows array of addresses, inflows and outflows
     *
     * @param    _rebalancingSetToken   The rebalancing Set Token instance
     * @param    _quantity              The amount of currentSet to be rebalanced
     * @return   combinedTokenArray     Array of token addresses
     * @return   inflowArray            Array of amount of tokens inserted into system in bid
     * @return   outflowArray           Array of amount of tokens returned from system in bid
     */
    function getTokenFlows(
        IRebalancingSetToken _rebalancingSetToken,
        uint256 _quantity
    )
        internal
        view
        returns (address[] memory, uint256[] memory, uint256[] memory)
    {
        // Get token addresses
        address[] memory combinedTokenArray = _rebalancingSetToken.getCombinedTokenArray();

        // Get inflow and outflow arrays for the given bid quantity
        (
            uint256[] memory inflowArray,
            uint256[] memory outflowArray
        ) = _rebalancingSetToken.getBidPrice(_quantity);

        return (combinedTokenArray, inflowArray, outflowArray);
    }
}

// File: set-protocol-contracts/contracts/core/interfaces/ILiquidator.sol

/*
    Copyright 2019 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.
*/

pragma solidity 0.5.7;




/**
 * @title ILiquidator
 * @author Set Protocol
 *
 */
interface ILiquidator {

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

    function startRebalance(
        ISetToken _currentSet,
        ISetToken _nextSet,
        uint256 _startingCurrentSetQuantity,
        bytes calldata _liquidatorData
    )
        external;

    function getBidPrice(
        address _set,
        uint256 _quantity
    )
        external
        view
        returns (Rebalance.TokenFlow memory);

    function placeBid(
        uint256 _quantity
    )
        external
        returns (Rebalance.TokenFlow memory);


    function settleRebalance()
        external;

    function endFailedRebalance() external;

    // ----------------------------------------------------------------------
    // Auction Price
    // ----------------------------------------------------------------------

    function auctionPriceParameters(address _set)
        external
        view
        returns (RebalancingLibrary.AuctionPriceParameters memory);

    // ----------------------------------------------------------------------
    // Auction
    // ----------------------------------------------------------------------

    function hasRebalanceFailed(address _set) external view returns (bool);
    function minimumBid(address _set) external view returns (uint256);
    function startingCurrentSets(address _set) external view returns (uint256);
    function remainingCurrentSets(address _set) external view returns (uint256);
    function getCombinedCurrentSetUnits(address _set) external view returns (uint256[] memory);
    function getCombinedNextSetUnits(address _set) external view returns (uint256[] memory);
    function getCombinedTokenArray(address _set) external view returns (address[] memory);
}

// File: set-protocol-contracts/contracts/core/interfaces/IRebalancingSetTokenV2.sol

/*
    Copyright 2019 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.
*/

pragma solidity 0.5.7;





/**
 * @title IRebalancingSetTokenV2
 * @author Set Protocol
 *
 * The IRebalancingSetTokenV2 interface provides a light-weight, structured way to interact with the
 * RebalancingSetTokenV2 contract from another contract.
 */

interface IRebalancingSetTokenV2 {

    /*
     * Get totalSupply of Rebalancing Set
     *
     * @return  totalSupply
     */
    function totalSupply()
        external
        view
        returns (uint256);

    /**
     * Returns liquidator instance
     *
     * @return  ILiquidator    Liquidator instance
     */
    function liquidator()
        external
        view
        returns (ILiquidator);

    /*
     * Get lastRebalanceTimestamp of Rebalancing Set
     *
     * @return  lastRebalanceTimestamp
     */
    function lastRebalanceTimestamp()
        external
        view
        returns (uint256);

    /*
     * Get rebalanceStartTime of Rebalancing Set
     *
     * @return  rebalanceStartTime
     */
    function rebalanceStartTime()
        external
        view
        returns (uint256);

    /*
     * Get startingCurrentSets of RebalancingSetToken
     *
     * @return  startingCurrentSets
     */
    function startingCurrentSetAmount()
        external
        view
        returns (uint256);

    /*
     * Get rebalanceInterval of Rebalancing Set
     *
     * @return  rebalanceInterval
     */
    function rebalanceInterval()
        external
        view
        returns (uint256);

    /*
     * Get array returning [startTime, timeToPivot, startPrice, endPrice]
     *
     * @return  AuctionPriceParameters
     */
    function getAuctionPriceParameters() external view returns (uint256[] memory);

    /*
     * Get array returning [minimumBid, remainingCurrentSets]
     *
     * @return  BiddingParameters
     */
    function getBiddingParameters() external view returns (uint256[] memory);

    /*
     * Get rebalanceState of Rebalancing Set
     *
     * @return RebalancingLibrary.State    Current rebalance state of the RebalancingSetTokenV2
     */
    function rebalanceState()
        external
        view
        returns (RebalancingLibrary.State);

    /**
     * Gets the balance of the specified address.
     *
     * @param owner      The address to query the balance of.
     * @return           A uint256 representing the amount owned by the passed address.
     */
    function balanceOf(
        address owner
    )
        external
        view
        returns (uint256);

    /*
     * Get manager of Rebalancing Set
     *
     * @return  manager
     */
    function manager()
        external
        view
        returns (address);

    /*
     * Get feeRecipient of Rebalancing Set
     *
     * @return  feeRecipient
     */
    function feeRecipient()
        external
        view
        returns (address);

    /*
     * Get entryFee of Rebalancing Set
     *
     * @return  entryFee
     */
    function entryFee()
        external
        view
        returns (uint256);

    /*
     * Retrieves the current expected fee from the fee calculator
     * Value is returned as a scale decimal figure.
     */
    function rebalanceFee()
        external
        view
        returns (uint256);

    /*
     * Get calculator contract used to compute rebalance fees
     *
     * @return  rebalanceFeeCalculator
     */
    function rebalanceFeeCalculator()
        external
        view
        returns (IFeeCalculator);

    /*
     * Initializes the RebalancingSetToken. Typically called by the Factory during creation
     */
    function initialize(
        bytes calldata _rebalanceFeeCalldata
    )
        external;

    /*
     * Set new liquidator address. Only whitelisted addresses are valid.
     */
    function setLiquidator(
        ILiquidator _newLiquidator
    )
        external;

    /*
     * Set new fee recipient address.
     */
    function setFeeRecipient(
        address _newFeeRecipient
    )
        external;

    /*
     * Set new fee entry fee.
     */
    function setEntryFee(
        uint256 _newEntryFee
    )
        external;

    /*
     * Initiates the rebalance in coordination with the Liquidator contract.
     * In this step, we redeem the currentSet and pass relevant information
     * to the liquidator.
     *
     * @param _nextSet                      The Set to rebalance into
     * @param _liquidatorData               Bytecode formatted data with liquidator-specific arguments
     *
     * Can only be called if the rebalance interval has elapsed.
     * Can only be called by manager.
     */
    function startRebalance(
        address _nextSet,
        bytes calldata _liquidatorData

    )
        external;

    /*
     * After a successful rebalance, the new Set is issued. If there is a rebalance fee,
     * the fee is paid via inflation of the Rebalancing Set to the feeRecipient.
     * Full issuance functionality is now returned to set owners.
     *
     * Anyone can call this function.
     */
    function settleRebalance()
        external;

    /*
     * Get natural unit of Set
     *
     * @return  uint256       Natural unit of Set
     */
    function naturalUnit()
        external
        view
        returns (uint256);

    /**
     * Returns the address of the current base SetToken with the current allocation
     *
     * @return           A address representing the base SetToken
     */
    function currentSet()
        external
        view
        returns (ISetToken);

    /**
     * Returns the address of the next base SetToken with the post auction allocation
     *
     * @return  address    Address representing the base SetToken
     */
    function nextSet()
        external
        view
        returns (ISetToken);

    /*
     * Get the unit shares of the rebalancing Set
     *
     * @return  unitShares       Unit Shares of the base Set
     */
    function unitShares()
        external
        view
        returns (uint256);

    /*
     * Place bid during rebalance auction. Can only be called by Core.
     *
     * @param _quantity                 The amount of currentSet to be rebalanced
     * @return combinedTokenArray       Array of token addresses invovled in rebalancing
     * @return inflowUnitArray          Array of amount of tokens inserted into system in bid
     * @return outflowUnitArray         Array of amount of tokens taken out of system in bid
     */
    function placeBid(
        uint256 _quantity
    )
        external
        returns (address[] memory, uint256[] memory, uint256[] memory);

    /*
     * Get token inflows and outflows required for bid. Also the amount of Rebalancing
     * Sets that would be generated.
     *
     * @param _quantity               The amount of currentSet to be rebalanced
     * @return inflowUnitArray        Array of amount of tokens inserted into system in bid
     * @return outflowUnitArray       Array of amount of tokens taken out of system in bid
     */
    function getBidPrice(
        uint256 _quantity
    )
        external
        view
        returns (uint256[] memory, uint256[] memory);

    /*
     * Get name of Rebalancing Set
     *
     * @return  name
     */
    function name()
        external
        view
        returns (string memory);

    /*
     * Get symbol of Rebalancing Set
     *
     * @return  symbol
     */
    function symbol()
        external
        view
        returns (string memory);
}

// File: set-protocol-contracts/contracts/core/interfaces/IRebalancingSetTokenV3.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.
*/

pragma solidity 0.5.7;





/**
 * @title IRebalancingSetTokenV2
 * @author Set Protocol
 *
 * The IRebalancingSetTokenV3 interface provides a light-weight, structured way to interact with the
 * RebalancingSetTokenV3 contract from another contract.
 */

interface IRebalancingSetTokenV3 {

    /*
     * Get totalSupply of Rebalancing Set
     *
     * @return  totalSupply
     */
    function totalSupply()
        external
        view
        returns (uint256);

    /**
     * Returns liquidator instance
     *
     * @return  ILiquidator    Liquidator instance
     */
    function liquidator()
        external
        view
        returns (ILiquidator);

    /*
     * Get lastRebalanceTimestamp of Rebalancing Set
     *
     * @return  lastRebalanceTimestamp
     */
    function lastRebalanceTimestamp()
        external
        view
        returns (uint256);

    /*
     * Get rebalanceStartTime of Rebalancing Set
     *
     * @return  rebalanceStartTime
     */
    function rebalanceStartTime()
        external
        view
        returns (uint256);

    /*
     * Get startingCurrentSets of RebalancingSetToken
     *
     * @return  startingCurrentSets
     */
    function startingCurrentSetAmount()
        external
        view
        returns (uint256);

    /*
     * Get rebalanceInterval of Rebalancing Set
     *
     * @return  rebalanceInterval
     */
    function rebalanceInterval()
        external
        view
        returns (uint256);

    /*
     * Get array returning [startTime, timeToPivot, startPrice, endPrice]
     *
     * @return  AuctionPriceParameters
     */
    function getAuctionPriceParameters() external view returns (uint256[] memory);

    /*
     * Get array returning [minimumBid, remainingCurrentSets]
     *
     * @return  BiddingParameters
     */
    function getBiddingParameters() external view returns (uint256[] memory);

    /*
     * Get rebalanceState of Rebalancing Set
     *
     * @return RebalancingLibrary.State    Current rebalance state of the RebalancingSetTokenV3
     */
    function rebalanceState()
        external
        view
        returns (RebalancingLibrary.State);

    /**
     * Gets the balance of the specified address.
     *
     * @param owner      The address to query the balance of.
     * @return           A uint256 representing the amount owned by the passed address.
     */
    function balanceOf(
        address owner
    )
        external
        view
        returns (uint256);

    /*
     * Get manager of Rebalancing Set
     *
     * @return  manager
     */
    function manager()
        external
        view
        returns (address);

    /*
     * Get feeRecipient of Rebalancing Set
     *
     * @return  feeRecipient
     */
    function feeRecipient()
        external
        view
        returns (address);

    /*
     * Get entryFee of Rebalancing Set
     *
     * @return  entryFee
     */
    function entryFee()
        external
        view
        returns (uint256);

    /*
     * Retrieves the current expected fee from the fee calculator
     * Value is returned as a scale decimal figure.
     */
    function rebalanceFee()
        external
        view
        returns (uint256);

    /*
     * Get calculator contract used to compute rebalance fees
     *
     * @return  rebalanceFeeCalculator
     */
    function rebalanceFeeCalculator()
        external
        view
        returns (IFeeCalculator);

    /*
     * Initializes the RebalancingSetToken. Typically called by the Factory during creation
     */
    function initialize(
        bytes calldata _rebalanceFeeCalldata
    )
        external;

    /*
     * Set new liquidator address. Only whitelisted addresses are valid.
     */
    function setLiquidator(
        ILiquidator _newLiquidator
    )
        external;

    /*
     * Set new fee recipient address.
     */
    function setFeeRecipient(
        address _newFeeRecipient
    )
        external;

    /*
     * Set new fee entry fee.
     */
    function setEntryFee(
        uint256 _newEntryFee
    )
        external;

    /*
     * Initiates the rebalance in coordination with the Liquidator contract.
     * In this step, we redeem the currentSet and pass relevant information
     * to the liquidator.
     *
     * @param _nextSet                      The Set to rebalance into
     * @param _liquidatorData               Bytecode formatted data with liquidator-specific arguments
     *
     * Can only be called if the rebalance interval has elapsed.
     * Can only be called by manager.
     */
    function startRebalance(
        address _nextSet,
        bytes calldata _liquidatorData

    )
        external;

    /*
     * After a successful rebalance, the new Set is issued. If there is a rebalance fee,
     * the fee is paid via inflation of the Rebalancing Set to the feeRecipient.
     * Full issuance functionality is now returned to set owners.
     *
     * Anyone can call this function.
     */
    function settleRebalance()
        external;

    /*
     * During the Default stage, the incentive / rebalance Fee can be triggered. This will
     * retrieve the current inflation fee from the fee calulator and mint the according
     * inflation to the feeRecipient. The unit shares is then adjusted based on the new
     * supply.
     *
     * Anyone can call this function.
     */
    function actualizeFee()
        external;

    /*
     * Validate then set new streaming fee.
     *
     * @param  _newFeeData       Fee type and new streaming fee encoded in bytes
     */
    function adjustFee(
        bytes calldata _newFeeData
    )
        external;

    /*
     * Get natural unit of Set
     *
     * @return  uint256       Natural unit of Set
     */
    function naturalUnit()
        external
        view
        returns (uint256);

    /**
     * Returns the address of the current base SetToken with the current allocation
     *
     * @return           A address representing the base SetToken
     */
    function currentSet()
        external
        view
        returns (ISetToken);

    /**
     * Returns the address of the next base SetToken with the post auction allocation
     *
     * @return  address    Address representing the base SetToken
     */
    function nextSet()
        external
        view
        returns (ISetToken);

    /*
     * Get the unit shares of the rebalancing Set
     *
     * @return  unitShares       Unit Shares of the base Set
     */
    function unitShares()
        external
        view
        returns (uint256);

    /*
     * Place bid during rebalance auction. Can only be called by Core.
     *
     * @param _quantity                 The amount of currentSet to be rebalanced
     * @return combinedTokenArray       Array of token addresses invovled in rebalancing
     * @return inflowUnitArray          Array of amount of tokens inserted into system in bid
     * @return outflowUnitArray         Array of amount of tokens taken out of system in bid
     */
    function placeBid(
        uint256 _quantity
    )
        external
        returns (address[] memory, uint256[] memory, uint256[] memory);

    /*
     * Get token inflows and outflows required for bid. Also the amount of Rebalancing
     * Sets that would be generated.
     *
     * @param _quantity               The amount of currentSet to be rebalanced
     * @return inflowUnitArray        Array of amount of tokens inserted into system in bid
     * @return outflowUnitArray       Array of amount of tokens taken out of system in bid
     */
    function getBidPrice(
        uint256 _quantity
    )
        external
        view
        returns (uint256[] memory, uint256[] memory);

    /*
     * Get name of Rebalancing Set
     *
     * @return  name
     */
    function name()
        external
        view
        returns (string memory);

    /*
     * Get symbol of Rebalancing Set
     *
     * @return  symbol
     */
    function symbol()
        external
        view
        returns (string memory);
}

// File: openzeppelin-solidity/contracts/math/SafeMath.sol

pragma solidity ^0.5.2;

/**
 * @title SafeMath
 * @dev Unsigned math operations with safety checks that revert on error
 */
library SafeMath {
    /**
     * @dev Multiplies two unsigned integers, reverts on overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (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-solidity/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b);

        return c;
    }

    /**
     * @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Adds two unsigned integers, reverts on overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a);

        return c;
    }

    /**
     * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
     * reverts when dividing by zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b != 0);
        return a % b;
    }
}

// File: openzeppelin-solidity/contracts/ownership/Ownable.sol

pragma solidity ^0.5.2;

/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev The Ownable constructor sets the original `owner` of the contract to the sender
     * account.
     */
    constructor () internal {
        _owner = msg.sender;
        emit OwnershipTransferred(address(0), _owner);
    }

    /**
     * @return the address of the owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(isOwner());
        _;
    }

    /**
     * @return true if `msg.sender` is the owner of the contract.
     */
    function isOwner() public view returns (bool) {
        return msg.sender == _owner;
    }

    /**
     * @dev Allows the current owner to relinquish control of the contract.
     * It will not be possible to call the functions with the `onlyOwner`
     * modifier anymore.
     * @notice Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Allows the current owner to transfer control of the contract to a newOwner.
     * @param newOwner The address to transfer ownership to.
     */
    function transferOwnership(address newOwner) public onlyOwner {
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers control of the contract to a newOwner.
     * @param newOwner The address to transfer ownership to.
     */
    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0));
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

// File: set-protocol-contracts/contracts/lib/TimeLockUpgrade.sol

/*
    Copyright 2018 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.
*/

pragma solidity 0.5.7;




/**
 * @title TimeLockUpgrade
 * @author Set Protocol
 *
 * The TimeLockUpgrade contract contains a modifier for handling minimum time period updates
 */
contract TimeLockUpgrade is
    Ownable
{
    using SafeMath for uint256;

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

    // Timelock Upgrade Period in seconds
    uint256 public timeLockPeriod;

    // Mapping of upgradable units and initialized timelock
    mapping(bytes32 => uint256) public timeLockedUpgrades;

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

    event UpgradeRegistered(
        bytes32 _upgradeHash,
        uint256 _timestamp
    );

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

    modifier timeLockUpgrade() {
        // If the time lock period is 0, then allow non-timebound upgrades.
        // This is useful for initialization of the protocol and for testing.
        if (timeLockPeriod == 0) {
            _;

            return;
        }

        // The upgrade hash is defined by the hash of the transaction call data,
        // which uniquely identifies the function as well as the passed in arguments.
        bytes32 upgradeHash = keccak256(
            abi.encodePacked(
                msg.data
            )
        );

        uint256 registrationTime = timeLockedUpgrades[upgradeHash];

        // If the upgrade hasn't been registered, register with the current time.
        if (registrationTime == 0) {
            timeLockedUpgrades[upgradeHash] = block.timestamp;

            emit UpgradeRegistered(
                upgradeHash,
                block.timestamp
            );

            return;
        }

        require(
            block.timestamp >= registrationTime.add(timeLockPeriod),
            "TimeLockUpgrade: Time lock period must have elapsed."
        );

        // Reset the timestamp to 0
        timeLockedUpgrades[upgradeHash] = 0;

        // Run the rest of the upgrades
        _;
    }

    /* ============ Function ============ */

    /**
     * Change timeLockPeriod period. Generally called after initially settings have been set up.
     *
     * @param  _timeLockPeriod   Time in seconds that upgrades need to be evaluated before execution
     */
    function setTimeLockPeriod(
        uint256 _timeLockPeriod
    )
        external
        onlyOwner
    {
        // Only allow setting of the timeLockPeriod if the period is greater than the existing
        require(
            _timeLockPeriod > timeLockPeriod,
            "TimeLockUpgrade: New period must be greater than existing"
        );

        timeLockPeriod = _timeLockPeriod;
    }
}

// File: set-protocol-contracts/contracts/lib/UnrestrictedTimeLockUpgrade.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.
*/

pragma solidity 0.5.7;




/**
 * @title UnrestrictedTimeLockUpgrade
 * @author Set Protocol
 *
 * The UnrestrictedTimeLockUpgrade contract inherits a modifier for handling minimum time period updates not
 * limited to the owner of the contract. Also implements a removeTimeLockUpgrade internal function that can
 * be exposed by writing an external version into the contract it used in with the required modifiers to
 * restrict access.
 */

contract UnrestrictedTimeLockUpgrade is
    TimeLockUpgrade
{
    /* ============ Events ============ */

    event RemoveRegisteredUpgrade(
        bytes32 indexed _upgradeHash
    );

    /* ============ Internal Function ============ */

    /**
     * Removes an existing upgrade.
     *
     * @param  _upgradeHash    Keccack256 hash that uniquely identifies function called and arguments
     */
    function removeRegisteredUpgradeInternal(
        bytes32 _upgradeHash
    )
        internal
    {
        require(
            timeLockedUpgrades[_upgradeHash] != 0,
            "TimeLockUpgradeV2.removeRegisteredUpgrade: Upgrade hash must be registered"
        );

        // Reset the timestamp to 0
        timeLockedUpgrades[_upgradeHash] = 0;

        emit RemoveRegisteredUpgrade(
            _upgradeHash
        );
    }
}

// File: set-protocol-contracts/contracts/lib/LimitOneUpgrade.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.
*/

pragma solidity 0.5.7;



/**
 * @title LimitOneUpgrade
 * @author Set Protocol
 *
 * For function that must be timelocked but could potentially have more than one upgrade at a time
 * this contract allows one to limit the amount of simultaneous upgrades.
 */

contract LimitOneUpgrade is
    UnrestrictedTimeLockUpgrade
{
    /* ============ State Variables ============ */

    mapping(address => bytes32) public upgradeIdentifier;

    /* ============ Modifier ============ */

    /**
     * This modifier must be used in conjunction with timeLockUpgrade AND must be called before
     * timeLockUpgrade is called. UpgradeAddress must also be part of the msg.data.
     */
    modifier limitOneUpgrade(address _upgradeAddress) {
        if (timeLockPeriod > 0) {
            // Get upgradeHash
            bytes32 upgradeHash = keccak256(msg.data);

            if (upgradeIdentifier[_upgradeAddress] != 0) {
                // If upgrade hash has no record then revert since must be second upgrade
                require(
                    upgradeIdentifier[_upgradeAddress] == upgradeHash,
                    "Another update already in progress."
                );

                upgradeIdentifier[_upgradeAddress] = 0;

            } else {
                upgradeIdentifier[_upgradeAddress] = upgradeHash;
            }
        }
        _;
    }

    /**
     * Verifies that upgrade address matches with hash of upgrade. Removes upgrade from timelockUpgrades
     * and sets upgradeIdentifier to 0 for passed upgradeAddress, allowing for another upgrade.
     *
     * @param _upgradeAddress       The address of the trading pool being updated
     * @param _upgradeHash          Keccack256 hash that uniquely identifies function called and arguments
     */
    function removeRegisteredUpgradeInternal(
        address _upgradeAddress,
        bytes32 _upgradeHash
    )
        internal
    {
        require(
            upgradeIdentifier[_upgradeAddress] == _upgradeHash,
            "Passed upgrade hash does not match upgrade address."
        );

        UnrestrictedTimeLockUpgrade.removeRegisteredUpgradeInternal(_upgradeHash);

        upgradeIdentifier[_upgradeAddress] = 0;
    }
}

// File: set-protocol-contracts/contracts/lib/AddressArrayUtils.sol

// Pulled in from Cryptofin Solidity package in order to control Solidity compiler version
// https://github.com/cryptofinlabs/cryptofin-solidity/blob/master/contracts/array-utils/AddressArrayUtils.sol

pragma solidity 0.5.7;


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 (0, 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;
        (, isIn) = indexOf(A, a);
        return isIn;
    }

    /**
     * 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;
    }

    /**
     * Returns the array with a appended to A.
     * @param A The first array
     * @param a The value to append
     * @return Returns A appended by a
     */
    function append(address[] memory A, address a) internal pure returns (address[] memory) {
        address[] memory newAddresses = new address[](A.length + 1);
        for (uint256 i = 0; i < A.length; i++) {
            newAddresses[i] = A[i];
        }
        newAddresses[A.length] = a;
        return newAddresses;
    }

    /**
     * Returns the intersection of two arrays. Arrays are treated as collections, so duplicates are kept.
     * @param A The first array
     * @param B The second array
     * @return The intersection of the two arrays
     */
    function intersect(address[] memory A, address[] memory B) internal pure returns (address[] memory) {
        uint256 length = A.length;
        bool[] memory includeMap = new bool[](length);
        uint256 newLength = 0;
        for (uint256 i = 0; i < length; i++) {
            if (contains(B, A[i])) {
                includeMap[i] = true;
                newLength++;
            }
        }
        address[] memory newAddresses = new address[](newLength);
        uint256 j = 0;
        for (uint256 k = 0; k < length; k++) {
            if (includeMap[k]) {
                newAddresses[j] = A[k];
                j++;
            }
        }
        return newAddresses;
    }

    /**
     * Returns the union of the two arrays. Order is not guaranteed.
     * @param A The first array
     * @param B The second array
     * @return The union of the two arrays
     */
    function union(address[] memory A, address[] memory B) internal pure returns (address[] memory) {
        address[] memory leftDifference = difference(A, B);
        address[] memory rightDifference = difference(B, A);
        address[] memory intersection = intersect(A, B);
        return extend(leftDifference, extend(intersection, rightDifference));
    }

    /**
     * Computes the difference of two arrays. Assumes there are no duplicates.
     * @param A The first array
     * @param B The second array
     * @return The difference of the two arrays
     */
    function difference(address[] memory A, address[] memory B) internal pure returns (address[] memory) {
        uint256 length = A.length;
        bool[] memory includeMap = new bool[](length);
        uint256 count = 0;
        // First count the new length because can't push for in-memory arrays
        for (uint256 i = 0; i < length; i++) {
            address e = A[i];
            if (!contains(B, e)) {
                includeMap[i] = true;
                count++;
            }
        }
        address[] memory newAddresses = new address[](count);
        uint256 j = 0;
        for (uint256 k = 0; k < length; k++) {
            if (includeMap[k]) {
                newAddresses[j] = A[k];
                j++;
            }
        }
        return newAddresses;
    }

    /**
    * Removes specified index from array
    * Resulting ordering is not guaranteed
    * @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;
        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]);
    }

    /**
     * @return Returns the new array
     */
    function remove(address[] memory A, address a)
        internal
        pure
        returns (address[] memory)
    {
        (uint256 index, bool isIn) = indexOf(A, a);
        if (!isIn) {
            revert();
        } else {
            (address[] memory _A,) = pop(A, index);
            return _A;
        }
    }

    /**
     * Returns whether or not there's a duplicate. Runs in O(n^2).
     * @param A Array to search
     * @return Returns true if duplicate, false otherwise
     */
    function hasDuplicate(address[] memory A) internal pure returns (bool) {
        if (A.length == 0) {
            return false;
        }
        for (uint256 i = 0; i < A.length - 1; i++) {
            for (uint256 j = i + 1; j < A.length; j++) {
                if (A[i] == A[j]) {
                    return true;
                }
            }
        }
        return false;
    }

    /**
     * Returns whether the two arrays are equal.
     * @param A The first array
     * @param B The second array
     * @return True is the arrays are equal, false if not.
     */
    function isEqual(address[] memory A, address[] memory B) internal pure returns (bool) {
        if (A.length != B.length) {
            return false;
        }
        for (uint256 i = 0; i < A.length; i++) {
            if (A[i] != B[i]) {
                return false;
            }
        }
        return true;
    }
}

// File: set-protocol-contracts/contracts/lib/WhiteList.sol

/*
    Copyright 2018 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.
*/

pragma solidity 0.5.7;





/**
 * @title Whitelist
 * @author Set Protocol
 *
 * Generic whitelist for addresses
 */
contract WhiteList is
    Ownable,
    TimeLockUpgrade
{
    using AddressArrayUtils for address[];

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

    address[] public addresses;
    mapping(address => bool) public whiteList;

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

    event AddressAdded(
        address _address
    );

    event AddressRemoved(
        address _address
    );

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

    /**
     * Constructor function for Whitelist
     *
     * Allow initial addresses to be passed in so a separate transaction is not required for each
     *
     * @param _initialAddresses    Starting set of addresses to whitelist
     */
    constructor(
        address[] memory _initialAddresses
    )
        public
    {
        // Add each of initial addresses to state
        for (uint256 i = 0; i < _initialAddresses.length; i++) {
            address addressToAdd = _initialAddresses[i];

            addresses.push(addressToAdd);
            whiteList[addressToAdd] = true;
        }
    }

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

    /**
     * Add an address to the whitelist
     *
     * @param _address    Address to add to the whitelist
     */
    function addAddress(
        address _address
    )
        external
        onlyOwner
        timeLockUpgrade
    {
        require(
            !whiteList[_address],
            "WhiteList.addAddress: Address has already been whitelisted."
        );

        addresses.push(_address);

        whiteList[_address] = true;

        emit AddressAdded(
            _address
        );
    }

    /**
     * Remove an address from the whitelist
     *
     * @param _address    Address to remove from the whitelist
     */
    function removeAddress(
        address _address
    )
        external
        onlyOwner
    {
        require(
            whiteList[_address],
            "WhiteList.removeAddress: Address is not current whitelisted."
        );

        addresses = addresses.remove(_address);

        whiteList[_address] = false;

        emit AddressRemoved(
            _address
        );
    }

    /**
     * Return array of all whitelisted addresses
     *
     * @return address[]      Array of addresses
     */
    function validAddresses()
        external
        view
        returns (address[] memory)
    {
        return addresses;
    }

    /**
     * Verifies an array of addresses against the whitelist
     *
     * @param  _addresses    Array of addresses to verify
     * @return bool          Whether all addresses in the list are whitelsited
     */
    function areValidAddresses(
        address[] calldata _addresses
    )
        external
        view
        returns (bool)
    {
        for (uint256 i = 0; i < _addresses.length; i++) {
            if (!whiteList[_addresses[i]]) {
                return false;
            }
        }

        return true;
    }
}

// File: contracts/managers/allocators/ISocialAllocator.sol

/*
    Copyright 2019 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.
*/

pragma solidity 0.5.7;


/**
 * @title ISocialAllocator
 * @author Set Protocol
 *
 * Interface for interacting with SocialAllocator contracts
 */
interface ISocialAllocator {

    /*
     * Determine the next allocation to rebalance into.
     *
     * @param  _targetBaseAssetAllocation       Target allocation of the base asset
     * @return ISetToken                        The address of the proposed nextSet
     */
    function determineNewAllocation(
        uint256 _targetBaseAssetAllocation
    )
        external
        returns (ISetToken);

    /*
     * Calculate value of passed collateral set.
     *
     * @param  _collateralSet        Instance of current set collateralizing RebalancingSetToken
     * @return uint256               USD value of passed Set
     */
    function calculateCollateralSetValue(
        ISetToken _collateralSet
    )
        external
        view
        returns(uint256);
}

// File: contracts/managers/lib/SocialTradingLibrary.sol

/*
    Copyright 2019 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.
*/

pragma solidity 0.5.7;



/**
 * @title SocialTradingLibrary
 * @author Set Protocol
 *
 * Library for use in SocialTrading system.
 */
library SocialTradingLibrary {

    /* ============ Structs ============ */
    struct PoolInfo {
        address trader;                 // Address allowed to make admin and allocation decisions
        ISocialAllocator allocator;     // Allocator used to make collateral Sets, defines asset pair being used
        uint256 currentAllocation;      // Current base asset allocation of tradingPool
        uint256 newEntryFee;            // New fee percentage to change to after time lock passes, defaults to 0
        uint256 feeUpdateTimestamp;     // Timestamp when fee update process can be finalized, defaults to maxUint256
    }
}

// File: contracts/managers/SocialTradingManager.sol

/*
    Copyright 2019 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.
*/

pragma solidity 0.5.7;











/**
 * @title SocialTradingManager
 * @author Set Protocol
 *
 * Singleton manager contract through which all social trading sets are managed. Traders can choose a percentage
 * between 0 and 100 for each rebalance. The trading pair used for each trading pool is defined by the allocator
 * passed in on pool creation. Only compatible with RebalancingSetTokenV2 constracts. All permissioned functions
 * on the RebalancingSetTokenV2 must be called through the administrative functions exposed on this contract.
 *
 * CHANGELOG: As of version 1.1.31 the REBALANCING_SET_NATURAL_UNIT has been changed from 1e6 to 1e8.
 */
contract SocialTradingManager is
    WhiteList
{
    using SafeMath for uint256;

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

    event TradingPoolCreated(
        address indexed trader,
        ISocialAllocator indexed allocator,
        address indexed tradingPool,
        uint256 startingAllocation
    );

    event AllocationUpdate(
        address indexed tradingPool,
        uint256 oldAllocation,
        uint256 newAllocation
    );

    event NewTrader(
        address indexed tradingPool,
        address indexed oldTrader,
        address indexed newTrader
    );

    /* ============ Modifier ============ */

    modifier onlyTrader(IRebalancingSetTokenV2 _tradingPool) {
        require(
            msg.sender == trader(_tradingPool),
            "Sender must be trader"
        );
        _;
    }

    /* ============ Constants ============ */

    uint256 public constant REBALANCING_SET_NATURAL_UNIT = 1e8;
    uint public constant ONE_PERCENT = 1e16;
    uint256 constant public MAXIMUM_ALLOCATION = 1e18;

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

    ICore public core;
    address public factory;
    mapping(address => SocialTradingLibrary.PoolInfo) public pools;

    uint256 public maxEntryFee;
    uint256 public feeUpdateTimelock;

    /*
     * SocialTradingManager constructor.
     *
     * @param  _core                            The address of the Core contract
     * @param  _factory                         Factory to use for RebalancingSetToken creation
     * @param  _whiteListedAllocators           List of allocator addresses to WhiteList
     * @param  _maxEntryFee                     Max entry fee when updating fees in a scaled decimal value
     *                                          (e.g. 1% = 1e16, 1bp = 1e14)
     * @param  _feeUpdateTimelock               Amount of time trader must wait between starting fee update
     *                                          and finalizing fee update
     */
    constructor(
        ICore _core,
        address _factory,
        address[] memory _whiteListedAllocators,
        uint256 _maxEntryFee,
        uint256 _feeUpdateTimelock
    )
        public
        WhiteList(_whiteListedAllocators)
    {
        core = _core;
        factory = _factory;

        maxEntryFee = _maxEntryFee;
        feeUpdateTimelock = _feeUpdateTimelock;
    }

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

    /*
     * Create a trading pool. Create or select new collateral and create RebalancingSetToken contract to
     * administer pool. Save relevant data to pool's entry in pools state variable under the Rebalancing
     * Set Token address.
     *
     * @param _tradingPairAllocator             The address of the allocator the trader wishes to use
     * @param _startingBaseAssetAllocation      Starting base asset allocation in a scaled decimal value
     *                                          (e.g. 100% = 1e18, 1% = 1e16)
     * @param _startingUSDValue                 Starting value of one share of the trading pool to 18 decimals of precision
     * @param _name                             The name of the new RebalancingSetTokenV2
     * @param _symbol                           The symbol of the new RebalancingSetTokenV2
     * @param _rebalancingSetCallData           Byte string containing additional call parameters to pass to factory
     */
    function createTradingPool(
        ISocialAllocator _tradingPairAllocator,
        uint256 _startingBaseAssetAllocation,
        uint256 _startingUSDValue,
        bytes32 _name,
        bytes32 _symbol,
        bytes calldata _rebalancingSetCallData
    )
        external
    {
        // Validate relevant params
        validateCreateTradingPool(_tradingPairAllocator, _startingBaseAssetAllocation, _rebalancingSetCallData);

        // Get collateral Set
        ISetToken collateralSet = _tradingPairAllocator.determineNewAllocation(
            _startingBaseAssetAllocation
        );

        uint256[] memory unitShares = new uint256[](1);

        // Value collateral
        uint256 collateralValue = _tradingPairAllocator.calculateCollateralSetValue(
            collateralSet
        );

        // unitShares is equal to _startingUSDValue divided by colalteral Value
        unitShares[0] = _startingUSDValue.mul(REBALANCING_SET_NATURAL_UNIT).div(collateralValue);

        address[] memory components = new address[](1);
        components[0] = address(collateralSet);

        // Create tradingPool
        address tradingPool = core.createSet(
            factory,
            components,
            unitShares,
            REBALANCING_SET_NATURAL_UNIT,
            _name,
            _symbol,
            _rebalancingSetCallData
        );

        pools[tradingPool].trader = msg.sender;
        pools[tradingPool].allocator = _tradingPairAllocator;
        pools[tradingPool].currentAllocation = _startingBaseAssetAllocation;
        pools[tradingPool].feeUpdateTimestamp = 0;

        emit TradingPoolCreated(
            msg.sender,
            _tradingPairAllocator,
            tradingPool,
            _startingBaseAssetAllocation
        );
    }

    /*
     * Update trading pool allocation. Issue new collateral Set and initiate rebalance on RebalancingSetTokenV2.
     *
     * @param _tradingPool        The address of the trading pool being updated
     * @param _newAllocation      New base asset allocation in a scaled decimal value
     *                                          (e.g. 100% = 1e18, 1% = 1e16)
     * @param _liquidatorData     Extra parameters passed to the liquidator
     */
    function updateAllocation(
        IRebalancingSetTokenV2 _tradingPool,
        uint256 _newAllocation,
        bytes calldata _liquidatorData
    )
        external
        onlyTrader(_tradingPool)
    {
        // Validate updateAllocation params
        validateAllocationUpdate(_tradingPool, _newAllocation);

        // Create nextSet collateral
        ISetToken nextSet = allocator(_tradingPool).determineNewAllocation(
            _newAllocation
        );

        // Trigger start rebalance on RebalancingSetTokenV2
        _tradingPool.startRebalance(address(nextSet), _liquidatorData);

        emit AllocationUpdate(
            address(_tradingPool),
            currentAllocation(_tradingPool),
            _newAllocation
        );

        // Save new allocation
        pools[address(_tradingPool)].currentAllocation = _newAllocation;
    }

    /*
     * Start fee update process, set fee update timestamp and commit to new fee.
     *
     * @param _tradingPool        The address of the trading pool being updated
     * @param _newEntryFee        New entry fee in a scaled decimal value
     *                              (e.g. 100% = 1e18, 1% = 1e16)
     */
    function initiateEntryFeeChange(
        IRebalancingSetTokenV2 _tradingPool,
        uint256 _newEntryFee
    )
        external
        onlyTrader(_tradingPool)
    {
        // Validate new entry fee doesn't exceed max
        validateNewEntryFee(_newEntryFee);

        // Log new entryFee and timestamp to start timelock from
        pools[address(_tradingPool)].feeUpdateTimestamp = block.timestamp.add(feeUpdateTimelock);
        pools[address(_tradingPool)].newEntryFee = _newEntryFee;
    }

    /*
     * Finalize fee update, change fee on RebalancingSetTokenV2 if time lock period has elapsed.
     *
     * @param _tradingPool        The address of the trading pool being updated
     */
    function finalizeEntryFeeChange(
        IRebalancingSetTokenV2 _tradingPool
    )
        external
        onlyTrader(_tradingPool)
    {
        // If feeUpdateTimestamp is equal to 0 indicates initiate wasn't called
        require(
            feeUpdateTimestamp(_tradingPool) != 0,
            "SocialTradingManager.finalizeSetFeeRecipient: Must initiate fee change first."
        );

        // Current block timestamp must exceed feeUpdateTimestamp
        require(
            block.timestamp >= feeUpdateTimestamp(_tradingPool),
            "SocialTradingManager.finalizeSetFeeRecipient: Time lock period must elapse to update fees."
        );

        // Reset timestamp to avoid reentrancy
        pools[address(_tradingPool)].feeUpdateTimestamp = 0;

        // Update fee on RebalancingSetTokenV2
        _tradingPool.setEntryFee(newEntryFee(_tradingPool));

        // Reset newEntryFee
        pools[address(_tradingPool)].newEntryFee = 0;
    }

    /*
     * Update trader allowed to manage trading pool.
     *
     * @param _tradingPool        The address of the trading pool being updated
     * @param _newTrader          Address of new traders
     */
    function setTrader(
        IRebalancingSetTokenV2 _tradingPool,
        address _newTrader
    )
        external
        onlyTrader(_tradingPool)
    {
        emit NewTrader(
            address(_tradingPool),
            trader(_tradingPool),
            _newTrader
        );

        pools[address(_tradingPool)].trader = _newTrader;
    }

    /*
     * Update liquidator used by tradingPool.
     *
     * @param _tradingPool        The address of the trading pool being updated
     * @param _newLiquidator      Address of new Liquidator
     */
    function setLiquidator(
        IRebalancingSetTokenV2 _tradingPool,
        ILiquidator _newLiquidator
    )
        external
        onlyTrader(_tradingPool)
    {
        _tradingPool.setLiquidator(_newLiquidator);
    }

    /*
     * Update fee recipient of tradingPool.
     *
     * @param _tradingPool          The address of the trading pool being updated
     * @param _newFeeRecipient      Address of new fee recipient
     */
    function setFeeRecipient(
        IRebalancingSetTokenV2 _tradingPool,
        address _newFeeRecipient
    )
        external
        onlyTrader(_tradingPool)
    {
        _tradingPool.setFeeRecipient(_newFeeRecipient);
    }

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

    /*
     * Validate trading pool creation. Make sure allocation is valid, allocator is white listed and
     * manager passed in rebalancingSetCallData is this address.
     *
     * @param _tradingPairAllocator             The address of allocator being used in trading pool
     * @param _startingBaseAssetAllocation      New base asset allocation in a scaled decimal value
     *                                          (e.g. 100% = 1e18, 1% = 1e16)
     * @param _rebalancingSetCallData           Byte string containing RebalancingSetTokenV2 call parameters
     */
    function validateCreateTradingPool(
        ISocialAllocator _tradingPairAllocator,
        uint256 _startingBaseAssetAllocation,
        bytes memory _rebalancingSetCallData
    )
        internal
        view
    {
        validateAllocationAmount(_startingBaseAssetAllocation);

        validateManagerAddress(_rebalancingSetCallData);

        require(
            whiteList[address(_tradingPairAllocator)],
            "SocialTradingManager.validateCreateTradingPool: Passed allocator is not valid."
        );
    }

    /*
     * Validate trading pool allocation update. Make sure allocation is valid,
     * and RebalancingSet is in valid state.
     *
     * @param _tradingPool        The address of the trading pool being updated
     * @param _newAllocation      New base asset allocation in a scaled decimal value
     *                                          (e.g. 100% = 1e18, 1% = 1e16)
     */
    function validateAllocationUpdate(
        IRebalancingSetTokenV2 _tradingPool,
        uint256 _newAllocation
    )
        internal
        view
    {
        validateAllocationAmount(_newAllocation);

        // If current allocation is 0/100%, cannot be the same allocation
        uint256 currentAllocationValue = currentAllocation(_tradingPool);
        require(
            !(currentAllocationValue == MAXIMUM_ALLOCATION && _newAllocation == MAXIMUM_ALLOCATION) &&
            !(currentAllocationValue == 0 && _newAllocation == 0),
            "SocialTradingManager.validateAllocationUpdate: Invalid allocation"
        );

        // Require that enough time has passed from last rebalance
        uint256 lastRebalanceTimestamp = _tradingPool.lastRebalanceTimestamp();
        uint256 rebalanceInterval = _tradingPool.rebalanceInterval();
        require(
            block.timestamp >= lastRebalanceTimestamp.add(rebalanceInterval),
            "SocialTradingManager.validateAllocationUpdate: Rebalance interval not elapsed"
        );

        // Require that Rebalancing Set Token is in Default state, won't allow for re-proposals
        // because malicious actor could prevent token from ever rebalancing
        require(
            _tradingPool.rebalanceState() == RebalancingLibrary.State.Default,
            "SocialTradingManager.validateAllocationUpdate: State must be in Default"
        );
    }

    /*
     * Validate passed allocation amount.
     *
     * @param _allocation      New base asset allocation in a scaled decimal value
     *                                          (e.g. 100% = 1e18, 1% = 1e16)
     */
    function validateAllocationAmount(
        uint256 _allocation
    )
        internal
        view
    {
        require(
            _allocation <= MAXIMUM_ALLOCATION,
            "Passed allocation must not exceed 100%."
        );

        require(
            _allocation.mod(ONE_PERCENT) == 0,
            "Passed allocation must be multiple of 1%."
        );
    }

    /*
     * Validate new entry fee.
     *
     * @param _entryFee      New entry fee in a scaled decimal value
     *                          (e.g. 100% = 1e18, 1% = 1e16)
     */
    function validateNewEntryFee(
        uint256 _entryFee
    )
        internal
        view
    {
        require(
            _entryFee <= maxEntryFee,
            "SocialTradingManager.validateNewEntryFee: Passed entry fee must not exceed maxEntryFee."
        );
    }

    /*
     * Validate passed manager in RebalancingSetToken bytes arg matches this address.
     *
     * @param _rebalancingSetCallData       Byte string containing RebalancingSetTokenV2 call parameters
     */
    function validateManagerAddress(
        bytes memory _rebalancingSetCallData
    )
        internal
        view
    {
        address manager;

        assembly {
            manager := mload(add(_rebalancingSetCallData, 32))   // manager slot
        }

        require(
            manager == address(this),
            "SocialTradingManager.validateCallDataArgs: Passed manager address is not this address."
        );
    }

    function allocator(IRebalancingSetTokenV2 _tradingPool) internal view returns (ISocialAllocator) {
        return pools[address(_tradingPool)].allocator;
    }

    function trader(IRebalancingSetTokenV2 _tradingPool) internal view returns (address) {
        return pools[address(_tradingPool)].trader;
    }

    function currentAllocation(IRebalancingSetTokenV2 _tradingPool) internal view returns (uint256) {
        return pools[address(_tradingPool)].currentAllocation;
    }

    function feeUpdateTimestamp(IRebalancingSetTokenV2 _tradingPool) internal view returns (uint256) {
        return pools[address(_tradingPool)].feeUpdateTimestamp;
    }

    function newEntryFee(IRebalancingSetTokenV2 _tradingPool) internal view returns (uint256) {
        return pools[address(_tradingPool)].newEntryFee;
    }
}

// File: contracts/managers/SocialTradingManagerV2.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.
*/

pragma solidity 0.5.7;
pragma experimental "ABIEncoderV2";







/**
 * @title SocialTradingManagerV2
 * @author Set Protocol
 *
 * Singleton manager contract through which all social trading v2 sets are managed. Inherits from SocialTradingManager
 * and adds functionality to adjust performance based fees.
 */
contract SocialTradingManagerV2 is
    SocialTradingManager,
    LimitOneUpgrade
{
    /*
     * SocialTradingManager constructor.
     *
     * @param  _core                            The address of the Core contract
     * @param  _factory                         Factory to use for RebalancingSetToken creation
     * @param  _whiteListedAllocators           List of allocator addresses to WhiteList
     * @param  _maxEntryFee                     Max entry fee when updating fees in a scaled decimal value
     *                                          (e.g. 1% = 1e16, 1bp = 1e14)
     * @param  _feeUpdateTimelock               Amount of time trader must wait between starting fee update
     *                                          and finalizing fee update
     */
    constructor(
        ICore _core,
        address _factory,
        address[] memory _whiteListedAllocators,
        uint256 _maxEntryFee,
        uint256 _feeUpdateTimelock
    )
        public
        SocialTradingManager(
            _core,
            _factory,
            _whiteListedAllocators,
            _maxEntryFee,
            _feeUpdateTimelock
        )
    {}

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

    /**
     * Allows traders to update fees on their Set. Only one fee update allowed at a time and timelocked.
     *
     * @param _tradingPool       The address of the trading pool being updated
     * @param _newFeeCallData    Bytestring representing feeData to pass to fee calculator
     */
    function adjustFee(
        address _tradingPool,
        bytes calldata _newFeeCallData
    )
        external
        onlyTrader(IRebalancingSetTokenV2(_tradingPool))
        limitOneUpgrade(_tradingPool)
        timeLockUpgrade
    {
        IRebalancingSetTokenV3(_tradingPool).adjustFee(_newFeeCallData);
    }

    /**
     * External function to remove upgrade. Modifiers should be added to restrict usage.
     *
     * @param _tradingPool      The address of the trading pool being updated
     * @param _upgradeHash      Keccack256 hash that uniquely identifies function called and arguments
     */
    function removeRegisteredUpgrade(
        address _tradingPool,
        bytes32 _upgradeHash
    )
        external
        onlyTrader(IRebalancingSetTokenV2(_tradingPool))
    {
        LimitOneUpgrade.removeRegisteredUpgradeInternal(_tradingPool, _upgradeHash);
    }
}

Contract Security Audit

Contract ABI

API
[{"constant":true,"inputs":[],"name":"MAXIMUM_ALLOCATION","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tradingPool","type":"address"},{"name":"_newAllocation","type":"uint256"},{"name":"_liquidatorData","type":"bytes"}],"name":"updateAllocation","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"timeLockedUpgrades","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tradingPool","type":"address"},{"name":"_newTrader","type":"address"}],"name":"setTrader","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tradingPool","type":"address"},{"name":"_newFeeRecipient","type":"address"}],"name":"setFeeRecipient","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_addresses","type":"address[]"}],"name":"areValidAddresses","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"whiteList","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_address","type":"address"}],"name":"addAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tradingPool","type":"address"},{"name":"_newEntryFee","type":"uint256"}],"name":"initiateEntryFeeChange","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_address","type":"address"}],"name":"removeAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tradingPool","type":"address"},{"name":"_upgradeHash","type":"bytes32"}],"name":"removeRegisteredUpgrade","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"timeLockPeriod","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"feeUpdateTimelock","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tradingPairAllocator","type":"address"},{"name":"_startingBaseAssetAllocation","type":"uint256"},{"name":"_startingUSDValue","type":"uint256"},{"name":"_name","type":"bytes32"},{"name":"_symbol","type":"bytes32"},{"name":"_rebalancingSetCallData","type":"bytes"}],"name":"createTradingPool","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"maxEntryFee","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tradingPool","type":"address"},{"name":"_newLiquidator","type":"address"}],"name":"setLiquidator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_timeLockPeriod","type":"uint256"}],"name":"setTimeLockPeriod","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tradingPool","type":"address"},{"name":"_newFeeCallData","type":"bytes"}],"name":"adjustFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"pools","outputs":[{"name":"trader","type":"address"},{"name":"allocator","type":"address"},{"name":"currentAllocation","type":"uint256"},{"name":"newEntryFee","type":"uint256"},{"name":"feeUpdateTimestamp","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tradingPool","type":"address"}],"name":"finalizeEntryFeeChange","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"ONE_PERCENT","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"factory","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"REBALANCING_SET_NATURAL_UNIT","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"upgradeIdentifier","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"validAddresses","outputs":[{"name":"","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"addresses","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"core","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_core","type":"address"},{"name":"_factory","type":"address"},{"name":"_whiteListedAllocators","type":"address[]"},{"name":"_maxEntryFee","type":"uint256"},{"name":"_feeUpdateTimelock","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_upgradeHash","type":"bytes32"}],"name":"RemoveRegisteredUpgrade","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"trader","type":"address"},{"indexed":true,"name":"allocator","type":"address"},{"indexed":true,"name":"tradingPool","type":"address"},{"indexed":false,"name":"startingAllocation","type":"uint256"}],"name":"TradingPoolCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"tradingPool","type":"address"},{"indexed":false,"name":"oldAllocation","type":"uint256"},{"indexed":false,"name":"newAllocation","type":"uint256"}],"name":"AllocationUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"tradingPool","type":"address"},{"indexed":true,"name":"oldTrader","type":"address"},{"indexed":true,"name":"newTrader","type":"address"}],"name":"NewTrader","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_address","type":"address"}],"name":"AddressAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_address","type":"address"}],"name":"AddressRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_upgradeHash","type":"bytes32"},{"indexed":false,"name":"_timestamp","type":"uint256"}],"name":"UpgradeRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101e95760003560e060020a9004806386b2f73911610113578063bb2eb4d2116100a6578063e7d22fdb11610075578063e7d22fdb146103c4578063edf26d9b146103d9578063f2f4eb26146103ec578063f2fde38b14610401576101e9565b8063bb2eb4d214610399578063c45a0155146103a1578063d439053d146103a9578063d7c1b02a146103b1576101e9565b80639303b16f116100e25780639303b16f1461033c57806396d658901461034f578063a4063dbc14610362578063aa0f9d2814610386576101e9565b806386b2f739146103045780638c2c359f1461030c5780638da5cb5b1461031f5780638f32d59b14610334576101e9565b806338eada1c1161018b578063715018a61161015a578063715018a6146102d957806378446bc1146102e1578063796a47c2146102e957806381b53258146102f1576101e9565b806338eada1c1461028d5780633ecd4f3f146102a05780634ba79dfe146102b35780635904dec2146102c6576101e9565b80631c0058e0116101c75780631c0058e014610234578063270401cb1461024757806332ed010e1461025a578063372c12b11461027a576101e9565b80630450a1cf146101ee578063060104271461020c5780631766486d14610221575b600080fd5b6101f6610414565b6040516102039190612d36565b60405180910390f35b61021f61021a36600461218e565b610420565b005b6101f661022f3660046120d3565b6105e7565b61021f61024236600461210f565b6105f9565b61021f61025536600461210f565b6106b7565b61026d610268366004612091565b610770565b6040516102039190612d28565b61026d610288366004611fbd565b6107d4565b61021f61029b366004611fbd565b6107e9565b61021f6102ae36600461216f565b610a97565b61021f6102c1366004611fbd565b610b1b565b61021f6102d4366004612001565b610c44565b61021f610c90565b6101f6610ceb565b6101f6610cf1565b61021f6102ff366004612214565b610cf7565b6101f6611139565b61021f61031a36600461213f565b61113f565b6103276111c1565b6040516102039190612c15565b61026d6111d1565b61021f61034a3660046120d3565b6111e2565b61021f61035d36600461203b565b61121c565b610375610370366004611fbd565b6114fc565b604051610203959493929190612ccb565b61021f6103943660046120f1565b611537565b6101f6611662565b61032761166d565b6101f661167c565b6101f66103bf366004611fbd565b611684565b6103cc611696565b6040516102039190612d17565b6103276103e73660046120d3565b6116f8565b6103f461171f565b6040516102039190612d71565b61021f61040f366004611fbd565b61172e565b670de0b6b3a764000081565b8361042a81611748565b600160a060020a031633600160a060020a0316146104665760405160e560020a62461bcd02815260040161045d90612e8f565b60405180910390fd5b6104708585611766565b600061047b86611992565b600160a060020a031663f26dc9f6866040518263ffffffff1660e060020a0281526004016104a99190612d36565b602060405180830381600087803b1580156104c357600080fd5b505af11580156104d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506104fb91908101906121f6565b6040517f770d0c5d000000000000000000000000000000000000000000000000000000008152909150600160a060020a0387169063770d0c5d9061054790849088908890600401612ca1565b600060405180830381600087803b15801561056157600080fd5b505af1158015610575573d6000803e3d6000fd5b5050505085600160a060020a03167f3378e4847f9c1525878fb97b8423b0a0f9e3921e9a05cf88ea6356e621f28b946105ad886119b3565b876040516105bc929190612d44565b60405180910390a2505050600160a060020a0390921660009081526007602052604090206002015550565b60026020526000908152604090205481565b8161060381611748565b600160a060020a031633600160a060020a0316146106365760405160e560020a62461bcd02815260040161045d90612e8f565b81600160a060020a031661064984611748565b600160a060020a031684600160a060020a03167fe3cde3b059f92b80ddfcca729d7da50d4910ac9d55fc82cac94776629438551660405160405180910390a450600160a060020a0391821660009081526007602052604090208054600160a060020a03191691909216179055565b816106c181611748565b600160a060020a031633600160a060020a0316146106f45760405160e560020a62461bcd02815260040161045d90612e8f565b6040517fe74b981b000000000000000000000000000000000000000000000000000000008152600160a060020a0384169063e74b981b90610739908590600401612c15565b600060405180830381600087803b15801561075357600080fd5b505af1158015610767573d6000803e3d6000fd5b50505050505050565b6000805b828110156107c8576004600085858481811061078c57fe5b60209081029290920135600160a060020a03168352508101919091526040016000205460ff166107c05760009150506107ce565b600101610774565b50600190505b92915050565b60046020526000908152604090205460ff1681565b6107f16111d1565b6107fa57600080fd5b6001546108de57600160a060020a03811660009081526004602052604090205460ff161561083d5760405160e560020a62461bcd02815260040161045d90612e7f565b6003805460018082019092557fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b018054600160a060020a031916600160a060020a03841690811790915560009081526004602052604090819020805460ff1916909217909155517fa226db3f664042183ee0281230bba26cbf7b5057e50aee7f25a175ff45ce4d7f906108d1908390612c15565b60405180910390a1610a94565b600080366040516020016108f3929190612c08565b60408051601f19818403018152918152815160209283012060008181526002909352912054909150806109745760008281526002602052604090819020429081905590517f0e0905d1a972d476e353bdcc3e06b19a71709054c8ba01eccb7e0691eca6d3749161096591859190612d44565b60405180910390a15050610a94565b60015461098890829063ffffffff6119d116565b4210156109aa5760405160e560020a62461bcd02815260040161045d90612e4f565b6000828152600260209081526040808320839055600160a060020a0386168352600490915290205460ff16156109f55760405160e560020a62461bcd02815260040161045d90612e7f565b6003805460018082019092557fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b018054600160a060020a031916600160a060020a03861690811790915560009081526004602052604090819020805460ff1916909217909155517fa226db3f664042183ee0281230bba26cbf7b5057e50aee7f25a175ff45ce4d7f90610a89908590612c15565b60405180910390a150505b50565b81610aa181611748565b600160a060020a031633600160a060020a031614610ad45760405160e560020a62461bcd02815260040161045d90612e8f565b610add826119ea565b600954610af190429063ffffffff6119d116565b600160a060020a039093166000908152600760205260409020600481019390935550600390910155565b610b236111d1565b610b2c57600080fd5b600160a060020a03811660009081526004602052604090205460ff16610b675760405160e560020a62461bcd02815260040161045d90612d8f565b610bd4816003805480602002602001604051908101604052809291908181526020018280548015610bc157602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610ba3575b5050505050611a0f90919063ffffffff16565b8051610be891600391602090910190611e5c565b50600160a060020a03811660009081526004602052604090819020805460ff19169055517f24a12366c02e13fe4a9e03d86a8952e85bb74a456c16e4a18b6d8295700b74bb90610c39908390612c15565b60405180910390a150565b81610c4e81611748565b600160a060020a031633600160a060020a031614610c815760405160e560020a62461bcd02815260040161045d90612e8f565b610c8b8383611a44565b505050565b610c986111d1565b610ca157600080fd5b60008054604051600160a060020a03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a360008054600160a060020a0319169055565b60015481565b60095481565b610d38878784848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611aa292505050565b6040517ff26dc9f6000000000000000000000000000000000000000000000000000000008152600090600160a060020a0389169063f26dc9f690610d80908a90600401612d36565b602060405180830381600087803b158015610d9a57600080fd5b505af1158015610dae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610dd291908101906121f6565b604080516001808252818301909252919250606091906020808301908038833950506040517f9b08a338000000000000000000000000000000000000000000000000000000008152919250600091600160a060020a038c169150639b08a33890610e40908690600401612d71565b60206040518083038186803b158015610e5857600080fd5b505afa158015610e6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610e9091908101906122d7565b9050610eb681610eaa8a6305f5e10063ffffffff611aef16565b9063ffffffff611b1616565b82600081518110610ec357fe5b60209081029190910101526040805160018082528183019092526060918160200160208202803883390190505090508381600081518110610f0057fe5b6020026020010190600160a060020a03169081600160a060020a0316815250506000600560009054906101000a9004600160a060020a0316600160a060020a0316635c217114600660009054906101000a9004600160a060020a031684876305f5e1008e8e8e8e6040518963ffffffff1660e060020a028152600401610f8d989796959493929190612c23565b602060405180830381600087803b158015610fa757600080fd5b505af1158015610fbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610fdf9190810190611fe3565b9050336007600083600160a060020a0316600160a060020a0316815260200190815260200160002060000160006101000a815481600160a060020a030219169083600160a060020a031602179055508b6007600083600160a060020a0316600160a060020a0316815260200190815260200160002060010160006101000a815481600160a060020a030219169083600160a060020a031602179055508a6007600083600160a060020a0316600160a060020a031681526020019081526020016000206002018190555060006007600083600160a060020a0316600160a060020a031681526020019081526020016000206004018190555080600160a060020a03168c600160a060020a031633600160a060020a03167fbbffbd2b0836d5ce227ff8a76aab4903906ac35064067ed1a2e7b6251f03527e8e6040516111239190612d36565b60405180910390a4505050505050505050505050565b60085481565b8161114981611748565b600160a060020a031633600160a060020a03161461117c5760405160e560020a62461bcd02815260040161045d90612e8f565b6040517f01c76f81000000000000000000000000000000000000000000000000000000008152600160a060020a038416906301c76f8190610739908590600401612d71565b600054600160a060020a03165b90565b600054600160a060020a0316331490565b6111ea6111d1565b6111f357600080fd5b60015481116112175760405160e560020a62461bcd02815260040161045d90612e6f565b600155565b8261122681611748565b600160a060020a031633600160a060020a0316146112595760405160e560020a62461bcd02815260040161045d90612e8f565b6001548490156113175760008036604051611275929190612c08565b6040805191829003909120600160a060020a0384166000908152600a6020529190912054909150156112f957600160a060020a0382166000908152600a602052604090205481146112db5760405160e560020a62461bcd02815260040161045d90612daf565b600160a060020a0382166000908152600a6020526040812055611315565b600160a060020a0382166000908152600a602052604090208190555b505b60015461139c576040517fcbf1c354000000000000000000000000000000000000000000000000000000008152600160a060020a0386169063cbf1c354906113659087908790600401612d5f565b600060405180830381600087803b15801561137f57600080fd5b505af1158015611393573d6000803e3d6000fd5b505050506114f5565b600080366040516020016113b1929190612c08565b60408051601f19818403018152918152815160209283012060008181526002909352912054909150806114325760008281526002602052604090819020429081905590517f0e0905d1a972d476e353bdcc3e06b19a71709054c8ba01eccb7e0691eca6d3749161142391859190612d44565b60405180910390a150506114f5565b60015461144690829063ffffffff6119d116565b4210156114685760405160e560020a62461bcd02815260040161045d90612e4f565b60008281526002602052604080822091909155517fcbf1c354000000000000000000000000000000000000000000000000000000008152600160a060020a0388169063cbf1c354906114c09089908990600401612d5f565b600060405180830381600087803b1580156114da57600080fd5b505af11580156114ee573d6000803e3d6000fd5b5050505050505b5050505050565b60076020526000908152604090208054600182015460028301546003840154600490940154600160a060020a03938416949390921692909185565b8061154181611748565b600160a060020a031633600160a060020a0316146115745760405160e560020a62461bcd02815260040161045d90612e8f565b61157d82611b38565b61159c5760405160e560020a62461bcd02815260040161045d90612e3f565b6115a582611b38565b4210156115c75760405160e560020a62461bcd02815260040161045d90612d7f565b600160a060020a03821660008181526007602052604081206004015563eb770d0c6115f184611b56565b6040518263ffffffff1660e060020a0281526004016116109190612d36565b600060405180830381600087803b15801561162a57600080fd5b505af115801561163e573d6000803e3d6000fd5b505050600160a060020a039092166000908152600760205260408120600301555050565b662386f26fc1000081565b600654600160a060020a031681565b6305f5e10081565b600a6020526000908152604090205481565b606060038054806020026020016040519081016040528092919081815260200182805480156116ee57602002820191906000526020600020905b8154600160a060020a031681526001909101906020018083116116d0575b5050505050905090565b6003818154811061170557fe5b600091825260209091200154600160a060020a0316905081565b600554600160a060020a031681565b6117366111d1565b61173f57600080fd5b610a9481611b74565b600160a060020a039081166000908152600760205260409020541690565b61176f81611be2565b600061177a836119b3565b9050670de0b6b3a76400008114801561179a5750670de0b6b3a764000082145b1580156117b05750801580156117ae575081155b155b6117cf5760405160e560020a62461bcd02815260040161045d90612e5f565b600083600160a060020a031663b83d81576040518163ffffffff1660e060020a02815260040160206040518083038186803b15801561180d57600080fd5b505afa158015611821573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061184591908101906122d7565b9050600084600160a060020a03166316d1d9166040518163ffffffff1660e060020a02815260040160206040518083038186803b15801561188557600080fd5b505afa158015611899573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506118bd91908101906122d7565b90506118cf828263ffffffff6119d116565b4210156118f15760405160e560020a62461bcd02815260040161045d90612d9f565b600085600160a060020a031663f75af97f6040518163ffffffff1660e060020a02815260040160206040518083038186803b15801561192f57600080fd5b505afa158015611943573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061196791908101906122b9565b600381111561197257fe5b146114f55760405160e560020a62461bcd02815260040161045d90612e0f565b600160a060020a039081166000908152600760205260409020600101541690565b600160a060020a031660009081526007602052604090206002015490565b6000828201838110156119e357600080fd5b9392505050565b600854811115610a945760405160e560020a62461bcd02815260040161045d90612def565b6060600080611a1e8585611c44565b9150915080611a2c57600080fd5b6060611a388684611ca8565b5093506107ce92505050565b600160a060020a0382166000908152600a60205260409020548114611a7e5760405160e560020a62461bcd02815260040161045d90612e1f565b611a8781611da2565b50600160a060020a03166000908152600a6020526040812055565b611aab82611be2565b611ab481611e0b565b600160a060020a03831660009081526004602052604090205460ff16610c8b5760405160e560020a62461bcd02815260040161045d90612dcf565b600082611afe575060006107ce565b82820282848281611b0b57fe5b04146119e357600080fd5b6000808211611b2457600080fd5b6000828481611b2f57fe5b04949350505050565b600160a060020a031660009081526007602052604090206004015490565b600160a060020a031660009081526007602052604090206003015490565b600160a060020a038116611b8757600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a360008054600160a060020a031916600160a060020a0392909216919091179055565b670de0b6b3a7640000811115611c0d5760405160e560020a62461bcd02815260040161045d90612ddf565b611c2481662386f26fc1000063ffffffff611e3f16565b15610a945760405160e560020a62461bcd02815260040161045d90612e2f565b81516000908190815b81811015611c975784600160a060020a0316868281518110611c6b57fe5b6020026020010151600160a060020a03161415611c8f57925060019150611ca19050565b600101611c4d565b5060009250829150505b9250929050565b606060008084519050606060018203604051908082528060200260200182016040528015611ce0578160200160208202803883390190505b50905060005b85811015611d2e57868181518110611cfa57fe5b6020026020010151828281518110611d0e57fe5b600160a060020a0390921660209283029190910190910152600101611ce6565b50600185015b82811015611d7f57868181518110611d4857fe5b6020026020010151826001830381518110611d5f57fe5b600160a060020a0390921660209283029190910190910152600101611d34565b5080868681518110611d8d57fe5b60200260200101519350935050509250929050565b600081815260026020526040902054611dd05760405160e560020a62461bcd02815260040161045d90612dbf565b6000818152600260205260408082208290555182917f068cc8f97648f23db94d0e1a707a54447d07effeb11c1c297168aa67321dc4ec91a250565b6020810151600160a060020a0381163014611e3b5760405160e560020a62461bcd02815260040161045d90612dff565b5050565b600081611e4b57600080fd5b818381611e5457fe5b069392505050565b828054828255906000526020600020908101928215611eb1579160200282015b82811115611eb15782518254600160a060020a031916600160a060020a03909116178255602090920191600190910190611e7c565b50611ebd929150611ec1565b5090565b6111ce91905b80821115611ebd578054600160a060020a0319168155600101611ec7565b60006119e38235612eb7565b60006119e38251612eb7565b60008083601f840112611f0f57600080fd5b50813567ffffffffffffffff811115611f2757600080fd5b602083019150836020820283011115611ca157600080fd5b60006119e382356111ce565b60008083601f840112611f5d57600080fd5b50813567ffffffffffffffff811115611f7557600080fd5b602083019150836001820283011115611ca157600080fd5b60006119e38235612ed3565b60006119e38251612ed3565b60006119e38251612ede565b60006119e382516111ce565b600060208284031215611fcf57600080fd5b6000611fdb8484611ee5565b949350505050565b600060208284031215611ff557600080fd5b6000611fdb8484611ef1565b6000806040838503121561201457600080fd5b60006120208585611ee5565b925050602061203185828601611f3f565b9150509250929050565b60008060006040848603121561205057600080fd5b600061205c8686611ee5565b935050602084013567ffffffffffffffff81111561207957600080fd5b61208586828701611f4b565b92509250509250925092565b600080602083850312156120a457600080fd5b823567ffffffffffffffff8111156120bb57600080fd5b6120c785828601611efd565b92509250509250929050565b6000602082840312156120e557600080fd5b6000611fdb8484611f3f565b60006020828403121561210357600080fd5b6000611fdb8484611f8d565b6000806040838503121561212257600080fd5b600061212e8585611f8d565b925050602061203185828601611ee5565b6000806040838503121561215257600080fd5b600061215e8585611f8d565b925050602061203185828601611f8d565b6000806040838503121561218257600080fd5b60006120208585611f8d565b600080600080606085870312156121a457600080fd5b60006121b08787611f8d565b94505060206121c187828801611f3f565b935050604085013567ffffffffffffffff8111156121de57600080fd5b6121ea87828801611f4b565b95989497509550505050565b60006020828403121561220857600080fd5b6000611fdb8484611f99565b600080600080600080600060c0888a03121561222f57600080fd5b600061223b8a8a611f8d565b975050602061224c8a828b01611f3f565b965050604061225d8a828b01611f3f565b955050606061226e8a828b01611f3f565b945050608061227f8a828b01611f3f565b93505060a088013567ffffffffffffffff81111561229c57600080fd5b6122a88a828b01611f4b565b925092505092959891949750929550565b6000602082840312156122cb57600080fd5b6000611fdb8484611fa5565b6000602082840312156122e957600080fd5b6000611fdb8484611fb1565b60006123018383612315565b505060200190565b600061230183836123cd565b61231e81612eb7565b82525050565b600061232f82612ea5565b6123398185612ea9565b935061234483612e9f565b60005b8281101561236f5761235a8683516122f5565b955061236582612e9f565b9150600101612347565b5093949350505050565b600061238482612ea5565b61238e8185612ea9565b935061239983612e9f565b60005b8281101561236f576123af868351612309565b95506123ba82612e9f565b915060010161239c565b61231e81612ec2565b61231e816111ce565b60006123e28385612ea9565b93506123ef838584612eed565b6123f883612ef9565b9093019392505050565b600061240e8385612eb2565b935061241b838584612eed565b50500190565b61231e81612ed3565b6000612437605a83612ea9565b7f536f6369616c54726164696e674d616e616765722e66696e616c697a6553657481527f466565526563697069656e743a2054696d65206c6f636b20706572696f64206d60208201527f75737420656c6170736520746f2075706461746520666565732e000000000000604082015260600192915050565b60006124bc603c83612ea9565b7f57686974654c6973742e72656d6f7665416464726573733a204164647265737381527f206973206e6f742063757272656e742077686974656c69737465642e00000000602082015260400192915050565b600061251b604d83612ea9565b7f536f6369616c54726164696e674d616e616765722e76616c6964617465416c6c81527f6f636174696f6e5570646174653a20526562616c616e636520696e746572766160208201527f6c206e6f7420656c617073656400000000000000000000000000000000000000604082015260600192915050565b60006125a0602383612ea9565b7f416e6f746865722075706461746520616c726561647920696e2070726f67726581527f73732e0000000000000000000000000000000000000000000000000000000000602082015260400192915050565b60006125ff604a83612ea9565b7f54696d654c6f636b5570677261646556322e72656d6f7665526567697374657281527f6564557067726164653a20557067726164652068617368206d7573742062652060208201527f7265676973746572656400000000000000000000000000000000000000000000604082015260600192915050565b6000612684604e83612ea9565b7f536f6369616c54726164696e674d616e616765722e76616c696461746543726581527f61746554726164696e67506f6f6c3a2050617373656420616c6c6f6361746f7260208201527f206973206e6f742076616c69642e000000000000000000000000000000000000604082015260600192915050565b6000612709602783612ea9565b7f50617373656420616c6c6f636174696f6e206d757374206e6f7420657863656581527f6420313030252e00000000000000000000000000000000000000000000000000602082015260400192915050565b6000612768605783612ea9565b7f536f6369616c54726164696e674d616e616765722e76616c69646174654e657781527f456e7472794665653a2050617373656420656e74727920666565206d7573742060208201527f6e6f7420657863656564206d6178456e7472794665652e000000000000000000604082015260600192915050565b60006127ed605683612ea9565b7f536f6369616c54726164696e674d616e616765722e76616c696461746543616c81527f6c44617461417267733a20506173736564206d616e616765722061646472657360208201527f73206973206e6f74207468697320616464726573732e00000000000000000000604082015260600192915050565b6000612872604783612ea9565b7f536f6369616c54726164696e674d616e616765722e76616c6964617465416c6c81527f6f636174696f6e5570646174653a205374617465206d75737420626520696e2060208201527f44656661756c7400000000000000000000000000000000000000000000000000604082015260600192915050565b60006128f7603383612ea9565b7f5061737365642075706772616465206861736820646f6573206e6f74206d617481527f6368207570677261646520616464726573732e00000000000000000000000000602082015260400192915050565b6000612956602983612ea9565b7f50617373656420616c6c6f636174696f6e206d757374206265206d756c74697081527f6c65206f662031252e0000000000000000000000000000000000000000000000602082015260400192915050565b60006129b5604d83612ea9565b7f536f6369616c54726164696e674d616e616765722e66696e616c697a6553657481527f466565526563697069656e743a204d75737420696e697469617465206665652060208201527f6368616e67652066697273742e00000000000000000000000000000000000000604082015260600192915050565b6000612a3a603483612ea9565b7f54696d654c6f636b557067726164653a2054696d65206c6f636b20706572696f81527f64206d757374206861766520656c61707365642e000000000000000000000000602082015260400192915050565b6000612a99604183612ea9565b7f536f6369616c54726164696e674d616e616765722e76616c6964617465416c6c81527f6f636174696f6e5570646174653a20496e76616c696420616c6c6f636174696f60208201527f6e00000000000000000000000000000000000000000000000000000000000000604082015260600192915050565b6000612b1e603983612ea9565b7f54696d654c6f636b557067726164653a204e657720706572696f64206d75737481527f2062652067726561746572207468616e206578697374696e6700000000000000602082015260400192915050565b6000612b7d603b83612ea9565b7f57686974654c6973742e616464416464726573733a204164647265737320686181527f7320616c7265616479206265656e2077686974656c69737465642e0000000000602082015260400192915050565b6000612bdc601583612ea9565b7f53656e646572206d757374206265207472616465720000000000000000000000815260200192915050565b6000611fdb828486612402565b602081016107ce8284612315565b60e08101612c31828b612315565b8181036020830152612c43818a612324565b90508181036040830152612c578189612379565b9050612c6660608301886123cd565b612c7360808301876123cd565b612c8060a08301866123cd565b81810360c0830152612c938184866123d6565b9a9950505050505050505050565b60408101612caf8286612315565b8181036020830152612cc28184866123d6565b95945050505050565b60a08101612cd98288612315565b612ce66020830187612421565b612cf360408301866123cd565b612d0060608301856123cd565b612d0d60808301846123cd565b9695505050505050565b602080825281016119e38184612324565b602081016107ce82846123c4565b602081016107ce82846123cd565b60408101612d5282856123cd565b6119e360208301846123cd565b60208082528101611fdb8184866123d6565b602081016107ce8284612421565b602080825281016107ce8161242a565b602080825281016107ce816124af565b602080825281016107ce8161250e565b602080825281016107ce81612593565b602080825281016107ce816125f2565b602080825281016107ce81612677565b602080825281016107ce816126fc565b602080825281016107ce8161275b565b602080825281016107ce816127e0565b602080825281016107ce81612865565b602080825281016107ce816128ea565b602080825281016107ce81612949565b602080825281016107ce816129a8565b602080825281016107ce81612a2d565b602080825281016107ce81612a8c565b602080825281016107ce81612b11565b602080825281016107ce81612b70565b602080825281016107ce81612bcf565b60200190565b5190565b90815260200190565b919050565b60006107ce82612ec7565b151590565b600160a060020a031690565b60006107ce82612eb7565b600060048210611ebd57600080fd5b82818337506000910152565b601f01601f19169056fea265627a7a723058209dc195d6120b429ab518ac1d5b0a37b335f3d8e90b855aa26273452d7237fec26c6578706572696d656e74616cf50037

Deployed Bytecode Sourcemap

96440:2459:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;96440:2459:0;;;;;;;;-1:-1:-1;;;96440:2459:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;80603:49;;;:::i;:::-;;;;;;;;;;;;;;;;85351:885;;;;;;;;;:::i;:::-;;56782:53;;;;;;;;;:::i;88512:359::-;;;;;;;;;:::i;89551:235::-;;;;;;;;;:::i;74795:329::-;;;;;;;;;:::i;:::-;;;;;;;;72255:41;;;;;;;;;:::i;73337:409::-;;;;;;;;;:::i;86574:512::-;;;;;;;;;:::i;73889:404::-;;;;;;;;;:::i;98619:277::-;;;;;;;;;:::i;54857:140::-;;;:::i;56683:29::-;;;:::i;80873:32::-;;;:::i;83053:1827::-;;;;;;;;;:::i;80840:26::-;;;:::i;89093:231::-;;;;;;;;;:::i;54067:79::-;;;:::i;:::-;;;;;;;;54402:92;;;:::i;58614:409::-;;;;;;;;;:::i;97987:325::-;;;;;;;;;:::i;80769:62::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;87298:988;;;;;;;;;:::i;80557:39::-;;;:::i;80740:22::-;;;:::i;80492:58::-;;;:::i;62137:52::-;;;;;;;;;:::i;74427:134::-;;;:::i;:::-;;;;;;;;72222:26;;;;;;;;;:::i;80716:17::-;;;:::i;:::-;;;;;;;;55174:109;;;;;;;;;:::i;80603:49::-;80648:4;80603:49;:::o;85351:885::-;85542:12;80346:20;80353:12;80346:6;:20::i;:::-;-1:-1:-1;;;;;80332:34:0;:10;-1:-1:-1;;;;;80332:34:0;;80310:105;;;;-1:-1:-1;;;;;80310:105:0;;;;;;;;;;;;;;;;;85617:54;85642:12;85656:14;85617:24;:54::i;:::-;85722:17;85742:23;85752:12;85742:9;:23::i;:::-;-1:-1:-1;;;;;85742:46:0;;85803:14;85742:86;;;;;-1:-1:-1;;;85742:86:0;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;85742:86:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;85742:86:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;85742:86:0;;;;;;;;;85902:62;;;;;85722:106;;-1:-1:-1;;;;;;85902:27:0;;;;;:62;;85722:106;;85948:15;;;;85902:62;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;85902:62:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;85902:62:0;;;;86021:12;-1:-1:-1;;;;;85982:138:0;;86049:31;86067:12;86049:17;:31::i;:::-;86095:14;85982:138;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;86165:28:0;;;;;;;:5;:28;;;;;:46;;:63;-1:-1:-1;85351:885:0:o;56782:53::-;;;;;;;;;;;;;:::o;88512:359::-;88651:12;80346:20;80353:12;80346:6;:20::i;:::-;-1:-1:-1;;;;;80332:34:0;:10;-1:-1:-1;;;;;80332:34:0;;80310:105;;;;-1:-1:-1;;;;;80310:105:0;;;;;;;;;88781:10;-1:-1:-1;;;;;88686:116:0;88746:20;88753:12;88746:6;:20::i;:::-;-1:-1:-1;;;;;88686:116:0;88718:12;-1:-1:-1;;;;;88686:116:0;;;;;;;;;;;-1:-1:-1;;;;;;88815:28:0;;;;;;;:5;:28;;;;;:48;;-1:-1:-1;;;;;;88815:48:0;;;;;;;;88512:359::o;89551:235::-;89702:12;80346:20;80353:12;80346:6;:20::i;:::-;-1:-1:-1;;;;;80332:34:0;:10;-1:-1:-1;;;;;80332:34:0;;80310:105;;;;-1:-1:-1;;;;;80310:105:0;;;;;;;;;89732:46;;;;;-1:-1:-1;;;;;89732:28:0;;;;;:46;;89761:16;;89732:46;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;89732:46:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;89732:46:0;;;;89551:235;;;:::o;74795:329::-;74919:4;;74941:152;74961:21;;;74941:152;;;75009:9;:24;75019:10;;75030:1;75019:13;;;;;;;;;;;;;;;;-1:-1:-1;;;;;75019:13:0;75009:24;;-1:-1:-1;75009:24:0;;;;;;;;-1:-1:-1;75009:24:0;;;;75004:78;;75061:5;75054:12;;;;;75004:78;74984:3;;74941:152;;;;75112:4;75105:11;;74795:329;;;;;:::o;72255:41::-;;;;;;;;;;;;;;;:::o;73337:409::-;54279:9;:7;:9::i;:::-;54271:18;;;;;;57236:14;;57232:76;;-1:-1:-1;;;;;73492:19:0;;;;;;:9;:19;;;;;;;;73491:20;73469:129;;;;-1:-1:-1;;;;;73469:129:0;;;;;;;;;73611:9;27:10:-1;;39:1;23:18;;;45:23;;;73611:24:0;;;;-1:-1:-1;;;;;;73611:24:0;-1:-1:-1;;;;;73611:24:0;;;;;;;;-1:-1:-1;73648:19:0;;;:9;73611:24;73648:19;;;;;;:26;;-1:-1:-1;;73648:26:0;;;;;;;73692:46;;;;;73611:24;;73692:46;;;;;;;;;;57290:7;;57232:76;57489:19;57570:8;;57535:58;;;;;;;;;;;;;;-1:-1:-1;;26:21;;;22:32;6:49;;57535:58:0;;;57511:93;;49:4:-1;57511:93:0;;;;57617:24;57644:31;;;:18;:31;;;;;;57511:93;;-1:-1:-1;57775:21:0;57771:244;;57813:31;;;;:18;:31;;;;;;;57847:15;57813:49;;;;57884:96;;;;;;57832:11;;57847:15;57884:96;;;;;;;;;;57997:7;;;;57771:244;58089:14;;58068:36;;:16;;:36;:20;:36;:::i;:::-;58049:15;:55;;58027:157;;;;-1:-1:-1;;;;;58027:157:0;;;;;;;;;58268:1;58234:31;;;:18;:31;;;;;;;;:35;;;-1:-1:-1;;;;;73492:19:0;;;;:9;:19;;;;;;;;73491:20;73469:129;;;;-1:-1:-1;;;;;73469:129:0;;;;;;;;;73611:9;27:10:-1;;39:1;23:18;;;45:23;;;73611:24:0;;;;-1:-1:-1;;;;;;73611:24:0;-1:-1:-1;;;;;73611:24:0;;;;;;;;-1:-1:-1;73648:19:0;;;:9;73611:24;73648:19;;;;;;:26;;-1:-1:-1;;73648:26:0;;;;;;;73692:46;;;;;73611:24;;73692:46;;;;;;;;;;54300:1;;;73337:409;:::o;86574:512::-;86728:12;80346:20;80353:12;80346:6;:20::i;:::-;-1:-1:-1;;;;;80332:34:0;:10;-1:-1:-1;;;;;80332:34:0;;80310:105;;;;-1:-1:-1;;;;;80310:105:0;;;;;;;;;86812:33;86832:12;86812:19;:33::i;:::-;86994:17;;86974:38;;:15;;:38;:19;:38;:::i;:::-;-1:-1:-1;;;;;86924:28:0;;;;;;;:5;:28;;;;;:47;;;:88;;;;-1:-1:-1;87023:40:0;;;;:55;86574:512::o;73889:404::-;54279:9;:7;:9::i;:::-;54271:18;;;;;;-1:-1:-1;;;;;74021:19:0;;;;;;:9;:19;;;;;;;;73999:129;;;;-1:-1:-1;;;;;73999:129:0;;;;;;;;;74153:26;74170:8;74153:9;:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;74153:16:0;;;;;;;;;;;;;;;;;;;;;;;:26;;;;:::i;:::-;74141:38;;;;:9;;:38;;;;;;:::i;:::-;-1:-1:-1;;;;;;74192:19:0;;74214:5;74192:19;;;:9;:19;;;;;;;:27;;-1:-1:-1;;74192:27:0;;;74237:48;;;;;74202:8;;74237:48;;;;;;;;;;73889:404;:::o;98619:277::-;98782:12;80346:20;80353:12;80346:6;:20::i;:::-;-1:-1:-1;;;;;80332:34:0;:10;-1:-1:-1;;;;;80332:34:0;;80310:105;;;;-1:-1:-1;;;;;80310:105:0;;;;;;;;;98813:75;98861:12;98875;98813:47;:75::i;:::-;98619:277;;;:::o;54857:140::-;54279:9;:7;:9::i;:::-;54271:18;;;;;;54956:1;54940:6;;54919:40;;-1:-1:-1;;;;;54940:6:0;;;;54919:40;;54956:1;;54919:40;54987:1;54970:19;;-1:-1:-1;;;;;;54970:19:0;;;54857:140::o;56683:29::-;;;;:::o;80873:32::-;;;;:::o;83053:1827::-;83389:103;83415:21;83438:28;83468:23;;83389:103;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;83389:25:0;;-1:-1:-1;;;83389:103:0:i;:::-;83562:98;;;;;83536:23;;-1:-1:-1;;;;;83562:44:0;;;;;:98;;83621:28;;83562:98;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;83562:98:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;83562:98:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;83562:98:0;;;;;;;;;83703:16;;;83717:1;83703:16;;;;;;;;;83536:124;;-1:-1:-1;83673:27:0;;83703:16;;;;;;;105:10:-1;83703:16:0;88:34:-1;-1:-1;;83787:88:0;;;;;83673:46;;-1:-1:-1;83761:23:0;;-1:-1:-1;;;;;83787:49:0;;;-1:-1:-1;83787:49:0;;:88;;83851:13;;83787:88;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;83787:88:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;83787:88:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;83787:88:0;;;;;;;;;83761:114;-1:-1:-1;83985:72:0;83761:114;83985:51;:17;80547:3;83985:51;:21;:51;:::i;:::-;:55;:72;:55;:72;:::i;:::-;83969:10;83980:1;83969:13;;;;;;;;;;;;;;;;;:88;84100:16;;;84114:1;84100:16;;;;;;;;;84070:27;;84100:16;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;84100:16:0;84070:46;;84151:13;84127:10;84138:1;84127:13;;;;;;;;;;;;;:38;-1:-1:-1;;;;;84127:38:0;;;-1:-1:-1;;;;;84127:38:0;;;;;84209:19;84231:4;;;;;;;;;-1:-1:-1;;;;;84231:4:0;-1:-1:-1;;;;;84231:14:0;;84260:7;;;;;;;;;-1:-1:-1;;;;;84260:7:0;84282:10;84307;80547:3;84375:5;84395:7;84417:23;;84231:220;;;;;-1:-1:-1;;;84231:220:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;84231:220:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;84231:220:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;84231:220:0;;;;;;;;;84209:242;;84492:10;84464:5;:18;84470:11;-1:-1:-1;;;;;84464:18:0;-1:-1:-1;;;;;84464:18:0;;;;;;;;;;;;:25;;;:38;;;;;-1:-1:-1;;;;;84464:38:0;;;;;-1:-1:-1;;;;;84464:38:0;;;;;;84544:21;84513:5;:18;84519:11;-1:-1:-1;;;;;84513:18:0;-1:-1:-1;;;;;84513:18:0;;;;;;;;;;;;:28;;;:52;;;;;-1:-1:-1;;;;;84513:52:0;;;;;-1:-1:-1;;;;;84513:52:0;;;;;;84615:28;84576:5;:18;84582:11;-1:-1:-1;;;;;84576:18:0;-1:-1:-1;;;;;84576:18:0;;;;;;;;;;;;:36;;:67;;;;84694:1;84654:5;:18;84660:11;-1:-1:-1;;;;;84654:18:0;-1:-1:-1;;;;;84654:18:0;;;;;;;;;;;;:37;;:41;;;;84807:11;-1:-1:-1;;;;;84713:159:0;84771:21;-1:-1:-1;;;;;84713:159:0;84746:10;-1:-1:-1;;;;;84713:159:0;;84833:28;84713:159;;;;;;;;;;;;;;;83053:1827;;;;;;;;;;;;:::o;80840:26::-;;;;:::o;89093:231::-;89244:12;80346:20;80353:12;80346:6;:20::i;:::-;-1:-1:-1;;;;;80332:34:0;:10;-1:-1:-1;;;;;80332:34:0;;80310:105;;;;-1:-1:-1;;;;;80310:105:0;;;;;;;;;89274:42;;;;;-1:-1:-1;;;;;89274:26:0;;;;;:42;;89301:14;;89274:42;;;;54067:79;54105:7;54132:6;-1:-1:-1;;;;;54132:6:0;54067:79;;:::o;54402:92::-;54442:4;54480:6;-1:-1:-1;;;;;54480:6:0;54466:10;:20;;54402:92::o;58614:409::-;54279:9;:7;:9::i;:::-;54271:18;;;;;;58871:14;;58853:15;:32;58831:139;;;;-1:-1:-1;;;;;58831:139:0;;;;;;;;;58983:14;:32;58614:409::o;97987:325::-;98146:12;80346:20;80353:12;80346:6;:20::i;:::-;-1:-1:-1;;;;;80332:34:0;:10;-1:-1:-1;;;;;80332:34:0;;80310:105;;;;-1:-1:-1;;;;;80310:105:0;;;;;;;;;62511:14;;98186:12;;62511:18;62507:619;;62578:19;62610:8;;62600:19;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;62640:34:0;;;;;;:17;:34;;;;;;;62600:19;;-1:-1:-1;62640:39:0;62636:479;;-1:-1:-1;;;;;62821:34:0;;;;;;:17;:34;;;;;;:49;;62791:158;;;;-1:-1:-1;;;;;62791:158:0;;;;;;;;;-1:-1:-1;;;;;62970:34:0;;63007:1;62970:34;;;:17;:34;;;;;:38;62636:479;;;-1:-1:-1;;;;;63051:34:0;;;;;;:17;:34;;;;;:48;;;62636:479;62507:619;;57236:14;;57232:76;;98241:63;;;;;-1:-1:-1;;;;;98241:46:0;;;;;:63;;98288:15;;;;98241:63;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;98241:63:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;98241:63:0;;;;57290:7;;57232:76;57489:19;57570:8;;57535:58;;;;;;;;;;;;;;-1:-1:-1;;26:21;;;22:32;6:49;;57535:58:0;;;57511:93;;49:4:-1;57511:93:0;;;;57617:24;57644:31;;;:18;:31;;;;;;57511:93;;-1:-1:-1;57775:21:0;57771:244;;57813:31;;;;:18;:31;;;;;;;57847:15;57813:49;;;;57884:96;;;;;;57832:11;;57847:15;57884:96;;;;;;;;;;57997:7;;;;57771:244;58089:14;;58068:36;;:16;;:36;:20;:36;:::i;:::-;58049:15;:55;;58027:157;;;;-1:-1:-1;;;;;58027:157:0;;;;;;;;;58268:1;58234:31;;;:18;:31;;;;;;:35;;;;98241:63;;;;-1:-1:-1;;;;;98241:46:0;;;;;:63;;98288:15;;;;98241:63;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;98241:63:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;98241:63:0;;;;63136:1;;;80426;97987:325;;;;:::o;80769:62::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;80769:62:0;;;;;;;;;;;;:::o;87298:988::-;87421:12;80346:20;80353:12;80346:6;:20::i;:::-;-1:-1:-1;;;;;80332:34:0;:10;-1:-1:-1;;;;;80332:34:0;;80310:105;;;;-1:-1:-1;;;;;80310:105:0;;;;;;;;;87554:32;87573:12;87554:18;:32::i;:::-;87532:164;;;;-1:-1:-1;;;;;87532:164:0;;;;;;;;;87817:32;87836:12;87817:18;:32::i;:::-;87798:15;:51;;87776:191;;;;-1:-1:-1;;;;;87776:191:0;;;;;;;;;-1:-1:-1;;;;;88028:28:0;;88078:1;88028:28;;;:5;:28;;;;;:47;;:51;88140:24;88165:25;88042:12;88165:11;:25::i;:::-;88140:51;;;;;-1:-1:-1;;;88140:51:0;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;88140:51:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;;;;;;;88234:28:0;;;88277:1;88234:28;;;:5;:28;;;;;:40;;:44;-1:-1:-1;;87298:988:0:o;80557:39::-;80592:4;80557:39;:::o;80740:22::-;;;-1:-1:-1;;;;;80740:22:0;;:::o;80492:58::-;80547:3;80492:58;:::o;62137:52::-;;;;;;;;;;;;;:::o;74427:134::-;74503:16;74544:9;74537:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;74537:16:0;;;;;;;;;;;;;;;;;;;;;;;74427:134;:::o;72222:26::-;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;72222:26:0;;-1:-1:-1;72222:26:0;:::o;80716:17::-;;;-1:-1:-1;;;;;80716:17:0;;:::o;55174:109::-;54279:9;:7;:9::i;:::-;54271:18;;;;;;55247:28;55266:8;55247:18;:28::i;94769:146::-;-1:-1:-1;;;;;94872:28:0;;;94845:7;94872:28;;;:5;:28;;;;;:35;;;94769:146::o;91368:1449::-;91536:40;91561:14;91536:24;:40::i;:::-;91664:30;91697:31;91715:12;91697:17;:31::i;:::-;91664:64;;80648:4;91763:22;:44;:84;;;;;80648:4;91811:14;:36;91763:84;91761:87;:157;;;;-1:-1:-1;91867:27:0;;:50;;;;-1:-1:-1;91898:19:0;;91867:50;91865:53;91761:157;91739:272;;;;-1:-1:-1;;;;;91739:272:0;;;;;;;;;92092:30;92125:12;-1:-1:-1;;;;;92125:35:0;;:37;;;;;-1:-1:-1;;;92125:37:0;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;92125:37:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;92125:37:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;92125:37:0;;;;;;;;;92092:70;;92173:25;92201:12;-1:-1:-1;;;;;92201:30:0;;:32;;;;;-1:-1:-1;;;92201:32:0;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;92201:32:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;92201:32:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;92201:32:0;;;;;;;;;92173:60;-1:-1:-1;92285:45:0;:22;92173:60;92285:45;:26;:45;:::i;:::-;92266:15;:64;;92244:191;;;;-1:-1:-1;;;;;92244:191:0;;;;;;;;;92678:32;92645:12;-1:-1:-1;;;;;92645:27:0;;:29;;;;;-1:-1:-1;;;92645:29:0;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;92645:29:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;92645:29:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;92645:29:0;;;;;;;;;:65;;;;;;;;;92623:186;;;;-1:-1:-1;;;;;92623:186:0;;;;;;;;94600:161;-1:-1:-1;;;;;94715:28:0;;;94679:16;94715:28;;;:5;:28;;;;;:38;;;;;94600:161::o;94923:168::-;-1:-1:-1;;;;;95037:28:0;95010:7;95037:28;;;:5;:28;;;;;:46;;;;94923:168::o;52876:150::-;52934:7;52966:5;;;52990:6;;;;52982:15;;;;;;53017:1;52876:150;-1:-1:-1;;;52876:150:0:o;93640:281::-;93787:11;;93774:9;:24;;93752:161;;;;-1:-1:-1;;;;;93752:161:0;;;;;;;;69793:332;69890:16;69925:13;69940:9;69953:13;69961:1;69964;69953:7;:13::i;:::-;69924:42;;;;69982:4;69977:141;;70003:8;;;69977:141;70045:19;70069:13;70073:1;70076:5;70069:3;:13::i;:::-;-1:-1:-1;70044:38:0;-1:-1:-1;70097:9:0;;-1:-1:-1;;;70097:9:0;63573:443;-1:-1:-1;;;;;63742:34:0;;;;;;:17;:34;;;;;;:50;;63720:151;;;;-1:-1:-1;;;;;63720:151:0;;;;;;;;;63884:73;63944:12;63884:59;:73::i;:::-;-1:-1:-1;;;;;;63970:34:0;64007:1;63970:34;;;:17;:34;;;;;:38;63573:443::o;90425:537::-;90658:54;90683:28;90658:24;:54::i;:::-;90725:47;90748:23;90725:22;:47::i;:::-;-1:-1:-1;;;;;90807:41:0;;;;;;:9;:41;;;;;;;;90785:169;;;;-1:-1:-1;;;;;90785:169:0;;;;;;;;51629:433;51687:7;51931:6;51927:47;;-1:-1:-1;51961:1:0;51954:8;;51927:47;51998:5;;;52002:1;51998;:5;:1;52022:5;;;;;:10;52014:19;;;;;52197:303;52255:7;52354:1;52350;:5;52342:14;;;;;;52367:9;52383:1;52379;:5;;;;;;;52197:303;-1:-1:-1;;;;52197:303:0:o;95099:170::-;-1:-1:-1;;;;;95214:28:0;95187:7;95214:28;;;:5;:28;;;;;:47;;;;95099:170::o;95277:156::-;-1:-1:-1;;;;;95385:28:0;95358:7;95385:28;;;:5;:28;;;;;:40;;;;95277:156::o;55433:187::-;-1:-1:-1;;;;;55507:22:0;;55499:31;;;;;;55567:6;;;55546:38;;-1:-1:-1;;;;;55546:38:0;;;;55567:6;;;55546:38;;;55595:6;:17;;-1:-1:-1;;;;;;55595:17:0;-1:-1:-1;;;;;55595:17:0;;;;;;;;;;55433:187::o;93056:386::-;80648:4;93197:11;:33;;93175:122;;;;-1:-1:-1;;;;;93175:122:0;;;;;;;;;93332:28;:11;80592:4;93332:28;:15;:28;:::i;:::-;:33;93310:124;;;;-1:-1:-1;;;;;93310:124:0;;;;;;;;64617:297;64731:8;;64688:7;;;;;64750:129;64774:6;64770:1;:10;64750:129;;;64814:1;-1:-1:-1;;;;;64806:9:0;:1;64808;64806:4;;;;;;;;;;;;;;-1:-1:-1;;;;;64806:9:0;;64802:66;;;64844:1;-1:-1:-1;64847:4:0;;-1:-1:-1;64836:16:0;;-1:-1:-1;64836:16:0;64802:66;64782:3;;64750:129;;;-1:-1:-1;64897:1:0;;-1:-1:-1;64897:1:0;;-1:-1:-1;;64617:297:0;;;;;;:::o;69242:487::-;69340:16;69358:7;69383:14;69400:1;:8;69383:25;;69419:29;69474:1;69465:6;:10;69451:25;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;136:17;;-1:-1;69451:25:0;-1:-1:-1;69419:57:0;-1:-1:-1;69492:9:0;69487:85;69511:5;69507:1;:9;69487:85;;;69556:1;69558;69556:4;;;;;;;;;;;;;;69538:12;69551:1;69538:15;;;;;;;;-1:-1:-1;;;;;69538:22:0;;;:15;;;;;;;;;;;:22;69518:3;;69487:85;;;-1:-1:-1;69607:1:0;69599:9;;69582:98;69614:6;69610:1;:10;69582:98;;;69664:1;69666;69664:4;;;;;;;;;;;;;;69642:12;69659:1;69655;:5;69642:19;;;;;;;;-1:-1:-1;;;;;69642:26:0;;;:19;;;;;;;;;;;:26;69622:3;;69582:98;;;;69698:12;69712:1;69714:5;69712:8;;;;;;;;;;;;;;69690:31;;;;;;69242:487;;;;;:::o;60604:447::-;60739:32;;;;:18;:32;;;;;;60717:161;;;;-1:-1:-1;;;;;60717:161:0;;;;;;;;;60963:1;60928:32;;;:18;:32;;;;;;:36;;;60982:61;60947:12;;60982:61;;;60604:447;:::o;94147:445::-;94379:2;94350:32;;94344:39;-1:-1:-1;;;;;94446:24:0;;94465:4;94446:24;94424:160;;;;-1:-1:-1;;;;;94424:160:0;;;;;;;;;94147:445;;:::o;53187:124::-;53245:7;53273:6;53265:15;;;;;;53302:1;53298;:5;;;;;;;53187:124;-1:-1:-1;;;53187:124:0:o;96440:2459::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;96440:2459:0;-1:-1:-1;;;;;96440:2459:0;;;;;;;;;;;-1:-1:-1;96440:2459:0;;;;;;;-1:-1:-1;96440:2459:0;;;-1:-1:-1;96440:2459:0;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;-1:-1:-1;;;;;;96440:2459:0;;;;;;;5:118:-1;;72:46;110:6;97:20;72:46;;130:122;;208:39;239:6;233:13;208:39;;277:352;;;407:3;400:4;392:6;388:17;384:27;374:2;;425:1;422;415:12;374:2;-1:-1;445:20;;485:18;474:30;;471:2;;;517:1;514;507:12;471:2;551:4;543:6;539:17;527:29;;602:3;594:4;586:6;582:17;572:8;568:32;565:41;562:2;;;619:1;616;609:12;637:118;;704:46;742:6;729:20;704:46;;776:335;;;890:3;883:4;875:6;871:17;867:27;857:2;;908:1;905;898:12;857:2;-1:-1;928:20;;968:18;957:30;;954:2;;;1000:1;997;990:12;954:2;1034:4;1026:6;1022:17;1010:29;;1084:3;1077;1069:6;1065:16;1055:8;1051:31;1048:40;1045:2;;;1101:1;1098;1091:12;1119:156;;1205:65;1262:6;1249:20;1205:65;;1467:156;;1562:56;1610:6;1604:13;1562:56;;1805:140;;1892:48;1932:6;1926:13;1892:48;;2077:122;;2155:39;2186:6;2180:13;2155:39;;2206:241;;2310:2;2298:9;2289:7;2285:23;2281:32;2278:2;;;2326:1;2323;2316:12;2278:2;2361:1;2378:53;2423:7;2403:9;2378:53;;;2368:63;2272:175;-1:-1;;;;2272:175;2454:263;;2569:2;2557:9;2548:7;2544:23;2540:32;2537:2;;;2585:1;2582;2575:12;2537:2;2620:1;2637:64;2693:7;2673:9;2637:64;;2724:366;;;2845:2;2833:9;2824:7;2820:23;2816:32;2813:2;;;2861:1;2858;2851:12;2813:2;2896:1;2913:53;2958:7;2938:9;2913:53;;;2903:63;;2875:97;3003:2;3021:53;3066:7;3057:6;3046:9;3042:22;3021:53;;;3011:63;;2982:98;2807:283;;;;;;3097:490;;;;3237:2;3225:9;3216:7;3212:23;3208:32;3205:2;;;3253:1;3250;3243:12;3205:2;3288:1;3305:53;3350:7;3330:9;3305:53;;;3295:63;;3267:97;3423:2;3412:9;3408:18;3395:32;3447:18;3439:6;3436:30;3433:2;;;3479:1;3476;3469:12;3433:2;3507:64;3563:7;3554:6;3543:9;3539:22;3507:64;;;3497:74;;;;3374:203;3199:388;;;;;;3594:397;;;3733:2;3721:9;3712:7;3708:23;3704:32;3701:2;;;3749:1;3746;3739:12;3701:2;3784:31;;3835:18;3824:30;;3821:2;;;3867:1;3864;3857:12;3821:2;3895:80;3967:7;3958:6;3947:9;3943:22;3895:80;;;3885:90;;;;3763:218;3695:296;;;;;;3998:241;;4102:2;4090:9;4081:7;4077:23;4073:32;4070:2;;;4118:1;4115;4108:12;4070:2;4153:1;4170:53;4215:7;4195:9;4170:53;;4246:301;;4380:2;4368:9;4359:7;4355:23;4351:32;4348:2;;;4396:1;4393;4386:12;4348:2;4431:1;4448:83;4523:7;4503:9;4448:83;;4554:426;;;4705:2;4693:9;4684:7;4680:23;4676:32;4673:2;;;4721:1;4718;4711:12;4673:2;4756:1;4773:83;4848:7;4828:9;4773:83;;;4763:93;;4735:127;4893:2;4911:53;4956:7;4947:6;4936:9;4932:22;4911:53;;4987:464;;;5157:2;5145:9;5136:7;5132:23;5128:32;5125:2;;;5173:1;5170;5163:12;5125:2;5208:1;5225:83;5300:7;5280:9;5225:83;;;5215:93;;5187:127;5345:2;5363:72;5427:7;5418:6;5407:9;5403:22;5363:72;;5458:426;;;5609:2;5597:9;5588:7;5584:23;5580:32;5577:2;;;5625:1;5622;5615:12;5577:2;5660:1;5677:83;5752:7;5732:9;5677:83;;5891:675;;;;;6078:2;6066:9;6057:7;6053:23;6049:32;6046:2;;;6094:1;6091;6084:12;6046:2;6129:1;6146:83;6221:7;6201:9;6146:83;;;6136:93;;6108:127;6266:2;6284:53;6329:7;6320:6;6309:9;6305:22;6284:53;;;6274:63;;6245:98;6402:2;6391:9;6387:18;6374:32;6426:18;6418:6;6415:30;6412:2;;;6458:1;6455;6448:12;6412:2;6486:64;6542:7;6533:6;6522:9;6518:22;6486:64;;;6040:526;;;;-1:-1;6476:74;-1:-1;;;;6040:526;6573:297;;6705:2;6693:9;6684:7;6680:23;6676:32;6673:2;;;6721:1;6718;6711:12;6673:2;6756:1;6773:81;6846:7;6826:9;6773:81;;6877:1043;;;;;;;;7110:3;7098:9;7089:7;7085:23;7081:33;7078:2;;;7127:1;7124;7117:12;7078:2;7162:1;7179:78;7249:7;7229:9;7179:78;;;7169:88;;7141:122;7294:2;7312:53;7357:7;7348:6;7337:9;7333:22;7312:53;;;7302:63;;7273:98;7402:2;7420:53;7465:7;7456:6;7445:9;7441:22;7420:53;;;7410:63;;7381:98;7510:2;7528:53;7573:7;7564:6;7553:9;7549:22;7528:53;;;7518:63;;7489:98;7618:3;7637:53;7682:7;7673:6;7662:9;7658:22;7637:53;;;7627:63;;7597:99;7755:3;7744:9;7740:19;7727:33;7780:18;7772:6;7769:30;7766:2;;;7812:1;7809;7802:12;7766:2;7840:64;7896:7;7887:6;7876:9;7872:22;7840:64;;;7830:74;;;;7706:204;7072:848;;;;;;;;;;;7927:281;;8051:2;8039:9;8030:7;8026:23;8022:32;8019:2;;;8067:1;8064;8057:12;8019:2;8102:1;8119:73;8184:7;8164:9;8119:73;;8463:263;;8578:2;8566:9;8557:7;8553:23;8549:32;8546:2;;;8594:1;8591;8584:12;8546:2;8629:1;8646:64;8702:7;8682:9;8646:64;;8734:173;;8821:46;8863:3;8855:6;8821:46;;;-1:-1;;8896:4;8887:14;;8814:93;8916:173;;9003:46;9045:3;9037:6;9003:46;;9097:110;9170:31;9195:5;9170:31;;;9165:3;9158:44;9152:55;;;9372:621;;9517:54;9565:5;9517:54;;;9584:86;9663:6;9658:3;9584:86;;;9577:93;;9690:56;9740:5;9690:56;;;9767:1;9752:219;9777:6;9774:1;9771:13;9752:219;;;9824:63;9883:3;9874:6;9868:13;9824:63;;;9817:70;;9904:60;9957:6;9904:60;;;9894:70;-1:-1;9799:1;9792:9;9752:219;;;-1:-1;9984:3;;9496:497;-1:-1;;;;9496:497;10032:621;;10177:54;10225:5;10177:54;;;10244:86;10323:6;10318:3;10244:86;;;10237:93;;10350:56;10400:5;10350:56;;;10427:1;10412:219;10437:6;10434:1;10431:13;10412:219;;;10484:63;10543:3;10534:6;10528:13;10484:63;;;10477:70;;10564:60;10617:6;10564:60;;;10554:70;-1:-1;10459:1;10452:9;10412:219;;10661:111;10738:28;10760:5;10738:28;;10779:120;10862:31;10887:5;10862:31;;10927:287;;11040:70;11103:6;11098:3;11040:70;;;11033:77;;11115:43;11151:6;11146:3;11139:5;11115:43;;;11179:29;11201:6;11179:29;;;11170:39;;;;11027:187;-1:-1;;;11027:187;11242:300;;11373:88;11454:6;11449:3;11373:88;;;11366:95;;11466:43;11502:6;11497:3;11490:5;11466:43;;;-1:-1;;11521:16;;11360:182;11549:152;11645:50;11689:5;11645:50;;12230:566;;12390:67;12454:2;12449:3;12390:67;;;12490:66;12470:87;;12591:66;12586:2;12577:12;;12570:88;12692:66;12687:2;12678:12;;12671:88;12787:2;12778:12;;12376:420;-1:-1;;12376:420;12805:465;;12965:67;13029:2;13024:3;12965:67;;;13065:66;13045:87;;13166:66;13161:2;13152:12;;13145:88;13261:2;13252:12;;12951:319;-1:-1;;12951:319;13279:566;;13439:67;13503:2;13498:3;13439:67;;;13539:66;13519:87;;13640:66;13635:2;13626:12;;13619:88;13741:66;13736:2;13727:12;;13720:88;13836:2;13827:12;;13425:420;-1:-1;;13425:420;13854:465;;14014:67;14078:2;14073:3;14014:67;;;14114:66;14094:87;;14215:66;14210:2;14201:12;;14194:88;14310:2;14301:12;;14000:319;-1:-1;;14000:319;14328:566;;14488:67;14552:2;14547:3;14488:67;;;14588:66;14568:87;;14689:66;14684:2;14675:12;;14668:88;14790:66;14785:2;14776:12;;14769:88;14885:2;14876:12;;14474:420;-1:-1;;14474:420;14903:566;;15063:67;15127:2;15122:3;15063:67;;;15163:66;15143:87;;15264:66;15259:2;15250:12;;15243:88;15365:66;15360:2;15351:12;;15344:88;15460:2;15451:12;;15049:420;-1:-1;;15049:420;15478:465;;15638:67;15702:2;15697:3;15638:67;;;15738:66;15718:87;;15839:66;15834:2;15825:12;;15818:88;15934:2;15925:12;;15624:319;-1:-1;;15624:319;15952:566;;16112:67;16176:2;16171:3;16112:67;;;16212:66;16192:87;;16313:66;16308:2;16299:12;;16292:88;16414:66;16409:2;16400:12;;16393:88;16509:2;16500:12;;16098:420;-1:-1;;16098:420;16527:566;;16687:67;16751:2;16746:3;16687:67;;;16787:66;16767:87;;16888:66;16883:2;16874:12;;16867:88;16989:66;16984:2;16975:12;;16968:88;17084:2;17075:12;;16673:420;-1:-1;;16673:420;17102:566;;17262:67;17326:2;17321:3;17262:67;;;17362:66;17342:87;;17463:66;17458:2;17449:12;;17442:88;17564:66;17559:2;17550:12;;17543:88;17659:2;17650:12;;17248:420;-1:-1;;17248:420;17677:465;;17837:67;17901:2;17896:3;17837:67;;;17937:66;17917:87;;18038:66;18033:2;18024:12;;18017:88;18133:2;18124:12;;17823:319;-1:-1;;17823:319;18151:465;;18311:67;18375:2;18370:3;18311:67;;;18411:66;18391:87;;18512:66;18507:2;18498:12;;18491:88;18607:2;18598:12;;18297:319;-1:-1;;18297:319;18625:566;;18785:67;18849:2;18844:3;18785:67;;;18885:66;18865:87;;18986:66;18981:2;18972:12;;18965:88;19087:66;19082:2;19073:12;;19066:88;19182:2;19173:12;;18771:420;-1:-1;;18771:420;19200:465;;19360:67;19424:2;19419:3;19360:67;;;19460:66;19440:87;;19561:66;19556:2;19547:12;;19540:88;19656:2;19647:12;;19346:319;-1:-1;;19346:319;19674:566;;19834:67;19898:2;19893:3;19834:67;;;19934:66;19914:87;;20035:66;20030:2;20021:12;;20014:88;20136:66;20131:2;20122:12;;20115:88;20231:2;20222:12;;19820:420;-1:-1;;19820:420;20249:465;;20409:67;20473:2;20468:3;20409:67;;;20509:66;20489:87;;20610:66;20605:2;20596:12;;20589:88;20705:2;20696:12;;20395:319;-1:-1;;20395:319;20723:465;;20883:67;20947:2;20942:3;20883:67;;;20983:66;20963:87;;21084:66;21079:2;21070:12;;21063:88;21179:2;21170:12;;20869:319;-1:-1;;20869:319;21197:364;;21357:67;21421:2;21416:3;21357:67;;;21457:66;21437:87;;21552:2;21543:12;;21343:218;-1:-1;;21343:218;21813:282;;21967:103;22066:3;22057:6;22049;21967:103;;22102:213;22220:2;22205:18;;22234:71;22209:9;22278:6;22234:71;;22322:1283;22736:3;22721:19;;22751:71;22725:9;22795:6;22751:71;;;22870:9;22864:4;22860:20;22855:2;22844:9;22840:18;22833:48;22895:108;22998:4;22989:6;22895:108;;;22887:116;;23051:9;23045:4;23041:20;23036:2;23025:9;23021:18;23014:48;23076:108;23179:4;23170:6;23076:108;;;23068:116;;23195:72;23263:2;23252:9;23248:18;23239:6;23195:72;;;23278:73;23346:3;23335:9;23331:19;23322:6;23278:73;;;23362;23430:3;23419:9;23415:19;23406:6;23362:73;;;23484:9;23478:4;23474:20;23468:3;23457:9;23453:19;23446:49;23509:86;23590:4;23581:6;23573;23509:86;;;23501:94;22707:898;-1:-1;;;;;;;;;;22707:898;23612:428;23786:2;23771:18;;23800:71;23775:9;23844:6;23800:71;;;23919:9;23913:4;23909:20;23904:2;23893:9;23889:18;23882:48;23944:86;24025:4;24016:6;24008;23944:86;;;23936:94;23757:283;-1:-1;;;;;23757:283;24047:709;24302:3;24287:19;;24317:71;24291:9;24361:6;24317:71;;;24399:97;24492:2;24481:9;24477:18;24468:6;24399:97;;;24507:72;24575:2;24564:9;24560:18;24551:6;24507:72;;;24590;24658:2;24647:9;24643:18;24634:6;24590:72;;;24673:73;24741:3;24730:9;24726:19;24717:6;24673:73;;;24273:483;;;;;;;;;24763:361;24931:2;24945:47;;;24916:18;;25006:108;24916:18;25100:6;25006:108;;25131:201;25243:2;25228:18;;25257:65;25232:9;25295:6;25257:65;;25339:213;25457:2;25442:18;;25471:71;25446:9;25515:6;25471:71;;25559:324;25705:2;25690:18;;25719:71;25694:9;25763:6;25719:71;;;25801:72;25869:2;25858:9;25854:18;25845:6;25801:72;;25890:317;26036:2;26050:47;;;26021:18;;26111:86;26021:18;26183:6;26175;26111:86;;26214:239;26345:2;26330:18;;26359:84;26334:9;26416:6;26359:84;;26972:407;27163:2;27177:47;;;27148:18;;27238:131;27148:18;27238:131;;27386:407;27577:2;27591:47;;;27562:18;;27652:131;27562:18;27652:131;;27800:407;27991:2;28005:47;;;27976:18;;28066:131;27976:18;28066:131;;28214:407;28405:2;28419:47;;;28390:18;;28480:131;28390:18;28480:131;;28628:407;28819:2;28833:47;;;28804:18;;28894:131;28804:18;28894:131;;29042:407;29233:2;29247:47;;;29218:18;;29308:131;29218:18;29308:131;;29456:407;29647:2;29661:47;;;29632:18;;29722:131;29632:18;29722:131;;29870:407;30061:2;30075:47;;;30046:18;;30136:131;30046:18;30136:131;;30284:407;30475:2;30489:47;;;30460:18;;30550:131;30460:18;30550:131;;30698:407;30889:2;30903:47;;;30874:18;;30964:131;30874:18;30964:131;;31112:407;31303:2;31317:47;;;31288:18;;31378:131;31288:18;31378:131;;31526:407;31717:2;31731:47;;;31702:18;;31792:131;31702:18;31792:131;;31940:407;32131:2;32145:47;;;32116:18;;32206:131;32116:18;32206:131;;32354:407;32545:2;32559:47;;;32530:18;;32620:131;32530:18;32620:131;;32768:407;32959:2;32973:47;;;32944:18;;33034:131;32944:18;33034:131;;33182:407;33373:2;33387:47;;;33358:18;;33448:131;33358:18;33448:131;;33596:407;33787:2;33801:47;;;33772:18;;33862:131;33772:18;33862:131;;34010:407;34201:2;34215:47;;;34186:18;;34276:131;34186:18;34276:131;;34977:121;35086:4;35074:17;;35055:43;35239:107;35329:12;;35313:33;35730:178;35848:19;;;35897:4;35888:14;;35841:67;36275:144;36410:3;36388:31;-1:-1;36388:31;36599:105;;36668:31;36693:5;36668:31;;36711:92;36784:13;36777:21;;36760:43;36896:128;-1:-1;;;;;36965:54;;36948:76;37315:124;;37403:31;37428:5;37403:31;;37854:129;;37941:1;37934:5;37931:12;37921:2;;37957:1;37954;37947:12;39434:145;39515:6;39510:3;39505;39492:30;-1:-1;39571:1;39553:16;;39546:27;39485:94;39587:97;39675:2;39655:14;-1:-1;;39651:28;;39635:49

Swarm Source

bzzr://9dc195d6120b429ab518ac1d5b0a37b335f3d8e90b855aa26273452d7237fec2

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.