ETH Price: $2,272.86 (+8.37%)

Contract

0xb9Eef048dcc5F9CC453029cC2ed21f4a558ad0E8
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Deposit Eth121037892021-03-24 20:38:061817 days ago1616618286IN
PieDAO: PLAY Oven V2
0.3 ETH0.02847738249
Withdraw121029952021-03-24 17:41:581817 days ago1616607718IN
PieDAO: PLAY Oven V2
0 ETH0.00469929186
Deposit Eth121020502021-03-24 14:17:061818 days ago1616595426IN
PieDAO: PLAY Oven V2
0.255 ETH0.02263922175
Deposit Eth120992032021-03-24 3:31:361818 days ago1616556696IN
PieDAO: PLAY Oven V2
0.2 ETH0.01155106101
Deposit Eth120990412021-03-24 2:59:241818 days ago1616554764IN
PieDAO: PLAY Oven V2
0.5 ETH0.01646884144
Save Token120986772021-03-24 1:36:501818 days ago1616549810IN
PieDAO: PLAY Oven V2
0 ETH0.00369348140
Deposit Eth120985592021-03-24 1:11:401818 days ago1616548300IN
PieDAO: PLAY Oven V2
0 ETH0.00525544179
Deposit Eth120985052021-03-24 0:58:251818 days ago1616547505IN
PieDAO: PLAY Oven V2
0.11 ETH0.01658321145
Deposit Eth120984852021-03-24 0:54:031818 days ago1616547243IN
PieDAO: PLAY Oven V2
2 ETH0.01875821145
Save Token120983592021-03-24 0:25:391818 days ago1616545539IN
PieDAO: PLAY Oven V2
0 ETH0.00662688160
Deposit Eth120983092021-03-24 0:15:361818 days ago1616544936IN
PieDAO: PLAY Oven V2
0.27 ETH0.01829872160
Deposit Eth120983092021-03-24 0:15:361818 days ago1616544936IN
PieDAO: PLAY Oven V2
3 ETH0.01829872160
Deposit Eth120983022021-03-24 0:13:431818 days ago1616544823IN
PieDAO: PLAY Oven V2
8.6 ETH0.01841308161
Deposit Eth120982352021-03-23 23:56:361818 days ago1616543796IN
PieDAO: PLAY Oven V2
0.65 ETH0.0138384121
Withdraw120981982021-03-23 23:49:251818 days ago1616543365IN
PieDAO: PLAY Oven V2
0 ETH0.00313777126
Deposit Eth120981962021-03-23 23:49:001818 days ago1616543340IN
PieDAO: PLAY Oven V2
0.005 ETH0.01419294124.1
Deposit Eth120981482021-03-23 23:37:411818 days ago1616542661IN
PieDAO: PLAY Oven V2
0.1 ETH0.01293719113.12
Deposit Eth120981432021-03-23 23:36:591818 days ago1616542619IN
PieDAO: PLAY Oven V2
0.2 ETH0.01258037110
Deposit Eth120981332021-03-23 23:34:311818 days ago1616542471IN
PieDAO: PLAY Oven V2
0.2 ETH0.01293719113.12
Deposit Eth120980132021-03-23 23:10:381818 days ago1616541038IN
PieDAO: PLAY Oven V2
1 ETH0.01520696132.9664
Deposit Eth120979632021-03-23 22:59:051818 days ago1616540345IN
PieDAO: PLAY Oven V2
0.24 ETH0.01566827137
Deposit Eth120979452021-03-23 22:56:511818 days ago1616540211IN
PieDAO: PLAY Oven V2
0.5 ETH0.01429587125
Deposit Eth120979172021-03-23 22:51:191818 days ago1616539879IN
PieDAO: PLAY Oven V2
0.6 ETH0.00808156132
Deposit Eth120979002021-03-23 22:47:221818 days ago1616539642IN
PieDAO: PLAY Oven V2
2 ETH0.01509644132
Deposit Eth120978742021-03-23 22:40:381818 days ago1616539238IN
PieDAO: PLAY Oven V2
0.75 ETH0.01486771130
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Method Block
From
To
-121037892021-03-24 20:38:061817 days ago1616618286
PieDAO: PLAY Oven V2
0.3 ETH
-121020502021-03-24 14:17:061818 days ago1616595426
PieDAO: PLAY Oven V2
0.255 ETH
-120992032021-03-24 3:31:361818 days ago1616556696
PieDAO: PLAY Oven V2
0.2 ETH
-120990412021-03-24 2:59:241818 days ago1616554764
PieDAO: PLAY Oven V2
0.5 ETH
-120985052021-03-24 0:58:251818 days ago1616547505
PieDAO: PLAY Oven V2
0.11 ETH
-120984852021-03-24 0:54:031818 days ago1616547243
PieDAO: PLAY Oven V2
2 ETH
-120983092021-03-24 0:15:361818 days ago1616544936
PieDAO: PLAY Oven V2
0.27 ETH
-120983092021-03-24 0:15:361818 days ago1616544936
PieDAO: PLAY Oven V2
3 ETH
-120983022021-03-24 0:13:431818 days ago1616544823
PieDAO: PLAY Oven V2
8.6 ETH
-120982352021-03-23 23:56:361818 days ago1616543796
PieDAO: PLAY Oven V2
0.65 ETH
-120981962021-03-23 23:49:001818 days ago1616543340
PieDAO: PLAY Oven V2
0.005 ETH
-120981482021-03-23 23:37:411818 days ago1616542661
PieDAO: PLAY Oven V2
0.1 ETH
-120981432021-03-23 23:36:591818 days ago1616542619
PieDAO: PLAY Oven V2
0.2 ETH
-120981332021-03-23 23:34:311818 days ago1616542471
PieDAO: PLAY Oven V2
0.2 ETH
-120980132021-03-23 23:10:381818 days ago1616541038
PieDAO: PLAY Oven V2
1 ETH
-120979632021-03-23 22:59:051818 days ago1616540345
PieDAO: PLAY Oven V2
0.24 ETH
-120979452021-03-23 22:56:511818 days ago1616540211
PieDAO: PLAY Oven V2
0.5 ETH
-120979172021-03-23 22:51:191818 days ago1616539879
PieDAO: PLAY Oven V2
0.6 ETH
-120979002021-03-23 22:47:221818 days ago1616539642
PieDAO: PLAY Oven V2
2 ETH
-120978742021-03-23 22:40:381818 days ago1616539238
PieDAO: PLAY Oven V2
0.75 ETH
-120978412021-03-23 22:34:401818 days ago1616538880
PieDAO: PLAY Oven V2
0.3 ETH
-120978112021-03-23 22:27:411818 days ago1616538461
PieDAO: PLAY Oven V2
0.2 ETH
-120978112021-03-23 22:27:411818 days ago1616538461
PieDAO: PLAY Oven V2
0.6 ETH
-120977702021-03-23 22:18:051818 days ago1616537885
PieDAO: PLAY Oven V2
1 ETH
-120977622021-03-23 22:15:371818 days ago1616537737
PieDAO: PLAY Oven V2
1 ETH
View All Internal Transactions
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:
EthOven

Compiler Version
v0.8.1+commit.df193b15

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
//SPDX-License-Identifier: Unlicense
pragma solidity 0.8.1;

import "./Oven.sol";

contract EthOven is Oven {

    constructor(
        address _weth,
        address _outputToken,
        uint256 _roundSize,
        address _recipe
    ) Oven(_weth, _outputToken, _roundSize, _recipe) {
        // Nothing, reusing parent constructor
    }

    receive() external payable {
        address(inputToken).call{value: msg.value}("");
        _depositTo(msg.value, _msgSender());
    }

    function depositEth() external payable {
        address(inputToken).call{value: msg.value}("");
        _depositTo(msg.value, _msgSender());
    }

    function depositEthTo(address _to) external payable {
        address(inputToken).call{value: msg.value}("");
        _depositTo(msg.value, _to);
    }
}

//SPDX-License-Identifier: Unlicense
pragma solidity 0.8.1;


import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; 
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "./interfaces/IRecipe.sol"; 


