Contract 0xc9070b3efe0aacc5afb4b31c5dbdca7c6b4baaa9

Txn Hash Method
Block
From
To
Value [Txn Fee]
0xf331d06f74e8b2454bea4c11ebbcbea328964f457f4177a621e72bad94f5356eDeposit97149872022-01-18 2:19:1140 secs ago0x2261e84b32f4c365464bfa54ef92a8c6a695fb74 IN  0xc9070b3efe0aacc5afb4b31c5dbdca7c6b4baaa90 AVAX0.017094075 25
0x5517134d5f2b67693dcf57ec03c59e69b4fb8cc8b2686b61b945ad75f664479cDeposit97149012022-01-18 2:16:223 mins ago0xca079a575dc2e1ba7acf2984c586df162719ef9d IN  0xc9070b3efe0aacc5afb4b31c5dbdca7c6b4baaa90 AVAX0.0196614 25
0xa29400ebcca497b73793e8d124ae7a040a44b22126ecb0083a10d5146ef9e10eDeposit97148882022-01-18 2:15:553 mins ago0x2261e84b32f4c365464bfa54ef92a8c6a695fb74 IN  0xc9070b3efe0aacc5afb4b31c5dbdca7c6b4baaa90 AVAX0.0200886 25
0x5e031716491f08d45993e64a78865ce3e6152bebe429230d3c5e57210dd5f87eWithdraw97148872022-01-18 2:15:533 mins ago0x02c7d89d8912a3e6a4b54468360c861c5a2c26d9 IN  0xc9070b3efe0aacc5afb4b31c5dbdca7c6b4baaa90 AVAX0.01712335 25
0x3cc9cb1e8fdeb63738e1bf7ecb3d842d5a51cb8c8872b49b8cd241813f94c481Deposit97148622022-01-18 2:15:024 mins ago0xf6ce96ce6922c4bff8600ca1c107ed333a1bcb80 IN  0xc9070b3efe0aacc5afb4b31c5dbdca7c6b4baaa90 AVAX0.006992425 25
0x2a86bb708002819c1f5d660d08d977e558be9b5be328836dbd248311f2c16fb5Deposit97148622022-01-18 2:15:024 mins ago0x591169e039ccb6cf5f8baa2d6d613292f1575c95 IN  0xc9070b3efe0aacc5afb4b31c5dbdca7c6b4baaa90 AVAX0.0196614 25
0x474d659d3eb305cb283f83533b776e74a354218ccf04428b6108cc0dc17268d7Deposit97147262022-01-18 2:10:289 mins ago0xa2da868c28189b22bf37df3fee67c4daad7e8ef7 IN  0xc9070b3efe0aacc5afb4b31c5dbdca7c6b4baaa90 AVAX0.0192339 25
0xecb3aec7bf392c998b6a36ce18efc69639d7a181d330c0a486057d54a2d56e94Withdraw97146942022-01-18 2:09:2410 mins ago0xa2da868c28189b22bf37df3fee67c4daad7e8ef7 IN  0xc9070b3efe0aacc5afb4b31c5dbdca7c6b4baaa90 AVAX0.014568225 25
0x4c4fdbc0d15bd84bbdbc0da25c0b9248d79403dbeea0635c1adf3c5407bf4b75Earn97146212022-01-18 2:06:5212 mins ago0xae7a90a5d381c031ffacbf4c76cef35ec2ab98fb IN  0xc9070b3efe0aacc5afb4b31c5dbdca7c6b4baaa90 AVAX0.011570325 25
0x3104e1f2351c0de96c294885f76dbbe6204f3ef38e174cf2232a8a7793d2c859Deposit97145932022-01-18 2:05:5913 mins ago0xf36bb95548ae036b8add44f94cd0d01316825a20 IN  0xc9070b3efe0aacc5afb4b31c5dbdca7c6b4baaa90 AVAX0.022885475 25
0xa423bddddaba2b52e218e8da70976390e5e9c3bae66308399f0413273482b2b5Withdraw97145122022-01-18 2:03:1616 mins ago0xda8ce6b0114b9c7130fbb4c005b2634c23e6e686 IN  0xc9070b3efe0aacc5afb4b31c5dbdca7c6b4baaa90 AVAX0.017245175 25
0x884322d87a605b9f8fe0e4507e85032c6339e6de46819663ef15b611dc8a5f9aDeposit97144672022-01-18 2:01:4518 mins ago0x2d87b4029f4464bc6c02e3e11bd04531a304a5a0 IN  0xc9070b3efe0aacc5afb4b31c5dbdca7c6b4baaa90 AVAX0.015865975 25
0x9cb4107e34cc92bbe4e7accbfe260ebc8baff42fe90f8fda6a63a16df59fe157Deposit97144522022-01-18 2:01:1618 mins ago0xf6ce96ce6922c4bff8600ca1c107ed333a1bcb80 IN  0xc9070b3efe0aacc5afb4b31c5dbdca7c6b4baaa90 AVAX0.0200889 25
0x64209e5adce02017f3e65cedb0fa1848be3af4d17dee106ba85a66792c49461cEarn97144122022-01-18 1:59:5319 mins ago0xa2da868c28189b22bf37df3fee67c4daad7e8ef7 IN  0xc9070b3efe0aacc5afb4b31c5dbdca7c6b4baaa90 AVAX0.01176015 25
0x26826e7905d9c16a6b00df30dbeefe23678a7185d2c4187900ab59d749f5f082Deposit97143602022-01-18 1:58:1121 mins ago0xd919b98faf8f4af01ec91af664c75e48d4c3a56b IN  0xc9070b3efe0aacc5afb4b31c5dbdca7c6b4baaa90 AVAX0.015438475 25
0x9a8f50922cffdb231759e8e76d202e615efe2d9023ba56445ed9579bef573f9cWithdraw97143322022-01-18 1:57:0522 mins ago0x5734e1e5797fd900f668ca52983c4fed8bbc5ef9 IN  0xc9070b3efe0aacc5afb4b31c5dbdca7c6b4baaa90 AVAX0.01807117525
0xf423917bd0c8efc49a63829a5e7745abf48247fd751407d83ada4f6f45708d74Deposit97143202022-01-18 1:56:4023 mins ago0x9cf995888756811a6353fe6581bb11d26051f3a8 IN  0xc9070b3efe0aacc5afb4b31c5dbdca7c6b4baaa90 AVAX0.0196614 25
0x2e60c3425aaeae5fc9ac8096934ec6a05c47909db650aac963b23f64f46dd238Withdraw97143082022-01-18 1:56:1523 mins ago0x2d87b4029f4464bc6c02e3e11bd04531a304a5a0 IN  0xc9070b3efe0aacc5afb4b31c5dbdca7c6b4baaa90 AVAX0.017379675 25
0xfcf6905d8d5d05b00fa6d14a2a6071934c7b444755343f3358d5833ea666e3bcDeposit97142702022-01-18 1:54:5824 mins ago0xcfe8b8cb9fa39f7a8c2da3c5fb258ae3d2fceaa8 IN  0xc9070b3efe0aacc5afb4b31c5dbdca7c6b4baaa90 AVAX0.017621825 25
0x7865364ffe4727a1098e60c9e21233c016679eee45752911c3e4514715c58e04Deposit97142652022-01-18 1:54:5025 mins ago0xb89fe9d6a75956513f4594e1d131e6ac55ad15d3 IN  0xc9070b3efe0aacc5afb4b31c5dbdca7c6b4baaa90 AVAX0.0220971327.5
0x83746b1710c4bdea4d027671568e67a23ff882e65ddf3e4299dc82792e46e341Withdraw97142502022-01-18 1:54:1725 mins ago0x8fdd0cf22012a5fecdbf77ef30d9e9834dc1bf0a IN  0xc9070b3efe0aacc5afb4b31c5dbdca7c6b4baaa90 AVAX0.01384855 25
0x01bfa38eeda544f3d5408fbeaecdb660adf03bbd3690f3e923f596bb9ffbef90Withdraw97141922022-01-18 1:52:1327 mins ago0x4a31a73877148925e88f6a1682236243757bb732 IN  0xc9070b3efe0aacc5afb4b31c5dbdca7c6b4baaa90 AVAX0.017643675 25
0xc6eeef2fd6f6f2340610c220f709e2d67502f36f43cb8c875d4f8415268d479cDeposit97141312022-01-18 1:50:1229 mins ago0x5d09b96f220333952dbf7e7edc9299db8f2e5f8f IN  0xc9070b3efe0aacc5afb4b31c5dbdca7c6b4baaa90 AVAX0.01986125 25
0xc26490cae3e9b4de991e4a277fc74d2ce979a4828cbd540e6714226854f3c68bEarn97141002022-01-18 1:49:0830 mins ago0xd28b7a7876c234f10b25be6cffc863bec9aa3d7b IN  0xc9070b3efe0aacc5afb4b31c5dbdca7c6b4baaa90 AVAX0.01536555 25
0xec48d6f0f5313a82d680a202fe9c535eb31c7854af8795fcfa38f9e009be0cd8Withdraw97139812022-01-18 1:45:0134 mins ago0x5d09b96f220333952dbf7e7edc9299db8f2e5f8f IN  0xc9070b3efe0aacc5afb4b31c5dbdca7c6b4baaa90 AVAX0.017643675 25
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
YieldWolf

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 11 : YieldWolf.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.4;

