{"_id":"@donaswap/masterchef-v3","_rev":"2-5f87b8c61e2f3f5f4d0285bc3e5ce746","name":"@donaswap/masterchef-v3","dist-tags":{"latest":"1.0.2-beta"},"versions":{"1.0.0-beta":{"name":"@donaswap/masterchef-v3","version":"1.0.0-beta","description":"Donaswap MasterChef V3","publishConfig":{"access":"public"},"author":{"name":"Donaswap"},"license":"MIT","keywords":["donaswap","masterchef","v3"],"scripts":{"format:check":"prettier --check './**/*.{js,ts,sol}'","format:write":"prettier --write './**/*.{js,ts,sol}'","test":"npx hardhat test","compile":"npx hardhat compile"},"devDependencies":{"@chainlink/contracts":"^0.6.1","@commitlint/cli":"^12.1.4","@commitlint/config-conventional":"^12.1.4","@nomiclabs/hardhat-ethers":"^2.2.2","@nomiclabs/hardhat-etherscan":"^3.1.5","@nomiclabs/hardhat-truffle5":"^2.0.0","@nomiclabs/hardhat-waffle":"^2.0.3","@nomiclabs/hardhat-web3":"^2.0.0","@openzeppelin/contracts":"^4.8.1","@openzeppelin/hardhat-upgrades":"^1.22.1","@openzeppelin/test-helpers":"^0.5.11","@donaswap/eslint-config-donaswap":"^1.0.0","@donaswap/donaswap-lib":"0.0.1-beta","@pancakeswap/v3-core":"*","@pancakeswap/v3-lm-pool":"*","@pancakeswap/v3-periphery":"*","@types/chai":"^4.2.21","@types/mocha":"^8.2.2","@types/node":"^14.14.35","@uniswap/v3-sdk":"^3.9.0","chai":"^4.2.0","dotenv":"^8.2.0","eslint":"^7.22.0","ethereum-waffle":"^3.2.1","ethers":"^5.0.23","hardhat":"^2.12.6","hardhat-abi-exporter":"2.0.6","hardhat-contract-sizer":"^2.0.2","hardhat-watcher":"^2.1.1","prettier":"^2.3.2","prettier-plugin-solidity":"^1.0.0-beta.17","solidity-coverage":"^0.7.13","ts-node":"^9.1.1","typescript":"^4.2.3","web3":"^1.3.6"},"gitHead":"67ad2820f5bc32c5860fa7949d62828d2f27bf8f","_id":"@donaswap/masterchef-v3@1.0.0-beta","_nodeVersion":"18.16.0","_npmVersion":"9.7.1","dist":{"integrity":"sha512-1iXIUvnGMJI2G2jblaiCUNHyxlQbN70RxQhNdW2J82THGuTpjruY9rOnuzRRTs/UK5qCFMFGyGJIzkmOgllcOQ==","shasum":"050d946bdd9bf814669734cfcdc864f94b70b4c6","tarball":"https://registry.npmjs.org/@donaswap/masterchef-v3/-/masterchef-v3-1.0.0-beta.tgz","fileCount":38,"unpackedSize":342817,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG9S4ooxedwVLjNhEso8Qi9cGEwoxRleyaKDCmH0V3V1AiEAuGJtfCzWvCfKgJH9GzXBlRHbSz2Q/EPyPOBmQC1Ps3Q="}]},"_npmUser":{"name":"donaswap","email":"info@donaswap.com"},"directories":{},"maintainers":[{"name":"donaswap","email":"info@donaswap.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/masterchef-v3_1.0.0-beta_1690752674547_0.20726347427101843"},"_hasShrinkwrap":false},"1.0.1-beta":{"name":"@donaswap/masterchef-v3","version":"1.0.1-beta","description":"Donaswap MasterChef V3","publishConfig":{"access":"public"},"author":{"name":"Donaswap"},"license":"MIT","keywords":["donaswap","masterchef","v3"],"scripts":{"format:check":"prettier --check './**/*.{js,ts,sol}'","format:write":"prettier --write './**/*.{js,ts,sol}'","test":"npx hardhat test","compile":"npx hardhat compile"},"devDependencies":{"@chainlink/contracts":"^0.6.1","@commitlint/cli":"^12.1.4","@commitlint/config-conventional":"^12.1.4","@nomiclabs/hardhat-ethers":"^2.2.2","@nomiclabs/hardhat-etherscan":"^3.1.5","@nomiclabs/hardhat-truffle5":"^2.0.0","@nomiclabs/hardhat-waffle":"^2.0.3","@nomiclabs/hardhat-web3":"^2.0.0","@openzeppelin/contracts":"^4.8.1","@openzeppelin/hardhat-upgrades":"^1.22.1","@openzeppelin/test-helpers":"^0.5.11","@donaswap/eslint-config-donaswap":"^1.0.0","@donaswap/donaswap-lib":"0.0.1-beta","@donaswap/v3-core":"*","@donaswap/v3-lm-pool":"*","@donaswap/v3-periphery":"*","@types/chai":"^4.2.21","@types/mocha":"^8.2.2","@types/node":"^14.14.35","@uniswap/v3-sdk":"^3.9.0","chai":"^4.2.0","dotenv":"^8.2.0","eslint":"^7.22.0","ethereum-waffle":"^3.2.1","ethers":"^5.0.23","hardhat":"^2.12.6","hardhat-abi-exporter":"2.0.6","hardhat-contract-sizer":"^2.0.2","hardhat-watcher":"^2.1.1","prettier":"^2.3.2","prettier-plugin-solidity":"^1.0.0-beta.17","solidity-coverage":"^0.7.13","ts-node":"^9.1.1","typescript":"^4.2.3","web3":"^1.3.6"},"gitHead":"e9f434bedfb2aa52ced94b26eb1cb56c1d182178","_id":"@donaswap/masterchef-v3@1.0.1-beta","_nodeVersion":"18.16.0","_npmVersion":"9.7.1","dist":{"integrity":"sha512-vwE+KOp1GjtpSo62tQf296eRN88MKotjEBYV1rFQcRld5TbXGkKxPbVqPA8/lzZ8Rd6uPcJzNwanGAa19/hH8Q==","shasum":"5468f0908a84f5c4da483aec9d944cb372510ec3","tarball":"https://registry.npmjs.org/@donaswap/masterchef-v3/-/masterchef-v3-1.0.1-beta.tgz","fileCount":38,"unpackedSize":342808,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEzekdI/gd+YCH59fBG8FYgkg7/w7d55NNcLbEgjqxR0AiEA9uelXHIRSUTzJtCQteeTCFNLVSR+rPlHYOyt9ImmZUU="}]},"_npmUser":{"name":"donaswap","email":"info@donaswap.com"},"directories":{},"maintainers":[{"name":"donaswap","email":"info@donaswap.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/masterchef-v3_1.0.1-beta_1690752859108_0.35623388716732785"},"_hasShrinkwrap":false},"1.0.2-beta":{"name":"@donaswap/masterchef-v3","version":"1.0.2-beta","description":"Donaswap MasterChef V3","publishConfig":{"access":"public"},"author":{"name":"Donaswap"},"license":"MIT","keywords":["donaswap","masterchef","v3"],"scripts":{"format:check":"prettier --check './**/*.{js,ts,sol}'","format:write":"prettier --write './**/*.{js,ts,sol}'","test":"npx hardhat test","compile":"npx hardhat compile"},"devDependencies":{"@chainlink/contracts":"^0.6.1","@commitlint/cli":"^12.1.4","@commitlint/config-conventional":"^12.1.4","@nomiclabs/hardhat-ethers":"^2.2.2","@nomiclabs/hardhat-etherscan":"^3.1.5","@nomiclabs/hardhat-truffle5":"^2.0.0","@nomiclabs/hardhat-waffle":"^2.0.3","@nomiclabs/hardhat-web3":"^2.0.0","@openzeppelin/contracts":"^4.8.1","@openzeppelin/hardhat-upgrades":"^1.22.1","@openzeppelin/test-helpers":"^0.5.11","@donaswap/eslint-config-donaswap":"^1.0.1","@donaswap/donaswap-lib":"0.0.1-beta","@donaswap/v3-core":"*","@donaswap/v3-lm-pool":"*","@donaswap/v3-periphery":"*","@types/chai":"^4.2.21","@types/mocha":"^8.2.2","@types/node":"^14.14.35","@uniswap/v3-sdk":"^3.9.0","chai":"^4.2.0","dotenv":"^8.2.0","eslint":"^7.22.0","ethereum-waffle":"^3.2.1","ethers":"^5.0.23","hardhat":"^2.12.6","hardhat-abi-exporter":"2.0.6","hardhat-contract-sizer":"^2.0.2","hardhat-watcher":"^2.1.1","prettier":"^2.3.2","prettier-plugin-solidity":"^1.0.0-beta.17","solidity-coverage":"^0.7.13","ts-node":"^9.1.1","typescript":"^4.2.3","web3":"^1.3.6"},"gitHead":"364a1024bf78d0f8914d149cfdaf3e683da75795","_id":"@donaswap/masterchef-v3@1.0.2-beta","_nodeVersion":"18.16.0","_npmVersion":"9.7.1","dist":{"integrity":"sha512-owby4n7Os0QHg35iYu7O2mUGDGFNg1DG9uHHIJBAr8nvezTFRikxeDlBC3P+1MejWJQ9pxqTdnlRe1r32M2gGQ==","shasum":"6ee97e7e44f6b6c49ca9ded7f58a4e014f814e7f","tarball":"https://registry.npmjs.org/@donaswap/masterchef-v3/-/masterchef-v3-1.0.2-beta.tgz","fileCount":20,"unpackedSize":87443,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH/N7RWAnGWPFg95x+UeGieGZLop741mpjpoLxchLnvfAiEAvT/Q4OHho8+Kr6A36j2tqqlWRZnjqgQkLnNmKO4ko04="}]},"_npmUser":{"name":"donaswap","email":"info@donaswap.com"},"directories":{},"maintainers":[{"name":"donaswap","email":"info@donaswap.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/masterchef-v3_1.0.2-beta_1691237356633_0.03533154401114147"},"_hasShrinkwrap":false}},"time":{"created":"2023-07-30T21:31:14.480Z","1.0.0-beta":"2023-07-30T21:31:14.824Z","modified":"2023-08-05T12:09:16.950Z","1.0.1-beta":"2023-07-30T21:34:19.301Z","1.0.2-beta":"2023-08-05T12:09:16.817Z"},"maintainers":[{"name":"donaswap","email":"info@donaswap.com"}],"description":"Donaswap MasterChef V3","keywords":["donaswap","masterchef","v3"],"author":{"name":"Donaswap"},"license":"MIT","readme":"# MasterChefV3 API\r\n\r\n\r\n### PoolInfo\r\n\r\n```solidity\r\nstruct PoolInfo {\r\n  uint256 allocPoint;\r\n  IDonaswapV3Pool v3Pool;\r\n  address token0;\r\n  address token1;\r\n  uint24 fee;\r\n  uint256 totalLiquidity;\r\n  uint256 totalBoostLiquidity;\r\n}\r\n```\r\n\r\n### UserPositionInfo\r\n\r\n```solidity\r\nstruct UserPositionInfo {\r\n  uint128 liquidity;\r\n  uint128 boostLiquidity;\r\n  int24 tickLower;\r\n  int24 tickUpper;\r\n  uint256 rewardGrowthInside;\r\n  uint256 reward;\r\n  address user;\r\n  uint256 pid;\r\n  uint256 boostMultiplier;\r\n}\r\n```\r\n\r\n### poolLength\r\n\r\n```solidity\r\nuint256 poolLength\r\n```\r\n\r\n### poolInfo\r\n\r\n```solidity\r\nmapping(uint256 => PoolInfo) poolInfo\r\n```\r\n\r\nInfo of each MCV3 pool.\r\n\r\n### userPositionInfos\r\n\r\n```solidity\r\nmapping(uint256 => UserPositionInfo) userPositionInfos\r\n```\r\n\r\nuserPositionInfos[tokenId] => UserPositionInfo\r\n\r\n_TokenId is unique, and we can query the pid by tokenId._\r\n\r\n### v3PoolPid\r\n\r\n```solidity\r\nmapping(address => mapping(address => mapping(uint24 => uint256))) v3PoolPid\r\n```\r\n\r\nv3PoolPid[token0][token1][fee] => pid\r\n\r\n### v3PoolAddressPid\r\n\r\n```solidity\r\nmapping(address => uint256) v3PoolAddressPid\r\n```\r\n\r\nv3PoolAddressPid[v3PoolAddress] => pid\r\n\r\n### CAKE\r\n\r\n```solidity\r\nIERC20 CAKE\r\n```\r\n\r\nAddress of CAKE contract.\r\n\r\n### WETH\r\n\r\n```solidity\r\naddress WETH\r\n```\r\n\r\nAddress of WETH contract.\r\n\r\n### receiver\r\n\r\n```solidity\r\naddress receiver\r\n```\r\n\r\nAddress of Receiver contract.\r\n\r\n### nonfungiblePositionManager\r\n\r\n```solidity\r\nINonfungiblePositionManager nonfungiblePositionManager\r\n```\r\n\r\n### LMPoolDeployer\r\n\r\n```solidity\r\nILMPoolDeployer LMPoolDeployer\r\n```\r\n\r\nAddress of liquidity mining pool deployer contract.\r\n\r\n### FARM_BOOSTER\r\n\r\n```solidity\r\nIFarmBooster FARM_BOOSTER\r\n```\r\n\r\nAddress of farm booster contract.\r\n\r\n### emergency\r\n\r\n```solidity\r\nbool emergency\r\n```\r\n\r\nOnly use for emergency situations.\r\n\r\n### totalAllocPoint\r\n\r\n```solidity\r\nuint256 totalAllocPoint\r\n```\r\n\r\nTotal allocation points. Must be the sum of all pools' allocation points.\r\n\r\n### latestPeriodNumber\r\n\r\n```solidity\r\nuint256 latestPeriodNumber\r\n```\r\n\r\n### latestPeriodStartTime\r\n\r\n```solidity\r\nuint256 latestPeriodStartTime\r\n```\r\n\r\n### latestPeriodEndTime\r\n\r\n```solidity\r\nuint256 latestPeriodEndTime\r\n```\r\n\r\n### latestPeriodCakePerSecond\r\n\r\n```solidity\r\nuint256 latestPeriodCakePerSecond\r\n```\r\n\r\n### operatorAddress\r\n\r\n```solidity\r\naddress operatorAddress\r\n```\r\n\r\nAddress of the operator.\r\n\r\n### PERIOD_DURATION\r\n\r\n```solidity\r\nuint256 PERIOD_DURATION\r\n```\r\n\r\nDefault period duration.\r\n\r\n### MAX_DURATION\r\n\r\n```solidity\r\nuint256 MAX_DURATION\r\n```\r\n\r\n### MIN_DURATION\r\n\r\n```solidity\r\nuint256 MIN_DURATION\r\n```\r\n\r\n### PRECISION\r\n\r\n```solidity\r\nuint256 PRECISION\r\n```\r\n\r\n### BOOST_PRECISION\r\n\r\n```solidity\r\nuint256 BOOST_PRECISION\r\n```\r\n\r\nBasic boost factor, none boosted user's boost factor\r\n\r\n### MAX_BOOST_PRECISION\r\n\r\n```solidity\r\nuint256 MAX_BOOST_PRECISION\r\n```\r\n\r\nHard limit for maxmium boost factor, it must greater than BOOST_PRECISION\r\n\r\n### Q128\r\n\r\n```solidity\r\nuint256 Q128\r\n```\r\n\r\n### MAX_U256\r\n\r\n```solidity\r\nuint256 MAX_U256\r\n```\r\n\r\n### cakeAmountBelongToMC\r\n\r\n```solidity\r\nuint256 cakeAmountBelongToMC\r\n```\r\n\r\nRecord the cake amount belong to \r\n\r\n\r\n### constructor\r\n\r\n```solidity\r\nconstructor(IERC20 _CAKE, INonfungiblePositionManager _nonfungiblePositionManager, address _WETH) public\r\n```\r\n\r\n#### Parameters\r\n\r\n| Name | Type | Description |\r\n| ---- | ---- | ----------- |\r\n| _CAKE | IERC20 | The CAKE token contract address. |\r\n| _nonfungiblePositionManager | INonfungiblePositionManager | the NFT position manager contract address. |\r\n| _WETH | address |  |\r\n\r\n### getLatestPeriodInfoByPid\r\n\r\n```solidity\r\nfunction getLatestPeriodInfoByPid(uint256 _pid) public view returns (uint256 cakePerSecond, uint256 endTime)\r\n```\r\n\r\nReturns the cake per second , period end time.\r\n\r\n#### Parameters\r\n\r\n| Name | Type | Description |\r\n| ---- | ---- | ----------- |\r\n| _pid | uint256 | The pool pid. |\r\n\r\n#### Return Values\r\n\r\n| Name | Type | Description |\r\n| ---- | ---- | ----------- |\r\n| cakePerSecond | uint256 | Cake reward per second. |\r\n| endTime | uint256 | Period end time. |\r\n\r\n### getLatestPeriodInfo\r\n\r\n```solidity\r\nfunction getLatestPeriodInfo(address _v3Pool) public view returns (uint256 cakePerSecond, uint256 endTime)\r\n```\r\n\r\nReturns the cake per second , period end time. This is for liquidity mining pool.\r\n\r\n#### Parameters\r\n\r\n| Name | Type | Description |\r\n| ---- | ---- | ----------- |\r\n| _v3Pool | address | Address of the V3 pool. |\r\n\r\n#### Return Values\r\n\r\n| Name | Type | Description |\r\n| ---- | ---- | ----------- |\r\n| cakePerSecond | uint256 | Cake reward per second. |\r\n| endTime | uint256 | Period end time. |\r\n\r\n### pendingCake\r\n\r\n```solidity\r\nfunction pendingCake(uint256 _tokenId) external view returns (uint256 reward)\r\n```\r\n\r\nView function for checking pending CAKE rewards.\r\n\r\n_The pending cake amount is based on the last state in LMPool. The actual amount will happen whenever liquidity changes or harvest._\r\n\r\n#### Parameters\r\n\r\n| Name | Type | Description |\r\n| ---- | ---- | ----------- |\r\n| _tokenId | uint256 | Token Id of NFT. |\r\n\r\n#### Return Values\r\n\r\n| Name | Type | Description |\r\n| ---- | ---- | ----------- |\r\n| reward | uint256 | Pending reward. |\r\n\r\n### setEmergency\r\n\r\n```solidity\r\nfunction setEmergency(bool _emergency) external\r\n```\r\n\r\nFor emergency use only.\r\n\r\n### setReceiver\r\n\r\n```solidity\r\nfunction setReceiver(address _receiver) external\r\n```\r\n\r\n### setLMPoolDeployer\r\n\r\n```solidity\r\nfunction setLMPoolDeployer(ILMPoolDeployer _LMPoolDeployer) external\r\n```\r\n\r\n### add\r\n\r\n```solidity\r\nfunction add(uint256 _allocPoint, IDonaswapV3Pool _v3Pool, bool _withUpdate) external\r\n```\r\n\r\nAdd a new pool. Can only be called by the owner.\r\nOne v3 pool can only create one pool.\r\n\r\n#### Parameters\r\n\r\n| Name | Type | Description |\r\n| ---- | ---- | ----------- |\r\n| _allocPoint | uint256 | Number of allocation points for the new pool. |\r\n| _v3Pool | IDonaswapV3Pool | Address of the V3 pool. |\r\n| _withUpdate | bool | Whether call \"massUpdatePools\" operation. |\r\n\r\n### set\r\n\r\n```solidity\r\nfunction set(uint256 _pid, uint256 _allocPoint, bool _withUpdate) external\r\n```\r\n\r\nUpdate the given pool's CAKE allocation point. Can only be called by the owner.\r\n\r\n#### Parameters\r\n\r\n| Name | Type | Description |\r\n| ---- | ---- | ----------- |\r\n| _pid | uint256 | The id of the pool. See `poolInfo`. |\r\n| _allocPoint | uint256 | New number of allocation points for the pool. |\r\n| _withUpdate | bool | Whether call \"massUpdatePools\" operation. |\r\n\r\n\r\n### onERC721Received\r\n\r\n```solidity\r\nfunction onERC721Received(address, address _from, uint256 _tokenId, bytes) external returns (bytes4)\r\n```\r\n\r\nUpon receiving a ERC721\r\n\r\n### harvest\r\n\r\n```solidity\r\nfunction harvest(uint256 _tokenId, address _to) external returns (uint256 reward)\r\n```\r\n\r\nharvest cake from pool.\r\n\r\n#### Parameters\r\n\r\n| Name | Type | Description |\r\n| ---- | ---- | ----------- |\r\n| _tokenId | uint256 | Token Id of NFT. |\r\n| _to | address | Address to. |\r\n\r\n#### Return Values\r\n\r\n| Name | Type | Description |\r\n| ---- | ---- | ----------- |\r\n| reward | uint256 | Cake reward. |\r\n\r\n### withdraw\r\n\r\n```solidity\r\nfunction withdraw(uint256 _tokenId, address _to) external returns (uint256 reward)\r\n```\r\n\r\nWithdraw LP tokens from pool.\r\n\r\n#### Parameters\r\n\r\n| Name | Type | Description |\r\n| ---- | ---- | ----------- |\r\n| _tokenId | uint256 | Token Id of NFT to deposit. |\r\n| _to | address | Address to which NFT token to withdraw. |\r\n\r\n#### Return Values\r\n\r\n| Name | Type | Description |\r\n| ---- | ---- | ----------- |\r\n| reward | uint256 | Cake reward. |\r\n\r\n### updateLiquidity\r\n\r\n```solidity\r\nfunction updateLiquidity(uint256 _tokenId) external\r\n```\r\n\r\nUpdate liquidity for the NFT position.\r\n\r\n#### Parameters\r\n\r\n| Name | Type | Description |\r\n| ---- | ---- | ----------- |\r\n| _tokenId | uint256 | Token Id of NFT to update. |\r\n\r\n### updateBoostMultiplier\r\n\r\n```solidity\r\nfunction updateBoostMultiplier(uint256 _tokenId, uint256 _newMultiplier) external\r\n```\r\n\r\nUpdate farm boost multiplier for the NFT position.\r\n\r\n#### Parameters\r\n\r\n| Name | Type | Description |\r\n| ---- | ---- | ----------- |\r\n| _tokenId | uint256 | Token Id of NFT to update. |\r\n| _newMultiplier | uint256 | New boost multiplier. |\r\n\r\n\r\n### IncreaseLiquidityParams\r\n\r\n```solidity\r\nstruct IncreaseLiquidityParams {\r\n  uint256 tokenId;\r\n  uint256 amount0Desired;\r\n  uint256 amount1Desired;\r\n  uint256 amount0Min;\r\n  uint256 amount1Min;\r\n  uint256 deadline;\r\n}\r\n```\r\n\r\n### increaseLiquidity\r\n\r\n```solidity\r\nfunction increaseLiquidity(struct IncreaseLiquidityParams params) external payable returns (uint128 liquidity, uint256 amount0, uint256 amount1)\r\n```\r\n\r\nIncreases the amount of liquidity in a position, with tokens paid by the `msg.sender`\r\n\r\n#### Parameters\r\n\r\n| Name | Type | Description |\r\n| ---- | ---- | ----------- |\r\n| params | struct IncreaseLiquidityParams | tokenId The ID of the token for which liquidity is being increased, amount0Desired The desired amount of token0 to be spent, amount1Desired The desired amount of token1 to be spent, amount0Min The minimum amount of token0 to spend, which serves as a slippage check, amount1Min The minimum amount of token1 to spend, which serves as a slippage check, deadline The time by which the transaction must be included to effect the change |\r\n\r\n#### Return Values\r\n\r\n| Name | Type | Description |\r\n| ---- | ---- | ----------- |\r\n| liquidity | uint128 | The new liquidity amount as a result of the increase |\r\n| amount0 | uint256 | The amount of token0 to acheive resulting liquidity |\r\n| amount1 | uint256 | The amount of token1 to acheive resulting liquidity |\r\n\r\n\r\n### DecreaseLiquidityParams\r\n\r\n```solidity\r\nstruct DecreaseLiquidityParams {\r\n  uint256 tokenId;\r\n  uint128 liquidity;\r\n  uint256 amount0Min;\r\n  uint256 amount1Min;\r\n  uint256 deadline;\r\n}\r\n```\r\n\r\n### decreaseLiquidity\r\n\r\n```solidity\r\nfunction decreaseLiquidity(struct DecreaseLiquidityParams params) external returns (uint256 amount0, uint256 amount1)\r\n```\r\n\r\nDecreases the amount of liquidity in a position and accounts it to the position\r\n\r\n#### Parameters\r\n\r\n| Name | Type | Description |\r\n| ---- | ---- | ----------- |\r\n| params | struct DecreaseLiquidityParams | tokenId The ID of the token for which liquidity is being decreased, amount The amount by which liquidity will be decreased, amount0Min The minimum amount of token0 that should be accounted for the burned liquidity, amount1Min The minimum amount of token1 that should be accounted for the burned liquidity, deadline The time by which the transaction must be included to effect the change |\r\n\r\n#### Return Values\r\n\r\n| Name | Type | Description |\r\n| ---- | ---- | ----------- |\r\n| amount0 | uint256 | The amount of token0 accounted to the position's tokens owed |\r\n| amount1 | uint256 | The amount of token1 accounted to the position's tokens owed |\r\n\r\n### CollectParams\r\n\r\n```solidity\r\nstruct CollectParams {\r\n  uint256 tokenId;\r\n  address recipient;\r\n  uint128 amount0Max;\r\n  uint128 amount1Max;\r\n}\r\n```\r\n\r\n### collect\r\n\r\n```solidity\r\nfunction collect(struct CollectParams params) external returns (uint256 amount0, uint256 amount1)\r\n```\r\n\r\nCollects up to a maximum amount of fees owed to a specific position to the recipient\r\n\r\n_Warning!!! Please make sure to use multicall to call unwrapWETH9 or sweepToken when set recipient address(0), or you will lose your funds.\r\namount0Max The maximum amount of token0 to collect,\r\namount1Max The maximum amount of token1 to collect_\r\n\r\n#### Parameters\r\n\r\n| Name | Type | Description |\r\n| ---- | ---- | ----------- |\r\n| params | struct CollectParams | tokenId The ID of the NFT for which tokens are being collected, recipient The account that should receive the tokens, |\r\n\r\n#### Return Values\r\n\r\n| Name | Type | Description |\r\n| ---- | ---- | ----------- |\r\n| amount0 | uint256 | The amount of fees collected in token0 |\r\n| amount1 | uint256 | The amount of fees collected in token1 |\r\n\r\n### collectTo\r\n\r\n```solidity\r\nfunction collectTo(struct CollectParams params, address to) external returns (uint256 amount0, uint256 amount1)\r\n```\r\n\r\nCollects up to a maximum amount of fees owed to a specific position to the recipient, then refund.\r\n\r\n#### Parameters\r\n\r\n| Name | Type | Description |\r\n| ---- | ---- | ----------- |\r\n| params | struct CollectParams | CollectParams. |\r\n| to | address | Refund recipient. |\r\n\r\n#### Return Values\r\n\r\n| Name | Type | Description |\r\n| ---- | ---- | ----------- |\r\n| amount0 | uint256 | The amount of fees collected in token0 |\r\n| amount1 | uint256 | The amount of fees collected in token1 |\r\n\r\n### unwrapWETH9\r\n\r\n```solidity\r\nfunction unwrapWETH9(uint256 amountMinimum, address recipient) external\r\n```\r\n\r\nUnwraps the contract's WETH9 balance and sends it to recipient as ETH.\r\n\r\n_The amountMinimum parameter prevents malicious contracts from stealing WETH9 from users._\r\n\r\n#### Parameters\r\n\r\n| Name | Type | Description |\r\n| ---- | ---- | ----------- |\r\n| amountMinimum | uint256 | The minimum amount of WETH9 to unwrap |\r\n| recipient | address | The address receiving ETH |\r\n\r\n### sweepToken\r\n\r\n```solidity\r\nfunction sweepToken(address token, uint256 amountMinimum, address recipient) external\r\n```\r\n\r\nTransfers the full amount of a token held by this contract to recipient\r\n\r\n_The amountMinimum parameter prevents malicious contracts from stealing the token from users_\r\n\r\n#### Parameters\r\n\r\n| Name | Type | Description |\r\n| ---- | ---- | ----------- |\r\n| token | address | The contract address of the token which will be transferred to `recipient` |\r\n| amountMinimum | uint256 | The minimum amount of token required for a transfer |\r\n| recipient | address | The destination address of the token |\r\n\r\n### burn\r\n\r\n```solidity\r\nfunction burn(uint256 _tokenId) external\r\n```\r\n\r\nBurns a token ID, which deletes it from the NFT contract. The token must have 0 liquidity and all tokens\r\nmust be collected first.\r\n\r\n#### Parameters\r\n\r\n| Name | Type | Description |\r\n| ---- | ---- | ----------- |\r\n| _tokenId | uint256 | The ID of the token that is being burned |\r\n\r\n### upkeep\r\n\r\n```solidity\r\nfunction upkeep(uint256 _amount, uint256 _duration, bool _withUpdate) external\r\n```\r\n\r\nUpkeep period.\r\n\r\n#### Parameters\r\n\r\n| Name | Type | Description |\r\n| ---- | ---- | ----------- |\r\n| _amount | uint256 | The amount of cake injected. |\r\n| _duration | uint256 | The period duration. |\r\n| _withUpdate | bool | Whether call \"massUpdatePools\" operation. |\r\n\r\n\r\n### updatePools\r\n\r\n```solidity\r\nfunction updatePools(uint256[] pids) external\r\n```\r\n\r\nUpdate cake reward for the liquidity mining pool.\r\n\r\n_Avoid too many pools, and a single transaction cannot be fully executed for all pools._\r\n\r\n### setOperator\r\n\r\n```solidity\r\nfunction setOperator(address _operatorAddress) external\r\n```\r\n\r\nSet operator address.\r\n\r\n_Callable by owner_\r\n\r\n#### Parameters\r\n\r\n| Name | Type | Description |\r\n| ---- | ---- | ----------- |\r\n| _operatorAddress | address | New operator address. |\r\n\r\n### setPeriodDuration\r\n\r\n```solidity\r\nfunction setPeriodDuration(uint256 _periodDuration) external\r\n```\r\n\r\nSet period duration.\r\n\r\n_Callable by owner_\r\n\r\n#### Parameters\r\n\r\n| Name | Type | Description |\r\n| ---- | ---- | ----------- |\r\n| _periodDuration | uint256 | New period duration. |\r\n\r\n### updateFarmBoostContract\r\n\r\n```solidity\r\nfunction updateFarmBoostContract(address _newFarmBoostContract) external\r\n```\r\n\r\nUpdate farm boost contract address.\r\n\r\n#### Parameters\r\n\r\n| Name | Type | Description |\r\n| ---- | ---- | ----------- |\r\n| _newFarmBoostContract | address | The new farm booster address. |\r\n\r\n\r\n\r\n### ZeroAddress\r\n\r\n```solidity\r\nerror ZeroAddress()\r\n```\r\n\r\n### NotOwnerOrOperator\r\n\r\n```solidity\r\nerror NotOwnerOrOperator()\r\n```\r\n\r\n### NoBalance\r\n\r\n```solidity\r\nerror NoBalance()\r\n```\r\n\r\n### NotDonaswapNFT\r\n\r\n```solidity\r\nerror NotDonaswapNFT()\r\n```\r\n\r\n### InvalidNFT\r\n\r\n```solidity\r\nerror InvalidNFT()\r\n```\r\n\r\n### NotOwner\r\n\r\n```solidity\r\nerror NotOwner()\r\n```\r\n\r\n### NoLiquidity\r\n\r\n```solidity\r\nerror NoLiquidity()\r\n```\r\n\r\n### InvalidPeriodDuration\r\n\r\n```solidity\r\nerror InvalidPeriodDuration()\r\n```\r\n\r\n### NoLMPool\r\n\r\n```solidity\r\nerror NoLMPool()\r\n```\r\n\r\n### InvalidPid\r\n\r\n```solidity\r\nerror InvalidPid()\r\n```\r\n\r\n### DuplicatedPool\r\n\r\n```solidity\r\nerror DuplicatedPool(uint256 pid)\r\n```\r\n\r\n### NotEmpty\r\n\r\n```solidity\r\nerror NotEmpty()\r\n```\r\n\r\n### WrongReceiver\r\n\r\n```solidity\r\nerror WrongReceiver()\r\n```\r\n\r\n### InconsistentAmount\r\n\r\n```solidity\r\nerror InconsistentAmount()\r\n```\r\n\r\n### InsufficientAmount\r\n\r\n```solidity\r\nerror InsufficientAmount()\r\n```\r\n\r\n### Init\r\n\r\n```solidity\r\nevent Init()\r\n```\r\n\r\n### AddPool\r\n\r\n```solidity\r\nevent AddPool(uint256 pid, uint256 allocPoint, IDonaswapV3Pool v3Pool, ILMPool lmPool)\r\n```\r\n\r\n### SetPool\r\n\r\n```solidity\r\nevent SetPool(uint256 pid, uint256 allocPoint)\r\n```\r\n\r\n### Deposit\r\n\r\n```solidity\r\nevent Deposit(address from, uint256 pid, uint256 tokenId, uint256 liquidity, int24 tickLower, int24 tickUpper)\r\n```\r\n\r\n### Withdraw\r\n\r\n```solidity\r\nevent Withdraw(address from, address to, uint256 pid, uint256 tokenId)\r\n```\r\n\r\n### UpdateLiquidity\r\n\r\n```solidity\r\nevent UpdateLiquidity(address from, uint256 pid, uint256 tokenId, int128 liquidity, int24 tickLower, int24 tickUpper)\r\n```\r\n\r\n### NewOperatorAddress\r\n\r\n```solidity\r\nevent NewOperatorAddress(address operator)\r\n```\r\n\r\n### NewLMPoolDeployerAddress\r\n\r\n```solidity\r\nevent NewLMPoolDeployerAddress(address deployer)\r\n```\r\n\r\n### NewReceiver\r\n\r\n```solidity\r\nevent NewReceiver(address receiver)\r\n```\r\n\r\n### NewPeriodDuration\r\n\r\n```solidity\r\nevent NewPeriodDuration(uint256 periodDuration)\r\n```\r\n\r\n### Harvest\r\n\r\n```solidity\r\nevent Harvest(address sender, address to, uint256 pid, uint256 tokenId, uint256 reward)\r\n```\r\n\r\n### NewUpkeepPeriod\r\n\r\n```solidity\r\nevent NewUpkeepPeriod(uint256 periodNumber, uint256 startTime, uint256 endTime, uint256 cakePerSecond, uint256 cakeAmount)\r\n```\r\n\r\n### UpdateUpkeepPeriod\r\n\r\n```solidity\r\nevent UpdateUpkeepPeriod(uint256 periodNumber, uint256 oldEndTime, uint256 newEndTime, uint256 remainingCake)\r\n```\r\n\r\n### UpdateFarmBoostContract\r\n\r\n```solidity\r\nevent UpdateFarmBoostContract(address farmBoostContract)\r\n```\r\n\r\n### SetEmergency\r\n\r\n```solidity\r\nevent SetEmergency(bool emergency)\r\n```\r\n\r\n","readmeFilename":"README.md"}