contract Oven is AccessControl {
  using SafeERC20 for IERC20;
  using Math for uint256;

  bytes32 constant public BAKER_ROLE = keccak256(abi.encode("BAKER_ROLE"));
  uint256 constant public MAX_FEE = 10 * 10**16; //10%

  IERC20 immutable inputToken;
  IERC20 immutable outputToken;


  uint256 public roundSizeInputAmount;
  IRecipe public recipe;


  struct Round {
    uint256 totalDeposited;
    mapping(address => uint256) deposits;

    uint256 totalBakedInput;
    uint256 totalOutput;
  }

  struct ViewRound {
    uint256 totalDeposited;
    uint256 totalBakedInput;
    uint256 totalOutput;
  }

  Round[] public rounds;

  mapping(address => uint256[]) userRounds;

  uint256 public fee = 0; //default 0% (10**16 == 1%)
  address public feeReceiver;

  event Deposit(address indexed from, address indexed to, uint256 amount);
  event Withdraw(address indexed from, address indexed to, uint256 inputAmount, uint256 outputAmount);
  event FeeReceiverUpdate(address indexed previousReceiver, address indexed newReceiver);
  event FeeUpdate(uint256 previousFee, uint256 newFee);
  event RecipeUpdate(address indexed oldRecipe, address indexed newRecipe);
  event RoundSizeUpdate(uint256 oldRoundSize, uint256 newRoundSize);

  modifier onlyBaker() {
    require(hasRole(BAKER_ROLE, _msgSender()), "NOT_BAKER");
    _;
  }

  modifier onlyAdmin() {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "NOT_ADMIN");
    _;
  }

  constructor(address _inputToken, address _outputToken, uint256 _roundSizeInputAmount, address _recipe) {
    require(_inputToken != address(0), "INPUT_TOKEN_ZERO");
    require(_outputToken != address(0), "OUTPUT_TOKEN_ZERO");
    require(_recipe != address(0), "RECIPE_ZERO");
    
    inputToken = IERC20(_inputToken);
    outputToken = IERC20(_outputToken);
    roundSizeInputAmount = _roundSizeInputAmount;
    recipe = IRecipe(_recipe);

    // create first empty round
    rounds.push();

    // approve input token
    IERC20(_inputToken).safeApprove(_recipe, type(uint256).max);

    //grant default admin role
    _setRoleAdmin(DEFAULT_ADMIN_ROLE, DEFAULT_ADMIN_ROLE);
    _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());

    //grant baker role
    _setRoleAdmin(BAKER_ROLE, DEFAULT_ADMIN_ROLE);
    _setupRole(BAKER_ROLE, _msgSender());
  }

  function deposit(uint256 _amount) external {
    depositTo(_amount, _msgSender());
  }

  function depositTo(uint256 _amount, address _to) public {
    IERC20 inputToken_ = inputToken;
    inputToken_.safeTransferFrom(_msgSender(), address(this), _amount);
    _depositTo(_amount, _to);
  }

  function _depositTo(uint256 _amount, address _to) internal {
    uint256 roundSizeInputAmount_ = roundSizeInputAmount; //gas saving

    uint256 currentRound = rounds.length - 1;
    uint256 deposited = 0;

    while(deposited < _amount) {
      //if the current round does not exist create it
      if(currentRound >= rounds.length) {
        rounds.push();
      }

      //if the round is already partially baked create a new round
      if(rounds[currentRound].totalBakedInput != 0) {
        currentRound ++;
        rounds.push();
      }

      Round storage round = rounds[currentRound];

      uint256 roundDeposit = (_amount - deposited).min(roundSizeInputAmount_ - round.totalDeposited);

      round.totalDeposited += roundDeposit;
      round.deposits[_to] += roundDeposit;

      deposited += roundDeposit;

      pushUserRound(_to, currentRound);

      // if full amount assigned to rounds break the loop
      if(deposited == _amount) {
        break;
      }

      currentRound ++;
    }

    emit Deposit(_msgSender(), _to, _amount);
  }

  function pushUserRound(address _to, uint256 _roundId) internal {
    // only push when its not already added
    if(userRounds[_to].length == 0 || userRounds[_to][userRounds[_to].length - 1] != _roundId) {
      userRounds[_to].push(_roundId);
    }     
  }

  function withdraw(uint256 _roundsLimit) public {
    withdrawTo(_msgSender(), _roundsLimit);
  }


  function withdrawTo(address _to, uint256 _roundsLimit) public {
    uint256 inputAmount;
    uint256 outputAmount;
    
    uint256 userRoundsLength = userRounds[_msgSender()].length;
    uint256 numRounds = userRoundsLength.min(_roundsLimit);

    for(uint256 i = 0; i < numRounds; i ++) {
      // start at end of array for efficient popping of elements
      uint256 roundIndex = userRoundsLength - i - 1;

      Round storage round = rounds[roundIndex];

      //amount of input of user baked
      uint256 bakedInput = round.deposits[_msgSender()] * round.totalBakedInput / round.totalDeposited;
      //amount of output the user is entitled to

      uint256 userRoundOutput;
      if(bakedInput == 0) {
        userRoundOutput = 0;
      } else {
        userRoundOutput = round.totalOutput * bakedInput / round.totalBakedInput;
      }
      
      // unbaked input
      inputAmount += round.deposits[_msgSender()] - bakedInput;
      //amount of output the user is entitled to
      outputAmount += userRoundOutput;

      round.totalDeposited -= round.deposits[_msgSender()] - bakedInput;
      round.deposits[_msgSender()] = 0;
      round.totalBakedInput -= bakedInput;

      round.totalOutput -= userRoundOutput;

      //pop of user round
      userRounds[_msgSender()].pop();
    }

    if(inputAmount != 0) {
      // handle rounding issues due to integer division inaccuracies
      inputAmount = inputAmount.min(inputToken.balanceOf(address(this)));
      inputToken.safeTransfer(_to, inputAmount);
    }
    
    if(outputAmount != 0) {
      // handle rounding issues due to integer division inaccuracies
      outputAmount = outputAmount.min(outputToken.balanceOf(address(this)));
      outputToken.safeTransfer(_to, outputAmount);
    }

    emit Withdraw(_msgSender(), _to, inputAmount, outputAmount);
  }

  function bake(bytes calldata _data, uint256[] memory _rounds) external onlyBaker {
    uint256 maxInputAmount;

    //get input amount
    for(uint256 i = 0; i < _rounds.length; i ++) {
      
      // prevent round from being baked twice
      if(i != 0) {
        require(_rounds[i] > _rounds[i - 1], "Rounds out of order");
      }

      Round storage round = rounds[_rounds[i]];
      maxInputAmount += (round.totalDeposited - round.totalBakedInput);
    }

    // subtract fee amount from input
    uint256 maxInputAmountMinusFee = maxInputAmount * (10**18 - fee) / 10**18;

    //bake
    (uint256 inputUsed, uint256 outputAmount) = recipe.bake(address(inputToken), address(outputToken), maxInputAmountMinusFee, _data);

    uint256 inputUsedRemaining = inputUsed;

    for(uint256 i = 0; i < _rounds.length; i ++) {
      Round storage round = rounds[_rounds[i]];

      uint256 roundInputBaked = (round.totalDeposited - round.totalBakedInput).min(inputUsedRemaining);

      // skip round if it is already baked
      if(roundInputBaked == 0) {
        continue;
      }

  	  uint256 roundInputBakedWithFee = roundInputBaked * 10**18 / (10**18 - fee);

      uint256 roundOutputBaked = outputAmount * roundInputBaked / inputUsed;

      round.totalBakedInput += roundInputBakedWithFee;
      inputUsedRemaining -= roundInputBaked;
      round.totalOutput += roundOutputBaked;

      //sanity check
      require(round.totalBakedInput <= round.totalDeposited, "Input sanity check failed");
    }

    uint256 feeAmount = (inputUsed * 10**18 / (10**18 - fee)) - inputUsed;
    address feeReceiver_ = feeReceiver; //gas saving
    if(feeAmount != 0) {
      
      // if no fee receiver is set send it to the baker
      if(feeReceiver == address(0)) {
        feeReceiver_ = _msgSender();
      }
      inputToken.safeTransfer(feeReceiver_, feeAmount);
    }
    
  }

  function setFee(uint256 _newFee) external onlyAdmin {
    require(_newFee <= MAX_FEE, "INVALID_FEE");
    emit FeeUpdate(fee, _newFee);
    fee = _newFee;
  }

  function setRoundSize(uint256 _roundSize) external onlyAdmin {
    emit RoundSizeUpdate(roundSizeInputAmount, _roundSize);
    roundSizeInputAmount = _roundSize;
  }

  function setRecipe(address _recipe) external onlyAdmin {
    emit RecipeUpdate(address(recipe), _recipe);
    
    //revoke old approval
    inputToken.approve(address(recipe), 0);

    recipe = IRecipe(_recipe);

    //set new approval
    inputToken.approve(address(recipe), type(uint256).max);
  }

  function saveToken(address _token, address _to, uint256 _amount) external onlyAdmin {
    IERC20(_token).transfer(_to, _amount);
  }
  
  function saveEth(address payable _to, uint256 _amount) external onlyAdmin {
    _to.call{value: _amount}("");
  }

  function setFeeReceiver(address _feeReceiver) external onlyAdmin {
    emit FeeReceiverUpdate(feeReceiver, _feeReceiver);
    feeReceiver = _feeReceiver;
  }

  function roundInputBalanceOf(uint256 _round, address _of) public view returns(uint256) {
    Round storage round = rounds[_round];
    // if there are zero deposits the input balance of `_of` would be zero too
    if(round.totalDeposited == 0) {
      return 0;
    }
    uint256 bakedInput = round.deposits[_of] * round.totalBakedInput / round.totalDeposited;
    return round.deposits[_of] - bakedInput;
  }

  function inputBalanceOf(address _of) public view returns(uint256) {
    uint256 roundsCount = userRounds[_of].length;

    uint256 balance;

    for(uint256 i = 0; i < roundsCount; i ++) {
      balance += roundInputBalanceOf(userRounds[_of][i], _of);
    }

    return balance;
  }

  function roundOutputBalanceOf(uint256 _round, address _of) public view returns(uint256) {
    Round storage round = rounds[_round];

    if(round.totalBakedInput == 0) {
      return 0;
    }

    //amount of input of user baked
    uint256 bakedInput = round.deposits[_of] * round.totalBakedInput / round.totalDeposited;
    //amount of output the user is entitled to
    uint256 userRoundOutput = round.totalOutput * bakedInput / round.totalBakedInput;

    return userRoundOutput;
  }

  function outputBalanceOf(address _of) external view returns(uint256) {
    uint256 roundsCount = userRounds[_of].length;

    uint256 balance;

    for(uint256 i = 0; i < roundsCount; i ++) {
      balance += roundOutputBalanceOf(userRounds[_of][i], _of);
    }

    return balance;
  }

  function getUserRoundsCount(address _user) external view returns(uint256) {
    return userRounds[_user].length;
  }

  function getRoundsCount() external view returns(uint256) {
    return rounds.length;
  }

  // Gets all rounds. Might run out of gas after many rounds
  function getRounds() external view returns (ViewRound[] memory) {
    return getRoundsRange(0, rounds.length -1);
  }

  function getRoundsRange(uint256 _from, uint256 _to) public view returns(ViewRound[] memory) {
    ViewRound[] memory result = new ViewRound[](_to - _from + 1);

    for(uint256 i = _from; i <= _to; i ++) {
      Round storage round = rounds[i];
      result[i].totalDeposited = round.totalDeposited;
      result[i].totalBakedInput = round.totalBakedInput;
      result[i].totalOutput = round.totalOutput;
    }

    return result;
  }

}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.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;

    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    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'
        // solhint-disable-next-line max-line-length
        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));
    }

    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    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");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @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");
        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow, so we distribute
        return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
    }
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context {
    struct RoleData {
        mapping (address => bool) members;
        bytes32 adminRole;
    }

    mapping (bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual {
        require(hasRole(getRoleAdmin(role), _msgSender()), "AccessControl: sender must be an admin to grant");

        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual {
        require(hasRole(getRoleAdmin(role), _msgSender()), "AccessControl: sender must be an admin to revoke");

        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        emit RoleAdminChanged(role, getRoleAdmin(role), adminRole);
        _roles[role].adminRole = adminRole;
    }

    function _grantRole(bytes32 role, address account) private {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    function _revokeRole(bytes32 role, address account) private {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 7 of 9 : IRecipe.sol
//SPDX-License-Identifier: Unlicense
pragma solidity 0.8.1;

interface IRecipe {
    function bake(
        address _inputToken,
        address _outputToken,
        uint256 _maxInput,
        bytes memory _data
    ) external returns (uint256 inputAmountUsed, uint256 outputAmount);
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

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

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @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) {
        require(isContract(target), "Address: delegate call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

Settings
{
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_weth","type":"address"},{"internalType":"address","name":"_outputToken","type":"address"},{"internalType":"uint256","name":"_roundSize","type":"uint256"},{"internalType":"address","name":"_recipe","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousReceiver","type":"address"},{"indexed":true,"internalType":"address","name":"newReceiver","type":"address"}],"name":"FeeReceiverUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"previousFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"FeeUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldRecipe","type":"address"},{"indexed":true,"internalType":"address","name":"newRecipe","type":"address"}],"name":"RecipeUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldRoundSize","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newRoundSize","type":"uint256"}],"name":"RoundSizeUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"inputAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"outputAmount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"BAKER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_data","type":"bytes"},{"internalType":"uint256[]","name":"_rounds","type":"uint256[]"}],"name":"bake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositEth","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"depositEthTo","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"depositTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRounds","outputs":[{"components":[{"internalType":"uint256","name":"totalDeposited","type":"uint256"},{"internalType":"uint256","name":"totalBakedInput","type":"uint256"},{"internalType":"uint256","name":"totalOutput","type":"uint256"}],"internalType":"struct Oven.ViewRound[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRoundsCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"}],"name":"getRoundsRange","outputs":[{"components":[{"internalType":"uint256","name":"totalDeposited","type":"uint256"},{"internalType":"uint256","name":"totalBakedInput","type":"uint256"},{"internalType":"uint256","name":"totalOutput","type":"uint256"}],"internalType":"struct Oven.ViewRound[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getUserRoundsCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_of","type":"address"}],"name":"inputBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_of","type":"address"}],"name":"outputBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"recipe","outputs":[{"internalType":"contract IRecipe","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_round","type":"uint256"},{"internalType":"address","name":"_of","type":"address"}],"name":"roundInputBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_round","type":"uint256"},{"internalType":"address","name":"_of","type":"address"}],"name":"roundOutputBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"roundSizeInputAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rounds","outputs":[{"internalType":"uint256","name":"totalDeposited","type":"uint256"},{"internalType":"uint256","name":"totalBakedInput","type":"uint256"},{"internalType":"uint256","name":"totalOutput","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"saveEth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"saveToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newFee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeReceiver","type":"address"}],"name":"setFeeReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipe","type":"address"}],"name":"setRecipe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_roundSize","type":"uint256"}],"name":"setRoundSize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_roundsLimit","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_roundsLimit","type":"uint256"}],"name":"withdrawTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60c060405260006005553480156200001657600080fd5b50604051620056d4380380620056d483398181016040528101906200003c9190620009d8565b83838383600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415620000b3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000aa9062000d27565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141562000126576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200011d9062000df3565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141562000199576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001909062000d49565b60405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250508273ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508160018190555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600360018160018154018082558091505003906000526020600020905050620002bf817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8673ffffffffffffffffffffffffffffffffffffffff166200038b60201b620029b0179092919060201c565b620002d76000801b6000801b620004fd60201b60201c565b620002fb6000801b620002ef6200055a60201b60201c565b6200056260201b60201c565b62000336604051602001620003109062000d6b565b604051602081830303815290604052805190602001206000801b620004fd60201b60201c565b6200037d6040516020016200034b9062000d6b565b60405160208183030381529060405280519060200120620003716200055a60201b60201c565b6200056260201b60201c565b5050505050505050620010e0565b60008114806200042b575060008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b8152600401620003d592919062000c87565b60206040518083038186803b158015620003ee57600080fd5b505afa15801562000403573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000429919062000a70565b145b6200046d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620004649062000dd1565b60405180910390fd5b620004f88363095ea7b360e01b84846040516024016200048f92919062000cb4565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506200057860201b60201c565b505050565b806200050f836200064c60201b60201c565b837fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff60405160405180910390a480600080848152602001908152602001600020600101819055505050565b600033905090565b6200057482826200066b60201b60201c565b5050565b6000620005e1826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166200075c60201b62002b0e179092919060201c565b905060008151111562000647578080602001905181019062000604919062000a44565b62000646576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200063d9062000daf565b60405180910390fd5b5b505050565b6000806000838152602001908152602001600020600101549050919050565b6200067d82826200077c60201b60201c565b6200075857600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550620006fd6200055a60201b60201c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6060620007738484600085620007e660201b60201c565b90509392505050565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6060824710156200082e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620008259062000d05565b60405180910390fd5b6200083f856200091460201b60201c565b62000881576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620008789062000d8d565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051620008ac919062000c6e565b60006040518083038185875af1925050503d8060008114620008eb576040519150601f19603f3d011682016040523d82523d6000602084013e620008f0565b606091505b5091509150620009088282866200092760201b60201c565b92505050949350505050565b600080823b905060008111915050919050565b6060831562000939578290506200098c565b6000835111156200094d5782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000983919062000ce1565b60405180910390fd5b9392505050565b600081519050620009a48162001092565b92915050565b600081519050620009bb81620010ac565b92915050565b600081519050620009d281620010c6565b92915050565b60008060008060808587031215620009ef57600080fd5b6000620009ff8782880162000993565b945050602062000a128782880162000993565b935050604062000a2587828801620009c1565b925050606062000a388782880162000993565b91505092959194509250565b60006020828403121562000a5757600080fd5b600062000a6784828501620009aa565b91505092915050565b60006020828403121562000a8357600080fd5b600062000a9384828501620009c1565b91505092915050565b62000aa78162000e47565b82525050565b600062000aba8262000e15565b62000ac6818562000e2b565b935062000ad881856020860162000e91565b80840191505092915050565b600062000af18262000e20565b62000afd818562000e36565b935062000b0f81856020860162000e91565b62000b1a8162000ec7565b840191505092915050565b600062000b3460268362000e36565b915062000b418262000ed8565b604082019050919050565b600062000b5b60108362000e36565b915062000b688262000f27565b602082019050919050565b600062000b82600b8362000e36565b915062000b8f8262000f50565b602082019050919050565b600062000ba9600a8362000e36565b915062000bb68262000f79565b602082019050919050565b600062000bd0601d8362000e36565b915062000bdd8262000fa2565b602082019050919050565b600062000bf7602a8362000e36565b915062000c048262000fcb565b604082019050919050565b600062000c1e60368362000e36565b915062000c2b826200101a565b604082019050919050565b600062000c4560118362000e36565b915062000c528262001069565b602082019050919050565b62000c688162000e87565b82525050565b600062000c7c828462000aad565b915081905092915050565b600060408201905062000c9e600083018562000a9c565b62000cad602083018462000a9c565b9392505050565b600060408201905062000ccb600083018562000a9c565b62000cda602083018462000c5d565b9392505050565b6000602082019050818103600083015262000cfd818462000ae4565b905092915050565b6000602082019050818103600083015262000d208162000b25565b9050919050565b6000602082019050818103600083015262000d428162000b4c565b9050919050565b6000602082019050818103600083015262000d648162000b73565b9050919050565b6000602082019050818103600083015262000d868162000b9a565b9050919050565b6000602082019050818103600083015262000da88162000bc1565b9050919050565b6000602082019050818103600083015262000dca8162000be8565b9050919050565b6000602082019050818103600083015262000dec8162000c0f565b9050919050565b6000602082019050818103600083015262000e0e8162000c36565b9050919050565b600081519050919050565b600081519050919050565b600081905092915050565b600082825260208201905092915050565b600062000e548262000e67565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b8381101562000eb157808201518184015260208101905062000e94565b8381111562000ec1576000848401525b50505050565b6000601f19601f8301169050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f494e5055545f544f4b454e5f5a45524f00000000000000000000000000000000600082015250565b7f5245434950455f5a45524f000000000000000000000000000000000000000000600082015250565b7f42414b45525f524f4c4500000000000000000000000000000000000000000000600082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60008201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000602082015250565b7f4f55545055545f544f4b454e5f5a45524f000000000000000000000000000000600082015250565b6200109d8162000e47565b8114620010a957600080fd5b50565b620010b78162000e5b565b8114620010c357600080fd5b50565b620010d18162000e87565b8114620010dd57600080fd5b50565b60805160601c60a05160601c61457b620011596000396000818161112f015281816111ee0152611bf00152600081816102040152818161101e015281816110dd0152818161157c0152818161168e0152818161187901528181611bcf01528181611f3401528181612104015261291c015261457b6000f3fe6080604052600436106101fd5760003560e01c806370aff70f1161010d578063b13820a7116100a0578063cc2f7c9c1161006f578063cc2f7c9c146107db578063d547741f14610818578063ddca3f4314610841578063efdcd9741461086c578063fd25c89f146108955761029e565b8063b13820a71461071f578063b3f006741461075c578063b6b55f2514610787578063bc063e1a146107b05761029e565b80639bf70abd116100dc5780639bf70abd14610661578063a09686c41461068c578063a217fddf146106b7578063ab469353146106e25761029e565b806370aff70f146105935780638c65c81f146105bc57806391d14854146105fb5780639afdb2c2146106385761029e565b806336568abe11610190578063439370b11161015f578063439370b1146104e35780636984d070146104ed578063698d54741461051857806369fe0e2d146105415780636e9e1f511461056a5761029e565b806336568abe1461042957806336f58588146104525780633a1d2d021461047d57806343926575146104a65761029e565b8063248a9ca3116101cc578063248a9ca31461037157806327726e7d146103ae5780632e1a7d4d146103d75780632f2ff15d146104005761029e565b80630897259d146102a357806309bb8bc1146102e05780630e66c1e01461030b578063205c2878146103485761029e565b3661029e577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163460405161024690613a20565b60006040518083038185875af1925050503d8060008114610283576040519150601f19603f3d011682016040523d82523d6000602084013e610288565b606091505b50505061029c346102976108b1565b6108b9565b005b600080fd5b3480156102af57600080fd5b506102ca60048036038101906102c59190613373565b610b2b565b6040516102d79190613d85565b60405180910390f35b3480156102ec57600080fd5b506102f5610c39565b6040516103029190613d85565b60405180910390f35b34801561031757600080fd5b50610332600480360381019061032d9190613373565b610c3f565b60405161033f9190613d85565b60405180910390f35b34801561035457600080fd5b5061036f600480360381019061036a9190613427565b610c8b565b005b34801561037d57600080fd5b506103986004803603810190610393919061348c565b6112a9565b6040516103a59190613b8d565b60405180910390f35b3480156103ba57600080fd5b506103d560048036038101906103d0919061339c565b6112c8565b005b3480156103e357600080fd5b506103fe60048036038101906103f99190613561565b611388565b005b34801561040c57600080fd5b50610427600480360381019061042291906134b5565b61139c565b005b34801561043557600080fd5b50610450600480360381019061044b91906134b5565b611402565b005b34801561045e57600080fd5b50610467611485565b6040516104749190613ba8565b60405180910390f35b34801561048957600080fd5b506104a4600480360381019061049f9190613373565b6114ab565b005b3480156104b257600080fd5b506104cd60048036038101906104c891906135b3565b61177f565b6040516104da9190613d85565b60405180910390f35b6104eb611877565b005b3480156104f957600080fd5b50610502611913565b60405161050f9190613b50565b60405180910390f35b34801561052457600080fd5b5061053f600480360381019061053a91906134f1565b611936565b005b34801561054d57600080fd5b5061056860048036038101906105639190613561565b611f85565b005b34801561057657600080fd5b50610591600480360381019061058c9190613561565b612068565b005b34801561059f57600080fd5b506105ba60048036038101906105b591906135b3565b612100565b005b3480156105c857600080fd5b506105e360048036038101906105de9190613561565b612168565b6040516105f293929190613dc9565b60405180910390f35b34801561060757600080fd5b50610622600480360381019061061d91906134b5565b6121a2565b60405161062f9190613b72565b60405180910390f35b34801561064457600080fd5b5061065f600480360381019061065a91906133d8565b61220c565b005b34801561066d57600080fd5b506106766122f2565b6040516106839190613b8d565b60405180910390f35b34801561069857600080fd5b506106a161231a565b6040516106ae9190613d85565b60405180910390f35b3480156106c357600080fd5b506106cc612327565b6040516106d99190613b8d565b60405180910390f35b3480156106ee57600080fd5b50610709600480360381019061070491906135ef565b61232e565b6040516107169190613b50565b60405180910390f35b34801561072b57600080fd5b5061074660048036038101906107419190613373565b612527565b6040516107539190613d85565b60405180910390f35b34801561076857600080fd5b50610771612635565b60405161077e9190613a35565b60405180910390f35b34801561079357600080fd5b506107ae60048036038101906107a99190613561565b61265b565b005b3480156107bc57600080fd5b506107c561266f565b6040516107d29190613d85565b60405180910390f35b3480156107e757600080fd5b5061080260048036038101906107fd91906135b3565b61267b565b60405161080f9190613d85565b60405180910390f35b34801561082457600080fd5b5061083f600480360381019061083a91906134b5565b61279b565b005b34801561084d57600080fd5b50610856612801565b6040516108639190613d85565b60405180910390f35b34801561087857600080fd5b50610893600480360381019061088e9190613373565b612807565b005b6108af60048036038101906108aa9190613373565b61291a565b005b600033905090565b60006001549050600060016003805490506108d49190613fae565b905060005b84811015610ab857600380549050821061090c576003600181600181540180825580915050039060005260206000209050505b600060038381548110610948577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000209060040201600201541461098c57818061096a906140ef565b9250506003600181600181540180825580915050039060005260206000209050505b6000600383815481106109c8577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020906004020190506000610a078260000154866109ed9190613fae565b84896109f99190613fae565b612b2690919063ffffffff16565b905080826000016000828254610a1d9190613ecd565b92505081905550808260010160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610a759190613ecd565b925050819055508083610a889190613ecd565b9250610a948685612b3f565b86831415610aa3575050610ab8565b8380610aae906140ef565b94505050506108d9565b8373ffffffffffffffffffffffffffffffffffffffff16610ad76108b1565b73ffffffffffffffffffffffffffffffffffffffff167f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f6287604051610b1c9190613d85565b60405180910390a35050505050565b600080600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490509050600080600090505b82811015610c2e57610c0e600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208281548110610bfd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002001548661267b565b82610c199190613ecd565b91508080610c26906140ef565b915050610b7b565b508092505050919050565b60015481565b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490509050919050565b600080600060046000610c9c6108b1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054905090506000610cf18583612b2690919063ffffffff16565b905060005b8181101561101057600060018285610d0e9190613fae565b610d189190613fae565b9050600060038281548110610d56577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600402019050600081600001548260020154836001016000610d806108b1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610dc59190613f54565b610dcf9190613f23565b9050600080821415610de45760009050610e06565b8260020154828460030154610df99190613f54565b610e039190613f23565b90505b81836001016000610e156108b1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610e5a9190613fae565b89610e659190613ecd565b98508088610e739190613ecd565b975081836001016000610e846108b1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ec99190613fae565b836000016000828254610edc9190613fae565b925050819055506000836001016000610ef36108b1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081836002016000828254610f459190613fae565b9250508190555080836003016000828254610f609190613fae565b9250508190555060046000610f736108b1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805480610fe3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60019003818190600052602060002001600090559055505050508080611008906140ef565b915050610cf6565b5060008414611122576110d47f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016110759190613a35565b60206040518083038186803b15801561108d57600080fd5b505afa1580156110a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c5919061358a565b85612b2690919063ffffffff16565b935061112186857f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16612ccf9092919063ffffffff16565b5b60008314611233576111e57f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016111869190613a35565b60206040518083038186803b15801561119e57600080fd5b505afa1580156111b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d6919061358a565b84612b2690919063ffffffff16565b925061123286847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16612ccf9092919063ffffffff16565b5b8573ffffffffffffffffffffffffffffffffffffffff166112526108b1565b73ffffffffffffffffffffffffffffffffffffffff167ff341246adaac6f497bc2a656f546ab9e182111d630394f0c57c710a59a2cb5678686604051611299929190613da0565b60405180910390a3505050505050565b6000806000838152602001908152602001600020600101549050919050565b6112dc6000801b6112d76108b1565b6121a2565b61131b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131290613ca5565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff168160405161133f90613a20565b60006040518083038185875af1925050503d806000811461137c576040519150601f19603f3d011682016040523d82523d6000602084013e611381565b606091505b5050505050565b6113996113936108b1565b82610c8b565b50565b6113b56113a8836112a9565b6113b06108b1565b6121a2565b6113f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113eb90613be5565b60405180910390fd5b6113fe8282612d55565b5050565b61140a6108b1565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611477576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146e90613d65565b60405180910390fd5b6114818282612e35565b5050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6114bf6000801b6114ba6108b1565b6121a2565b6114fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114f590613ca5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fb9857602e97987b195db5ebe90c04eacc12885767bc5754c47a2c637afa37e4460405160405180910390a37f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660006040518363ffffffff1660e01b81526004016115f8929190613afe565b602060405180830381600087803b15801561161257600080fd5b505af1158015611626573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061164a9190613463565b5080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611729929190613b27565b602060405180830381600087803b15801561174357600080fd5b505af1158015611757573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061177b9190613463565b5050565b600080600384815481106117bc577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020906004020190506000816002015414156117e3576000915050611871565b6000816000015482600201548360010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461183b9190613f54565b6118459190613f23565b90506000826002015482846003015461185e9190613f54565b6118689190613f23565b90508093505050505b92915050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16346040516118bb90613a20565b60006040518083038185875af1925050503d80600081146118f8576040519150601f19603f3d011682016040523d82523d6000602084013e6118fd565b606091505b5050506119113461190c6108b1565b6108b9565b565b60606119316000600160038054905061192c9190613fae565b61232e565b905090565b61196b60405160200161194890613cc5565b604051602081830303815290604052805190602001206119666108b1565b6121a2565b6119aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119a190613c05565b60405180910390fd5b600080600090505b8251811015611b535760008114611a9257826001826119d19190613fae565b81518110611a08577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151838281518110611a49577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015111611a91576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a8890613d05565b60405180910390fd5b5b60006003848381518110611acf577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015181548110611b0e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000209060040201905080600201548160000154611b329190613fae565b83611b3d9190613ecd565b9250508080611b4b906140ef565b9150506119b2565b506000670de0b6b3a7640000600554670de0b6b3a7640000611b759190613fae565b83611b809190613f54565b611b8a9190613f23565b9050600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663412c95477f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000868b8b6040518663ffffffff1660e01b8152600401611c32959493929190613ab0565b6040805180830381600087803b158015611c4b57600080fd5b505af1158015611c5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c83919061362b565b91509150600082905060005b8651811015611e585760006003888381518110611cd5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015181548110611d14577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020906004020190506000611d4c8483600201548460000154611d3e9190613fae565b612b2690919063ffffffff16565b90506000811415611d5e575050611e45565b6000600554670de0b6b3a7640000611d769190613fae565b670de0b6b3a764000083611d8a9190613f54565b611d949190613f23565b90506000878388611da59190613f54565b611daf9190613f23565b905081846002016000828254611dc59190613ecd565b925050819055508286611dd89190613fae565b955080846003016000828254611dee9190613ecd565b92505081905550836000015484600201541115611e40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e3790613c25565b60405180910390fd5b505050505b8080611e50906140ef565b915050611c8f565b50600083600554670de0b6b3a7640000611e729190613fae565b670de0b6b3a764000086611e869190613f54565b611e909190613f23565b611e9a9190613fae565b90506000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008214611f7957600073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611f2d57611f2a6108b1565b90505b611f7881837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16612ccf9092919063ffffffff16565b5b50505050505050505050565b611f996000801b611f946108b1565b6121a2565b611fd8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fcf90613ca5565b60405180910390fd5b67016345785d8a0000811115612023576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161201a90613c85565b60405180910390fd5b7f2add06f33981e1ffcda660767486d0cfefcac2c7e4434d844287357decd3a2fa60055482604051612056929190613da0565b60405180910390a18060058190555050565b61207c6000801b6120776108b1565b6121a2565b6120bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120b290613ca5565b60405180910390fd5b7f0416f7fa264d67e573b2e6867dca8d68cee0e027d31269349dba35b79c29bf57600154826040516120ee929190613da0565b60405180910390a18060018190555050565b60007f000000000000000000000000000000000000000000000000000000000000000090506121596121306108b1565b30858473ffffffffffffffffffffffffffffffffffffffff16612f16909392919063ffffffff16565b61216383836108b9565b505050565b6003818154811061217857600080fd5b90600052602060002090600402016000915090508060000154908060020154908060030154905083565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6122206000801b61221b6108b1565b6121a2565b61225f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161225690613ca5565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b815260040161229a929190613b27565b602060405180830381600087803b1580156122b457600080fd5b505af11580156122c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122ec9190613463565b50505050565b60405160200161230190613cc5565b6040516020818303038152906040528051906020012081565b6000600380549050905090565b6000801b81565b60606000600184846123409190613fae565b61234a9190613ecd565b67ffffffffffffffff811115612389577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156123c257816020015b6123af6131f4565b8152602001906001900390816123a75790505b50905060008490505b83811161251c5760006003828154811061240e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600402019050806000015483838151811061245c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001818152505080600201548383815181106124aa577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001818152505080600301548383815181106124f8577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040018181525050508080612514906140ef565b9150506123cb565b508091505092915050565b600080600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490509050600080600090505b8281101561262a5761260a600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002082815481106125f9577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002001548661177f565b826126159190613ecd565b91508080612622906140ef565b915050612577565b508092505050919050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61266c816126676108b1565b612100565b50565b67016345785d8a000081565b600080600384815481106126b8577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020906004020190506000816000015414156126df576000915050612795565b6000816000015482600201548360010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546127379190613f54565b6127419190613f23565b9050808260010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546127909190613fae565b925050505b92915050565b6127b46127a7836112a9565b6127af6108b1565b6121a2565b6127f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127ea90613c65565b60405180910390fd5b6127fd8282612e35565b5050565b60055481565b61281b6000801b6128166108b1565b6121a2565b61285a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161285190613ca5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f937c7eca8086deec3818cbf4be69907c61329a45caa73b9e715c1fc8e9062a6b60405160405180910390a380600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163460405161295e90613a20565b60006040518083038185875af1925050503d806000811461299b576040519150601f19603f3d011682016040523d82523d6000602084013e6129a0565b606091505b5050506129ad34826108b9565b50565b6000811480612a49575060008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b81526004016129f7929190613a50565b60206040518083038186803b158015612a0f57600080fd5b505afa158015612a23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a47919061358a565b145b612a88576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a7f90613d45565b60405180910390fd5b612b098363095ea7b360e01b8484604051602401612aa7929190613b27565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612f9f565b505050565b6060612b1d8484600085613066565b90509392505050565b6000818310612b355781612b37565b825b905092915050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490501480612c5f575080600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080549050612c1a9190613fae565b81548110612c51577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020015414155b15612ccb57600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190806001815401808255809150506001900390600052602060002001600090919091909150555b5050565b612d508363a9059cbb60e01b8484604051602401612cee929190613b27565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612f9f565b505050565b612d5f82826121a2565b612e3157600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550612dd66108b1565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b612e3f82826121a2565b15612f1257600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550612eb76108b1565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b612f99846323b872dd60e01b858585604051602401612f3793929190613a79565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612f9f565b50505050565b6000613001826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612b0e9092919063ffffffff16565b905060008151111561306157808060200190518101906130219190613463565b613060576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161305790613d25565b60405180910390fd5b5b505050565b6060824710156130ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016130a290613c45565b60405180910390fd5b6130b48561317a565b6130f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016130ea90613ce5565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161311c9190613a09565b60006040518083038185875af1925050503d8060008114613159576040519150601f19603f3d011682016040523d82523d6000602084013e61315e565b606091505b509150915061316e82828661318d565b92505050949350505050565b600080823b905060008111915050919050565b6060831561319d578290506131ed565b6000835111156131b05782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016131e49190613bc3565b60405180910390fd5b9392505050565b60405180606001604052806000815260200160008152602001600081525090565b600061322861322384613e25565b613e00565b9050808382526020820190508285602086028201111561324757600080fd5b60005b85811015613277578161325d8882613349565b84526020840193506020830192505060018101905061324a565b5050509392505050565b600081359050613290816144d2565b92915050565b6000813590506132a5816144e9565b92915050565b600082601f8301126132bc57600080fd5b81356132cc848260208601613215565b91505092915050565b6000815190506132e481614500565b92915050565b6000813590506132f981614517565b92915050565b60008083601f84011261331157600080fd5b8235905067ffffffffffffffff81111561332a57600080fd5b60208301915083600182028301111561334257600080fd5b9250929050565b6000813590506133588161452e565b92915050565b60008151905061336d8161452e565b92915050565b60006020828403121561338557600080fd5b600061339384828501613281565b91505092915050565b600080604083850312156133af57600080fd5b60006133bd85828601613296565b92505060206133ce85828601613349565b9150509250929050565b6000806000606084860312156133ed57600080fd5b60006133fb86828701613281565b935050602061340c86828701613281565b925050604061341d86828701613349565b9150509250925092565b6000806040838503121561343a57600080fd5b600061344885828601613281565b925050602061345985828601613349565b9150509250929050565b60006020828403121561347557600080fd5b6000613483848285016132d5565b91505092915050565b60006020828403121561349e57600080fd5b60006134ac848285016132ea565b91505092915050565b600080604083850312156134c857600080fd5b60006134d6858286016132ea565b92505060206134e785828601613281565b9150509250929050565b60008060006040848603121561350657600080fd5b600084013567ffffffffffffffff81111561352057600080fd5b61352c868287016132ff565b9350935050602084013567ffffffffffffffff81111561354b57600080fd5b613557868287016132ab565b9150509250925092565b60006020828403121561357357600080fd5b600061358184828501613349565b91505092915050565b60006020828403121561359c57600080fd5b60006135aa8482850161335e565b91505092915050565b600080604083850312156135c657600080fd5b60006135d485828601613349565b92505060206135e585828601613281565b9150509250929050565b6000806040838503121561360257600080fd5b600061361085828601613349565b925050602061362185828601613349565b9150509250929050565b6000806040838503121561363e57600080fd5b600061364c8582860161335e565b925050602061365d8582860161335e565b9150509250929050565b600061367383836139a9565b60608301905092915050565b61368881613fe2565b82525050565b600061369982613e61565b6136a38185613e8f565b93506136ae83613e51565b8060005b838110156136df5781516136c68882613667565b97506136d183613e82565b9250506001810190506136b2565b5085935050505092915050565b6136f581614006565b82525050565b61370481614012565b82525050565b60006137168385613ea0565b935061372383858461407c565b61372c836141c5565b840190509392505050565b600061374282613e6c565b61374c8185613eb1565b935061375c81856020860161408b565b80840191505092915050565b61377181614046565b82525050565b6137808161406a565b82525050565b600061379182613e77565b61379b8185613ebc565b93506137ab81856020860161408b565b6137b4816141c5565b840191505092915050565b60006137cc602f83613ebc565b91506137d7826141d6565b604082019050919050565b60006137ef600983613ebc565b91506137fa82614225565b602082019050919050565b6000613812601983613ebc565b915061381d8261424e565b602082019050919050565b6000613835602683613ebc565b915061384082614277565b604082019050919050565b6000613858603083613ebc565b9150613863826142c6565b604082019050919050565b600061387b600b83613ebc565b915061388682614315565b602082019050919050565b600061389e600983613ebc565b91506138a98261433e565b602082019050919050565b60006138c1600a83613ebc565b91506138cc82614367565b602082019050919050565b60006138e4600083613eb1565b91506138ef82614390565b600082019050919050565b6000613907601d83613ebc565b915061391282614393565b602082019050919050565b600061392a601383613ebc565b9150613935826143bc565b602082019050919050565b600061394d602a83613ebc565b9150613958826143e5565b604082019050919050565b6000613970603683613ebc565b915061397b82614434565b604082019050919050565b6000613993602f83613ebc565b915061399e82614483565b604082019050919050565b6060820160008201516139bf60008501826139eb565b5060208201516139d260208501826139eb565b5060408201516139e560408501826139eb565b50505050565b6139f48161403c565b82525050565b613a038161403c565b82525050565b6000613a158284613737565b915081905092915050565b6000613a2b826138d7565b9150819050919050565b6000602082019050613a4a600083018461367f565b92915050565b6000604082019050613a65600083018561367f565b613a72602083018461367f565b9392505050565b6000606082019050613a8e600083018661367f565b613a9b602083018561367f565b613aa860408301846139fa565b949350505050565b6000608082019050613ac5600083018861367f565b613ad2602083018761367f565b613adf60408301866139fa565b8181036060830152613af281848661370a565b90509695505050505050565b6000604082019050613b13600083018561367f565b613b206020830184613777565b9392505050565b6000604082019050613b3c600083018561367f565b613b4960208301846139fa565b9392505050565b60006020820190508181036000830152613b6a818461368e565b905092915050565b6000602082019050613b8760008301846136ec565b92915050565b6000602082019050613ba260008301846136fb565b92915050565b6000602082019050613bbd6000830184613768565b92915050565b60006020820190508181036000830152613bdd8184613786565b905092915050565b60006020820190508181036000830152613bfe816137bf565b9050919050565b60006020820190508181036000830152613c1e816137e2565b9050919050565b60006020820190508181036000830152613c3e81613805565b9050919050565b60006020820190508181036000830152613c5e81613828565b9050919050565b60006020820190508181036000830152613c7e8161384b565b9050919050565b60006020820190508181036000830152613c9e8161386e565b9050919050565b60006020820190508181036000830152613cbe81613891565b9050919050565b60006020820190508181036000830152613cde816138b4565b9050919050565b60006020820190508181036000830152613cfe816138fa565b9050919050565b60006020820190508181036000830152613d1e8161391d565b9050919050565b60006020820190508181036000830152613d3e81613940565b9050919050565b60006020820190508181036000830152613d5e81613963565b9050919050565b60006020820190508181036000830152613d7e81613986565b9050919050565b6000602082019050613d9a60008301846139fa565b92915050565b6000604082019050613db560008301856139fa565b613dc260208301846139fa565b9392505050565b6000606082019050613dde60008301866139fa565b613deb60208301856139fa565b613df860408301846139fa565b949350505050565b6000613e0a613e1b565b9050613e1682826140be565b919050565b6000604051905090565b600067ffffffffffffffff821115613e4057613e3f614196565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000613ed88261403c565b9150613ee38361403c565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613f1857613f17614138565b5b828201905092915050565b6000613f2e8261403c565b9150613f398361403c565b925082613f4957613f48614167565b5b828204905092915050565b6000613f5f8261403c565b9150613f6a8361403c565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613fa357613fa2614138565b5b828202905092915050565b6000613fb98261403c565b9150613fc48361403c565b925082821015613fd757613fd6614138565b5b828203905092915050565b6000613fed8261401c565b9050919050565b6000613fff8261401c565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600061405182614058565b9050919050565b60006140638261401c565b9050919050565b60006140758261403c565b9050919050565b82818337600083830152505050565b60005b838110156140a957808201518184015260208101905061408e565b838111156140b8576000848401525b50505050565b6140c7826141c5565b810181811067ffffffffffffffff821117156140e6576140e5614196565b5b80604052505050565b60006140fa8261403c565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561412d5761412c614138565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60008201527f2061646d696e20746f206772616e740000000000000000000000000000000000602082015250565b7f4e4f545f42414b45520000000000000000000000000000000000000000000000600082015250565b7f496e7075742073616e69747920636865636b206661696c656400000000000000600082015250565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60008201527f2061646d696e20746f207265766f6b6500000000000000000000000000000000602082015250565b7f494e56414c49445f464545000000000000000000000000000000000000000000600082015250565b7f4e4f545f41444d494e0000000000000000000000000000000000000000000000600082015250565b7f42414b45525f524f4c4500000000000000000000000000000000000000000000600082015250565b50565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f526f756e6473206f7574206f66206f7264657200000000000000000000000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60008201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000602082015250565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b6144db81613fe2565b81146144e657600080fd5b50565b6144f281613ff4565b81146144fd57600080fd5b50565b61450981614006565b811461451457600080fd5b50565b61452081614012565b811461452b57600080fd5b50565b6145378161403c565b811461454257600080fd5b5056fea2646970667358221220b19aab221114b15d8686875481db580000f9dce7a4a99dde73fdad3c7468176264736f6c63430008010033000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000033e18a092a93ff21ad04746c7da12e35d34dc7c4000000000000000000000000000000000000000000000002b5e3af16b188000000000000000000000000000033e18a092a93ff21ad04746c7da12e35d34dc7c4