import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@openzeppelin/contracts/utils/structs/EnumerableSet.sol';

import './interfaces/IYieldWolfStrategy.sol';
import './interfaces/IYieldWolfCondition.sol';
import './interfaces/IYieldWolfAction.sol';

/**
 * @title YieldWolf Staking Contract
 * @notice handles deposits, withdraws, strategy execution and bounty rewards
 * @author YieldWolf
 */
contract YieldWolf is Ownable, ReentrancyGuard {
    using SafeERC20 for IERC20;
    using EnumerableSet for EnumerableSet.UintSet;

    struct Rule {
        address condition; // address of the rule condition
        uint256[] conditionIntInputs; // numeric inputs sent to the rule condition
        address[] conditionAddrInputs; // address inputs sent to the rule condition
        address action; // address of the rule action
        uint256[] actionIntInputs; // numeric inputs sent to the rule action
        address[] actionAddrInputs; // address inputs sent to the rule action
    }

    struct UserInfo {
        uint256 shares; // total of shares the user has on the pool
        Rule[] rules; // list of rules applied to the pool
    }

    struct PoolInfo {
        IERC20 stakeToken; // address of the token staked on the underlying farm
        IYieldWolfStrategy strategy; // address of the strategy for the pool
    }

    PoolInfo[] public poolInfo; // info of each pool
    mapping(uint256 => mapping(address => UserInfo)) public userInfo; // info of each user that stakes tokens
    mapping(address => EnumerableSet.UintSet) private userStakedPools; // all pools in which a user has tokens staked
    mapping(address => bool) public strategyExists; // map used to ensure strategies cannot be added twice

    uint256 constant DEPOSIT_FEE_CAP = 500;
    uint256 public depositFee = 0;

    uint256 constant WITHDRAW_FEE_CAP = 500;
    uint256 public withdrawFee = 50;

    uint256 constant PERFORMANCE_FEE_CAP = 500;
    uint256 public performanceFee = 100;
    uint256 public performanceFeeBountyPct = 1000;

    uint256 constant RULE_EXECUTION_FEE_CAP = 500;
    uint256 public ruleFee = 20;
    uint256 public ruleFeeBountyPct = 5000;

    uint256 constant MAX_USER_RULES_PER_POOL = 50;

    address public feeAddress;
    address public feeAddressSetter;

    bool private executeRuleLocked;

    // addresses allowed to operate the strategy, including pausing and unpausing it in case of emergency
    mapping(address => bool) public operators;

    event Add(IERC20 stakeToken, IYieldWolfStrategy strategy);
    event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
    event Withdraw(address indexed user, address indexed to, uint256 indexed pid, uint256 amount);
    event AddRule(address indexed user, uint256 indexed pid);
    event RemoveRule(address indexed user, uint256 indexed pid, uint256 ruleIndex);
    event Earn(address indexed user, uint256 indexed pid, uint256 bountyReward);
    event ExecuteRule(uint256 indexed pid, address indexed user, uint256 ruleIndex);
    event SetOperator(address addr, bool isOperator);
    event SetDepositFee(uint256 depositFee);
    event SetWithdrawFee(uint256 withdrawFee);
    event SetPerformanceFee(uint256 performanceFee);
    event SetPerformanceFeeBountyPct(uint256 performanceFeeBountyPct);
    event SetRuleFee(uint256 ruleFee);
    event SetRuleFeeBountyPct(uint256 ruleFeeBountyPct);
    event SetStrategyRouter(IYieldWolfStrategy strategy, address router);
    event SetStrategySwapRouterEnabled(IYieldWolfStrategy strategy, bool enabled);
    event SetStrategySwapPath(IYieldWolfStrategy _strategy, address _token0, address _token1, address[] _path);
    event SetStrategyExtraEarnTokens(IYieldWolfStrategy _strategy, address[] _extraEarnTokens);
    event SetFeeAddress(address feeAddress);
    event SetFeeAddressSetter(address feeAddressSetter);

    modifier onlyOperator() {
        require(operators[msg.sender], 'onlyOperator: NOT_ALLOWED');
        _;
    }

    modifier onlyEndUser() {
        require(!Address.isContract(msg.sender) && tx.origin == msg.sender);
        _;
    }

    constructor(address _feeAddress) {
        operators[msg.sender] = true;
        feeAddressSetter = msg.sender;
        feeAddress = _feeAddress;
    }

    /**
     * @notice returns how many pools have been added
     */
    function poolLength() external view returns (uint256) {
        return poolInfo.length;
    }

    /**
     * @notice returns in how many pools a user has tokens staked
     * @param _user address of the user
     */
    function userStakedPoolLength(address _user) external view returns (uint256) {
        return userStakedPools[_user].length();
    }

    /**
     * @notice returns the pid of a pool in which the user has tokens staked
     * @dev helper for iterating over the array of user staked pools
     * @param _user address of the user
     * @param _index the index in the array of user staked pools
     */
    function userStakedPoolAt(address _user, uint256 _index) external view returns (uint256) {
        return userStakedPools[_user].at(_index);
    }

    /**
     * @notice returns a rule by pid, user and index
     * @dev helper for iterating over all the rules
     * @param _pid the pool id
     * @param _user address of the user
     * @param _ruleIndex the index of the rule
     */
    function userPoolRule(
        uint256 _pid,
        address _user,
        uint256 _ruleIndex
    ) external view returns (Rule memory rule) {
        rule = userInfo[_pid][_user].rules[_ruleIndex];
    }

    /**
     * @notice returns the number of rule a user has for a given pool
     * @param _pid the pool id
     * @param _user address of the user
     */
    function userRuleLength(uint256 _pid, address _user) external view returns (uint256) {
        return userInfo[_pid][_user].rules.length;
    }

    /**
     * @notice returns the amount of staked tokens by a user
     * @param _pid the pool id
     * @param _user address of the user
     */
    function stakedTokens(uint256 _pid, address _user) public view returns (uint256) {
        PoolInfo memory pool = poolInfo[_pid];
        UserInfo memory user = userInfo[_pid][_user];
        IYieldWolfStrategy strategy = pool.strategy;

        uint256 sharesTotal = strategy.sharesTotal();
        return sharesTotal > 0 ? (user.shares * strategy.totalStakeTokens()) / sharesTotal : 0;
    }

    /**
     * @notice adds a new pool with a given strategy
     * @dev can only be called by an operator
     * @param _strategy address of the strategy
     */
    function add(IYieldWolfStrategy _strategy) public onlyOperator {
        require(!strategyExists[address(_strategy)], 'add: STRATEGY_ALREADY_EXISTS');
        IERC20 stakeToken = IERC20(_strategy.stakeToken());
        poolInfo.push(PoolInfo({stakeToken: stakeToken, strategy: _strategy}));
        strategyExists[address(_strategy)] = true;
        emit Add(stakeToken, _strategy);
    }

    /**
     * @notice adds multiple new pools
     * @dev helper to add many pools at once
     * @param _strategies array of strategy addresses
     */
    function addMany(IYieldWolfStrategy[] calldata _strategies) external onlyOperator {
        for (uint256 i; i < _strategies.length; i++) {
            add(_strategies[i]);
        }
    }

    /**
     * @notice transfers tokens from the user and stakes them in the underlying farm
     * @dev tokens are transferred from msg.sender directly to the strategy
     * @param _pid the pool id
     * @param _depositAmount amount of tokens to transfer from msg.sender
     */
    function deposit(uint256 _pid, uint256 _depositAmount) external {
        _deposit(_pid, _depositAmount, msg.sender);
    }

    /**
     * @notice deposits stake tokens on behalf of another user
     * @param _pid the pool id
     * @param _depositAmount amount of tokens to transfer from msg.sender
     * @param _to address of the beneficiary
     */
    function depositTo(
        uint256 _pid,
        uint256 _depositAmount,
        address _to
    ) external {
        _deposit(_pid, _depositAmount, _to);
    }

    /**
     * @notice unstakes tokens from the underlying farm and transfers them to the user
     * @dev tokens are transferred directly from the strategy to the user
     * @param _pid the pool id
     * @param _withdrawAmount maximum amount of tokens to transfer to msg.sender
     */
    function withdraw(uint256 _pid, uint256 _withdrawAmount) external {
        _withdrawFrom(msg.sender, msg.sender, _pid, _withdrawAmount, address(0), 0, false);
    }

    /**
     * @notice withdraws all the token from msg.sender without harvesting first
     * @dev only for emergencies
     * @param _pid the pool id
     */
    function emergencyWithdraw(uint256 _pid) external {
        _withdrawFrom(msg.sender, msg.sender, _pid, type(uint256).max, address(0), 0, true);
    }

    /**
     * @notice adds a new rule
     * @dev each user can have multiple rules for each pool
     * @param _pid the pool id
     * @param _condition address of the condition contract
     * @param _conditionIntInputs array of integer inputs to be sent to the condition
     * @param _conditionAddrInputs array of address inputs to be sent to the condition
     * @param _action address of the action contract
     * @param _actionIntInputs array of integer inputs to be sent to the action
     * @param _actionAddrInputs array of address inputs to be sent to the action
     */
    function addRule(
        uint256 _pid,
        address _condition,
        uint256[] calldata _conditionIntInputs,
        address[] calldata _conditionAddrInputs,
        address _action,
        uint256[] calldata _actionIntInputs,
        address[] calldata _actionAddrInputs
    ) external {
        UserInfo storage user = userInfo[_pid][msg.sender];

        require(user.rules.length <= MAX_USER_RULES_PER_POOL, 'addRule: CAP_EXCEEDED');
        require(IYieldWolfCondition(_condition).isCondition(), 'addRule: BAD_CONDITION');
        require(IYieldWolfAction(_action).isAction(), 'addRule: BAD_ACTION');

        Rule memory rule;
        rule.condition = _condition;
        rule.conditionIntInputs = _conditionIntInputs;
        rule.conditionAddrInputs = _conditionAddrInputs;
        rule.action = _action;
        rule.actionIntInputs = _actionIntInputs;
        rule.actionAddrInputs = _actionAddrInputs;
        user.rules.push(rule);
        emit AddRule(msg.sender, _pid);
    }

    /**
     * @notice removes a given rule
     * @param _pid the pool id
     * @param _ruleIndex the index of the rule in the user info for the given pool
     */
    function removeRule(uint256 _pid, uint256 _ruleIndex) external {
        UserInfo storage user = userInfo[_pid][msg.sender];
        require(_ruleIndex < user.rules.length, 'removeRule: BAD_INDEX');
        user.rules[_ruleIndex] = user.rules[user.rules.length - 1];
        user.rules.pop();
        emit RemoveRule(msg.sender, _pid, _ruleIndex);
    }

    /**
     * @notice runs the strategy and pays the bounty reward
     * @param _pid the pool id
     */
    function earn(uint256 _pid) external nonReentrant returns (uint256) {
        return _earn(_pid);
    }

    /**
     * @notice runs multiple strategies and pays multiple rewards
     * @param _pids array of pool ids
     */
    function earnMany(uint256[] calldata _pids) external nonReentrant {
        for (uint256 i; i < _pids.length; i++) {
            _earn(_pids[i]);
        }
    }

    /**
     * @notice checks wheter a rule passes its condition
     * @param _pid the pool id
     * @param _user address of the user
     * @param _ruleIndex the index of the rule
     */
    function checkRule(
        uint256 _pid,
        address _user,
        uint256 _ruleIndex
    ) external view returns (bool) {
        Rule memory rule = userInfo[_pid][_user].rules[_ruleIndex];
        return
            IYieldWolfCondition(rule.condition).check(
                address(poolInfo[_pid].strategy),
                _user,
                _pid,
                rule.conditionIntInputs,
                rule.conditionAddrInputs
            );
    }

    /**
     * @notice executes the rule action if the condition passes and sends the bounty reward to msg.sender
     * @param _pid the pool id
     * @param _user address of the user
     * @param _ruleIndex the index of the rule
     */
    function executeRule(
        uint256 _pid,
        address _user,
        uint256 _ruleIndex
    ) external onlyEndUser {
        require(!executeRuleLocked, 'executeRule: LOCKED');
        executeRuleLocked = true;
        UserInfo memory user = userInfo[_pid][_user];
        Rule memory rule = user.rules[_ruleIndex];
        IYieldWolfStrategy strategy = poolInfo[_pid].strategy;

        require(
            IYieldWolfCondition(rule.condition).check(
                address(strategy),
                _user,
                _pid,
                rule.conditionIntInputs,
                rule.conditionAddrInputs
            ),
            'executeAction: CONDITION_NOT_MET'
        );

        _tryEarn(strategy);
        IYieldWolfAction action = IYieldWolfAction(rule.action);
        (uint256 withdrawAmount, address withdrawTo) = action.execute(
            address(strategy),
            _user,
            _pid,
            rule.actionIntInputs,
            rule.actionAddrInputs
        );

        uint256 staked = stakedTokens(_pid, _user);
        if (withdrawAmount > staked) {
            withdrawAmount = staked;
        }

        if (withdrawAmount > 0) {
            uint256 ruleFeeAmount = (withdrawAmount * ruleFee) / 10000;
            _withdrawFrom(_user, withdrawTo, _pid, withdrawAmount, msg.sender, ruleFeeAmount, true);
        }
        action.callback(address(strategy), _user, _pid, rule.actionIntInputs, rule.actionAddrInputs);
        executeRuleLocked = false;
        emit ExecuteRule(_pid, _user, _ruleIndex);
    }

    /**
     * @notice adds or removes an operator
     * @dev can only be called by the owner
     * @param _addr address of the operator
     * @param _isOperator whether the given address will be set as an operator
     */
    function setOperator(address _addr, bool _isOperator) external onlyOwner {
        operators[_addr] = _isOperator;
        emit SetOperator(_addr, _isOperator);
    }

    /**
     * @notice updates the deposit fee
     * @dev can only be called by the owner
     * @param _depositFee new deposit fee in basis points
     */
    function setDepositFee(uint256 _depositFee) external onlyOwner {
        require(_depositFee <= DEPOSIT_FEE_CAP, 'setDepositFee: CAP_EXCEEDED');
        depositFee = _depositFee;
        emit SetDepositFee(_depositFee);
    }

    /**
     * @notice updates the withdraw fee
     * @dev can only be called by the owner
     * @param _withdrawFee new withdraw fee in basis points
     */
    function setWithdrawFee(uint256 _withdrawFee) external onlyOwner {
        require(_withdrawFee <= WITHDRAW_FEE_CAP, 'setWithdrawFee: CAP_EXCEEDED');
        withdrawFee = _withdrawFee;
        emit SetWithdrawFee(_withdrawFee);
    }

    /**
     * @notice updates the performance fee
     * @dev can only be called by the owner
     * @param _performanceFee new performance fee fee in basis points
     */
    function setPerformanceFee(uint256 _performanceFee) external onlyOwner {
        require(_performanceFee <= PERFORMANCE_FEE_CAP, 'setPerformanceFee: CAP_EXCEEDED');
        performanceFee = _performanceFee;
        emit SetPerformanceFee(_performanceFee);
    }

    /**
     * @notice updates the percentage of the performance fee sent to the bounty hunter
     * @dev can only be called by the owner
     * @param _performanceFeeBountyPct percentage of the performance fee for the bounty hunter in basis points
     */
    function setPerformanceFeeBountyPct(uint256 _performanceFeeBountyPct) external onlyOwner {
        require(_performanceFeeBountyPct <= 10000, 'setPerformanceFeeBountyPct: CAP_EXCEEDED');
        performanceFeeBountyPct = _performanceFeeBountyPct;
        emit SetPerformanceFeeBountyPct(_performanceFeeBountyPct);
    }

    /**
     * @notice updates the rule execution fee
     * @dev can only be called by the owner
     * @param _ruleFee new rule fee fee in basis points
     */
    function setRuleFee(uint256 _ruleFee) external onlyOwner {
        require(_ruleFee <= RULE_EXECUTION_FEE_CAP, 'setRuleFee: CAP_EXCEEDED');
        ruleFee = _ruleFee;
        emit SetRuleFee(_ruleFee);
    }

    /**
     * @notice updates the percentage of the rule execution fee sent to the bounty hunter
     * @dev can only be called by the owner
     * @param _ruleFeeBountyPct percentage of the rule execution fee for the bounty hunter in basis points
     */
    function setRuleFeeBountyPct(uint256 _ruleFeeBountyPct) external onlyOwner {
        require(_ruleFeeBountyPct <= 10000, 'setRuleFeeBountyPct: CAP_EXCEEDED');
        ruleFeeBountyPct = _ruleFeeBountyPct;
        emit SetRuleFeeBountyPct(_ruleFeeBountyPct);
    }

    /**
     * @notice updates the swap router used by a given strategy
     * @dev can only be called by the owner
     * @param _strategy address of the strategy
     * @param _enabled whether to enable or disable the swap router
     */
    function setStrategySwapRouterEnabled(IYieldWolfStrategy _strategy, bool _enabled) external onlyOwner {
        _strategy.setSwapRouterEnabled(_enabled);
        emit SetStrategySwapRouterEnabled(_strategy, _enabled);
    }

    /**
     * @notice updates the swap path for a given pair
     * @dev can only be called by the owner
     * @param _strategy address of the strategy
     * @param _token0 address of token swap from
     * @param _token1 address of token swap to
     * @param _path swap path from token0 to token1
     */
    function setStrategySwapPath(
        IYieldWolfStrategy _strategy,
        address _token0,
        address _token1,
        address[] calldata _path
    ) external onlyOwner {
        require(_path.length != 1, 'setStrategySwapPath: INVALID_PATH');
        if (_path.length > 0) {
            // the first element must be token0 and the last one token1
            require(_path[0] == _token0 && _path[_path.length - 1] == _token1, 'setStrategySwapPath: INVALID_PATH');
        }
        _strategy.setSwapPath(_token0, _token1, _path);
        emit SetStrategySwapPath(_strategy, _token0, _token1, _path);
    }

    /**
     * @notice updates the swap path for a given pair
     * @dev can only be called by the owner
     * @param _strategy address of the strategy
     * @param _extraEarnTokens list of extra earn tokens for farms rewarding more than one token
     */
    function setStrategyExtraEarnTokens(IYieldWolfStrategy _strategy, address[] calldata _extraEarnTokens)
        external
        onlyOwner
    {
        require(_extraEarnTokens.length <= 5, 'setStrategyExtraEarnTokens: CAP_EXCEEDED');

        // tokens sanity check
        for (uint256 i; i < _extraEarnTokens.length; i++) {
            IERC20(_extraEarnTokens[i]).balanceOf(address(this));
        }

        _strategy.setExtraEarnTokens(_extraEarnTokens);
        emit SetStrategyExtraEarnTokens(_strategy, _extraEarnTokens);
    }

    /**
     * @notice updates the fee address
     * @dev can only be called by the fee address setter
     * @param _feeAddress new fee address
     */
    function setFeeAddress(address _feeAddress) external {
        require(msg.sender == feeAddressSetter && _feeAddress != address(0), 'setFeeAddress: NOT_ALLOWED');
        feeAddress = _feeAddress;
        emit SetFeeAddress(_feeAddress);
    }

    /**
     * @notice updates the fee address setter
     * @dev can only be called by the previous fee address setter
     * @param _feeAddressSetter new fee address setter
     */
    function setFeeAddressSetter(address _feeAddressSetter) external {
        require(msg.sender == feeAddressSetter && _feeAddressSetter != address(0), 'setFeeAddressSetter: NOT_ALLOWED');
        feeAddressSetter = _feeAddressSetter;
        emit SetFeeAddressSetter(_feeAddressSetter);
    }

    function _deposit(
        uint256 _pid,
        uint256 _depositAmount,
        address _to
    ) internal nonReentrant {
        require(_depositAmount > 0, 'deposit: MUST_BE_GREATER_THAN_ZERO');
        PoolInfo memory pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_to];

        if (pool.strategy.sharesTotal() > 0) {
            _tryEarn(pool.strategy);
        }

        // calculate deposit amount from balance before and after the transfer in order to support tokens with tax
        uint256 balanceBefore = pool.stakeToken.balanceOf(address(pool.strategy));
        pool.stakeToken.safeTransferFrom(address(msg.sender), address(pool.strategy), _depositAmount);
        _depositAmount = pool.stakeToken.balanceOf(address(pool.strategy)) - balanceBefore;

        uint256 sharesAdded = pool.strategy.deposit(_depositAmount);
        user.shares = user.shares + sharesAdded;
        userStakedPools[_to].add(_pid);

        emit Deposit(_to, _pid, _depositAmount);
    }

    function _withdrawFrom(
        address _user,
        address _to,
        uint256 _pid,
        uint256 _withdrawAmount,
        address _bountyHunter,
        uint256 _ruleFeeAmount,
        bool _skipEarn
    ) internal nonReentrant {
        require(_withdrawAmount > 0, '_withdrawFrom: MUST_BE_GREATER_THAN_ZERO');
        UserInfo storage user = userInfo[_pid][_user];
        IYieldWolfStrategy strategy = poolInfo[_pid].strategy;

        if (!_skipEarn) {
            _tryEarn(strategy);
        }

        uint256 sharesTotal = strategy.sharesTotal();

        require(user.shares > 0 && sharesTotal > 0, 'withdraw: NO_SHARES');

        uint256 maxAmount = (user.shares * strategy.totalStakeTokens()) / sharesTotal;
        if (_withdrawAmount > maxAmount) {
            _withdrawAmount = maxAmount;
        }
        uint256 sharesRemoved = strategy.withdraw(_withdrawAmount, _to, _bountyHunter, _ruleFeeAmount);
        user.shares = user.shares > sharesRemoved ? user.shares - sharesRemoved : 0;
        if (user.shares == 0) {
            userStakedPools[_user].remove(_pid);
        }

        emit Withdraw(_user, _to, _pid, _withdrawAmount);
    }

    function _earn(uint256 _pid) internal returns (uint256 bountyRewarded) {
        bountyRewarded = poolInfo[_pid].strategy.earn(msg.sender);
        emit Earn(msg.sender, _pid, bountyRewarded);
    }

    function _tryEarn(IYieldWolfStrategy _strategy) internal {
        try _strategy.earn(address(0)) {} catch {}
    }
}

