ETH Price: $1,984.08 (-4.80%)

Contract

0x9dA7923224ed433C8F1047EB8ECa80CCe98DEBfc
 

Overview

ETH Balance

0.096573353518 ETH

Eth Value

$191.61 (@ $1,984.08/ETH)

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Claim And Refund187677262023-12-12 4:28:47815 days ago1702355327IN
0x9dA79232...Ce98DEBfc
0 ETH0.0017690526.42119601
Claim And Refund187510892023-12-09 20:37:11818 days ago1702154231IN
0x9dA79232...Ce98DEBfc
0 ETH0.0018619627.80871567
Claim And Refund187429472023-12-08 17:11:23819 days ago1702055483IN
0x9dA79232...Ce98DEBfc
0 ETH0.0038904758.10494636
Claim And Refund187416322023-12-08 12:46:47819 days ago1702039607IN
0x9dA79232...Ce98DEBfc
0 ETH0.0025439337.99410206
Claim And Refund187416212023-12-08 12:44:35819 days ago1702039475IN
0x9dA79232...Ce98DEBfc
0 ETH0.0027081240.446267
Claim And Refund187406042023-12-08 9:19:59819 days ago1702027199IN
0x9dA79232...Ce98DEBfc
0 ETH0.0161426231.71632114
Claim And Refund187357132023-12-07 16:50:35820 days ago1701967835IN
0x9dA79232...Ce98DEBfc
0 ETH0.0040729560.83037708
Claim And Refund187356782023-12-07 16:43:35820 days ago1701967415IN
0x9dA79232...Ce98DEBfc
0 ETH0.0043553165.0474444
Claim And Refund187356612023-12-07 16:40:11820 days ago1701967211IN
0x9dA79232...Ce98DEBfc
0 ETH0.0046696769.74249556
Claim And Refund187356322023-12-07 16:34:23820 days ago1701966863IN
0x9dA79232...Ce98DEBfc
0 ETH0.0053207779.46676603
Claim And Refund187355362023-12-07 16:14:59820 days ago1701965699IN
0x9dA79232...Ce98DEBfc
0 ETH0.0605271784.87049903
Claim And Refund187334292023-12-07 9:09:35820 days ago1701940175IN
0x9dA79232...Ce98DEBfc
0 ETH0.0025117837.51399073
Claim And Refund187334182023-12-07 9:07:23820 days ago1701940043IN
0x9dA79232...Ce98DEBfc
0 ETH0.0026712339.89534158
Claim And Refund187329762023-12-07 7:37:59820 days ago1701934679IN
0x9dA79232...Ce98DEBfc
0 ETH0.001562931.34832412
Update Internal ...187329682023-12-07 7:36:23820 days ago1701934583IN
0x9dA79232...Ce98DEBfc
0 ETH0.0113141434.47248846
Deposit To Fyde187329572023-12-07 7:34:11820 days ago1701934451IN
0x9dA79232...Ce98DEBfc
0.075 ETH0.0055028733.08366927
Deposit To Fyde187329492023-12-07 7:32:35820 days ago1701934355IN
0x9dA79232...Ce98DEBfc
0.15 ETH0.0345033935.67160705
Deposit To Fyde187328812023-12-07 7:18:35820 days ago1701933515IN
0x9dA79232...Ce98DEBfc
0.075 ETH0.0173535834.17896764
Deposit To Fyde187328762023-12-07 7:17:35820 days ago1701933455IN
0x9dA79232...Ce98DEBfc
0.075 ETH0.0164946434.45774892
Deposit To Fyde187328612023-12-07 7:14:35820 days ago1701933275IN
0x9dA79232...Ce98DEBfc
0.075 ETH0.0343893540.68860294
Deposit187133882023-12-04 13:46:23823 days ago1701697583IN
0x9dA79232...Ce98DEBfc
0 ETH0.0033245246.15602703
Deposit187133192023-12-04 13:32:23823 days ago1701696743IN
0x9dA79232...Ce98DEBfc
0 ETH0.0024464344.52921018
Deposit187131332023-12-04 12:55:11823 days ago1701694511IN
0x9dA79232...Ce98DEBfc
0 ETH0.0030473242.30039061
Deposit187121732023-12-04 9:41:47823 days ago1701682907IN
0x9dA79232...Ce98DEBfc
0 ETH0.0031460136.43918297
Deposit186938292023-12-01 20:04:47826 days ago1701461087IN
0x9dA79232...Ce98DEBfc
0 ETH0.0042860347.02901652
View all transactions

Latest 5 internal transactions

Advanced mode:
Parent Transaction Hash Method Block
From
To
Request Deposit187329492023-12-07 7:32:35820 days ago1701934355
0x9dA79232...Ce98DEBfc
0.06864685 ETH
Request Deposit187329492023-12-07 7:32:35820 days ago1701934355
0x9dA79232...Ce98DEBfc
0.06864685 ETH
Request Deposit187328812023-12-07 7:18:35820 days ago1701933515
0x9dA79232...Ce98DEBfc
0.07204431 ETH
Request Deposit187328762023-12-07 7:17:35820 days ago1701933455
0x9dA79232...Ce98DEBfc
0.07204431 ETH
Request Deposit187328612023-12-07 7:14:35820 days ago1701933275
0x9dA79232...Ce98DEBfc
0.07204431 ETH
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PooledDepositEscrow

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.19;

// Structs
import {UserRequest} from "./core/Structs.sol";

/// Utils /////
import {BaseChecker} from "./utils/BaseChecker.sol";
import {Ownable} from "./utils/Ownable.sol";

//Interfaces
import {IERC20} from "openzeppelin-contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "openzeppelin-contracts/token/ERC20/utils/SafeERC20.sol";
import {IFyde} from "./interfaces/IFyde.sol";
import {IGovernanceModule} from "./interfaces/IGovernanceModule.sol";
import {IOracle} from "./interfaces/IOracle.sol";
import {IRelayer} from "./interfaces/IRelayer.sol";