Deployed Bytecode

0x6080604052600436106101fd5760003560e01c806370aff70f1161010d578063b13820a7116100a0578063cc2f7c9c1161006f578063cc2f7c9c146107db578063d547741f14610818578063ddca3f4314610841578063efdcd9741461086c578063fd25c89f146108955761029e565b8063b13820a71461071f578063b3f006741461075c578063b6b55f2514610787578063bc063e1a146107b05761029e565b80639bf70abd116100dc5780639bf70abd14610661578063a09686c41461068c578063a217fddf146106b7578063ab469353146106e25761029e565b806370aff70f146105935780638c65c81f146105bc57806391d14854146105fb5780639afdb2c2146106385761029e565b806336568abe11610190578063439370b11161015f578063439370b1146104e35780636984d070146104ed578063698d54741461051857806369fe0e2d146105415780636e9e1f511461056a5761029e565b806336568abe1461042957806336f58588146104525780633a1d2d021461047d57806343926575146104a65761029e565b8063248a9ca3116101cc578063248a9ca31461037157806327726e7d146103ae5780632e1a7d4d146103d75780632f2ff15d146104005761029e565b80630897259d146102a357806309bb8bc1146102e05780630e66c1e01461030b578063205c2878146103485761029e565b3661029e577f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff163460405161024690613a20565b60006040518083038185875af1925050503d8060008114610283576040519150601f19603f3d011682016040523d82523d6000602084013e610288565b606091505b50505061029c346102976108b1565b6108b9565b005b600080fd5b3480156102af57600080fd5b506102ca60048036038101906102c59190613373565b610b2b565b6040516102d79190613d85565b60405180910390f35b3480156102ec57600080fd5b506102f5610c39565b6040516103029190613d85565b60405180910390f35b34801561031757600080fd5b50610332600480360381019061032d9190613373565b610c3f565b60405161033f9190613d85565b60405180910390f35b34801561035457600080fd5b5061036f600480360381019061036a9190613427565b610c8b565b005b34801561037d57600080fd5b506103986004803603810190610393919061348c565b6112a9565b6040516103a59190613b8d565b60405180910390f35b3480156103ba57600080fd5b506103d560048036038101906103d0919061339c565b6112c8565b005b3480156103e357600080fd5b506103fe60048036038101906103f99190613561565b611388565b005b34801561040c57600080fd5b50610427600480360381019061042291906134b5565b61139c565b005b34801561043557600080fd5b50610450600480360381019061044b91906134b5565b611402565b005b34801561045e57600080fd5b50610467611485565b6040516104749190613ba8565b60405180910390f35b34801561048957600080fd5b506104a4600480360381019061049f9190613373565b6114ab565b005b3480156104b257600080fd5b506104cd60048036038101906104c891906135b3565b61177f565b6040516104da9190613d85565b60405180910390f35b6104eb611877565b005b3480156104f957600080fd5b50610502611913565b60405161050f9190613b50565b60405180910390f35b34801561052457600080fd5b5061053f600480360381019061053a91906134f1565b611936565b005b34801561054d57600080fd5b5061056860048036038101906105639190613561565b611f85565b005b34801561057657600080fd5b50610591600480360381019061058c9190613561565b612068565b005b34801561059f57600080fd5b506105ba60048036038101906105b591906135b3565b612100565b005b3480156105c857600080fd5b506105e360048036038101906105de9190613561565b612168565b6040516105f293929190613dc9565b60405180910390f35b34801561060757600080fd5b50610622600480360381019061061d91906134b5565b6121a2565b60405161062f9190613b72565b60405180910390f35b34801561064457600080fd5b5061065f600480360381019061065a91906133d8565b61220c565b005b34801561066d57600080fd5b506106766122f2565b6040516106839190613b8d565b60405180910390f35b34801561069857600080fd5b506106a161231a565b6040516106ae9190613d85565b60405180910390f35b3480156106c357600080fd5b506106cc612327565b6040516106d99190613b8d565b60405180910390f35b3480156106ee57600080fd5b50610709600480360381019061070491906135ef565b61232e565b6040516107169190613b50565b60405180910390f35b34801561072b57600080fd5b5061074660048036038101906107419190613373565b612527565b6040516107539190613d85565b60405180910390f35b34801561076857600080fd5b50610771612635565b60405161077e9190613a35565b60405180910390f35b34801561079357600080fd5b506107ae60048036038101906107a99190613561565b61265b565b005b3480156107bc57600080fd5b506107c561266f565b6040516107d29190613d85565b60405180910390f35b3480156107e757600080fd5b5061080260048036038101906107fd91906135b3565b61267b565b60405161080f9190613d85565b60405180910390f35b34801561082457600080fd5b5061083f600480360381019061083a91906134b5565b61279b565b005b34801561084d57600080fd5b50610856612801565b6040516108639190613d85565b60405180910390f35b34801561087857600080fd5b50610893600480360381019061088e9190613373565b612807565b005b6108af60048036038101906108aa9190613373565b61291a565b005b600033905090565b60006001549050600060016003805490506108d49190613fae565b905060005b84811015610ab857600380549050821061090c576003600181600181540180825580915050039060005260206000209050505b600060038381548110610948577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000209060040201600201541461098c57818061096a906140ef565b9250506003600181600181540180825580915050039060005260206000209050505b6000600383815481106109c8577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020906004020190506000610a078260000154866109ed9190613fae565b84896109f99190613fae565b612b2690919063ffffffff16565b905080826000016000828254610a1d9190613ecd565b92505081905550808260010160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610a759190613ecd565b925050819055508083610a889190613ecd565b9250610a948685612b3f565b86831415610aa3575050610ab8565b8380610aae906140ef565b94505050506108d9565b8373ffffffffffffffffffffffffffffffffffffffff16610ad76108b1565b73ffffffffffffffffffffffffffffffffffffffff167f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f6287604051610b1c9190613d85565b60405180910390a35050505050565b600080600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490509050600080600090505b82811015610c2e57610c0e600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208281548110610bfd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002001548661267b565b82610c199190613ecd565b91508080610c26906140ef565b915050610b7b565b508092505050919050565b60015481565b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490509050919050565b600080600060046000610c9c6108b1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054905090506000610cf18583612b2690919063ffffffff16565b905060005b8181101561101057600060018285610d0e9190613fae565b610d189190613fae565b9050600060038281548110610d56577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600402019050600081600001548260020154836001016000610d806108b1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610dc59190613f54565b610dcf9190613f23565b9050600080821415610de45760009050610e06565b8260020154828460030154610df99190613f54565b610e039190613f23565b90505b81836001016000610e156108b1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610e5a9190613fae565b89610e659190613ecd565b98508088610e739190613ecd565b975081836001016000610e846108b1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ec99190613fae565b836000016000828254610edc9190613fae565b925050819055506000836001016000610ef36108b1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081836002016000828254610f459190613fae565b9250508190555080836003016000828254610f609190613fae565b9250508190555060046000610f736108b1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805480610fe3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60019003818190600052602060002001600090559055505050508080611008906140ef565b915050610cf6565b5060008414611122576110d47f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016110759190613a35565b60206040518083038186803b15801561108d57600080fd5b505afa1580156110a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c5919061358a565b85612b2690919063ffffffff16565b935061112186857f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff16612ccf9092919063ffffffff16565b5b60008314611233576111e57f00000000000000000000000033e18a092a93ff21ad04746c7da12e35d34dc7c473ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016111869190613a35565b60206040518083038186803b15801561119e57600080fd5b505afa1580156111b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d6919061358a565b84612b2690919063ffffffff16565b925061123286847f00000000000000000000000033e18a092a93ff21ad04746c7da12e35d34dc7c473ffffffffffffffffffffffffffffffffffffffff16612ccf9092919063ffffffff16565b5b8573ffffffffffffffffffffffffffffffffffffffff166112526108b1565b73ffffffffffffffffffffffffffffffffffffffff167ff341246adaac6f497bc2a656f546ab9e182111d630394f0c57c710a59a2cb5678686604051611299929190613da0565b60405180910390a3505050505050565b6000806000838152602001908152602001600020600101549050919050565b6112dc6000801b6112d76108b1565b6121a2565b61131b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131290613ca5565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff168160405161133f90613a20565b60006040518083038185875af1925050503d806000811461137c576040519150601f19603f3d011682016040523d82523d6000602084013e611381565b606091505b5050505050565b6113996113936108b1565b82610c8b565b50565b6113b56113a8836112a9565b6113b06108b1565b6121a2565b6113f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113eb90613be5565b60405180910390fd5b6113fe8282612d55565b5050565b61140a6108b1565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611477576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146e90613d65565b60405180910390fd5b6114818282612e35565b5050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6114bf6000801b6114ba6108b1565b6121a2565b6114fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114f590613ca5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fb9857602e97987b195db5ebe90c04eacc12885767bc5754c47a2c637afa37e4460405160405180910390a37f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660006040518363ffffffff1660e01b81526004016115f8929190613afe565b602060405180830381600087803b15801561161257600080fd5b505af1158015611626573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061164a9190613463565b5080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611729929190613b27565b602060405180830381600087803b15801561174357600080fd5b505af1158015611757573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061177b9190613463565b5050565b600080600384815481106117bc577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020906004020190506000816002015414156117e3576000915050611871565b6000816000015482600201548360010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461183b9190613f54565b6118459190613f23565b90506000826002015482846003015461185e9190613f54565b6118689190613f23565b90508093505050505b92915050565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff16346040516118bb90613a20565b60006040518083038185875af1925050503d80600081146118f8576040519150601f19603f3d011682016040523d82523d6000602084013e6118fd565b606091505b5050506119113461190c6108b1565b6108b9565b565b60606119316000600160038054905061192c9190613fae565b61232e565b905090565b61196b60405160200161194890613cc5565b604051602081830303815290604052805190602001206119666108b1565b6121a2565b6119aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119a190613c05565b60405180910390fd5b600080600090505b8251811015611b535760008114611a9257826001826119d19190613fae565b81518110611a08577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151838281518110611a49577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015111611a91576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a8890613d05565b60405180910390fd5b5b60006003848381518110611acf577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015181548110611b0e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000209060040201905080600201548160000154611b329190613fae565b83611b3d9190613ecd565b9250508080611b4b906140ef565b9150506119b2565b506000670de0b6b3a7640000600554670de0b6b3a7640000611b759190613fae565b83611b809190613f54565b611b8a9190613f23565b9050600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663412c95477f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc27f00000000000000000000000033e18a092a93ff21ad04746c7da12e35d34dc7c4868b8b6040518663ffffffff1660e01b8152600401611c32959493929190613ab0565b6040805180830381600087803b158015611c4b57600080fd5b505af1158015611c5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c83919061362b565b91509150600082905060005b8651811015611e585760006003888381518110611cd5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015181548110611d14577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020906004020190506000611d4c8483600201548460000154611d3e9190613fae565b612b2690919063ffffffff16565b90506000811415611d5e575050611e45565b6000600554670de0b6b3a7640000611d769190613fae565b670de0b6b3a764000083611d8a9190613f54565b611d949190613f23565b90506000878388611da59190613f54565b611daf9190613f23565b905081846002016000828254611dc59190613ecd565b925050819055508286611dd89190613fae565b955080846003016000828254611dee9190613ecd565b92505081905550836000015484600201541115611e40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e3790613c25565b60405180910390fd5b505050505b8080611e50906140ef565b915050611c8f565b50600083600554670de0b6b3a7640000611e729190613fae565b670de0b6b3a764000086611e869190613f54565b611e909190613f23565b611e9a9190613fae565b90506000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008214611f7957600073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611f2d57611f2a6108b1565b90505b611f7881837f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff16612ccf9092919063ffffffff16565b5b50505050505050505050565b611f996000801b611f946108b1565b6121a2565b611fd8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fcf90613ca5565b60405180910390fd5b67016345785d8a0000811115612023576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161201a90613c85565b60405180910390fd5b7f2add06f33981e1ffcda660767486d0cfefcac2c7e4434d844287357decd3a2fa60055482604051612056929190613da0565b60405180910390a18060058190555050565b61207c6000801b6120776108b1565b6121a2565b6120bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120b290613ca5565b60405180910390fd5b7f0416f7fa264d67e573b2e6867dca8d68cee0e027d31269349dba35b79c29bf57600154826040516120ee929190613da0565b60405180910390a18060018190555050565b60007f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc290506121596121306108b1565b30858473ffffffffffffffffffffffffffffffffffffffff16612f16909392919063ffffffff16565b61216383836108b9565b505050565b6003818154811061217857600080fd5b90600052602060002090600402016000915090508060000154908060020154908060030154905083565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6122206000801b61221b6108b1565b6121a2565b61225f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161225690613ca5565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b815260040161229a929190613b27565b602060405180830381600087803b1580156122b457600080fd5b505af11580156122c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122ec9190613463565b50505050565b60405160200161230190613cc5565b6040516020818303038152906040528051906020012081565b6000600380549050905090565b6000801b81565b60606000600184846123409190613fae565b61234a9190613ecd565b67ffffffffffffffff811115612389577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156123c257816020015b6123af6131f4565b8152602001906001900390816123a75790505b50905060008490505b83811161251c5760006003828154811061240e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600402019050806000015483838151811061245c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001818152505080600201548383815181106124aa577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001818152505080600301548383815181106124f8577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040018181525050508080612514906140ef565b9150506123cb565b508091505092915050565b600080600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490509050600080600090505b8281101561262a5761260a600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002082815481106125f9577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002001548661177f565b826126159190613ecd565b91508080612622906140ef565b915050612577565b508092505050919050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61266c816126676108b1565b612100565b50565b67016345785d8a000081565b600080600384815481106126b8577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020906004020190506000816000015414156126df576000915050612795565b6000816000015482600201548360010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546127379190613f54565b6127419190613f23565b9050808260010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546127909190613fae565b925050505b92915050565b6127b46127a7836112a9565b6127af6108b1565b6121a2565b6127f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127ea90613c65565b60405180910390fd5b6127fd8282612e35565b5050565b60055481565b61281b6000801b6128166108b1565b6121a2565b61285a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161285190613ca5565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f937c7eca8086deec3818cbf4be69907c61329a45caa73b9e715c1fc8e9062a6b60405160405180910390a380600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff163460405161295e90613a20565b60006040518083038185875af1925050503d806000811461299b576040519150601f19603f3d011682016040523d82523d6000602084013e6129a0565b606091505b5050506129ad34826108b9565b50565b6000811480612a49575060008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b81526004016129f7929190613a50565b60206040518083038186803b158015612a0f57600080fd5b505afa158015612a23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a47919061358a565b145b612a88576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a7f90613d45565b60405180910390fd5b612b098363095ea7b360e01b8484604051602401612aa7929190613b27565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612f9f565b505050565b6060612b1d8484600085613066565b90509392505050565b6000818310612b355781612b37565b825b905092915050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490501480612c5f575080600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080549050612c1a9190613fae565b81548110612c51577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020015414155b15612ccb57600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190806001815401808255809150506001900390600052602060002001600090919091909150555b5050565b612d508363a9059cbb60e01b8484604051602401612cee929190613b27565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612f9f565b505050565b612d5f82826121a2565b612e3157600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550612dd66108b1565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b612e3f82826121a2565b15612f1257600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550612eb76108b1565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b612f99846323b872dd60e01b858585604051602401612f3793929190613a79565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612f9f565b50505050565b6000613001826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612b0e9092919063ffffffff16565b905060008151111561306157808060200190518101906130219190613463565b613060576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161305790613d25565b60405180910390fd5b5b505050565b6060824710156130ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016130a290613c45565b60405180910390fd5b6130b48561317a565b6130f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016130ea90613ce5565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161311c9190613a09565b60006040518083038185875af1925050503d8060008114613159576040519150601f19603f3d011682016040523d82523d6000602084013e61315e565b606091505b509150915061316e82828661318d565b92505050949350505050565b600080823b905060008111915050919050565b6060831561319d578290506131ed565b6000835111156131b05782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016131e49190613bc3565b60405180910390fd5b9392505050565b60405180606001604052806000815260200160008152602001600081525090565b600061322861322384613e25565b613e00565b9050808382526020820190508285602086028201111561324757600080fd5b60005b85811015613277578161325d8882613349565b84526020840193506020830192505060018101905061324a565b5050509392505050565b600081359050613290816144d2565b92915050565b6000813590506132a5816144e9565b92915050565b600082601f8301126132bc57600080fd5b81356132cc848260208601613215565b91505092915050565b6000815190506132e481614500565b92915050565b6000813590506132f981614517565b92915050565b60008083601f84011261331157600080fd5b8235905067ffffffffffffffff81111561332a57600080fd5b60208301915083600182028301111561334257600080fd5b9250929050565b6000813590506133588161452e565b92915050565b60008151905061336d8161452e565b92915050565b60006020828403121561338557600080fd5b600061339384828501613281565b91505092915050565b600080604083850312156133af57600080fd5b60006133bd85828601613296565b92505060206133ce85828601613349565b9150509250929050565b6000806000606084860312156133ed57600080fd5b60006133fb86828701613281565b935050602061340c86828701613281565b925050604061341d86828701613349565b9150509250925092565b6000806040838503121561343a57600080fd5b600061344885828601613281565b925050602061345985828601613349565b9150509250929050565b60006020828403121561347557600080fd5b6000613483848285016132d5565b91505092915050565b60006020828403121561349e57600080fd5b60006134ac848285016132ea565b91505092915050565b600080604083850312156134c857600080fd5b60006134d6858286016132ea565b92505060206134e785828601613281565b9150509250929050565b60008060006040848603121561350657600080fd5b600084013567ffffffffffffffff81111561352057600080fd5b61352c868287016132ff565b9350935050602084013567ffffffffffffffff81111561354b57600080fd5b613557868287016132ab565b9150509250925092565b60006020828403121561357357600080fd5b600061358184828501613349565b91505092915050565b60006020828403121561359c57600080fd5b60006135aa8482850161335e565b91505092915050565b600080604083850312156135c657600080fd5b60006135d485828601613349565b92505060206135e585828601613281565b9150509250929050565b6000806040838503121561360257600080fd5b600061361085828601613349565b925050602061362185828601613349565b9150509250929050565b6000806040838503121561363e57600080fd5b600061364c8582860161335e565b925050602061365d8582860161335e565b9150509250929050565b600061367383836139a9565b60608301905092915050565b61368881613fe2565b82525050565b600061369982613e61565b6136a38185613e8f565b93506136ae83613e51565b8060005b838110156136df5781516136c68882613667565b97506136d183613e82565b9250506001810190506136b2565b5085935050505092915050565b6136f581614006565b82525050565b61370481614012565b82525050565b60006137168385613ea0565b935061372383858461407c565b61372c836141c5565b840190509392505050565b600061374282613e6c565b61374c8185613eb1565b935061375c81856020860161408b565b80840191505092915050565b61377181614046565b82525050565b6137808161406a565b82525050565b600061379182613e77565b61379b8185613ebc565b93506137ab81856020860161408b565b6137b4816141c5565b840191505092915050565b60006137cc602f83613ebc565b91506137d7826141d6565b604082019050919050565b60006137ef600983613ebc565b91506137fa82614225565b602082019050919050565b6000613812601983613ebc565b915061381d8261424e565b602082019050919050565b6000613835602683613ebc565b915061384082614277565b604082019050919050565b6000613858603083613ebc565b9150613863826142c6565b604082019050919050565b600061387b600b83613ebc565b915061388682614315565b602082019050919050565b600061389e600983613ebc565b91506138a98261433e565b602082019050919050565b60006138c1600a83613ebc565b91506138cc82614367565b602082019050919050565b60006138e4600083613eb1565b91506138ef82614390565b600082019050919050565b6000613907601d83613ebc565b915061391282614393565b602082019050919050565b600061392a601383613ebc565b9150613935826143bc565b602082019050919050565b600061394d602a83613ebc565b9150613958826143e5565b604082019050919050565b6000613970603683613ebc565b915061397b82614434565b604082019050919050565b6000613993602f83613ebc565b915061399e82614483565b604082019050919050565b6060820160008201516139bf60008501826139eb565b5060208201516139d260208501826139eb565b5060408201516139e560408501826139eb565b50505050565b6139f48161403c565b82525050565b613a038161403c565b82525050565b6000613a158284613737565b915081905092915050565b6000613a2b826138d7565b9150819050919050565b6000602082019050613a4a600083018461367f565b92915050565b6000604082019050613a65600083018561367f565b613a72602083018461367f565b9392505050565b6000606082019050613a8e600083018661367f565b613a9b602083018561367f565b613aa860408301846139fa565b949350505050565b6000608082019050613ac5600083018861367f565b613ad2602083018761367f565b613adf60408301866139fa565b8181036060830152613af281848661370a565b90509695505050505050565b6000604082019050613b13600083018561367f565b613b206020830184613777565b9392505050565b6000604082019050613b3c600083018561367f565b613b4960208301846139fa565b9392505050565b60006020820190508181036000830152613b6a818461368e565b905092915050565b6000602082019050613b8760008301846136ec565b92915050565b6000602082019050613ba260008301846136fb565b92915050565b6000602082019050613bbd6000830184613768565b92915050565b60006020820190508181036000830152613bdd8184613786565b905092915050565b60006020820190508181036000830152613bfe816137bf565b9050919050565b60006020820190508181036000830152613c1e816137e2565b9050919050565b60006020820190508181036000830152613c3e81613805565b9050919050565b60006020820190508181036000830152613c5e81613828565b9050919050565b60006020820190508181036000830152613c7e8161384b565b9050919050565b60006020820190508181036000830152613c9e8161386e565b9050919050565b60006020820190508181036000830152613cbe81613891565b9050919050565b60006020820190508181036000830152613cde816138b4565b9050919050565b60006020820190508181036000830152613cfe816138fa565b9050919050565b60006020820190508181036000830152613d1e8161391d565b9050919050565b60006020820190508181036000830152613d3e81613940565b9050919050565b60006020820190508181036000830152613d5e81613963565b9050919050565b60006020820190508181036000830152613d7e81613986565b9050919050565b6000602082019050613d9a60008301846139fa565b92915050565b6000604082019050613db560008301856139fa565b613dc260208301846139fa565b9392505050565b6000606082019050613dde60008301866139fa565b613deb60208301856139fa565b613df860408301846139fa565b949350505050565b6000613e0a613e1b565b9050613e1682826140be565b919050565b6000604051905090565b600067ffffffffffffffff821115613e4057613e3f614196565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000613ed88261403c565b9150613ee38361403c565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613f1857613f17614138565b5b828201905092915050565b6000613f2e8261403c565b9150613f398361403c565b925082613f4957613f48614167565b5b828204905092915050565b6000613f5f8261403c565b9150613f6a8361403c565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613fa357613fa2614138565b5b828202905092915050565b6000613fb98261403c565b9150613fc48361403c565b925082821015613fd757613fd6614138565b5b828203905092915050565b6000613fed8261401c565b9050919050565b6000613fff8261401c565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600061405182614058565b9050919050565b60006140638261401c565b9050919050565b60006140758261403c565b9050919050565b82818337600083830152505050565b60005b838110156140a957808201518184015260208101905061408e565b838111156140b8576000848401525b50505050565b6140c7826141c5565b810181811067ffffffffffffffff821117156140e6576140e5614196565b5b80604052505050565b60006140fa8261403c565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561412d5761412c614138565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60008201527f2061646d696e20746f206772616e740000000000000000000000000000000000602082015250565b7f4e4f545f42414b45520000000000000000000000000000000000000000000000600082015250565b7f496e7075742073616e69747920636865636b206661696c656400000000000000600082015250565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60008201527f2061646d696e20746f207265766f6b6500000000000000000000000000000000602082015250565b7f494e56414c49445f464545000000000000000000000000000000000000000000600082015250565b7f4e4f545f41444d494e0000000000000000000000000000000000000000000000600082015250565b7f42414b45525f524f4c4500000000000000000000000000000000000000000000600082015250565b50565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f526f756e6473206f7574206f66206f7264657200000000000000000000000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60008201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000602082015250565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b6144db81613fe2565b81146144e657600080fd5b50565b6144f281613ff4565b81146144fd57600080fd5b50565b61450981614006565b811461451457600080fd5b50565b61452081614012565b811461452b57600080fd5b50565b6145378161403c565b811461454257600080fd5b5056fea2646970667358221220b19aab221114b15d8686875481db580000f9dce7a4a99dde73fdad3c7468176264736f6c63430008010033

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

000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000033e18a092a93ff21ad04746c7da12e35d34dc7c4000000000000000000000000000000000000000000000002b5e3af16b188000000000000000000000000000033e18a092a93ff21ad04746c7da12e35d34dc7c4

-----Decoded View---------------
Arg [0] : _weth (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Arg [1] : _outputToken (address): 0x33e18a092a93ff21aD04746c7Da12e35D34DC7C4
Arg [2] : _roundSize (uint256): 50000000000000000000
Arg [3] : _recipe (address): 0x33e18a092a93ff21aD04746c7Da12e35D34DC7C4

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [1] : 00000000000000000000000033e18a092a93ff21ad04746c7da12e35d34dc7c4
Arg [2] : 000000000000000000000000000000000000000000000002b5e3af16b1880000
Arg [3] : 00000000000000000000000033e18a092a93ff21ad04746c7da12e35d34dc7c4


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.