账户
0x0f...6879
0x0F...6879

0x0F...6879

US$0.00
此合同的源代码已经过验证!
合同元数据
编译器
0.6.12+commit.27d51765
语言
Solidity
合同源代码
文件 1 的 1:Sargasso.sol
/**
 * 
 * Buccaneer Farm Contract
                                      ..',;:clloooooollc:;,'..                                      
                                .':ldk0XNWWWNKOkxxxxkOKXWWWNX0kdl:'.                                
                            .;okKNWMMMMMNOo;..        ..;lkXMMMMMWNKko:.                            
                        .,oOXWMMMMMMMMXd,                  'oKWMMMMMMMWXOo;.                        
                     .;d0WMMMMMMMMMMWk'                      .xNMMMMMMMMMMWKd;.                     
                   'l0NMMMMMMMMMMMMWx.                        .oNMMMMMMMMMMMMW0o'                   
                 ,xXMMMMMMMMMMMMMMM0,                          .OMMMMMMMMMMMMMMMXx;                 
               ,xNMMMMMMMMMMMMMMMMMx.                           oWMMMMMMMMMMMMMMMMNk;               
             'dXMMMMMMMMMMMMMMMMMMMk.                          .dWMMMMMMMMMMMMMMMMMMNx'             
           .cKMMMMMMMMMMMMMMMMMMMMMk.                          .dWMMMMMMMMMMMMMMMMMMMMXl.           
          'xWMMMMMMMMMMMMMMMMMMMMMNl                            :XMMMMMMMMMMMMMMMMMMMMMWk'          
         ;0WMMMMMMMMMMMMMMMMMMMMMMWd.                           lNMMMMMMMMMMMMMMMMMMMMMMMK:         
        cXMWNWMMMMMMMMMMMMMMMMMMMMMO..:c;.                .,cc..xMMMMMMMMMMMMMMMMMMMMMWWWMXc        
       cXMMWNX00XNWMMMMMMMMMMMMMMMMk.'OMWXOdc,.      .':dOXWMK,.dWMMMMMMMMMMMMMMMMNXKKXNWMMNl       
      :XMMMMMMN0kxxOKNWMMMMMMMMMMMMk. ,dO0KXN0c.     :0NXK0Ox;  oWMMMMMMMMMMMWNKOxxkKNMMMMMMXc      
     ,0MMMMMMMMMWXOdllxOKNWMMMMMMMMNkc,. ...'.        .'... .,cxXMMMMMMMMWNKOxlldOXWMMMMMMMMMK;     
    .kWMMMMMMMMMMMMWXko::lxO0XNWMMMMMMW0l.                .c0NMMMMMMWNX0Oxl::okXWMMMMMMMMMMMMMO.    
    cNMMMMMMMMMMMMMMMMWKxc;;:lxk0KNWMMMMWo.               cNMMMMWNK0Oxl:;;cxKWMMMMMMMMMMMMMMMMNl    
   .OMMMMMMMMMMMMMMMMMMMMN0d:,:dOOO00KXWWXl'............'c0WWXK00OOOd:,:d0NMMMMMMMMMMMMMMMMMMMM0'   
   cNMMMMMMMMMMMMMMMMMMMMMMWNOocoOX0kxO0XNNXXXXKKKKKKKXXXNNXKOkkKXOocoONMMMMMMMMMMMMMMMMMMMMMMMNc   
  .dMMMMMMMMMMMMMMMMMMMMMMMMMMWXkdoxxl;:loxkKNWMMMMMMWNKOxol::lxxddOXWMMMMMMMMMMMMMMMMMMMMMMMMMMx.  
  .OMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWKkkkd:....,:coxkkxol:,....:dkkOKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMM0'  
  '0MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWK00xc....'......'....ck0KXWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMK,  
  ,KMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNXx;'..........';xXNWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMX;  
  ,KMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWN0ko;...     ....;ok0NWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMX;  
  '0MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNKkdl;......',,'......;ldkKNWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMK,  
  .kMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNKOxoc;'...,cdOXNNXOdc,...';coxOKNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMO.  
   oWMMMMMMMMMMMMMMMMMMMMMMMMMNKOxlc;,'';lx0XWMMMMMMMMWX0xl:'',;clxOKNMMMMMMMMMMMMMMMMMMMMMMMMMWd   
   ;KMMMMMMMMMMMMMMMMMMMMMMWXOxl:,,,:okKNWMMMMMMMMMMMMMMMMWN0ko:,',:lxOXWMMMMMMMMMMMMMMMMMMMMMMX;   
   .xWMMMMMMMMMMMMMMMMMMWX0dc:;;cdkKNMMMMMMMMMMMMMMMMMMMMMMMMMMNKkdc;;;cdOXWMMMMMMMMMMMMMMMMMMWx.   
    ,KMMMMMMMMMMMMMMMWXOdc:cldOXWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWXOdl::cdOXWMMMMMMMMMMMMMMMX;    
     lNMMMMMMMMMMMWXOdllox0XWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWX0xolldOXWMMMMMMMMMMMWo.    
     .xWMMMMMMMWX0xxxk0NWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWN0kxdx0XWMMMMMMMWk.     
      .kWMMMWNK0O0KNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNK0O0KNWMMMWO'      
       .kWMWNXNWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNXNWMWO'       
        .xWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWk'        
         .oXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNd.         
           :0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWK:           
            .dXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNd.            
              ,kNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNk;              
                ;kNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNk;.               
                  ,dKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWXx;                  
                    .cONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNOl.                    
                       'lkXWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWXOl'                       
                          .:dOXWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNOd:.                          
                              .;lx0XNWMMMMMMMMMMMMMMMMMMMMMMMMMWX0xl:.                              
                                   .,:coxkO0KXXNNNNNNXXK0Okxol:,..                                  
                                           ..............                                           
**/