File 2 of 11 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _setOwner(_msgSender());
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _setOwner(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 11 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 4 of 11 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

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

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

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

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

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

File 5 of 11 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 6 of 11 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

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

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

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

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

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

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

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

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

        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

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

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

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 7 of 11 : EnumerableSet.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastvalue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastvalue;
                // Update the index for the moved value
                set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }
}

File 8 of 11 : IYieldWolfStrategy.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.4;

interface IYieldWolfStrategy {
    function stakeToken() external view returns (address);

    function sharesTotal() external view returns (uint256);

    function earn(address _bountyHunter) external returns (uint256);

    function deposit(uint256 _depositAmount) external returns (uint256);

    function withdraw(
        uint256 _withdrawAmount,
        address _withdrawTo,
        address _bountyHunter,
        uint256 _ruleFeeAmount
    ) external returns (uint256);

    function router() external view returns (address);

    function token0() external view returns (address);

    function token1() external view returns (address);

    function totalStakeTokens() external view returns (uint256);

    function setSwapRouterEnabled(bool _enabled) external;

    function setSwapPath(
        address _token0,
        address _token1,
        address[] calldata _path
    ) external;

    function setExtraEarnTokens(address[] calldata _extraEarnTokens) external;
}

File 9 of 11 : IYieldWolfCondition.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.4;

