Address Details
contract
0x26a8Abc08D6d710B8649a593d284792C59C7e796
- Contract Name
- ACStakingRewards
- Creator
- 0xbc96cb–749c47 at 0x660181–10f9a7
- Balance
- 0 CELO ( )
- Locked CELO Balance
- 0.00 CELO
- Voting CELO Balance
- 0.00 CELO
- Pending Unlocked Gold
- 0.00 CELO
- Tokens
-
Fetching tokens...
- Transactions
- 5 Transactions
- Transfers
- 1,036 Transfers
- Gas Used
- 689,419
- Last Balance Update
- 18713607
Transactions
Token Transfers
Tokens
Internal Transactions
Coin Balance History
Logs
Code
Read Contract
Write Contract
This contract has been verified via Sourcify.
View contract in Sourcify repository
- Contract name:
- ACStakingRewards
- Optimization enabled
- true
- Compiler version
- v0.8.4+commit.c7e474f2
- Optimization runs
- 200
- EVM Version
- istanbul
- Verified at
- 2021-11-19T12:37:13.032629Z
contracts/strategies/ACStakingRewards.sol
// SPDX-License-Identifier: MIT pragma solidity 0.8.4; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; import './AutoCompoundStrategy.sol'; interface IFarm { function stake(uint256 _amount) external; function withdraw(uint256 _amount) external; function getReward() external; function exit() external; function balanceOf(address _user) external view returns (uint256); } /** * @title AutoCompound StakingRewards contract * @notice strategy for auto-compounding on pools using a MasterChef which users staking methods * @dev e.g. used by CAKE and BANANA pools on PancakeSwap and ApeSwap respectively * @author YieldWolf */ contract ACStakingRewards is AutoCompoundStrategy { using SafeERC20 for IERC20; function _farmDeposit(uint256 amount) internal override { IERC20(stakeToken).safeIncreaseAllowance(masterChef, amount); IFarm(masterChef).stake(amount); } function _farmWithdraw(uint256 amount) internal override { IFarm(masterChef).withdraw(amount); } function _farmHarvest() internal override { IFarm(masterChef).getReward(); } function _totalStaked() internal view override returns (uint256 amount) { amount = IFarm(masterChef).balanceOf(address(this)); } function _farmEmergencyWithdraw() internal override { IFarm(masterChef).exit(); } }
/_openzeppelin/contracts/access/Ownable.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
/_openzeppelin/contracts/security/Pausable.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
/_openzeppelin/contracts/security/ReentrancyGuard.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
/_openzeppelin/contracts/token/ERC20/IERC20.sol
// 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); }
/_openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol
// 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' 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 require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
/_openzeppelin/contracts/utils/Address.sol
// 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; 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"); (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"); (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"); (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"); (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 assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
/_openzeppelin/contracts/utils/Context.sol
// 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) { return msg.data; } }
/_uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol
pragma solidity >=0.5.0; interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; }
/_uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol
pragma solidity >=0.5.0; interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; }
/_uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol
pragma solidity >=0.6.2; interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); }
/_uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol
pragma solidity >=0.6.2; import './IUniswapV2Router01.sol'; interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; }
/contracts/interfaces/IWETH.sol
// SPDX-License-Identifier: MIT pragma solidity 0.8.4; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; interface IWETH is IERC20 { function deposit() external payable; function withdraw(uint256 wad) external; }
/contracts/interfaces/IYieldWolf.sol
// SPDX-License-Identifier: MIT pragma solidity 0.8.4; interface IYieldWolf { function operators(address addr) external returns (bool); function depositFee() external returns (uint256); function withdrawFee() external returns (uint256); function performanceFee() external returns (uint256); function performanceFeeBountyPct() external returns (uint256); function ruleFee() external returns (uint256); function ruleFeeBountyPct() external returns (uint256); function feeAddress() external returns (address); function stakedTokens(uint256 pid, address user) external view returns (uint256); }
/contracts/strategies/AutoCompoundStrategy.sol
// SPDX-License-Identifier: MIT pragma solidity 0.8.4; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/security/Pausable.sol'; import '@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol'; import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol'; import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol'; import '../interfaces/IWETH.sol'; import '../interfaces/IYieldWolf.sol'; /** * @title Auto Compound Strategy * @notice handles deposits and withdraws on the underlying farm and auto-compound rewards * @author YieldWolf */ abstract contract AutoCompoundStrategy is Ownable, ReentrancyGuard, Pausable { using SafeERC20 for IERC20; IYieldWolf public yieldWolf; // address of the YieldWolf staking contract address public masterChef; // address of the farm staking contract uint256 public pid; // pid of pool in the farm staking contract IERC20 public stakeToken; // token staked on the underlying farm IERC20 public token0; // first token of the lp (or 0 if it's a single token) IERC20 public token1; // second token of the lp (or 0 if it's a single token) IERC20 public earnToken; // reward token paid by the underlying farm address[] public extraEarnTokens; // some underlying farms can give rewards in multiple tokens IUniswapV2Router02 public swapRouter; // router used for swapping tokens IUniswapV2Router02 public liquidityRouter; // router used for adding liquidity to the LP token address public WNATIVE; // address of the network's native currency (e.g. ETH) bool public swapRouterEnabled = true; // if true it will use swap router for token swaps, otherwise liquidity router mapping(address => mapping(address => address[])) public swapPath; // paths for swapping 2 given tokens uint256 public sharesTotal = 0; bool public initialized; bool public emergencyWithdrawn; event Initialize(); event Farm(); event Pause(); event Unpause(); event EmergencyWithdraw(); event TokenToEarn(address token); event WrapNative(); modifier onlyOperator() { require(IYieldWolf(yieldWolf).operators(msg.sender), 'onlyOperator: NOT_ALLOWED'); _; } function _farmDeposit(uint256 depositAmount) internal virtual; function _farmWithdraw(uint256 withdrawAmount) internal virtual; function _farmEmergencyWithdraw() internal virtual; function _totalStaked() internal view virtual returns (uint256); receive() external payable {} /** * @notice initializes the strategy * @dev similar to constructor but makes it easier for inheritance and for creating strategies from contracts * @param _pid the id of the pool in the farm's staking contract * @param _isLpToken whether the given stake token is a lp or a single token * @param _addresses list of addresses * @param _earnToToken0Path swap path from earn token to token0 * @param _earnToToken1Path swap path from earn token to token1 * @param _token0ToEarnPath swap path from token0 to earn token * @param _token1ToEarnPath swap path from token1 to earn token */ function initialize( uint256 _pid, bool _isLpToken, address[7] calldata _addresses, address[] calldata _earnToToken0Path, address[] calldata _earnToToken1Path, address[] calldata _token0ToEarnPath, address[] calldata _token1ToEarnPath ) external onlyOwner { require(!initialized, 'initialize: ALREADY_INITIALIZED'); initialized = true; yieldWolf = IYieldWolf(_addresses[0]); stakeToken = IERC20(_addresses[1]); earnToken = IERC20(_addresses[2]); masterChef = _addresses[3]; swapRouter = IUniswapV2Router02(_addresses[4]); liquidityRouter = IUniswapV2Router02(_addresses[5]); WNATIVE = _addresses[6]; if (_isLpToken) { token0 = IERC20(IUniswapV2Pair(_addresses[1]).token0()); token1 = IERC20(IUniswapV2Pair(_addresses[1]).token1()); swapPath[address(earnToken)][address(token0)] = _earnToToken0Path; swapPath[address(earnToken)][address(token1)] = _earnToToken1Path; swapPath[address(token0)][address(earnToken)] = _token0ToEarnPath; swapPath[address(token1)][address(earnToken)] = _token1ToEarnPath; } else { swapPath[address(earnToken)][address(stakeToken)] = _earnToToken0Path; swapPath[address(stakeToken)][address(earnToken)] = _token0ToEarnPath; } pid = _pid; emit Initialize(); } /** * @notice deposits stake tokens in the underlying farm * @dev can only be called by YieldWolf contract which performs the required validations and logging * @param _depositAmount amount deposited by the user */ function deposit(uint256 _depositAmount) external virtual onlyOwner nonReentrant whenNotPaused returns (uint256) { uint256 depositFee = (_depositAmount * yieldWolf.depositFee()) / 10000; _depositAmount = _depositAmount - depositFee; if (depositFee > 0) { stakeToken.safeTransfer(yieldWolf.feeAddress(), depositFee); } uint256 totalStakedBefore = totalStakeTokens() - _depositAmount; _farm(); uint256 totalStakedAfter = totalStakeTokens(); // adjust for deposit fees on the underlying farm and token transfer fees _depositAmount = totalStakedAfter - totalStakedBefore; uint256 sharesAdded = _depositAmount; if (totalStakedBefore > 0 && sharesTotal > 0) { sharesAdded = (_depositAmount * sharesTotal) / totalStakedBefore; } sharesTotal = sharesTotal + sharesAdded; return sharesAdded; } /** * @notice unstake tokens from the underlying farm and transfers them to the given address * @dev can only be called by YieldWolf contract which performs the required validations and logging * @param _withdrawAmount maximum amount to withdraw * @param _withdrawTo address that will receive the stake tokens * @param _bountyHunter address of the bounty hunter who execute the rule or the zero address if it's not a rule execution * @param _ruleFeeAmount how much to pay in concept of rule execution fees */ function withdraw( uint256 _withdrawAmount, address _withdrawTo, address _bountyHunter, uint256 _ruleFeeAmount ) external virtual onlyOwner nonReentrant returns (uint256) { uint256 totalStakedOnFarm = _totalStaked(); uint256 totalStake = totalStakeTokens(); // number of shares that the withdraw amount represents (rounded up) uint256 sharesRemoved = (_withdrawAmount * sharesTotal - 1) / totalStake + 1; if (sharesRemoved > sharesTotal) { sharesRemoved = sharesTotal; } sharesTotal = sharesTotal - sharesRemoved; if (totalStakedOnFarm > 0) { _farmWithdraw(_withdrawAmount); } uint256 stakeBalance = stakeToken.balanceOf(address(this)); if (_withdrawAmount > stakeBalance) { _withdrawAmount = stakeBalance; } if (totalStake < _withdrawAmount) { _withdrawAmount = totalStake; } // apply rule execution fees if (_bountyHunter != address(0)) { uint256 bountyRuleFee = (_ruleFeeAmount * yieldWolf.ruleFeeBountyPct()) / 10000; uint256 platformRuleFee = _ruleFeeAmount - bountyRuleFee; if (bountyRuleFee > 0) { stakeToken.safeTransfer(_bountyHunter, bountyRuleFee); } if (platformRuleFee > 0) { stakeToken.safeTransfer(yieldWolf.feeAddress(), platformRuleFee); } _withdrawAmount -= _ruleFeeAmount; } // apply withdraw fees uint256 withdrawFee = (_withdrawAmount * yieldWolf.withdrawFee()) / 10000; if (withdrawFee > 0) { _withdrawAmount -= withdrawFee; stakeToken.safeTransfer(yieldWolf.feeAddress(), withdrawFee); } stakeToken.safeTransfer(_withdrawTo, _withdrawAmount); return sharesRemoved; } /** * @notice deposits the contract's balance of stake tokens in the underlying farm */ function farm() external virtual nonReentrant whenNotPaused { _farm(); emit Farm(); } /** * @notice harvests earn tokens and deposits stake tokens in the underlying farm * @dev can only be called by YieldWolf contract which performs the required validations and logging * if the contract is paused, this function becomes a no-op * @param _bountyHunter address that will get paid the bounty reward */ function earn(address _bountyHunter) external virtual onlyOwner returns (uint256 bountyReward) { if (paused()) { return 0; } // harvest earn tokens uint256 earnAmountBefore = earnToken.balanceOf(address(this)); _farmHarvest(); if (address(earnToken) == WNATIVE) { wrapNative(); } for (uint256 i; i < extraEarnTokens.length; i++) { tokenToEarn(extraEarnTokens[i]); } uint256 harvestAmount = earnToken.balanceOf(address(this)) - earnAmountBefore; if (harvestAmount > 0) { bountyReward = _distributeFees(harvestAmount, _bountyHunter); } uint256 earnAmount = earnToken.balanceOf(address(this)); // if no token0, then stake token is a single token: Swap earn token for stake token if (address(token0) == address(0)) { if (stakeToken != earnToken) { _safeSwap(earnAmount, swapPath[address(earnToken)][address(stakeToken)], address(this), false); } _farm(); return bountyReward; } // stake token is a LP token: Swap earn token for token0 and token1 and add liquidity if (earnToken != token0) { _safeSwap(earnAmount / 2, swapPath[address(earnToken)][address(token0)], address(this), false); } if (earnToken != token1) { _safeSwap(earnAmount / 2, swapPath[address(earnToken)][address(token1)], address(this), false); } uint256 token0Amt = token0.balanceOf(address(this)); uint256 token1Amt = token1.balanceOf(address(this)); if (token0Amt > 0 && token1Amt > 0) { token0.safeIncreaseAllowance(address(liquidityRouter), token0Amt); token1.safeIncreaseAllowance(address(liquidityRouter), token1Amt); liquidityRouter.addLiquidity( address(token0), address(token1), token0Amt, token1Amt, 0, 0, address(this), block.timestamp ); } _farm(); return bountyReward; } /** * @notice pauses the strategy in case of emergency * @dev can only be called by the operator. Only in case of emergency. */ function pause() external virtual onlyOperator { _pause(); emit Pause(); } /** * @notice unpauses the strategy * @dev can only be called by the operator */ function unpause() external virtual onlyOperator { require(!emergencyWithdrawn, 'unpause: CANNOT_UNPAUSE_AFTER_EMERGENCY_WITHDRAW'); _unpause(); emit Unpause(); } /** * @notice enables or disables the swap router used for swapping earn tokens to stake tokens * @dev can only be called by YieldWolf contract which already performs the required validations and logging */ function setSwapRouterEnabled(bool _enabled) external virtual onlyOwner { swapRouterEnabled = _enabled; } /** * @notice updates the swap path for a given pair * @dev can only be called by YieldWolf contract which already performs the required validations and logging */ function setSwapPath( address _token0, address _token1, address[] calldata _path ) external virtual onlyOwner { swapPath[_token0][_token1] = _path; } /** * @notice updates the list of extra earn tokens * @dev can only be called by YieldWolf contract which already performs the required validations and logging */ function setExtraEarnTokens(address[] calldata _extraEarnTokens) external virtual onlyOwner { extraEarnTokens = _extraEarnTokens; } /** * @notice converts any token in the contract into earn tokens * @dev it uses the predefined path if it exists or defaults to use WNATIVE */ function tokenToEarn(address _token) public virtual nonReentrant whenNotPaused { uint256 amount = IERC20(_token).balanceOf(address(this)); if (amount > 0 && _token != address(earnToken) && _token != address(stakeToken)) { address[] memory path = swapPath[_token][address(earnToken)]; if (path.length == 0) { if (_token == WNATIVE) { path = new address[](2); path[0] = _token; path[1] = address(earnToken); } else { path = new address[](3); path[0] = _token; path[1] = WNATIVE; path[2] = address(earnToken); } } if (path[0] != address(earnToken) && path[0] != address(stakeToken)) { _safeSwap(amount, path, address(this), true); } emit TokenToEarn(_token); } } /** * @notice converts NATIVE into WNATIVE (e.g. ETH -> WETH) */ function wrapNative() public virtual { uint256 balance = address(this).balance; if (balance > 0) { IWETH(WNATIVE).deposit{value: balance}(); } emit WrapNative(); } function totalStakeTokens() public view virtual returns (uint256) { return _totalStaked() + stakeToken.balanceOf(address(this)); } /** * @notice invokes the emergency withdraw function in the underlying farm * @dev can only be called by the operator. Only in case of emergency. */ function emergencyWithdraw() external virtual onlyOperator { if (!paused()) { _pause(); } emergencyWithdrawn = true; _farmEmergencyWithdraw(); emit EmergencyWithdraw(); } function _farm() internal virtual { uint256 depositAmount = stakeToken.balanceOf(address(this)); _farmDeposit(depositAmount); } function _farmHarvest() internal virtual { _farmDeposit(0); } function _distributeFees(uint256 _amount, address _bountyHunter) internal virtual returns (uint256) { uint256 bountyReward = 0; uint256 bountyRewardPct = _bountyHunter == address(0) ? 0 : yieldWolf.performanceFeeBountyPct(); uint256 performanceFee = (_amount * yieldWolf.performanceFee()) / 10000; bountyReward = (performanceFee * bountyRewardPct) / 10000; uint256 platformPerformanceFee = performanceFee - bountyReward; if (platformPerformanceFee > 0) { earnToken.safeTransfer(yieldWolf.feeAddress(), platformPerformanceFee); } if (bountyReward > 0) { earnToken.safeTransfer(_bountyHunter, bountyReward); } return bountyReward; } function _safeSwap( uint256 _amountIn, address[] memory _path, address _to, bool _ignoreErrors ) internal virtual { IUniswapV2Router02 router = swapRouterEnabled ? swapRouter : liquidityRouter; IERC20(_path[0]).safeIncreaseAllowance(address(router), _amountIn); if (_ignoreErrors) { try router.swapExactTokensForTokensSupportingFeeOnTransferTokens(_amountIn, 0, _path, _to, block.timestamp) {} catch {} } else { router.swapExactTokensForTokensSupportingFeeOnTransferTokens(_amountIn, 0, _path, _to, block.timestamp); } } }
Contract ABI
[{"type":"event","name":"EmergencyWithdraw","inputs":[],"anonymous":false},{"type":"event","name":"Farm","inputs":[],"anonymous":false},{"type":"event","name":"Initialize","inputs":[],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"Pause","inputs":[],"anonymous":false},{"type":"event","name":"Paused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"TokenToEarn","inputs":[{"type":"address","name":"token","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"Unpause","inputs":[],"anonymous":false},{"type":"event","name":"Unpaused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"WrapNative","inputs":[],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"WNATIVE","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"deposit","inputs":[{"type":"uint256","name":"_depositAmount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"bountyReward","internalType":"uint256"}],"name":"earn","inputs":[{"type":"address","name":"_bountyHunter","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IERC20"}],"name":"earnToken","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"emergencyWithdraw","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"emergencyWithdrawn","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"extraEarnTokens","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"farm","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialize","inputs":[{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"bool","name":"_isLpToken","internalType":"bool"},{"type":"address[7]","name":"_addresses","internalType":"address[7]"},{"type":"address[]","name":"_earnToToken0Path","internalType":"address[]"},{"type":"address[]","name":"_earnToToken1Path","internalType":"address[]"},{"type":"address[]","name":"_token0ToEarnPath","internalType":"address[]"},{"type":"address[]","name":"_token1ToEarnPath","internalType":"address[]"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"initialized","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IUniswapV2Router02"}],"name":"liquidityRouter","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"masterChef","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"pause","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"paused","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"pid","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setExtraEarnTokens","inputs":[{"type":"address[]","name":"_extraEarnTokens","internalType":"address[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setSwapPath","inputs":[{"type":"address","name":"_token0","internalType":"address"},{"type":"address","name":"_token1","internalType":"address"},{"type":"address[]","name":"_path","internalType":"address[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setSwapRouterEnabled","inputs":[{"type":"bool","name":"_enabled","internalType":"bool"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"sharesTotal","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IERC20"}],"name":"stakeToken","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"swapPath","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"address","name":"","internalType":"address"},{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IUniswapV2Router02"}],"name":"swapRouter","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"swapRouterEnabled","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IERC20"}],"name":"token0","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IERC20"}],"name":"token1","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"tokenToEarn","inputs":[{"type":"address","name":"_token","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalStakeTokens","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unpause","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"withdraw","inputs":[{"type":"uint256","name":"_withdrawAmount","internalType":"uint256"},{"type":"address","name":"_withdrawTo","internalType":"address"},{"type":"address","name":"_bountyHunter","internalType":"address"},{"type":"uint256","name":"_ruleFeeAmount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"wrapNative","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IYieldWolf"}],"name":"yieldWolf","inputs":[]},{"type":"receive","stateMutability":"payable"}]
Contract Creation Code
0x6080604052600c805460ff60a01b1916600160a01b1790556000600e553480156200002957600080fd5b50620000353362000049565b600180556002805460ff1916905562000099565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6133ac80620000a96000396000f3fe6080604052600436106101fd5760003560e01c80638456cb591161010d578063c460f0e2116100a0578063edfb9b6e1161006f578063edfb9b6e14610584578063f1068454146105a4578063f1f98e12146105ba578063f2fde38b146105da578063fdb5fefc146105fa57600080fd5b8063c460f0e214610510578063d21220a714610530578063db2e21bc14610550578063e28701ee1461056557600080fd5b8063b381cf40116100dc578063b381cf4014610490578063b58303af146104b0578063b6b55f25146104d0578063c31c9c07146104f057600080fd5b80638456cb591461041d5780638da5cb5b14610432578063a318c1a414610450578063ada1a9a91461047057600080fd5b80633f4ba83a11610190578063559ae48a1161015f578063559ae48a1461039b578063575a86b2146103bb5780635c975abb146103db5780636ad481f3146103f3578063715018a61461040857600080fd5b80633f4ba83a1461032d57806340a658231461034257806344a3955e1461036557806351ed6a301461037b57600080fd5b8063158ef93e116101cc578063158ef93e146102be5780631a051746146102d857806324702944146102f857806336e9332d1461031857600080fd5b8063090e0e30146102095780630c8fb80e1461023f5780630ddb88ae1461027c5780630dfe16811461029e57600080fd5b3661020457005b600080fd5b34801561021557600080fd5b50600c5461022a90600160a01b900460ff1681565b60405190151581526020015b60405180910390f35b34801561024b57600080fd5b506002546102649061010090046001600160a01b031681565b6040516001600160a01b039091168152602001610236565b34801561028857600080fd5b5061029c610297366004612e42565b61061a565b005b3480156102aa57600080fd5b50600654610264906001600160a01b031681565b3480156102ca57600080fd5b50600f5461022a9060ff1681565b3480156102e457600080fd5b506102646102f3366004612ea5565b610684565b34801561030457600080fd5b50600b54610264906001600160a01b031681565b34801561032457600080fd5b5061029c6106c9565b34801561033957600080fd5b5061029c610751565b34801561034e57600080fd5b50610357610892565b604051908152602001610236565b34801561037157600080fd5b50610357600e5481565b34801561038757600080fd5b50600554610264906001600160a01b031681565b3480156103a757600080fd5b5061029c6103b6366004612ee5565b610925565b3480156103c757600080fd5b50600354610264906001600160a01b031681565b3480156103e757600080fd5b5060025460ff1661022a565b3480156103ff57600080fd5b5061029c610960565b34801561041457600080fd5b5061029c6109fd565b34801561042957600080fd5b5061029c610a33565b34801561043e57600080fd5b506000546001600160a01b0316610264565b34801561045c57600080fd5b5061035761046b366004612f8d565b610b03565b34801561047c57600080fd5b5061029c61048b366004612e0a565b610f27565b34801561049c57600080fd5b50600c54610264906001600160a01b031681565b3480156104bc57600080fd5b5061029c6104cb366004612f25565b61133f565b3480156104dc57600080fd5b506103576104eb366004612f5d565b611387565b3480156104fc57600080fd5b50600a54610264906001600160a01b031681565b34801561051c57600080fd5b5061029c61052b366004612fd4565b611593565b34801561053c57600080fd5b50600754610264906001600160a01b031681565b34801561055c57600080fd5b5061029c611a35565b34801561057157600080fd5b50600f5461022a90610100900460ff1681565b34801561059057600080fd5b5061026461059f366004612f5d565b611b26565b3480156105b057600080fd5b5061035760045481565b3480156105c657600080fd5b50600854610264906001600160a01b031681565b3480156105e657600080fd5b5061029c6105f5366004612e0a565b611b50565b34801561060657600080fd5b50610357610615366004612e0a565b611beb565b6000546001600160a01b0316331461064d5760405162461bcd60e51b8152600401610644906131ac565b60405180910390fd5b6001600160a01b038085166000908152600d6020908152604080832093871683529290522061067d908383612d2c565b5050505050565b600d60205282600052604060002060205281600052604060002081815481106106ac57600080fd5b6000918252602090912001546001600160a01b0316925083915050565b600260015414156106ec5760405162461bcd60e51b8152600401610644906131e1565b60026001556106fd60025460ff1690565b1561071a5760405162461bcd60e51b815260040161064490613182565b610722612282565b6040517fc14affbacf095aeb5f706cd9e32fae5ae213b9d1118f26bff45ef8efb26ef4be90600090a160018055565b60025460405163027cf93b60e31b81523360048201526101009091046001600160a01b0316906313e7c9d890602401602060405180830381600087803b15801561079a57600080fd5b505af11580156107ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d29190612f41565b6107ee5760405162461bcd60e51b81526004016106449061314b565b600f54610100900460ff161561085f5760405162461bcd60e51b815260206004820152603060248201527f756e70617573653a2043414e4e4f545f554e50415553455f41465445525f454d60448201526f455247454e43595f574954484452415760801b6064820152608401610644565b610867612309565b6040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b6005546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b1580156108d657600080fd5b505afa1580156108ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061090e9190612f75565b61091661239c565b6109209190613288565b905090565b6000546001600160a01b0316331461094f5760405162461bcd60e51b8152600401610644906131ac565b61095b60098383612d2c565b505050565b4780156109d157600c60009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b1580156109b757600080fd5b505af11580156109cb573d6000803e3d6000fd5b50505050505b6040517fc41bad047fb7e343ff0242ad2895fd09379af34386f2c70cbc07952a3e2bacdf90600090a150565b6000546001600160a01b03163314610a275760405162461bcd60e51b8152600401610644906131ac565b610a316000612418565b565b60025460405163027cf93b60e31b81523360048201526101009091046001600160a01b0316906313e7c9d890602401602060405180830381600087803b158015610a7c57600080fd5b505af1158015610a90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab49190612f41565b610ad05760405162461bcd60e51b81526004016106449061314b565b610ad8612468565b6040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b600080546001600160a01b03163314610b2e5760405162461bcd60e51b8152600401610644906131ac565b60026001541415610b515760405162461bcd60e51b8152600401610644906131e1565b60026001556000610b6061239c565b90506000610b6c610892565b90506000816001600e548a610b8191906132c0565b610b8b91906132df565b610b9591906132a0565b610ba0906001613288565b9050600e54811115610bb15750600e545b80600e54610bbf91906132df565b600e558215610bd157610bd1886124c0565b6005546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015610c1557600080fd5b505afa158015610c29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4d9190612f75565b905080891115610c5b578098505b88831015610c67578298505b6001600160a01b03871615610df7576000612710600260019054906101000a90046001600160a01b03166001600160a01b0316633fc4e5a46040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610ccb57600080fd5b505af1158015610cdf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d039190612f75565b610d0d90896132c0565b610d1791906132a0565b90506000610d2582896132df565b90508115610d4457600554610d44906001600160a01b03168a8461251b565b8015610de857610de8600260019054906101000a90046001600160a01b03166001600160a01b031663412753586040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610d9d57600080fd5b505af1158015610db1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dd59190612e26565b6005546001600160a01b0316908361251b565b610df2888c6132df565b9a5050505b6000612710600260019054906101000a90046001600160a01b03166001600160a01b031663e941fa786040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610e4c57600080fd5b505af1158015610e60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e849190612f75565b610e8e908c6132c0565b610e9891906132a0565b90508015610eff57610eaa818b6132df565b9950610eff600260019054906101000a90046001600160a01b03166001600160a01b031663412753586040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610d9d57600080fd5b600554610f16906001600160a01b03168a8c61251b565b505060018055979650505050505050565b60026001541415610f4a5760405162461bcd60e51b8152600401610644906131e1565b6002600155610f5b60025460ff1690565b15610f785760405162461bcd60e51b815260040161064490613182565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a082319060240160206040518083038186803b158015610fba57600080fd5b505afa158015610fce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff29190612f75565b905060008111801561101257506008546001600160a01b03838116911614155b801561102c57506005546001600160a01b03838116911614155b15611337576001600160a01b038083166000908152600d602090815260408083206008549094168352928152828220805484518184028101840190955280855292939290918301828280156110aa57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161108c575b5050505050905080516000141561125957600c546001600160a01b0384811691161415611177576040805160028082526060820183529091602083019080368337019050509050828160008151811061111357634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201015260085482519116908290600190811061115257634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b031681525050611259565b60408051600380825260808201909252906020820160608036833701905050905082816000815181106111ba57634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152600c548251911690829060019081106111f957634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201015260085482519116908290600290811061123857634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b0316815250505b60085481516001600160a01b0390911690829060009061128957634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b0316141580156112e7575060055481516001600160a01b039091169082906000906112d357634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b031614155b156112f9576112f9828230600161257e565b6040516001600160a01b03841681527fe5bc9466ffc0962b4f5d02c904fde9d62a936d1046497e9b764169c526dc07599060200160405180910390a1505b505060018055565b6000546001600160a01b031633146113695760405162461bcd60e51b8152600401610644906131ac565b600c8054911515600160a01b0260ff60a01b19909216919091179055565b600080546001600160a01b031633146113b25760405162461bcd60e51b8152600401610644906131ac565b600260015414156113d55760405162461bcd60e51b8152600401610644906131e1565b60026001556113e660025460ff1690565b156114035760405162461bcd60e51b815260040161064490613182565b6000612710600260019054906101000a90046001600160a01b03166001600160a01b03166367a527936040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561145857600080fd5b505af115801561146c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114909190612f75565b61149a90856132c0565b6114a491906132a0565b90506114b081846132df565b9250801561150b5761150b600260019054906101000a90046001600160a01b03166001600160a01b031663412753586040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610d9d57600080fd5b600083611516610892565b61152091906132df565b905061152a612282565b6000611534610892565b905061154082826132df565b945084821580159061155457506000600e54115b156115755782600e548761156891906132c0565b61157291906132a0565b90505b80600e546115839190613288565b600e556001805595945050505050565b6000546001600160a01b031633146115bd5760405162461bcd60e51b8152600401610644906131ac565b600f5460ff16156116105760405162461bcd60e51b815260206004820152601f60248201527f696e697469616c697a653a20414c52454144595f494e495449414c495a4544006044820152606401610644565b600f805460ff1916600117905561162a60208a018a612e0a565b600280546001600160a01b039290921661010002610100600160a81b031990921691909117905561166160408a0160208b01612e0a565b600580546001600160a01b0319166001600160a01b039290921691909117905561169160608a0160408b01612e0a565b600880546001600160a01b0319166001600160a01b03929092169190911790556116c160808a0160608b01612e0a565b600380546001600160a01b0319166001600160a01b03929092169190911790556116f160a08a0160808b01612e0a565b600a80546001600160a01b0319166001600160a01b039290921691909117905561172160c08a0160a08b01612e0a565b600b80546001600160a01b0319166001600160a01b039290921691909117905561175160e08a0160c08b01612e0a565b600c80546001600160a01b0319166001600160a01b0392909216919091179055891561198b5761178760408a0160208b01612e0a565b6001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156117bf57600080fd5b505afa1580156117d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117f79190612e26565b600680546001600160a01b0319166001600160a01b039290921691909117905561182760408a0160208b01612e0a565b6001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561185f57600080fd5b505afa158015611873573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118979190612e26565b600780546001600160a01b0319166001600160a01b0392831617905560085481166000908152600d602090815260408083206006549094168352929052206118e0908989612d2c565b506008546001600160a01b039081166000908152600d60209081526040808320600754909416835292905220611917908787612d2c565b506006546001600160a01b039081166000908152600d6020908152604080832060085490941683529290522061194e908585612d2c565b506007546001600160a01b039081166000908152600d60209081526040808320600854909416835292905220611985908383612d2c565b506119fa565b6008546001600160a01b039081166000908152600d602090815260408083206005549094168352929052206119c1908989612d2c565b506005546001600160a01b039081166000908152600d602090815260408083206008549094168352929052206119f8908585612d2c565b505b60048b90556040517f80f860092ed8101278311dd6b10dda4920a40ea5dfcbacfe724e2accfaf63efc90600090a15050505050505050505050565b60025460405163027cf93b60e31b81523360048201526101009091046001600160a01b0316906313e7c9d890602401602060405180830381600087803b158015611a7e57600080fd5b505af1158015611a92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab69190612f41565b611ad25760405162461bcd60e51b81526004016106449061314b565b60025460ff16611ae457611ae4612468565b600f805461ff001916610100179055611afb6126da565b6040517fcc6a1a065ab514031862e10458cbf117148ff1f8a168cfacab350e6644c174f090600090a1565b60098181548110611b3657600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b03163314611b7a5760405162461bcd60e51b8152600401610644906131ac565b6001600160a01b038116611bdf5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610644565b611be881612418565b50565b600080546001600160a01b03163314611c165760405162461bcd60e51b8152600401610644906131ac565b60025460ff1615611c2957506000919050565b6008546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015611c6d57600080fd5b505afa158015611c81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ca59190612f75565b9050611caf612744565b600c546008546001600160a01b0390811691161415611cd057611cd0610960565b60005b600954811015611d2d57611d1b60098281548110611d0157634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b0316610f27565b80611d2581613322565b915050611cd3565b506008546040516370a0823160e01b815230600482015260009183916001600160a01b03909116906370a082319060240160206040518083038186803b158015611d7657600080fd5b505afa158015611d8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dae9190612f75565b611db891906132df565b90508015611dcd57611dca8185612794565b92505b6008546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015611e1157600080fd5b505afa158015611e25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e499190612f75565b6006549091506001600160a01b0316611f13576008546005546001600160a01b03908116911614611f03576008546001600160a01b039081166000908152600d602090815260408083206005549094168352928152908290208054835181840281018401909452808452611f0393859390929190830182828015611ef657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611ed8575b505050505030600061257e565b611f0b612282565b505050919050565b6006546008546001600160a01b03908116911614611fbe57611fbe611f396002836132a0565b6008546001600160a01b039081166000908152600d6020908152604080832060065490941683529281529082902080548351818402810184019094528084529091830182828015611ef6576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311611ed857505050505030600061257e565b6007546008546001600160a01b0390811691161461206957612069611fe46002836132a0565b6008546001600160a01b039081166000908152600d6020908152604080832060075490941683529281529082902080548351818402810184019094528084529091830182828015611ef6576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311611ed857505050505030600061257e565b6006546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b1580156120ad57600080fd5b505afa1580156120c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120e59190612f75565b6007546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a082319060240160206040518083038186803b15801561212e57600080fd5b505afa158015612142573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121669190612f75565b90506000821180156121785750600081115b1561226f57600b5460065461219a916001600160a01b039182169116846129d1565b600b546007546121b7916001600160a01b039182169116836129d1565b600b5460065460075460405162e8e33760e81b81526001600160a01b0392831660048201529082166024820152604481018590526064810184905260006084820181905260a48201523060c48201524260e482015291169063e8e337009061010401606060405180830381600087803b15801561223357600080fd5b505af1158015612247573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061226b91906130cf565b5050505b612277612282565b50505050505b919050565b6005546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b1580156122c657600080fd5b505afa1580156122da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122fe9190612f75565b9050611be881612a92565b60025460ff166123525760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610644565b6002805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6003546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b1580156123e057600080fd5b505afa1580156123f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109209190612f75565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60025460ff161561248b5760405162461bcd60e51b815260040161064490613182565b6002805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861237f3390565b600354604051632e1a7d4d60e01b8152600481018390526001600160a01b0390911690632e1a7d4d906024015b600060405180830381600087803b15801561250757600080fd5b505af115801561067d573d6000803e3d6000fd5b6040516001600160a01b03831660248201526044810182905261095b90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612ae0565b600c54600090600160a01b900460ff166125a357600b546001600160a01b03166125b0565b600a546001600160a01b03165b90506125f88186866000815181106125d857634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166129d19092919063ffffffff16565b811561266c57604051635c11d79560e01b81526001600160a01b03821690635c11d79590612633908890600090899089904290600401613218565b600060405180830381600087803b15801561264d57600080fd5b505af192505050801561265e575060015b6126675761067d565b61067d565b604051635c11d79560e01b81526001600160a01b03821690635c11d795906126a1908890600090899089904290600401613218565b600060405180830381600087803b1580156126bb57600080fd5b505af11580156126cf573d6000803e3d6000fd5b505050505050505050565b600360009054906101000a90046001600160a01b03166001600160a01b031663e9fad8ee6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561272a57600080fd5b505af115801561273e573d6000803e3d6000fd5b50505050565b600360009054906101000a90046001600160a01b03166001600160a01b0316633d18b9126040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561272a57600080fd5b600080806001600160a01b0384161561283457600260019054906101000a90046001600160a01b03166001600160a01b0316632757066c6040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156127f757600080fd5b505af115801561280b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061282f9190612f75565b612837565b60005b90506000612710600260019054906101000a90046001600160a01b03166001600160a01b031663877887826040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561288e57600080fd5b505af11580156128a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128c69190612f75565b6128d090886132c0565b6128da91906132a0565b90506127106128e983836132c0565b6128f391906132a0565b9250600061290184836132df565b905080156129a7576129a7600260019054906101000a90046001600160a01b03166001600160a01b031663412753586040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561295c57600080fd5b505af1158015612970573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129949190612e26565b6008546001600160a01b0316908361251b565b83156129c4576008546129c4906001600160a01b0316878661251b565b5091925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e9060440160206040518083038186803b158015612a1d57600080fd5b505afa158015612a31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a559190612f75565b612a5f9190613288565b6040516001600160a01b03851660248201526044810182905290915061273e90859063095ea7b360e01b90606401612547565b600354600554612aaf916001600160a01b039182169116836129d1565b60035460405163534a7e1d60e11b8152600481018390526001600160a01b039091169063a694fc3a906024016124ed565b6000612b35826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612bb29092919063ffffffff16565b80519091501561095b5780806020019051810190612b539190612f41565b61095b5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610644565b6060612bc18484600085612bcb565b90505b9392505050565b606082471015612c2c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610644565b843b612c7a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610644565b600080866001600160a01b03168587604051612c9691906130fc565b60006040518083038185875af1925050503d8060008114612cd3576040519150601f19603f3d011682016040523d82523d6000602084013e612cd8565b606091505b5091509150612ce8828286612cf3565b979650505050505050565b60608315612d02575081612bc4565b825115612d125782518084602001fd5b8160405162461bcd60e51b81526004016106449190613118565b828054828255906000526020600020908101928215612d7f579160200282015b82811115612d7f5781546001600160a01b0319166001600160a01b03843516178255602090920191600190910190612d4c565b50612d8b929150612d8f565b5090565b5b80821115612d8b5760008155600101612d90565b8060e081018310156129cb57600080fd5b60008083601f840112612dc6578182fd5b50813567ffffffffffffffff811115612ddd578182fd5b6020830191508360208260051b8501011115612df857600080fd5b9250929050565b803561227d81613368565b600060208284031215612e1b578081fd5b8135612bc481613353565b600060208284031215612e37578081fd5b8151612bc481613353565b60008060008060608587031215612e57578283fd5b8435612e6281613353565b93506020850135612e7281613353565b9250604085013567ffffffffffffffff811115612e8d578283fd5b612e9987828801612db5565b95989497509550505050565b600080600060608486031215612eb9578283fd5b8335612ec481613353565b92506020840135612ed481613353565b929592945050506040919091013590565b60008060208385031215612ef7578182fd5b823567ffffffffffffffff811115612f0d578283fd5b612f1985828601612db5565b90969095509350505050565b600060208284031215612f36578081fd5b8135612bc481613368565b600060208284031215612f52578081fd5b8151612bc481613368565b600060208284031215612f6e578081fd5b5035919050565b600060208284031215612f86578081fd5b5051919050565b60008060008060808587031215612fa2578384fd5b843593506020850135612fb481613353565b92506040850135612fc481613353565b9396929550929360600135925050565b60008060008060008060008060008060006101a08c8e031215612ff5578687fd5b8b359a5061300560208d01612dff565b99506130148d60408e01612da4565b985067ffffffffffffffff806101208e01351115613030578788fd5b6130418e6101208f01358f01612db5565b90995097506101408d0135811015613057578687fd5b6130688e6101408f01358f01612db5565b90975095506101608d013581101561307e578485fd5b61308f8e6101608f01358f01612db5565b90955093506101808d01358110156130a5578283fd5b506130b78d6101808e01358e01612db5565b81935080925050509295989b509295989b9093969950565b6000806000606084860312156130e3578283fd5b8351925060208401519150604084015190509250925092565b6000825161310e8184602087016132f6565b9190910192915050565b60208152600082518060208401526131378160408501602087016132f6565b601f01601f19169190910160400192915050565b60208082526019908201527f6f6e6c794f70657261746f723a204e4f545f414c4c4f57454400000000000000604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b818110156132675784516001600160a01b031683529383019391830191600101613242565b50506001600160a01b03969096166060850152505050608001529392505050565b6000821982111561329b5761329b61333d565b500190565b6000826132bb57634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156132da576132da61333d565b500290565b6000828210156132f1576132f161333d565b500390565b60005b838110156133115781810151838201526020016132f9565b8381111561273e5750506000910152565b60006000198214156133365761333661333d565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114611be857600080fd5b8015158114611be857600080fdfea2646970667358221220277b07324351ad0150b95bfa53cd54512c0e4a48bec230d46ae1036b0b82f57d64736f6c63430008040033
Deployed ByteCode
0x6080604052600436106101fd5760003560e01c80638456cb591161010d578063c460f0e2116100a0578063edfb9b6e1161006f578063edfb9b6e14610584578063f1068454146105a4578063f1f98e12146105ba578063f2fde38b146105da578063fdb5fefc146105fa57600080fd5b8063c460f0e214610510578063d21220a714610530578063db2e21bc14610550578063e28701ee1461056557600080fd5b8063b381cf40116100dc578063b381cf4014610490578063b58303af146104b0578063b6b55f25146104d0578063c31c9c07146104f057600080fd5b80638456cb591461041d5780638da5cb5b14610432578063a318c1a414610450578063ada1a9a91461047057600080fd5b80633f4ba83a11610190578063559ae48a1161015f578063559ae48a1461039b578063575a86b2146103bb5780635c975abb146103db5780636ad481f3146103f3578063715018a61461040857600080fd5b80633f4ba83a1461032d57806340a658231461034257806344a3955e1461036557806351ed6a301461037b57600080fd5b8063158ef93e116101cc578063158ef93e146102be5780631a051746146102d857806324702944146102f857806336e9332d1461031857600080fd5b8063090e0e30146102095780630c8fb80e1461023f5780630ddb88ae1461027c5780630dfe16811461029e57600080fd5b3661020457005b600080fd5b34801561021557600080fd5b50600c5461022a90600160a01b900460ff1681565b60405190151581526020015b60405180910390f35b34801561024b57600080fd5b506002546102649061010090046001600160a01b031681565b6040516001600160a01b039091168152602001610236565b34801561028857600080fd5b5061029c610297366004612e42565b61061a565b005b3480156102aa57600080fd5b50600654610264906001600160a01b031681565b3480156102ca57600080fd5b50600f5461022a9060ff1681565b3480156102e457600080fd5b506102646102f3366004612ea5565b610684565b34801561030457600080fd5b50600b54610264906001600160a01b031681565b34801561032457600080fd5b5061029c6106c9565b34801561033957600080fd5b5061029c610751565b34801561034e57600080fd5b50610357610892565b604051908152602001610236565b34801561037157600080fd5b50610357600e5481565b34801561038757600080fd5b50600554610264906001600160a01b031681565b3480156103a757600080fd5b5061029c6103b6366004612ee5565b610925565b3480156103c757600080fd5b50600354610264906001600160a01b031681565b3480156103e757600080fd5b5060025460ff1661022a565b3480156103ff57600080fd5b5061029c610960565b34801561041457600080fd5b5061029c6109fd565b34801561042957600080fd5b5061029c610a33565b34801561043e57600080fd5b506000546001600160a01b0316610264565b34801561045c57600080fd5b5061035761046b366004612f8d565b610b03565b34801561047c57600080fd5b5061029c61048b366004612e0a565b610f27565b34801561049c57600080fd5b50600c54610264906001600160a01b031681565b3480156104bc57600080fd5b5061029c6104cb366004612f25565b61133f565b3480156104dc57600080fd5b506103576104eb366004612f5d565b611387565b3480156104fc57600080fd5b50600a54610264906001600160a01b031681565b34801561051c57600080fd5b5061029c61052b366004612fd4565b611593565b34801561053c57600080fd5b50600754610264906001600160a01b031681565b34801561055c57600080fd5b5061029c611a35565b34801561057157600080fd5b50600f5461022a90610100900460ff1681565b34801561059057600080fd5b5061026461059f366004612f5d565b611b26565b3480156105b057600080fd5b5061035760045481565b3480156105c657600080fd5b50600854610264906001600160a01b031681565b3480156105e657600080fd5b5061029c6105f5366004612e0a565b611b50565b34801561060657600080fd5b50610357610615366004612e0a565b611beb565b6000546001600160a01b0316331461064d5760405162461bcd60e51b8152600401610644906131ac565b60405180910390fd5b6001600160a01b038085166000908152600d6020908152604080832093871683529290522061067d908383612d2c565b5050505050565b600d60205282600052604060002060205281600052604060002081815481106106ac57600080fd5b6000918252602090912001546001600160a01b0316925083915050565b600260015414156106ec5760405162461bcd60e51b8152600401610644906131e1565b60026001556106fd60025460ff1690565b1561071a5760405162461bcd60e51b815260040161064490613182565b610722612282565b6040517fc14affbacf095aeb5f706cd9e32fae5ae213b9d1118f26bff45ef8efb26ef4be90600090a160018055565b60025460405163027cf93b60e31b81523360048201526101009091046001600160a01b0316906313e7c9d890602401602060405180830381600087803b15801561079a57600080fd5b505af11580156107ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d29190612f41565b6107ee5760405162461bcd60e51b81526004016106449061314b565b600f54610100900460ff161561085f5760405162461bcd60e51b815260206004820152603060248201527f756e70617573653a2043414e4e4f545f554e50415553455f41465445525f454d60448201526f455247454e43595f574954484452415760801b6064820152608401610644565b610867612309565b6040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b6005546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b1580156108d657600080fd5b505afa1580156108ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061090e9190612f75565b61091661239c565b6109209190613288565b905090565b6000546001600160a01b0316331461094f5760405162461bcd60e51b8152600401610644906131ac565b61095b60098383612d2c565b505050565b4780156109d157600c60009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b1580156109b757600080fd5b505af11580156109cb573d6000803e3d6000fd5b50505050505b6040517fc41bad047fb7e343ff0242ad2895fd09379af34386f2c70cbc07952a3e2bacdf90600090a150565b6000546001600160a01b03163314610a275760405162461bcd60e51b8152600401610644906131ac565b610a316000612418565b565b60025460405163027cf93b60e31b81523360048201526101009091046001600160a01b0316906313e7c9d890602401602060405180830381600087803b158015610a7c57600080fd5b505af1158015610a90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab49190612f41565b610ad05760405162461bcd60e51b81526004016106449061314b565b610ad8612468565b6040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b600080546001600160a01b03163314610b2e5760405162461bcd60e51b8152600401610644906131ac565b60026001541415610b515760405162461bcd60e51b8152600401610644906131e1565b60026001556000610b6061239c565b90506000610b6c610892565b90506000816001600e548a610b8191906132c0565b610b8b91906132df565b610b9591906132a0565b610ba0906001613288565b9050600e54811115610bb15750600e545b80600e54610bbf91906132df565b600e558215610bd157610bd1886124c0565b6005546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015610c1557600080fd5b505afa158015610c29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4d9190612f75565b905080891115610c5b578098505b88831015610c67578298505b6001600160a01b03871615610df7576000612710600260019054906101000a90046001600160a01b03166001600160a01b0316633fc4e5a46040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610ccb57600080fd5b505af1158015610cdf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d039190612f75565b610d0d90896132c0565b610d1791906132a0565b90506000610d2582896132df565b90508115610d4457600554610d44906001600160a01b03168a8461251b565b8015610de857610de8600260019054906101000a90046001600160a01b03166001600160a01b031663412753586040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610d9d57600080fd5b505af1158015610db1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dd59190612e26565b6005546001600160a01b0316908361251b565b610df2888c6132df565b9a5050505b6000612710600260019054906101000a90046001600160a01b03166001600160a01b031663e941fa786040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610e4c57600080fd5b505af1158015610e60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e849190612f75565b610e8e908c6132c0565b610e9891906132a0565b90508015610eff57610eaa818b6132df565b9950610eff600260019054906101000a90046001600160a01b03166001600160a01b031663412753586040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610d9d57600080fd5b600554610f16906001600160a01b03168a8c61251b565b505060018055979650505050505050565b60026001541415610f4a5760405162461bcd60e51b8152600401610644906131e1565b6002600155610f5b60025460ff1690565b15610f785760405162461bcd60e51b815260040161064490613182565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a082319060240160206040518083038186803b158015610fba57600080fd5b505afa158015610fce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff29190612f75565b905060008111801561101257506008546001600160a01b03838116911614155b801561102c57506005546001600160a01b03838116911614155b15611337576001600160a01b038083166000908152600d602090815260408083206008549094168352928152828220805484518184028101840190955280855292939290918301828280156110aa57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161108c575b5050505050905080516000141561125957600c546001600160a01b0384811691161415611177576040805160028082526060820183529091602083019080368337019050509050828160008151811061111357634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201015260085482519116908290600190811061115257634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b031681525050611259565b60408051600380825260808201909252906020820160608036833701905050905082816000815181106111ba57634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152600c548251911690829060019081106111f957634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201015260085482519116908290600290811061123857634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b0316815250505b60085481516001600160a01b0390911690829060009061128957634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b0316141580156112e7575060055481516001600160a01b039091169082906000906112d357634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b031614155b156112f9576112f9828230600161257e565b6040516001600160a01b03841681527fe5bc9466ffc0962b4f5d02c904fde9d62a936d1046497e9b764169c526dc07599060200160405180910390a1505b505060018055565b6000546001600160a01b031633146113695760405162461bcd60e51b8152600401610644906131ac565b600c8054911515600160a01b0260ff60a01b19909216919091179055565b600080546001600160a01b031633146113b25760405162461bcd60e51b8152600401610644906131ac565b600260015414156113d55760405162461bcd60e51b8152600401610644906131e1565b60026001556113e660025460ff1690565b156114035760405162461bcd60e51b815260040161064490613182565b6000612710600260019054906101000a90046001600160a01b03166001600160a01b03166367a527936040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561145857600080fd5b505af115801561146c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114909190612f75565b61149a90856132c0565b6114a491906132a0565b90506114b081846132df565b9250801561150b5761150b600260019054906101000a90046001600160a01b03166001600160a01b031663412753586040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610d9d57600080fd5b600083611516610892565b61152091906132df565b905061152a612282565b6000611534610892565b905061154082826132df565b945084821580159061155457506000600e54115b156115755782600e548761156891906132c0565b61157291906132a0565b90505b80600e546115839190613288565b600e556001805595945050505050565b6000546001600160a01b031633146115bd5760405162461bcd60e51b8152600401610644906131ac565b600f5460ff16156116105760405162461bcd60e51b815260206004820152601f60248201527f696e697469616c697a653a20414c52454144595f494e495449414c495a4544006044820152606401610644565b600f805460ff1916600117905561162a60208a018a612e0a565b600280546001600160a01b039290921661010002610100600160a81b031990921691909117905561166160408a0160208b01612e0a565b600580546001600160a01b0319166001600160a01b039290921691909117905561169160608a0160408b01612e0a565b600880546001600160a01b0319166001600160a01b03929092169190911790556116c160808a0160608b01612e0a565b600380546001600160a01b0319166001600160a01b03929092169190911790556116f160a08a0160808b01612e0a565b600a80546001600160a01b0319166001600160a01b039290921691909117905561172160c08a0160a08b01612e0a565b600b80546001600160a01b0319166001600160a01b039290921691909117905561175160e08a0160c08b01612e0a565b600c80546001600160a01b0319166001600160a01b0392909216919091179055891561198b5761178760408a0160208b01612e0a565b6001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156117bf57600080fd5b505afa1580156117d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117f79190612e26565b600680546001600160a01b0319166001600160a01b039290921691909117905561182760408a0160208b01612e0a565b6001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561185f57600080fd5b505afa158015611873573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118979190612e26565b600780546001600160a01b0319166001600160a01b0392831617905560085481166000908152600d602090815260408083206006549094168352929052206118e0908989612d2c565b506008546001600160a01b039081166000908152600d60209081526040808320600754909416835292905220611917908787612d2c565b506006546001600160a01b039081166000908152600d6020908152604080832060085490941683529290522061194e908585612d2c565b506007546001600160a01b039081166000908152600d60209081526040808320600854909416835292905220611985908383612d2c565b506119fa565b6008546001600160a01b039081166000908152600d602090815260408083206005549094168352929052206119c1908989612d2c565b506005546001600160a01b039081166000908152600d602090815260408083206008549094168352929052206119f8908585612d2c565b505b60048b90556040517f80f860092ed8101278311dd6b10dda4920a40ea5dfcbacfe724e2accfaf63efc90600090a15050505050505050505050565b60025460405163027cf93b60e31b81523360048201526101009091046001600160a01b0316906313e7c9d890602401602060405180830381600087803b158015611a7e57600080fd5b505af1158015611a92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab69190612f41565b611ad25760405162461bcd60e51b81526004016106449061314b565b60025460ff16611ae457611ae4612468565b600f805461ff001916610100179055611afb6126da565b6040517fcc6a1a065ab514031862e10458cbf117148ff1f8a168cfacab350e6644c174f090600090a1565b60098181548110611b3657600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b03163314611b7a5760405162461bcd60e51b8152600401610644906131ac565b6001600160a01b038116611bdf5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610644565b611be881612418565b50565b600080546001600160a01b03163314611c165760405162461bcd60e51b8152600401610644906131ac565b60025460ff1615611c2957506000919050565b6008546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015611c6d57600080fd5b505afa158015611c81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ca59190612f75565b9050611caf612744565b600c546008546001600160a01b0390811691161415611cd057611cd0610960565b60005b600954811015611d2d57611d1b60098281548110611d0157634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b0316610f27565b80611d2581613322565b915050611cd3565b506008546040516370a0823160e01b815230600482015260009183916001600160a01b03909116906370a082319060240160206040518083038186803b158015611d7657600080fd5b505afa158015611d8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dae9190612f75565b611db891906132df565b90508015611dcd57611dca8185612794565b92505b6008546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015611e1157600080fd5b505afa158015611e25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e499190612f75565b6006549091506001600160a01b0316611f13576008546005546001600160a01b03908116911614611f03576008546001600160a01b039081166000908152600d602090815260408083206005549094168352928152908290208054835181840281018401909452808452611f0393859390929190830182828015611ef657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611ed8575b505050505030600061257e565b611f0b612282565b505050919050565b6006546008546001600160a01b03908116911614611fbe57611fbe611f396002836132a0565b6008546001600160a01b039081166000908152600d6020908152604080832060065490941683529281529082902080548351818402810184019094528084529091830182828015611ef6576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311611ed857505050505030600061257e565b6007546008546001600160a01b0390811691161461206957612069611fe46002836132a0565b6008546001600160a01b039081166000908152600d6020908152604080832060075490941683529281529082902080548351818402810184019094528084529091830182828015611ef6576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311611ed857505050505030600061257e565b6006546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b1580156120ad57600080fd5b505afa1580156120c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120e59190612f75565b6007546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a082319060240160206040518083038186803b15801561212e57600080fd5b505afa158015612142573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121669190612f75565b90506000821180156121785750600081115b1561226f57600b5460065461219a916001600160a01b039182169116846129d1565b600b546007546121b7916001600160a01b039182169116836129d1565b600b5460065460075460405162e8e33760e81b81526001600160a01b0392831660048201529082166024820152604481018590526064810184905260006084820181905260a48201523060c48201524260e482015291169063e8e337009061010401606060405180830381600087803b15801561223357600080fd5b505af1158015612247573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061226b91906130cf565b5050505b612277612282565b50505050505b919050565b6005546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b1580156122c657600080fd5b505afa1580156122da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122fe9190612f75565b9050611be881612a92565b60025460ff166123525760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610644565b6002805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6003546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b1580156123e057600080fd5b505afa1580156123f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109209190612f75565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60025460ff161561248b5760405162461bcd60e51b815260040161064490613182565b6002805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861237f3390565b600354604051632e1a7d4d60e01b8152600481018390526001600160a01b0390911690632e1a7d4d906024015b600060405180830381600087803b15801561250757600080fd5b505af115801561067d573d6000803e3d6000fd5b6040516001600160a01b03831660248201526044810182905261095b90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612ae0565b600c54600090600160a01b900460ff166125a357600b546001600160a01b03166125b0565b600a546001600160a01b03165b90506125f88186866000815181106125d857634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166129d19092919063ffffffff16565b811561266c57604051635c11d79560e01b81526001600160a01b03821690635c11d79590612633908890600090899089904290600401613218565b600060405180830381600087803b15801561264d57600080fd5b505af192505050801561265e575060015b6126675761067d565b61067d565b604051635c11d79560e01b81526001600160a01b03821690635c11d795906126a1908890600090899089904290600401613218565b600060405180830381600087803b1580156126bb57600080fd5b505af11580156126cf573d6000803e3d6000fd5b505050505050505050565b600360009054906101000a90046001600160a01b03166001600160a01b031663e9fad8ee6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561272a57600080fd5b505af115801561273e573d6000803e3d6000fd5b50505050565b600360009054906101000a90046001600160a01b03166001600160a01b0316633d18b9126040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561272a57600080fd5b600080806001600160a01b0384161561283457600260019054906101000a90046001600160a01b03166001600160a01b0316632757066c6040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156127f757600080fd5b505af115801561280b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061282f9190612f75565b612837565b60005b90506000612710600260019054906101000a90046001600160a01b03166001600160a01b031663877887826040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561288e57600080fd5b505af11580156128a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128c69190612f75565b6128d090886132c0565b6128da91906132a0565b90506127106128e983836132c0565b6128f391906132a0565b9250600061290184836132df565b905080156129a7576129a7600260019054906101000a90046001600160a01b03166001600160a01b031663412753586040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561295c57600080fd5b505af1158015612970573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129949190612e26565b6008546001600160a01b0316908361251b565b83156129c4576008546129c4906001600160a01b0316878661251b565b5091925050505b92915050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e9060440160206040518083038186803b158015612a1d57600080fd5b505afa158015612a31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a559190612f75565b612a5f9190613288565b6040516001600160a01b03851660248201526044810182905290915061273e90859063095ea7b360e01b90606401612547565b600354600554612aaf916001600160a01b039182169116836129d1565b60035460405163534a7e1d60e11b8152600481018390526001600160a01b039091169063a694fc3a906024016124ed565b6000612b35826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612bb29092919063ffffffff16565b80519091501561095b5780806020019051810190612b539190612f41565b61095b5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610644565b6060612bc18484600085612bcb565b90505b9392505050565b606082471015612c2c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610644565b843b612c7a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610644565b600080866001600160a01b03168587604051612c9691906130fc565b60006040518083038185875af1925050503d8060008114612cd3576040519150601f19603f3d011682016040523d82523d6000602084013e612cd8565b606091505b5091509150612ce8828286612cf3565b979650505050505050565b60608315612d02575081612bc4565b825115612d125782518084602001fd5b8160405162461bcd60e51b81526004016106449190613118565b828054828255906000526020600020908101928215612d7f579160200282015b82811115612d7f5781546001600160a01b0319166001600160a01b03843516178255602090920191600190910190612d4c565b50612d8b929150612d8f565b5090565b5b80821115612d8b5760008155600101612d90565b8060e081018310156129cb57600080fd5b60008083601f840112612dc6578182fd5b50813567ffffffffffffffff811115612ddd578182fd5b6020830191508360208260051b8501011115612df857600080fd5b9250929050565b803561227d81613368565b600060208284031215612e1b578081fd5b8135612bc481613353565b600060208284031215612e37578081fd5b8151612bc481613353565b60008060008060608587031215612e57578283fd5b8435612e6281613353565b93506020850135612e7281613353565b9250604085013567ffffffffffffffff811115612e8d578283fd5b612e9987828801612db5565b95989497509550505050565b600080600060608486031215612eb9578283fd5b8335612ec481613353565b92506020840135612ed481613353565b929592945050506040919091013590565b60008060208385031215612ef7578182fd5b823567ffffffffffffffff811115612f0d578283fd5b612f1985828601612db5565b90969095509350505050565b600060208284031215612f36578081fd5b8135612bc481613368565b600060208284031215612f52578081fd5b8151612bc481613368565b600060208284031215612f6e578081fd5b5035919050565b600060208284031215612f86578081fd5b5051919050565b60008060008060808587031215612fa2578384fd5b843593506020850135612fb481613353565b92506040850135612fc481613353565b9396929550929360600135925050565b60008060008060008060008060008060006101a08c8e031215612ff5578687fd5b8b359a5061300560208d01612dff565b99506130148d60408e01612da4565b985067ffffffffffffffff806101208e01351115613030578788fd5b6130418e6101208f01358f01612db5565b90995097506101408d0135811015613057578687fd5b6130688e6101408f01358f01612db5565b90975095506101608d013581101561307e578485fd5b61308f8e6101608f01358f01612db5565b90955093506101808d01358110156130a5578283fd5b506130b78d6101808e01358e01612db5565b81935080925050509295989b509295989b9093969950565b6000806000606084860312156130e3578283fd5b8351925060208401519150604084015190509250925092565b6000825161310e8184602087016132f6565b9190910192915050565b60208152600082518060208401526131378160408501602087016132f6565b601f01601f19169190910160400192915050565b60208082526019908201527f6f6e6c794f70657261746f723a204e4f545f414c4c4f57454400000000000000604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b818110156132675784516001600160a01b031683529383019391830191600101613242565b50506001600160a01b03969096166060850152505050608001529392505050565b6000821982111561329b5761329b61333d565b500190565b6000826132bb57634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156132da576132da61333d565b500290565b6000828210156132f1576132f161333d565b500390565b60005b838110156133115781810151838201526020016132f9565b8381111561273e5750506000910152565b60006000198214156133365761333661333d565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114611be857600080fd5b8015158114611be857600080fdfea2646970667358221220277b07324351ad0150b95bfa53cd54512c0e4a48bec230d46ae1036b0b82f57d64736f6c63430008040033