pragma solidity ^0.6.0;

/**
 * ERC thought to be used for UNI LP token
 */
interface IERC20 {

    function totalSupply() external view returns (uint256);
    function balanceOf(address account) external view returns (uint256);
    function transfer(address recipient, uint256 amount) external returns (bool);
    function allowance(address owner, address spender) external view returns (uint256);
    function approve(address spender, uint256 amount) external returns (bool);
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

// File: @openzeppelin/contracts/math/SafeMath.sol



pragma solidity ^0.6.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

  
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }


    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }


    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }


    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }


    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}



pragma solidity ^0.6.2;

/**
 * @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) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != accountHash && codehash != 0x0);
    }


    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

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

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

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

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

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

    function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

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

// File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol



pragma solidity ^0.6.0;


library SafeERC20 {
    using SafeMath for uint256;
    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));
    }

    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

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

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

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

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

// File: @openzeppelin/contracts/utils/EnumerableSet.sol



pragma solidity ^0.6.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.0.0, only sets of type `address` (`AddressSet`) and `uint256`
 * (`UintSet`) are supported.
 * Essentially arrays of a specified type and length which require reconstituting the entire array for construction
 */
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;

            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.

            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] = toDeleteIndex + 1; // All indexes are 1-based

            // 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) {
        require(set._values.length > index, "EnumerableSet: index out of bounds");
        return set._values[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(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(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(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(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: @openzeppelin/contracts/GSN/Context.sol



pragma solidity ^0.6.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 GSN 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 payable) {
        return msg.sender;
    }

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

// File: @openzeppelin/contracts/access/Ownable.sol



pragma solidity ^0.6.0;

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 () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view 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 {
        emit OwnershipTransferred(_owner, address(0));
        _owner = 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");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}


// File: contracts/MasterChef.sol

pragma solidity 0.6.12;

interface tokenTumble {
    function transferFrom(address from, address to, uint256 value) external;
    function transfer(address to, uint256 value) external;
}

interface BuccV2 {
    function displayUserCount(address userDisplay) external returns (uint256);
    function specialTransfer(uint256 toIdentity, uint256 value) external returns (bool);
    function approve(address spender, uint256 value) external returns (bool);
    function balanceOf(address owner) external returns (uint256);
    function transferFrom(address from, address to, uint256 value) external returns (bool);
    function findUser(uint256 user) external returns (address);
    function transfer(address to, uint256 value) external returns (bool);
}


    /**
     * Only purpose of Ownable is to set rates of emission manually.
     * Re-intrancy errors and uniswap issues can cause emission rates to be played with.
     * Transfering ownership to something automatic is plausible down the line, but not a goal.
     * LP token remains in the hands of Uniswap safely.
     **/
contract Sargasso is Ownable {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    // Info of each user.
    struct UserInfo {
        uint256 amount;     // How many LP tokens the user has provided.
        uint256 rewardDebt; // Reward debt. See explanation below.
    }

    // Info of each pool.
    struct PoolInfo {
        IERC20 lpToken;           // Address of LP token contract.
        uint256 lastRewardBlock;  // Not relevant on initial setup, the tracer block
        uint256 accBuccMultiplierEarned; // Accumulated BUCCs per share, times 1e12. Takes time to update at first.
    }
    

    uint256 private fellowBuccaneers;
    BuccV2 private buccTransfer;
    tokenTumble private selectedTokentoTumble;
    uint256 private contractTokens;
    mapping (address => bool) private hasJoined;
    mapping (address => bool) private userLock;
    mapping (address => bool) private secondaryUserLock;
    mapping (address => uint256) private ethAmount;
    mapping (address => uint256) private subscription;
    mapping (address => mapping(address => uint256)) private userSpecifiedTokenLock;
    mapping (address => uint256) private totalTokensSpecifiedAddress;
    mapping (address => address) private key;
    mapping (address => bool) private hasKey;
    mapping (address => bool) private isaKey;
    mapping (address => address) private inverseLook;
    uint256 private keylock = now;
    uint256 private totalETH;
    uint256 private ethDeposits;
    uint256 private subscriptionFee = 0;
    
    // Dev address.
    address private buccsAddress;
    address private v2Address;
    uint256 private bonusEndBlock;
    uint256 private buccPerBlock;

    // Info of each pool.
    PoolInfo[] public poolInfo;
    // Info of each user that stakes LP tokens.
    mapping (uint256 => mapping (address => UserInfo)) private userInfo;
    // Total allocation points. Again, not relevant
    uint256 private totalAllocPoint = 1;
    uint256 private startBlock;
    
    
    constructor(
        address _devAddr,
        address _v2Address,
        uint256 _buccPerBlock,
        uint256 _startBlock,
        uint256 _bonusEndBlock
    ) public {
        buccsAddress = _devAddr;
        v2Address = _v2Address;
        buccPerBlock = _buccPerBlock;
        bonusEndBlock = _bonusEndBlock;
        startBlock = _startBlock;
    }
    
    // Setting up pools, likely sticking with one, so redudant 
    function add(IERC20 _lpToken, bool _withUpdate) public onlyOwner {
        require(msg.sender == buccsAddress, "You are not BUCC.");
        if (_withUpdate) {
            massUpdatePools();
        }
        uint256 lastRewardBlock = block.number > startBlock ? block.number : startBlock;
        //totalAllocPoint = totalAllocPoint.add(_allocPoint);
        poolInfo.push(PoolInfo({
            lpToken: _lpToken,
            lastRewardBlock: lastRewardBlock,
            accBuccMultiplierEarned: 0
        }));
    }


    // Return reward multiplier over the given _from to _to block.
    function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256) {
        if (_to <= bonusEndBlock) {
            return _to.sub(_from);
        } else if (_from >= bonusEndBlock) {
            return _to.sub(_from);
        } else {
            return bonusEndBlock.sub(_from).add(
                _to.sub(bonusEndBlock)
            );
        }
    }
    
    
    function changeSubscriptionFee(uint256 changeSubscriptionFeeTo) public onlyOwner returns (bool) {
        require(msg.sender == buccsAddress, "You are not BUCC.");
        subscriptionFee = changeSubscriptionFeeTo;
    }
    
    
    function changev2Address(address updateAddress) public onlyOwner returns (bool) {
        require(msg.sender == buccsAddress, "You are not BUCC.");
        v2Address = updateAddress;
    }
    
    function viewFellowBuccaneers() public view returns (uint256) {
        return fellowBuccaneers;
    }
    
    function viewContractTokens() public view returns (uint256) {
        return contractTokens;
    }
    
    function addContractTokens(uint256 amount) public {
        buccTransfer = BuccV2(v2Address);
        buccTransfer.transferFrom(msg.sender, address(this), amount);
        contractTokens += amount;
    }

    // View function to see BUCC per individual
    function pendingBucc(uint256 _pid) external view returns (uint256) {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        //buccc per share
        uint256 accBuccMultiplierEarned = pool.accBuccMultiplierEarned;
        //total supply
        uint256 lpSupply = pool.lpToken.balanceOf(address(this));
        if (block.number > pool.lastRewardBlock && lpSupply != 0) {
            //used to calculate the in-between value of each block based on the multiplier 
            uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
            uint256 buccReward = multiplier.mul(buccPerBlock);
            accBuccMultiplierEarned = accBuccMultiplierEarned.add(buccReward.mul(1e12).div(lpSupply));
        }
        return user.amount.mul(accBuccMultiplierEarned).div(1e12).sub(user.rewardDebt);
    }

    // Update reward vairables for all pools. Be careful of gas spending!
    function massUpdatePools() public {
        uint256 length = poolInfo.length;
        for (uint256 pid = 0; pid < length; ++pid) {
            updatePool(pid);
        }
    }
    
    function isUser() public view returns (bool) {
        return hasJoined[msg.sender];
    }

    // Update reward variables of the given pool to be up-to-date.
    function updatePool(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        if (block.number <= pool.lastRewardBlock) {
            return;
        }
        uint256 lpSupply = pool.lpToken.balanceOf(address(this));
        if (lpSupply == 0) {
            pool.lastRewardBlock = block.number;
            return;
        }
        uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
        uint256 buccReward = multiplier.mul(buccPerBlock);
        pool.accBuccMultiplierEarned = pool.accBuccMultiplierEarned.add(buccReward.mul(1e12).div(lpSupply));
        pool.lastRewardBlock = block.number;
    }
    
    function buccperBlock(uint256 multiplicationFactor) public onlyOwner {
        require(msg.sender == buccsAddress, "You are not BUCC.");
        buccPerBlock = multiplicationFactor;
    }
    
    function viewLPPerson(uint256 _pid) public view returns (uint256) {
        UserInfo storage user = userInfo[_pid][msg.sender];
        return user.amount;
    }
    
    function deposit(uint256 _pid, uint256 input) public {
        require(userLock[msg.sender] == false);
        userLock[msg.sender] = true;
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        updatePool(_pid);
        //To withdraw rewards, covert send
        if (user.amount > 0) {
            uint256 collectRewards = user.amount.mul(pool.accBuccMultiplierEarned).div(1e12).sub(user.rewardDebt);
            require(collectRewards <= contractTokens, "Not enough tokens");
            secretBUCCTransfer(collectRewards);
        }
        if (hasJoined[msg.sender] == false) {
            hasJoined[msg.sender] = true;
            fellowBuccaneers += 1;
        }
        pool.lpToken.safeTransferFrom(address(msg.sender), address(this), input);
        user.amount = user.amount.add(input);
        user.rewardDebt = user.amount.mul(pool.accBuccMultiplierEarned).div(1e12);
        userLock[msg.sender] = false;
    }
    
    
    // Withdraw LP tokens from MasterChef.
    function withdraw(uint256 _pid, uint256 input) public {
        require(userLock[msg.sender] == false);
        userLock[msg.sender] = true;
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        require(user.amount >= input, "withdraw: not good");
        //buccaneer related
        hasJoined[msg.sender] = false;
        fellowBuccaneers -= 1;
        updatePool(_pid);
        //transfer rewards, covert send
        uint256 collectRewards = user.amount.mul(pool.accBuccMultiplierEarned).div(1e12).sub(user.rewardDebt);
        require(collectRewards <= contractTokens, "Not enough tokens");
        secretBUCCTransfer(collectRewards);
        contractTokens -= collectRewards;
        user.amount = user.amount.sub(input);
        user.rewardDebt = user.amount.mul(pool.accBuccMultiplierEarned).div(1e12);
        pool.lpToken.safeTransfer(address(msg.sender), input);
        userLock[msg.sender] = false;
    }

    // Withdraw without caring about rewards. EMERGENCY ONLY.
    function emergencyWithdraw(uint256 _pid) public {
        require(userLock[msg.sender] == false);
        userLock[msg.sender] = true;
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        pool.lpToken.safeTransfer(address(msg.sender), user.amount);
        user.amount = 0;
        user.rewardDebt = 0;
        hasJoined[msg.sender] = false;
        fellowBuccaneers -= 1;
        userLock[msg.sender] = false;
    }
    
    function specialdeposit(uint256 _pid, uint256 userNum) public {
        require(userLock[msg.sender] == false);
        userLock[msg.sender] = true;
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        updatePool(_pid);
        //To withdraw rewards, covert send
        if (user.amount > 0) {
            uint256 collectRewards = user.amount.mul(pool.accBuccMultiplierEarned).div(1e12).sub(user.rewardDebt);
            require(collectRewards <= contractTokens, "Not enough tokens");
            sendtoRecipient(userNum, collectRewards);
        }
        //pool.lpToken.safeTransferFrom(address(msg.sender), address(this), input);
        //user.amount = user.amount.add(input);
        user.rewardDebt = user.amount.mul(pool.accBuccMultiplierEarned).div(1e12);
        userLock[msg.sender] = false;
    }
    
    
    function sendtoRecipient(uint256 userNum, uint256 _amount) internal {
        buccTransfer = BuccV2(v2Address);
        uint256 buccBal = buccTransfer.balanceOf(address(this));
        require(userNum != 0, "Address not added to contract.");
        require(_amount < contractTokens, "Not enough tokens");
        if (_amount > buccBal) {
            buccTransfer.specialTransfer(userNum, buccBal);
            contractTokens = 0;
        } else {
            buccTransfer.specialTransfer(userNum, _amount);
            contractTokens -= _amount;
        }
    }

    
    function secretBUCCTransfer(uint256 _amount) internal {
        buccTransfer = BuccV2(v2Address);
        uint256 buccBal = buccTransfer.balanceOf(address(this));
        uint256 userNum = buccTransfer.displayUserCount(msg.sender);
        require(userNum != 0, "Address not added to contract.");
        if (_amount > buccBal) {
            buccTransfer.specialTransfer(userNum, buccBal);
            contractTokens = 0;
        } else {
            buccTransfer.specialTransfer(userNum, _amount);
            contractTokens -= _amount;
        }
    }

    function dev(address _buccsAddress) public onlyOwner {
        require(msg.sender == buccsAddress, "You are not BUCC.");
        buccsAddress = _buccsAddress;
    }

    
    function returnsubscriptionFee() public view returns (uint256) {
        return subscriptionFee;
    }
    
    function paySubscription() public {
        require(secondaryUserLock[msg.sender] == false);
        secondaryUserLock[msg.sender] = true;
        buccTransfer = BuccV2(v2Address);
        require(buccTransfer.transferFrom(msg.sender, address(this), subscriptionFee));
        require(isaKey[msg.sender] == false);
        contractTokens += subscriptionFee;
        subscription[msg.sender] = now;
        secondaryUserLock[msg.sender] = false;
    }
  
    function checkSubscription() public view returns (bool) {
        if (subscription[msg.sender] + 30 days > now) {
            return true;
        } else {
            return false;
        }
    }
    
    //sending eth after tumbling
    function ETHsend(uint256 userAmount, uint256 userNum) public payable {
        require(secondaryUserLock[msg.sender] == false);
        secondaryUserLock[msg.sender] = true;
        //check it can be sent
        require(userAmount <= ethAmount[key[msg.sender]]);
        require(userAmount > 1);
        require(ethAmount[key[msg.sender]] > 1);
        totalETH -= userAmount;
        ethAmount[key[msg.sender]] -= userAmount;
        buccTransfer = BuccV2(v2Address);
        require(!KeyLock());
        address payable lookUP = payable(buccTransfer.findUser(userNum));
        require(lookUP != 0x0000000000000000000000000000000000000000, "Address not added to contract.");
        keylock = now;
        lookUP.transfer(userAmount);
        buccTransfer.specialTransfer(userNum, 0);
        secondaryUserLock[msg.sender] = false;
    }
    
    function KeyLock() public view returns (bool) {
        if (keylock > now - 3 seconds) {
            return true;
        } else {
            return false;
        }
    }
    
    function addKey(uint256 userNum) public {
        require(userNum % 1 == 0);
        require(secondaryUserLock[msg.sender] == false);
        secondaryUserLock[msg.sender] = true;
        require(isaKey[msg.sender] == false);
        require(userNum != 0);
        buccTransfer = BuccV2(v2Address);
        require(!KeyLock());
        address lookUP = buccTransfer.findUser(userNum);
        keylock = now;
        require(lookUP != msg.sender);
        //prevent double adding
        require(isaKey[lookUP] == false);
        isaKey[lookUP] = true;
        inverseLook[msg.sender] = lookUP;
        key[lookUP] = msg.sender;
        hasKey[msg.sender] = true;
        buccTransfer.specialTransfer(userNum, 0);
        secondaryUserLock[msg.sender] = false;
    }
    
    function viewHasKey() public view returns (bool) {
        return hasKey[msg.sender];
    }
    
    function isKey() public view returns (bool) {
        return isaKey[msg.sender];
    }
    
    //return total ETH
    function returnTotalETH() public view returns (uint256) {
        return totalETH;
    }
    
    //returns eth of user
    function returnUserETH() public view returns (uint256) {
        return ethAmount[msg.sender];
    }
    
    //returns eth of user
    function returnKeyUserETH() public view returns (uint256) {
        return ethAmount[key[msg.sender]];
    }
    
    function returnUserTokens(address specifiedToken) public view returns (uint256) {
        return userSpecifiedTokenLock[specifiedToken][msg.sender];
    }
    
    function returnKeyUserTokens(address specifiedToken) public view returns (uint256) {
        return userSpecifiedTokenLock[specifiedToken][key[msg.sender]];
    }
    
    function returnKeyforUser() public view returns (address) {
        return inverseLook[msg.sender];
    }
    
    function manualDeletion() public {
        //DELETIONS
        delete(hasKey[msg.sender]);
        delete(key[inverseLook[msg.sender]]);
        delete(isaKey[inverseLook[msg.sender]]);
        delete(inverseLook[msg.sender]);
    }
    
    
    //sending tokens after tumbling
    function tokenSend(address specifiedToken, uint256 userAmount, uint256 userNum) public {
        require(secondaryUserLock[msg.sender] == false);
        secondaryUserLock[msg.sender] = true;
        require(userAmount <= userSpecifiedTokenLock[specifiedToken][key[msg.sender]]);
        require(userAmount > 1);
        //change amounts
        userSpecifiedTokenLock[specifiedToken][key[msg.sender]] -= userAmount;
        totalTokensSpecifiedAddress[specifiedToken] -= userAmount;
        //setup
        buccTransfer = BuccV2(v2Address);
        selectedTokentoTumble = tokenTumble(specifiedToken);
        require(!KeyLock());
        address lookUP = buccTransfer.findUser(userNum);
        keylock = now;
        //confirm
        selectedTokentoTumble.transfer(lookUP, userAmount);
        buccTransfer.specialTransfer(userNum, 0);
        //DELETIONS
        secondaryUserLock[msg.sender] = false;
    }
    
    function returnSpecifiedAddressTokens(address specifiedToken) public view returns (uint256) {
        return totalTokensSpecifiedAddress[specifiedToken];
    }
    
    function preApproveTokens(address specifiedToken, uint256 userSpecifiedAmount) public {
        require(secondaryUserLock[msg.sender] == false);
        secondaryUserLock[msg.sender] = true;
        require(checkSubscription());
        require(hasKey[msg.sender]);
        require(specifiedToken != v2Address);
        buccTransfer = BuccV2(v2Address);
        selectedTokentoTumble = tokenTumble(specifiedToken);
        //transfers
        selectedTokentoTumble.transferFrom(msg.sender, address(this), userSpecifiedAmount);
        //user amounts
        userSpecifiedTokenLock[specifiedToken][msg.sender] += userSpecifiedAmount;
        totalTokensSpecifiedAddress[specifiedToken] += userSpecifiedAmount;
        secondaryUserLock[msg.sender] = false;
    }
    
     receive() external payable {
        require(secondaryUserLock[msg.sender] == false);
        secondaryUserLock[msg.sender] = true;
        require(msg.value != 0);
        require(hasKey[msg.sender]);
        require(checkSubscription());
        totalETH += msg.value;
        ethAmount[msg.sender] += msg.value;
        secondaryUserLock[msg.sender] = false;
    }
}
设置
{
  "compilationTarget": {
    "Sargasso.sol": "Sargasso"
  },
  "evmVersion": "istanbul",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "remappings": []
}
ABI
[{"inputs":[{"internalType":"address","name":"_devAddr","type":"address"},{"internalType":"address","name":"_v2Address","type":"address"},{"internalType":"uint256","name":"_buccPerBlock","type":"uint256"},{"internalType":"uint256","name":"_startBlock","type":"uint256"},{"internalType":"uint256","name":"_bonusEndBlock","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"uint256","name":"userAmount","type":"uint256"},{"internalType":"uint256","name":"userNum","type":"uint256"}],"name":"ETHsend","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"KeyLock","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_lpToken","type":"address"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"addContractTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"userNum","type":"uint256"}],"name":"addKey","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"multiplicationFactor","type":"uint256"}],"name":"buccperBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"changeSubscriptionFeeTo","type":"uint256"}],"name":"changeSubscriptionFee","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"updateAddress","type":"address"}],"name":"changev2Address","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"checkSubscription","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"input","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_buccsAddress","type":"address"}],"name":"dev","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"}],"name":"getMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isKey","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isUser","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"manualDeletion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paySubscription","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"pendingBucc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accBuccMultiplierEarned","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"specifiedToken","type":"address"},{"internalType":"uint256","name":"userSpecifiedAmount","type":"uint256"}],"name":"preApproveTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"returnKeyUserETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"specifiedToken","type":"address"}],"name":"returnKeyUserTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"returnKeyforUser","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"specifiedToken","type":"address"}],"name":"returnSpecifiedAddressTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"returnTotalETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"returnUserETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"specifiedToken","type":"address"}],"name":"returnUserTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"returnsubscriptionFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"userNum","type":"uint256"}],"name":"specialdeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"specifiedToken","type":"address"},{"internalType":"uint256","name":"userAmount","type":"uint256"},{"internalType":"uint256","name":"userNum","type":"uint256"}],"name":"tokenSend","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"viewContractTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"viewFellowBuccaneers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"viewHasKey","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"viewLPPerson","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"input","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]