Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
This contract has been partially verified via Sourcify.
View contract in Sourcify repository
- Contract name:
- StrategyDaytonaPLS
- Optimization enabled
- true
- Compiler version
- v0.8.20+commit.a1b79de6
- Optimization runs
- 1
- EVM Version
- shanghai
- Verified at
- 2026-02-12T16:09:09.289030Z
Constructor Arguments
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ac6fbc06c8c0477ba8fc117adb52881c1cc580da0000000000000000000000000000000000000000000000000000000000000017000000000000000000000000db449461e31527b184360a31dbef97f99c2eb26b0000000000000000000000009f8182ad65c53fd78bd07648a1b3ddcb675c6772000000000000000000000000a1077a294dde1b09bb078844df40758a5d0f9a27000000000000000000000000165c3410fc91ef562c50559f7d2289febed552d9000000000000000000000000326b1d7f3b92e89d2c62d626ab74633a847ccae1000000000000000000000000a0419404ef7b81d9ec64367eb68e5f425eace618
Arg [0] (address) : 0x0000000000000000000000000000000000000000
Arg [1] (address) : 0xac6fbc06c8c0477ba8fc117adb52881c1cc580da
Arg [2] (uint256) : 23
Arg [3] (address) : 0xdb449461e31527b184360a31dbef97f99c2eb26b
Arg [4] (address) : 0x9f8182ad65c53fd78bd07648a1b3ddcb675c6772
Arg [5] (address) : 0xa1077a294dde1b09bb078844df40758a5d0f9a27
Arg [6] (address) : 0x165c3410fc91ef562c50559f7d2289febed552d9
Arg [7] (address) : 0x326b1d7f3b92e89d2c62d626ab74633a847ccae1
Arg [8] (address) : 0xa0419404ef7b81d9ec64367eb68e5f425eace618
contracts/Vaults/StrategyDaytonaPLS.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Pausable.sol";
import "./IStrategy.sol";
interface IDaytonaMasterChef {
function deposit(uint256 pid, uint256 amount) external;
function depositReferral(uint256 pid, uint256 amount, address referral) external;
function withdraw(uint256 pid, uint256 amount) external;
function emergencyWithdraw(uint256 pid) external;
function userInfo(uint256 pid, address user) external view returns (uint256 amount, uint256 rewardDebt);
function pendingToni(uint256 pid, address user) external view returns (uint256);
}
interface IUniRouter {
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB, uint256 liquidity);
}
interface IUniPair {
function token0() external view returns (address);
function token1() external view returns (address);
}
interface IWPLS {
function deposit() external payable;
function withdraw(uint256) external;
}
/// @title StrategyDaytonaPLS - Strategy for Daytona Finance farms with referral support
/// @notice Uses depositReferral(pid, amount, referral) for deposits, sends treasury fees as native PLS
contract StrategyDaytonaPLS is IStrategy, Ownable, Pausable {
using SafeERC20 for IERC20;
// Core addresses
address public override vault;
address public override want; // LP token
address public earned; // TONI reward token
address public native; // WPLS - intermediate swap token
// Farm
IDaytonaMasterChef public masterChef;
uint256 public pid;
address public referrer; // referral address for depositReferral
// Router (dynamic - can be changed)
IUniRouter public router;
// LP components
address public lpToken0;
address public lpToken1;
// Swap paths (owner-configurable)
address[] public earnedToNativePath;
address[] public nativeToLp0Path;
address[] public nativeToLp1Path;
// Fees (basis points)
uint256 public constant HARVEST_CALL_FEE = 50; // 0.5% to harvest() caller
uint256 public constant TREASURY_FEE = 400; // 4.0% to treasury
uint256 public constant TOTAL_FEE = 450; // 4.5% total
uint256 public constant FEE_DIVISOR = 10000;
address public treasury; // Receives native PLS (for buyburn)
uint256 public lastHarvest;
bool public feeOnTransfer; // true if earned/LP tokens have transfer tax
event Harvest(address indexed caller, uint256 earned, uint256 callerFee, uint256 treasuryFee);
event RouterUpdated(address indexed oldRouter, address indexed newRouter);
event SwapPathsUpdated();
constructor(
address _vault,
address _masterChef,
uint256 _pid,
address _want,
address _earned,
address _native,
address _router,
address _treasury,
address _referrer
) Ownable(msg.sender) {
vault = _vault;
masterChef = IDaytonaMasterChef(_masterChef);
pid = _pid;
want = _want;
earned = _earned;
native = _native;
router = IUniRouter(_router);
treasury = _treasury;
referrer = _referrer;
lpToken0 = IUniPair(_want).token0();
lpToken1 = IUniPair(_want).token1();
// Default paths: earned -> native, native -> lp0/lp1
earnedToNativePath = new address[](2);
earnedToNativePath[0] = _earned;
earnedToNativePath[1] = _native;
if (lpToken0 == _native) {
nativeToLp0Path = new address[](1);
nativeToLp0Path[0] = _native;
} else {
nativeToLp0Path = new address[](2);
nativeToLp0Path[0] = _native;
nativeToLp0Path[1] = lpToken0;
}
if (lpToken1 == _native) {
nativeToLp1Path = new address[](1);
nativeToLp1Path[0] = _native;
} else {
nativeToLp1Path = new address[](2);
nativeToLp1Path[0] = _native;
nativeToLp1Path[1] = lpToken1;
}
_giveAllowances();
}
// Accept PLS from WPLS.withdraw()
receive() external payable {}
modifier onlyVault() {
require(msg.sender == vault, "!vault");
_;
}
/// @notice Set vault address (only callable once, before vault is linked)
function setVault(address _vault) external onlyOwner {
require(vault == address(0), "vault already set");
vault = _vault;
}
// --- IStrategy interface ---
function beforeDeposit() external override onlyVault {}
function deposit() public override whenNotPaused {
if (msg.sender != vault) revert("!vault");
uint256 wantBal = IERC20(want).balanceOf(address(this));
if (wantBal > 0) {
masterChef.depositReferral(pid, wantBal, referrer);
}
}
function withdraw(uint256 _amount) external override onlyVault {
uint256 wantBal = IERC20(want).balanceOf(address(this));
if (wantBal < _amount) {
masterChef.withdraw(pid, _amount - wantBal);
wantBal = IERC20(want).balanceOf(address(this));
}
if (wantBal > _amount) {
wantBal = _amount;
}
IERC20(want).safeTransfer(vault, wantBal);
}
function balanceOf() public view override returns (uint256) {
return balanceOfWant() + balanceOfPool();
}
function balanceOfWant() public view override returns (uint256) {
return IERC20(want).balanceOf(address(this));
}
function balanceOfPool() public view override returns (uint256) {
(uint256 _amount, ) = masterChef.userInfo(pid, address(this));
return _amount;
}
function paused() public view override(IStrategy, Pausable) returns (bool) {
return super.paused();
}
// --- Harvest ---
function harvest() public override whenNotPaused {
masterChef.deposit(pid, 0); // claim pending rewards (standard deposit for claims)
uint256 earnedBal = IERC20(earned).balanceOf(address(this));
if (earnedBal == 0) return;
_chargeFees(earnedBal);
_addLiquidity();
uint256 wantBal = IERC20(want).balanceOf(address(this));
if (wantBal > 0) {
masterChef.depositReferral(pid, wantBal, referrer);
}
lastHarvest = block.timestamp;
emit Harvest(msg.sender, earnedBal, earnedBal * HARVEST_CALL_FEE / FEE_DIVISOR, earnedBal * TREASURY_FEE / FEE_DIVISOR);
}
function _swap(uint256 amountIn, address[] memory path) internal {
IERC20(path[0]).forceApprove(address(router), amountIn);
if (feeOnTransfer) {
router.swapExactTokensForTokensSupportingFeeOnTransferTokens(
amountIn, 0, path, address(this), block.timestamp
);
} else {
router.swapExactTokensForTokens(
amountIn, 0, path, address(this), block.timestamp
);
}
}
function _chargeFees(uint256 earnedBal) internal {
uint256 totalFeeAmount = (earnedBal * TOTAL_FEE) / FEE_DIVISOR;
// Swap fee portion to native (WPLS)
if (earned != native) {
_swap(totalFeeAmount, earnedToNativePath);
}
uint256 nativeBal = IERC20(native).balanceOf(address(this));
// Split: caller gets ~11.1% of fees (0.5/4.5), treasury gets rest
uint256 callerAmount = (nativeBal * HARVEST_CALL_FEE) / TOTAL_FEE;
uint256 treasuryAmount = nativeBal - callerAmount;
// Send WPLS to caller (they can unwrap if needed)
if (callerAmount > 0) {
IERC20(native).safeTransfer(msg.sender, callerAmount);
}
// Unwrap WPLS to PLS and send native PLS to treasury (for buyburn)
if (treasuryAmount > 0) {
IWPLS(native).withdraw(treasuryAmount);
(bool success, ) = treasury.call{value: treasuryAmount}("");
require(success, "PLS transfer failed");
}
}
function _addLiquidity() internal {
uint256 earnedHalf = IERC20(earned).balanceOf(address(this));
if (earnedHalf == 0) return;
// Swap remaining earned to native first (if different)
if (earned != native) {
_swap(earnedHalf, earnedToNativePath);
}
uint256 nativeBal = IERC20(native).balanceOf(address(this));
uint256 halfNative = nativeBal / 2;
// Swap native to lp0 (if native != lp0)
if (nativeToLp0Path.length > 1) {
_swap(halfNative, nativeToLp0Path);
}
// Swap native to lp1 (if native != lp1)
if (nativeToLp1Path.length > 1) {
uint256 otherHalf = IERC20(native).balanceOf(address(this));
_swap(otherHalf, nativeToLp1Path);
}
uint256 lp0Bal = IERC20(lpToken0).balanceOf(address(this));
uint256 lp1Bal = IERC20(lpToken1).balanceOf(address(this));
if (lp0Bal > 0 && lp1Bal > 0) {
IERC20(lpToken0).forceApprove(address(router), lp0Bal);
IERC20(lpToken1).forceApprove(address(router), lp1Bal);
router.addLiquidity(
lpToken0,
lpToken1,
lp0Bal,
lp1Bal,
0,
0,
address(this),
block.timestamp
);
}
}
// --- Owner functions ---
function setRouter(address _router) external onlyOwner {
emit RouterUpdated(address(router), _router);
router = IUniRouter(_router);
_giveAllowances();
}
function setSwapPaths(
address[] calldata _earnedToNative,
address[] calldata _nativeToLp0,
address[] calldata _nativeToLp1
) external onlyOwner {
require(_earnedToNative.length >= 2, "bad path");
require(_earnedToNative[0] == earned, "path[0] != earned");
require(_earnedToNative[_earnedToNative.length - 1] == native, "path[-1] != native");
earnedToNativePath = _earnedToNative;
nativeToLp0Path = _nativeToLp0;
nativeToLp1Path = _nativeToLp1;
emit SwapPathsUpdated();
}
function setTreasury(address _treasury) external onlyOwner {
treasury = _treasury;
}
function setFeeOnTransfer(bool _feeOnTransfer) external onlyOwner {
feeOnTransfer = _feeOnTransfer;
}
// --- Emergency ---
function panic() public override onlyOwner {
_pause();
masterChef.emergencyWithdraw(pid);
}
function pause() public override onlyOwner {
_pause();
_removeAllowances();
}
function unpause() public override onlyOwner {
_unpause();
_giveAllowances();
uint256 wantBal = IERC20(want).balanceOf(address(this));
if (wantBal > 0) {
masterChef.depositReferral(pid, wantBal, referrer);
}
}
function retireStrat() external override onlyVault {
masterChef.emergencyWithdraw(pid);
uint256 wantBal = IERC20(want).balanceOf(address(this));
IERC20(want).safeTransfer(vault, wantBal);
}
// --- Allowances ---
function _giveAllowances() internal {
IERC20(want).forceApprove(address(masterChef), type(uint256).max);
IERC20(earned).forceApprove(address(router), type(uint256).max);
IERC20(native).forceApprove(address(router), type(uint256).max);
IERC20(lpToken0).forceApprove(address(router), type(uint256).max);
IERC20(lpToken1).forceApprove(address(router), type(uint256).max);
}
function _removeAllowances() internal {
IERC20(want).forceApprove(address(masterChef), 0);
IERC20(earned).forceApprove(address(router), 0);
IERC20(native).forceApprove(address(router), 0);
IERC20(lpToken0).forceApprove(address(router), 0);
IERC20(lpToken1).forceApprove(address(router), 0);
}
/// @notice Rescue tokens accidentally sent (not want or earned)
function inCaseTokensGetStuck(address _token) external onlyOwner {
require(_token != want, "!want");
require(_token != earned, "!earned");
uint256 amount = IERC20(_token).balanceOf(address(this));
IERC20(_token).safeTransfer(msg.sender, amount);
}
/// @notice Rescue stuck PLS
function inCasePLSGetStuck() external onlyOwner {
uint256 bal = address(this).balance;
if (bal > 0) {
(bool success, ) = msg.sender.call{value: bal}("");
require(success, "PLS transfer failed");
}
}
}
/introspection/IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC-165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[ERC].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
/Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)
pragma solidity ^0.8.20;
import {Context} from "../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 {
bool private _paused;
/**
* @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);
/**
* @dev The operation failed because the contract is paused.
*/
error EnforcedPause();
/**
* @dev The operation failed because the contract is not paused.
*/
error ExpectedPause();
/**
* @dev Initializes the contract in unpaused state.
*/
constructor() {
_paused = false;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
_requireNotPaused();
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
_requirePaused();
_;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
return _paused;
}
/**
* @dev Throws if the contract is paused.
*/
function _requireNotPaused() internal view virtual {
if (paused()) {
revert EnforcedPause();
}
}
/**
* @dev Throws if the contract is not paused.
*/
function _requirePaused() internal view virtual {
if (!paused()) {
revert ExpectedPause();
}
}
/**
* @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());
}
}
/Errors.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol)
pragma solidity ^0.8.20;
/**
* @dev Collection of common custom errors used in multiple contracts
*
* IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.
* It is recommended to avoid relying on the error API for critical functionality.
*
* _Available since v5.1._
*/
library Errors {
/**
* @dev The ETH balance of the account is not enough to perform the operation.
*/
error InsufficientBalance(uint256 balance, uint256 needed);
/**
* @dev A call to an address target failed. The target may have reverted.
*/
error FailedCall();
/**
* @dev The deployment failed.
*/
error FailedDeployment();
/**
* @dev A necessary precompile is missing.
*/
error MissingPrecompile(address);
}
/Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @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;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}
/Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/Address.sol)
pragma solidity ^0.8.20;
import {Errors} from "./Errors.sol";
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev There's no code at `target` (it is not a contract).
*/
error AddressEmptyCode(address target);
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
if (address(this).balance < amount) {
revert Errors.InsufficientBalance(address(this).balance, amount);
}
(bool success, ) = recipient.call{value: amount}("");
if (!success) {
revert Errors.FailedCall();
}
}
/**
* @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 or custom error, it is bubbled
* up by this function (like regular Solidity function calls). However, if
* the call reverted with no returned reason, this function reverts with a
* {Errors.FailedCall} error.
*
* 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.
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0);
}
/**
* @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`.
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
if (address(this).balance < value) {
revert Errors.InsufficientBalance(address(this).balance, value);
}
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
* was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case
* of an unsuccessful call.
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata
) internal view returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
// only check if target is a contract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
if (returndata.length == 0 && target.code.length == 0) {
revert AddressEmptyCode(target);
}
return returndata;
}
}
/**
* @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
* revert reason or with a default {Errors.FailedCall} error.
*/
function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
return returndata;
}
}
/**
* @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}.
*/
function _revert(bytes memory returndata) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly ("memory-safe") {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert Errors.FailedCall();
}
}
}
/ERC20/utils/SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../IERC20.sol";
import {IERC1363} from "../../../interfaces/IERC1363.sol";
import {Address} from "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC-20 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 {
/**
* @dev An operation with an ERC-20 token failed.
*/
error SafeERC20FailedOperation(address token);
/**
* @dev Indicates a failed `decreaseAllowance` request.
*/
error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*
* IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
* smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
* this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
* that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
forceApprove(token, spender, oldAllowance + value);
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
* value, non-reverting calls are assumed to be successful.
*
* IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
* smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
* this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
* that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
*/
function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
unchecked {
uint256 currentAllowance = token.allowance(address(this), spender);
if (currentAllowance < requestedDecrease) {
revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
}
forceApprove(token, spender, currentAllowance - requestedDecrease);
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*
* NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function
* only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being
* set here.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no
* code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
* targeting contracts.
*
* Reverts if the returned value is other than `true`.
*/
function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
if (to.code.length == 0) {
safeTransfer(token, to, value);
} else if (!token.transferAndCall(to, value, data)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target
* has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
* targeting contracts.
*
* Reverts if the returned value is other than `true`.
*/
function transferFromAndCallRelaxed(
IERC1363 token,
address from,
address to,
uint256 value,
bytes memory data
) internal {
if (to.code.length == 0) {
safeTransferFrom(token, from, to, value);
} else if (!token.transferFromAndCall(from, to, value, data)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no
* code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
* targeting contracts.
*
* NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.
* Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}
* once without retrying, and relies on the returned value to be true.
*
* Reverts if the returned value is other than `true`.
*/
function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
if (to.code.length == 0) {
forceApprove(token, to, value);
} else if (!token.approveAndCall(to, value, data)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*
* This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements.
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
uint256 returnSize;
uint256 returnValue;
assembly ("memory-safe") {
let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
// bubble errors
if iszero(success) {
let ptr := mload(0x40)
returndatacopy(ptr, 0, returndatasize())
revert(ptr, returndatasize())
}
returnSize := returndatasize()
returnValue := mload(0)
}
if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*
* This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
bool success;
uint256 returnSize;
uint256 returnValue;
assembly ("memory-safe") {
success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
returnSize := returndatasize()
returnValue := mload(0)
}
return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);
}
}
/ERC20/IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC-20 standard as defined in the ERC.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 value) 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 a `value` amount of tokens 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 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 value) external returns (bool);
}
/IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../token/ERC20/IERC20.sol";
/IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)
pragma solidity ^0.8.20;
import {IERC165} from "../utils/introspection/IERC165.sol";
/IERC1363.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol)
pragma solidity ^0.8.20;
import {IERC20} from "./IERC20.sol";
import {IERC165} from "./IERC165.sol";
/**
* @title IERC1363
* @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].
*
* Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract
* after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.
*/
interface IERC1363 is IERC20, IERC165 {
/*
* Note: the ERC-165 identifier for this interface is 0xb0202a11.
* 0xb0202a11 ===
* bytes4(keccak256('transferAndCall(address,uint256)')) ^
* bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
* bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
* bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^
* bytes4(keccak256('approveAndCall(address,uint256)')) ^
* bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
*/
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferAndCall(address to, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @param data Additional data with no specified format, sent in call to `to`.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param from The address which you want to send tokens from.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferFromAndCall(address from, address to, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param from The address which you want to send tokens from.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @param data Additional data with no specified format, sent in call to `to`.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function approveAndCall(address spender, uint256 value) external returns (bool);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
* @param data Additional data with no specified format, sent in call to `spender`.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);
}
/Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../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.
*
* The initial owner is set to the address provided by the deployer. 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;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(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 {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
interface IStrategy {
function vault() external view returns (address);
function want() external view returns (address);
function beforeDeposit() external;
function deposit() external;
function withdraw(uint256) external;
function balanceOf() external view returns (uint256);
function balanceOfWant() external view returns (uint256);
function balanceOfPool() external view returns (uint256);
function harvest() external;
function retireStrat() external;
function panic() external;
function pause() external;
function unpause() external;
function paused() external view returns (bool);
}
Compiler Settings
{"remappings":[":@1inch/solidity-utils/=lib/solidity-utils/",":@chainlink/=lib/foundry-chainlink-toolkit/",":@chainlink/contracts/=lib/foundry-chainlink-toolkit/lib/chainlink-brownie-contracts/contracts/src/",":@forge-std/=lib/forge-std/src/",":@gearbox-protocol/core-v2/=lib/core-v2/",":@gearbox-protocol/core-v3/=lib/core-v3/",":@gearbox-protocol/sdk-gov/=lib/sdk-gov/",":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",":@redstone-finance/=lib/integrations-v3/node_modules/@redstone-finance/",":@uniswap/v2-core/=lib/v2-core/",":@uniswap/v2-periphery/=lib/v2-periphery/",":chainlink-brownie-contracts/=lib/foundry-chainlink-toolkit/lib/chainlink-brownie-contracts/contracts/src/v0.6/vendor/@arbitrum/nitro-contracts/src/",":chainlink/=lib/chainlink/",":core-v2/=lib/core-v2/contracts/",":core-v3/=lib/core-v3/contracts/",":ds-test/=lib/forge-std/lib/ds-test/src/",":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",":forge-std/=lib/forge-std/src/",":foundry-chainlink-toolkit/=lib/foundry-chainlink-toolkit/",":foundry-devops/=lib/foundry-devops/",":halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",":integrations-v3/=lib/integrations-v3/",":openzeppelin-contracts copy/=lib/openzeppelin-contracts copy/",":openzeppelin-contracts/=lib/openzeppelin-contracts/",":sdk-gov/=lib/sdk-gov/",":solidity-lib/=lib/solidity-lib/contracts/",":solidity-utils/=lib/solidity-utils/contracts/",":v2-core/=lib/v2-core/contracts/",":v2-periphery/=lib/v2-periphery/contracts/"],"optimizer":{"runs":1,"enabled":true},"metadata":{"bytecodeHash":"none"},"libraries":{},"evmVersion":"shanghai","compilationTarget":{"contracts/Vaults/StrategyDaytonaPLS.sol":"StrategyDaytonaPLS"}}
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_vault","internalType":"address"},{"type":"address","name":"_masterChef","internalType":"address"},{"type":"uint256","name":"_pid","internalType":"uint256"},{"type":"address","name":"_want","internalType":"address"},{"type":"address","name":"_earned","internalType":"address"},{"type":"address","name":"_native","internalType":"address"},{"type":"address","name":"_router","internalType":"address"},{"type":"address","name":"_treasury","internalType":"address"},{"type":"address","name":"_referrer","internalType":"address"}]},{"type":"error","name":"EnforcedPause","inputs":[]},{"type":"error","name":"ExpectedPause","inputs":[]},{"type":"error","name":"OwnableInvalidOwner","inputs":[{"type":"address","name":"owner","internalType":"address"}]},{"type":"error","name":"OwnableUnauthorizedAccount","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"error","name":"SafeERC20FailedOperation","inputs":[{"type":"address","name":"token","internalType":"address"}]},{"type":"event","name":"Harvest","inputs":[{"type":"address","name":"caller","internalType":"address","indexed":true},{"type":"uint256","name":"earned","internalType":"uint256","indexed":false},{"type":"uint256","name":"callerFee","internalType":"uint256","indexed":false},{"type":"uint256","name":"treasuryFee","internalType":"uint256","indexed":false}],"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":"Paused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"RouterUpdated","inputs":[{"type":"address","name":"oldRouter","internalType":"address","indexed":true},{"type":"address","name":"newRouter","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"SwapPathsUpdated","inputs":[],"anonymous":false},{"type":"event","name":"Unpaused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"FEE_DIVISOR","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"HARVEST_CALL_FEE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"TOTAL_FEE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"TREASURY_FEE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOfPool","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOfWant","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"beforeDeposit","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"deposit","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"earned","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"earnedToNativePath","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"feeOnTransfer","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"harvest","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"inCasePLSGetStuck","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"inCaseTokensGetStuck","inputs":[{"type":"address","name":"_token","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lastHarvest","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"lpToken0","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"lpToken1","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IDaytonaMasterChef"}],"name":"masterChef","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"native","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"nativeToLp0Path","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"nativeToLp1Path","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"panic","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":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"referrer","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"retireStrat","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IUniRouter"}],"name":"router","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setFeeOnTransfer","inputs":[{"type":"bool","name":"_feeOnTransfer","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setRouter","inputs":[{"type":"address","name":"_router","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setSwapPaths","inputs":[{"type":"address[]","name":"_earnedToNative","internalType":"address[]"},{"type":"address[]","name":"_nativeToLp0","internalType":"address[]"},{"type":"address[]","name":"_nativeToLp1","internalType":"address[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setTreasury","inputs":[{"type":"address","name":"_treasury","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setVault","inputs":[{"type":"address","name":"_vault","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"treasury","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unpause","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"vault","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"want","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdraw","inputs":[{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"receive","stateMutability":"payable"}]
Contract Creation Code
0x608060405234801562000010575f80fd5b5060405162002d7f38038062002d7f83398101604081905262000033916200086f565b338062000060575f604051631e4fbdf760e01b81526004016200005791906200091b565b60405180910390fd5b6200006b8162000556565b505f805460ff60a01b19169055600180546001600160a01b03199081166001600160a01b038c8116919091179092556005805482168b84161790556006899055600280548216898416908117909155600380548316898516179055600480548316888516178155600880548416888616179055600e80548416878616179055600780549093169385169390931790915560408051630dfe168160e01b815290519192630dfe16819282820192602092908290030181865afa15801562000133573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906200015991906200092f565b60095f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550856001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015620001bb573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190620001e191906200092f565b600a80546001600160a01b0319166001600160a01b03929092169190911790556040805160028082526060820183529091602083019080368337505081516200023292600b925060200190620007d5565b5084600b5f815481106200024a576200024a62000952565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b0316021790555083600b6001815481106200028d576200028d62000952565b5f91825260209091200180546001600160a01b0319166001600160a01b039283161790556009548582169116036200033957604080516001808252818301909252906020808301908036833750508151620002f092600c925060200190620007d5565b5083600c5f8154811062000308576200030862000952565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550620003f3565b6040805160028082526060820183529091602083019080368337505081516200036a92600c925060200190620007d5565b5083600c5f8154811062000382576200038262000952565b5f91825260209091200180546001600160a01b0319166001600160a01b03928316179055600954600c80549190921691906001908110620003c757620003c762000952565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b031602179055505b600a546001600160a01b0380861691160362000483576040805160018082528183019092529060208083019080368337505081516200043a92600d925060200190620007d5565b5083600d5f8154811062000452576200045262000952565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b031602179055506200053d565b604080516002808252606082018352909160208301908036833750508151620004b492600d925060200190620007d5565b5083600d5f81548110620004cc57620004cc62000952565b5f91825260209091200180546001600160a01b0319166001600160a01b03928316179055600a54600d8054919092169190600190811062000511576200051162000952565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b031602179055505b62000547620005a5565b5050505050505050506200097f565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600554600254620005c5916001600160a01b0391821691165f1962000647565b600854600354620005e5916001600160a01b0391821691165f1962000647565b60085460045462000605916001600160a01b0391821691165f1962000647565b60085460095462000625916001600160a01b0391821691165f1962000647565b600854600a5462000645916001600160a01b0391821691165f1962000647565b565b5f836001600160a01b031663095ea7b384846040516024016200066c92919062000966565b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050509050620006ad84826200072060201b60201c565b6200071a576200070e84856001600160a01b031663095ea7b3865f604051602401620006db92919062000966565b60408051808303601f1901815291905260208101805160e09390931b6001600160e01b0393841617905291506200076c16565b6200071a84826200076c565b50505050565b5f805f8060205f8651602088015f8a5af192503d91505f519050828015620007625750811562000754578060011462000762565b5f866001600160a01b03163b115b9695505050505050565b5f8060205f8451602086015f885af1806200078c576040513d5f823e3d81fd5b50505f513d91508115620007a5578060011415620007b2565b6001600160a01b0384163b155b156200071a5783604051635274afe760e01b81526004016200005791906200091b565b828054828255905f5260205f209081019282156200082b579160200282015b828111156200082b57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190620007f4565b50620008399291506200083d565b5090565b5b8082111562000839575f81556001016200083e565b80516001600160a01b03811681146200086a575f80fd5b919050565b5f805f805f805f805f6101208a8c03121562000889575f80fd5b620008948a62000853565b9850620008a460208b0162000853565b975060408a01519650620008bb60608b0162000853565b9550620008cb60808b0162000853565b9450620008db60a08b0162000853565b9350620008eb60c08b0162000853565b9250620008fb60e08b0162000853565b91506200090c6101008b0162000853565b90509295985092959850929598565b6001600160a01b0391909116815260200190565b5f6020828403121562000940575f80fd5b6200094b8262000853565b9392505050565b634e487b7160e01b5f52603260045260245ffd5b6001600160a01b03929092168252602082015260400190565b6123f2806200098d5f395ff3fe6080604052600436106101e3575f3560e01c80630fa1eeab146101ee578063115880861461021c57806311b0b42d1461023e578063192678771461026a5780631f1fcd511461027e5780632e1a7d4d1461029d5780633f4ba83a146102be5780634641257d146102d25780634700d305146102e6578063573fef0a146102fa578063575a86b21461030e5780635c975abb1461032d5780635ee167c01461034157806361d027b31461036057806363db7eae1461037f5780636817031b1461039457806368447c93146103b3578063715018a6146103d2578063722713f7146103e65780638456cb59146103fa578063877562b61461040e5780638b2b71391461042d5780638c09b1be1461044c5780638ce1a4831461046b5780638da5cb5b146104805780639e93ad8e14610494578063b0749ca0146104a9578063c0d78655146104bd578063c1a3d44c146104dc578063d0e30db0146104f0578063d553e56014610504578063d6f1926214610523578063db64d3a314610542578063def68a9c14610561578063f0f4426014610580578063f10684541461059f578063f107779f146105b4578063f1a392da146105d3578063f2fde38b146105e8578063f887ea4014610607578063fb61778714610626578063fbfa77cf1461063a575f80fd5b366101ea57005b5f80fd5b3480156101f9575f80fd5b506010546102079060ff1681565b60405190151581526020015b60405180910390f35b348015610227575f80fd5b50610230610659565b604051908152602001610213565b348015610249575f80fd5b5060045461025d906001600160a01b031681565b6040516102139190611fed565b348015610275575f80fd5b50610230603281565b348015610289575f80fd5b5060025461025d906001600160a01b031681565b3480156102a8575f80fd5b506102bc6102b7366004612001565b6106d8565b005b3480156102c9575f80fd5b506102bc610895565b3480156102dd575f80fd5b506102bc610991565b3480156102f1575f80fd5b506102bc610be6565b348015610305575f80fd5b506102bc610c5a565b348015610319575f80fd5b5060055461025d906001600160a01b031681565b348015610338575f80fd5b50610207610c84565b34801561034c575f80fd5b5060095461025d906001600160a01b031681565b34801561036b575f80fd5b50600e5461025d906001600160a01b031681565b34801561038a575f80fd5b506102306101c281565b34801561039f575f80fd5b506102bc6103ae366004612018565b610c98565b3480156103be575f80fd5b5060075461025d906001600160a01b031681565b3480156103dd575f80fd5b506102bc610d0f565b3480156103f1575f80fd5b50610230610d20565b348015610405575f80fd5b506102bc610d3b565b348015610419575f80fd5b50600a5461025d906001600160a01b031681565b348015610438575f80fd5b5061025d610447366004612001565b610d53565b348015610457575f80fd5b5061025d610466366004612001565b610d7b565b348015610476575f80fd5b5061023061019081565b34801561048b575f80fd5b5061025d610d8a565b34801561049f575f80fd5b5061023061271081565b3480156104b4575f80fd5b506102bc610d98565b3480156104c8575f80fd5b506102bc6104d7366004612018565b610e0c565b3480156104e7575f80fd5b50610230610e70565b3480156104fb575f80fd5b506102bc610edf565b34801561050f575f80fd5b506102bc61051e36600461208c565b610f11565b34801561052e575f80fd5b5060035461025d906001600160a01b031681565b34801561054d575f80fd5b5061025d61055c366004612001565b6110af565b34801561056c575f80fd5b506102bc61057b366004612018565b6110be565b34801561058b575f80fd5b506102bc61059a366004612018565b6111d7565b3480156105aa575f80fd5b5061023060065481565b3480156105bf575f80fd5b506102bc6105ce36600461211e565b611201565b3480156105de575f80fd5b50610230600f5481565b3480156105f3575f80fd5b506102bc610602366004612018565b61121c565b348015610612575f80fd5b5060085461025d906001600160a01b031681565b348015610631575f80fd5b506102bc611256565b348015610645575f80fd5b5060015461025d906001600160a01b031681565b6005546006546040516393f1a40b60e01b815260048101919091523060248201525f9182916001600160a01b03909116906393f1a40b906044016040805180830381865afa1580156106ad573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106d1919061213d565b5092915050565b6001546001600160a01b0316331461070b5760405162461bcd60e51b81526004016107029061215f565b60405180910390fd5b6002546040516370a0823160e01b81525f916001600160a01b0316906370a082319061073b903090600401611fed565b602060405180830381865afa158015610756573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061077a919061217f565b905081811015610869576005546006546001600160a01b039091169063441a3e70906107a684866121aa565b6040516001600160e01b031960e085901b168152600481019290925260248201526044015f604051808303815f87803b1580156107e1575f80fd5b505af11580156107f3573d5f803e3d5ffd5b50506002546040516370a0823160e01b81526001600160a01b0390911692506370a082319150610827903090600401611fed565b602060405180830381865afa158015610842573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610866919061217f565b90505b818111156108745750805b600154600254610891916001600160a01b0391821691168361136f565b5050565b61089d6113cc565b6108a56113fe565b6108ad61144c565b6002546040516370a0823160e01b81525f916001600160a01b0316906370a08231906108dd903090600401611fed565b602060405180830381865afa1580156108f8573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061091c919061217f565b9050801561098e57600554600654600754604051630fa5ae1360e11b81526001600160a01b0393841693631f4b5c26936109609390928792909116906004016121bd565b5f604051808303815f87803b158015610977575f80fd5b505af1158015610989573d5f803e3d5ffd5b505050505b50565b6109996114e2565b600554600654604051631c57762b60e31b815260048101919091525f60248201526001600160a01b039091169063e2bbb158906044015f604051808303815f87803b1580156109e6575f80fd5b505af11580156109f8573d5f803e3d5ffd5b50506003546040516370a0823160e01b81525f93506001600160a01b0390911691506370a0823190610a2e903090600401611fed565b602060405180830381865afa158015610a49573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a6d919061217f565b9050805f03610a795750565b610a8281611508565b610a8a61172d565b6002546040516370a0823160e01b81525f916001600160a01b0316906370a0823190610aba903090600401611fed565b602060405180830381865afa158015610ad5573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610af9919061217f565b90508015610b6b57600554600654600754604051630fa5ae1360e11b81526001600160a01b0393841693631f4b5c2693610b3d9390928792909116906004016121bd565b5f604051808303815f87803b158015610b54575f80fd5b505af1158015610b66573d5f803e3d5ffd5b505050505b42600f55337f4534f107610758c3931de9ad1e176476fcfb8c74adf920167e1d54ee84fcfe7683612710610ba06032836121dc565b610baa91906121f3565b612710610bb9610190886121dc565b610bc391906121f3565b6040805193845260208401929092529082015260600160405180910390a250505b565b610bee6113cc565b610bf6611bc8565b600554600654604051632989754760e11b81526001600160a01b0390921691635312ea8e91610c2b9160040190815260200190565b5f604051808303815f87803b158015610c42575f80fd5b505af1158015610c54573d5f803e3d5ffd5b50505050565b6001546001600160a01b03163314610be45760405162461bcd60e51b81526004016107029061215f565b5f54600160a01b900460ff1690565b905090565b610ca06113cc565b6001546001600160a01b031615610ced5760405162461bcd60e51b81526020600482015260116024820152701d985d5b1d08185b1c9958591e481cd95d607a1b6044820152606401610702565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b610d176113cc565b610be45f611c0a565b5f610d29610659565b610d31610e70565b610c939190612212565b610d436113cc565b610d4b611bc8565b610be4611c59565b600b8181548110610d62575f80fd5b5f918252602090912001546001600160a01b0316905081565b600d8181548110610d62575f80fd5b5f546001600160a01b031690565b610da06113cc565b47801561098e576040515f90339083908381818185875af1925050503d805f8114610de6576040519150601f19603f3d011682016040523d82523d5f602084013e610deb565b606091505b50509050806108915760405162461bcd60e51b815260040161070290612225565b610e146113cc565b6008546040516001600160a01b038084169216907f02dc5c233404867c793b749c6d644beb2277536d18a7e7974d3f238e4c6f1684905f90a3600880546001600160a01b0319166001600160a01b03831617905561098e61144c565b6002546040516370a0823160e01b81525f916001600160a01b0316906370a0823190610ea0903090600401611fed565b602060405180830381865afa158015610ebb573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c93919061217f565b610ee76114e2565b6001546001600160a01b031633146108ad5760405162461bcd60e51b81526004016107029061215f565b610f196113cc565b6002851015610f555760405162461bcd60e51b81526020600482015260086024820152670c4c2c840e0c2e8d60c31b6044820152606401610702565b6003546001600160a01b031686865f81610f7157610f71612252565b9050602002016020810190610f869190612018565b6001600160a01b031614610fd05760405162461bcd60e51b81526020600482015260116024820152701c185d1a16cc1748084f4819585c9b9959607a1b6044820152606401610702565b6004546001600160a01b03168686610fe96001826121aa565b818110610ff857610ff8612252565b905060200201602081019061100d9190612018565b6001600160a01b0316146110585760405162461bcd60e51b8152602060048201526012602482015271706174685b2d315d20213d206e617469766560701b6044820152606401610702565b611064600b8787611f78565b50611071600c8585611f78565b5061107e600d8383611f78565b506040517f0671805877ede27b46ab75f0a8c64bf33c8a96ad87700ab5e1f4928296857a57905f90a1505050505050565b600c8181548110610d62575f80fd5b6110c66113cc565b6002546001600160a01b039081169082160361110c5760405162461bcd60e51b8152602060048201526005602482015264085dd85b9d60da1b6044820152606401610702565b6003546001600160a01b03908116908216036111545760405162461bcd60e51b81526020600482015260076024820152660859585c9b995960ca1b6044820152606401610702565b6040516370a0823160e01b81525f906001600160a01b038316906370a0823190611182903090600401611fed565b602060405180830381865afa15801561119d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111c1919061217f565b90506108916001600160a01b038316338361136f565b6111df6113cc565b600e80546001600160a01b0319166001600160a01b0392909216919091179055565b6112096113cc565b6010805460ff1916911515919091179055565b6112246113cc565b6001600160a01b03811661124d575f604051631e4fbdf760e01b81526004016107029190611fed565b61098e81611c0a565b6001546001600160a01b031633146112805760405162461bcd60e51b81526004016107029061215f565b600554600654604051632989754760e11b81526001600160a01b0390921691635312ea8e916112b59160040190815260200190565b5f604051808303815f87803b1580156112cc575f80fd5b505af11580156112de573d5f803e3d5ffd5b50506002546040516370a0823160e01b81525f93506001600160a01b0390911691506370a0823190611314903090600401611fed565b602060405180830381865afa15801561132f573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611353919061217f565b60015460025491925061098e916001600160a01b039081169116835b6113c783846001600160a01b031663a9059cbb8585604051602401611395929190612266565b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050611cea565b505050565b336113d5610d8a565b6001600160a01b031614610be4573360405163118cdaa760e01b81526004016107029190611fed565b611406611d4d565b5f805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516114429190611fed565b60405180910390a1565b60055460025461146a916001600160a01b0391821691165f19611d72565b600854600354611488916001600160a01b0391821691165f19611d72565b6008546004546114a6916001600160a01b0391821691165f19611d72565b6008546009546114c4916001600160a01b0391821691165f19611d72565b600854600a54610be4916001600160a01b0391821691165f19611d72565b6114ea610c84565b15610be45760405163d93c066560e01b815260040160405180910390fd5b5f6127106115186101c2846121dc565b61152291906121f3565b6004546003549192506001600160a01b0391821691161461159f5761159f81600b80548060200260200160405190810160405280929190818152602001828054801561159557602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611577575b5050505050611e02565b600480546040516370a0823160e01b81525f926001600160a01b03909216916370a08231916115d091309101611fed565b602060405180830381865afa1580156115eb573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061160f919061217f565b90505f6101c26116206032846121dc565b61162a91906121f3565b90505f61163782846121aa565b9050811561165657600454611656906001600160a01b0316338461136f565b80156109895760048054604051632e1a7d4d60e01b81529182018390526001600160a01b031690632e1a7d4d906024015f604051808303815f87803b15801561169d575f80fd5b505af11580156116af573d5f803e3d5ffd5b5050600e546040515f93506001600160a01b03909116915083908381818185875af1925050503d805f81146116ff576040519150601f19603f3d011682016040523d82523d5f602084013e611704565b606091505b50509050806117255760405162461bcd60e51b815260040161070290612225565b505050505050565b6003546040516370a0823160e01b81525f916001600160a01b0316906370a082319061175d903090600401611fed565b602060405180830381865afa158015611778573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061179c919061217f565b9050805f036117a85750565b6004546003546001600160a01b039081169116146118205761182081600b80548060200260200160405190810160405280929190818152602001828054801561159557602002820191905f5260205f209081546001600160a01b03168152600190910190602001808311611577575050505050611e02565b600480546040516370a0823160e01b81525f926001600160a01b03909216916370a082319161185191309101611fed565b602060405180830381865afa15801561186c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611890919061217f565b90505f61189e6002836121f3565b600c549091506001101561190c5761190c81600c80548060200260200160405190810160405280929190818152602001828054801561159557602002820191905f5260205f209081546001600160a01b03168152600190910190602001808311611577575050505050611e02565b600d54600110156119eb57600480546040516370a0823160e01b81525f926001600160a01b03909216916370a082319161194891309101611fed565b602060405180830381865afa158015611963573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611987919061217f565b90506119e981600d80548060200260200160405190810160405280929190818152602001828054801561159557602002820191905f5260205f209081546001600160a01b03168152600190910190602001808311611577575050505050611e02565b505b6009546040516370a0823160e01b81525f916001600160a01b0316906370a0823190611a1b903090600401611fed565b602060405180830381865afa158015611a36573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a5a919061217f565b600a546040516370a0823160e01b81529192505f916001600160a01b03909116906370a0823190611a8f903090600401611fed565b602060405180830381865afa158015611aaa573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ace919061217f565b90505f82118015611ade57505f81115b1561098957600854600954611b00916001600160a01b03918216911684611d72565b600854600a54611b1d916001600160a01b03918216911683611d72565b600854600954600a5460405162e8e33760e81b81526001600160a01b039283166004820152908216602482015260448101859052606481018490525f6084820181905260a48201523060c48201524260e482015291169063e8e3370090610104016060604051808303815f875af1158015611b9a573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611bbe919061227f565b5050505050505050565b611bd06114e2565b5f805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586114353390565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600554600254611c76916001600160a01b0391821691165f611d72565b600854600354611c93916001600160a01b0391821691165f611d72565b600854600454611cb0916001600160a01b0391821691165f611d72565b600854600954611ccd916001600160a01b0391821691165f611d72565b600854600a54610be4916001600160a01b0391821691165f611d72565b5f8060205f8451602086015f885af180611d09576040513d5f823e3d81fd5b50505f513d91508115611d20578060011415611d2d565b6001600160a01b0384163b155b15610c545783604051635274afe760e01b81526004016107029190611fed565b611d55610c84565b610be457604051638dfc202b60e01b815260040160405180910390fd5b5f836001600160a01b031663095ea7b38484604051602401611d95929190612266565b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050509050611dce8482611f2d565b610c5457611df884856001600160a01b031663095ea7b3865f604051602401611395929190612266565b610c548482611cea565b6008548151611e47916001600160a01b031690849084905f90611e2757611e27612252565b60200260200101516001600160a01b0316611d729092919063ffffffff16565b60105460ff1615611eb357600854604051635c11d79560e01b81526001600160a01b0390911690635c11d79590611e8a9085905f908690309042906004016122aa565b5f604051808303815f87803b158015611ea1575f80fd5b505af1158015611725573d5f803e3d5ffd5b6008546040516338ed173960e01b81526001600160a01b03909116906338ed173990611eeb9085905f908690309042906004016122aa565b5f604051808303815f875af1158015611f06573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526113c7919081019061232d565b5f805f8060205f8651602088015f8a5af192503d91505f519050828015611f6c57508115611f5e5780600114611f6c565b5f866001600160a01b03163b115b93505050505b92915050565b828054828255905f5260205f20908101928215611fc9579160200282015b82811115611fc95781546001600160a01b0319166001600160a01b03843516178255602090920191600190910190611f96565b50611fd5929150611fd9565b5090565b5b80821115611fd5575f8155600101611fda565b6001600160a01b0391909116815260200190565b5f60208284031215612011575f80fd5b5035919050565b5f60208284031215612028575f80fd5b81356001600160a01b038116811461203e575f80fd5b9392505050565b5f8083601f840112612055575f80fd5b5081356001600160401b0381111561206b575f80fd5b6020830191508360208260051b8501011115612085575f80fd5b9250929050565b5f805f805f80606087890312156120a1575f80fd5b86356001600160401b03808211156120b7575f80fd5b6120c38a838b01612045565b909850965060208901359150808211156120db575f80fd5b6120e78a838b01612045565b909650945060408901359150808211156120ff575f80fd5b5061210c89828a01612045565b979a9699509497509295939492505050565b5f6020828403121561212e575f80fd5b8135801515811461203e575f80fd5b5f806040838503121561214e575f80fd5b505080516020909101519092909150565b602080825260069082015265085d985d5b1d60d21b604082015260600190565b5f6020828403121561218f575f80fd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b81810381811115611f7257611f72612196565b92835260208301919091526001600160a01b0316604082015260600190565b8082028115828204841417611f7257611f72612196565b5f8261220d57634e487b7160e01b5f52601260045260245ffd5b500490565b80820180821115611f7257611f72612196565b602080825260139082015272141314c81d1c985b9cd9995c8819985a5b1959606a1b604082015260600190565b634e487b7160e01b5f52603260045260245ffd5b6001600160a01b03929092168252602082015260400190565b5f805f60608486031215612291575f80fd5b8351925060208401519150604084015190509250925092565b5f60a082018783526020878185015260a0604085015281875180845260c08601915082890193505f5b818110156122f85784516001600160a01b0316835293830193918301916001016122d3565b50506001600160a01b03969096166060850152505050608001529392505050565b634e487b7160e01b5f52604160045260245ffd5b5f602080838503121561233e575f80fd5b82516001600160401b0380821115612354575f80fd5b818501915085601f830112612367575f80fd5b81518181111561237957612379612319565b8060051b604051601f19603f8301168101818110858211171561239e5761239e612319565b6040529182528482019250838101850191888311156123bb575f80fd5b938501935b828510156123d9578451845293850193928501926123c0565b9897505050505050505056fea164736f6c6343000814000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ac6fbc06c8c0477ba8fc117adb52881c1cc580da0000000000000000000000000000000000000000000000000000000000000017000000000000000000000000db449461e31527b184360a31dbef97f99c2eb26b0000000000000000000000009f8182ad65c53fd78bd07648a1b3ddcb675c6772000000000000000000000000a1077a294dde1b09bb078844df40758a5d0f9a27000000000000000000000000165c3410fc91ef562c50559f7d2289febed552d9000000000000000000000000326b1d7f3b92e89d2c62d626ab74633a847ccae1000000000000000000000000a0419404ef7b81d9ec64367eb68e5f425eace618
Deployed ByteCode
0x6080604052600436106101e3575f3560e01c80630fa1eeab146101ee578063115880861461021c57806311b0b42d1461023e578063192678771461026a5780631f1fcd511461027e5780632e1a7d4d1461029d5780633f4ba83a146102be5780634641257d146102d25780634700d305146102e6578063573fef0a146102fa578063575a86b21461030e5780635c975abb1461032d5780635ee167c01461034157806361d027b31461036057806363db7eae1461037f5780636817031b1461039457806368447c93146103b3578063715018a6146103d2578063722713f7146103e65780638456cb59146103fa578063877562b61461040e5780638b2b71391461042d5780638c09b1be1461044c5780638ce1a4831461046b5780638da5cb5b146104805780639e93ad8e14610494578063b0749ca0146104a9578063c0d78655146104bd578063c1a3d44c146104dc578063d0e30db0146104f0578063d553e56014610504578063d6f1926214610523578063db64d3a314610542578063def68a9c14610561578063f0f4426014610580578063f10684541461059f578063f107779f146105b4578063f1a392da146105d3578063f2fde38b146105e8578063f887ea4014610607578063fb61778714610626578063fbfa77cf1461063a575f80fd5b366101ea57005b5f80fd5b3480156101f9575f80fd5b506010546102079060ff1681565b60405190151581526020015b60405180910390f35b348015610227575f80fd5b50610230610659565b604051908152602001610213565b348015610249575f80fd5b5060045461025d906001600160a01b031681565b6040516102139190611fed565b348015610275575f80fd5b50610230603281565b348015610289575f80fd5b5060025461025d906001600160a01b031681565b3480156102a8575f80fd5b506102bc6102b7366004612001565b6106d8565b005b3480156102c9575f80fd5b506102bc610895565b3480156102dd575f80fd5b506102bc610991565b3480156102f1575f80fd5b506102bc610be6565b348015610305575f80fd5b506102bc610c5a565b348015610319575f80fd5b5060055461025d906001600160a01b031681565b348015610338575f80fd5b50610207610c84565b34801561034c575f80fd5b5060095461025d906001600160a01b031681565b34801561036b575f80fd5b50600e5461025d906001600160a01b031681565b34801561038a575f80fd5b506102306101c281565b34801561039f575f80fd5b506102bc6103ae366004612018565b610c98565b3480156103be575f80fd5b5060075461025d906001600160a01b031681565b3480156103dd575f80fd5b506102bc610d0f565b3480156103f1575f80fd5b50610230610d20565b348015610405575f80fd5b506102bc610d3b565b348015610419575f80fd5b50600a5461025d906001600160a01b031681565b348015610438575f80fd5b5061025d610447366004612001565b610d53565b348015610457575f80fd5b5061025d610466366004612001565b610d7b565b348015610476575f80fd5b5061023061019081565b34801561048b575f80fd5b5061025d610d8a565b34801561049f575f80fd5b5061023061271081565b3480156104b4575f80fd5b506102bc610d98565b3480156104c8575f80fd5b506102bc6104d7366004612018565b610e0c565b3480156104e7575f80fd5b50610230610e70565b3480156104fb575f80fd5b506102bc610edf565b34801561050f575f80fd5b506102bc61051e36600461208c565b610f11565b34801561052e575f80fd5b5060035461025d906001600160a01b031681565b34801561054d575f80fd5b5061025d61055c366004612001565b6110af565b34801561056c575f80fd5b506102bc61057b366004612018565b6110be565b34801561058b575f80fd5b506102bc61059a366004612018565b6111d7565b3480156105aa575f80fd5b5061023060065481565b3480156105bf575f80fd5b506102bc6105ce36600461211e565b611201565b3480156105de575f80fd5b50610230600f5481565b3480156105f3575f80fd5b506102bc610602366004612018565b61121c565b348015610612575f80fd5b5060085461025d906001600160a01b031681565b348015610631575f80fd5b506102bc611256565b348015610645575f80fd5b5060015461025d906001600160a01b031681565b6005546006546040516393f1a40b60e01b815260048101919091523060248201525f9182916001600160a01b03909116906393f1a40b906044016040805180830381865afa1580156106ad573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106d1919061213d565b5092915050565b6001546001600160a01b0316331461070b5760405162461bcd60e51b81526004016107029061215f565b60405180910390fd5b6002546040516370a0823160e01b81525f916001600160a01b0316906370a082319061073b903090600401611fed565b602060405180830381865afa158015610756573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061077a919061217f565b905081811015610869576005546006546001600160a01b039091169063441a3e70906107a684866121aa565b6040516001600160e01b031960e085901b168152600481019290925260248201526044015f604051808303815f87803b1580156107e1575f80fd5b505af11580156107f3573d5f803e3d5ffd5b50506002546040516370a0823160e01b81526001600160a01b0390911692506370a082319150610827903090600401611fed565b602060405180830381865afa158015610842573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610866919061217f565b90505b818111156108745750805b600154600254610891916001600160a01b0391821691168361136f565b5050565b61089d6113cc565b6108a56113fe565b6108ad61144c565b6002546040516370a0823160e01b81525f916001600160a01b0316906370a08231906108dd903090600401611fed565b602060405180830381865afa1580156108f8573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061091c919061217f565b9050801561098e57600554600654600754604051630fa5ae1360e11b81526001600160a01b0393841693631f4b5c26936109609390928792909116906004016121bd565b5f604051808303815f87803b158015610977575f80fd5b505af1158015610989573d5f803e3d5ffd5b505050505b50565b6109996114e2565b600554600654604051631c57762b60e31b815260048101919091525f60248201526001600160a01b039091169063e2bbb158906044015f604051808303815f87803b1580156109e6575f80fd5b505af11580156109f8573d5f803e3d5ffd5b50506003546040516370a0823160e01b81525f93506001600160a01b0390911691506370a0823190610a2e903090600401611fed565b602060405180830381865afa158015610a49573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a6d919061217f565b9050805f03610a795750565b610a8281611508565b610a8a61172d565b6002546040516370a0823160e01b81525f916001600160a01b0316906370a0823190610aba903090600401611fed565b602060405180830381865afa158015610ad5573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610af9919061217f565b90508015610b6b57600554600654600754604051630fa5ae1360e11b81526001600160a01b0393841693631f4b5c2693610b3d9390928792909116906004016121bd565b5f604051808303815f87803b158015610b54575f80fd5b505af1158015610b66573d5f803e3d5ffd5b505050505b42600f55337f4534f107610758c3931de9ad1e176476fcfb8c74adf920167e1d54ee84fcfe7683612710610ba06032836121dc565b610baa91906121f3565b612710610bb9610190886121dc565b610bc391906121f3565b6040805193845260208401929092529082015260600160405180910390a250505b565b610bee6113cc565b610bf6611bc8565b600554600654604051632989754760e11b81526001600160a01b0390921691635312ea8e91610c2b9160040190815260200190565b5f604051808303815f87803b158015610c42575f80fd5b505af1158015610c54573d5f803e3d5ffd5b50505050565b6001546001600160a01b03163314610be45760405162461bcd60e51b81526004016107029061215f565b5f54600160a01b900460ff1690565b905090565b610ca06113cc565b6001546001600160a01b031615610ced5760405162461bcd60e51b81526020600482015260116024820152701d985d5b1d08185b1c9958591e481cd95d607a1b6044820152606401610702565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b610d176113cc565b610be45f611c0a565b5f610d29610659565b610d31610e70565b610c939190612212565b610d436113cc565b610d4b611bc8565b610be4611c59565b600b8181548110610d62575f80fd5b5f918252602090912001546001600160a01b0316905081565b600d8181548110610d62575f80fd5b5f546001600160a01b031690565b610da06113cc565b47801561098e576040515f90339083908381818185875af1925050503d805f8114610de6576040519150601f19603f3d011682016040523d82523d5f602084013e610deb565b606091505b50509050806108915760405162461bcd60e51b815260040161070290612225565b610e146113cc565b6008546040516001600160a01b038084169216907f02dc5c233404867c793b749c6d644beb2277536d18a7e7974d3f238e4c6f1684905f90a3600880546001600160a01b0319166001600160a01b03831617905561098e61144c565b6002546040516370a0823160e01b81525f916001600160a01b0316906370a0823190610ea0903090600401611fed565b602060405180830381865afa158015610ebb573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c93919061217f565b610ee76114e2565b6001546001600160a01b031633146108ad5760405162461bcd60e51b81526004016107029061215f565b610f196113cc565b6002851015610f555760405162461bcd60e51b81526020600482015260086024820152670c4c2c840e0c2e8d60c31b6044820152606401610702565b6003546001600160a01b031686865f81610f7157610f71612252565b9050602002016020810190610f869190612018565b6001600160a01b031614610fd05760405162461bcd60e51b81526020600482015260116024820152701c185d1a16cc1748084f4819585c9b9959607a1b6044820152606401610702565b6004546001600160a01b03168686610fe96001826121aa565b818110610ff857610ff8612252565b905060200201602081019061100d9190612018565b6001600160a01b0316146110585760405162461bcd60e51b8152602060048201526012602482015271706174685b2d315d20213d206e617469766560701b6044820152606401610702565b611064600b8787611f78565b50611071600c8585611f78565b5061107e600d8383611f78565b506040517f0671805877ede27b46ab75f0a8c64bf33c8a96ad87700ab5e1f4928296857a57905f90a1505050505050565b600c8181548110610d62575f80fd5b6110c66113cc565b6002546001600160a01b039081169082160361110c5760405162461bcd60e51b8152602060048201526005602482015264085dd85b9d60da1b6044820152606401610702565b6003546001600160a01b03908116908216036111545760405162461bcd60e51b81526020600482015260076024820152660859585c9b995960ca1b6044820152606401610702565b6040516370a0823160e01b81525f906001600160a01b038316906370a0823190611182903090600401611fed565b602060405180830381865afa15801561119d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111c1919061217f565b90506108916001600160a01b038316338361136f565b6111df6113cc565b600e80546001600160a01b0319166001600160a01b0392909216919091179055565b6112096113cc565b6010805460ff1916911515919091179055565b6112246113cc565b6001600160a01b03811661124d575f604051631e4fbdf760e01b81526004016107029190611fed565b61098e81611c0a565b6001546001600160a01b031633146112805760405162461bcd60e51b81526004016107029061215f565b600554600654604051632989754760e11b81526001600160a01b0390921691635312ea8e916112b59160040190815260200190565b5f604051808303815f87803b1580156112cc575f80fd5b505af11580156112de573d5f803e3d5ffd5b50506002546040516370a0823160e01b81525f93506001600160a01b0390911691506370a0823190611314903090600401611fed565b602060405180830381865afa15801561132f573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611353919061217f565b60015460025491925061098e916001600160a01b039081169116835b6113c783846001600160a01b031663a9059cbb8585604051602401611395929190612266565b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050611cea565b505050565b336113d5610d8a565b6001600160a01b031614610be4573360405163118cdaa760e01b81526004016107029190611fed565b611406611d4d565b5f805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516114429190611fed565b60405180910390a1565b60055460025461146a916001600160a01b0391821691165f19611d72565b600854600354611488916001600160a01b0391821691165f19611d72565b6008546004546114a6916001600160a01b0391821691165f19611d72565b6008546009546114c4916001600160a01b0391821691165f19611d72565b600854600a54610be4916001600160a01b0391821691165f19611d72565b6114ea610c84565b15610be45760405163d93c066560e01b815260040160405180910390fd5b5f6127106115186101c2846121dc565b61152291906121f3565b6004546003549192506001600160a01b0391821691161461159f5761159f81600b80548060200260200160405190810160405280929190818152602001828054801561159557602002820191905f5260205f20905b81546001600160a01b03168152600190910190602001808311611577575b5050505050611e02565b600480546040516370a0823160e01b81525f926001600160a01b03909216916370a08231916115d091309101611fed565b602060405180830381865afa1580156115eb573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061160f919061217f565b90505f6101c26116206032846121dc565b61162a91906121f3565b90505f61163782846121aa565b9050811561165657600454611656906001600160a01b0316338461136f565b80156109895760048054604051632e1a7d4d60e01b81529182018390526001600160a01b031690632e1a7d4d906024015f604051808303815f87803b15801561169d575f80fd5b505af11580156116af573d5f803e3d5ffd5b5050600e546040515f93506001600160a01b03909116915083908381818185875af1925050503d805f81146116ff576040519150601f19603f3d011682016040523d82523d5f602084013e611704565b606091505b50509050806117255760405162461bcd60e51b815260040161070290612225565b505050505050565b6003546040516370a0823160e01b81525f916001600160a01b0316906370a082319061175d903090600401611fed565b602060405180830381865afa158015611778573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061179c919061217f565b9050805f036117a85750565b6004546003546001600160a01b039081169116146118205761182081600b80548060200260200160405190810160405280929190818152602001828054801561159557602002820191905f5260205f209081546001600160a01b03168152600190910190602001808311611577575050505050611e02565b600480546040516370a0823160e01b81525f926001600160a01b03909216916370a082319161185191309101611fed565b602060405180830381865afa15801561186c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611890919061217f565b90505f61189e6002836121f3565b600c549091506001101561190c5761190c81600c80548060200260200160405190810160405280929190818152602001828054801561159557602002820191905f5260205f209081546001600160a01b03168152600190910190602001808311611577575050505050611e02565b600d54600110156119eb57600480546040516370a0823160e01b81525f926001600160a01b03909216916370a082319161194891309101611fed565b602060405180830381865afa158015611963573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611987919061217f565b90506119e981600d80548060200260200160405190810160405280929190818152602001828054801561159557602002820191905f5260205f209081546001600160a01b03168152600190910190602001808311611577575050505050611e02565b505b6009546040516370a0823160e01b81525f916001600160a01b0316906370a0823190611a1b903090600401611fed565b602060405180830381865afa158015611a36573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a5a919061217f565b600a546040516370a0823160e01b81529192505f916001600160a01b03909116906370a0823190611a8f903090600401611fed565b602060405180830381865afa158015611aaa573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ace919061217f565b90505f82118015611ade57505f81115b1561098957600854600954611b00916001600160a01b03918216911684611d72565b600854600a54611b1d916001600160a01b03918216911683611d72565b600854600954600a5460405162e8e33760e81b81526001600160a01b039283166004820152908216602482015260448101859052606481018490525f6084820181905260a48201523060c48201524260e482015291169063e8e3370090610104016060604051808303815f875af1158015611b9a573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611bbe919061227f565b5050505050505050565b611bd06114e2565b5f805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586114353390565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600554600254611c76916001600160a01b0391821691165f611d72565b600854600354611c93916001600160a01b0391821691165f611d72565b600854600454611cb0916001600160a01b0391821691165f611d72565b600854600954611ccd916001600160a01b0391821691165f611d72565b600854600a54610be4916001600160a01b0391821691165f611d72565b5f8060205f8451602086015f885af180611d09576040513d5f823e3d81fd5b50505f513d91508115611d20578060011415611d2d565b6001600160a01b0384163b155b15610c545783604051635274afe760e01b81526004016107029190611fed565b611d55610c84565b610be457604051638dfc202b60e01b815260040160405180910390fd5b5f836001600160a01b031663095ea7b38484604051602401611d95929190612266565b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050509050611dce8482611f2d565b610c5457611df884856001600160a01b031663095ea7b3865f604051602401611395929190612266565b610c548482611cea565b6008548151611e47916001600160a01b031690849084905f90611e2757611e27612252565b60200260200101516001600160a01b0316611d729092919063ffffffff16565b60105460ff1615611eb357600854604051635c11d79560e01b81526001600160a01b0390911690635c11d79590611e8a9085905f908690309042906004016122aa565b5f604051808303815f87803b158015611ea1575f80fd5b505af1158015611725573d5f803e3d5ffd5b6008546040516338ed173960e01b81526001600160a01b03909116906338ed173990611eeb9085905f908690309042906004016122aa565b5f604051808303815f875af1158015611f06573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526113c7919081019061232d565b5f805f8060205f8651602088015f8a5af192503d91505f519050828015611f6c57508115611f5e5780600114611f6c565b5f866001600160a01b03163b115b93505050505b92915050565b828054828255905f5260205f20908101928215611fc9579160200282015b82811115611fc95781546001600160a01b0319166001600160a01b03843516178255602090920191600190910190611f96565b50611fd5929150611fd9565b5090565b5b80821115611fd5575f8155600101611fda565b6001600160a01b0391909116815260200190565b5f60208284031215612011575f80fd5b5035919050565b5f60208284031215612028575f80fd5b81356001600160a01b038116811461203e575f80fd5b9392505050565b5f8083601f840112612055575f80fd5b5081356001600160401b0381111561206b575f80fd5b6020830191508360208260051b8501011115612085575f80fd5b9250929050565b5f805f805f80606087890312156120a1575f80fd5b86356001600160401b03808211156120b7575f80fd5b6120c38a838b01612045565b909850965060208901359150808211156120db575f80fd5b6120e78a838b01612045565b909650945060408901359150808211156120ff575f80fd5b5061210c89828a01612045565b979a9699509497509295939492505050565b5f6020828403121561212e575f80fd5b8135801515811461203e575f80fd5b5f806040838503121561214e575f80fd5b505080516020909101519092909150565b602080825260069082015265085d985d5b1d60d21b604082015260600190565b5f6020828403121561218f575f80fd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b81810381811115611f7257611f72612196565b92835260208301919091526001600160a01b0316604082015260600190565b8082028115828204841417611f7257611f72612196565b5f8261220d57634e487b7160e01b5f52601260045260245ffd5b500490565b80820180821115611f7257611f72612196565b602080825260139082015272141314c81d1c985b9cd9995c8819985a5b1959606a1b604082015260600190565b634e487b7160e01b5f52603260045260245ffd5b6001600160a01b03929092168252602082015260400190565b5f805f60608486031215612291575f80fd5b8351925060208401519150604084015190509250925092565b5f60a082018783526020878185015260a0604085015281875180845260c08601915082890193505f5b818110156122f85784516001600160a01b0316835293830193918301916001016122d3565b50506001600160a01b03969096166060850152505050608001529392505050565b634e487b7160e01b5f52604160045260245ffd5b5f602080838503121561233e575f80fd5b82516001600160401b0380821115612354575f80fd5b818501915085601f830112612367575f80fd5b81518181111561237957612379612319565b8060051b604051601f19603f8301168101818110858211171561239e5761239e612319565b6040529182528482019250838101850191888311156123bb575f80fd5b938501935b828510156123d9578451845293850193928501926123c0565b9897505050505050505056fea164736f6c6343000814000a