///@title PooledDepositEscrow
///@notice The purpose of this contract is to pool assets from different users to be deposited into
/// fyde at
/// once in order to bootstrap the pool and/or save deposit taxes.
///@dev Following flow -> owner deploys Escrow with whitelisted assets/govAssets -> owner whitelists
/// users -> user deposit assets with/without governance -> escrow period is over and deposits are
/// disabled, start of freeze period -> owner decides how much of the deposited assets they want to
/// keep (setConcentrations) -> freeze period ends -> depositToFyde() requestDeposits on the relayer
/// to transfer funds into fyde (works in batches of 5 assets, has to be called multiple times due
/// to gas limitations) -> wait until fyde has processed transactions -> updateInternalAccounting
/// gets the correct TRSY price after calculated by gelato -> user claim assets, gets TRSY sTRSY and
/// refunds (can claim whenever they want)
/// REVOKE: If owner decides that something is wrong after escrow period, can revoke. Users can then
/// get 100% of deposits refunded
contract PooledDepositEscrow is Ownable, BaseChecker {
  using SafeERC20 for IERC20;

  error CannotClaimForAsset(address);
  error EscrowPeriodEnded();
  error InvalidTimePeriod();
  error InsufficientBalance(address);
  error OnlyDuringFreeze();
  error FydeDepositCompleted();
  error FydeDepositNotCompleted();
  error Revoked();
  error NotRevoked();
  error NotSupportedAsset(address);
  error InternalAccountingNotUpdated();
  error DepositsMightStillBeProcessed();
  error ConcentrationsNotSet();
  error TaxFactorNotZero();
  error PriceNotAvailable(address asset);

  ///@notice Used for precision of division
  uint256 constant SCALING_FACTOR = 1e18;

  ///@notice Max number assets accepted in one request
  uint128 public constant MAX_ASSET_TO_REQUEST = 5;

  ///@notice max gas required for deposit, should correspondent to gov deposit of 5 assets + proxy
  /// creation
  uint128 public constant GAS_TO_FORWARD = 2e6;

  ///@notice timestamp until which users can deposit
  uint128 public immutable ESCROW_PERIOD;

  ///@notice timestamp until owner can set concentrations or revoke
  uint128 public immutable FREEZE_PERIOD;

  ///@notice fyde interface
  IFyde public immutable FYDE;
  ///@notice relayer interface
  IRelayer public immutable RELAYER;
  ///@notice governance module interface
  IGovernanceModule public immutable GOVERNANCE_MODULE;
  ///@notice oracle module interface
  IOracle public immutable ORACLE;

  /// -----------------------------
  ///         Storage
  /// -----------------------------

  // bools used to ensure actions are called in correct order

  ///@notice owner has set concentration
  bool public concentrationsSet;
  ///@notice requested deposit on relayer for all assets
  bool public fydeDepositCompleted;
  ///@notice owner has abborted escrow process
  bool public revoked;
  ///@notice trsy price updated after deposits are processed
  bool public internalAccountingUpdated;
  ///@notice amount of assets deposited to fyde (since done in multiple tx)
  uint256 public assetsTransferred;
  ///@notice measure of expected TRSY when requesting depositing, rescaled to correct value
  uint256 public totalExpectedTrsy;
  ///notice assets allowed for deposit
  address[] public assets;

  ///@dev splits slot into uint128 for std and gov deposit values
  struct Slot {
    uint128 std;
    uint128 gov;
  }

  ///@notice user authorization, can use deposit
  mapping(address => bool) public isUser;

  ///@notice is asset allowed in escrow
  mapping(address => bool) public supportedAssets;
  ///@notice is asset allowed in governance
  mapping(address => bool) public keepGovAllowed;
  ///@notice total token balance in escrow
  mapping(address => Slot) public totalBalance;
  ///@notice amount of token to be deposited into fyde (chosen by escrow owner)
  mapping(address => Slot) public concentrationAmounts;
  ///@notice token amount accepted for fyde / amount deposited into escrow
  mapping(address => Slot) public finalPercentages;
  ///@notice TRSY received for each asset
  mapping(address => Slot) public TRSYBalancesPerAsset;
  ///@notice escrow deposits per user and asset;
  mapping(address => mapping(address => Slot)) public deposits;

  /// -----------------------------
  ///         Events
  /// -----------------------------

  event AssetDeposited(address indexed account, address indexed asset, uint256 amount);
  event ClaimedAndRefunded(address indexed account);
  event ConcentrationAmountsSet(uint128[] amounts, uint128[] govAmounts);
  event FydeDeposit();
  event Refunded(address indexed account, address indexed asset, uint256 refund);
  event EscrowRevoked();
  event InternalAccountingUpdated();

  ///@notice Deploys escrow and sets the assets for deposit and the timing for the scrow.
  ///@param _assets Addresses of whitelisted assets
  ///@param _keepGovAllowed is asset whitelisted for gov deposit true/false
  ///@param _fyde Address of fyde contract
  ///@param _relayer Address of relayer contract
  ///@param _governanceModule Address of governance Module contract
  ///@param _oracle Address of oracle module contract
  ///@param _escrowPeriod length of escrow period in seconds after depoyment
  ///@param _freezePeriod length of freeze period in seconds after freeze period
  constructor(
    address[] memory _assets,
    bool[] memory _keepGovAllowed,
    address _fyde,
    address _relayer,
    address _governanceModule,
    address _oracle,
    uint128 _escrowPeriod,
    uint128 _freezePeriod
  ) Ownable(msg.sender) {
    if (_assets.length != _keepGovAllowed.length) revert InconsistentLengths();

    FYDE = IFyde(_fyde);
    RELAYER = IRelayer(_relayer);
    GOVERNANCE_MODULE = IGovernanceModule(_governanceModule);
    ORACLE = IOracle(_oracle);

    ESCROW_PERIOD = uint128(block.timestamp) + _escrowPeriod;
    FREEZE_PERIOD = ESCROW_PERIOD + _freezePeriod;

    assets = _assets;

    // Activate supported assets
    for (uint256 i = 0; i < _assets.length; ++i) {
      supportedAssets[_assets[i]] = true;
      if (_keepGovAllowed[i]) keepGovAllowed[_assets[i]] = true;
    }
  }

  ///@notice Adds users to whitelist of allwoed depositors
  ///@param _user addresses to whitelist
  function addUser(address[] calldata _user) external onlyOwner {
    for (uint256 i; i < _user.length; ++i) {
      isUser[_user[i]] = true;
    }
  }

  ///@notice Removes users from whitelist
  ///@param _user addresses to remove from
  function removeUser(address[] calldata _user) external onlyOwner {
    for (uint256 i; i < _user.length; ++i) {
      isUser[_user[i]] = false;
    }
  }

  ///@notice Deposits asset into escrow
  ///@param asset Asset to deposit
  ///@param amount Amount to deposit
  ///@param keepGovRights standard or governance deposit
  function deposit(address asset, uint128 amount, bool keepGovRights) external onlyUser {
    if (amount == 0) revert ZeroParameter();
    if (uint128(block.timestamp) > ESCROW_PERIOD) revert EscrowPeriodEnded();
    if ((keepGovRights && !keepGovAllowed[asset]) || !supportedAssets[asset]) {
      revert NotSupportedAsset(asset);
    }
    IERC20(asset).safeTransferFrom(msg.sender, address(this), amount);
    if (keepGovRights) {
      deposits[msg.sender][asset].gov += amount;
      totalBalance[asset].gov += amount;
    } else {
      deposits[msg.sender][asset].std += amount;
      totalBalance[asset].std += amount;
    }

    emit AssetDeposited(msg.sender, asset, amount);
  }

  ///@notice Sets amount of tokens to accept into fyde
  ///@param amounts Amount of tokens for standard deposit
  ///@param govAmounts Amount of tokens for governance deposit
  ///@dev inputs have to be of same length and order as storage variable assets
  function setConcentrationAmounts(uint128[] calldata amounts, uint128[] calldata govAmounts)
    external
    onlyOwner
  {
    if (amounts.length != assets.length || govAmounts.length != assets.length) {
      revert InconsistentLengths();
    }
    uint128 time = uint128(block.timestamp);
    if (time < ESCROW_PERIOD || time > FREEZE_PERIOD) revert InvalidTimePeriod();
    for (uint256 i = 0; i < amounts.length; ++i) {
      address asset = assets[i];

      uint128 assetAmount = amounts[i];
      uint128 govAmount = govAmounts[i];

      if (assetAmount == 0 && govAmount == 0) continue;

      uint128 balance = totalBalance[asset].std;
      uint128 govBalance = totalBalance[asset].gov;

      if (assetAmount > balance || govAmount > govBalance) revert InsufficientBalance(asset);

      if (assetAmount != 0) {
        finalPercentages[asset].std =
          uint128(uint256(assetAmount) * SCALING_FACTOR / uint256(balance));
        concentrationAmounts[asset].std = assetAmount;
      }

      if (govAmount != 0) {
        finalPercentages[asset].gov =
          uint128(uint256(govAmount) * SCALING_FACTOR / uint256(govBalance));
        concentrationAmounts[asset].gov = govAmount;
      }
    }
    concentrationsSet = true;
    emit ConcentrationAmountsSet(amounts, govAmounts);
  }

  ///@notice Requests deposit of assets into fyde
  ///@dev due to gas limitations deposits a maximum of 5 assets with and without governance, has to
  /// be called multiple times until all assets are transferred
  function depositToFyde() external payable {
    if (uint128(block.timestamp) <= FREEZE_PERIOD) revert InvalidTimePeriod();
    if (!concentrationsSet) revert ConcentrationsNotSet();
    if (fydeDepositCompleted) revert FydeDepositCompleted();
    if (revoked) revert Revoked();
    (, uint72 taxFactor,,,,) = FYDE.protocolData();
    if (taxFactor != 0) revert TaxFactorNotZero();

    address[] memory assetsList = assets;

    uint256 assetsToTransfer = assetsList.length - assetsTransferred;
    assetsToTransfer =
      assetsToTransfer < MAX_ASSET_TO_REQUEST ? assetsToTransfer : MAX_ASSET_TO_REQUEST;

    uint256 stdRequestLength;
    uint256 govRequestLength;
    for (uint256 i = assetsTransferred; i < assetsTransferred + assetsToTransfer; ++i) {
      if (keepGovAllowed[assetsList[i]] && concentrationAmounts[assetsList[i]].gov != 0) {
        govRequestLength += 1;
      }
      if (concentrationAmounts[assetsList[i]].std != 0) stdRequestLength += 1;
    }

    UserRequest[] memory stdRequest = new UserRequest[](stdRequestLength);
    UserRequest[] memory govRequest = new UserRequest[](govRequestLength);

    uint256 sIdx;
    uint256 gIdx;
    uint256 totalUSDValue;
    for (uint256 i = assetsTransferred; i < assetsTransferred + assetsToTransfer; ++i) {
      uint256 totalAmount = 0;
      if (concentrationAmounts[assetsList[i]].std != 0) {
        // populate request array
        stdRequest[sIdx].asset = assetsList[i];
        stdRequest[sIdx].amount = concentrationAmounts[assetsList[i]].std;
        totalAmount += stdRequest[sIdx].amount;
        // track deposited value
        uint256 usdValue = FYDE.getQuote(stdRequest[sIdx].asset, stdRequest[sIdx].amount);
        if (usdValue == 0) revert PriceNotAvailable(assetsList[i]);
        totalUSDValue += usdValue;
        TRSYBalancesPerAsset[stdRequest[sIdx].asset].std = uint128(usdValue);

        sIdx += 1;
      }

      if (keepGovAllowed[assetsList[i]] && concentrationAmounts[assetsList[i]].gov != 0) {
        govRequest[gIdx].asset = assetsList[i];
        govRequest[gIdx].amount = concentrationAmounts[assetsList[i]].gov;
        totalAmount += govRequest[gIdx].amount;
        gIdx += 1;
      }

      IERC20(assetsList[i]).forceApprove(address(FYDE), totalAmount);
    }

    totalExpectedTrsy += totalUSDValue;

    uint256 ETHToForward = ORACLE.getGweiPrice() * GAS_TO_FORWARD;
    if (stdRequestLength != 0) RELAYER.requestDeposit{value: ETHToForward}(stdRequest, false, 0);
    if (govRequestLength != 0) RELAYER.requestDeposit{value: ETHToForward}(govRequest, true, 0);

    assetsTransferred += assetsToTransfer;
    if (assetsTransferred == assetsList.length) {
      fydeDepositCompleted = true;
      emit FydeDeposit();
    }
  }

  ///@notice Rescale TrsyBalance to be correct. Has to be called after bootstrapLiquidity and before
  /// claiming
  ///@dev At the time of transferring funds into fyde, we dont know the current AUM/TRSY price to
  /// get the amount of trsy we got per asset.
  /// We therefore only store the USD values which are proportional to the correct TRSY balance in
  /// TRSYBalancesPerAsset. After the deposit has been processed,
  /// This function is called to check the actual amount of TRSY minted and rescale the balances
  function updateInternalAccounting() external {
    if (!fydeDepositCompleted) revert FydeDepositNotCompleted();
    // make sure rescale is not called when processing still in progress by checking queue is empty
    if (RELAYER.getNumPendingRequest() != 0) revert DepositsMightStillBeProcessed();

    uint256 actualTrsyBalance = IERC20(address(FYDE)).balanceOf(address(this));

    // SCALING_FACTOR to ensure precision when dividing
    uint256 scalingFactor;
    if (totalExpectedTrsy != 0) {
      scalingFactor = SCALING_FACTOR * actualTrsyBalance / totalExpectedTrsy;
    }

    for (uint256 i; i < assets.length; ++i) {
      address asset = assets[i];
      uint128 rescaledTrsy =
        uint128(uint256(TRSYBalancesPerAsset[asset].std) * scalingFactor / SCALING_FACTOR);
      TRSYBalancesPerAsset[asset].std = rescaledTrsy;
      // for governance we exactly know the balance for each asset - the sTRSY.balanceOf
      if (keepGovAllowed[asset]) {
        TRSYBalancesPerAsset[asset].gov =
          uint128(GOVERNANCE_MODULE.strsyBalance(address(this), asset));
      }
    }

    internalAccountingUpdated = true;
    emit InternalAccountingUpdated();
  }

  ///@notice User claim their TRSY, sTRSY and refund
  ///@param assetsToClaim Assets for which to claim
  function claimAndRefund(address[] calldata assetsToClaim) external {
    if (revoked) revert Revoked();
    if (!fydeDepositCompleted) revert FydeDepositNotCompleted();
    if (!internalAccountingUpdated) revert InternalAccountingNotUpdated();
    uint256 totalClaimedTrsy;
    for (uint256 i; i < assetsToClaim.length; ++i) {
      address asset = assetsToClaim[i];
      uint256 standardDeposit = deposits[msg.sender][asset].std;
      uint256 govDeposit = deposits[msg.sender][asset].gov;
      uint256 totalDeposit = standardDeposit + govDeposit;
      if (totalDeposit == 0) revert CannotClaimForAsset(asset);
      // Update their orginal deposit balance
      uint256 refundAmount = totalDeposit;

      if (standardDeposit > 0) {
        deposits[msg.sender][asset].std = 0;
        uint256 standardFundsUsed =
          standardDeposit * uint256(finalPercentages[asset].std) / SCALING_FACTOR;
        uint256 claimTRSY;
        if (concentrationAmounts[asset].std != 0) {
          claimTRSY = standardFundsUsed * uint256(TRSYBalancesPerAsset[asset].std)
            / uint256(concentrationAmounts[asset].std);
        }
        totalClaimedTrsy += claimTRSY;
        refundAmount -= standardFundsUsed;
      }

      if (govDeposit > 0) {
        deposits[msg.sender][asset].gov = 0;
        uint256 govFundsUsed = govDeposit * uint256(finalPercentages[asset].gov) / SCALING_FACTOR;
        uint256 claimStakedTRSY;
        if (concentrationAmounts[asset].gov != 0) {
          claimStakedTRSY = govFundsUsed * uint256(TRSYBalancesPerAsset[asset].gov)
            / uint256(concentrationAmounts[asset].gov);
        }
        refundAmount -= govFundsUsed;
        IERC20(GOVERNANCE_MODULE.assetToStrsy(asset)).transfer(msg.sender, claimStakedTRSY);
      }
      // Refund user, make sure balance not exceeded in case of rounding error
      if (refundAmount > 0) {
        uint256 escrowBalance = IERC20(asset).balanceOf(address(this));
        refundAmount = escrowBalance > refundAmount ? refundAmount : escrowBalance;
        IERC20(asset).safeTransfer(msg.sender, refundAmount);
      }
    }

    // send all standard TRSY
    IERC20(address(FYDE)).transfer(msg.sender, totalClaimedTrsy);

    emit ClaimedAndRefunded(msg.sender);
  }

  ///@notice User claim their refund if escrow has been revoked
  function refund(address[] calldata assetsToRefund) external {
    if (!revoked) revert NotRevoked();
    for (uint256 i; i < assetsToRefund.length; ++i) {
      address asset = assetsToRefund[i];
      uint256 totalDeposit = deposits[msg.sender][asset].std + deposits[msg.sender][asset].gov;
      deposits[msg.sender][asset].std = 0;
      deposits[msg.sender][asset].gov = 0;
      IERC20(asset).safeTransfer(msg.sender, totalDeposit);
      emit Refunded(msg.sender, asset, totalDeposit);
    }
  }

  ///@notice Abort escrow period and allows user to claim their refund
  function revoke() external onlyOwner {
    uint128 time = uint128(block.timestamp);
    if (time < ESCROW_PERIOD || time > FREEZE_PERIOD) revert OnlyDuringFreeze();
    revoked = true;
    emit EscrowRevoked();
  }

  ///@notice Recovers funds in case something goes wrong
  function returnStuckFunds(address _asset, address _to, uint256 _amount) external onlyOwner {
    IERC20(_asset).safeTransfer(_to, _amount);
  }

  function get_assets() external view returns (address[] memory) {
    return assets;
  }

  ///@notice Returns estimated TRSY for user
  ///@dev Have to be call for front end purpose after updateInternalAccounting
  function getEstimatedTrsy(address _user, address _asset) public view returns (uint256, uint256) {
    Slot memory balance = totalBalance[_asset];
    Slot memory trsy = TRSYBalancesPerAsset[_asset];
    Slot memory dep = deposits[_user][_asset];

    uint256 stdExpTrsy =
      trsy.std != 0 ? uint256(trsy.std) * uint256(dep.std) / (uint256(balance.std)) : 0;
    uint256 govExpTrsy =
      trsy.gov != 0 ? uint256(trsy.gov) * uint256(dep.gov) / (uint256(balance.gov)) : 0;

    return (stdExpTrsy, govExpTrsy);
  }

  ///@dev checks whitelist to allow deposits
  modifier onlyUser() {
    if (!isUser[address(0x0)] && !isUser[msg.sender]) revert Unauthorized();
    _;
  }
}

File 2 of 12 : Structs.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.19;