interface IYieldWolfCondition {
    function isCondition() external view returns (bool);

    function check(
        address strategy,
        address user,
        uint256 pid,
        uint256[] memory intInputs,
        address[] memory addrInputs
    ) external view returns (bool);
}

File 10 of 11 : IYieldWolfAction.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.4;

interface IYieldWolfAction {
    function isAction() external view returns (bool);

    function execute(
        address strategy,
        address user,
        uint256 pid,
        uint256[] memory intInputs,
        address[] memory addrInputs
    ) external view returns (uint256, address);

    function callback(
        address strategy,
        address user,
        uint256 pid,
        uint256[] memory intInputs,
        address[] memory addrInputs
    ) external;
}

File 11 of 11 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

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

Contract ABI

[{"inputs":[{"internalType":"address","name":"_feeAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IERC20","name":"stakeToken","type":"address"},{"indexed":false,"internalType":"contract IYieldWolfStrategy","name":"strategy","type":"address"}],"name":"Add","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"}],"name":"AddRule","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bountyReward","type":"uint256"}],"name":"Earn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"ruleIndex","type":"uint256"}],"name":"ExecuteRule","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ruleIndex","type":"uint256"}],"name":"RemoveRule","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"depositFee","type":"uint256"}],"name":"SetDepositFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"feeAddress","type":"address"}],"name":"SetFeeAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"feeAddressSetter","type":"address"}],"name":"SetFeeAddressSetter","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"addr","type":"address"},{"indexed":false,"internalType":"bool","name":"isOperator","type":"bool"}],"name":"SetOperator","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"performanceFee","type":"uint256"}],"name":"SetPerformanceFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"performanceFeeBountyPct","type":"uint256"}],"name":"SetPerformanceFeeBountyPct","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"ruleFee","type":"uint256"}],"name":"SetRuleFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"ruleFeeBountyPct","type":"uint256"}],"name":"SetRuleFeeBountyPct","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IYieldWolfStrategy","name":"_strategy","type":"address"},{"indexed":false,"internalType":"address[]","name":"_extraEarnTokens","type":"address[]"}],"name":"SetStrategyExtraEarnTokens","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IYieldWolfStrategy","name":"strategy","type":"address"},{"indexed":false,"internalType":"address","name":"router","type":"address"}],"name":"SetStrategyRouter","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IYieldWolfStrategy","name":"_strategy","type":"address"},{"indexed":false,"internalType":"address","name":"_token0","type":"address"},{"indexed":false,"internalType":"address","name":"_token1","type":"address"},{"indexed":false,"internalType":"address[]","name":"_path","type":"address[]"}],"name":"SetStrategySwapPath","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IYieldWolfStrategy","name":"strategy","type":"address"},{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"SetStrategySwapRouterEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"withdrawFee","type":"uint256"}],"name":"SetWithdrawFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"contract IYieldWolfStrategy","name":"_strategy","type":"address"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IYieldWolfStrategy[]","name":"_strategies","type":"address[]"}],"name":"addMany","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_condition","type":"address"},{"internalType":"uint256[]","name":"_conditionIntInputs","type":"uint256[]"},{"internalType":"address[]","name":"_conditionAddrInputs","type":"address[]"},{"internalType":"address","name":"_action","type":"address"},{"internalType":"uint256[]","name":"_actionIntInputs","type":"uint256[]"},{"internalType":"address[]","name":"_actionAddrInputs","type":"address[]"}],"name":"addRule","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_ruleIndex","type":"uint256"}],"name":"checkRule","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_depositAmount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_depositAmount","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"depositTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"earn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_pids","type":"uint256[]"}],"name":"earnMany","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_ruleIndex","type":"uint256"}],"name":"executeRule","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeAddressSetter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"operators","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"performanceFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"performanceFeeBountyPct","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"stakeToken","type":"address"},{"internalType":"contract IYieldWolfStrategy","name":"strategy","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_ruleIndex","type":"uint256"}],"name":"removeRule","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ruleFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ruleFeeBountyPct","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_depositFee","type":"uint256"}],"name":"setDepositFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeAddress","type":"address"}],"name":"setFeeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeAddressSetter","type":"address"}],"name":"setFeeAddressSetter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"},{"internalType":"bool","name":"_isOperator","type":"bool"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_performanceFee","type":"uint256"}],"name":"setPerformanceFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_performanceFeeBountyPct","type":"uint256"}],"name":"setPerformanceFeeBountyPct","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_ruleFee","type":"uint256"}],"name":"setRuleFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_ruleFeeBountyPct","type":"uint256"}],"name":"setRuleFeeBountyPct","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IYieldWolfStrategy","name":"_strategy","type":"address"},{"internalType":"address[]","name":"_extraEarnTokens","type":"address[]"}],"name":"setStrategyExtraEarnTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IYieldWolfStrategy","name":"_strategy","type":"address"},{"internalType":"address","name":"_token0","type":"address"},{"internalType":"address","name":"_token1","type":"address"},{"internalType":"address[]","name":"_path","type":"address[]"}],"name":"setStrategySwapPath","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IYieldWolfStrategy","name":"_strategy","type":"address"},{"internalType":"bool","name":"_enabled","type":"bool"}],"name":"setStrategySwapRouterEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_withdrawFee","type":"uint256"}],"name":"setWithdrawFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"stakedTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"strategyExists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_ruleIndex","type":"uint256"}],"name":"userPoolRule","outputs":[{"components":[{"internalType":"address","name":"condition","type":"address"},{"internalType":"uint256[]","name":"conditionIntInputs","type":"uint256[]"},{"internalType":"address[]","name":"conditionAddrInputs","type":"address[]"},{"internalType":"address","name":"action","type":"address"},{"internalType":"uint256[]","name":"actionIntInputs","type":"uint256[]"},{"internalType":"address[]","name":"actionAddrInputs","type":"address[]"}],"internalType":"struct YieldWolf.Rule","name":"rule","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"userRuleLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"userStakedPoolAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"userStakedPoolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_withdrawAmount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

60806040526000600655603260075560646008556103e86009556014600a55611388600b553480156200003157600080fd5b50604051620042fa380380620042fa833981016040819052620000549162000103565b6200005f33620000b3565b6001808055336000818152600e60205260409020805460ff1916909217909155600d80546001600160a01b03199081169092179055600c80549091166001600160a01b039290921691909117905562000133565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121562000115578081fd5b81516001600160a01b03811681146200012c578182fd5b9392505050565b6141b780620001436000396000f3fe608060405234801561001057600080fd5b506004361061027f5760003560e01c80637d2c5df91161015c578063b773276d116100ce578063e4944e3a11610087578063e4944e3a146105e3578063e65a0117146105f6578063e941fa7814610609578063ed08233e14610612578063f2fde38b14610625578063fd11d67d1461063857600080fd5b8063b773276d1461056b578063bae219e21461057e578063d2440c8a14610591578063dc8ea346146105a4578063e2bbb158146105ad578063e3f62d5d146105c057600080fd5b80638da5cb5b116101205780638da5cb5b146104d657806393f1a40b146104e75780639a269e0c14610512578063a340a26c14610525578063b37d97b514610545578063b6ac642a1461055857600080fd5b80637d2c5df91461048157806381e2cdb4146104945780638705fcd4146104a757806387788782146104ba57806388f54e32146104c357600080fd5b8063441a3e70116101f55780635b0e8698116101b95780635b0e86981461042457806367a40df41461043757806367a527931461044a57806370897b2314610453578063715018a6146104665780637547650f1461046e57600080fd5b8063441a3e70146103c5578063490ae210146103d85780635312ea8e146103eb578063558a7297146103fe57806356eeafd91461041157600080fd5b80631ff0d3ac116102475780631ff0d3ac146103295780632757066c1461033c5780632a30348b146103455780633bd1aca1146103585780633fc4e5a414610391578063412753581461039a57600080fd5b8063081e3eda146102845780630a3b0a4f1461029b5780630bbe10ad146102b057806313e7c9d8146102c35780631526fe27146102f6575b600080fd5b6002545b6040519081526020015b60405180910390f35b6102ae6102a936600461398e565b61064b565b005b6102886102be36600461398e565b61087e565b6102e66102d136600461398e565b600e6020526000908152604090205460ff1681565b6040519015158152602001610292565b610309610304366004613b64565b6108a5565b604080516001600160a01b03938416815292909116602083015201610292565b6102ae610337366004613aff565b6108de565b61028860095481565b6102ae610353366004613a29565b610ad7565b610288610366366004613b94565b60009182526003602090815260408084206001600160a01b0393909316845291905290206001015490565b610288600b5481565b600c546103ad906001600160a01b031681565b6040516001600160a01b039091168152602001610292565b6102ae6103d3366004613d04565b610b55565b6102ae6103e6366004613b64565b610b6a565b6102ae6103f9366004613b64565b610c22565b6102ae61040c3660046139c6565b610c38565b61028861041f366004613b94565b610cbe565b600d546103ad906001600160a01b031681565b6102ae610445366004613b64565b61104a565b61028860065481565b6102ae610461366004613b64565b6110fb565b6102ae6111ac565b6102ae61047c366004613b64565b6111e2565b6102ae61048f366004613b52565b6112a4565b6102ae6104a2366004613a85565b61136a565b6102ae6104b536600461398e565b611526565b61028860085481565b6102ae6104d1366004613b64565b6115e2565b6000546001600160a01b03166103ad565b6102886104f5366004613b94565b600360209081526000928352604080842090915290825290205481565b6102ae610520366004613d25565b61169d565b610538610533366004613ccd565b6116ad565b6040516102929190613ffe565b6102ae610553366004613a29565b6118af565b6102ae610566366004613b64565b61195f565b6102886105793660046139fe565b611a10565b6102ae61058c366004613d04565b611a39565b6102ae61059f36600461398e565b611c77565b610288600a5481565b6102ae6105bb366004613d04565b611d33565b6102e66105ce36600461398e565b60056020526000908152604090205460ff1681565b6102ae6105f1366004613ccd565b611d3e565b610288610604366004613b64565b6122d9565b61028860075481565b6102ae610620366004613bdc565b612316565b6102ae61063336600461398e565b6126f1565b6102e6610646366004613ccd565b612789565b336000908152600e602052604090205460ff166106ab5760405162461bcd60e51b81526020600482015260196024820152781bdb9b1e53dc195c985d1bdc8e881393d517d0531313d5d151603a1b60448201526064015b60405180910390fd5b6001600160a01b03811660009081526005602052604090205460ff16156107145760405162461bcd60e51b815260206004820152601c60248201527f6164643a2053545241544547595f414c52454144595f4558495354530000000060448201526064016106a2565b6000816001600160a01b03166351ed6a306040518163ffffffff1660e01b815260040160206040518083038186803b15801561074f57600080fd5b505afa158015610763573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061078791906139aa565b6040805180820182526001600160a01b038381168083528682166020808501828152600280546001808201835560008381529851919092027f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace810180549289166001600160a01b031993841617905592517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf9093018054939097169216919091179094558185526005815293859020805460ff19169093179092558351908152918201529192507f473b736fe95295e8fbc851ca8acdc12a750976edad27a92f666b3d888eb895d391015b60405180910390a15050565b6001600160a01b038116600090815260046020526040812061089f90612a58565b92915050565b600281815481106108b557600080fd5b6000918252602090912060029091020180546001909101546001600160a01b0391821692501682565b6000546001600160a01b031633146109085760405162461bcd60e51b81526004016106a290613f92565b600581111561096a5760405162461bcd60e51b815260206004820152602860248201527f736574537472617465677945787472614561726e546f6b656e733a204341505f604482015267115610d15151115160c21b60648201526084016106a2565b60005b81811015610a365782828281811061099557634e487b7160e01b600052603260045260246000fd5b90506020020160208101906109aa919061398e565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a082319060240160206040518083038186803b1580156109eb57600080fd5b505afa1580156109ff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a239190613b7c565b5080610a2e8161412d565b91505061096d565b50604051632acd724560e11b81526001600160a01b0384169063559ae48a90610a659085908590600401613eb0565b600060405180830381600087803b158015610a7f57600080fd5b505af1158015610a93573d6000803e3d6000fd5b505050507f41aba019b9230b5fa89f179252ba448d1a8ee9ea5cb6d0e291b17a754ca849af838383604051610aca93929190613ef9565b60405180910390a1505050565b60026001541415610afa5760405162461bcd60e51b81526004016106a290613fc7565b600260015560005b81811015610b4c57610b39838383818110610b2d57634e487b7160e01b600052603260045260246000fd5b90506020020135612a62565b5080610b448161412d565b915050610b02565b50506001805550565b610b66333384846000806000612b5e565b5050565b6000546001600160a01b03163314610b945760405162461bcd60e51b81526004016106a290613f92565b6101f4811115610be65760405162461bcd60e51b815260206004820152601b60248201527f7365744465706f7369744665653a204341505f4558434545444544000000000060448201526064016106a2565b60068190556040518181527f974fd3c1fcb4653dfc4fb740c4c692cd212d55c28f163f310128cb64d8300675906020015b60405180910390a150565b610c353333836000196000806001612b5e565b50565b6000546001600160a01b03163314610c625760405162461bcd60e51b81526004016106a290613f92565b6001600160a01b0382166000818152600e6020908152604091829020805460ff19168515159081179091558251938452908301527f1618a22a3b00b9ac70fd5a82f1f5cdd8cb272bd0f1b740ddf7c26ab05881dd5b9101610872565b60008060028481548110610ce257634e487b7160e01b600052603260045260246000fd5b60009182526020808320604080518082018252600290940290910180546001600160a01b0390811685526001918201548116858501528986526003845282862090891686528352818520825180840184528154815291810180548451818702810187019095528085529597509194909385810193929190879084015b82821015610f205760008481526020908190206040805160c0810182526006860290920180546001600160a01b03168352600181018054835181870281018701909452808452939491938583019392830182828015610ddc57602002820191906000526020600020905b815481526020019060010190808311610dc8575b5050505050815260200160028201805480602002602001604051908101604052809291908181526020018280548015610e3e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610e20575b505050918352505060038201546001600160a01b03166020808301919091526004830180546040805182850281018501825282815294019392830182828015610ea657602002820191906000526020600020905b815481526020019060010190808311610e92575b5050505050815260200160058201805480602002602001604051908101604052809291908181526020018280548015610f0857602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610eea575b50505050508152505081526020019060010190610d5e565b505050508152505090506000826020015190506000816001600160a01b03166344a3955e6040518163ffffffff1660e01b815260040160206040518083038186803b158015610f6e57600080fd5b505afa158015610f82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fa69190613b7c565b905060008111610fb757600061103f565b80826001600160a01b03166340a658236040518163ffffffff1660e01b815260040160206040518083038186803b158015610ff157600080fd5b505afa158015611005573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110299190613b7c565b845161103591906140cb565b61103f91906140ab565b979650505050505050565b6000546001600160a01b031633146110745760405162461bcd60e51b81526004016106a290613f92565b6101f48111156110c65760405162461bcd60e51b815260206004820152601860248201527f73657452756c654665653a204341505f4558434545444544000000000000000060448201526064016106a2565b600a8190556040518181527f61118860ca384ace88088992e3ff2de8021b5b62940e18193476d7a80bcf223190602001610c17565b6000546001600160a01b031633146111255760405162461bcd60e51b81526004016106a290613f92565b6101f48111156111775760405162461bcd60e51b815260206004820152601f60248201527f736574506572666f726d616e63654665653a204341505f45584345454445440060448201526064016106a2565b60088190556040518181527f8b940a95968ad5b511f89b01075446a4fe9f614f2dc5fbb9e9a6b227d6d4fd7090602001610c17565b6000546001600160a01b031633146111d65760405162461bcd60e51b81526004016106a290613f92565b6111e06000612ef9565b565b6000546001600160a01b0316331461120c5760405162461bcd60e51b81526004016106a290613f92565b61271081111561126f5760405162461bcd60e51b815260206004820152602860248201527f736574506572666f726d616e6365466565426f756e74795063743a204341505f604482015267115610d15151115160c21b60648201526084016106a2565b60098190556040518181527f9a39cf10790b9a1b334cec89526172d9cbbfae83e756ea1394529ddc5be8055b90602001610c17565b6000546001600160a01b031633146112ce5760405162461bcd60e51b81526004016106a290613f92565b60405163b58303af60e01b815281151560048201526001600160a01b0383169063b58303af90602401600060405180830381600087803b15801561131157600080fd5b505af1158015611325573d6000803e3d6000fd5b5050604080516001600160a01b038616815284151560208201527f6a1ab10cab36ea07ac8140b305605d03ac65009fec6f29d8c073d08076a226689350019050610872565b6000546001600160a01b031633146113945760405162461bcd60e51b81526004016106a290613f92565b60018114156113b55760405162461bcd60e51b81526004016106a290613f51565b801561147c57836001600160a01b0316828260008181106113e657634e487b7160e01b600052603260045260246000fd5b90506020020160208101906113fb919061398e565b6001600160a01b031614801561146057506001600160a01b03831682826114236001826140ea565b81811061144057634e487b7160e01b600052603260045260246000fd5b9050602002016020810190611455919061398e565b6001600160a01b0316145b61147c5760405162461bcd60e51b81526004016106a290613f51565b6040516306edc45760e11b81526001600160a01b03861690630ddb88ae906114ae908790879087908790600401613e28565b600060405180830381600087803b1580156114c857600080fd5b505af11580156114dc573d6000803e3d6000fd5b505050507fd136e386d9ac6d16b53bea52e04f7c88c76c225f6abfb93166ec86f0874111018585858585604051611517959493929190613ec4565b60405180910390a15050505050565b600d546001600160a01b03163314801561154857506001600160a01b03811615155b6115945760405162461bcd60e51b815260206004820152601a60248201527f736574466565416464726573733a204e4f545f414c4c4f57454400000000000060448201526064016106a2565b600c80546001600160a01b0319166001600160a01b0383169081179091556040519081527ffcb8a963756b148f85a52537b63147b6c4b40af694099c901ac3b99d317a2db890602001610c17565b6000546001600160a01b0316331461160c5760405162461bcd60e51b81526004016106a290613f92565b6127108111156116685760405162461bcd60e51b815260206004820152602160248201527f73657452756c65466565426f756e74795063743a204341505f455843454544456044820152601160fa1b60648201526084016106a2565b600b8190556040518181527ff278bd7e9614e272c7c0c8e8dac2c51c951c959d1e1f24dd9ce4d2adffea272190602001610c17565b6116a8838383612f49565b505050565b6116b56137d9565b60008481526003602090815260408083206001600160a01b038716845290915290206001018054839081106116fa57634e487b7160e01b600052603260045260246000fd5b60009182526020918290206040805160c081018252600690930290910180546001600160a01b0316835260018101805483518187028101870190945280845293949193858301939283018282801561177157602002820191906000526020600020905b81548152602001906001019080831161175d575b50505050508152602001600282018054806020026020016040519081016040528092919081815260200182805480156117d357602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116117b5575b505050918352505060038201546001600160a01b0316602080830191909152600483018054604080518285028101850182528281529401939283018282801561183b57602002820191906000526020600020905b815481526020019060010190808311611827575b505050505081526020016005820180548060200260200160405190810160405280929190818152602001828054801561189d57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161187f575b50505050508152505090509392505050565b336000908152600e602052604090205460ff1661190a5760405162461bcd60e51b81526020600482015260196024820152781bdb9b1e53dc195c985d1bdc8e881393d517d0531313d5d151603a1b60448201526064016106a2565b60005b818110156116a85761194d83838381811061193857634e487b7160e01b600052603260045260246000fd5b90506020020160208101906102a9919061398e565b806119578161412d565b91505061190d565b6000546001600160a01b031633146119895760405162461bcd60e51b81526004016106a290613f92565b6101f48111156119db5760405162461bcd60e51b815260206004820152601c60248201527f73657457697468647261774665653a204341505f45584345454445440000000060448201526064016106a2565b60078190556040518181527f7be0a744e4d6f887e4fd578978ae62cb2568d860f0f2eb0a54fd0de804b1644090602001610c17565b6001600160a01b0382166000908152600460205260408120611a3290836132fe565b9392505050565b6000828152600360209081526040808320338452909152902060018101548210611a9d5760405162461bcd60e51b81526020600482015260156024820152740e4cadadeeccaa4ead8ca7440848288be929c888ab605b1b60448201526064016106a2565b600180820180549091611aaf916140ea565b81548110611acd57634e487b7160e01b600052603260045260246000fd5b9060005260206000209060060201816001018381548110611afe57634e487b7160e01b600052603260045260246000fd5b60009182526020909120825460069092020180546001600160a01b0319166001600160a01b0390921691909117815560018083018054611b419284019190613821565b5060028281018054611b569284019190613821565b5060038281015490820180546001600160a01b0319166001600160a01b0390921691909117905560048083018054611b919284019190613821565b5060058281018054611ba69284019190613821565b50505060018101805480611bca57634e487b7160e01b600052603160045260246000fd5b60008281526020812060066000199093019283020180546001600160a01b031916815590611bfb6001830182613871565b611c09600283016000613871565b6003820180546001600160a01b0319169055611c29600483016000613871565b611c37600583016000613871565b50509055604051828152839033907fce8274f5faa664f6bc79a830602af94388f8b1a13bb73dc0bd4ef2a74ced06989060200160405180910390a3505050565b600d546001600160a01b031633148015611c9957506001600160a01b03811615155b611ce55760405162461bcd60e51b815260206004820181905260248201527f736574466565416464726573735365747465723a204e4f545f414c4c4f57454460448201526064016106a2565b600d80546001600160a01b0319166001600160a01b0383169081179091556040519081527ff8361c73ceee701de77c7615cb642a1f9d6efcc493424e087076e5ced2e850d690602001610c17565b610b66828233612f49565b333b158015611d4c57503233145b611d5557600080fd5b600d54600160a01b900460ff1615611da55760405162461bcd60e51b8152602060048201526013602482015272195e1958dd5d19549d5b194e881313d0d2d151606a1b60448201526064016106a2565b600d805460ff60a01b1916600160a01b17905560008381526003602090815260408083206001600160a01b0386168452825280832081518083018352815481526001820180548451818702810187019095528085529194929385840193909290879084015b82821015611fcc5760008481526020908190206040805160c0810182526006860290920180546001600160a01b03168352600181018054835181870281018701909452808452939491938583019392830182828015611e8857602002820191906000526020600020905b815481526020019060010190808311611e74575b5050505050815260200160028201805480602002602001604051908101604052809291908181526020018280548015611eea57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611ecc575b505050918352505060038201546001600160a01b03166020808301919091526004830180546040805182850281018501825282815294019392830182828015611f5257602002820191906000526020600020905b815481526020019060010190808311611f3e575b5050505050815260200160058201805480602002602001604051908101604052809291908181526020018280548015611fb457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611f96575b50505050508152505081526020019060010190611e0a565b50505050815250509050600081602001518381518110611ffc57634e487b7160e01b600052603260045260246000fd5b6020026020010151905060006002868154811061202957634e487b7160e01b600052603260045260246000fd5b600091825260209182902060016002909202010154835191840151604080860151905163abe039fb60e01b81526001600160a01b039384169550939092169263abe039fb926120819286928b928d9291600401613e5f565b60206040518083038186803b15801561209957600080fd5b505afa1580156120ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120d19190613a69565b61211d5760405162461bcd60e51b815260206004820181905260248201527f65786563757465416374696f6e3a20434f4e444954494f4e5f4e4f545f4d455460448201526064016106a2565b6121268161330a565b600082606001519050600080826001600160a01b031663bb73d62a858a8c89608001518a60a001516040518663ffffffff1660e01b815260040161216e959493929190613e5f565b604080518083038186803b15801561218557600080fd5b505afa158015612199573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121bd9190613bb8565b9150915060006121cd8a8a610cbe565b9050808311156121db578092505b8215612212576000612710600a54856121f491906140cb565b6121fe91906140ab565b90506122108a848d8733866001612b5e565b505b836001600160a01b031663b61ab3a2868b8d8a608001518b60a001516040518663ffffffff1660e01b815260040161224e959493929190613e5f565b600060405180830381600087803b15801561226857600080fd5b505af115801561227c573d6000803e3d6000fd5b5050600d805460ff60a01b1916905550506040518881526001600160a01b038a16908b907f1496e29976f5621566896439c8fe99295a4e94c3247441b12895164697b743d09060200160405180910390a350505050505050505050565b6000600260015414156122fe5760405162461bcd60e51b81526004016106a290613fc7565b600260015561230c82612a62565b6001805592915050565b60008b8152600360209081526040808320338452909152902060018101546032101561237c5760405162461bcd60e51b8152602060048201526015602482015274185919149d5b194e8810d05417d15610d151511151605a1b60448201526064016106a2565b8a6001600160a01b031663b28313b36040518163ffffffff1660e01b815260040160206040518083038186803b1580156123b557600080fd5b505afa1580156123c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123ed9190613a69565b6124325760405162461bcd60e51b815260206004820152601660248201527530b232293ab6329d102120a22fa1a7a72224aa24a7a760511b60448201526064016106a2565b856001600160a01b03166252484c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561246a57600080fd5b505afa15801561247e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124a29190613a69565b6124e45760405162461bcd60e51b815260206004820152601360248201527230b232293ab6329d102120a22fa0a1aa24a7a760691b60448201526064016106a2565b6124ec6137d9565b6001600160a01b038c168152604080516020808d0282810182019093528c825290918d918d918291850190849080828437600092019190915250505050602080830191909152604080518a830281810184019092528a8152918b918b918291908501908490808284376000920191909152505050506040808301919091526001600160a01b03881660608301528051602080880282810182019093528782529091889188918291850190849080828437600092019190915250505050608082015260408051602080860282810182019093528582529091869186918291850190849080828437600092018290525060a0860194909452505050600183810180548083018255908352602092839020845160069092020180546001600160a01b0319166001600160a01b03909216919091178155828401518051859492936126389390850192019061388f565b50604082015180516126549160028401916020909101906138ca565b5060608201516003820180546001600160a01b0319166001600160a01b039092169190911790556080820151805161269691600484019160209091019061388f565b5060a082015180516126b29160058401916020909101906138ca565b50506040518e915033907f21194b08fcef052a4cda284af0ab837f79ca48d7f31b20cee16d00041129e05090600090a350505050505050505050505050565b6000546001600160a01b0316331461271b5760405162461bcd60e51b81526004016106a290613f92565b6001600160a01b0381166127805760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106a2565b610c3581612ef9565b60008381526003602090815260408083206001600160a01b038616845290915281206001018054829190849081106127d157634e487b7160e01b600052603260045260246000fd5b60009182526020918290206040805160c081018252600690930290910180546001600160a01b0316835260018101805483518187028101870190945280845293949193858301939283018282801561284857602002820191906000526020600020905b815481526020019060010190808311612834575b50505050508152602001600282018054806020026020016040519081016040528092919081815260200182805480156128aa57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161288c575b505050918352505060038201546001600160a01b0316602080830191909152600483018054604080518285028101850182528281529401939283018282801561291257602002820191906000526020600020905b8154815260200190600101908083116128fe575b505050505081526020016005820180548060200260200160405190810160405280929190818152602001828054801561297457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612956575b505050505081525050905080600001516001600160a01b031663abe039fb600287815481106129b357634e487b7160e01b600052603260045260246000fd5b6000918252602091829020600160029092020101549084015160408086015190516001600160e01b031960e086901b1681526129ff936001600160a01b0316928a928c92600401613e5f565b60206040518083038186803b158015612a1757600080fd5b505afa158015612a2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a4f9190613a69565b95945050505050565b600061089f825490565b600060028281548110612a8557634e487b7160e01b600052603260045260246000fd5b6000918252602090912060029091020160010154604051633f6d7fbf60e21b81523360048201526001600160a01b039091169063fdb5fefc90602401602060405180830381600087803b158015612adb57600080fd5b505af1158015612aef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b139190613b7c565b905081336001600160a01b03167fdcc11642b117e5da20ac5fdf4879ec3f9265e1237c004860b2cbcac28591832a83604051612b5191815260200190565b60405180910390a3919050565b60026001541415612b815760405162461bcd60e51b81526004016106a290613fc7565b600260015583612be45760405162461bcd60e51b815260206004820152602860248201527f5f776974686472617746726f6d3a204d5553545f42455f475245415445525f5460448201526748414e5f5a45524f60c01b60648201526084016106a2565b60008581526003602090815260408083206001600160a01b038b16845290915281206002805491929188908110612c2b57634e487b7160e01b600052603260045260246000fd5b60009182526020909120600160029092020101546001600160a01b0316905082612c5857612c588161330a565b6000816001600160a01b03166344a3955e6040518163ffffffff1660e01b815260040160206040518083038186803b158015612c9357600080fd5b505afa158015612ca7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ccb9190613b7c565b835490915015801590612cde5750600081115b612d205760405162461bcd60e51b815260206004820152601360248201527277697468647261773a204e4f5f53484152455360681b60448201526064016106a2565b600081836001600160a01b03166340a658236040518163ffffffff1660e01b815260040160206040518083038186803b158015612d5c57600080fd5b505afa158015612d70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d949190613b7c565b8554612da091906140cb565b612daa91906140ab565b905080881115612db8578097505b6040516328c6306960e21b8152600481018990526001600160a01b038b811660248301528881166044830152606482018890526000919085169063a318c1a490608401602060405180830381600087803b158015612e1557600080fd5b505af1158015612e29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e4d9190613b7c565b905080856000015411612e61576000612e6e565b8454612e6e9082906140ea565b808655612e99576001600160a01b038c166000908152600460205260409020612e97908b613383565b505b898b6001600160a01b03168d6001600160a01b03167ff341246adaac6f497bc2a656f546ab9e182111d630394f0c57c710a59a2cb5678c604051612edf91815260200190565b60405180910390a450506001805550505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60026001541415612f6c5760405162461bcd60e51b81526004016106a290613fc7565b600260015581612fc95760405162461bcd60e51b815260206004820152602260248201527f6465706f7369743a204d5553545f42455f475245415445525f5448414e5f5a45604482015261524f60f01b60648201526084016106a2565b600060028481548110612fec57634e487b7160e01b600052603260045260246000fd5b60009182526020808320604080518082018252600290940290910180546001600160a01b0390811685526001909101548116848401908152898652600384528286208883168752845282862090518351632251caaf60e11b815293519597509095949116926344a3955e9260048082019391829003018186803b15801561307257600080fd5b505afa158015613086573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130aa9190613b7c565b11156130bd576130bd826020015161330a565b815160208301516040516370a0823160e01b81526001600160a01b03918216600482015260009291909116906370a082319060240160206040518083038186803b15801561310a57600080fd5b505afa15801561311e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131429190613b7c565b60208401518451919250613162916001600160a01b03169033908861338f565b825160208401516040516370a0823160e01b81526001600160a01b039182166004820152839291909116906370a082319060240160206040518083038186803b1580156131ae57600080fd5b505afa1580156131c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131e69190613b7c565b6131f091906140ea565b9450600083602001516001600160a01b031663b6b55f25876040518263ffffffff1660e01b815260040161322691815260200190565b602060405180830381600087803b15801561324057600080fd5b505af1158015613254573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132789190613b7c565b8354909150613288908290614093565b83556001600160a01b03851660009081526004602052604090206132ac90886133ef565b5086856001600160a01b03167f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15886040516132e991815260200190565b60405180910390a35050600180555050505050565b6000611a3283836133fb565b604051633f6d7fbf60e21b8152600060048201526001600160a01b0382169063fdb5fefc90602401602060405180830381600087803b15801561334c57600080fd5b505af192505050801561337c575060408051601f3d908101601f1916820190925261337991810190613b7c565b60015b610b665750565b6000611a328383613433565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526133e9908590613550565b50505050565b6000611a328383613622565b600082600001828154811061342057634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b600081815260018301602052604081205480156135465760006134576001836140ea565b855490915060009061346b906001906140ea565b90508181146134ec57600086600001828154811061349957634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050808760000184815481106134ca57634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b855486908061350b57634e487b7160e01b600052603160045260246000fd5b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061089f565b600091505061089f565b60006135a5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166136719092919063ffffffff16565b8051909150156116a857808060200190518101906135c39190613a69565b6116a85760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106a2565b60008181526001830160205260408120546136695750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561089f565b50600061089f565b60606136808484600085613688565b949350505050565b6060824710156136e95760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016106a2565b843b6137375760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106a2565b600080866001600160a01b031685876040516137539190613e0c565b60006040518083038185875af1925050503d8060008114613790576040519150601f19603f3d011682016040523d82523d6000602084013e613795565b606091505b509150915061103f828286606083156137af575081611a32565b8251156137bf5782518084602001fd5b8160405162461bcd60e51b81526004016106a29190613f1e565b6040518060c0016040528060006001600160a01b03168152602001606081526020016060815260200160006001600160a01b0316815260200160608152602001606081525090565b8280548282559060005260206000209081019282156138615760005260206000209182015b82811115613861578254825591600101919060010190613846565b5061386d92915061391f565b5090565b5080546000825590600052602060002090810190610c35919061391f565b828054828255906000526020600020908101928215613861579160200282015b828111156138615782518255916020019190600101906138af565b828054828255906000526020600020908101928215613861579160200282015b8281111561386157825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906138ea565b5b8082111561386d5760008155600101613920565b803561393f8161415e565b919050565b60008083601f840112613955578182fd5b50813567ffffffffffffffff81111561396c578182fd5b6020830191508360208260051b850101111561398757600080fd5b9250929050565b60006020828403121561399f578081fd5b8135611a328161415e565b6000602082840312156139bb578081fd5b8151611a328161415e565b600080604083850312156139d8578081fd5b82356139e38161415e565b915060208301356139f381614173565b809150509250929050565b60008060408385031215613a10578182fd5b8235613a1b8161415e565b946020939093013593505050565b60008060208385031215613a3b578182fd5b823567ffffffffffffffff811115613a51578283fd5b613a5d85828601613944565b90969095509350505050565b600060208284031215613a7a578081fd5b8151611a3281614173565b600080600080600060808688031215613a9c578081fd5b8535613aa78161415e565b94506020860135613ab78161415e565b93506040860135613ac78161415e565b9250606086013567ffffffffffffffff811115613ae2578182fd5b613aee88828901613944565b969995985093965092949392505050565b600080600060408486031215613b13578283fd5b8335613b1e8161415e565b9250602084013567ffffffffffffffff811115613b39578283fd5b613b4586828701613944565b9497909650939450505050565b600080604083850312156139d8578182fd5b600060208284031215613b75578081fd5b5035919050565b600060208284031215613b8d578081fd5b5051919050565b60008060408385031215613ba6578182fd5b8235915060208301356139f38161415e565b60008060408385031215613bca578182fd5b8251915060208301516139f38161415e565b600080600080600080600080600080600060e08c8e031215613bfc578889fd5b8b359a50613c0c60208d01613934565b995067ffffffffffffffff8060408e01351115613c2757898afd5b613c378e60408f01358f01613944565b909a50985060608d0135811015613c4c578687fd5b613c5c8e60608f01358f01613944565b9098509650613c6d60808e01613934565b95508060a08e01351115613c7f578485fd5b613c8f8e60a08f01358f01613944565b909550935060c08d0135811015613ca4578283fd5b50613cb58d60c08e01358e01613944565b81935080925050509295989b509295989b9093969950565b600080600060608486031215613ce1578081fd5b833592506020840135613cf38161415e565b929592945050506040919091013590565b60008060408385031215613d16578182fd5b50508035926020909101359150565b600080600060608486031215613d39578081fd5b83359250602084013591506040840135613d528161415e565b809150509250925092565b81835260006020808501945082825b85811015613d9a578135613d7f8161415e565b6001600160a01b031687529582019590820190600101613d6c565b509495945050505050565b6000815180845260208085019450808401835b83811015613d9a5781516001600160a01b031687529582019590820190600101613db8565b6000815180845260208085019450808401835b83811015613d9a57815187529582019590820190600101613df0565b60008251613e1e818460208701614101565b9190910192915050565b6001600160a01b03858116825284166020820152606060408201819052600090613e559083018486613d5d565b9695505050505050565b6001600160a01b038681168252851660208201526040810184905260a060608201819052600090613e9290830185613ddd565b8281036080840152613ea48185613da5565b98975050505050505050565b602081526000613680602083018486613d5d565b6001600160a01b03868116825285811660208301528416604082015260806060820181905260009061103f9083018486613d5d565b6001600160a01b0384168152604060208201819052600090612a4f9083018486613d5d565b6020815260008251806020840152613f3d816040850160208701614101565b601f01601f19169190910160400192915050565b60208082526021908201527f736574537472617465677953776170506174683a20494e56414c49445f5041546040820152600960fb1b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208152600060018060a01b03808451166020840152602084015160c0604085015261402d60e0850182613ddd565b90506040850151601f198086840301606087015261404b8383613da5565b925083606088015116608087015260808701519350808684030160a08701526140748385613ddd565b935060a08701519250808685030160c08701525050612a4f8282613da5565b600082198211156140a6576140a6614148565b500190565b6000826140c657634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156140e5576140e5614148565b500290565b6000828210156140fc576140fc614148565b500390565b60005b8381101561411c578181015183820152602001614104565b838111156133e95750506000910152565b600060001982141561414157614141614148565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114610c3557600080fd5b8015158114610c3557600080fdfea26469706673582212202f71575b639f4842a3c8ad9a33e0466f00f6626b02809c5454f8ddcf5c9fefb664736f6c6343000804003300000000000000000000000075e06c42008d219c8fa3163bc89c807b225b7ab0

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

00000000000000000000000075e06c42008d219c8fa3163bc89c807b225b7ab0

-----Decoded View---------------
Arg [0] : _feeAddress (address): 0x75e06c42008d219c8fa3163bc89c807b225b7ab0

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000075e06c42008d219c8fa3163bc89c807b225b7ab0


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.