struct AssetInfo {
  uint72 targetConcentration;
  address uniswapPool;
  int72 incentiveFactor;
  uint8 assetDecimals;
  uint8 quoteTokenDecimals;
  address uniswapQuoteToken;
  bool isSupported;
}

struct ProtocolData {
  ///@notice Protocol AUM in USD
  uint256 aum;
  ///@notice multiplicator for the tax equation, 100% = 100e18
  uint72 taxFactor;
  ///@notice Max deviation allowed between AUM from keeper and registry
  uint16 maxAumDeviationAllowed; // Default val 200 == 2 %
  ///@notice block number where AUM was last updated
  uint48 lastAUMUpdateBlock;
  ///@notice annual fee on AUM, in % per year 100% = 100e18
  uint72 managementFee;
  ///@notice last block.timestamp when fee was collected
  uint48 lastFeeCollectionTime;
}

struct UserRequest {
  address asset;
  uint256 amount;
}

struct RequestData {
  uint32 id;
  address requestor;
  address[] assetIn;
  uint256[] amountIn;
  address[] assetOut;
  uint256[] amountOut;
  bool keepGovRights;
  uint256 slippageChecker;
}

struct RequestQ {
  uint64 start;
  uint64 end;
  mapping(uint64 => RequestData) requestData;
}

struct ProcessParam {
  uint256 targetConc;
  uint256 currentConc;
  uint256 usdValue;
  uint256 taxableAmount;
  uint256 taxInUSD;
  uint256 sharesBeforeTax;
  uint256 sharesAfterTax;
}

struct RebalanceParam {
  address asset;
  uint256 assetTotalAmount;
  uint256 assetProxyAmount;
  uint256 assetPrice;
  uint256 sTrsyTotalSupply;
  uint256 trsyPrice;
}

// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.19;

abstract contract BaseChecker {
  error ZeroParameter();
  error InconsistentLengths();

  function _checkZeroValue(uint256 val) internal pure {
    if (val == 0) revert ZeroParameter();
  }

  function _checkZeroAddress(address addr) internal pure {
    if (addr == address(0x0)) revert ZeroParameter();
  }

  function _checkForConsistentLength(address[] memory arr1, uint256[] memory arr2) internal pure {
    if (arr1.length != arr2.length) revert InconsistentLengths();
  }
}

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.19;

///@title Ownable contract
/// @notice Simple 2step owner authorization combining solmate and OZ implementation
abstract contract Ownable {
  /*//////////////////////////////////////////////////////////////
                             STORAGE
    //////////////////////////////////////////////////////////////*/

  ///@notice Address of the owner
  address public owner;

  ///@notice Address of the pending owner
  address public pendingOwner;

  /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

  event OwnershipTransferred(address indexed user, address indexed newOner);
  event OwnershipTransferStarted(address indexed user, address indexed newOwner);
  event OwnershipTransferCanceled(address indexed pendingOwner);

  /*//////////////////////////////////////////////////////////////
                                 ERROR
    //////////////////////////////////////////////////////////////*/

  error Unauthorized();

  /*//////////////////////////////////////////////////////////////
                               CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

  constructor(address _owner) {
    owner = _owner;

    emit OwnershipTransferred(address(0), _owner);
  }

  /*//////////////////////////////////////////////////////////////
                             OWNERSHIP LOGIC
    //////////////////////////////////////////////////////////////*/

  ///@notice Transfer ownership to a new address
  ///@param newOwner address of the new owner
  ///@dev newOwner have to acceptOwnership
  function transferOwnership(address newOwner) external onlyOwner {
    pendingOwner = newOwner;
    emit OwnershipTransferStarted(msg.sender, pendingOwner);
  }

  ///@notice NewOwner accept the ownership, it transfer the ownership to newOwner
  function acceptOwnership() external {
    if (msg.sender != pendingOwner) revert Unauthorized();
    address oldOwner = owner;
    owner = pendingOwner;
    delete pendingOwner;
    emit OwnershipTransferred(oldOwner, owner);
  }

  ///@notice Cancel the ownership transfer
  function cancelTransferOwnership() external onlyOwner {
    emit OwnershipTransferCanceled(pendingOwner);
    delete pendingOwner;
  }

  modifier onlyOwner() {
    if (msg.sender != owner) revert Unauthorized();
    _;
  }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/IERC20Permit.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
     * Revert on invalid signature.
     */
    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return
            success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
    }
}

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.19;

import {RequestData, RebalanceParam, ProcessParam} from "src/core/Structs.sol";

interface IFyde {
  function protocolData() external view returns (uint256, uint72, uint16, uint48, uint72, uint48);

  function isAnyNotSupported(address[] calldata _assets) external view returns (address);

  function isSwapAllowed(address[] calldata _assets) external view returns (address);

  function computeProtocolAUM() external view returns (uint256);

  function getProtocolAUM() external view returns (uint256);

  function updateProtocolAUM(uint256) external;

  function processDeposit(uint256, RequestData calldata) external returns (uint256);

  function processWithdraw(uint256, RequestData calldata) external returns (uint256);

  function totalAssetAccounting(address) external view returns (uint256);

  function proxyAssetAccounting(address) external view returns (uint256);

  function standardAssetAccounting(address) external view returns (uint256);

  function getQuote(address, uint256) external view returns (uint256);

  function getAssetDecimals(address) external view returns (uint8);

  function collectManagementFee() external;

  function processSwap(uint256, RequestData calldata) external returns (int256);

  function getProcessParamDeposit(RequestData memory _req, uint256 _protocolAUM)
    external
    view
    returns (
      ProcessParam[] memory processParam,
      uint256 sharesToMint,
      uint256 taxInTRSY,
      uint256 totalUsdDeposit
    );

  // GOVERNANCE ACCESS FUNCTIONS

  function transferAsset(address _asset, address _recipient, uint256 _amount) external;

  function getRebalanceParams(address _asset) external view returns (RebalanceParam memory);

  function updateAssetProxyAmount(address _asset, uint256 _amount) external;
}

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.19;

interface IGovernanceModule {
  function fyde() external view returns (address);

  function proxyImplementation() external view returns (address);

  function proxyBalance(address proxy, address asset) external view returns (uint256);

  function strsyBalance(address _user, address _govToken) external view returns (uint256 balance);

  function assetToStrsy(address _asset) external view returns (address);

  function userToProxy(address _user) external view returns (address);

  function proxyToUser(address _proxy) external view returns (address);

  function isOnGovernanceWhitelist(address _asset) external view returns (bool);

  function getAllGovUsers() external view returns (address[] memory);

  function isAnyNotOnGovWhitelist(address[] calldata _assets) external view returns (address);

  function getUserGTAllowance(uint256 _TRSYAmount, address _token) external view returns (uint256);

  function govDeposit(
    address _depositor,
    address[] calldata _govToken,
    uint256[] calldata _amount,
    uint256[] calldata _amountTRSY,
    uint256 _totalTRSY
  ) external returns (address proxy);

  function govWithdraw(
    address _user,
    address _asset,
    uint256 _amountToWithdraw,
    uint256 _trsyToBurn
  ) external;

  function onStrsyTransfer(address sender, address _recipient) external;

  function unstakeGov(uint256 _amount, address _asset) external;

  function rebalanceProxy(address _proxy, address _asset, address[] memory _usersToRebalance)
    external;
}

//SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.19;

import {AssetInfo} from "../core/Structs.sol";

interface IOracle {
  function getPriceInUSD(address, AssetInfo calldata) external view returns (uint256);

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

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.19;

import {RequestData, UserRequest} from "../core/Structs.sol";

interface IRelayer {
  function getNumPendingRequest() external view returns (uint256);

  function getRequest(uint64 idx) external view returns (RequestData memory);

  function requestGovernanceWithdraw(
    UserRequest memory _userRequest,
    address _user,
    uint256 _maxTRSYToPay
  ) external payable;

  function requestWithdraw(UserRequest[] memory _userRequest, uint256 _maxTRSYToPay)
    external
    payable;

  function requestDeposit(
    UserRequest[] memory _userRequest,
    bool _keepGovRights,
    uint256 _minTRSYExpected
  ) external payable;

  function requestSwap(
    address _assetIn,
    uint256 _amountIn,
    address _assetOut,
    uint256 _minAmountOut
  ) external payable;

  function processRequests(uint256 _protocolAUM) external;

  function isQuarantined(address _asset) external view returns (bool);

  function isIncentiveManager(address _incentiveManager) external view returns (bool);

  function MAX_ASSET_TO_REQUEST() external view returns (uint8);

  function actionToGasUsage(bytes32 _actionHash) external view returns (uint256);

  function isUser(address _asset) external view returns (bool);

  function isAnyQuarantined(address[] memory _assets) external view returns (address);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

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

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

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

Settings
{
  "remappings": [
    "@uniswap/v3-core/=lib/v3-core/",
    "@uniswap/v3-periphery/=lib/v3-periphery/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin/=lib/openzeppelin-contracts/contracts/",
    "solmate/=lib/solmate/src/",
    "synthetix-v3/=lib/synthetix-v3/",
    "v3-core/=lib/v3-core/contracts/",
    "v3-periphery/=lib/v3-periphery/contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address[]","name":"_assets","type":"address[]"},{"internalType":"bool[]","name":"_keepGovAllowed","type":"bool[]"},{"internalType":"address","name":"_fyde","type":"address"},{"internalType":"address","name":"_relayer","type":"address"},{"internalType":"address","name":"_governanceModule","type":"address"},{"internalType":"address","name":"_oracle","type":"address"},{"internalType":"uint128","name":"_escrowPeriod","type":"uint128"},{"internalType":"uint128","name":"_freezePeriod","type":"uint128"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"CannotClaimForAsset","type":"error"},{"inputs":[],"name":"ConcentrationsNotSet","type":"error"},{"inputs":[],"name":"DepositsMightStillBeProcessed","type":"error"},{"inputs":[],"name":"EscrowPeriodEnded","type":"error"},{"inputs":[],"name":"FydeDepositCompleted","type":"error"},{"inputs":[],"name":"FydeDepositNotCompleted","type":"error"},{"inputs":[],"name":"InconsistentLengths","type":"error"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"InsufficientBalance","type":"error"},{"inputs":[],"name":"InternalAccountingNotUpdated","type":"error"},{"inputs":[],"name":"InvalidTimePeriod","type":"error"},{"inputs":[],"name":"NotRevoked","type":"error"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"NotSupportedAsset","type":"error"},{"inputs":[],"name":"OnlyDuringFreeze","type":"error"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"PriceNotAvailable","type":"error"},{"inputs":[],"name":"Revoked","type":"error"},{"inputs":[],"name":"TaxFactorNotZero","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"inputs":[],"name":"ZeroParameter","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"AssetDeposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"ClaimedAndRefunded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint128[]","name":"amounts","type":"uint128[]"},{"indexed":false,"internalType":"uint128[]","name":"govAmounts","type":"uint128[]"}],"name":"ConcentrationAmountsSet","type":"event"},{"anonymous":false,"inputs":[],"name":"EscrowRevoked","type":"event"},{"anonymous":false,"inputs":[],"name":"FydeDeposit","type":"event"},{"anonymous":false,"inputs":[],"name":"InternalAccountingUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pendingOwner","type":"address"}],"name":"OwnershipTransferCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newOner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"refund","type":"uint256"}],"name":"Refunded","type":"event"},{"inputs":[],"name":"ESCROW_PERIOD","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FREEZE_PERIOD","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FYDE","outputs":[{"internalType":"contract IFyde","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GAS_TO_FORWARD","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GOVERNANCE_MODULE","outputs":[{"internalType":"contract IGovernanceModule","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_ASSET_TO_REQUEST","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ORACLE","outputs":[{"internalType":"contract IOracle","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RELAYER","outputs":[{"internalType":"contract IRelayer","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"TRSYBalancesPerAsset","outputs":[{"internalType":"uint128","name":"std","type":"uint128"},{"internalType":"uint128","name":"gov","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_user","type":"address[]"}],"name":"addUser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"assets","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"assetsTransferred","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cancelTransferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"assetsToClaim","type":"address[]"}],"name":"claimAndRefund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"concentrationAmounts","outputs":[{"internalType":"uint128","name":"std","type":"uint128"},{"internalType":"uint128","name":"gov","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"concentrationsSet","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint128","name":"amount","type":"uint128"},{"internalType":"bool","name":"keepGovRights","type":"bool"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositToFyde","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"deposits","outputs":[{"internalType":"uint128","name":"std","type":"uint128"},{"internalType":"uint128","name":"gov","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"finalPercentages","outputs":[{"internalType":"uint128","name":"std","type":"uint128"},{"internalType":"uint128","name":"gov","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fydeDepositCompleted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"address","name":"_asset","type":"address"}],"name":"getEstimatedTrsy","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"get_assets","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"internalAccountingUpdated","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isUser","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"keepGovAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"assetsToRefund","type":"address[]"}],"name":"refund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_user","type":"address[]"}],"name":"removeUser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"returnStuckFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revoke","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revoked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint128[]","name":"amounts","type":"uint128[]"},{"internalType":"uint128[]","name":"govAmounts","type":"uint128[]"}],"name":"setConcentrationAmounts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"supportedAssets","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"totalBalance","outputs":[{"internalType":"uint128","name":"std","type":"uint128"},{"internalType":"uint128","name":"gov","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalExpectedTrsy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updateInternalAccounting","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6101406040523480156200001257600080fd5b5060405162003ae138038062003ae18339810160408190526200003591620003b2565b600080546001600160a01b031916339081178255604051909182917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508651885114620000995760405163b1f40f7760e01b815260040160405180910390fd5b6001600160a01b0380871660c05285811660e05284811661010052831661012052620000c6824262000508565b6001600160801b03166080819052620000e190829062000508565b6001600160801b031660a0528751620001029060049060208b01906200020a565b5060005b8851811015620001fb576001600660008b84815181106200012b576200012b62000532565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055508781815181106200017f576200017f62000532565b602002602001015115620001e8576001600760008b8481518110620001a857620001a862000532565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b620001f38162000548565b905062000106565b50505050505050505062000564565b82805482825590600052602060002090810192821562000262579160200282015b828111156200026257825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906200022b565b506200027092915062000274565b5090565b5b8082111562000270576000815560010162000275565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715620002cc57620002cc6200028b565b604052919050565b60006001600160401b03821115620002f057620002f06200028b565b5060051b60200190565b80516001600160a01b03811681146200031257600080fd5b919050565b600082601f8301126200032957600080fd5b81516020620003426200033c83620002d4565b620002a1565b82815260059290921b840181019181810190868411156200036257600080fd5b8286015b848110156200038f5780518015158114620003815760008081fd5b835291830191830162000366565b509695505050505050565b80516001600160801b03811681146200031257600080fd5b600080600080600080600080610100898b031215620003d057600080fd5b88516001600160401b0380821115620003e857600080fd5b818b0191508b601f830112620003fd57600080fd5b81516020620004106200033c83620002d4565b82815260059290921b8401810191818101908f8411156200043057600080fd5b948201945b8386101562000459576200044986620002fa565b8252948201949082019062000435565b918e0151919c509093505050808211156200047357600080fd5b50620004828b828c0162000317565b9750506200049360408a01620002fa565b9550620004a360608a01620002fa565b9450620004b360808a01620002fa565b9350620004c360a08a01620002fa565b9250620004d360c08a016200039a565b9150620004e360e08a016200039a565b90509295985092959890939650565b634e487b7160e01b600052601160045260246000fd5b6001600160801b038181168382160190808211156200052b576200052b620004f2565b5092915050565b634e487b7160e01b600052603260045260246000fd5b6000600182016200055d576200055d620004f2565b5060010190565b60805160a05160c05160e05161010051610120516134b66200062b6000396000818161035d0152611c1101526000818161027c0152818161104701526124930152600081816102c801528181610e1101528181611cba0152611d460152600081816103f301528181610ec7015281816113c60152818161184301528181611b830152612644015260008181610565015281816109b4015281816112f2015261274c0152600081816108670152818161098701528181611eb5015261271f01526134b66000f3fe60806040526004361061023a5760003560e01c8063979edeba1161012e578063c68a18a2116100ab578063e5ec13321161006f578063e5ec133214610810578063e78923aa14610834578063eb01fb8114610855578063f2fde38b14610889578063fa52733a146108a957600080fd5b8063c68a18a214610779578063cdfca7f214610790578063cf35bdd0146107b0578063e02cec51146107d0578063e30c3978146107f057600080fd5b8063b2e59075116100f2578063b2e59075146106d3578063b6549f75146106f3578063bd81579e14610708578063c272def914610738578063c67546c11461075857600080fd5b8063979edeba146106205780639ba9bed914610635578063a1fbabf71461066a578063a2c70ef814610672578063aace75f01461069257600080fd5b80636eacd398116101bc5780638178d084116101805780638178d08414610512578063823c82ca146105535780638da5cb5b1461059f5780638f601f66146105bf57806392fede001461060b57600080fd5b80636eacd39814610457578063769315a41461049857806379ba5097146104b85780637bf4595e146104cd5780637f876b62146104fd57600080fd5b80634209fff1116102035780634209fff11461037f57806344bdb041146103bf5780634b62f62f146103e15780634fcce4361461041557806363d256ce1461043657600080fd5b80626725b81461023f5780631a366bb71461026a5780632483e715146102b657806336e45067146102ea57806338013f021461034b575b600080fd5b34801561024b57600080fd5b506102546108bf565b6040516102619190612ec8565b60405180910390f35b34801561027657600080fd5b5061029e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610261565b3480156102c257600080fd5b5061029e7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102f657600080fd5b5061032b610305366004612f2d565b6009602052600090815260409020546001600160801b0380821691600160801b90041682565b604080516001600160801b03938416815292909116602083015201610261565b34801561035757600080fd5b5061029e7f000000000000000000000000000000000000000000000000000000000000000081565b34801561038b57600080fd5b506103af61039a366004612f2d565b60056020526000908152604090205460ff1681565b6040519015158152602001610261565b3480156103cb57600080fd5b506103df6103da366004612f96565b610921565b005b3480156103ed57600080fd5b5061029e7f000000000000000000000000000000000000000000000000000000000000000081565b34801561042157600080fd5b506001546103af90600160a81b900460ff1681565b34801561044257600080fd5b506001546103af90600160b01b900460ff1681565b34801561046357600080fd5b5061032b610472366004612f2d565b6008602052600090815260409020546001600160801b0380821691600160801b90041682565b3480156104a457600080fd5b506103df6104b3366004613002565b610cc2565b3480156104c457600080fd5b506103df610d61565b3480156104d957600080fd5b506103af6104e8366004612f2d565b60076020526000908152604090205460ff1681565b34801561050957600080fd5b506103df610de5565b34801561051e57600080fd5b5061032b61052d366004612f2d565b600b602052600090815260409020546001600160801b0380821691600160801b90041682565b34801561055f57600080fd5b506105877f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160801b039091168152602001610261565b3480156105ab57600080fd5b5060005461029e906001600160a01b031681565b3480156105cb57600080fd5b5061032b6105da366004613044565b600c6020908152600092835260408084209091529082529020546001600160801b0380821691600160801b90041682565b34801561061757600080fd5b506103df61113a565b34801561062c57600080fd5b50610587600581565b34801561064157600080fd5b50610655610650366004613044565b6111ae565b60408051928352602083019190915201610261565b6103df6112f0565b34801561067e57600080fd5b506103df61068d3660046130a7565b611e21565b34801561069e57600080fd5b5061032b6106ad366004612f2d565b600a602052600090815260409020546001600160801b0380821691600160801b90041682565b3480156106df57600080fd5b506103df6106ee366004613002565b61215b565b3480156106ff57600080fd5b506103df6126ea565b34801561071457600080fd5b506103af610723366004612f2d565b60066020526000908152604090205460ff1681565b34801561074457600080fd5b506103df6107533660046130f0565b6127dd565b34801561076457600080fd5b506001546103af90600160a01b900460ff1681565b34801561078557600080fd5b50610587621e848081565b34801561079c57600080fd5b506103df6107ab366004613002565b61281b565b3480156107bc57600080fd5b5061029e6107cb366004613131565b6128b5565b3480156107dc57600080fd5b506103df6107eb366004613002565b6128df565b3480156107fc57600080fd5b5060015461029e906001600160a01b031681565b34801561081c57600080fd5b5061082660035481565b604051908152602001610261565b34801561084057600080fd5b506001546103af90600160b81b900460ff1681565b34801561086157600080fd5b506105877f000000000000000000000000000000000000000000000000000000000000000081565b34801561089557600080fd5b506103df6108a4366004612f2d565b612a14565b3480156108b557600080fd5b5061082660025481565b6060600480548060200260200160405190810160405280929190818152602001828054801561091757602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116108f9575b5050505050905090565b6000546001600160a01b0316331461094b576040516282b42960e81b815260040160405180910390fd5b6004548314158061095e57506004548114155b1561097c5760405163b1f40f7760e01b815260040160405180910390fd5b426001600160801b037f0000000000000000000000000000000000000000000000000000000000000000811690821610806109e857507f00000000000000000000000000000000000000000000000000000000000000006001600160801b0316816001600160801b0316115b15610a06576040516329fc802760e11b815260040160405180910390fd5b60005b84811015610c6957600060048281548110610a2657610a2661314a565b60009182526020822001546001600160a01b03169150878784818110610a4e57610a4e61314a565b9050602002016020810190610a639190613160565b90506000868685818110610a7957610a7961314a565b9050602002016020810190610a8e9190613160565b90506001600160801b038216158015610aae57506001600160801b038116155b15610abb57505050610c59565b6001600160a01b0383166000908152600860205260409020546001600160801b0380821691600160801b90048116908416821080610b0a5750806001600160801b0316836001600160801b0316115b15610b385760405163112fed8b60e31b81526001600160a01b03861660048201526024015b60405180910390fd5b6001600160801b03841615610bc757816001600160801b0316670de0b6b3a7640000856001600160801b0316610b6e9190613191565b610b7891906131a8565b6001600160a01b0386166000908152600a6020908152604080832080546001600160801b03199081166001600160801b0396871617909155600990925290912080549091169186169190911790555b6001600160801b03831615610c5357806001600160801b0316670de0b6b3a7640000846001600160801b0316610bfd9190613191565b610c0791906131a8565b6001600160a01b0386166000908152600a6020908152604080832080546001600160801b03908116600160801b9682168702179091556009909252909120805482169186169092021790555b50505050505b610c62816131ca565b9050610a09565b506001805460ff60a01b1916600160a01b1790556040517fc885e67a5ab806d06599567b2c4d083854da530e10250730e8368db39b4b877290610cb390879087908790879061322a565b60405180910390a15050505050565b6000546001600160a01b03163314610cec576040516282b42960e81b815260040160405180910390fd5b60005b81811015610d5c57600060056000858585818110610d0f57610d0f61314a565b9050602002016020810190610d249190612f2d565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055610d55816131ca565b9050610cef565b505050565b6001546001600160a01b03163314610d8b576040516282b42960e81b815260040160405180910390fd5b60008054600180546001600160a01b038082166001600160a01b031980861682178755909216909255604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b600154600160a81b900460ff16610e0f5760405163463c6fbd60e01b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663708968c16040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e919190613251565b15610eaf57604051631adc0a4560e01b815260040160405180910390fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610f16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3a9190613251565b90506000600354600014610f6a57600354610f5d83670de0b6b3a7640000613191565b610f6791906131a8565b90505b60005b6004548110156110f957600060048281548110610f8c57610f8c61314a565b60009182526020808320909101546001600160a01b0316808352600b9091526040822054909250670de0b6b3a764000090610fd19086906001600160801b0316613191565b610fdb91906131a8565b6001600160a01b0383166000908152600b6020908152604080832080546001600160801b0319166001600160801b038616179055600790915290205490915060ff16156110e65760405163539dc25160e11b81523060048201526001600160a01b0383811660248301527f0000000000000000000000000000000000000000000000000000000000000000169063a73b84a290604401602060405180830381865afa15801561108e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b29190613251565b6001600160a01b0383166000908152600b6020526040902080546001600160801b03928316600160801b0292169190911790555b5050806110f2906131ca565b9050610f6d565b506001805460ff60b81b1916600160b81b1790556040517f9e552eea18086580e2bb8ecee4ccbf2e71a66167d8fe4e5abd58a5f35af61cd090600090a15050565b6000546001600160a01b03163314611164576040516282b42960e81b815260040160405180910390fd5b6001546040516001600160a01b03909116907f6ecd4842251bedd053b09547c0fabaab9ec98506ebf24469e8dd5560412ed37f90600090a2600180546001600160a01b0319169055565b6001600160a01b0380821660008181526008602090815260408083208151808301835290546001600160801b038082168352600160801b91829004811683860152868652600b85528386208451808601865290548083168252839004821681870152978a168652600c8552838620968652958452828520835180850190945254808716845204851692820192909252845192948594929390928591168103611257576000611280565b8351825184516001600160801b03928316926112769281169116613191565b61128091906131a8565b9050600083602001516001600160801b03166000036112a05760006112de565b84602001516001600160801b031683602001516001600160801b031685602001516001600160801b03166112d49190613191565b6112de91906131a8565b919650909450505050505b9250929050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160801b0316426001600160801b031611611342576040516329fc802760e11b815260040160405180910390fd5b600154600160a01b900460ff1661136c576040516349107c6b60e01b815260040160405180910390fd5b600154600160a81b900460ff161561139757604051637926658760e01b815260040160405180910390fd5b600154600160b01b900460ff16156113c2576040516344825a4b60e01b815260040160405180910390fd5b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d7691f8f6040518163ffffffff1660e01b815260040160c060405180830381865afa158015611422573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114469190613299565b505050509150508068ffffffffffffffffff16600014611479576040516306dd5d2560e01b815260040160405180910390fd5b600060048054806020026020016040519081016040528092919081815260200182805480156114d157602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116114b3575b50505050509050600060025482516114e9919061330f565b9050600581106114fa5760056114fc565b805b9050600080600060025490505b836002546115179190613322565b81101561162857600760008683815181106115345761153461314a565b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff1680156115af5750600960008683815181106115785761157861314a565b6020908102919091018101516001600160a01b0316825281019190915260400160002054600160801b90046001600160801b031615155b156115c2576115bf600183613322565b91505b600960008683815181106115d8576115d861314a565b6020908102919091018101516001600160a01b03168252810191909152604001600020546001600160801b03161561161857611615600184613322565b92505b611621816131ca565b9050611509565b5060008267ffffffffffffffff81111561164457611644613335565b60405190808252806020026020018201604052801561168957816020015b60408051808201909152600080825260208201528152602001906001900390816116625790505b50905060008267ffffffffffffffff8111156116a7576116a7613335565b6040519080825280602002602001820160405280156116ec57816020015b60408051808201909152600080825260208201528152602001906001900390816116c55790505b50905060008060008060025490505b886002546117099190613322565b811015611be6576000600960008c84815181106117285761172861314a565b6020908102919091018101516001600160a01b03168252810191909152604001600020546001600160801b0316156119df578a828151811061176c5761176c61314a565b60200260200101518786815181106117865761178661314a565b6020026020010151600001906001600160a01b031690816001600160a01b031681525050600960008c84815181106117c0576117c061314a565b6020908102919091018101516001600160a01b031682528101919091526040016000205487516001600160801b03909116908890879081106118045761180461314a565b602002602001015160200181815250508685815181106118265761182661314a565b6020026020010151602001518161183d9190613322565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166382c0ab218988815181106118825761188261314a565b6020026020010151600001518a89815181106118a0576118a061314a565b6020026020010151602001516040518363ffffffff1660e01b81526004016118dd9291906001600160a01b03929092168252602082015260400190565b602060405180830381865afa1580156118fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061191e9190613251565b90508060000361196b578b838151811061193a5761193a61314a565b602002602001015160405163e5f633bf60e01b8152600401610b2f91906001600160a01b0391909116815260200190565b6119758185613322565b935080600b60008a898151811061198e5761198e61314a565b602090810291909101810151516001600160a01b0316825281019190915260400160002080546001600160801b0319166001600160801b03929092169190911790556119db600187613322565b9550505b600760008c84815181106119f5576119f561314a565b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff168015611a705750600960008c8481518110611a3957611a3961314a565b6020908102919091018101516001600160a01b0316825281019190915260400160002054600160801b90046001600160801b031615155b15611b7e578a8281518110611a8757611a8761314a565b6020026020010151868581518110611aa157611aa161314a565b6020026020010151600001906001600160a01b031690816001600160a01b031681525050600960008c8481518110611adb57611adb61314a565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000160109054906101000a90046001600160801b03166001600160801b0316868581518110611b3557611b3561314a565b60200260200101516020018181525050858481518110611b5757611b5761314a565b60200260200101516020015181611b6e9190613322565b9050611b7b600185613322565b93505b611bd57f0000000000000000000000000000000000000000000000000000000000000000828d8581518110611bb557611bb561314a565b60200260200101516001600160a01b0316612a8a9092919063ffffffff16565b50611bdf816131ca565b90506116fb565b508060036000828254611bf99190613322565b925050819055506000621e84806001600160801b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e3a031bf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c919190613251565b611c9b9190613191565b90508715611d29576040516332758a4f60e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c9d6293c908390611cf6908a90600090819060040161334b565b6000604051808303818588803b158015611d0f57600080fd5b505af1158015611d23573d6000803e3d6000fd5b50505050505b8615611db6576040516332758a4f60e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c9d6293c908390611d8390899060019060009060040161334b565b6000604051808303818588803b158015611d9c57600080fd5b505af1158015611db0573d6000803e3d6000fd5b50505050505b8860026000828254611dc89190613322565b9091555050895160025403611e14576001805460ff60a81b1916600160a81b1790556040517fd6538235da08d97cc9982bb595ff5afec87439ef60cedecd8027b3d98ecd7c9f90600090a15b5050505050505050505050565b6000805260056020527f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bc5460ff16158015611e6c57503360009081526005602052604090205460ff16155b15611e89576040516282b42960e81b815260040160405180910390fd5b816001600160801b0316600003611eb35760405163339d6ef160e21b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160801b0316426001600160801b03161115611f065760405163ad66ce3560e01b815260040160405180910390fd5b808015611f2c57506001600160a01b03831660009081526007602052604090205460ff16155b80611f5057506001600160a01b03831660009081526006602052604090205460ff16155b15611f795760405163c89009d160e01b81526001600160a01b0384166004820152602401610b2f565b611f976001600160a01b03841633306001600160801b038616612b52565b801561206157336000908152600c602090815260408083206001600160a01b038716845290915290208054839190601090611fe3908490600160801b90046001600160801b03166133ac565b82546101009290920a6001600160801b038181021990931691831602179091556001600160a01b038516600090815260086020526040902080548593509091601091612038918591600160801b9004166133ac565b92506101000a8154816001600160801b0302191690836001600160801b0316021790555061210d565b336000908152600c602090815260408083206001600160a01b03871684529091528120805484929061209d9084906001600160801b03166133ac565b82546101009290920a6001600160801b038181021990931691831602179091556001600160a01b0385166000908152600860205260408120805486945090926120e8918591166133ac565b92506101000a8154816001600160801b0302191690836001600160801b031602179055505b6040516001600160801b03831681526001600160a01b0384169033907f01527be533d184d44e3111afa7800fa60ced6e1b44bd025f8b457deb8ce0ce359060200160405180910390a3505050565b600154600160b01b900460ff1615612186576040516344825a4b60e01b815260040160405180910390fd5b600154600160a81b900460ff166121b05760405163463c6fbd60e01b815260040160405180910390fd5b600154600160b81b900460ff166121dd57604051600162da483b60e01b0319815260040160405180910390fd5b6000805b828110156126275760008484838181106121fd576121fd61314a565b90506020020160208101906122129190612f2d565b336000908152600c602090815260408083206001600160a01b03851684529091528120549192506001600160801b0380831692600160801b900416906122588284613322565b905080600003612286576040516395c12ac560e01b81526001600160a01b0385166004820152602401610b2f565b80831561237c57336000908152600c602090815260408083206001600160a01b0389168452825280832080546001600160801b0319169055600a909152812054670de0b6b3a7640000906122e3906001600160801b031687613191565b6122ed91906131a8565b6001600160a01b038716600090815260096020526040812054919250906001600160801b031615612361576001600160a01b038716600090815260096020908152604080832054600b909252909120546001600160801b0391821691612354911684613191565b61235e91906131a8565b90505b61236b818a613322565b9850612377828461330f565b925050505b821561257757336000908152600c602090815260408083206001600160a01b0389168452825280832080546001600160801b03908116909155600a909252822054670de0b6b3a7640000916123d991600160801b90041686613191565b6123e391906131a8565b6001600160a01b03871660009081526009602052604081205491925090600160801b90046001600160801b031615612467576001600160a01b038716600090815260096020908152604080832054600b909252909120546001600160801b03600160801b9283900481169261245a92041684613191565b61246491906131a8565b90505b612471828461330f565b60405163074caa8760e11b81526001600160a01b0389811660048301529194507f000000000000000000000000000000000000000000000000000000000000000090911690630e99550e90602401602060405180830381865afa1580156124dc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061250091906133d3565b60405163a9059cbb60e01b8152336004820152602481018390526001600160a01b03919091169063a9059cbb906044016020604051808303816000875af115801561254f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061257391906133f0565b5050505b8015612611576040516370a0823160e01b81523060048201526000906001600160a01b038716906370a0823190602401602060405180830381865afa1580156125c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125e89190613251565b90508181116125f757806125f9565b815b915061260f6001600160a01b0387163384612b8a565b505b505050505080612620906131ca565b90506121e1565b5060405163a9059cbb60e01b8152336004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015612695573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126b991906133f0565b5060405133907fcb250587370f33927d55e32e7179848ac061ee566b09bec555e9969b40e5dcd990600090a2505050565b6000546001600160a01b03163314612714576040516282b42960e81b815260040160405180910390fd5b426001600160801b037f00000000000000000000000000000000000000000000000000000000000000008116908216108061278057507f00000000000000000000000000000000000000000000000000000000000000006001600160801b0316816001600160801b0316115b1561279e57604051637297e6a160e11b815260040160405180910390fd5b6001805460ff60b01b1916600160b01b1790556040517f5aadfea8cbffad0010bfde113179e0294f86136149cd37226668dd2ebdab377690600090a150565b6000546001600160a01b03163314612807576040516282b42960e81b815260040160405180910390fd5b610d5c6001600160a01b0384168383612b8a565b6000546001600160a01b03163314612845576040516282b42960e81b815260040160405180910390fd5b60005b81811015610d5c576001600560008585858181106128685761286861314a565b905060200201602081019061287d9190612f2d565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790556128ae816131ca565b9050612848565b600481815481106128c557600080fd5b6000918252602090912001546001600160a01b0316905081565b600154600160b01b900460ff16612909576040516339fbd58f60e11b815260040160405180910390fd5b60005b81811015610d5c5760008383838181106129285761292861314a565b905060200201602081019061293d9190612f2d565b336000908152600c602090815260408083206001600160a01b038516845290915281205491925090612981906001600160801b03600160801b8204811691166133ac565b336000818152600c602090815260408083206001600160a01b03881680855292528220919091556001600160801b039290921692506129c1919083612b8a565b6040518181526001600160a01b0383169033907fec1e5ed733e00f1a00915d56caef57b4f52312dde4f9b3165f213319a0da156b9060200160405180910390a3505080612a0d906131ca565b905061290c565b6000546001600160a01b03163314612a3e576040516282b42960e81b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b03831690811790915560405133907f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270090600090a350565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052612adb8482612bba565b612b4c576040516001600160a01b038416602482015260006044820152612b4290859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612c63565b612b4c8482612c63565b50505050565b6040516001600160a01b0380851660248301528316604482015260648101829052612b4c9085906323b872dd60e01b90608401612b0b565b6040516001600160a01b038316602482015260448101829052610d5c90849063a9059cbb60e01b90606401612b0b565b6000806000846001600160a01b031684604051612bd79190613431565b6000604051808303816000865af19150503d8060008114612c14576040519150601f19603f3d011682016040523d82523d6000602084013e612c19565b606091505b5091509150818015612c43575080511580612c43575080806020019051810190612c4391906133f0565b8015612c5857506001600160a01b0385163b15155b925050505b92915050565b6000612cb8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612d389092919063ffffffff16565b9050805160001480612cd9575080806020019051810190612cd991906133f0565b610d5c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610b2f565b6060612d478484600085612d4f565b949350505050565b606082471015612db05760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610b2f565b600080866001600160a01b03168587604051612dcc9190613431565b60006040518083038185875af1925050503d8060008114612e09576040519150601f19603f3d011682016040523d82523d6000602084013e612e0e565b606091505b5091509150612e1f87838387612e2a565b979650505050505050565b60608315612e99578251600003612e92576001600160a01b0385163b612e925760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b2f565b5081612d47565b612d478383815115612eae5781518083602001fd5b8060405162461bcd60e51b8152600401610b2f919061344d565b6020808252825182820181905260009190848201906040850190845b81811015612f095783516001600160a01b031683529284019291840191600101612ee4565b50909695505050505050565b6001600160a01b0381168114612f2a57600080fd5b50565b600060208284031215612f3f57600080fd5b8135612f4a81612f15565b9392505050565b60008083601f840112612f6357600080fd5b50813567ffffffffffffffff811115612f7b57600080fd5b6020830191508360208260051b85010111156112e957600080fd5b60008060008060408587031215612fac57600080fd5b843567ffffffffffffffff80821115612fc457600080fd5b612fd088838901612f51565b90965094506020870135915080821115612fe957600080fd5b50612ff687828801612f51565b95989497509550505050565b6000806020838503121561301557600080fd5b823567ffffffffffffffff81111561302c57600080fd5b61303885828601612f51565b90969095509350505050565b6000806040838503121561305757600080fd5b823561306281612f15565b9150602083013561307281612f15565b809150509250929050565b80356001600160801b038116811461309457600080fd5b919050565b8015158114612f2a57600080fd5b6000806000606084860312156130bc57600080fd5b83356130c781612f15565b92506130d56020850161307d565b915060408401356130e581613099565b809150509250925092565b60008060006060848603121561310557600080fd5b833561311081612f15565b9250602084013561312081612f15565b929592945050506040919091013590565b60006020828403121561314357600080fd5b5035919050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561317257600080fd5b612f4a8261307d565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417612c5d57612c5d61317b565b6000826131c557634e487b7160e01b600052601260045260246000fd5b500490565b6000600182016131dc576131dc61317b565b5060010190565b8183526000602080850194508260005b8581101561321f576001600160801b0361320c8361307d565b16875295820195908201906001016131f3565b509495945050505050565b60408152600061323e6040830186886131e3565b8281036020840152612e1f8185876131e3565b60006020828403121561326357600080fd5b5051919050565b805168ffffffffffffffffff8116811461309457600080fd5b805165ffffffffffff8116811461309457600080fd5b60008060008060008060c087890312156132b257600080fd5b865195506132c26020880161326a565b9450604087015161ffff811681146132d957600080fd5b93506132e760608801613283565b92506132f56080880161326a565b915061330360a08801613283565b90509295509295509295565b81810381811115612c5d57612c5d61317b565b80820180821115612c5d57612c5d61317b565b634e487b7160e01b600052604160045260246000fd5b606080825284519082018190526000906020906080840190828801845b8281101561339857815180516001600160a01b031685528501518585015260409093019290840190600101613368565b505050941515908301525060400152919050565b6001600160801b038181168382160190808211156133cc576133cc61317b565b5092915050565b6000602082840312156133e557600080fd5b8151612f4a81612f15565b60006020828403121561340257600080fd5b8151612f4a81613099565b60005b83811015613428578181015183820152602001613410565b50506000910152565b6000825161344381846020870161340d565b9190910192915050565b602081526000825180602084015261346c81604085016020870161340d565b601f01601f1916919091016040019291505056fea2646970667358221220596c2d177f94aadd6ca9e46971a879f68e406289b9084e6a19c0de082a95a8cf64736f6c634300081300330000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000040000000000000000000000000087cc45fff5c0933bb6af6bae7fc013b7ec7df2ee00000000000000000000000094194de310b99d3c8a5b8c0768cfce7aef81d9be000000000000000000000000c6f50903a058f3807111619bd4b24ca64b8239e10000000000000000000000009b122361e8708be33b785e44fce4d6ca86ab6c5a0000000000000000000000000000000000000000000000000000000000093a800000000000000000000000000000000000000000000000000000000000034bc00000000000000000000000000000000000000000000000000000000000000017000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c5990000000000000000000000001f9840a85d5af5bf1d1762f925bdaddc4201f9840000000000000000000000007fc66500c84a76ad7e9c93437bfc5ac33e2ddae90000000000000000000000009f8f72aa9304c8b593d555f12ef6589cc3a579a2000000000000000000000000d533a949740bb3306d119cc777fa900ba034cd520000000000000000000000005a98fcbea516cf06857215779fd812ca3bef1b32000000000000000000000000d33526068d116ce69f19a9ee46f0bd304f21a51f000000000000000000000000c011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f0000000000000000000000006123b0049f904d730db3c36a31167d9d4121fa6b000000000000000000000000808507121b80c02388fad14726482e061b8da8270000000000000000000000008207c1ffc5b6804f6024322ccf34f29c3541ae260000000000000000000000006dea81c8171d0ba574754ef6f8b412f2ed88c54d0000000000000000000000009e32b13ce7f2e80a01932b42553652e053d6ed8e00000000000000000000000072b886d09c117654ab7da13a14d603001de0b777000000000000000000000000bc396689893d065f41bc2c6ecbee5e00852334470000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000dbdb4d16eda451d0503b854cf79d55697f90c8df000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000005f98805a4e8be255a32880fdec7f6728c6568ba00000000000000000000000007f39c581f595b53c5cb19bd0b3f8da6c935e2ca0000000000000000000000000ae78736cd615f374d3085123a210448e74fc6393000000000000000000000000000000000000000000000000000000000000001700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x60806040526004361061023a5760003560e01c8063979edeba1161012e578063c68a18a2116100ab578063e5ec13321161006f578063e5ec133214610810578063e78923aa14610834578063eb01fb8114610855578063f2fde38b14610889578063fa52733a146108a957600080fd5b8063c68a18a214610779578063cdfca7f214610790578063cf35bdd0146107b0578063e02cec51146107d0578063e30c3978146107f057600080fd5b8063b2e59075116100f2578063b2e59075146106d3578063b6549f75146106f3578063bd81579e14610708578063c272def914610738578063c67546c11461075857600080fd5b8063979edeba146106205780639ba9bed914610635578063a1fbabf71461066a578063a2c70ef814610672578063aace75f01461069257600080fd5b80636eacd398116101bc5780638178d084116101805780638178d08414610512578063823c82ca146105535780638da5cb5b1461059f5780638f601f66146105bf57806392fede001461060b57600080fd5b80636eacd39814610457578063769315a41461049857806379ba5097146104b85780637bf4595e146104cd5780637f876b62146104fd57600080fd5b80634209fff1116102035780634209fff11461037f57806344bdb041146103bf5780634b62f62f146103e15780634fcce4361461041557806363d256ce1461043657600080fd5b80626725b81461023f5780631a366bb71461026a5780632483e715146102b657806336e45067146102ea57806338013f021461034b575b600080fd5b34801561024b57600080fd5b506102546108bf565b6040516102619190612ec8565b60405180910390f35b34801561027657600080fd5b5061029e7f000000000000000000000000c6f50903a058f3807111619bd4b24ca64b8239e181565b6040516001600160a01b039091168152602001610261565b3480156102c257600080fd5b5061029e7f00000000000000000000000094194de310b99d3c8a5b8c0768cfce7aef81d9be81565b3480156102f657600080fd5b5061032b610305366004612f2d565b6009602052600090815260409020546001600160801b0380821691600160801b90041682565b604080516001600160801b03938416815292909116602083015201610261565b34801561035757600080fd5b5061029e7f0000000000000000000000009b122361e8708be33b785e44fce4d6ca86ab6c5a81565b34801561038b57600080fd5b506103af61039a366004612f2d565b60056020526000908152604090205460ff1681565b6040519015158152602001610261565b3480156103cb57600080fd5b506103df6103da366004612f96565b610921565b005b3480156103ed57600080fd5b5061029e7f00000000000000000000000087cc45fff5c0933bb6af6bae7fc013b7ec7df2ee81565b34801561042157600080fd5b506001546103af90600160a81b900460ff1681565b34801561044257600080fd5b506001546103af90600160b01b900460ff1681565b34801561046357600080fd5b5061032b610472366004612f2d565b6008602052600090815260409020546001600160801b0380821691600160801b90041682565b3480156104a457600080fd5b506103df6104b3366004613002565b610cc2565b3480156104c457600080fd5b506103df610d61565b3480156104d957600080fd5b506103af6104e8366004612f2d565b60076020526000908152604090205460ff1681565b34801561050957600080fd5b506103df610de5565b34801561051e57600080fd5b5061032b61052d366004612f2d565b600b602052600090815260409020546001600160801b0380821691600160801b90041682565b34801561055f57600080fd5b506105877f000000000000000000000000000000000000000000000000000000006571248b81565b6040516001600160801b039091168152602001610261565b3480156105ab57600080fd5b5060005461029e906001600160a01b031681565b3480156105cb57600080fd5b5061032b6105da366004613044565b600c6020908152600092835260408084209091529082529020546001600160801b0380821691600160801b90041682565b34801561061757600080fd5b506103df61113a565b34801561062c57600080fd5b50610587600581565b34801561064157600080fd5b50610655610650366004613044565b6111ae565b60408051928352602083019190915201610261565b6103df6112f0565b34801561067e57600080fd5b506103df61068d3660046130a7565b611e21565b34801561069e57600080fd5b5061032b6106ad366004612f2d565b600a602052600090815260409020546001600160801b0380821691600160801b90041682565b3480156106df57600080fd5b506103df6106ee366004613002565b61215b565b3480156106ff57600080fd5b506103df6126ea565b34801561071457600080fd5b506103af610723366004612f2d565b60066020526000908152604090205460ff1681565b34801561074457600080fd5b506103df6107533660046130f0565b6127dd565b34801561076457600080fd5b506001546103af90600160a01b900460ff1681565b34801561078557600080fd5b50610587621e848081565b34801561079c57600080fd5b506103df6107ab366004613002565b61281b565b3480156107bc57600080fd5b5061029e6107cb366004613131565b6128b5565b3480156107dc57600080fd5b506103df6107eb366004613002565b6128df565b3480156107fc57600080fd5b5060015461029e906001600160a01b031681565b34801561081c57600080fd5b5061082660035481565b604051908152602001610261565b34801561084057600080fd5b506001546103af90600160b81b900460ff1681565b34801561086157600080fd5b506105877f00000000000000000000000000000000000000000000000000000000656dd8cb81565b34801561089557600080fd5b506103df6108a4366004612f2d565b612a14565b3480156108b557600080fd5b5061082660025481565b6060600480548060200260200160405190810160405280929190818152602001828054801561091757602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116108f9575b5050505050905090565b6000546001600160a01b0316331461094b576040516282b42960e81b815260040160405180910390fd5b6004548314158061095e57506004548114155b1561097c5760405163b1f40f7760e01b815260040160405180910390fd5b426001600160801b037f00000000000000000000000000000000000000000000000000000000656dd8cb811690821610806109e857507f000000000000000000000000000000000000000000000000000000006571248b6001600160801b0316816001600160801b0316115b15610a06576040516329fc802760e11b815260040160405180910390fd5b60005b84811015610c6957600060048281548110610a2657610a2661314a565b60009182526020822001546001600160a01b03169150878784818110610a4e57610a4e61314a565b9050602002016020810190610a639190613160565b90506000868685818110610a7957610a7961314a565b9050602002016020810190610a8e9190613160565b90506001600160801b038216158015610aae57506001600160801b038116155b15610abb57505050610c59565b6001600160a01b0383166000908152600860205260409020546001600160801b0380821691600160801b90048116908416821080610b0a5750806001600160801b0316836001600160801b0316115b15610b385760405163112fed8b60e31b81526001600160a01b03861660048201526024015b60405180910390fd5b6001600160801b03841615610bc757816001600160801b0316670de0b6b3a7640000856001600160801b0316610b6e9190613191565b610b7891906131a8565b6001600160a01b0386166000908152600a6020908152604080832080546001600160801b03199081166001600160801b0396871617909155600990925290912080549091169186169190911790555b6001600160801b03831615610c5357806001600160801b0316670de0b6b3a7640000846001600160801b0316610bfd9190613191565b610c0791906131a8565b6001600160a01b0386166000908152600a6020908152604080832080546001600160801b03908116600160801b9682168702179091556009909252909120805482169186169092021790555b50505050505b610c62816131ca565b9050610a09565b506001805460ff60a01b1916600160a01b1790556040517fc885e67a5ab806d06599567b2c4d083854da530e10250730e8368db39b4b877290610cb390879087908790879061322a565b60405180910390a15050505050565b6000546001600160a01b03163314610cec576040516282b42960e81b815260040160405180910390fd5b60005b81811015610d5c57600060056000858585818110610d0f57610d0f61314a565b9050602002016020810190610d249190612f2d565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055610d55816131ca565b9050610cef565b505050565b6001546001600160a01b03163314610d8b576040516282b42960e81b815260040160405180910390fd5b60008054600180546001600160a01b038082166001600160a01b031980861682178755909216909255604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b600154600160a81b900460ff16610e0f5760405163463c6fbd60e01b815260040160405180910390fd5b7f00000000000000000000000094194de310b99d3c8a5b8c0768cfce7aef81d9be6001600160a01b031663708968c16040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e919190613251565b15610eaf57604051631adc0a4560e01b815260040160405180910390fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000087cc45fff5c0933bb6af6bae7fc013b7ec7df2ee6001600160a01b0316906370a0823190602401602060405180830381865afa158015610f16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3a9190613251565b90506000600354600014610f6a57600354610f5d83670de0b6b3a7640000613191565b610f6791906131a8565b90505b60005b6004548110156110f957600060048281548110610f8c57610f8c61314a565b60009182526020808320909101546001600160a01b0316808352600b9091526040822054909250670de0b6b3a764000090610fd19086906001600160801b0316613191565b610fdb91906131a8565b6001600160a01b0383166000908152600b6020908152604080832080546001600160801b0319166001600160801b038616179055600790915290205490915060ff16156110e65760405163539dc25160e11b81523060048201526001600160a01b0383811660248301527f000000000000000000000000c6f50903a058f3807111619bd4b24ca64b8239e1169063a73b84a290604401602060405180830381865afa15801561108e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b29190613251565b6001600160a01b0383166000908152600b6020526040902080546001600160801b03928316600160801b0292169190911790555b5050806110f2906131ca565b9050610f6d565b506001805460ff60b81b1916600160b81b1790556040517f9e552eea18086580e2bb8ecee4ccbf2e71a66167d8fe4e5abd58a5f35af61cd090600090a15050565b6000546001600160a01b03163314611164576040516282b42960e81b815260040160405180910390fd5b6001546040516001600160a01b03909116907f6ecd4842251bedd053b09547c0fabaab9ec98506ebf24469e8dd5560412ed37f90600090a2600180546001600160a01b0319169055565b6001600160a01b0380821660008181526008602090815260408083208151808301835290546001600160801b038082168352600160801b91829004811683860152868652600b85528386208451808601865290548083168252839004821681870152978a168652600c8552838620968652958452828520835180850190945254808716845204851692820192909252845192948594929390928591168103611257576000611280565b8351825184516001600160801b03928316926112769281169116613191565b61128091906131a8565b9050600083602001516001600160801b03166000036112a05760006112de565b84602001516001600160801b031683602001516001600160801b031685602001516001600160801b03166112d49190613191565b6112de91906131a8565b919650909450505050505b9250929050565b7f000000000000000000000000000000000000000000000000000000006571248b6001600160801b0316426001600160801b031611611342576040516329fc802760e11b815260040160405180910390fd5b600154600160a01b900460ff1661136c576040516349107c6b60e01b815260040160405180910390fd5b600154600160a81b900460ff161561139757604051637926658760e01b815260040160405180910390fd5b600154600160b01b900460ff16156113c2576040516344825a4b60e01b815260040160405180910390fd5b60007f00000000000000000000000087cc45fff5c0933bb6af6bae7fc013b7ec7df2ee6001600160a01b031663d7691f8f6040518163ffffffff1660e01b815260040160c060405180830381865afa158015611422573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114469190613299565b505050509150508068ffffffffffffffffff16600014611479576040516306dd5d2560e01b815260040160405180910390fd5b600060048054806020026020016040519081016040528092919081815260200182805480156114d157602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116114b3575b50505050509050600060025482516114e9919061330f565b9050600581106114fa5760056114fc565b805b9050600080600060025490505b836002546115179190613322565b81101561162857600760008683815181106115345761153461314a565b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff1680156115af5750600960008683815181106115785761157861314a565b6020908102919091018101516001600160a01b0316825281019190915260400160002054600160801b90046001600160801b031615155b156115c2576115bf600183613322565b91505b600960008683815181106115d8576115d861314a565b6020908102919091018101516001600160a01b03168252810191909152604001600020546001600160801b03161561161857611615600184613322565b92505b611621816131ca565b9050611509565b5060008267ffffffffffffffff81111561164457611644613335565b60405190808252806020026020018201604052801561168957816020015b60408051808201909152600080825260208201528152602001906001900390816116625790505b50905060008267ffffffffffffffff8111156116a7576116a7613335565b6040519080825280602002602001820160405280156116ec57816020015b60408051808201909152600080825260208201528152602001906001900390816116c55790505b50905060008060008060025490505b886002546117099190613322565b811015611be6576000600960008c84815181106117285761172861314a565b6020908102919091018101516001600160a01b03168252810191909152604001600020546001600160801b0316156119df578a828151811061176c5761176c61314a565b60200260200101518786815181106117865761178661314a565b6020026020010151600001906001600160a01b031690816001600160a01b031681525050600960008c84815181106117c0576117c061314a565b6020908102919091018101516001600160a01b031682528101919091526040016000205487516001600160801b03909116908890879081106118045761180461314a565b602002602001015160200181815250508685815181106118265761182661314a565b6020026020010151602001518161183d9190613322565b905060007f00000000000000000000000087cc45fff5c0933bb6af6bae7fc013b7ec7df2ee6001600160a01b03166382c0ab218988815181106118825761188261314a565b6020026020010151600001518a89815181106118a0576118a061314a565b6020026020010151602001516040518363ffffffff1660e01b81526004016118dd9291906001600160a01b03929092168252602082015260400190565b602060405180830381865afa1580156118fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061191e9190613251565b90508060000361196b578b838151811061193a5761193a61314a565b602002602001015160405163e5f633bf60e01b8152600401610b2f91906001600160a01b0391909116815260200190565b6119758185613322565b935080600b60008a898151811061198e5761198e61314a565b602090810291909101810151516001600160a01b0316825281019190915260400160002080546001600160801b0319166001600160801b03929092169190911790556119db600187613322565b9550505b600760008c84815181106119f5576119f561314a565b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff168015611a705750600960008c8481518110611a3957611a3961314a565b6020908102919091018101516001600160a01b0316825281019190915260400160002054600160801b90046001600160801b031615155b15611b7e578a8281518110611a8757611a8761314a565b6020026020010151868581518110611aa157611aa161314a565b6020026020010151600001906001600160a01b031690816001600160a01b031681525050600960008c8481518110611adb57611adb61314a565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000160109054906101000a90046001600160801b03166001600160801b0316868581518110611b3557611b3561314a565b60200260200101516020018181525050858481518110611b5757611b5761314a565b60200260200101516020015181611b6e9190613322565b9050611b7b600185613322565b93505b611bd57f00000000000000000000000087cc45fff5c0933bb6af6bae7fc013b7ec7df2ee828d8581518110611bb557611bb561314a565b60200260200101516001600160a01b0316612a8a9092919063ffffffff16565b50611bdf816131ca565b90506116fb565b508060036000828254611bf99190613322565b925050819055506000621e84806001600160801b03167f0000000000000000000000009b122361e8708be33b785e44fce4d6ca86ab6c5a6001600160a01b031663e3a031bf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c919190613251565b611c9b9190613191565b90508715611d29576040516332758a4f60e21b81526001600160a01b037f00000000000000000000000094194de310b99d3c8a5b8c0768cfce7aef81d9be169063c9d6293c908390611cf6908a90600090819060040161334b565b6000604051808303818588803b158015611d0f57600080fd5b505af1158015611d23573d6000803e3d6000fd5b50505050505b8615611db6576040516332758a4f60e21b81526001600160a01b037f00000000000000000000000094194de310b99d3c8a5b8c0768cfce7aef81d9be169063c9d6293c908390611d8390899060019060009060040161334b565b6000604051808303818588803b158015611d9c57600080fd5b505af1158015611db0573d6000803e3d6000fd5b50505050505b8860026000828254611dc89190613322565b9091555050895160025403611e14576001805460ff60a81b1916600160a81b1790556040517fd6538235da08d97cc9982bb595ff5afec87439ef60cedecd8027b3d98ecd7c9f90600090a15b5050505050505050505050565b6000805260056020527f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bc5460ff16158015611e6c57503360009081526005602052604090205460ff16155b15611e89576040516282b42960e81b815260040160405180910390fd5b816001600160801b0316600003611eb35760405163339d6ef160e21b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000656dd8cb6001600160801b0316426001600160801b03161115611f065760405163ad66ce3560e01b815260040160405180910390fd5b808015611f2c57506001600160a01b03831660009081526007602052604090205460ff16155b80611f5057506001600160a01b03831660009081526006602052604090205460ff16155b15611f795760405163c89009d160e01b81526001600160a01b0384166004820152602401610b2f565b611f976001600160a01b03841633306001600160801b038616612b52565b801561206157336000908152600c602090815260408083206001600160a01b038716845290915290208054839190601090611fe3908490600160801b90046001600160801b03166133ac565b82546101009290920a6001600160801b038181021990931691831602179091556001600160a01b038516600090815260086020526040902080548593509091601091612038918591600160801b9004166133ac565b92506101000a8154816001600160801b0302191690836001600160801b0316021790555061210d565b336000908152600c602090815260408083206001600160a01b03871684529091528120805484929061209d9084906001600160801b03166133ac565b82546101009290920a6001600160801b038181021990931691831602179091556001600160a01b0385166000908152600860205260408120805486945090926120e8918591166133ac565b92506101000a8154816001600160801b0302191690836001600160801b031602179055505b6040516001600160801b03831681526001600160a01b0384169033907f01527be533d184d44e3111afa7800fa60ced6e1b44bd025f8b457deb8ce0ce359060200160405180910390a3505050565b600154600160b01b900460ff1615612186576040516344825a4b60e01b815260040160405180910390fd5b600154600160a81b900460ff166121b05760405163463c6fbd60e01b815260040160405180910390fd5b600154600160b81b900460ff166121dd57604051600162da483b60e01b0319815260040160405180910390fd5b6000805b828110156126275760008484838181106121fd576121fd61314a565b90506020020160208101906122129190612f2d565b336000908152600c602090815260408083206001600160a01b03851684529091528120549192506001600160801b0380831692600160801b900416906122588284613322565b905080600003612286576040516395c12ac560e01b81526001600160a01b0385166004820152602401610b2f565b80831561237c57336000908152600c602090815260408083206001600160a01b0389168452825280832080546001600160801b0319169055600a909152812054670de0b6b3a7640000906122e3906001600160801b031687613191565b6122ed91906131a8565b6001600160a01b038716600090815260096020526040812054919250906001600160801b031615612361576001600160a01b038716600090815260096020908152604080832054600b909252909120546001600160801b0391821691612354911684613191565b61235e91906131a8565b90505b61236b818a613322565b9850612377828461330f565b925050505b821561257757336000908152600c602090815260408083206001600160a01b0389168452825280832080546001600160801b03908116909155600a909252822054670de0b6b3a7640000916123d991600160801b90041686613191565b6123e391906131a8565b6001600160a01b03871660009081526009602052604081205491925090600160801b90046001600160801b031615612467576001600160a01b038716600090815260096020908152604080832054600b909252909120546001600160801b03600160801b9283900481169261245a92041684613191565b61246491906131a8565b90505b612471828461330f565b60405163074caa8760e11b81526001600160a01b0389811660048301529194507f000000000000000000000000c6f50903a058f3807111619bd4b24ca64b8239e190911690630e99550e90602401602060405180830381865afa1580156124dc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061250091906133d3565b60405163a9059cbb60e01b8152336004820152602481018390526001600160a01b03919091169063a9059cbb906044016020604051808303816000875af115801561254f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061257391906133f0565b5050505b8015612611576040516370a0823160e01b81523060048201526000906001600160a01b038716906370a0823190602401602060405180830381865afa1580156125c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125e89190613251565b90508181116125f757806125f9565b815b915061260f6001600160a01b0387163384612b8a565b505b505050505080612620906131ca565b90506121e1565b5060405163a9059cbb60e01b8152336004820152602481018290527f00000000000000000000000087cc45fff5c0933bb6af6bae7fc013b7ec7df2ee6001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015612695573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126b991906133f0565b5060405133907fcb250587370f33927d55e32e7179848ac061ee566b09bec555e9969b40e5dcd990600090a2505050565b6000546001600160a01b03163314612714576040516282b42960e81b815260040160405180910390fd5b426001600160801b037f00000000000000000000000000000000000000000000000000000000656dd8cb8116908216108061278057507f000000000000000000000000000000000000000000000000000000006571248b6001600160801b0316816001600160801b0316115b1561279e57604051637297e6a160e11b815260040160405180910390fd5b6001805460ff60b01b1916600160b01b1790556040517f5aadfea8cbffad0010bfde113179e0294f86136149cd37226668dd2ebdab377690600090a150565b6000546001600160a01b03163314612807576040516282b42960e81b815260040160405180910390fd5b610d5c6001600160a01b0384168383612b8a565b6000546001600160a01b03163314612845576040516282b42960e81b815260040160405180910390fd5b60005b81811015610d5c576001600560008585858181106128685761286861314a565b905060200201602081019061287d9190612f2d565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790556128ae816131ca565b9050612848565b600481815481106128c557600080fd5b6000918252602090912001546001600160a01b0316905081565b600154600160b01b900460ff16612909576040516339fbd58f60e11b815260040160405180910390fd5b60005b81811015610d5c5760008383838181106129285761292861314a565b905060200201602081019061293d9190612f2d565b336000908152600c602090815260408083206001600160a01b038516845290915281205491925090612981906001600160801b03600160801b8204811691166133ac565b336000818152600c602090815260408083206001600160a01b03881680855292528220919091556001600160801b039290921692506129c1919083612b8a565b6040518181526001600160a01b0383169033907fec1e5ed733e00f1a00915d56caef57b4f52312dde4f9b3165f213319a0da156b9060200160405180910390a3505080612a0d906131ca565b905061290c565b6000546001600160a01b03163314612a3e576040516282b42960e81b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b03831690811790915560405133907f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270090600090a350565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052612adb8482612bba565b612b4c576040516001600160a01b038416602482015260006044820152612b4290859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612c63565b612b4c8482612c63565b50505050565b6040516001600160a01b0380851660248301528316604482015260648101829052612b4c9085906323b872dd60e01b90608401612b0b565b6040516001600160a01b038316602482015260448101829052610d5c90849063a9059cbb60e01b90606401612b0b565b6000806000846001600160a01b031684604051612bd79190613431565b6000604051808303816000865af19150503d8060008114612c14576040519150601f19603f3d011682016040523d82523d6000602084013e612c19565b606091505b5091509150818015612c43575080511580612c43575080806020019051810190612c4391906133f0565b8015612c5857506001600160a01b0385163b15155b925050505b92915050565b6000612cb8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612d389092919063ffffffff16565b9050805160001480612cd9575080806020019051810190612cd991906133f0565b610d5c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610b2f565b6060612d478484600085612d4f565b949350505050565b606082471015612db05760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610b2f565b600080866001600160a01b03168587604051612dcc9190613431565b60006040518083038185875af1925050503d8060008114612e09576040519150601f19603f3d011682016040523d82523d6000602084013e612e0e565b606091505b5091509150612e1f87838387612e2a565b979650505050505050565b60608315612e99578251600003612e92576001600160a01b0385163b612e925760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b2f565b5081612d47565b612d478383815115612eae5781518083602001fd5b8060405162461bcd60e51b8152600401610b2f919061344d565b6020808252825182820181905260009190848201906040850190845b81811015612f095783516001600160a01b031683529284019291840191600101612ee4565b50909695505050505050565b6001600160a01b0381168114612f2a57600080fd5b50565b600060208284031215612f3f57600080fd5b8135612f4a81612f15565b9392505050565b60008083601f840112612f6357600080fd5b50813567ffffffffffffffff811115612f7b57600080fd5b6020830191508360208260051b85010111156112e957600080fd5b60008060008060408587031215612fac57600080fd5b843567ffffffffffffffff80821115612fc457600080fd5b612fd088838901612f51565b90965094506020870135915080821115612fe957600080fd5b50612ff687828801612f51565b95989497509550505050565b6000806020838503121561301557600080fd5b823567ffffffffffffffff81111561302c57600080fd5b61303885828601612f51565b90969095509350505050565b6000806040838503121561305757600080fd5b823561306281612f15565b9150602083013561307281612f15565b809150509250929050565b80356001600160801b038116811461309457600080fd5b919050565b8015158114612f2a57600080fd5b6000806000606084860312156130bc57600080fd5b83356130c781612f15565b92506130d56020850161307d565b915060408401356130e581613099565b809150509250925092565b60008060006060848603121561310557600080fd5b833561311081612f15565b9250602084013561312081612f15565b929592945050506040919091013590565b60006020828403121561314357600080fd5b5035919050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561317257600080fd5b612f4a8261307d565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417612c5d57612c5d61317b565b6000826131c557634e487b7160e01b600052601260045260246000fd5b500490565b6000600182016131dc576131dc61317b565b5060010190565b8183526000602080850194508260005b8581101561321f576001600160801b0361320c8361307d565b16875295820195908201906001016131f3565b509495945050505050565b60408152600061323e6040830186886131e3565b8281036020840152612e1f8185876131e3565b60006020828403121561326357600080fd5b5051919050565b805168ffffffffffffffffff8116811461309457600080fd5b805165ffffffffffff8116811461309457600080fd5b60008060008060008060c087890312156132b257600080fd5b865195506132c26020880161326a565b9450604087015161ffff811681146132d957600080fd5b93506132e760608801613283565b92506132f56080880161326a565b915061330360a08801613283565b90509295509295509295565b81810381811115612c5d57612c5d61317b565b80820180821115612c5d57612c5d61317b565b634e487b7160e01b600052604160045260246000fd5b606080825284519082018190526000906020906080840190828801845b8281101561339857815180516001600160a01b031685528501518585015260409093019290840190600101613368565b505050941515908301525060400152919050565b6001600160801b038181168382160190808211156133cc576133cc61317b565b5092915050565b6000602082840312156133e557600080fd5b8151612f4a81612f15565b60006020828403121561340257600080fd5b8151612f4a81613099565b60005b83811015613428578181015183820152602001613410565b50506000910152565b6000825161344381846020870161340d565b9190910192915050565b602081526000825180602084015261346c81604085016020870161340d565b601f01601f1916919091016040019291505056fea2646970667358221220596c2d177f94aadd6ca9e46971a879f68e406289b9084e6a19c0de082a95a8cf64736f6c63430008130033

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

0000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000040000000000000000000000000087cc45fff5c0933bb6af6bae7fc013b7ec7df2ee00000000000000000000000094194de310b99d3c8a5b8c0768cfce7aef81d9be000000000000000000000000c6f50903a058f3807111619bd4b24ca64b8239e10000000000000000000000009b122361e8708be33b785e44fce4d6ca86ab6c5a0000000000000000000000000000000000000000000000000000000000093a800000000000000000000000000000000000000000000000000000000000034bc00000000000000000000000000000000000000000000000000000000000000017000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c5990000000000000000000000001f9840a85d5af5bf1d1762f925bdaddc4201f9840000000000000000000000007fc66500c84a76ad7e9c93437bfc5ac33e2ddae90000000000000000000000009f8f72aa9304c8b593d555f12ef6589cc3a579a2000000000000000000000000d533a949740bb3306d119cc777fa900ba034cd520000000000000000000000005a98fcbea516cf06857215779fd812ca3bef1b32000000000000000000000000d33526068d116ce69f19a9ee46f0bd304f21a51f000000000000000000000000c011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f0000000000000000000000006123b0049f904d730db3c36a31167d9d4121fa6b000000000000000000000000808507121b80c02388fad14726482e061b8da8270000000000000000000000008207c1ffc5b6804f6024322ccf34f29c3541ae260000000000000000000000006dea81c8171d0ba574754ef6f8b412f2ed88c54d0000000000000000000000009e32b13ce7f2e80a01932b42553652e053d6ed8e00000000000000000000000072b886d09c117654ab7da13a14d603001de0b777000000000000000000000000bc396689893d065f41bc2c6ecbee5e00852334470000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000dbdb4d16eda451d0503b854cf79d55697f90c8df000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000005f98805a4e8be255a32880fdec7f6728c6568ba00000000000000000000000007f39c581f595b53c5cb19bd0b3f8da6c935e2ca0000000000000000000000000ae78736cd615f374d3085123a210448e74fc6393000000000000000000000000000000000000000000000000000000000000001700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _assets (address[]): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2,0x514910771AF9Ca656af840dff83E8264EcF986CA,0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599,0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984,0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9,0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2,0xD533a949740bb3306d119CC777fa900bA034cd52,0x5A98FcBEA516Cf06857215779Fd812CA3beF1B32,0xD33526068D116cE69F19A9ee46F0bd304F21A51f,0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F,0x6123B0049F904d730dB3C36a31167D9d4121fA6B,0x808507121B80c02388fAd14726482e061B8da827,0x8207c1FfC5B6804F6024322CcF34F29c3541Ae26,0x6DEA81C8171D0bA574754EF6F8b412F2Ed88c54D,0x9E32b13ce7f2E80A01932B42553652E053D6ed8e,0x72B886d09C117654aB7dA13A14d603001dE0B777,0xbC396689893D065F41bc2C6EcbeE5e0085233447,0x6B175474E89094C44Da98b954EedeAC495271d0F,0xdBdb4d16EdA451D0503b854CF79D55697F90c8DF,0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48,0x5f98805A4E8be255a32880FDeC7F6728C6568bA0,0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0,0xae78736Cd615f374D3085123A210448E74Fc6393
Arg [1] : _keepGovAllowed (bool[]): False,False,False,True,True,False,False,True,False,False,False,False,False,False,False,True,True,False,True,False,False,False,False
Arg [2] : _fyde (address): 0x87Cc45fFF5c0933bb6aF6bAe7Fc013b7eC7df2Ee
Arg [3] : _relayer (address): 0x94194DE310b99d3c8a5b8C0768cFCE7Aef81D9BE
Arg [4] : _governanceModule (address): 0xc6F50903a058f3807111619bD4B24cA64b8239E1
Arg [5] : _oracle (address): 0x9B122361E8708Be33B785e44FcE4d6ca86AB6C5a
Arg [6] : _escrowPeriod (uint128): 604800
Arg [7] : _freezePeriod (uint128): 216000

-----Encoded View---------------
56 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000400
Arg [2] : 00000000000000000000000087cc45fff5c0933bb6af6bae7fc013b7ec7df2ee
Arg [3] : 00000000000000000000000094194de310b99d3c8a5b8c0768cfce7aef81d9be
Arg [4] : 000000000000000000000000c6f50903a058f3807111619bd4b24ca64b8239e1
Arg [5] : 0000000000000000000000009b122361e8708be33b785e44fce4d6ca86ab6c5a
Arg [6] : 0000000000000000000000000000000000000000000000000000000000093a80
Arg [7] : 0000000000000000000000000000000000000000000000000000000000034bc0
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000017
Arg [9] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [10] : 000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca
Arg [11] : 0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599
Arg [12] : 0000000000000000000000001f9840a85d5af5bf1d1762f925bdaddc4201f984
Arg [13] : 0000000000000000000000007fc66500c84a76ad7e9c93437bfc5ac33e2ddae9
Arg [14] : 0000000000000000000000009f8f72aa9304c8b593d555f12ef6589cc3a579a2
Arg [15] : 000000000000000000000000d533a949740bb3306d119cc777fa900ba034cd52
Arg [16] : 0000000000000000000000005a98fcbea516cf06857215779fd812ca3bef1b32
Arg [17] : 000000000000000000000000d33526068d116ce69f19a9ee46f0bd304f21a51f
Arg [18] : 000000000000000000000000c011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f
Arg [19] : 0000000000000000000000006123b0049f904d730db3c36a31167d9d4121fa6b
Arg [20] : 000000000000000000000000808507121b80c02388fad14726482e061b8da827
Arg [21] : 0000000000000000000000008207c1ffc5b6804f6024322ccf34f29c3541ae26
Arg [22] : 0000000000000000000000006dea81c8171d0ba574754ef6f8b412f2ed88c54d
Arg [23] : 0000000000000000000000009e32b13ce7f2e80a01932b42553652e053d6ed8e
Arg [24] : 00000000000000000000000072b886d09c117654ab7da13a14d603001de0b777
Arg [25] : 000000000000000000000000bc396689893d065f41bc2c6ecbee5e0085233447
Arg [26] : 0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f
Arg [27] : 000000000000000000000000dbdb4d16eda451d0503b854cf79d55697f90c8df
Arg [28] : 000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
Arg [29] : 0000000000000000000000005f98805a4e8be255a32880fdec7f6728c6568ba0
Arg [30] : 0000000000000000000000007f39c581f595b53c5cb19bd0b3f8da6c935e2ca0
Arg [31] : 000000000000000000000000ae78736cd615f374d3085123a210448e74fc6393
Arg [32] : 0000000000000000000000000000000000000000000000000000000000000017
Arg [33] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [34] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [35] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [36] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [37] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [38] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [39] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [40] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [41] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [42] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [43] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [44] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [45] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [46] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [47] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [48] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [49] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [50] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [51] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [52] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [53] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [54] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [55] : 0000000000000000000000000000000000000000000000000000000000000000


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ 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.