diff --git a/.gitignore b/.gitignore index 0b13e7ab..98584d34 100644 --- a/.gitignore +++ b/.gitignore @@ -1,144 +1,19 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -pip-wheel-metadata/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -*.py,cover +.vscode .hypothesis/ -.pytest_cache/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 -db.sqlite3-journal - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -.python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock -# PEP 582; used by e.g. github.com/David-OConnor/pyflow -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -.env -.history -.hypothesis/ -build/ node_modules -deployed/* -!deployed/arbitrum-one -.vscode -.deps/ -artifacts/ - -# Foundry -out/ -forge-cache/ \ No newline at end of file +.env +coverage +coverage.json + +# Foundry files +out +cache + +# Brownie files +build +reports +deployed/arbitrum-main-fork +__pycache__ +lcov.info +.DS_Store \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..888d42dc --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "lib/forge-std"] + path = lib/forge-std + url = https://github.com/foundry-rs/forge-std diff --git a/contracts/BaseFarm.sol b/contracts/BaseFarm.sol index a9ff8c63..45f16146 100644 --- a/contracts/BaseFarm.sol +++ b/contracts/BaseFarm.sol @@ -147,6 +147,7 @@ abstract contract BaseFarm is Ownable, ReentrancyGuard, Initializable { error FarmIsPaused(); error NotTheTokenManager(); error InvalidAddress(); + error ZeroAmount(); error InvalidCooldownPeriod(); // Disallow initialization of a implementation contract @@ -154,6 +155,9 @@ abstract contract BaseFarm is Ownable, ReentrancyGuard, Initializable { _disableInitializers(); } + function initiateCooldown(uint256 _depositId) external virtual; + function withdraw(uint256 _depositId) external virtual; + /// @notice Claim rewards for the user. /// @param _depositId The id of the deposit function claimRewards(uint256 _depositId) external { @@ -164,6 +168,9 @@ abstract contract BaseFarm is Ownable, ReentrancyGuard, Initializable { /// @param _rwdToken the reward token's address. /// @param _amount the amount of reward tokens to add. function addRewards(address _rwdToken, uint256 _amount) external nonReentrant { + if (_amount == 0) { + revert ZeroAmount(); + } _farmNotClosed(); if (rewardData[_rwdToken].tknManager == address(0)) { revert InvalidRewardToken(); diff --git a/contracts/camelot/Demeter_CamelotFarm.sol b/contracts/camelot/Demeter_CamelotFarm.sol index a63ba459..76aea2f3 100644 --- a/contracts/camelot/Demeter_CamelotFarm.sol +++ b/contracts/camelot/Demeter_CamelotFarm.sol @@ -82,13 +82,13 @@ contract Demeter_CamelotFarm is BaseFarm, INFTHandler { /// @notice Function to lock a staked deposit /// @param _depositId The id of the deposit to be locked /// @dev _depositId is corresponding to the user's deposit - function initiateCooldown(uint256 _depositId) external nonReentrant { + function initiateCooldown(uint256 _depositId) external override nonReentrant { _initiateCooldown(_depositId); } /// @notice Function to withdraw a deposit from the farm. /// @param _depositId The id of the deposit to be withdrawn - function withdraw(uint256 _depositId) external nonReentrant { + function withdraw(uint256 _depositId) external override nonReentrant { _isValidDeposit(msg.sender, _depositId); Deposit memory userDeposit = deposits[msg.sender][_depositId]; diff --git a/contracts/e20-farms/BaseE20Farm.sol b/contracts/e20-farms/BaseE20Farm.sol index a57288ec..b7f54b98 100644 --- a/contracts/e20-farms/BaseE20Farm.sol +++ b/contracts/e20-farms/BaseE20Farm.sol @@ -122,13 +122,13 @@ contract BaseE20Farm is BaseFarm { /// @notice Function to lock a staked deposit /// @param _depositId The id of the deposit to be locked /// @dev _depositId is corresponding to the user's deposit - function initiateCooldown(uint256 _depositId) external nonReentrant { + function initiateCooldown(uint256 _depositId) external override nonReentrant { _initiateCooldown(_depositId); } /// @notice Function to withdraw a deposit from the farm. /// @param _depositId The id of the deposit to be withdrawn - function withdraw(uint256 _depositId) external nonReentrant { + function withdraw(uint256 _depositId) external override nonReentrant { _isValidDeposit(msg.sender, _depositId); Deposit memory userDeposit = deposits[msg.sender][_depositId]; diff --git a/contracts/uniswapV3/BaseUniV3Farm.sol b/contracts/uniswapV3/BaseUniV3Farm.sol index 821996b2..bca30aee 100644 --- a/contracts/uniswapV3/BaseUniV3Farm.sol +++ b/contracts/uniswapV3/BaseUniV3Farm.sol @@ -110,13 +110,13 @@ abstract contract BaseUniV3Farm is BaseFarm, IERC721Receiver { /// @notice Function to lock a staked deposit /// @param _depositId The id of the deposit to be locked /// @dev _depositId is corresponding to the user's deposit - function initiateCooldown(uint256 _depositId) external nonReentrant { + function initiateCooldown(uint256 _depositId) external override nonReentrant { _initiateCooldown(_depositId); } /// @notice Function to withdraw a deposit from the farm. /// @param _depositId The id of the deposit to be withdrawn - function withdraw(uint256 _depositId) external nonReentrant { + function withdraw(uint256 _depositId) external override nonReentrant { _isValidDeposit(msg.sender, _depositId); Deposit memory userDeposit = deposits[msg.sender][_depositId]; diff --git a/foundry.toml b/foundry.toml index 4f161d5a..07e9aa45 100644 --- a/foundry.toml +++ b/foundry.toml @@ -2,7 +2,5 @@ src = "contracts" out = "out" libs = ["node_modules", "lib"] -test = "test" -cache_path = "forge-cache" # See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options diff --git a/lib/forge-std b/lib/forge-std new file mode 160000 index 00000000..f73c73d2 --- /dev/null +++ b/lib/forge-std @@ -0,0 +1 @@ +Subproject commit f73c73d2018eb6a111f35e4dae7b4f27401e9421 diff --git a/package-lock.json b/package-lock.json index 11242fdf..f49159e6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,7 +1,7 @@ { "name": "demeter-protocol", "version": "1.0.0", - "lockfileVersion": 2, + "lockfileVersion": 3, "requires": true, "packages": { "": { @@ -15,7 +15,6 @@ "@uniswap/v3-periphery": "^1.3.0" }, "devDependencies": { - "ethers": "^5.7.2", "husky": "^8.0.3", "npm-run-all": "^4.1.5", "prettier": "^2.5.1", @@ -60,707 +59,6 @@ "node": ">=6.9.0" } }, - "node_modules/@ethersproject/abi": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.7.0.tgz", - "integrity": "sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/address": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/hash": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/strings": "^5.7.0" - } - }, - "node_modules/@ethersproject/abstract-provider": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz", - "integrity": "sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/networks": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/transactions": "^5.7.0", - "@ethersproject/web": "^5.7.0" - } - }, - "node_modules/@ethersproject/abstract-signer": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz", - "integrity": "sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/abstract-provider": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0" - } - }, - "node_modules/@ethersproject/address": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.7.0.tgz", - "integrity": "sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/rlp": "^5.7.0" - } - }, - "node_modules/@ethersproject/base64": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.7.0.tgz", - "integrity": "sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/bytes": "^5.7.0" - } - }, - "node_modules/@ethersproject/basex": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.7.0.tgz", - "integrity": "sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/properties": "^5.7.0" - } - }, - "node_modules/@ethersproject/bignumber": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.7.0.tgz", - "integrity": "sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "bn.js": "^5.2.1" - } - }, - "node_modules/@ethersproject/bytes": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.7.0.tgz", - "integrity": "sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/logger": "^5.7.0" - } - }, - "node_modules/@ethersproject/constants": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.7.0.tgz", - "integrity": "sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/bignumber": "^5.7.0" - } - }, - "node_modules/@ethersproject/contracts": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.7.0.tgz", - "integrity": "sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/abi": "^5.7.0", - "@ethersproject/abstract-provider": "^5.7.0", - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/address": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/transactions": "^5.7.0" - } - }, - "node_modules/@ethersproject/hash": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.7.0.tgz", - "integrity": "sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/address": "^5.7.0", - "@ethersproject/base64": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/strings": "^5.7.0" - } - }, - "node_modules/@ethersproject/hdnode": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.7.0.tgz", - "integrity": "sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/basex": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/pbkdf2": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/sha2": "^5.7.0", - "@ethersproject/signing-key": "^5.7.0", - "@ethersproject/strings": "^5.7.0", - "@ethersproject/transactions": "^5.7.0", - "@ethersproject/wordlists": "^5.7.0" - } - }, - "node_modules/@ethersproject/json-wallets": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz", - "integrity": "sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/address": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/hdnode": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/pbkdf2": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/random": "^5.7.0", - "@ethersproject/strings": "^5.7.0", - "@ethersproject/transactions": "^5.7.0", - "aes-js": "3.0.0", - "scrypt-js": "3.0.1" - } - }, - "node_modules/@ethersproject/keccak256": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.7.0.tgz", - "integrity": "sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "js-sha3": "0.8.0" - } - }, - "node_modules/@ethersproject/logger": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.7.0.tgz", - "integrity": "sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ] - }, - "node_modules/@ethersproject/networks": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.7.1.tgz", - "integrity": "sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/logger": "^5.7.0" - } - }, - "node_modules/@ethersproject/pbkdf2": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz", - "integrity": "sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/sha2": "^5.7.0" - } - }, - "node_modules/@ethersproject/properties": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.7.0.tgz", - "integrity": "sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/logger": "^5.7.0" - } - }, - "node_modules/@ethersproject/providers": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.7.2.tgz", - "integrity": "sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/abstract-provider": "^5.7.0", - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/address": "^5.7.0", - "@ethersproject/base64": "^5.7.0", - "@ethersproject/basex": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/hash": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/networks": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/random": "^5.7.0", - "@ethersproject/rlp": "^5.7.0", - "@ethersproject/sha2": "^5.7.0", - "@ethersproject/strings": "^5.7.0", - "@ethersproject/transactions": "^5.7.0", - "@ethersproject/web": "^5.7.0", - "bech32": "1.1.4", - "ws": "7.4.6" - } - }, - "node_modules/@ethersproject/random": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.7.0.tgz", - "integrity": "sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0" - } - }, - "node_modules/@ethersproject/rlp": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.7.0.tgz", - "integrity": "sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0" - } - }, - "node_modules/@ethersproject/sha2": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.7.0.tgz", - "integrity": "sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "hash.js": "1.1.7" - } - }, - "node_modules/@ethersproject/signing-key": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.7.0.tgz", - "integrity": "sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "bn.js": "^5.2.1", - "elliptic": "6.5.4", - "hash.js": "1.1.7" - } - }, - "node_modules/@ethersproject/solidity": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.7.0.tgz", - "integrity": "sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/sha2": "^5.7.0", - "@ethersproject/strings": "^5.7.0" - } - }, - "node_modules/@ethersproject/strings": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.7.0.tgz", - "integrity": "sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/logger": "^5.7.0" - } - }, - "node_modules/@ethersproject/transactions": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.7.0.tgz", - "integrity": "sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/address": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/rlp": "^5.7.0", - "@ethersproject/signing-key": "^5.7.0" - } - }, - "node_modules/@ethersproject/units": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.7.0.tgz", - "integrity": "sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/logger": "^5.7.0" - } - }, - "node_modules/@ethersproject/wallet": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.7.0.tgz", - "integrity": "sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/abstract-provider": "^5.7.0", - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/address": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/hash": "^5.7.0", - "@ethersproject/hdnode": "^5.7.0", - "@ethersproject/json-wallets": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/random": "^5.7.0", - "@ethersproject/signing-key": "^5.7.0", - "@ethersproject/transactions": "^5.7.0", - "@ethersproject/wordlists": "^5.7.0" - } - }, - "node_modules/@ethersproject/web": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.7.1.tgz", - "integrity": "sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/base64": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/strings": "^5.7.0" - } - }, - "node_modules/@ethersproject/wordlists": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.7.0.tgz", - "integrity": "sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/hash": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/strings": "^5.7.0" - } - }, "node_modules/@openzeppelin/contracts": { "version": "4.9.3", "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.9.3.tgz", @@ -832,12 +130,6 @@ "node": ">=10" } }, - "node_modules/aes-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==", - "dev": true - }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -922,18 +214,6 @@ "resolved": "https://registry.npmjs.org/base64-sol/-/base64-sol-1.0.1.tgz", "integrity": "sha512-ld3cCNMeXt4uJXmLZBHFGMvVpK9KsLVEhPpFRXnvSVAqABKbuNZg/+dsq3NuM+wxFLb/UrVkz7m1ciWmkMfTbg==" }, - "node_modules/bech32": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", - "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==", - "dev": true - }, - "node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -944,12 +224,6 @@ "concat-map": "0.0.1" } }, - "node_modules/brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", - "dev": true - }, "node_modules/call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -1101,27 +375,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", - "dev": true, - "dependencies": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "node_modules/elliptic/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - }, "node_modules/emoji-regex": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.1.0.tgz", @@ -1200,54 +453,6 @@ "node": ">=0.8.0" } }, - "node_modules/ethers": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", - "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/abi": "5.7.0", - "@ethersproject/abstract-provider": "5.7.0", - "@ethersproject/abstract-signer": "5.7.0", - "@ethersproject/address": "5.7.0", - "@ethersproject/base64": "5.7.0", - "@ethersproject/basex": "5.7.0", - "@ethersproject/bignumber": "5.7.0", - "@ethersproject/bytes": "5.7.0", - "@ethersproject/constants": "5.7.0", - "@ethersproject/contracts": "5.7.0", - "@ethersproject/hash": "5.7.0", - "@ethersproject/hdnode": "5.7.0", - "@ethersproject/json-wallets": "5.7.0", - "@ethersproject/keccak256": "5.7.0", - "@ethersproject/logger": "5.7.0", - "@ethersproject/networks": "5.7.1", - "@ethersproject/pbkdf2": "5.7.0", - "@ethersproject/properties": "5.7.0", - "@ethersproject/providers": "5.7.2", - "@ethersproject/random": "5.7.0", - "@ethersproject/rlp": "5.7.0", - "@ethersproject/sha2": "5.7.0", - "@ethersproject/signing-key": "5.7.0", - "@ethersproject/solidity": "5.7.0", - "@ethersproject/strings": "5.7.0", - "@ethersproject/transactions": "5.7.0", - "@ethersproject/units": "5.7.0", - "@ethersproject/wallet": "5.7.0", - "@ethersproject/web": "5.7.1", - "@ethersproject/wordlists": "5.7.0" - } - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -1450,27 +655,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "node_modules/hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", - "dev": true, - "dependencies": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, "node_modules/hosted-git-info": { "version": "2.8.9", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", @@ -1732,12 +916,6 @@ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, - "node_modules/js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", - "dev": true - }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -1828,18 +1006,6 @@ "node": ">= 0.10.0" } }, - "node_modules/minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "node_modules/minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", - "dev": true - }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -2171,12 +1337,6 @@ "node": ">=4" } }, - "node_modules/scrypt-js": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", - "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", - "dev": true - }, "node_modules/semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", @@ -2675,1950 +1835,11 @@ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, - "node_modules/ws": { - "version": "7.4.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", - "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", - "dev": true, - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true } - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", - "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", - "dev": true, - "requires": { - "@babel/highlight": "^7.22.13", - "chalk": "^2.4.2" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", - "dev": true - }, - "@babel/highlight": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", - "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.22.20", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" - } - }, - "@ethersproject/abi": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.7.0.tgz", - "integrity": "sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==", - "dev": true, - "requires": { - "@ethersproject/address": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/hash": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/strings": "^5.7.0" - } - }, - "@ethersproject/abstract-provider": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz", - "integrity": "sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/networks": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/transactions": "^5.7.0", - "@ethersproject/web": "^5.7.0" - } - }, - "@ethersproject/abstract-signer": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz", - "integrity": "sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ==", - "dev": true, - "requires": { - "@ethersproject/abstract-provider": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0" - } - }, - "@ethersproject/address": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.7.0.tgz", - "integrity": "sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/rlp": "^5.7.0" - } - }, - "@ethersproject/base64": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.7.0.tgz", - "integrity": "sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.7.0" - } - }, - "@ethersproject/basex": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.7.0.tgz", - "integrity": "sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/properties": "^5.7.0" - } - }, - "@ethersproject/bignumber": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.7.0.tgz", - "integrity": "sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "bn.js": "^5.2.1" - } - }, - "@ethersproject/bytes": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.7.0.tgz", - "integrity": "sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.7.0" - } - }, - "@ethersproject/constants": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.7.0.tgz", - "integrity": "sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.7.0" - } - }, - "@ethersproject/contracts": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.7.0.tgz", - "integrity": "sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg==", - "dev": true, - "requires": { - "@ethersproject/abi": "^5.7.0", - "@ethersproject/abstract-provider": "^5.7.0", - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/address": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/transactions": "^5.7.0" - } - }, - "@ethersproject/hash": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.7.0.tgz", - "integrity": "sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==", - "dev": true, - "requires": { - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/address": "^5.7.0", - "@ethersproject/base64": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/strings": "^5.7.0" - } - }, - "@ethersproject/hdnode": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.7.0.tgz", - "integrity": "sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg==", - "dev": true, - "requires": { - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/basex": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/pbkdf2": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/sha2": "^5.7.0", - "@ethersproject/signing-key": "^5.7.0", - "@ethersproject/strings": "^5.7.0", - "@ethersproject/transactions": "^5.7.0", - "@ethersproject/wordlists": "^5.7.0" - } - }, - "@ethersproject/json-wallets": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz", - "integrity": "sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g==", - "dev": true, - "requires": { - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/address": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/hdnode": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/pbkdf2": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/random": "^5.7.0", - "@ethersproject/strings": "^5.7.0", - "@ethersproject/transactions": "^5.7.0", - "aes-js": "3.0.0", - "scrypt-js": "3.0.1" - } - }, - "@ethersproject/keccak256": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.7.0.tgz", - "integrity": "sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.7.0", - "js-sha3": "0.8.0" - } - }, - "@ethersproject/logger": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.7.0.tgz", - "integrity": "sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==", - "dev": true - }, - "@ethersproject/networks": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.7.1.tgz", - "integrity": "sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.7.0" - } - }, - "@ethersproject/pbkdf2": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz", - "integrity": "sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/sha2": "^5.7.0" - } - }, - "@ethersproject/properties": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.7.0.tgz", - "integrity": "sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.7.0" - } - }, - "@ethersproject/providers": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.7.2.tgz", - "integrity": "sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg==", - "dev": true, - "requires": { - "@ethersproject/abstract-provider": "^5.7.0", - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/address": "^5.7.0", - "@ethersproject/base64": "^5.7.0", - "@ethersproject/basex": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/hash": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/networks": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/random": "^5.7.0", - "@ethersproject/rlp": "^5.7.0", - "@ethersproject/sha2": "^5.7.0", - "@ethersproject/strings": "^5.7.0", - "@ethersproject/transactions": "^5.7.0", - "@ethersproject/web": "^5.7.0", - "bech32": "1.1.4", - "ws": "7.4.6" - } - }, - "@ethersproject/random": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.7.0.tgz", - "integrity": "sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0" - } - }, - "@ethersproject/rlp": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.7.0.tgz", - "integrity": "sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0" - } - }, - "@ethersproject/sha2": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.7.0.tgz", - "integrity": "sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "hash.js": "1.1.7" - } - }, - "@ethersproject/signing-key": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.7.0.tgz", - "integrity": "sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "bn.js": "^5.2.1", - "elliptic": "6.5.4", - "hash.js": "1.1.7" - } - }, - "@ethersproject/solidity": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.7.0.tgz", - "integrity": "sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/sha2": "^5.7.0", - "@ethersproject/strings": "^5.7.0" - } - }, - "@ethersproject/strings": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.7.0.tgz", - "integrity": "sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/logger": "^5.7.0" - } - }, - "@ethersproject/transactions": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.7.0.tgz", - "integrity": "sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ==", - "dev": true, - "requires": { - "@ethersproject/address": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/rlp": "^5.7.0", - "@ethersproject/signing-key": "^5.7.0" - } - }, - "@ethersproject/units": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.7.0.tgz", - "integrity": "sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/constants": "^5.7.0", - "@ethersproject/logger": "^5.7.0" - } - }, - "@ethersproject/wallet": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.7.0.tgz", - "integrity": "sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA==", - "dev": true, - "requires": { - "@ethersproject/abstract-provider": "^5.7.0", - "@ethersproject/abstract-signer": "^5.7.0", - "@ethersproject/address": "^5.7.0", - "@ethersproject/bignumber": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/hash": "^5.7.0", - "@ethersproject/hdnode": "^5.7.0", - "@ethersproject/json-wallets": "^5.7.0", - "@ethersproject/keccak256": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/random": "^5.7.0", - "@ethersproject/signing-key": "^5.7.0", - "@ethersproject/transactions": "^5.7.0", - "@ethersproject/wordlists": "^5.7.0" - } - }, - "@ethersproject/web": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.7.1.tgz", - "integrity": "sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w==", - "dev": true, - "requires": { - "@ethersproject/base64": "^5.7.0", - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/strings": "^5.7.0" - } - }, - "@ethersproject/wordlists": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.7.0.tgz", - "integrity": "sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.7.0", - "@ethersproject/hash": "^5.7.0", - "@ethersproject/logger": "^5.7.0", - "@ethersproject/properties": "^5.7.0", - "@ethersproject/strings": "^5.7.0" - } - }, - "@openzeppelin/contracts": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.9.3.tgz", - "integrity": "sha512-He3LieZ1pP2TNt5JbkPA4PNT9WC3gOTOlDcFGJW4Le4QKqwmiNJCRt44APfxMxvq7OugU/cqYuPcSBzOw38DAg==" - }, - "@openzeppelin/contracts-upgradeable": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.9.3.tgz", - "integrity": "sha512-jjaHAVRMrE4UuZNfDwjlLGDxTHWIOwTJS2ldnc278a0gevfXfPr8hxKEVBGFBE96kl2G3VHDZhUimw/+G3TG2A==" - }, - "@solidity-parser/parser": { - "version": "0.14.3", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.14.3.tgz", - "integrity": "sha512-29g2SZ29HtsqA58pLCtopI1P/cPy5/UAzlcAXO6T/CNJimG6yA8kx4NaseMyJULiC+TEs02Y9/yeHzClqoA0hw==", - "dev": true, - "requires": { - "antlr4ts": "^0.5.0-alpha.4" - } - }, - "@uniswap/lib": { - "version": "4.0.1-alpha", - "resolved": "https://registry.npmjs.org/@uniswap/lib/-/lib-4.0.1-alpha.tgz", - "integrity": "sha512-f6UIliwBbRsgVLxIaBANF6w09tYqc6Y/qXdsrbEmXHyFA7ILiKrIwRFXe1yOg8M3cksgVsO9N7yuL2DdCGQKBA==" - }, - "@uniswap/v2-core": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@uniswap/v2-core/-/v2-core-1.0.1.tgz", - "integrity": "sha512-MtybtkUPSyysqLY2U210NBDeCHX+ltHt3oADGdjqoThZaFRDKwM6k1Nb3F0A3hk5hwuQvytFWhrWHOEq6nVJ8Q==" - }, - "@uniswap/v3-core": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@uniswap/v3-core/-/v3-core-1.0.1.tgz", - "integrity": "sha512-7pVk4hEm00j9tc71Y9+ssYpO6ytkeI0y7WE9P6UcmNzhxPePwyAxImuhVsTqWK9YFvzgtvzJHi64pBl4jUzKMQ==" - }, - "@uniswap/v3-periphery": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@uniswap/v3-periphery/-/v3-periphery-1.4.3.tgz", - "integrity": "sha512-80c+wtVzl5JJT8UQskxVYYG3oZb4pkhY0zDe0ab/RX4+8f9+W5d8wI4BT0wLB0wFQTSnbW+QdBSpkHA/vRyGBA==", - "requires": { - "@openzeppelin/contracts": "3.4.2-solc-0.7", - "@uniswap/lib": "^4.0.1-alpha", - "@uniswap/v2-core": "1.0.1", - "@uniswap/v3-core": "1.0.0", - "base64-sol": "1.0.1" - }, - "dependencies": { - "@openzeppelin/contracts": { - "version": "3.4.2-solc-0.7", - "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-3.4.2-solc-0.7.tgz", - "integrity": "sha512-W6QmqgkADuFcTLzHL8vVoNBtkwjvQRpYIAom7KiUNoLKghyx3FgH0GBjt8NRvigV1ZmMOBllvE1By1C+bi8WpA==" - }, - "@uniswap/v3-core": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@uniswap/v3-core/-/v3-core-1.0.0.tgz", - "integrity": "sha512-kSC4djMGKMHj7sLMYVnn61k9nu+lHjMIxgg9CDQT+s2QYLoA56GbSK9Oxr+qJXzzygbkrmuY6cwgP6cW2JXPFA==" - } - } - }, - "aes-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==", - "dev": true - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "antlr4": { - "version": "4.13.1", - "resolved": "https://registry.npmjs.org/antlr4/-/antlr4-4.13.1.tgz", - "integrity": "sha512-kiXTspaRYvnIArgE97z5YVVf/cDVQABr3abFRR6mE7yesLMkgu4ujuyV/sgxafQ8wgve0DJQUJ38Z8tkgA2izA==", - "dev": true - }, - "antlr4ts": { - "version": "0.5.0-alpha.4", - "resolved": "https://registry.npmjs.org/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz", - "integrity": "sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ==", - "dev": true - }, - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "ast-parents": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/ast-parents/-/ast-parents-0.0.1.tgz", - "integrity": "sha512-XHusKxKz3zoYk1ic8Un640joHbFMhbqneyoZfoKnEGtf2ey9Uh/IdpcQplODdO/kENaMIWsD0nJm4+wX3UNLHA==", - "dev": true - }, - "astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "base64-sol": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/base64-sol/-/base64-sol-1.0.1.tgz", - "integrity": "sha512-ld3cCNMeXt4uJXmLZBHFGMvVpK9KsLVEhPpFRXnvSVAqABKbuNZg/+dsq3NuM+wxFLb/UrVkz7m1ciWmkMfTbg==" - }, - "bech32": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", - "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==", - "dev": true - }, - "bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", - "dev": true - }, - "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - } - }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "commander": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", - "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "cosmiconfig": { - "version": "8.3.6", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", - "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", - "dev": true, - "requires": { - "import-fresh": "^3.3.0", - "js-yaml": "^4.1.0", - "parse-json": "^5.2.0", - "path-type": "^4.0.0" - }, - "dependencies": { - "parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - } - }, - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true - } - } - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "define-properties": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", - "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", - "dev": true, - "requires": { - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - } - }, - "elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } - } - }, - "emoji-regex": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.1.0.tgz", - "integrity": "sha512-xAEnNCT3w2Tg6MA7ly6QqYJvEoY1tm9iIjJ3yMKK9JPlWuRHAMoe5iETwQnx3M9TVbFMfsrBgWKR+IsmswwNjg==", - "dev": true - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es-abstract": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.1.tgz", - "integrity": "sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.1.1", - "get-symbol-description": "^1.0.0", - "has": "^1.0.3", - "has-property-descriptors": "^1.0.0", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.3", - "is-callable": "^1.2.4", - "is-negative-zero": "^2.0.2", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", - "is-string": "^1.0.7", - "is-weakref": "^1.0.2", - "object-inspect": "^1.12.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "regexp.prototype.flags": "^1.4.3", - "string.prototype.trimend": "^1.0.5", - "string.prototype.trimstart": "^1.0.5", - "unbox-primitive": "^1.0.2" - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true - }, - "ethers": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", - "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", - "dev": true, - "requires": { - "@ethersproject/abi": "5.7.0", - "@ethersproject/abstract-provider": "5.7.0", - "@ethersproject/abstract-signer": "5.7.0", - "@ethersproject/address": "5.7.0", - "@ethersproject/base64": "5.7.0", - "@ethersproject/basex": "5.7.0", - "@ethersproject/bignumber": "5.7.0", - "@ethersproject/bytes": "5.7.0", - "@ethersproject/constants": "5.7.0", - "@ethersproject/contracts": "5.7.0", - "@ethersproject/hash": "5.7.0", - "@ethersproject/hdnode": "5.7.0", - "@ethersproject/json-wallets": "5.7.0", - "@ethersproject/keccak256": "5.7.0", - "@ethersproject/logger": "5.7.0", - "@ethersproject/networks": "5.7.1", - "@ethersproject/pbkdf2": "5.7.0", - "@ethersproject/properties": "5.7.0", - "@ethersproject/providers": "5.7.2", - "@ethersproject/random": "5.7.0", - "@ethersproject/rlp": "5.7.0", - "@ethersproject/sha2": "5.7.0", - "@ethersproject/signing-key": "5.7.0", - "@ethersproject/solidity": "5.7.0", - "@ethersproject/strings": "5.7.0", - "@ethersproject/transactions": "5.7.0", - "@ethersproject/units": "5.7.0", - "@ethersproject/wallet": "5.7.0", - "@ethersproject/web": "5.7.1", - "@ethersproject/wordlists": "5.7.0" - } - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "fast-diff": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", - "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", - "dev": true - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "function.prototype.name": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", - "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0", - "functions-have-names": "^1.2.2" - } - }, - "functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true - }, - "get-intrinsic": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", - "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" - } - }, - "get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" - } - }, - "glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - }, - "dependencies": { - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0" - } - }, - "minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "requires": { - "brace-expansion": "^2.0.1" - } - } - } - }, - "graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", - "dev": true - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true - }, - "has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", - "dev": true, - "requires": { - "get-intrinsic": "^1.1.1" - } - }, - "has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true - }, - "has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "dev": true, - "requires": { - "has-symbols": "^1.0.2" - } - }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", - "dev": true, - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, - "husky": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", - "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", - "dev": true - }, - "ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", - "dev": true - }, - "import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "internal-slot": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", - "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", - "dev": true, - "requires": { - "get-intrinsic": "^1.1.0", - "has": "^1.0.3", - "side-channel": "^1.0.4" - } - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true - }, - "is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, - "requires": { - "has-bigints": "^1.0.1" - } - }, - "is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-callable": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", - "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", - "dev": true - }, - "is-core-module": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", - "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", - "dev": true - }, - "is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2" - } - }, - "is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, - "requires": { - "has-symbols": "^1.0.2" - } - }, - "is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.2" - } - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", - "dev": true - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true - }, - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - } - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", - "dev": true - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "memorystream": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", - "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", - "dev": true - }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", - "dev": true - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "npm-run-all": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", - "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "chalk": "^2.4.1", - "cross-spawn": "^6.0.5", - "memorystream": "^0.3.1", - "minimatch": "^3.0.4", - "pidtree": "^0.3.0", - "read-pkg": "^3.0.0", - "shell-quote": "^1.6.1", - "string.prototype.padend": "^3.0.0" - } - }, - "object-inspect": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", - "dev": true - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - }, - "object.assign": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.3.tgz", - "integrity": "sha512-ZFJnX3zltyjcYJL0RoCJuzb+11zWGyaDbjgxZbdV7rFEcHQuYxrZqhow67aA7xpes6LhojyFDaBKAFfogQrikA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "requires": { - "callsites": "^3.0.0" - } - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", - "dev": true - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "pidtree": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz", - "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==", - "dev": true - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", - "dev": true - }, - "pluralize": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", - "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", - "dev": true - }, - "prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", - "dev": true - }, - "prettier-linter-helpers": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", - "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", - "dev": true, - "requires": { - "fast-diff": "^1.1.2" - } - }, - "prettier-plugin-solidity": { - "version": "1.0.0-beta.24", - "resolved": "https://registry.npmjs.org/prettier-plugin-solidity/-/prettier-plugin-solidity-1.0.0-beta.24.tgz", - "integrity": "sha512-6JlV5BBTWzmDSq4kZ9PTXc3eLOX7DF5HpbqmmaF+kloyUwOZbJ12hIYsUaZh2fVgZdV2t0vWcvY6qhILhlzgqg==", - "dev": true, - "requires": { - "@solidity-parser/parser": "^0.14.3", - "emoji-regex": "^10.1.0", - "escape-string-regexp": "^4.0.0", - "semver": "^7.3.7", - "solidity-comments-extractor": "^0.0.7", - "string-width": "^4.2.3" - }, - "dependencies": { - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true - }, - "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - } - } - }, - "punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", - "dev": true - }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==", - "dev": true, - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - } - }, - "regexp.prototype.flags": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", - "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "functions-have-names": "^1.2.2" - } - }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true - }, - "resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", - "dev": true, - "requires": { - "is-core-module": "^2.9.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - } - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true - }, - "scrypt-js": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", - "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", - "dev": true - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", - "dev": true - }, - "shell-quote": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.3.tgz", - "integrity": "sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw==", - "dev": true - }, - "side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - } - }, - "slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - } - } - }, - "solhint": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/solhint/-/solhint-3.6.2.tgz", - "integrity": "sha512-85EeLbmkcPwD+3JR7aEMKsVC9YrRSxd4qkXuMzrlf7+z2Eqdfm1wHWq1ffTuo5aDhoZxp2I9yF3QkxZOxOL7aQ==", - "dev": true, - "requires": { - "@solidity-parser/parser": "^0.16.0", - "ajv": "^6.12.6", - "antlr4": "^4.11.0", - "ast-parents": "^0.0.1", - "chalk": "^4.1.2", - "commander": "^10.0.0", - "cosmiconfig": "^8.0.0", - "fast-diff": "^1.2.0", - "glob": "^8.0.3", - "ignore": "^5.2.4", - "js-yaml": "^4.1.0", - "lodash": "^4.17.21", - "pluralize": "^8.0.0", - "prettier": "^2.8.3", - "semver": "^7.5.2", - "strip-ansi": "^6.0.1", - "table": "^6.8.1", - "text-table": "^0.2.0" - }, - "dependencies": { - "@solidity-parser/parser": { - "version": "0.16.1", - "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.1.tgz", - "integrity": "sha512-PdhRFNhbTtu3x8Axm0uYpqOy/lODYQK+MlYSgqIsq2L8SFYEHJPHNUiOTAJbDGzNjjr1/n9AcIayxafR/fWmYw==", - "dev": true, - "requires": { - "antlr4ts": "^0.5.0-alpha.4" - } - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "solhint-plugin-prettier": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/solhint-plugin-prettier/-/solhint-plugin-prettier-0.0.5.tgz", - "integrity": "sha512-7jmWcnVshIrO2FFinIvDQmhQpfpS2rRRn3RejiYgnjIE68xO2bvrYvjqVNfrio4xH9ghOqn83tKuTzLjEbmGIA==", - "dev": true, - "requires": { - "prettier-linter-helpers": "^1.0.0" - } - }, - "solidity-comments-extractor": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/solidity-comments-extractor/-/solidity-comments-extractor-0.0.7.tgz", - "integrity": "sha512-wciNMLg/Irp8OKGrh3S2tfvZiZ0NEyILfcRCXCD4mp7SgK/i9gzLfhY2hY7VMCQJ3kH9UB9BzNdibIVMchzyYw==", - "dev": true - }, - "spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz", - "integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==", - "dev": true - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "dependencies": { - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - } - } - }, - "string.prototype.padend": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.3.tgz", - "integrity": "sha512-jNIIeokznm8SD/TZISQsZKYu7RJyheFNt84DUPrh482GC8RVp2MKqm2O5oBRdGxbDQoXrhhWtPIWQOiy20svUg==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" - } - }, - "string.prototype.trimend": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", - "integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.19.5" - } - }, - "string.prototype.trimstart": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", - "integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.19.5" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true - }, - "table": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", - "integrity": "sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==", - "dev": true, - "requires": { - "ajv": "^8.0.1", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, - "dependencies": { - "ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - } - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true - }, - "unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" - } - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, - "requires": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "ws": { - "version": "7.4.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", - "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", - "dev": true, - "requires": {} - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - } } } diff --git a/package.json b/package.json index 371f0f5e..83fcf79e 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,13 @@ "lint-test-contract": "solhint 'test/**/*.sol' -f table", "prettier": "forge fmt", "prettier-check": "forge fmt --check", - "slither-analyze": "slither ." + "slither-analyze": "slither .", + "test": "forge test -vvv", + "test-contract": "forge test -vvvv --match-contract", + "test-file": "forge test -vvv --match-path", + "test-function": "forge test -vvv --match-test", + "forge-coverage": "forge coverage --report lcov && lcov --remove ./lcov.info -o ./lcov.info 'test/*' && rm -rf ./coverage && genhtml lcov.info --output-dir coverage && mv lcov.info ./coverage", + "coverage-minimum": "forge coverage --ir-minimum --report lcov && lcov --remove ./lcov.info -o ./lcov.info 'test/*' && rm -rf ./coverage && genhtml lcov.info --output-dir coverage && mv lcov.info ./coverage" }, "dependencies": { "@openzeppelin/contracts": "^4.7.3", @@ -23,7 +29,6 @@ "@uniswap/v3-periphery": "^1.3.0" }, "devDependencies": { - "ethers": "^5.7.2", "husky": "^8.0.3", "npm-run-all": "^4.1.5", "solhint": "^3.6.2" diff --git a/reports/coverage.json b/reports/coverage.json deleted file mode 100644 index c773df31..00000000 --- a/reports/coverage.json +++ /dev/null @@ -1,2168 +0,0 @@ -{ - "coverage": { - "Demeter_CamelotFarm": { - "branches": { - "Address.functionCallWithValue": [ - 1, - 0, - 1 - ], - "Address.verifyCallResult": [ - 0, - 1, - 2 - ], - "Demeter_CamelotFarm._addRewardData": [ - 1, - 1, - 1 - ], - "Demeter_CamelotFarm._claimRewards": [ - 1, - 1, - 1 - ], - "Demeter_CamelotFarm._farmNotClosed": [ - 1, - 1, - 1 - ], - "Demeter_CamelotFarm._farmNotPaused": [ - 1, - 1, - 1 - ], - "Demeter_CamelotFarm._getAccRewards": [ - 3, - 3, - 3 - ], - "Demeter_CamelotFarm._isNonZeroAddr": [ - 1, - 1, - 1 - ], - "Demeter_CamelotFarm._isTokenManager": [ - 1, - 1, - 1 - ], - "Demeter_CamelotFarm._isValidCooldownPeriod": [ - 2, - 2, - 2 - ], - "Demeter_CamelotFarm._isValidDeposit": [ - 1, - 1, - 1 - ], - "Demeter_CamelotFarm._recoverRewardFunds": [ - 2, - 2, - 2 - ], - "Demeter_CamelotFarm._setRewardRate": [ - 1, - 1, - 1 - ], - "Demeter_CamelotFarm._setupFarm": [ - 1, - 1, - 1 - ], - "Demeter_CamelotFarm._subscribeRewardFund": [ - 1, - 1, - 1 - ], - "Demeter_CamelotFarm._unsubscribeRewardFund": [ - 2, - 2, - 2 - ], - "Demeter_CamelotFarm._updateFarmRewardData": [ - 3, - 3, - 3 - ], - "Demeter_CamelotFarm.addRewards": [ - 0, - 0, - 1 - ], - "Demeter_CamelotFarm.computeRewards": [ - 2, - 3, - 3 - ], - "Demeter_CamelotFarm.farmPauseSwitch": [ - 1, - 1, - 1 - ], - "Demeter_CamelotFarm.getRewardBalance": [ - 4, - 4, - 4 - ], - "Demeter_CamelotFarm.getRewardFundInfo": [ - 1, - 1, - 1 - ], - "Demeter_CamelotFarm.getSubscriptionInfo": [ - 1, - 1, - 1 - ], - "Demeter_CamelotFarm.initialize": [ - 2, - 2, - 2 - ], - "Demeter_CamelotFarm.initiateCooldown": [ - 1, - 1, - 1 - ], - "Demeter_CamelotFarm.onERC721Received": [ - 6, - 5, - 6 - ], - "Demeter_CamelotFarm.onNFTHarvest": [ - 1, - 1, - 1 - ], - "Demeter_CamelotFarm.recoverERC20": [ - 2, - 2, - 2 - ], - "Demeter_CamelotFarm.updateFarmStartTime": [ - 2, - 2, - 2 - ], - "Demeter_CamelotFarm.withdraw": [ - 5, - 5, - 5 - ], - "Ownable._checkOwner": [ - 1, - 1, - 1 - ], - "Ownable.transferOwnership": [ - 0, - 0, - 1 - ], - "SafeERC20._callOptionalReturn": [ - 1, - 1, - 2 - ] - }, - "statements": { - "Address.functionCallWithValue": [ - 3, - 3 - ], - "Address.verifyCallResult": [ - 1, - 2 - ], - "Demeter_CamelotFarm._addRewardData": [ - 6, - 6 - ], - "Demeter_CamelotFarm._claimRewards": [ - 12, - 12 - ], - "Demeter_CamelotFarm._farmNotClosed": [ - 1, - 1 - ], - "Demeter_CamelotFarm._farmNotPaused": [ - 1, - 1 - ], - "Demeter_CamelotFarm._getAccRewards": [ - 4, - 4 - ], - "Demeter_CamelotFarm._isNonZeroAddr": [ - 1, - 1 - ], - "Demeter_CamelotFarm._isTokenManager": [ - 1, - 1 - ], - "Demeter_CamelotFarm._isValidCooldownPeriod": [ - 1, - 1 - ], - "Demeter_CamelotFarm._isValidDeposit": [ - 1, - 1 - ], - "Demeter_CamelotFarm._recoverRewardFunds": [ - 3, - 3 - ], - "Demeter_CamelotFarm._setRewardRate": [ - 5, - 5 - ], - "Demeter_CamelotFarm._setupFarm": [ - 6, - 6 - ], - "Demeter_CamelotFarm._subscribeRewardFund": [ - 5, - 5 - ], - "Demeter_CamelotFarm._unsubscribeRewardFund": [ - 9, - 9 - ], - "Demeter_CamelotFarm._updateFarmRewardData": [ - 6, - 6 - ], - "Demeter_CamelotFarm.computeRewards": [ - 8, - 8 - ], - "Demeter_CamelotFarm.farmPauseSwitch": [ - 5, - 5 - ], - "Demeter_CamelotFarm.getRewardBalance": [ - 5, - 5 - ], - "Demeter_CamelotFarm.getRewardFundInfo": [ - 2, - 2 - ], - "Demeter_CamelotFarm.getSubscriptionInfo": [ - 2, - 2 - ], - "Demeter_CamelotFarm.initialize": [ - 12, - 12 - ], - "Demeter_CamelotFarm.initiateCooldown": [ - 8, - 8 - ], - "Demeter_CamelotFarm.onERC721Received": [ - 12, - 12 - ], - "Demeter_CamelotFarm.onNFTHarvest": [ - 3, - 3 - ], - "Demeter_CamelotFarm.recoverERC20": [ - 4, - 4 - ], - "Demeter_CamelotFarm.updateFarmStartTime": [ - 5, - 5 - ], - "Demeter_CamelotFarm.withdraw": [ - 10, - 10 - ], - "Ownable._checkOwner": [ - 1, - 1 - ], - "Ownable.transferOwnership": [ - 0, - 2 - ], - "SafeERC20._callOptionalReturn": [ - 1, - 1 - ] - }, - "totals": { - "branches": [ - 53, - 53, - 59 - ], - "statements": [ - 144, - 147 - ] - } - }, - "TransparentUpgradeableProxy": { - "branches": { - "ERC1967Upgrade._setAdmin": [ - 0, - 0, - 1 - ], - "ERC1967Upgrade._upgradeToAndCall": [ - 0, - 0, - 2 - ], - "TransparentUpgradeableProxy._beforeFallback": [ - 1, - 0, - 1 - ], - "TransparentUpgradeableProxy.admin": [ - 0, - 0, - 1 - ] - }, - "statements": { - "ERC1967Upgrade._setAdmin": [ - 0, - 2 - ], - "ERC1967Upgrade._upgradeToAndCall": [ - 0, - 2 - ], - "TransparentUpgradeableProxy._beforeFallback": [ - 1, - 1 - ], - "TransparentUpgradeableProxy.admin": [ - 0, - 1 - ] - }, - "totals": { - "branches": [ - 1, - 0, - 5 - ], - "statements": [ - 1, - 6 - ] - } - } - }, - "highlights": { - "branches": { - "Demeter_CamelotFarm": { - "0": [ - [ - 1422, - 1445, - "green", - "" - ], - [ - 2169, - 2191, - "red", - "" - ] - ], - "11": [ - [ - 35902, - 35945, - "green", - "" - ], - [ - 26985, - 27007, - "green", - "" - ], - [ - 38695, - 38704, - "green", - "" - ], - [ - 38836, - 38845, - "green", - "" - ], - [ - 36738, - 36769, - "green", - "" - ], - [ - 37091, - 37113, - "green", - "" - ], - [ - 37353, - 37372, - "green", - "" - ], - [ - 39227, - 39246, - "green", - "" - ], - [ - 39019, - 39065, - "green", - "" - ], - [ - 38434, - 38472, - "green", - "" - ], - [ - 38492, - 38530, - "green", - "" - ], - [ - 38235, - 38273, - "green", - "" - ], - [ - 28108, - 28130, - "green", - "" - ], - [ - 28199, - 28218, - "green", - "" - ], - [ - 28824, - 28858, - "green", - "" - ], - [ - 34617, - 34650, - "green", - "" - ], - [ - 29727, - 29755, - "green", - "" - ], - [ - 31040, - 31068, - "green", - "" - ], - [ - 31448, - 31483, - "green", - "" - ], - [ - 32633, - 32669, - "green", - "" - ], - [ - 32800, - 32808, - "green", - "" - ], - [ - 33142, - 33165, - "green", - "" - ], - [ - 19883, - 19919, - "green", - "" - ], - [ - 20220, - 20252, - "yellow", - "" - ], - [ - 20257, - 20265, - "green", - "" - ], - [ - 16057, - 16078, - "green", - "" - ], - [ - 23996, - 24028, - "green", - "" - ], - [ - 24246, - 24282, - "green", - "" - ], - [ - 24486, - 24523, - "green", - "" - ], - [ - 24786, - 24806, - "green", - "" - ], - [ - 23629, - 23657, - "green", - "" - ], - [ - 22423, - 22471, - "green", - "" - ], - [ - 6595, - 6628, - "green", - "" - ], - [ - 7258, - 7277, - "green", - "" - ], - [ - 9878, - 9908, - "green", - "" - ], - [ - 7953, - 7974, - "green", - "" - ], - [ - 8029, - 8045, - "green", - "" - ], - [ - 8139, - 8158, - "green", - "" - ], - [ - 8182, - 8189, - "green", - "" - ], - [ - 8433, - 8446, - "yellow", - "" - ], - [ - 8948, - 8954, - "green", - "" - ], - [ - 14078, - 14099, - "green", - "" - ], - [ - 17113, - 17156, - "green", - "" - ], - [ - 17294, - 17305, - "green", - "" - ], - [ - 15641, - 15672, - "green", - "" - ], - [ - 15715, - 15747, - "green", - "" - ], - [ - 10982, - 10990, - "green", - "" - ], - [ - 11031, - 11062, - "green", - "" - ], - [ - 11138, - 11164, - "green", - "" - ], - [ - 11267, - 11308, - "green", - "" - ], - [ - 11781, - 11826, - "green", - "" - ] - ], - "13": [], - "2": [], - "3": [ - [ - 2325, - 2344, - "red", - "" - ] - ], - "4": [], - "5": [], - "6": [ - [ - 4275, - 4296, - "yellow", - "" - ], - [ - 4359, - 4389, - "yellow", - "" - ] - ], - "7": [], - "8": [ - [ - 5145, - 5175, - "yellow", - "" - ], - [ - 7735, - 7742, - "yellow", - "" - ], - [ - 7876, - 7897, - "red", - "" - ] - ], - "9": [] - }, - "TransparentUpgradeableProxy": { - "36": [ - [ - 5011, - 5036, - "yellow", - "" - ], - [ - 1803, - 1828, - "red", - "" - ] - ], - "7": [], - "8": [ - [ - 4375, - 4397, - "red", - "" - ], - [ - 2364, - 2379, - "red", - "" - ], - [ - 2383, - 2392, - "red", - "" - ] - ], - "9": [] - } - }, - "statements": { - "Demeter_CamelotFarm": { - "0": [ - [ - 1414, - 1482, - "green", - "" - ], - [ - 2541, - 2558, - "green", - "" - ], - [ - 2568, - 2613, - "green", - "" - ], - [ - 1266, - 1279, - "green", - "" - ], - [ - 1895, - 1925, - "red", - "" - ], - [ - 2161, - 2234, - "red", - "" - ], - [ - 2244, - 2272, - "red", - "" - ] - ], - "11": [ - [ - 35811, - 35833, - "green", - "" - ], - [ - 35843, - 35870, - "green", - "" - ], - [ - 35881, - 35997, - "green", - "" - ], - [ - 36008, - 36161, - "green", - "" - ], - [ - 36212, - 36237, - "green", - "" - ], - [ - 36248, - 36290, - "green", - "" - ], - [ - 25211, - 25234, - "green", - "" - ], - [ - 26064, - 26127, - "green", - "" - ], - [ - 26145, - 26199, - "green", - "" - ], - [ - 26217, - 26252, - "green", - "" - ], - [ - 26396, - 26443, - "green", - "" - ], - [ - 26493, - 26499, - "green", - "" - ], - [ - 26546, - 26782, - "green", - "" - ], - [ - 26824, - 26830, - "green", - "" - ], - [ - 27027, - 27130, - "green", - "" - ], - [ - 27215, - 27274, - "green", - "" - ], - [ - 27292, - 27419, - "green", - "" - ], - [ - 27475, - 27481, - "green", - "" - ], - [ - 38687, - 38720, - "green", - "" - ], - [ - 38828, - 38861, - "green", - "" - ], - [ - 36785, - 36793, - "green", - "" - ], - [ - 37129, - 37160, - "green", - "" - ], - [ - 37388, - 37407, - "green", - "" - ], - [ - 37427, - 37444, - "green", - "" - ], - [ - 39219, - 39266, - "green", - "" - ], - [ - 38998, - 39112, - "green", - "" - ], - [ - 38413, - 38579, - "green", - "" - ], - [ - 38214, - 38321, - "green", - "" - ], - [ - 28146, - 28175, - "green", - "" - ], - [ - 28234, - 28295, - "green", - "" - ], - [ - 28309, - 28370, - "green", - "" - ], - [ - 28803, - 28911, - "green", - "" - ], - [ - 29078, - 29138, - "green", - "" - ], - [ - 29152, - 29213, - "green", - "" - ], - [ - 29255, - 29262, - "green", - "" - ], - [ - 29296, - 29362, - "green", - "" - ], - [ - 34609, - 34674, - "green", - "" - ], - [ - 35004, - 35033, - "green", - "" - ], - [ - 35075, - 35078, - "green", - "" - ], - [ - 35168, - 35206, - "green", - "" - ], - [ - 35307, - 35426, - "green", - "" - ], - [ - 35468, - 35474, - "green", - "" - ], - [ - 29719, - 29775, - "green", - "" - ], - [ - 29875, - 30101, - "green", - "" - ], - [ - 30269, - 30417, - "green", - "" - ], - [ - 30459, - 30465, - "green", - "" - ], - [ - 30549, - 30598, - "green", - "" - ], - [ - 31032, - 31088, - "green", - "" - ], - [ - 31694, - 31753, - "green", - "" - ], - [ - 31811, - 31817, - "green", - "" - ], - [ - 31933, - 31977, - "green", - "" - ], - [ - 31995, - 32012, - "green", - "" - ], - [ - 32092, - 32152, - "green", - "" - ], - [ - 32171, - 32388, - "green", - "" - ], - [ - 32407, - 32412, - "green", - "" - ], - [ - 32468, - 32474, - "green", - "" - ], - [ - 33544, - 33634, - "green", - "" - ], - [ - 33664, - 33801, - "green", - "" - ], - [ - 33876, - 33882, - "green", - "" - ], - [ - 33982, - 34007, - "green", - "" - ], - [ - 34065, - 34072, - "green", - "" - ], - [ - 34140, - 34176, - "green", - "" - ], - [ - 14491, - 14507, - "green", - "" - ], - [ - 14517, - 14630, - "green", - "" - ], - [ - 14640, - 14663, - "green", - "" - ], - [ - 14673, - 14743, - "green", - "" - ], - [ - 14753, - 14789, - "green", - "" - ], - [ - 13561, - 13577, - "green", - "" - ], - [ - 13625, - 13661, - "green", - "" - ], - [ - 13739, - 13804, - "green", - "" - ], - [ - 13173, - 13189, - "green", - "" - ], - [ - 13237, - 13273, - "green", - "" - ], - [ - 13283, - 13317, - "green", - "" - ], - [ - 12886, - 12902, - "green", - "" - ], - [ - 12912, - 12949, - "red", - "" - ], - [ - 12959, - 12994, - "red", - "" - ], - [ - 16402, - 16425, - "green", - "" - ], - [ - 16435, - 16450, - "green", - "" - ], - [ - 16460, - 16475, - "green", - "" - ], - [ - 16591, - 16649, - "green", - "" - ], - [ - 16663, - 16778, - "green", - "" - ], - [ - 16820, - 16826, - "green", - "" - ], - [ - 16860, - 16877, - "green", - "" - ], - [ - 21229, - 21280, - "green", - "" - ], - [ - 19467, - 19504, - "green", - "" - ], - [ - 19762, - 19797, - "green", - "" - ], - [ - 19935, - 19978, - "green", - "" - ], - [ - 20434, - 20573, - "green", - "" - ], - [ - 20609, - 20799, - "green", - "" - ], - [ - 20849, - 20855, - "green", - "" - ], - [ - 20929, - 20935, - "green", - "" - ], - [ - 20969, - 20983, - "green", - "" - ], - [ - 16023, - 16039, - "green", - "" - ], - [ - 16049, - 16113, - "green", - "" - ], - [ - 16123, - 16146, - "green", - "" - ], - [ - 16156, - 16176, - "green", - "" - ], - [ - 16186, - 16211, - "green", - "" - ], - [ - 21812, - 21849, - "green", - "" - ], - [ - 21497, - 21529, - "green", - "" - ], - [ - 22058, - 22095, - "green", - "" - ], - [ - 23988, - 24050, - "green", - "" - ], - [ - 24547, - 24655, - "green", - "" - ], - [ - 24723, - 24730, - "green", - "" - ], - [ - 24822, - 24830, - "green", - "" - ], - [ - 24850, - 24878, - "green", - "" - ], - [ - 23621, - 23688, - "green", - "" - ], - [ - 23698, - 23725, - "green", - "" - ], - [ - 23078, - 23129, - "green", - "" - ], - [ - 23171, - 23178, - "green", - "" - ], - [ - 23212, - 23224, - "green", - "" - ], - [ - 23401, - 23420, - "red", - "" - ], - [ - 22402, - 22524, - "green", - "" - ], - [ - 22534, - 22581, - "green", - "" - ], - [ - 6587, - 6655, - "green", - "" - ], - [ - 6665, - 6695, - "green", - "" - ], - [ - 6746, - 6781, - "green", - "" - ], - [ - 6791, - 6821, - "green", - "" - ], - [ - 6831, - 6847, - "green", - "" - ], - [ - 6857, - 6873, - "green", - "" - ], - [ - 6927, - 6994, - "green", - "" - ], - [ - 7004, - 7065, - "green", - "" - ], - [ - 7293, - 7332, - "green", - "" - ], - [ - 7346, - 7378, - "green", - "" - ], - [ - 7392, - 7404, - "green", - "" - ], - [ - 7424, - 7459, - "green", - "" - ], - [ - 9636, - 9652, - "green", - "" - ], - [ - 9700, - 9736, - "green", - "" - ], - [ - 9870, - 9938, - "green", - "" - ], - [ - 10005, - 10109, - "green", - "" - ], - [ - 10119, - 10149, - "green", - "" - ], - [ - 10210, - 10244, - "green", - "" - ], - [ - 10318, - 10377, - "green", - "" - ], - [ - 10388, - 10510, - "green", - "" - ], - [ - 7919, - 7935, - "green", - "" - ], - [ - 7945, - 8010, - "green", - "" - ], - [ - 8021, - 8075, - "green", - "" - ], - [ - 8174, - 8226, - "green", - "" - ], - [ - 8282, - 8305, - "green", - "" - ], - [ - 8425, - 8475, - "green", - "" - ], - [ - 8876, - 8933, - "green", - "" - ], - [ - 9036, - 9079, - "green", - "" - ], - [ - 9093, - 9150, - "green", - "" - ], - [ - 9230, - 9263, - "green", - "" - ], - [ - 9274, - 9324, - "green", - "" - ], - [ - 9334, - 9371, - "green", - "" - ], - [ - 14070, - 14115, - "green", - "" - ], - [ - 14125, - 14194, - "green", - "" - ], - [ - 14204, - 14215, - "green", - "" - ], - [ - 17092, - 17208, - "green", - "" - ], - [ - 17286, - 17333, - "green", - "" - ], - [ - 17344, - 17389, - "green", - "" - ], - [ - 17399, - 17435, - "green", - "" - ], - [ - 17881, - 17907, - "green", - "" - ], - [ - 17917, - 17940, - "green", - "" - ], - [ - 17950, - 17989, - "green", - "" - ], - [ - 18321, - 18337, - "green", - "" - ], - [ - 18347, - 18373, - "green", - "" - ], - [ - 18383, - 18406, - "green", - "" - ], - [ - 18416, - 18458, - "green", - "" - ], - [ - 15082, - 15098, - "green", - "" - ], - [ - 15108, - 15168, - "green", - "" - ], - [ - 15178, - 15220, - "green", - "" - ], - [ - 15230, - 15292, - "green", - "" - ], - [ - 15302, - 15337, - "green", - "" - ], - [ - 15633, - 15697, - "green", - "" - ], - [ - 15707, - 15762, - "green", - "" - ], - [ - 15772, - 15801, - "green", - "" - ], - [ - 15811, - 15845, - "green", - "" - ], - [ - 15856, - 15896, - "green", - "" - ], - [ - 18842, - 18858, - "green", - "" - ], - [ - 18868, - 18894, - "green", - "" - ], - [ - 18904, - 18934, - "green", - "" - ], - [ - 18944, - 18993, - "red", - "" - ], - [ - 19003, - 19066, - "red", - "" - ], - [ - 10757, - 10793, - "green", - "" - ], - [ - 11006, - 11120, - "green", - "" - ], - [ - 11238, - 11372, - "green", - "" - ], - [ - 11455, - 11489, - "green", - "" - ], - [ - 11707, - 11766, - "green", - "" - ], - [ - 11921, - 11980, - "green", - "" - ], - [ - 12043, - 12144, - "green", - "" - ], - [ - 12154, - 12177, - "green", - "" - ], - [ - 12234, - 12359, - "green", - "" - ], - [ - 12370, - 12551, - "green", - "" - ] - ], - "13": [], - "2": [], - "3": [], - "4": [], - "5": [], - "6": [ - [ - 4351, - 4436, - "green", - "" - ], - [ - 875, - 961, - "green", - "" - ], - [ - 1112, - 1208, - "green", - "" - ] - ], - "7": [], - "8": [ - [ - 4018, - 4077, - "green", - "" - ], - [ - 5137, - 5218, - "green", - "" - ], - [ - 5228, - 5288, - "green", - "" - ], - [ - 5382, - 5440, - "green", - "" - ], - [ - 1458, - 1488, - "red", - "" - ], - [ - 7758, - 7775, - "green", - "" - ], - [ - 8252, - 8272, - "red", - "" - ] - ], - "9": [ - [ - 712, - 729, - "green", - "" - ] - ] - }, - "TransparentUpgradeableProxy": { - "36": [ - [ - 4990, - 5128, - "green", - "" - ], - [ - 2939, - 2959, - "red", - "" - ], - [ - 3865, - 3905, - "red", - "" - ], - [ - 3915, - 3937, - "red", - "" - ], - [ - 3541, - 3579, - "red", - "" - ], - [ - 4185, - 4214, - "red", - "" - ], - [ - 4750, - 4799, - "red", - "" - ] - ], - "7": [ - [ - 1239, - 1281, - "green", - "" - ] - ], - "8": [ - [ - 4683, - 4723, - "red", - "" - ], - [ - 4733, - 4752, - "red", - "" - ], - [ - 4171, - 4223, - "green", - "" - ], - [ - 1373, - 1434, - "green", - "" - ], - [ - 4367, - 4440, - "red", - "" - ], - [ - 4450, - 4506, - "red", - "" - ], - [ - 1605, - 1700, - "red", - "" - ], - [ - 1710, - 1784, - "red", - "" - ], - [ - 1963, - 2000, - "red", - "" - ], - [ - 2010, - 2042, - "red", - "" - ], - [ - 2321, - 2350, - "red", - "" - ], - [ - 2408, - 2461, - "red", - "" - ] - ], - "9": [ - [ - 2675, - 2686, - "green", - "" - ], - [ - 2898, - 2909, - "red", - "" - ], - [ - 2370, - 2387, - "green", - "" - ], - [ - 2397, - 2425, - "green", - "" - ] - ] - } - } - }, - "sha1": {} -} \ No newline at end of file diff --git a/reports/coverage_camelot.json b/reports/coverage_camelot.json deleted file mode 100644 index a7d57cee..00000000 --- a/reports/coverage_camelot.json +++ /dev/null @@ -1,2055 +0,0 @@ -{ - "coverage": { - "Demeter_CamelotFarm": { - "branches": { - "BaseFarm._addRewardData": [ - 1, - 1, - 1 - ], - "BaseFarm._claimRewards": [ - 1, - 1, - 1 - ], - "BaseFarm._deposit": [ - 3, - 2, - 3 - ], - "BaseFarm._farmNotClosed": [ - 1, - 1, - 1 - ], - "BaseFarm._farmNotPaused": [ - 1, - 1, - 1 - ], - "BaseFarm._getAccRewards": [ - 3, - 3, - 3 - ], - "BaseFarm._initiateCooldown": [ - 1, - 1, - 1 - ], - "BaseFarm._isNonZeroAddr": [ - 1, - 1, - 1 - ], - "BaseFarm._isTokenManager": [ - 1, - 1, - 1 - ], - "BaseFarm._isValidCooldownPeriod": [ - 2, - 2, - 2 - ], - "BaseFarm._isValidDeposit": [ - 1, - 1, - 1 - ], - "BaseFarm._recoverRewardFunds": [ - 2, - 2, - 2 - ], - "BaseFarm._setRewardRate": [ - 1, - 1, - 1 - ], - "BaseFarm._setupFarm": [ - 3, - 3, - 3 - ], - "BaseFarm._subscribeRewardFund": [ - 1, - 1, - 1 - ], - "BaseFarm._unsubscribeRewardFund": [ - 2, - 2, - 2 - ], - "BaseFarm._updateFarmRewardData": [ - 3, - 3, - 3 - ], - "BaseFarm._withdraw": [ - 5, - 5, - 5 - ], - "BaseFarm.addRewards": [ - 0, - 0, - 1 - ], - "BaseFarm.computeRewards": [ - 1, - 3, - 3 - ], - "BaseFarm.farmPauseSwitch": [ - 1, - 1, - 1 - ], - "BaseFarm.getRewardBalance": [ - 4, - 4, - 4 - ], - "BaseFarm.getRewardFundInfo": [ - 1, - 1, - 1 - ], - "BaseFarm.getSubscriptionInfo": [ - 1, - 1, - 1 - ], - "BaseFarm.recoverERC20": [ - 2, - 2, - 2 - ], - "BaseFarm.updateFarmStartTime": [ - 2, - 2, - 2 - ], - "Demeter_CamelotFarm.onERC721Received": [ - 2, - 2, - 2 - ], - "Demeter_CamelotFarm.onNFTHarvest": [ - 1, - 1, - 1 - ], - "Ownable._checkOwner": [ - 1, - 1, - 1 - ], - "Ownable.transferOwnership": [ - 0, - 0, - 1 - ] - }, - "statements": { - "BaseFarm._addRewardData": [ - 6, - 6 - ], - "BaseFarm._claimRewards": [ - 12, - 12 - ], - "BaseFarm._deposit": [ - 9, - 9 - ], - "BaseFarm._farmNotClosed": [ - 1, - 1 - ], - "BaseFarm._farmNotPaused": [ - 1, - 1 - ], - "BaseFarm._getAccRewards": [ - 4, - 4 - ], - "BaseFarm._initiateCooldown": [ - 8, - 8 - ], - "BaseFarm._isNonZeroAddr": [ - 1, - 1 - ], - "BaseFarm._isTokenManager": [ - 1, - 1 - ], - "BaseFarm._isValidCooldownPeriod": [ - 1, - 1 - ], - "BaseFarm._isValidDeposit": [ - 1, - 1 - ], - "BaseFarm._recoverRewardFunds": [ - 3, - 3 - ], - "BaseFarm._setRewardRate": [ - 5, - 5 - ], - "BaseFarm._setupFarm": [ - 15, - 15 - ], - "BaseFarm._subscribeRewardFund": [ - 5, - 5 - ], - "BaseFarm._unsubscribeRewardFund": [ - 9, - 9 - ], - "BaseFarm._updateFarmRewardData": [ - 6, - 6 - ], - "BaseFarm._withdraw": [ - 8, - 8 - ], - "BaseFarm.computeRewards": [ - 8, - 8 - ], - "BaseFarm.farmPauseSwitch": [ - 5, - 5 - ], - "BaseFarm.getRewardBalance": [ - 5, - 5 - ], - "BaseFarm.getRewardFundInfo": [ - 2, - 2 - ], - "BaseFarm.getSubscriptionInfo": [ - 2, - 2 - ], - "BaseFarm.recoverERC20": [ - 4, - 4 - ], - "BaseFarm.updateFarmStartTime": [ - 5, - 5 - ], - "Demeter_CamelotFarm.onERC721Received": [ - 4, - 4 - ], - "Demeter_CamelotFarm.onNFTHarvest": [ - 3, - 3 - ], - "Ownable._checkOwner": [ - 1, - 1 - ], - "Ownable.transferOwnership": [ - 0, - 2 - ] - }, - "totals": { - "branches": [ - 49, - 50, - 53 - ], - "statements": [ - 135, - 137 - ] - } - }, - "TransparentUpgradeableProxy": { - "branches": { - "ERC1967Upgrade._setAdmin": [ - 0, - 0, - 1 - ], - "ERC1967Upgrade._upgradeToAndCall": [ - 0, - 0, - 2 - ], - "TransparentUpgradeableProxy._beforeFallback": [ - 1, - 0, - 1 - ], - "TransparentUpgradeableProxy.admin": [ - 0, - 0, - 1 - ] - }, - "statements": { - "ERC1967Upgrade._setAdmin": [ - 0, - 2 - ], - "ERC1967Upgrade._upgradeToAndCall": [ - 0, - 2 - ], - "TransparentUpgradeableProxy._beforeFallback": [ - 1, - 1 - ], - "TransparentUpgradeableProxy.admin": [ - 0, - 1 - ] - }, - "totals": { - "branches": [ - 1, - 0, - 5 - ], - "statements": [ - 1, - 6 - ] - } - } - }, - "highlights": { - "branches": { - "Demeter_CamelotFarm": { - "12": [], - "14": [], - "25": [ - [ - 32407, - 32450, - "green", - "" - ], - [ - 22743, - 22765, - "green", - "" - ], - [ - 16979, - 16987, - "green", - "" - ], - [ - 17053, - 17067, - "yellow", - "" - ], - [ - 17639, - 17646, - "green", - "" - ], - [ - 34605, - 34614, - "green", - "" - ], - [ - 34748, - 34757, - "green", - "" - ], - [ - 33245, - 33276, - "green", - "" - ], - [ - 33598, - 33620, - "green", - "" - ], - [ - 33860, - 33879, - "green", - "" - ], - [ - 18340, - 18370, - "green", - "" - ], - [ - 35143, - 35162, - "green", - "" - ], - [ - 34933, - 34979, - "green", - "" - ], - [ - 34342, - 34380, - "green", - "" - ], - [ - 34400, - 34438, - "green", - "" - ], - [ - 34141, - 34179, - "green", - "" - ], - [ - 23868, - 23890, - "green", - "" - ], - [ - 23959, - 23978, - "green", - "" - ], - [ - 24576, - 24610, - "green", - "" - ], - [ - 30379, - 30412, - "green", - "" - ], - [ - 30850, - 30869, - "green", - "" - ], - [ - 31121, - 31154, - "green", - "" - ], - [ - 25479, - 25507, - "green", - "" - ], - [ - 26792, - 26820, - "green", - "" - ], - [ - 27200, - 27235, - "green", - "" - ], - [ - 28387, - 28423, - "green", - "" - ], - [ - 28554, - 28562, - "green", - "" - ], - [ - 28896, - 28919, - "green", - "" - ], - [ - 19230, - 19238, - "green", - "" - ], - [ - 19279, - 19311, - "green", - "" - ], - [ - 19387, - 19414, - "green", - "" - ], - [ - 19517, - 19559, - "green", - "" - ], - [ - 20035, - 20081, - "green", - "" - ], - [ - 12022, - 12058, - "yellow", - "" - ], - [ - 12359, - 12391, - "yellow", - "" - ], - [ - 12396, - 12404, - "green", - "" - ], - [ - 8212, - 8233, - "green", - "" - ], - [ - 15869, - 15901, - "green", - "" - ], - [ - 16119, - 16155, - "green", - "" - ], - [ - 16359, - 16396, - "green", - "" - ], - [ - 16659, - 16679, - "green", - "" - ], - [ - 15502, - 15530, - "green", - "" - ], - [ - 14268, - 14316, - "green", - "" - ], - [ - 9268, - 9311, - "green", - "" - ], - [ - 9449, - 9460, - "green", - "" - ], - [ - 7796, - 7827, - "green", - "" - ], - [ - 7870, - 7902, - "green", - "" - ] - ], - "28": [ - [ - 2584, - 2605, - "green", - "" - ], - [ - 2659, - 2675, - "green", - "" - ], - [ - 4595, - 4616, - "green", - "" - ] - ], - "30": [], - "4": [ - [ - 1422, - 1445, - "green", - "" - ], - [ - 2169, - 2191, - "red", - "" - ] - ], - "6": [], - "7": [ - [ - 2325, - 2344, - "red", - "" - ] - ] - }, - "TransparentUpgradeableProxy": { - "39": [ - [ - 5011, - 5036, - "yellow", - "" - ], - [ - 1803, - 1828, - "red", - "" - ] - ], - "7": [], - "8": [ - [ - 4375, - 4397, - "red", - "" - ], - [ - 2364, - 2379, - "red", - "" - ], - [ - 2383, - 2392, - "red", - "" - ] - ], - "9": [] - } - }, - "statements": { - "Demeter_CamelotFarm": { - "12": [], - "14": [ - [ - 712, - 729, - "green", - "" - ] - ], - "25": [ - [ - 32316, - 32338, - "green", - "" - ], - [ - 32348, - 32375, - "green", - "" - ], - [ - 32386, - 32502, - "green", - "" - ], - [ - 32513, - 32666, - "green", - "" - ], - [ - 32717, - 32742, - "green", - "" - ], - [ - 32753, - 32795, - "green", - "" - ], - [ - 20969, - 20992, - "green", - "" - ], - [ - 21822, - 21885, - "green", - "" - ], - [ - 21903, - 21957, - "green", - "" - ], - [ - 21975, - 22010, - "green", - "" - ], - [ - 22154, - 22201, - "green", - "" - ], - [ - 22251, - 22257, - "green", - "" - ], - [ - 22304, - 22540, - "green", - "" - ], - [ - 22582, - 22588, - "green", - "" - ], - [ - 22785, - 22888, - "green", - "" - ], - [ - 22973, - 23032, - "green", - "" - ], - [ - 23050, - 23177, - "green", - "" - ], - [ - 23233, - 23239, - "green", - "" - ], - [ - 16906, - 16922, - "green", - "" - ], - [ - 16971, - 17024, - "green", - "" - ], - [ - 17045, - 17096, - "green", - "" - ], - [ - 17141, - 17164, - "green", - "" - ], - [ - 17566, - 17624, - "green", - "" - ], - [ - 17728, - 17771, - "green", - "" - ], - [ - 17785, - 17843, - "green", - "" - ], - [ - 17923, - 17956, - "green", - "" - ], - [ - 17967, - 18019, - "green", - "" - ], - [ - 34597, - 34630, - "green", - "" - ], - [ - 34740, - 34773, - "green", - "" - ], - [ - 33292, - 33300, - "green", - "" - ], - [ - 33636, - 33667, - "green", - "" - ], - [ - 33895, - 33914, - "green", - "" - ], - [ - 33934, - 33951, - "green", - "" - ], - [ - 18098, - 18114, - "green", - "" - ], - [ - 18162, - 18198, - "green", - "" - ], - [ - 18332, - 18400, - "green", - "" - ], - [ - 18467, - 18571, - "green", - "" - ], - [ - 18581, - 18611, - "green", - "" - ], - [ - 18672, - 18706, - "green", - "" - ], - [ - 18780, - 18839, - "green", - "" - ], - [ - 18850, - 18972, - "green", - "" - ], - [ - 35135, - 35182, - "green", - "" - ], - [ - 34912, - 35026, - "green", - "" - ], - [ - 34321, - 34487, - "green", - "" - ], - [ - 34120, - 34227, - "green", - "" - ], - [ - 23906, - 23935, - "green", - "" - ], - [ - 23994, - 24055, - "green", - "" - ], - [ - 24069, - 24130, - "green", - "" - ], - [ - 24555, - 24663, - "green", - "" - ], - [ - 24830, - 24890, - "green", - "" - ], - [ - 24904, - 24965, - "green", - "" - ], - [ - 25007, - 25014, - "green", - "" - ], - [ - 25048, - 25114, - "green", - "" - ], - [ - 30371, - 30439, - "green", - "" - ], - [ - 30449, - 30479, - "green", - "" - ], - [ - 30530, - 30565, - "green", - "" - ], - [ - 30575, - 30605, - "green", - "" - ], - [ - 30615, - 30631, - "green", - "" - ], - [ - 30641, - 30657, - "green", - "" - ], - [ - 30885, - 30924, - "green", - "" - ], - [ - 30938, - 30970, - "green", - "" - ], - [ - 30984, - 30996, - "green", - "" - ], - [ - 31113, - 31178, - "green", - "" - ], - [ - 31507, - 31536, - "green", - "" - ], - [ - 31578, - 31581, - "green", - "" - ], - [ - 31671, - 31709, - "green", - "" - ], - [ - 31810, - 31929, - "green", - "" - ], - [ - 31971, - 31977, - "green", - "" - ], - [ - 25471, - 25527, - "green", - "" - ], - [ - 25627, - 25853, - "green", - "" - ], - [ - 26021, - 26169, - "green", - "" - ], - [ - 26211, - 26217, - "green", - "" - ], - [ - 26301, - 26350, - "green", - "" - ], - [ - 26784, - 26840, - "green", - "" - ], - [ - 27446, - 27505, - "green", - "" - ], - [ - 27563, - 27569, - "green", - "" - ], - [ - 27685, - 27729, - "green", - "" - ], - [ - 27747, - 27764, - "green", - "" - ], - [ - 27844, - 27904, - "green", - "" - ], - [ - 27923, - 28140, - "green", - "" - ], - [ - 28159, - 28164, - "green", - "" - ], - [ - 28220, - 28226, - "green", - "" - ], - [ - 29298, - 29388, - "green", - "" - ], - [ - 29418, - 29555, - "green", - "" - ], - [ - 29630, - 29636, - "green", - "" - ], - [ - 29736, - 29761, - "green", - "" - ], - [ - 29819, - 29826, - "green", - "" - ], - [ - 29894, - 29930, - "green", - "" - ], - [ - 19254, - 19369, - "green", - "" - ], - [ - 19488, - 19623, - "green", - "" - ], - [ - 19706, - 19741, - "green", - "" - ], - [ - 19960, - 20020, - "green", - "" - ], - [ - 20176, - 20236, - "green", - "" - ], - [ - 20299, - 20403, - "green", - "" - ], - [ - 20413, - 20437, - "green", - "" - ], - [ - 20448, - 20633, - "green", - "" - ], - [ - 6640, - 6656, - "green", - "" - ], - [ - 6666, - 6779, - "green", - "" - ], - [ - 6789, - 6812, - "green", - "" - ], - [ - 6822, - 6892, - "green", - "" - ], - [ - 6902, - 6938, - "green", - "" - ], - [ - 6222, - 6238, - "green", - "" - ], - [ - 6286, - 6322, - "green", - "" - ], - [ - 6332, - 6366, - "green", - "" - ], - [ - 5935, - 5951, - "green", - "" - ], - [ - 5961, - 5998, - "red", - "" - ], - [ - 6008, - 6043, - "red", - "" - ], - [ - 8557, - 8580, - "green", - "" - ], - [ - 8590, - 8605, - "green", - "" - ], - [ - 8615, - 8630, - "green", - "" - ], - [ - 8746, - 8804, - "green", - "" - ], - [ - 8818, - 8933, - "green", - "" - ], - [ - 8975, - 8981, - "green", - "" - ], - [ - 9015, - 9032, - "green", - "" - ], - [ - 11606, - 11643, - "green", - "" - ], - [ - 11901, - 11936, - "green", - "" - ], - [ - 12074, - 12117, - "green", - "" - ], - [ - 12573, - 12712, - "green", - "" - ], - [ - 12748, - 12938, - "green", - "" - ], - [ - 12988, - 12994, - "green", - "" - ], - [ - 13068, - 13074, - "green", - "" - ], - [ - 13108, - 13122, - "green", - "" - ], - [ - 8178, - 8194, - "green", - "" - ], - [ - 8204, - 8268, - "green", - "" - ], - [ - 8278, - 8301, - "green", - "" - ], - [ - 8311, - 8331, - "green", - "" - ], - [ - 8341, - 8366, - "green", - "" - ], - [ - 13637, - 13674, - "green", - "" - ], - [ - 13316, - 13348, - "green", - "" - ], - [ - 13897, - 13934, - "green", - "" - ], - [ - 15861, - 15923, - "green", - "" - ], - [ - 16420, - 16528, - "green", - "" - ], - [ - 16596, - 16603, - "green", - "" - ], - [ - 16695, - 16703, - "green", - "" - ], - [ - 16723, - 16751, - "green", - "" - ], - [ - 15494, - 15561, - "green", - "" - ], - [ - 15571, - 15598, - "green", - "" - ], - [ - 14937, - 14988, - "green", - "" - ], - [ - 15030, - 15037, - "green", - "" - ], - [ - 15071, - 15083, - "green", - "" - ], - [ - 15260, - 15279, - "red", - "" - ], - [ - 14247, - 14369, - "green", - "" - ], - [ - 14379, - 14426, - "green", - "" - ], - [ - 9247, - 9363, - "green", - "" - ], - [ - 9441, - 9488, - "green", - "" - ], - [ - 9499, - 9544, - "green", - "" - ], - [ - 9554, - 9590, - "green", - "" - ], - [ - 10034, - 10060, - "green", - "" - ], - [ - 10070, - 10093, - "green", - "" - ], - [ - 10103, - 10142, - "green", - "" - ], - [ - 10464, - 10480, - "green", - "" - ], - [ - 10490, - 10516, - "green", - "" - ], - [ - 10526, - 10549, - "green", - "" - ], - [ - 10559, - 10601, - "green", - "" - ], - [ - 7237, - 7253, - "green", - "" - ], - [ - 7263, - 7323, - "green", - "" - ], - [ - 7333, - 7375, - "green", - "" - ], - [ - 7385, - 7447, - "green", - "" - ], - [ - 7457, - 7492, - "green", - "" - ], - [ - 7788, - 7852, - "green", - "" - ], - [ - 7862, - 7917, - "green", - "" - ], - [ - 7927, - 7956, - "green", - "" - ], - [ - 7966, - 8000, - "green", - "" - ], - [ - 8011, - 8051, - "green", - "" - ], - [ - 10975, - 10991, - "green", - "" - ], - [ - 11001, - 11027, - "green", - "" - ], - [ - 11037, - 11067, - "green", - "" - ], - [ - 11077, - 11126, - "red", - "" - ], - [ - 11136, - 11199, - "red", - "" - ] - ], - "28": [ - [ - 4078, - 4094, - "green", - "" - ], - [ - 4142, - 4178, - "green", - "" - ], - [ - 4256, - 4321, - "green", - "" - ], - [ - 4992, - 5043, - "green", - "" - ], - [ - 1909, - 1976, - "green", - "" - ], - [ - 1986, - 2047, - "green", - "" - ], - [ - 2058, - 2116, - "green", - "" - ], - [ - 3216, - 3245, - "green", - "" - ], - [ - 2576, - 2641, - "green", - "" - ], - [ - 2651, - 2705, - "green", - "" - ], - [ - 2860, - 2904, - "green", - "" - ], - [ - 2914, - 2951, - "green", - "" - ], - [ - 4587, - 4632, - "green", - "" - ], - [ - 4642, - 4711, - "green", - "" - ], - [ - 4721, - 4732, - "green", - "" - ], - [ - 3492, - 3528, - "green", - "" - ], - [ - 3607, - 3653, - "green", - "" - ], - [ - 3709, - 3834, - "green", - "" - ] - ], - "30": [], - "4": [ - [ - 1414, - 1482, - "green", - "" - ], - [ - 2541, - 2558, - "green", - "" - ], - [ - 2568, - 2613, - "green", - "" - ], - [ - 1266, - 1279, - "green", - "" - ], - [ - 1895, - 1925, - "red", - "" - ], - [ - 2161, - 2234, - "red", - "" - ], - [ - 2244, - 2272, - "red", - "" - ] - ], - "6": [], - "7": [] - }, - "TransparentUpgradeableProxy": { - "39": [ - [ - 4990, - 5128, - "green", - "" - ], - [ - 2939, - 2959, - "red", - "" - ], - [ - 3865, - 3905, - "red", - "" - ], - [ - 3915, - 3937, - "red", - "" - ], - [ - 3541, - 3579, - "red", - "" - ], - [ - 4185, - 4214, - "red", - "" - ], - [ - 4750, - 4799, - "red", - "" - ] - ], - "7": [ - [ - 1239, - 1281, - "green", - "" - ] - ], - "8": [ - [ - 4683, - 4723, - "red", - "" - ], - [ - 4733, - 4752, - "red", - "" - ], - [ - 4171, - 4223, - "green", - "" - ], - [ - 1373, - 1434, - "green", - "" - ], - [ - 4367, - 4440, - "red", - "" - ], - [ - 4450, - 4506, - "red", - "" - ], - [ - 1605, - 1700, - "red", - "" - ], - [ - 1710, - 1784, - "red", - "" - ], - [ - 1963, - 2000, - "red", - "" - ], - [ - 2010, - 2042, - "red", - "" - ], - [ - 2321, - 2350, - "red", - "" - ], - [ - 2408, - 2461, - "red", - "" - ] - ], - "9": [ - [ - 2675, - 2686, - "green", - "" - ], - [ - 2898, - 2909, - "red", - "" - ], - [ - 2370, - 2387, - "green", - "" - ], - [ - 2397, - 2425, - "green", - "" - ] - ] - } - } - }, - "sha1": {} -} \ No newline at end of file diff --git a/reports/coverage_uniV3.json b/reports/coverage_uniV3.json deleted file mode 100644 index ed8cf72e..00000000 --- a/reports/coverage_uniV3.json +++ /dev/null @@ -1,2843 +0,0 @@ -{ - "coverage": { - "Demeter_UniV3Farm_v2": { - "branches": { - "BaseFarm._addRewardData": [ - 1, - 1, - 1 - ], - "BaseFarm._claimRewards": [ - 1, - 1, - 1 - ], - "BaseFarm._deposit": [ - 3, - 3, - 3 - ], - "BaseFarm._farmNotClosed": [ - 1, - 1, - 1 - ], - "BaseFarm._farmNotPaused": [ - 1, - 1, - 1 - ], - "BaseFarm._getAccRewards": [ - 3, - 3, - 3 - ], - "BaseFarm._initiateCooldown": [ - 1, - 1, - 1 - ], - "BaseFarm._isNonZeroAddr": [ - 1, - 1, - 1 - ], - "BaseFarm._isTokenManager": [ - 1, - 1, - 1 - ], - "BaseFarm._isValidCooldownPeriod": [ - 2, - 2, - 2 - ], - "BaseFarm._isValidDeposit": [ - 1, - 1, - 1 - ], - "BaseFarm._recoverRewardFunds": [ - 2, - 2, - 2 - ], - "BaseFarm._setRewardRate": [ - 1, - 1, - 1 - ], - "BaseFarm._setupFarm": [ - 3, - 3, - 3 - ], - "BaseFarm._subscribeRewardFund": [ - 1, - 1, - 1 - ], - "BaseFarm._unsubscribeRewardFund": [ - 2, - 2, - 2 - ], - "BaseFarm._updateFarmRewardData": [ - 3, - 3, - 3 - ], - "BaseFarm._withdraw": [ - 5, - 5, - 5 - ], - "BaseFarm.addRewards": [ - 0, - 0, - 1 - ], - "BaseFarm.computeRewards": [ - 1, - 3, - 3 - ], - "BaseFarm.farmPauseSwitch": [ - 1, - 1, - 1 - ], - "BaseFarm.getRewardBalance": [ - 3, - 4, - 4 - ], - "BaseFarm.getRewardFundInfo": [ - 1, - 1, - 1 - ], - "BaseFarm.getSubscriptionInfo": [ - 1, - 1, - 1 - ], - "BaseFarm.recoverERC20": [ - 2, - 2, - 2 - ], - "BaseFarm.updateFarmStartTime": [ - 2, - 2, - 2 - ], - "Demeter_UniV3Farm_v2._getLiquidity": [ - 3, - 2, - 3 - ], - "Demeter_UniV3Farm_v2._validateTickRange": [ - 5, - 5, - 5 - ], - "Demeter_UniV3Farm_v2.claimUniswapFee": [ - 1, - 2, - 2 - ], - "Demeter_UniV3Farm_v2.onERC721Received": [ - 2, - 2, - 2 - ], - "Ownable._checkOwner": [ - 1, - 1, - 1 - ], - "Ownable.transferOwnership": [ - 0, - 0, - 1 - ], - "PoolAddress.computeAddress": [ - 1, - 0, - 1 - ], - "PositionValue._getFeeGrowthInside": [ - 1, - 1, - 2 - ] - }, - "statements": { - "BaseFarm._addRewardData": [ - 6, - 6 - ], - "BaseFarm._claimRewards": [ - 12, - 12 - ], - "BaseFarm._deposit": [ - 9, - 9 - ], - "BaseFarm._farmNotClosed": [ - 1, - 1 - ], - "BaseFarm._farmNotPaused": [ - 1, - 1 - ], - "BaseFarm._getAccRewards": [ - 4, - 4 - ], - "BaseFarm._initiateCooldown": [ - 8, - 8 - ], - "BaseFarm._isNonZeroAddr": [ - 1, - 1 - ], - "BaseFarm._isTokenManager": [ - 1, - 1 - ], - "BaseFarm._isValidCooldownPeriod": [ - 1, - 1 - ], - "BaseFarm._isValidDeposit": [ - 1, - 1 - ], - "BaseFarm._recoverRewardFunds": [ - 3, - 3 - ], - "BaseFarm._setRewardRate": [ - 5, - 5 - ], - "BaseFarm._setupFarm": [ - 15, - 15 - ], - "BaseFarm._subscribeRewardFund": [ - 5, - 5 - ], - "BaseFarm._unsubscribeRewardFund": [ - 9, - 9 - ], - "BaseFarm._updateFarmRewardData": [ - 6, - 6 - ], - "BaseFarm._withdraw": [ - 8, - 8 - ], - "BaseFarm.computeRewards": [ - 8, - 8 - ], - "BaseFarm.farmPauseSwitch": [ - 5, - 5 - ], - "BaseFarm.getRewardBalance": [ - 5, - 5 - ], - "BaseFarm.getRewardFundInfo": [ - 2, - 2 - ], - "BaseFarm.getSubscriptionInfo": [ - 2, - 2 - ], - "BaseFarm.recoverERC20": [ - 4, - 4 - ], - "BaseFarm.updateFarmStartTime": [ - 5, - 5 - ], - "Demeter_UniV3Farm_v2._getLiquidity": [ - 3, - 3 - ], - "Demeter_UniV3Farm_v2._validateTickRange": [ - 1, - 1 - ], - "Demeter_UniV3Farm_v2.claimUniswapFee": [ - 4, - 4 - ], - "Demeter_UniV3Farm_v2.onERC721Received": [ - 4, - 4 - ], - "Ownable._checkOwner": [ - 1, - 1 - ], - "Ownable.transferOwnership": [ - 0, - 2 - ], - "PoolAddress.computeAddress": [ - 2, - 2 - ], - "PositionValue._getFeeGrowthInside": [ - 2, - 6 - ] - }, - "totals": { - "branches": [ - 58, - 60, - 65 - ], - "statements": [ - 144, - 150 - ] - } - }, - "FarmFactory": { - "branches": { - "FarmFactory._isNonZeroAddr": [ - 1, - 0, - 1 - ], - "FarmFactory.registerFarm": [ - 0, - 0, - 1 - ], - "FarmFactory.registerFarmDeployer": [ - 1, - 0, - 1 - ], - "FarmFactory.removeDeployer": [ - 0, - 0, - 1 - ], - "FarmFactory.updateFeeParams": [ - 1, - 0, - 1 - ], - "OwnableUpgradeable.__Ownable_init_unchained": [ - 0, - 0, - 1 - ], - "OwnableUpgradeable._checkOwner": [ - 1, - 0, - 1 - ], - "OwnableUpgradeable.transferOwnership": [ - 0, - 0, - 1 - ] - }, - "statements": { - "FarmFactory._isNonZeroAddr": [ - 1, - 1 - ], - "FarmFactory.registerFarm": [ - 0, - 4 - ], - "FarmFactory.registerFarmDeployer": [ - 5, - 5 - ], - "FarmFactory.removeDeployer": [ - 0, - 5 - ], - "FarmFactory.updateFeeParams": [ - 7, - 7 - ], - "OwnableUpgradeable._checkOwner": [ - 1, - 1 - ], - "OwnableUpgradeable.transferOwnership": [ - 0, - 2 - ] - }, - "totals": { - "branches": [ - 4, - 0, - 8 - ], - "statements": [ - 14, - 25 - ] - } - }, - "TransparentUpgradeableProxy": { - "branches": { - "ERC1967Upgrade._setAdmin": [ - 0, - 0, - 1 - ], - "ERC1967Upgrade._upgradeToAndCall": [ - 0, - 0, - 2 - ], - "TransparentUpgradeableProxy._beforeFallback": [ - 1, - 0, - 1 - ], - "TransparentUpgradeableProxy.admin": [ - 0, - 0, - 1 - ] - }, - "statements": { - "ERC1967Upgrade._setAdmin": [ - 0, - 2 - ], - "ERC1967Upgrade._upgradeToAndCall": [ - 0, - 2 - ], - "TransparentUpgradeableProxy._beforeFallback": [ - 1, - 1 - ], - "TransparentUpgradeableProxy.admin": [ - 0, - 1 - ] - }, - "totals": { - "branches": [ - 1, - 0, - 5 - ], - "statements": [ - 1, - 6 - ] - } - }, - "UniswapV3Test": { - "branches": { - "Address.functionCallWithValue": [ - 1, - 0, - 1 - ], - "Address.verifyCallResult": [ - 0, - 1, - 2 - ], - "SafeERC20._callOptionalReturn": [ - 1, - 1, - 2 - ] - }, - "statements": { - "Address.functionCallWithValue": [ - 3, - 3 - ], - "Address.verifyCallResult": [ - 1, - 2 - ], - "SafeERC20._callOptionalReturn": [ - 1, - 1 - ] - }, - "totals": { - "branches": [ - 2, - 2, - 5 - ], - "statements": [ - 5, - 6 - ] - } - } - }, - "highlights": { - "branches": { - "Demeter_UniV3Farm_v2": { - "12": [], - "14": [], - "16": [], - "17": [], - "18": [], - "19": [], - "20": [], - "21": [], - "22": [], - "23": [], - "25": [ - [ - 32407, - 32450, - "green", - "" - ], - [ - 22743, - 22765, - "green", - "" - ], - [ - 16979, - 16987, - "green", - "" - ], - [ - 17053, - 17067, - "green", - "" - ], - [ - 17639, - 17646, - "green", - "" - ], - [ - 34605, - 34614, - "green", - "" - ], - [ - 34748, - 34757, - "green", - "" - ], - [ - 33245, - 33276, - "green", - "" - ], - [ - 33598, - 33620, - "green", - "" - ], - [ - 33860, - 33879, - "green", - "" - ], - [ - 18340, - 18370, - "green", - "" - ], - [ - 35143, - 35162, - "green", - "" - ], - [ - 34933, - 34979, - "green", - "" - ], - [ - 34342, - 34380, - "green", - "" - ], - [ - 34400, - 34438, - "green", - "" - ], - [ - 34141, - 34179, - "green", - "" - ], - [ - 23868, - 23890, - "green", - "" - ], - [ - 23959, - 23978, - "green", - "" - ], - [ - 24576, - 24610, - "green", - "" - ], - [ - 30379, - 30412, - "green", - "" - ], - [ - 30850, - 30869, - "green", - "" - ], - [ - 31121, - 31154, - "green", - "" - ], - [ - 25479, - 25507, - "green", - "" - ], - [ - 26792, - 26820, - "green", - "" - ], - [ - 27200, - 27235, - "green", - "" - ], - [ - 28387, - 28423, - "green", - "" - ], - [ - 28554, - 28562, - "green", - "" - ], - [ - 28896, - 28919, - "green", - "" - ], - [ - 19230, - 19238, - "green", - "" - ], - [ - 19279, - 19311, - "green", - "" - ], - [ - 19387, - 19414, - "green", - "" - ], - [ - 19517, - 19559, - "green", - "" - ], - [ - 20035, - 20081, - "green", - "" - ], - [ - 12022, - 12058, - "yellow", - "" - ], - [ - 12359, - 12391, - "yellow", - "" - ], - [ - 12396, - 12404, - "green", - "" - ], - [ - 8212, - 8233, - "green", - "" - ], - [ - 15869, - 15901, - "green", - "" - ], - [ - 16119, - 16155, - "green", - "" - ], - [ - 16359, - 16396, - "yellow", - "" - ], - [ - 16659, - 16679, - "green", - "" - ], - [ - 15502, - 15530, - "green", - "" - ], - [ - 14268, - 14316, - "green", - "" - ], - [ - 9268, - 9311, - "green", - "" - ], - [ - 9449, - 9460, - "green", - "" - ], - [ - 7796, - 7827, - "green", - "" - ], - [ - 7870, - 7902, - "green", - "" - ] - ], - "33": [ - [ - 7102, - 7194, - "green", - "" - ], - [ - 7334, - 7363, - "green", - "" - ], - [ - 7367, - 7396, - "yellow", - "" - ], - [ - 7692, - 7715, - "green", - "" - ], - [ - 7735, - 7756, - "green", - "" - ], - [ - 7776, - 7801, - "green", - "" - ], - [ - 7821, - 7841, - "green", - "" - ], - [ - 7861, - 7886, - "green", - "" - ], - [ - 5531, - 5539, - "green", - "" - ], - [ - 5543, - 5551, - "orange", - "" - ], - [ - 3696, - 3714, - "green", - "" - ], - [ - 3770, - 3786, - "green", - "" - ] - ], - "34": [], - "35": [ - [ - 1455, - 1478, - "yellow", - "" - ] - ], - "36": [ - [ - 4394, - 4417, - "orange", - "" - ], - [ - 4688, - 4711, - "yellow", - "" - ] - ], - "4": [ - [ - 1422, - 1445, - "green", - "" - ], - [ - 2169, - 2191, - "red", - "" - ] - ], - "6": [], - "7": [ - [ - 2325, - 2344, - "red", - "" - ] - ] - }, - "FarmFactory": { - "0": [ - [ - 1662, - 1685, - "yellow", - "" - ], - [ - 2409, - 2431, - "red", - "" - ] - ], - "1": [ - [ - 4910, - 4923, - "red", - "" - ] - ], - "27": [ - [ - 4896, - 4915, - "yellow", - "" - ], - [ - 2245, - 2275, - "red", - "" - ], - [ - 2669, - 2699, - "yellow", - "" - ], - [ - 3122, - 3139, - "red", - "" - ], - [ - 4594, - 4605, - "yellow", - "" - ] - ], - "3": [] - }, - "TransparentUpgradeableProxy": { - "39": [ - [ - 5011, - 5036, - "yellow", - "" - ], - [ - 1803, - 1828, - "red", - "" - ] - ], - "7": [], - "8": [ - [ - 4375, - 4397, - "red", - "" - ], - [ - 2364, - 2379, - "red", - "" - ], - [ - 2383, - 2392, - "red", - "" - ] - ], - "9": [] - }, - "UniswapV3Test": { - "13": [], - "14": [], - "15": [ - [ - 4275, - 4296, - "yellow", - "" - ], - [ - 4359, - 4389, - "yellow", - "" - ] - ], - "16": [], - "18": [ - [ - 5145, - 5175, - "yellow", - "" - ], - [ - 7735, - 7742, - "yellow", - "" - ], - [ - 7876, - 7897, - "red", - "" - ] - ], - "21": [], - "23": [], - "42": [], - "45": [], - "46": [] - } - }, - "statements": { - "Demeter_UniV3Farm_v2": { - "12": [], - "14": [ - [ - 712, - 729, - "green", - "" - ] - ], - "16": [], - "17": [], - "18": [], - "19": [], - "20": [], - "21": [], - "22": [], - "23": [], - "25": [ - [ - 32316, - 32338, - "green", - "" - ], - [ - 32348, - 32375, - "green", - "" - ], - [ - 32386, - 32502, - "green", - "" - ], - [ - 32513, - 32666, - "green", - "" - ], - [ - 32717, - 32742, - "green", - "" - ], - [ - 32753, - 32795, - "green", - "" - ], - [ - 20969, - 20992, - "green", - "" - ], - [ - 21822, - 21885, - "green", - "" - ], - [ - 21903, - 21957, - "green", - "" - ], - [ - 21975, - 22010, - "green", - "" - ], - [ - 22154, - 22201, - "green", - "" - ], - [ - 22251, - 22257, - "green", - "" - ], - [ - 22304, - 22540, - "green", - "" - ], - [ - 22582, - 22588, - "green", - "" - ], - [ - 22785, - 22888, - "green", - "" - ], - [ - 22973, - 23032, - "green", - "" - ], - [ - 23050, - 23177, - "green", - "" - ], - [ - 23233, - 23239, - "green", - "" - ], - [ - 16906, - 16922, - "green", - "" - ], - [ - 16971, - 17024, - "green", - "" - ], - [ - 17045, - 17096, - "green", - "" - ], - [ - 17141, - 17164, - "green", - "" - ], - [ - 17566, - 17624, - "green", - "" - ], - [ - 17728, - 17771, - "green", - "" - ], - [ - 17785, - 17843, - "green", - "" - ], - [ - 17923, - 17956, - "green", - "" - ], - [ - 17967, - 18019, - "green", - "" - ], - [ - 34597, - 34630, - "green", - "" - ], - [ - 34740, - 34773, - "green", - "" - ], - [ - 33292, - 33300, - "green", - "" - ], - [ - 33636, - 33667, - "green", - "" - ], - [ - 33895, - 33914, - "green", - "" - ], - [ - 33934, - 33951, - "green", - "" - ], - [ - 18098, - 18114, - "green", - "" - ], - [ - 18162, - 18198, - "green", - "" - ], - [ - 18332, - 18400, - "green", - "" - ], - [ - 18467, - 18571, - "green", - "" - ], - [ - 18581, - 18611, - "green", - "" - ], - [ - 18672, - 18706, - "green", - "" - ], - [ - 18780, - 18839, - "green", - "" - ], - [ - 18850, - 18972, - "green", - "" - ], - [ - 35135, - 35182, - "green", - "" - ], - [ - 34912, - 35026, - "green", - "" - ], - [ - 34321, - 34487, - "green", - "" - ], - [ - 34120, - 34227, - "green", - "" - ], - [ - 23906, - 23935, - "green", - "" - ], - [ - 23994, - 24055, - "green", - "" - ], - [ - 24069, - 24130, - "green", - "" - ], - [ - 24555, - 24663, - "green", - "" - ], - [ - 24830, - 24890, - "green", - "" - ], - [ - 24904, - 24965, - "green", - "" - ], - [ - 25007, - 25014, - "green", - "" - ], - [ - 25048, - 25114, - "green", - "" - ], - [ - 30371, - 30439, - "green", - "" - ], - [ - 30449, - 30479, - "green", - "" - ], - [ - 30530, - 30565, - "green", - "" - ], - [ - 30575, - 30605, - "green", - "" - ], - [ - 30615, - 30631, - "green", - "" - ], - [ - 30641, - 30657, - "green", - "" - ], - [ - 30885, - 30924, - "green", - "" - ], - [ - 30938, - 30970, - "green", - "" - ], - [ - 30984, - 30996, - "green", - "" - ], - [ - 31113, - 31178, - "green", - "" - ], - [ - 31507, - 31536, - "green", - "" - ], - [ - 31578, - 31581, - "green", - "" - ], - [ - 31671, - 31709, - "green", - "" - ], - [ - 31810, - 31929, - "green", - "" - ], - [ - 31971, - 31977, - "green", - "" - ], - [ - 25471, - 25527, - "green", - "" - ], - [ - 25627, - 25853, - "green", - "" - ], - [ - 26021, - 26169, - "green", - "" - ], - [ - 26211, - 26217, - "green", - "" - ], - [ - 26301, - 26350, - "green", - "" - ], - [ - 26784, - 26840, - "green", - "" - ], - [ - 27446, - 27505, - "green", - "" - ], - [ - 27563, - 27569, - "green", - "" - ], - [ - 27685, - 27729, - "green", - "" - ], - [ - 27747, - 27764, - "green", - "" - ], - [ - 27844, - 27904, - "green", - "" - ], - [ - 27923, - 28140, - "green", - "" - ], - [ - 28159, - 28164, - "green", - "" - ], - [ - 28220, - 28226, - "green", - "" - ], - [ - 29298, - 29388, - "green", - "" - ], - [ - 29418, - 29555, - "green", - "" - ], - [ - 29630, - 29636, - "green", - "" - ], - [ - 29736, - 29761, - "green", - "" - ], - [ - 29819, - 29826, - "green", - "" - ], - [ - 29894, - 29930, - "green", - "" - ], - [ - 19254, - 19369, - "green", - "" - ], - [ - 19488, - 19623, - "green", - "" - ], - [ - 19706, - 19741, - "green", - "" - ], - [ - 19960, - 20020, - "green", - "" - ], - [ - 20176, - 20236, - "green", - "" - ], - [ - 20299, - 20403, - "green", - "" - ], - [ - 20413, - 20437, - "green", - "" - ], - [ - 20448, - 20633, - "green", - "" - ], - [ - 6640, - 6656, - "green", - "" - ], - [ - 6666, - 6779, - "green", - "" - ], - [ - 6789, - 6812, - "green", - "" - ], - [ - 6822, - 6892, - "green", - "" - ], - [ - 6902, - 6938, - "green", - "" - ], - [ - 6222, - 6238, - "green", - "" - ], - [ - 6286, - 6322, - "green", - "" - ], - [ - 6332, - 6366, - "green", - "" - ], - [ - 5935, - 5951, - "green", - "" - ], - [ - 5961, - 5998, - "red", - "" - ], - [ - 6008, - 6043, - "red", - "" - ], - [ - 8557, - 8580, - "green", - "" - ], - [ - 8590, - 8605, - "green", - "" - ], - [ - 8615, - 8630, - "green", - "" - ], - [ - 8746, - 8804, - "green", - "" - ], - [ - 8818, - 8933, - "green", - "" - ], - [ - 8975, - 8981, - "green", - "" - ], - [ - 9015, - 9032, - "green", - "" - ], - [ - 11606, - 11643, - "green", - "" - ], - [ - 11901, - 11936, - "green", - "" - ], - [ - 12074, - 12117, - "green", - "" - ], - [ - 12573, - 12712, - "green", - "" - ], - [ - 12748, - 12938, - "green", - "" - ], - [ - 12988, - 12994, - "green", - "" - ], - [ - 13068, - 13074, - "green", - "" - ], - [ - 13108, - 13122, - "green", - "" - ], - [ - 8178, - 8194, - "green", - "" - ], - [ - 8204, - 8268, - "green", - "" - ], - [ - 8278, - 8301, - "green", - "" - ], - [ - 8311, - 8331, - "green", - "" - ], - [ - 8341, - 8366, - "green", - "" - ], - [ - 13637, - 13674, - "green", - "" - ], - [ - 13316, - 13348, - "green", - "" - ], - [ - 13897, - 13934, - "green", - "" - ], - [ - 15861, - 15923, - "green", - "" - ], - [ - 16420, - 16528, - "green", - "" - ], - [ - 16596, - 16603, - "green", - "" - ], - [ - 16695, - 16703, - "green", - "" - ], - [ - 16723, - 16751, - "green", - "" - ], - [ - 15494, - 15561, - "green", - "" - ], - [ - 15571, - 15598, - "green", - "" - ], - [ - 14937, - 14988, - "green", - "" - ], - [ - 15030, - 15037, - "green", - "" - ], - [ - 15071, - 15083, - "green", - "" - ], - [ - 15260, - 15279, - "red", - "" - ], - [ - 14247, - 14369, - "green", - "" - ], - [ - 14379, - 14426, - "green", - "" - ], - [ - 9247, - 9363, - "green", - "" - ], - [ - 9441, - 9488, - "green", - "" - ], - [ - 9499, - 9544, - "green", - "" - ], - [ - 9554, - 9590, - "green", - "" - ], - [ - 10034, - 10060, - "green", - "" - ], - [ - 10070, - 10093, - "green", - "" - ], - [ - 10103, - 10142, - "green", - "" - ], - [ - 10464, - 10480, - "green", - "" - ], - [ - 10490, - 10516, - "green", - "" - ], - [ - 10526, - 10549, - "green", - "" - ], - [ - 10559, - 10601, - "green", - "" - ], - [ - 7237, - 7253, - "green", - "" - ], - [ - 7263, - 7323, - "green", - "" - ], - [ - 7333, - 7375, - "green", - "" - ], - [ - 7385, - 7447, - "green", - "" - ], - [ - 7457, - 7492, - "green", - "" - ], - [ - 7788, - 7852, - "green", - "" - ], - [ - 7862, - 7917, - "green", - "" - ], - [ - 7927, - 7956, - "green", - "" - ], - [ - 7966, - 8000, - "green", - "" - ], - [ - 8011, - 8051, - "green", - "" - ], - [ - 10975, - 10991, - "green", - "" - ], - [ - 11001, - 11027, - "green", - "" - ], - [ - 11037, - 11067, - "green", - "" - ], - [ - 11077, - 11126, - "red", - "" - ], - [ - 11136, - 11199, - "red", - "" - ] - ], - "33": [ - [ - 7081, - 7240, - "green", - "" - ], - [ - 7313, - 7442, - "green", - "" - ], - [ - 7453, - 7478, - "green", - "" - ], - [ - 7671, - 7930, - "green", - "" - ], - [ - 5195, - 5211, - "green", - "" - ], - [ - 5259, - 5295, - "green", - "" - ], - [ - 5523, - 5571, - "green", - "" - ], - [ - 5861, - 5932, - "green", - "" - ], - [ - 6261, - 6284, - "green", - "" - ], - [ - 6294, - 6342, - "green", - "" - ], - [ - 2649, - 2825, - "green", - "" - ], - [ - 2835, - 2900, - "green", - "" - ], - [ - 2910, - 3032, - "green", - "" - ], - [ - 3042, - 3094, - "green", - "" - ], - [ - 3104, - 3156, - "green", - "" - ], - [ - 3167, - 3225, - "green", - "" - ], - [ - 4340, - 4369, - "green", - "" - ], - [ - 3688, - 3752, - "green", - "" - ], - [ - 3762, - 3816, - "green", - "" - ], - [ - 3984, - 4028, - "green", - "" - ], - [ - 4038, - 4075, - "green", - "" - ], - [ - 4616, - 4652, - "green", - "" - ], - [ - 4731, - 4777, - "green", - "" - ], - [ - 4833, - 4952, - "green", - "" - ] - ], - "34": [], - "35": [ - [ - 1447, - 1479, - "green", - "" - ], - [ - 1489, - 1981, - "green", - "" - ] - ], - "36": [ - [ - 3227, - 3439, - "green", - "" - ], - [ - 3450, - 3662, - "green", - "" - ], - [ - 4433, - 4543, - "red", - "" - ], - [ - 4557, - 4667, - "red", - "" - ], - [ - 4871, - 5020, - "green", - "" - ], - [ - 5034, - 5183, - "green", - "" - ], - [ - 5214, - 5324, - "red", - "" - ], - [ - 5338, - 5448, - "red", - "" - ], - [ - 1793, - 2407, - "green", - "" - ] - ], - "4": [ - [ - 1414, - 1482, - "green", - "" - ], - [ - 2541, - 2558, - "green", - "" - ], - [ - 2568, - 2613, - "green", - "" - ], - [ - 1266, - 1279, - "green", - "" - ], - [ - 1895, - 1925, - "red", - "" - ], - [ - 2161, - 2234, - "red", - "" - ], - [ - 2244, - 2272, - "red", - "" - ] - ], - "6": [], - "7": [] - }, - "FarmFactory": { - "0": [ - [ - 1065, - 1091, - "green", - "" - ], - [ - 1176, - 1208, - "green", - "" - ], - [ - 1654, - 1722, - "green", - "" - ], - [ - 2781, - 2798, - "green", - "" - ], - [ - 2808, - 2853, - "green", - "" - ], - [ - 1506, - 1519, - "green", - "" - ], - [ - 2135, - 2165, - "red", - "" - ], - [ - 2401, - 2474, - "red", - "" - ], - [ - 2484, - 2512, - "red", - "" - ] - ], - "1": [], - "27": [ - [ - 4888, - 4935, - "green", - "" - ], - [ - 3592, - 3611, - "red", - "" - ], - [ - 3812, - 3824, - "red", - "" - ], - [ - 4128, - 4169, - "red", - "" - ], - [ - 1821, - 1856, - "green", - "" - ], - [ - 1866, - 1918, - "green", - "" - ], - [ - 2237, - 2303, - "red", - "" - ], - [ - 2313, - 2330, - "red", - "" - ], - [ - 2340, - 2368, - "red", - "" - ], - [ - 2378, - 2426, - "red", - "" - ], - [ - 2626, - 2651, - "green", - "" - ], - [ - 2661, - 2731, - "green", - "" - ], - [ - 2741, - 2769, - "green", - "" - ], - [ - 2779, - 2815, - "green", - "" - ], - [ - 2825, - 2863, - "green", - "" - ], - [ - 3114, - 3163, - "red", - "" - ], - [ - 3219, - 3254, - "red", - "" - ], - [ - 3264, - 3313, - "red", - "" - ], - [ - 3323, - 3341, - "red", - "" - ], - [ - 3352, - 3386, - "red", - "" - ], - [ - 4516, - 4541, - "green", - "" - ], - [ - 4551, - 4576, - "green", - "" - ], - [ - 4586, - 4626, - "green", - "" - ], - [ - 4636, - 4659, - "green", - "" - ], - [ - 4669, - 4689, - "green", - "" - ], - [ - 4699, - 4718, - "green", - "" - ], - [ - 4728, - 4780, - "green", - "" - ] - ], - "3": [ - [ - 922, - 939, - "green", - "" - ] - ] - }, - "TransparentUpgradeableProxy": { - "39": [ - [ - 4990, - 5128, - "green", - "" - ], - [ - 2939, - 2959, - "red", - "" - ], - [ - 3865, - 3905, - "red", - "" - ], - [ - 3915, - 3937, - "red", - "" - ], - [ - 3541, - 3579, - "red", - "" - ], - [ - 4185, - 4214, - "red", - "" - ], - [ - 4750, - 4799, - "red", - "" - ] - ], - "7": [ - [ - 1239, - 1281, - "green", - "" - ] - ], - "8": [ - [ - 4683, - 4723, - "red", - "" - ], - [ - 4733, - 4752, - "red", - "" - ], - [ - 4171, - 4223, - "green", - "" - ], - [ - 1373, - 1434, - "green", - "" - ], - [ - 4367, - 4440, - "red", - "" - ], - [ - 4450, - 4506, - "red", - "" - ], - [ - 1605, - 1700, - "red", - "" - ], - [ - 1710, - 1784, - "red", - "" - ], - [ - 1963, - 2000, - "red", - "" - ], - [ - 2010, - 2042, - "red", - "" - ], - [ - 2321, - 2350, - "red", - "" - ], - [ - 2408, - 2461, - "red", - "" - ] - ], - "9": [ - [ - 2675, - 2686, - "green", - "" - ], - [ - 2898, - 2909, - "red", - "" - ], - [ - 2370, - 2387, - "green", - "" - ], - [ - 2397, - 2425, - "green", - "" - ] - ] - }, - "UniswapV3Test": { - "13": [], - "14": [], - "15": [ - [ - 4351, - 4436, - "green", - "" - ], - [ - 1808, - 1971, - "green", - "" - ], - [ - 1981, - 2071, - "green", - "" - ] - ], - "16": [], - "18": [ - [ - 4018, - 4077, - "green", - "" - ], - [ - 5137, - 5218, - "green", - "" - ], - [ - 5228, - 5288, - "green", - "" - ], - [ - 5382, - 5440, - "green", - "" - ], - [ - 1458, - 1488, - "green", - "" - ], - [ - 7758, - 7775, - "green", - "" - ], - [ - 8252, - 8272, - "red", - "" - ] - ], - "21": [], - "23": [], - "42": [], - "45": [], - "46": [ - [ - 1238, - 1299, - "green", - "" - ], - [ - 1719, - 1766, - "green", - "" - ], - [ - 1776, - 1835, - "green", - "" - ] - ] - } - } - }, - "sha1": {} -} \ No newline at end of file diff --git a/test/BaseFarm.t.sol b/test/BaseFarm.t.sol new file mode 100644 index 00000000..d9c6c679 --- /dev/null +++ b/test/BaseFarm.t.sol @@ -0,0 +1,870 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.16; + +import {BaseFarm, RewardTokenData} from "../contracts/BaseFarm.sol"; +import {BaseE20Farm} from "../contracts/e20-farms/BaseE20Farm.sol"; +import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import {TestNetworkConfig} from "./utils/TestNetworkConfig.t.sol"; +import {FarmFactory} from "../contracts/FarmFactory.sol"; +import {BaseFarmDeployer} from "../contracts/BaseFarmDeployer.sol"; + +abstract contract BaseFarmTest is TestNetworkConfig { + struct Deposit { + uint256 liquidity; + uint256 tokenId; + uint256 startTime; + uint256 expiryDate; + uint256 cooldownPeriod; + uint256[] totalRewardsClaimed; + } + + struct RewardData { + address tknManager; + uint8 id; + uint256 accRewardBal; + } + + struct RewardFund { + uint256 totalLiquidity; + uint256[] rewardsPerSec; + uint256[] accRewardPerShare; + } + + uint256 public constant MIN_BALANCE = 1000000000000000000; + uint256 public constant NO_LOCKUP_REWARD_RATE = 1e18; + uint256 public constant LOCKUP_REWARD_RATE = 2e18; + uint256 public constant COOLDOWN_PERIOD = 21; + bytes32 public constant NO_LOCK_DATA = bytes32(uint256(0)); + bytes32 public constant LOCK_DATA = bytes32(uint256(1)); + address internal lockupFarm; + address internal nonLockupFarm; + address internal invalidRewardToken; + address[] public rwdTokens; + address user; + address newTokenManager; + + event Deposited(address indexed account, bool locked, uint256 tokenId, uint256 liquidity); + event CooldownInitiated(address indexed account, uint256 indexed tokenId, uint256 expiryDate); + event DepositWithdrawn( + address indexed account, uint256 tokenId, uint256 startTime, uint256 liquidity, uint256[] totalRewardsClaimed + ); + event RewardsClaimed(address indexed account, uint256[][] rewardsForEachSubs); + event PoolUnsubscribed(address indexed account, uint8 fundId, uint256 depositId, uint256[] totalRewardsClaimed); + event FarmStartTimeUpdated(uint256 newStartTime); + event CooldownPeriodUpdated(uint256 oldCooldownPeriod, uint256 newCooldownPeriod); + event RewardRateUpdated(address indexed rwdToken, uint256[] newRewardRate); + event RewardAdded(address rwdToken, uint256 amount); + event FarmClosed(); + event RecoveredERC20(address token, uint256 amount); + event FundsRecovered(address indexed account, address rwdToken, uint256 amount); + event TokenManagerUpdated(address rwdToken, address oldTokenManager, address newTokenManager); + event RewardTokenAdded(address rwdToken, address rwdTokenManager); + event FarmPaused(bool paused); + + modifier setup() { + _; + } + + modifier depositSetup(address farm, bool lockup) { + addRewards(farm); + setRewardRates(farm); + deposit(farm, lockup, 1e3); + _; + } + + function setUp() public virtual override { + super.setUp(); + user = actors[0]; + newTokenManager = actors[3]; + } + + function addRewards(address farm) public useKnownActor(owner) { + address[] memory farmRewardTokens = getRewardTokens(farm); + uint256 rwdAmt; + for (uint8 i; i < farmRewardTokens.length; ++i) { + rwdAmt = 1e7 * 10 ** ERC20(farmRewardTokens[i]).decimals(); + deal(address(farmRewardTokens[i]), owner, rwdAmt); + ERC20(farmRewardTokens[i]).approve(farm, rwdAmt); + BaseFarm(farm).addRewards(farmRewardTokens[i], rwdAmt); + } + } + + function setRewardRates(address farm) public useKnownActor(owner) { + if (BaseFarm(farm).cooldownPeriod() != 0) { + uint256[] memory rwdRate = new uint256[](2); + address[] memory farmRewardTokens = getRewardTokens(farm); + for (uint8 i; i < farmRewardTokens.length; ++i) { + rwdRate[0] = 1 * 10 ** ERC20(farmRewardTokens[i]).decimals() / 100; //0.01 + rwdRate[1] = 2 * 10 ** ERC20(farmRewardTokens[i]).decimals() / 100; //0.02 + if (farmRewardTokens[i] == SPA) { + vm.startPrank(SPA_REWARD_MANAGER); + } else { + vm.startPrank(owner); + } + BaseFarm(farm).setRewardRate(farmRewardTokens[i], rwdRate); + } + } else { + uint256[] memory rwdRate = new uint256[](1); + address[] memory farmRewardTokens = getRewardTokens(farm); + for (uint8 i; i < farmRewardTokens.length; ++i) { + rwdRate[0] = 1 * 10 ** ERC20(farmRewardTokens[i]).decimals() / 100; //0.01 + if (farmRewardTokens[i] == SPA) { + vm.startPrank(SPA_REWARD_MANAGER); + } else { + vm.startPrank(owner); + } + BaseFarm(farm).setRewardRate(farmRewardTokens[i], rwdRate); + } + } + } + + function getRewardTokens(address farm) public view returns (address[] memory) { + address[] memory farmRewardTokens = new address[](rwdTokens.length + 1); + for (uint8 i = 0; i < rwdTokens.length + 1; ++i) { + farmRewardTokens[i] = BaseFarm(farm).rewardTokens(i); + } + return farmRewardTokens; + } + + function createFarm(uint256 startTime, bool lockup) public virtual returns (address); + + function deposit(address farm, bool locked, uint256 amt) public virtual; + + function deposit(address farm, bool locked, uint256 amt, bytes memory revertMsg) public virtual; + + function getPoolAddress() public virtual returns (address); +} + +abstract contract DepositTest is BaseFarmTest { + function test_deposit_noLockupFarm_revertsWhen_NoLiquidityInPosition() public { + deposit(nonLockupFarm, false, 0, abi.encodeWithSelector(BaseFarm.NoLiquidityInPosition.selector)); + } + + function test_deposit_noLockupFarm_revertsWhen_LockupFunctionalityIsDisabled() public { + deposit(nonLockupFarm, true, 1e2, abi.encodeWithSelector(BaseFarm.LockupFunctionalityIsDisabled.selector)); + } + + function test_deposit_revertsWhen_FarmIsPaused() public { + vm.startPrank(BaseFarm(nonLockupFarm).owner()); + BaseFarm(nonLockupFarm).farmPauseSwitch(true); + deposit(nonLockupFarm, false, 1e2, abi.encodeWithSelector(BaseFarm.FarmIsPaused.selector)); + } + + function test_deposit_noLockupFarm_deposit() public { + deposit(nonLockupFarm, false, 1e2); + } + + function test_deposit_lockupFarm() public { + deposit(lockupFarm, true, 1e2); + } +} + +abstract contract ClaimRewardsTest is BaseFarmTest { + function test_claimRewards_lockupFarm_closed() public setup depositSetup(lockupFarm, true) useKnownActor(user) { + skip(86400 * 2); + BaseFarm(lockupFarm).initiateCooldown(0); + vm.startPrank(owner); + skip(86400 * 2); + BaseFarm(lockupFarm).farmPauseSwitch(true); + vm.startPrank(user); + skip(86400 * 2); + uint256[][] memory rewardsForEachSubs = new uint256[][](1); + rewardsForEachSubs[0] = BaseFarm(lockupFarm).computeRewards(currentActor, 0); + vm.startPrank(owner); + BaseFarm(lockupFarm).closeFarm(); + vm.expectRevert(abi.encodeWithSelector(BaseFarm.FarmIsClosed.selector)); + BaseFarm(lockupFarm).claimRewards(0); + } + + function test_claimRewards_lockupFarm_nonValidDeposit() + public + setup + depositSetup(lockupFarm, true) + useKnownActor(user) + { + skip(86400 * 2); + BaseFarm(lockupFarm).initiateCooldown(0); + vm.startPrank(owner); + skip(86400 * 2); + BaseFarm(lockupFarm).farmPauseSwitch(true); + vm.startPrank(user); + skip(86400 * 2); + uint256[][] memory rewardsForEachSubs = new uint256[][](1); + rewardsForEachSubs[0] = BaseFarm(lockupFarm).computeRewards(currentActor, 0); + uint256 deposits = BaseFarm(lockupFarm).getNumDeposits(currentActor); + vm.expectRevert(abi.encodeWithSelector(BaseFarm.DepositDoesNotExist.selector)); + BaseFarm(lockupFarm).claimRewards(deposits + 1); + } + + function test_claimRewards_nonLockupFarm() public setup depositSetup(nonLockupFarm, false) useKnownActor(user) { + skip(86400 * 15); + + uint256[][] memory rewardsForEachSubs = new uint256[][](1); + rewardsForEachSubs[0] = BaseFarm(nonLockupFarm).computeRewards(currentActor, 0); + + vm.expectEmit(true, true, true, true); + emit RewardsClaimed(currentActor, rewardsForEachSubs); + BaseFarm(nonLockupFarm).claimRewards(0); + } +} + +abstract contract WithdrawTest is BaseFarmTest { + function test_withdraw_lockupFarm_RevertsWhen_PleaseInitiateCooldown() + public + setup + depositSetup(lockupFarm, true) + useKnownActor(user) + { + vm.expectRevert(abi.encodeWithSelector(BaseFarm.PleaseInitiateCooldown.selector)); + BaseFarm(lockupFarm).withdraw(0); + } + + function test_withdraw_lockupFarm_RevertsWhen_DepositIsInCooldown() + public + setup + depositSetup(lockupFarm, true) + useKnownActor(user) + { + BaseFarm(lockupFarm).initiateCooldown(0); + skip((COOLDOWN_PERIOD * 86400) - 100); //100 seconds before the end of CoolDown Period + vm.expectRevert(abi.encodeWithSelector(BaseFarm.DepositIsInCooldown.selector)); + BaseFarm(lockupFarm).withdraw(0); + } + + function test_withdraw_lockupFarm() public depositSetup(lockupFarm, true) useKnownActor(user) { + uint256 time = 2 days; + uint256 cooldownTime = (COOLDOWN_PERIOD * 86400) + 100; + uint256[][] memory rewardsForEachSubs = new uint256[][](1); + BaseFarm(lockupFarm).initiateCooldown(0); + skip(cooldownTime); //100 seconds after the end of CoolDown Period + BaseFarm(lockupFarm).getRewardBalance(SPA); + BaseFarm.Deposit memory userDeposit = BaseFarm(lockupFarm).getDeposit(currentActor, 0); + rewardsForEachSubs[0] = BaseFarm(lockupFarm).computeRewards(currentActor, 0); + vm.expectEmit(true, false, false, true); + emit DepositWithdrawn( + currentActor, userDeposit.tokenId, block.timestamp - cooldownTime, 1e21, rewardsForEachSubs[0] + ); + BaseFarm(lockupFarm).withdraw(0); + skip(time); + BaseFarm(lockupFarm).getRewardBalance(SPA); + } + + function test_withdraw_lockupFarm_paused() public setup depositSetup(lockupFarm, true) useKnownActor(user) { + uint256 time = 3 days; + BaseFarm(lockupFarm).getRewardBalance(SPA); + vm.startPrank(owner); + skip(time); + BaseFarm(lockupFarm).farmPauseSwitch(true); + vm.startPrank(user); + uint256[][] memory rewardsForEachSubs = new uint256[][](1); + BaseFarm.Deposit memory userDeposit = BaseFarm(lockupFarm).getDeposit(currentActor, 0); + rewardsForEachSubs[0] = BaseFarm(lockupFarm).computeRewards(currentActor, 0); + vm.expectEmit(true, false, false, true); + emit DepositWithdrawn(currentActor, userDeposit.tokenId, block.timestamp - time, 1e21, rewardsForEachSubs[0]); + BaseFarm(lockupFarm).withdraw(0); + } + + function test_withdraw_nonLockupFarm() public setup depositSetup(nonLockupFarm, false) useKnownActor(user) { + uint256 time = COOLDOWN_PERIOD * 86400 + 100; + skip(time); + uint256[][] memory rewardsForEachSubs = new uint256[][](1); + BaseFarm.Deposit memory userDeposit = BaseFarm(nonLockupFarm).getDeposit(currentActor, 0); + rewardsForEachSubs[0] = BaseFarm(nonLockupFarm).computeRewards(currentActor, 0); + vm.expectEmit(true, false, false, true); + emit DepositWithdrawn(currentActor, userDeposit.tokenId, block.timestamp - time, 1e21, rewardsForEachSubs[0]); + BaseFarm(nonLockupFarm).withdraw(0); + } +} + +abstract contract GetRewardFundInfoTest is BaseFarmTest { + function test_getRewardFundInfo_LockupFarm_revertsWhen_RewardFundDoesNotExist() public setup useKnownActor(user) { + vm.expectRevert(abi.encodeWithSelector(BaseFarm.RewardFundDoesNotExist.selector)); + BaseFarm(lockupFarm).getRewardFundInfo(2); + } + + function test_getRewardFundInfo_LockupFarm() public setup useKnownActor(user) { + BaseFarm(lockupFarm).getRewardFundInfo(0); + } +} + +abstract contract RecoverERC20Test is BaseFarmTest { + function test_recoverE20_LockupFarm_revertsWhen_CannotWithdrawRewardTokenOrFarmToken() + public + useKnownActor(owner) + { + vm.expectRevert(abi.encodeWithSelector(BaseE20Farm.CannotWithdrawRewardTokenOrFarmToken.selector)); + BaseFarm(lockupFarm).recoverERC20(USDCe); + } + + function test_recoverE20_LockupFarm_revertsWhen_CannotWithdrawZeroAmount() public useKnownActor(owner) { + vm.expectRevert(abi.encodeWithSelector(BaseFarm.CannotWithdrawZeroAmount.selector)); + BaseFarm(lockupFarm).recoverERC20(USDT); + } + + function testFuzz_recoverE20_LockupFarm_(uint256 amt) public useKnownActor(owner) { + amt = bound(amt, 1000 * 10 ** ERC20(USDT).decimals(), 10000 * 10 ** ERC20(USDT).decimals()); + deal(USDT, address(lockupFarm), 10e10); + vm.expectEmit(true, true, false, false); + emit RecoveredERC20(USDT, 10e10); + BaseFarm(lockupFarm).recoverERC20(USDT); + } +} + +abstract contract InitiateCooldownTest is BaseFarmTest { + function test_initiateCooldown_LockupFarm() public setup depositSetup(lockupFarm, true) useKnownActor(user) { + (, uint256 tokenId, uint256 startTime,,) = BaseFarm(lockupFarm).deposits(currentActor, 0); + skip(86400 * 7); + vm.expectEmit(true, true, false, true); + emit CooldownInitiated(currentActor, tokenId, startTime + ((COOLDOWN_PERIOD + 7) * 86400)); + BaseFarm(lockupFarm).initiateCooldown(0); + } + + function test_initiateCooldown_nonLockupFarm() + public + setup + depositSetup(nonLockupFarm, false) + useKnownActor(user) + { + skip(86400 * 7); + vm.expectRevert(abi.encodeWithSelector(BaseFarm.CannotInitiateCooldown.selector)); + BaseFarm(nonLockupFarm).initiateCooldown(0); + } +} + +abstract contract AddRewardsTest is BaseFarmTest { + function test_addRewards_nonLockupFarm_revertsWhen_InvalidRewardToken() public useKnownActor(owner) { + uint256 rwdAmt = 1 * 10 ** ERC20(invalidRewardToken).decimals(); + deal(address(invalidRewardToken), currentActor, rwdAmt); + ERC20(invalidRewardToken).approve(nonLockupFarm, rwdAmt); + vm.expectRevert(abi.encodeWithSelector(BaseFarm.InvalidRewardToken.selector)); + BaseFarm(nonLockupFarm).addRewards(invalidRewardToken, rwdAmt); + } + + function test_addRewards_lockupFarm_revertsWhen_ZeroAmount() public useKnownActor(owner) { + vm.expectRevert(abi.encodeWithSelector(BaseFarm.ZeroAmount.selector)); + BaseFarm(lockupFarm).addRewards(USDCe, 0); + } + + function testFuzz_addRewards_nonLockupFarm(uint256 rwdAmt) public useKnownActor(owner) { + address[] memory rewardTokens = getRewardTokens(nonLockupFarm); + for (uint8 i; i < rewardTokens.length; ++i) { + rwdAmt = bound( + rwdAmt, + 1000 * 10 ** ERC20(rewardTokens[i]).decimals(), + 1000000 * 10 ** ERC20(rewardTokens[i]).decimals() + ); + deal(address(rewardTokens[i]), currentActor, rwdAmt); + ERC20(rewardTokens[i]).approve(nonLockupFarm, rwdAmt); + vm.expectEmit(true, true, false, true); + emit RewardAdded(rewardTokens[i], rwdAmt); + BaseFarm(nonLockupFarm).addRewards(rewardTokens[i], rwdAmt); + assertEq(BaseFarm(nonLockupFarm).getRewardBalance(rewardTokens[i]), rwdAmt); + } + } + + function testFuzz_addRewards_lockupFarm(uint256 rwdAmt) public useKnownActor(owner) { + address[] memory rewardTokens = getRewardTokens(lockupFarm); + for (uint8 i; i < rewardTokens.length; ++i) { + uint8 decimals = ERC20(rewardTokens[i]).decimals(); + rwdAmt = bound(rwdAmt, 1000 * 10 ** decimals, 10000 * 10 ** decimals); + deal(address(rewardTokens[i]), currentActor, rwdAmt); + ERC20(rewardTokens[i]).approve(address(lockupFarm), rwdAmt); + vm.expectEmit(true, true, false, true); + emit RewardAdded(rewardTokens[i], rwdAmt); + BaseFarm(lockupFarm).addRewards(rewardTokens[i], rwdAmt); + assertEq(BaseFarm(lockupFarm).getRewardBalance(rewardTokens[i]), rwdAmt); + } + } +} + +abstract contract SetRewardRateTest is BaseFarmTest { + function testFuzz_setRewardRate_nonLockupFarm_revertsWhen_farmIsClosed(uint256 rwdRateNonLockup) + public + useKnownActor(owner) + { + uint256[] memory rwdRate = new uint256[](1); + rwdRate[0] = rwdRateNonLockup; + address[] memory rewardTokens = getRewardTokens(nonLockupFarm); + uint256[] memory oldRewardRate = new uint256[](1); + for (uint8 i; i < rewardTokens.length; ++i) { + oldRewardRate = BaseFarm(nonLockupFarm).getRewardRates(rewardTokens[i]); + rwdRateNonLockup = bound( + rwdRateNonLockup, + 1 * 10 ** ERC20(rewardTokens[i]).decimals(), + 2 * 10 ** ERC20(rewardTokens[i]).decimals() + ); + } + vm.startPrank(owner); + BaseFarm(nonLockupFarm).closeFarm(); + vm.expectRevert(abi.encodeWithSelector(BaseFarm.FarmIsClosed.selector)); + BaseFarm(nonLockupFarm).setRewardRate(rewardTokens[0], rwdRate); + } + + function testFuzz_setRewardRate_noLockupFarm_revertsWhen_InvalidRewardRatesLength(uint256 rwdRateNonLockup) + public + useKnownActor(owner) + { + uint256[] memory rwdRate = new uint256[](1); + rwdRate[0] = rwdRateNonLockup; + address[] memory rewardTokens = getRewardTokens(nonLockupFarm); + uint256[] memory oldRewardRate = new uint256[](1); + for (uint8 i; i < rewardTokens.length; ++i) { + oldRewardRate = BaseFarm(nonLockupFarm).getRewardRates(rewardTokens[i]); + rwdRateNonLockup = bound( + rwdRateNonLockup, + 1 * 10 ** ERC20(rewardTokens[i]).decimals(), + 2 * 10 ** ERC20(rewardTokens[i]).decimals() + ); + if (rewardTokens[i] == SPA) { + vm.startPrank(SPA_REWARD_MANAGER); + } else { + vm.startPrank(currentActor); + } + + vm.expectRevert(abi.encodeWithSelector(BaseFarm.InvalidRewardRatesLength.selector)); + + BaseFarm(lockupFarm).setRewardRate(rewardTokens[i], rwdRate); + } + } + + function testFuzz_setRewardRate_noLockupFarm(uint256 rwdRateNonLockup) public useKnownActor(owner) { + uint256[] memory rwdRate = new uint256[](1); + address[] memory rewardTokens = getRewardTokens(nonLockupFarm); + uint256[] memory oldRewardRate = new uint256[](1); + for (uint8 i; i < rewardTokens.length; ++i) { + oldRewardRate = BaseFarm(nonLockupFarm).getRewardRates(rewardTokens[i]); + rwdRateNonLockup = bound( + rwdRateNonLockup, + 1 * 10 ** ERC20(rewardTokens[i]).decimals(), + 2 * 10 ** ERC20(rewardTokens[i]).decimals() + ); + rwdRate[0] = rwdRateNonLockup; + if (rewardTokens[i] == SPA) { + vm.startPrank(SPA_REWARD_MANAGER); + } else { + vm.startPrank(currentActor); + } + + vm.expectEmit(false, false, false, true); + emit RewardRateUpdated(rewardTokens[i], rwdRate); + BaseFarm(nonLockupFarm).setRewardRate(rewardTokens[i], rwdRate); + + assertEq(BaseFarm(nonLockupFarm).getRewardRates(rewardTokens[i]), rwdRate); + } + } + + function testFuzz_setRewardRate_LockupFarm(uint256 rwdRateNonLockup, uint256 rwdRateLockup) + public + useKnownActor(owner) + { + uint256[] memory rwdRate = new uint256[](2); + address[] memory rewardTokens = getRewardTokens(lockupFarm); + uint256[] memory oldRewardRate = new uint256[](2); + for (uint8 i; i < rewardTokens.length; ++i) { + oldRewardRate = BaseFarm(nonLockupFarm).getRewardRates(rewardTokens[i]); + rwdRateNonLockup = bound( + rwdRateNonLockup, + 1 * 10 ** ERC20(rewardTokens[i]).decimals(), + 2 * 10 ** ERC20(rewardTokens[i]).decimals() + ); + rwdRateLockup = bound( + rwdRateLockup, 2 * 10 ** ERC20(rewardTokens[i]).decimals(), 4 * 10 ** ERC20(rewardTokens[i]).decimals() + ); + rwdRate[0] = rwdRateNonLockup; + rwdRate[1] = rwdRateLockup; + if (rewardTokens[i] == SPA) { + vm.startPrank(SPA_REWARD_MANAGER); + } else { + vm.startPrank(currentActor); + } + + vm.expectEmit(false, false, false, true); + emit RewardRateUpdated(rewardTokens[i], rwdRate); + BaseFarm(lockupFarm).setRewardRate(rewardTokens[i], rwdRate); + assertEq(BaseFarm(lockupFarm).getRewardRates(rewardTokens[i]), rwdRate); + } + } +} + +abstract contract GetRewardBalanceTest is BaseFarmTest { + function test_rewardBalance_invalidRwdTkn() public setup depositSetup(lockupFarm, true) useKnownActor(owner) { + vm.expectRevert(abi.encodeWithSelector(BaseFarm.InvalidRewardToken.selector)); + BaseFarm(nonLockupFarm).getRewardBalance(invalidRewardToken); + } + + function test_rewardBalance_nonLockupFarm() public setup depositSetup(nonLockupFarm, false) useKnownActor(owner) { + for (uint8 i = 0; i < rwdTokens.length; ++i) { + uint256 rwdBalance = BaseFarm(nonLockupFarm).getRewardBalance(rwdTokens[i]); + assert(rwdBalance != 0); + } + } + + function test_rewardBalance_lockupFarm() public setup depositSetup(lockupFarm, true) useKnownActor(owner) { + for (uint8 i = 0; i < rwdTokens.length; ++i) { + uint256 rwdBalance = BaseFarm(lockupFarm).getRewardBalance(BaseFarm(lockupFarm).rewardTokens(i)); + assert(rwdBalance != 0); + } + } +} + +abstract contract GetDepositTest is BaseFarmTest { + function test_getDeposit_nonLockupFarm() public setup useKnownActor(user) { + BaseFarm.Deposit memory userDeposit = BaseFarm(nonLockupFarm).getDeposit(currentActor, 0); + assertEq(userDeposit.tokenId, 1); + } +} + +abstract contract GetNumSubscriptionsTest is BaseFarmTest { + function test_getDeposit_nonLockupFarm() public setup depositSetup(nonLockupFarm, false) useKnownActor(user) { + uint256 numSubscriptions = BaseFarm(nonLockupFarm).getNumSubscriptions(0); + assertEq(numSubscriptions, 0); + } + + function test_getDeposit_lockupFarm() public setup depositSetup(lockupFarm, true) useKnownActor(user) { + uint256 numSubscriptions = BaseFarm(lockupFarm).getNumSubscriptions(0); + assertEq(numSubscriptions, 0); + } +} + +abstract contract SubscriptionInfoTest is BaseFarmTest { + function test_subInfo_revertsWhen_SubscriptionDoesNotExist() + public + setup + depositSetup(nonLockupFarm, false) + useKnownActor(user) + { + BaseFarm.Deposit memory userDeposit = BaseFarm(nonLockupFarm).getDeposit(currentActor, 0); + vm.expectRevert(abi.encodeWithSelector(BaseFarm.SubscriptionDoesNotExist.selector)); + BaseFarm(nonLockupFarm).getSubscriptionInfo(userDeposit.tokenId, 2); + } + + function test_subInfo_nonLockupFarm() public setup depositSetup(nonLockupFarm, false) useKnownActor(user) { + BaseFarm.Deposit memory userDeposit = BaseFarm(nonLockupFarm).getDeposit(currentActor, 0); + + BaseFarm.Subscription memory numSubscriptions = + BaseFarm(nonLockupFarm).getSubscriptionInfo(userDeposit.tokenId, 0); + assertEq(numSubscriptions.fundId, 0); + } + + function test_subInfo_lockupFarm() public setup depositSetup(lockupFarm, true) useKnownActor(user) { + BaseFarm.Deposit memory userDeposit = BaseFarm(lockupFarm).getDeposit(currentActor, 0); + + BaseFarm.Subscription memory numSubscriptions = BaseFarm(lockupFarm).getSubscriptionInfo(userDeposit.tokenId, 0); + assertEq(numSubscriptions.fundId, 0); + } +} + +abstract contract UpdateTokenManagerTest is BaseFarmTest { + function test_updateTknManager_nonLockupFarm_revertsWhen_FarmIsClosed() public useKnownActor(owner) { + address[] memory rewardTokens = getRewardTokens(nonLockupFarm); + address _newTknManager = newTokenManager; + + vm.startPrank(owner); + BaseFarm(nonLockupFarm).closeFarm(); + vm.expectRevert(abi.encodeWithSelector(BaseFarm.FarmIsClosed.selector)); + BaseFarm(nonLockupFarm).updateTokenManager(rewardTokens[0], _newTknManager); + } + + function test_updateTknManager_nonLockupFarm_revertsWhen_NotTheTokenManager() public useKnownActor(owner) { + address[] memory rewardTokens = getRewardTokens(nonLockupFarm); + address _newTknManager = newTokenManager; + vm.expectRevert(abi.encodeWithSelector(BaseFarm.NotTheTokenManager.selector)); + BaseFarm(nonLockupFarm).updateTokenManager(rewardTokens[0], _newTknManager); + } + + function test_updateTknManager_nonLockupFarm_revertsWhen_InvalidAddress() + public + useKnownActor(SPA_REWARD_MANAGER) + { + address[] memory rewardTokens = getRewardTokens(nonLockupFarm); + address _newTknManager = address(0); + vm.expectRevert(abi.encodeWithSelector(BaseFarm.InvalidAddress.selector)); + BaseFarm(nonLockupFarm).updateTokenManager(rewardTokens[0], _newTknManager); + } + + function test_updateTknManager_nonLockupFarm() public useKnownActor(owner) { + address[] memory rewardTokens = getRewardTokens(nonLockupFarm); + address _newTknManager = newTokenManager; + address sender; + for (uint8 i; i < rewardTokens.length; ++i) { + address rwdToken = rewardTokens[i]; + if (rewardTokens[i] == SPA) { + sender = SPA_REWARD_MANAGER; + vm.startPrank(SPA_REWARD_MANAGER); + } else { + sender = currentActor; + vm.startPrank(currentActor); + } + + vm.expectEmit(true, false, false, true); + emit TokenManagerUpdated(rwdToken, sender, _newTknManager); + BaseFarm(nonLockupFarm).updateTokenManager(rwdToken, _newTknManager); + } + } + + function test_updateTknManager_LockupFarm() public useKnownActor(owner) { + address[] memory rewardTokens = getRewardTokens(lockupFarm); + address _newTknManager = newTokenManager; + address sender; + for (uint8 i; i < rewardTokens.length; ++i) { + address rwdToken = rewardTokens[i]; + if (rewardTokens[i] == SPA) { + sender = SPA_REWARD_MANAGER; + vm.startPrank(SPA_REWARD_MANAGER); + } else { + sender = currentActor; + vm.startPrank(currentActor); + } + + vm.expectEmit(true, false, false, false); + emit TokenManagerUpdated(rwdToken, currentActor, _newTknManager); + BaseFarm(lockupFarm).updateTokenManager(rwdToken, _newTknManager); + } + } +} + +abstract contract RecoverRewardFundsTest is BaseFarmTest { + function test_recoverRewardFund_nonLockupFarm() public depositSetup(nonLockupFarm, false) useKnownActor(owner) { + address[] memory rewardTokens = getRewardTokens(nonLockupFarm); + + for (uint8 i; i < rewardTokens.length; ++i) { + address rwdToken = rewardTokens[i]; + uint256 rwdBalance = ERC20(rwdToken).balanceOf(nonLockupFarm); + address sender; + + if (rwdToken == SPA) { + sender = SPA_REWARD_MANAGER; + vm.startPrank(SPA_REWARD_MANAGER); + } else { + sender = currentActor; + vm.startPrank(currentActor); + } + + vm.expectEmit(true, false, false, true); + emit FundsRecovered(sender, rwdToken, rwdBalance); + BaseFarm(nonLockupFarm).recoverRewardFunds(rwdToken, rwdBalance); + } + } + + function test_recoverRewardFund_lockupFarm() public setup useKnownActor(owner) { + address[] memory rewardTokens = getRewardTokens(lockupFarm); + + for (uint8 i; i < rewardTokens.length; ++i) { + address rwdToken = rewardTokens[i]; + deal(rwdToken, lockupFarm, 1e3); + uint256 rwdBalance = ERC20(rwdToken).balanceOf(lockupFarm); + address sender; + + if (rwdToken == SPA) { + sender = SPA_REWARD_MANAGER; + vm.startPrank(SPA_REWARD_MANAGER); + } else { + sender = currentActor; + vm.startPrank(currentActor); + } + vm.expectEmit(true, false, false, true); + emit FundsRecovered(sender, rwdToken, rwdBalance); + BaseFarm(lockupFarm).recoverRewardFunds(rwdToken, rwdBalance); + } + } + + function test_recoverRewardFund_lockupFarm_partially() public useKnownActor(owner) { + address[] memory rewardTokens = getRewardTokens(lockupFarm); + + for (uint8 i; i < rewardTokens.length; ++i) { + address rwdToken = rewardTokens[i]; + deal(rwdToken, lockupFarm, 6e6); + uint256 rwdToRecover = 5e6; + address sender; + uint256 rwdBalanceBefore = ERC20(rwdToken).balanceOf(lockupFarm); + + if (rwdToken == SPA) { + sender = SPA_REWARD_MANAGER; + vm.startPrank(SPA_REWARD_MANAGER); + } else { + sender = currentActor; + vm.startPrank(currentActor); + } + + vm.expectEmit(true, false, false, true); + emit FundsRecovered(sender, rwdToken, rwdToRecover); + BaseFarm(lockupFarm).recoverRewardFunds(rwdToken, rwdToRecover); + + uint256 rwdBalanceAfter = ERC20(rwdToken).balanceOf(lockupFarm); + assertEq(rwdBalanceAfter, rwdBalanceBefore - rwdToRecover); + } + } +} + +abstract contract FarmPauseSwitchTest is BaseFarmTest { + function test_farmPause_noLockupFarm_revertsWhen_FarmAlreadyInRequiredState(bool _isPaused) + public + useKnownActor(owner) + { + bool isPaused = BaseFarm(nonLockupFarm).isPaused(); + vm.assume(_isPaused == isPaused); + vm.expectRevert(abi.encodeWithSelector(BaseFarm.FarmAlreadyInRequiredState.selector)); + BaseFarm(nonLockupFarm).farmPauseSwitch(_isPaused); + } + + function test_farmPause_lockupFarm_revertsWhen_FarmAlreadyInRequiredState(bool _isPaused) + public + useKnownActor(owner) + { + bool isPaused = BaseFarm(lockupFarm).isPaused(); + vm.assume(_isPaused == isPaused); + vm.expectRevert(abi.encodeWithSelector(BaseFarm.FarmAlreadyInRequiredState.selector)); + BaseFarm(lockupFarm).farmPauseSwitch(_isPaused); + } + + function test_farmPause_noLockupFarm_revertsWhen_FarmIsClosed(bool _isPaused) public useKnownActor(owner) { + bool isPaused = BaseFarm(nonLockupFarm).isPaused(); + vm.assume(_isPaused != isPaused); + BaseFarm(nonLockupFarm).closeFarm(); + vm.expectRevert(abi.encodeWithSelector(BaseFarm.FarmIsClosed.selector)); + BaseFarm(nonLockupFarm).farmPauseSwitch(_isPaused); + } + + function test_farmPause_lockupFarm_revertsWhen_FarmIsClosed(bool _isPaused) public useKnownActor(owner) { + bool isPaused = BaseFarm(lockupFarm).isPaused(); + vm.assume(_isPaused != isPaused); + BaseFarm(lockupFarm).closeFarm(); + vm.expectRevert(abi.encodeWithSelector(BaseFarm.FarmIsClosed.selector)); + BaseFarm(lockupFarm).farmPauseSwitch(_isPaused); + } + + function test_farmPause_noLockupFarm(bool _isPaused) public useKnownActor(owner) { + bool isPaused = BaseFarm(nonLockupFarm).isPaused(); + vm.assume(_isPaused != isPaused); + vm.expectEmit(true, true, false, true); + emit FarmPaused(_isPaused); + BaseFarm(nonLockupFarm).farmPauseSwitch(_isPaused); + } + + function test_farmPause_lockupFarm(bool _isPaused) public useKnownActor(owner) { + bool isPaused = BaseFarm(lockupFarm).isPaused(); + vm.assume(_isPaused != isPaused); + vm.expectEmit(true, true, false, true); + emit FarmPaused(_isPaused); + BaseFarm(lockupFarm).farmPauseSwitch(_isPaused); + } +} + +abstract contract UpdateFarmStartTimeTest is BaseFarmTest { + function test_start_time_noLockupFarm_revertsWhen_FarmAlreadyStarted() public useKnownActor(owner) { + vm.expectRevert(abi.encodeWithSelector(BaseFarm.FarmAlreadyStarted.selector)); + BaseFarm(nonLockupFarm).updateFarmStartTime(block.timestamp); + } + + function test_start_time_lockupFarm_revertsWhen_FarmAlreadyStarted() public useKnownActor(owner) { + vm.expectRevert(abi.encodeWithSelector(BaseFarm.FarmAlreadyStarted.selector)); + BaseFarm(lockupFarm).updateFarmStartTime(block.timestamp); + } + + function test_start_time_noLockupFarm_revertsWhen_InvalidTime() public { + address farm = createFarm(block.timestamp + 2000, false); + vm.prank(owner); + vm.expectRevert(abi.encodeWithSelector(BaseFarm.InvalidTime.selector)); + BaseFarm(farm).updateFarmStartTime(block.timestamp - 1); + } + + function test_start_time_lockupFarm_revertsWhen_InvalidTime() public { + address farm = createFarm(block.timestamp + 200, true); + vm.startPrank(owner); + vm.expectRevert(abi.encodeWithSelector(BaseFarm.InvalidTime.selector)); + BaseFarm(farm).updateFarmStartTime(block.timestamp - 1); + } + + function test_start_time_noLockupFarm(uint256 farmStartTime, uint256 newStartTime) public { + vm.assume(farmStartTime > block.timestamp + 2 && newStartTime == farmStartTime - 1); + address farm = createFarm(farmStartTime, false); + vm.startPrank(owner); + vm.expectEmit(true, true, false, true); + emit FarmStartTimeUpdated(newStartTime); + BaseFarm(farm).updateFarmStartTime(newStartTime); + } + + function test_start_time_lockupFarm(uint256 farmStartTime, uint256 newStartTime) public { + vm.assume(farmStartTime > block.timestamp + 2 && newStartTime == farmStartTime - 1); + + address farm = createFarm(farmStartTime, true); + vm.startPrank(owner); + vm.expectEmit(true, true, false, true); + emit FarmStartTimeUpdated(newStartTime); + BaseFarm(farm).updateFarmStartTime(newStartTime); + } +} + +abstract contract UpdateCoolDownPeriodTest is BaseFarmTest { + function testFuzz_updateCoolDown_noLockupFarm(uint256 cooldownPeriod) public useKnownActor(owner) { + cooldownPeriod = bound(cooldownPeriod, 1, 30); + vm.expectRevert(abi.encodeWithSelector(BaseFarm.FarmDoesNotSupportLockup.selector)); + BaseFarm(nonLockupFarm).updateCooldownPeriod(cooldownPeriod); + } + + function testFuzz_updateCoolDown_noLockupFarm_revertsWhen_FarmIsClosed(uint256 cooldownPeriod) + public + useKnownActor(owner) + { + cooldownPeriod = bound(cooldownPeriod, 1, 30); + BaseFarm(nonLockupFarm).closeFarm(); + vm.expectRevert(abi.encodeWithSelector(BaseFarm.FarmIsClosed.selector)); + BaseFarm(nonLockupFarm).updateCooldownPeriod(cooldownPeriod); + } + + function test_updateCoolDown_lockupFarm_revertsWhen_InvalidCooldownPeriod(uint256 cooldownPeriod) + public + useKnownActor(owner) + { + vm.assume(cooldownPeriod > 30 && cooldownPeriod < 720); + vm.expectRevert(abi.encodeWithSelector(BaseFarm.InvalidCooldownPeriod.selector)); + BaseFarm(lockupFarm).updateCooldownPeriod(cooldownPeriod); + } + + function test_updateCoolDown_lockupFarm_revertsWhen_InvalidCooldownPeriod0(uint256 cooldownPeriod) + public + useKnownActor(owner) + { + vm.assume(cooldownPeriod == 0); + vm.expectRevert(abi.encodeWithSelector(BaseFarm.InvalidCooldownPeriod.selector)); + BaseFarm(lockupFarm).updateCooldownPeriod(cooldownPeriod); + } + + function test_updateCoolDown_lockupFarm(uint256 cooldownPeriod) public useKnownActor(owner) { + vm.assume(cooldownPeriod > 0 && cooldownPeriod < 31); + + vm.expectEmit(true, true, false, true); + emit CooldownPeriodUpdated(COOLDOWN_PERIOD, cooldownPeriod); + BaseFarm(lockupFarm).updateCooldownPeriod(cooldownPeriod); + } +} + +abstract contract _SetupFarmTest is BaseFarmTest { + function test_revertWhen_InvalidFarmStartTime() public { + vm.expectRevert(abi.encodeWithSelector(BaseFarm.InvalidFarmStartTime.selector)); + (bool success,) = + address(this).call(abi.encodeWithSignature("createFarm(uint256,bool)", block.timestamp - 200, false)); + assertTrue(success); + } + + function test_revertWhen_InvalidRewardData() public { + rwdTokens.push(USDCe); + rwdTokens.push(USDCe); + rwdTokens.push(USDCe); + rwdTokens.push(USDCe); + + vm.expectRevert(abi.encodeWithSelector(BaseFarm.InvalidRewardData.selector)); + (bool success,) = + address(this).call(abi.encodeWithSignature("createFarm(uint256,bool)", block.timestamp, false)); + assertTrue(success); + } + + function test_revertWhen_RewardAlreadyAdded() public { + rwdTokens.push(SPA); + + vm.expectRevert(abi.encodeWithSelector(BaseFarm.RewardTokenAlreadyAdded.selector)); + (bool success,) = + address(this).call(abi.encodeWithSignature("createFarm(uint256,bool)", block.timestamp, false)); + assertTrue(success); + } +} diff --git a/test/FarmFactory.t.sol b/test/FarmFactory.t.sol new file mode 100644 index 00000000..11eec910 --- /dev/null +++ b/test/FarmFactory.t.sol @@ -0,0 +1,185 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.16; + +import {BaseFarm, RewardTokenData} from "../contracts/BaseFarm.sol"; +import {BaseE20Farm} from "../contracts/e20-farms/BaseE20Farm.sol"; +import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import {TestNetworkConfig} from "./utils/TestNetworkConfig.t.sol"; +import {FarmFactory} from "../contracts/FarmFactory.sol"; +import {BaseFarmDeployer} from "../contracts/BaseFarmDeployer.sol"; +import {UpgradeUtil} from "../test/utils/UpgradeUtil.t.sol"; +import {console} from "forge-std/console.sol"; + +abstract contract FarmFactoryTest is TestNetworkConfig { + UpgradeUtil internal upgradeUtil; + FarmFactory public factoryImp; + + event FarmRegistered(address indexed farm, address indexed creator, address indexed deployer); + event FarmDeployerRegistered(address deployer); + event FarmDeployerRemoved(address deployer); + event FeeParamsUpdated(address receiver, address token, uint256 amount); + event PrivilegeUpdated(address deployer, bool privilege); + + modifier initialized() { + FarmFactory(factory).initialize(FACTORY_OWNER, USDS, 1e20); + _; + } + + modifier deployerRegistered() { + FarmFactory(factory).registerFarmDeployer(owner); + _; + } + + function setUp() public override { + super.setUp(); + factoryImp = new FarmFactory(); + upgradeUtil = new UpgradeUtil(); + factory = createFactory(); + } + + function createFactory() public useKnownActor(FACTORY_OWNER) returns (address) { + address factoryProxy; + factoryImp = new FarmFactory(); + upgradeUtil = new UpgradeUtil(); + factoryProxy = upgradeUtil.deployErc1967Proxy(address(factoryImp)); + return factoryProxy; + } +} + +contract InitializeTest is FarmFactoryTest { + function test_revertsWhen_receiverIsZeroAddress() public useKnownActor(FACTORY_OWNER) { + vm.expectRevert(abi.encodeWithSelector(FarmFactory.InvalidAddress.selector)); + FarmFactory(factory).initialize(address(0), USDS, 1e20); + } + + function test_revertsWhen_tokenIsZeroAddress() public useKnownActor(FACTORY_OWNER) { + vm.expectRevert(abi.encodeWithSelector(FarmFactory.InvalidAddress.selector)); + FarmFactory(factory).initialize(FACTORY_OWNER, address(0), 1e20); + } + + function test_revertsWhen_feeAmountIsZero() public useKnownActor(FACTORY_OWNER) { + vm.expectRevert(abi.encodeWithSelector(FarmFactory.FeeCannotBeZero.selector)); + FarmFactory(factory).initialize(FACTORY_OWNER, USDS, 0); + } + + function test_init(uint256 feeAmt) public useKnownActor(FACTORY_OWNER) { + address feeReceiver = FACTORY_OWNER; + address feeToken = USDS; + feeAmt = bound(feeAmt, 1e18, 1e25); + + address _feeReceiver; + address _feeToken; + uint256 _feeAmount; + vm.expectEmit(true, true, true, false); + emit FeeParamsUpdated(feeReceiver, feeToken, feeAmt); + FarmFactory(factory).initialize(feeReceiver, feeToken, feeAmt); + (_feeReceiver, _feeToken, _feeAmount) = FarmFactory(factory).getFeeParams(); + assertEq(_feeReceiver, feeReceiver); + assertEq(_feeToken, feeToken); + assertEq(_feeAmount, feeAmt); + assertEq(FarmFactory(factory).owner(), currentActor); + } +} + +contract RegisterFarmTest is FarmFactoryTest { + function test_revertsWhen_DeployerNotRegistered() public useKnownActor(FACTORY_OWNER) initialized { + vm.expectRevert(abi.encodeWithSelector(FarmFactory.DeployerNotRegistered.selector)); + FarmFactory(factory).registerFarm(actors[6], actors[4]); + } + + function test_registerFarm() public useKnownActor(FACTORY_OWNER) initialized deployerRegistered { + address farm = actors[6]; + address creator = actors[5]; + + vm.startPrank(owner); + vm.expectEmit(true, true, false, true); + emit FarmRegistered(farm, creator, owner); + FarmFactory(factory).registerFarm(farm, creator); + assertEq(FarmFactory(factory).getFarmList()[0], farm); + } +} + +contract RegisterFarmDeployerTest is FarmFactoryTest { + function test_revertsWhen_DeployerAddressIsZero() public useKnownActor(FACTORY_OWNER) initialized { + vm.expectRevert(abi.encodeWithSelector(FarmFactory.InvalidAddress.selector)); + FarmFactory(factory).registerFarmDeployer(address(0)); + } + + function test_revertsWhen_DeployerIsAlreadyRegistered() + public + useKnownActor(FACTORY_OWNER) + initialized + deployerRegistered + { + vm.expectRevert(abi.encodeWithSelector(FarmFactory.DeployerAlreadyRegistered.selector)); + FarmFactory(factory).registerFarmDeployer(owner); + } + + function test_registerFarmDeployer() public useKnownActor(FACTORY_OWNER) initialized { + address deployer = actors[5]; + vm.expectEmit(true, true, false, false); + emit FarmDeployerRegistered(deployer); + FarmFactory(factory).registerFarmDeployer(deployer); + assertEq(FarmFactory(factory).getFarmDeployerList()[0], deployer); + assertEq(FarmFactory(factory).deployerRegistered(deployer), true); + } +} + +contract RemoveFarmDeployerTest is FarmFactoryTest { + function test_revertsWhen_invalidDeployerId() public useKnownActor(FACTORY_OWNER) initialized deployerRegistered { + uint16 deployerId = uint16(FarmFactory(factory).getFarmDeployerList().length); + vm.expectRevert(abi.encodeWithSelector(FarmFactory.InvalidDeployerId.selector)); + FarmFactory(factory).removeDeployer(deployerId); + } + + function test_removeLastDeployer() public useKnownActor(FACTORY_OWNER) initialized deployerRegistered { + FarmFactory(factory).registerFarmDeployer(actors[10]); + FarmFactory(factory).registerFarmDeployer(actors[11]); + uint16 deployerId = uint16(FarmFactory(factory).getFarmDeployerList().length - 1); + uint16 lengthBfr = uint16(FarmFactory(factory).getFarmDeployerList().length); + vm.expectEmit(true, true, false, false); + emit FarmDeployerRemoved(actors[11]); + FarmFactory(factory).removeDeployer(deployerId); + assertEq(FarmFactory(factory).getFarmDeployerList()[0], owner); + assertEq(FarmFactory(factory).getFarmDeployerList()[1], actors[10]); + assertEq(uint16(FarmFactory(factory).getFarmDeployerList().length), lengthBfr - 1); //check length after poping a deployer + } + + function test_removeMiddleDeployer() public useKnownActor(FACTORY_OWNER) initialized deployerRegistered { + FarmFactory(factory).registerFarmDeployer(actors[10]); + FarmFactory(factory).registerFarmDeployer(actors[11]); + uint16 deployerId = uint16(FarmFactory(factory).getFarmDeployerList().length - 2); + uint16 lengthBfr = uint16(FarmFactory(factory).getFarmDeployerList().length); + vm.expectEmit(true, true, false, false); + emit FarmDeployerRemoved(actors[10]); + FarmFactory(factory).removeDeployer(deployerId); + assertEq(FarmFactory(factory).getFarmDeployerList()[0], owner); + assertEq(FarmFactory(factory).getFarmDeployerList()[1], actors[11]); + assertEq(uint16(FarmFactory(factory).getFarmDeployerList().length), lengthBfr - 1); //check length after poping a deployer + } +} + +contract UpdatePrivilegeTest is FarmFactoryTest { + function test_revertsWhen_PrivilegeSameAsDesired() + public + useKnownActor(FACTORY_OWNER) + initialized + deployerRegistered + { + vm.expectRevert(abi.encodeWithSelector(FarmFactory.PrivilegeSameAsDesired.selector)); + FarmFactory(factory).updatePrivilege(owner, false); + } + + function test_revertsWhen_callerIsNotOwner() public useKnownActor(FACTORY_OWNER) initialized deployerRegistered { + vm.startPrank(owner); + vm.expectRevert("Ownable: caller is not the owner"); + FarmFactory(factory).updatePrivilege(owner, false); + } + + function test_updatePrivilege() public useKnownActor(FACTORY_OWNER) initialized deployerRegistered { + vm.expectEmit(true, true, false, false); + emit PrivilegeUpdated(owner, true); + FarmFactory(factory).updatePrivilege(owner, true); + assertEq(FarmFactory(factory).isPrivilegedDeployer(owner), true); + } +} diff --git a/test/e20-farms/BaseE20Farm.t.sol b/test/e20-farms/BaseE20Farm.t.sol new file mode 100644 index 00000000..f4e089b1 --- /dev/null +++ b/test/e20-farms/BaseE20Farm.t.sol @@ -0,0 +1,201 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.16; + +import {BaseFarmTest} from "../BaseFarm.t.sol"; +import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import {BaseFarm} from "../../contracts/BaseFarm.sol"; +import {BaseE20Farm} from "../../contracts/e20-farms/BaseE20Farm.sol"; + +abstract contract BaseE20FarmTest is BaseFarmTest {} + +abstract contract IncreaseDepositTest is BaseE20FarmTest { + function test_revertsWhen_InvalidAmount() public depositSetup(lockupFarm, true) useKnownActor(user) { + address poolAddress = getPoolAddress(); + uint256 amt = 0; + + deal(poolAddress, currentActor, amt); + ERC20(poolAddress).approve(address(lockupFarm), amt); + vm.expectRevert(abi.encodeWithSelector(BaseE20Farm.InvalidAmount.selector)); + BaseE20Farm(lockupFarm).increaseDeposit(0, amt); + } + + function testFuzz_revertsWhen_farmIsClosed(uint256 amt) public depositSetup(lockupFarm, true) useKnownActor(user) { + address poolAddress = getPoolAddress(); + vm.assume(amt > 100 * 10 ** ERC20(poolAddress).decimals() && amt <= 1000 * 10 ** ERC20(poolAddress).decimals()); + + deal(poolAddress, currentActor, amt); + ERC20(poolAddress).approve(address(lockupFarm), amt); + vm.startPrank(owner); + BaseE20Farm(lockupFarm).closeFarm(); + vm.expectRevert(abi.encodeWithSelector(BaseFarm.FarmIsClosed.selector)); + BaseE20Farm(lockupFarm).increaseDeposit(0, amt); + } + + function testFuzz_revertsWhen_depositInCoolDown(uint256 amt) + public + depositSetup(lockupFarm, true) + useKnownActor(user) + { + address poolAddress = getPoolAddress(); + vm.assume(amt > 100 * 10 ** ERC20(poolAddress).decimals() && amt <= 1000 * 10 ** ERC20(poolAddress).decimals()); + BaseE20Farm(lockupFarm).initiateCooldown(0); + skip(86400 * 2); + deal(poolAddress, currentActor, amt); + ERC20(poolAddress).approve(address(lockupFarm), amt); + vm.expectRevert(abi.encodeWithSelector(BaseE20Farm.DepositInCooldown.selector)); + BaseE20Farm(lockupFarm).increaseDeposit(0, amt); + } + + function testFuzz_lockupFarm(uint256 amt) public depositSetup(lockupFarm, true) useKnownActor(user) { + address poolAddress = getPoolAddress(); + vm.assume(amt > 100 * 10 ** ERC20(poolAddress).decimals() && amt <= 1000 * 10 ** ERC20(poolAddress).decimals()); + + deal(poolAddress, currentActor, amt); + uint256 usrBalanceBefore = ERC20(poolAddress).balanceOf(currentActor); + uint256 farmBalanceBefore = ERC20(poolAddress).balanceOf(lockupFarm); + ERC20(poolAddress).approve(address(lockupFarm), amt); + BaseE20Farm(lockupFarm).increaseDeposit(0, amt); + uint256 usrBalanceAfter = ERC20(poolAddress).balanceOf(currentActor); + uint256 farmBalanceAfter = ERC20(poolAddress).balanceOf(lockupFarm); + assertEq(usrBalanceAfter, usrBalanceBefore - amt); + assertEq(farmBalanceAfter, farmBalanceBefore + amt); + } + + function testFuzz_nonLockupFarm(uint256 amt) public depositSetup(nonLockupFarm, false) useKnownActor(user) { + address poolAddress = getPoolAddress(); + vm.assume(amt > 100 * 10 ** ERC20(poolAddress).decimals() && amt <= 1000 * 10 ** ERC20(poolAddress).decimals()); + + deal(poolAddress, currentActor, amt); + uint256 usrBalanceBefore = ERC20(poolAddress).balanceOf(currentActor); + uint256 farmBalanceBefore = ERC20(poolAddress).balanceOf(nonLockupFarm); + ERC20(poolAddress).approve(address(nonLockupFarm), amt); + BaseE20Farm(nonLockupFarm).increaseDeposit(0, amt); + uint256 usrBalanceAfter = ERC20(poolAddress).balanceOf(currentActor); + uint256 farmBalanceAfter = ERC20(poolAddress).balanceOf(nonLockupFarm); + assertEq(usrBalanceAfter, usrBalanceBefore - amt); + assertEq(farmBalanceAfter, farmBalanceBefore + amt); + } + + function testMaths_updateSubscriptionForIncrease() public depositSetup(nonLockupFarm, false) useKnownActor(user) { + address[] memory farmRewardTokens = getRewardTokens(nonLockupFarm); + uint256 totalRewardClaimed = 0; + uint256 rewardRate = 1e16; + address poolAddress = getPoolAddress(); + deposit(nonLockupFarm, false, 1e3); + uint256 time = 2 days; + uint256 amt = 1e3 * 10 ** ERC20(poolAddress).decimals(); + uint256[][] memory rewardsForEachSubs1 = new uint256[][](1); + uint256[][] memory rewardsForEachSubs2 = new uint256[][](1); + skip(time); + vm.startPrank(user); + rewardsForEachSubs1[0] = BaseFarm(nonLockupFarm).computeRewards(currentActor, 0); + rewardsForEachSubs2[0] = BaseFarm(nonLockupFarm).computeRewards(currentActor, 1); + //since the Deposit amounts are the same, The reward amounts should be the same. + + for (uint8 i = 0; i < farmRewardTokens.length; ++i) { + assertEq(rewardsForEachSubs1[0][i], rewardsForEachSubs2[0][i]); + } + deal(poolAddress, currentActor, amt); + ERC20(poolAddress).approve(address(nonLockupFarm), amt); + + // We increased the first deposit by 100% + BaseE20Farm(nonLockupFarm).increaseDeposit(0, amt); + BaseFarm(nonLockupFarm).claimRewards(1); + + //Check if all the rewards are distributed to the deposits + totalRewardClaimed += rewardsForEachSubs1[0][0] + rewardsForEachSubs2[0][0]; + assertEq(totalRewardClaimed, time * rewardRate); + + skip(time); + rewardsForEachSubs1[0] = BaseFarm(nonLockupFarm).computeRewards(currentActor, 0); + rewardsForEachSubs2[0] = BaseFarm(nonLockupFarm).computeRewards(currentActor, 1); + + //The first Deposit amount is the double than the second one so the the ratio should be 2/3 and 1/3 + for (uint8 i = 0; i < farmRewardTokens.length; ++i) { + assertEq(rewardsForEachSubs1[0][i], 2 * rewardsForEachSubs2[0][i]); + } + BaseFarm(nonLockupFarm).claimRewards(0); + BaseFarm(nonLockupFarm).claimRewards(1); + + //Check if all the rewards are distributed to the deposits + totalRewardClaimed += rewardsForEachSubs1[0][0] + rewardsForEachSubs2[0][0]; + assertEq(totalRewardClaimed, 2 * time * rewardRate); + } +} + +abstract contract WithdrawPartiallyTest is BaseE20FarmTest { + function test_zeroAmount() public depositSetup(lockupFarm, true) useKnownActor(user) { + vm.expectRevert(abi.encodeWithSelector(BaseE20Farm.InvalidAmount.selector)); + BaseE20Farm(lockupFarm).withdrawPartially(0, 0); + } + + function test_revertsWhen_LockupFarm_PartialWithdrawNotPermitted() + public + depositSetup(lockupFarm, true) + useKnownActor(user) + { + skip(86400 * 7); + vm.expectRevert(abi.encodeWithSelector(BaseE20Farm.PartialWithdrawNotPermitted.selector)); + BaseE20Farm(lockupFarm).withdrawPartially(0, 10000); + } + + function test_revertsWhen_farmIsClosed() public depositSetup(nonLockupFarm, false) useKnownActor(owner) { + skip(86400 * 7); + BaseE20Farm(nonLockupFarm).closeFarm(); + vm.startPrank(user); + vm.expectRevert(abi.encodeWithSelector(BaseFarm.FarmIsClosed.selector)); + BaseE20Farm(nonLockupFarm).withdrawPartially(0, 10000); + } + + function test_nonLockupFarm() public depositSetup(nonLockupFarm, false) useKnownActor(user) { + skip(86400 * 7); + BaseE20Farm(nonLockupFarm).computeRewards(currentActor, 0); + BaseE20Farm(nonLockupFarm).withdrawPartially(0, 10000); + } + + function testMaths_updateSubscriptionForDecrease() public depositSetup(nonLockupFarm, false) useKnownActor(user) { + address[] memory farmRewardTokens = getRewardTokens(nonLockupFarm); + uint256 totalRewardClaimed = 0; + uint256 rewardRate = 1e16; + address poolAddress = getPoolAddress(); + deposit(nonLockupFarm, false, 1e3); + uint256 time = 2 days; + uint256 amt = 1e3 * 10 ** ERC20(poolAddress).decimals(); + uint256[][] memory rewardsForEachSubs1 = new uint256[][](1); + uint256[][] memory rewardsForEachSubs2 = new uint256[][](1); + skip(time); + vm.startPrank(user); + rewardsForEachSubs1[0] = BaseFarm(nonLockupFarm).computeRewards(currentActor, 0); + rewardsForEachSubs2[0] = BaseFarm(nonLockupFarm).computeRewards(currentActor, 1); + //since the Deposit amounts are the same, The reward amounts should be the same. + + for (uint8 i = 0; i < farmRewardTokens.length; ++i) { + assertEq(rewardsForEachSubs1[0][i], rewardsForEachSubs2[0][i]); + } + deal(poolAddress, currentActor, amt); + ERC20(poolAddress).approve(address(nonLockupFarm), amt); + + // We withdrew 50% of the deposit + BaseE20Farm(nonLockupFarm).withdrawPartially(0, amt / 2); + BaseFarm(nonLockupFarm).claimRewards(1); + + //Check if all the rewards are distributed to the deposits + totalRewardClaimed += rewardsForEachSubs1[0][0] + rewardsForEachSubs2[0][0]; + assertEq(totalRewardClaimed, time * rewardRate); + + skip(time); + rewardsForEachSubs1[0] = BaseFarm(nonLockupFarm).computeRewards(currentActor, 0); + rewardsForEachSubs2[0] = BaseFarm(nonLockupFarm).computeRewards(currentActor, 1); + + //The first Deposit amount is the half than the second one so the the ratio should be 1/3 and 2/3 + for (uint8 i = 0; i < farmRewardTokens.length; ++i) { + assertEq(rewardsForEachSubs1[0][i], rewardsForEachSubs2[0][i] / 2); + } + BaseFarm(nonLockupFarm).claimRewards(0); + BaseFarm(nonLockupFarm).claimRewards(1); + + //Check if all the rewards are distributed to the deposits + totalRewardClaimed += rewardsForEachSubs1[0][0] + rewardsForEachSubs2[0][0]; + assertEq(totalRewardClaimed, 2 * time * rewardRate); + } +} diff --git a/test/e20-farms/balancer/BalancerFarm.t.sol b/test/e20-farms/balancer/BalancerFarm.t.sol new file mode 100644 index 00000000..e4806f6c --- /dev/null +++ b/test/e20-farms/balancer/BalancerFarm.t.sol @@ -0,0 +1,162 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.16; + +import {IERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; + +import "../../BaseFarm.t.sol"; +import "../BaseE20Farm.t.sol"; + +import {Demeter_BalancerFarm} from "../../../contracts/e20-farms/balancer/Demeter_BalancerFarm.sol"; +import {Demeter_BalancerFarm_Deployer} from "../../../contracts/e20-farms/balancer/Demeter_BalancerFarm_Deployer.sol"; + +struct JoinPoolRequest { + address[] assets; + uint256[] maxAmountsIn; + bytes userData; + bool fromInternalBalance; +} + +interface IAsset { +// solhint-disable-previous-line no-empty-blocks +} + +interface IBalancerVault { + enum PoolSpecialization { + GENERAL, + MINIMAL_SWAP_INFO, + TWO_TOKEN + } + + function joinPool(bytes32 poolId, address sender, address recipient, JoinPoolRequest memory request) + external + payable; + function getPool(bytes32 poolId) external view returns (address, PoolSpecialization); + + function getPoolTokens(bytes32 poolId) + external + view + returns (IERC20[] memory tokens, uint256[] memory balances, uint256 lastChangeBlock); +} + +interface ICustomOracle { + function updateDIAParams(uint256 _weightDIA, uint128 _maxTime) external; + + function getPrice() external view returns (uint256, uint256); +} + +contract BalancerFarmTest is + DepositTest, + WithdrawTest, + ClaimRewardsTest, + GetRewardFundInfoTest, + InitiateCooldownTest, + AddRewardsTest, + SetRewardRateTest, + GetRewardBalanceTest, + GetNumSubscriptionsTest, + SubscriptionInfoTest, + UpdateTokenManagerTest, + FarmPauseSwitchTest, + UpdateFarmStartTimeTest, + UpdateCoolDownPeriodTest, + IncreaseDepositTest, + WithdrawPartiallyTest, + RecoverERC20Test, + RecoverRewardFundsTest, + _SetupFarmTest +{ + // Define variables + bytes32 internal POOL_ID = 0x423a1323c871abc9d89eb06855bf5347048fc4a5000000000000000000000496; //Balancer Stable 4pool (4POOL-BPT) + Demeter_BalancerFarm_Deployer public balancerFarmDeployer; + + function setUp() public override { + super.setUp(); + + vm.startPrank(PROXY_OWNER); + // Deploy and register farm deployer + FarmFactory factory = FarmFactory(DEMETER_FACTORY); + balancerFarmDeployer = new Demeter_BalancerFarm_Deployer( + DEMETER_FACTORY, + BALANCER_VAULT, + "Balancer Deployer" + ); + factory.registerFarmDeployer(address(balancerFarmDeployer)); + + // Configure rewardTokens + rwdTokens.push(USDCe); + rwdTokens.push(DAI); + + invalidRewardToken = USDT; + + vm.stopPrank(); + + // Create and setup Farms + lockupFarm = createFarm(block.timestamp, true); + nonLockupFarm = createFarm(block.timestamp, false); + } + + function createFarm(uint256 startTime, bool lockup) public override useKnownActor(owner) returns (address) { + address[] memory rewardToken = rwdTokens; + RewardTokenData[] memory rwdTokenData = new RewardTokenData[]( + rewardToken.length + ); + for (uint8 i = 0; i < rewardToken.length; ++i) { + rwdTokenData[i] = RewardTokenData(rewardToken[i], currentActor); + } + /// Create Farm + Demeter_BalancerFarm_Deployer.FarmData memory _data = Demeter_BalancerFarm_Deployer.FarmData({ + farmAdmin: owner, + farmStartTime: startTime, + cooldownPeriod: lockup ? COOLDOWN_PERIOD : 0, + poolId: POOL_ID, //Balancer Stable 4pool (4POOL-BPT) + rewardData: rwdTokenData + }); + + // Approve Farm fee + IERC20(FEE_TOKEN()).approve(address(balancerFarmDeployer), 1e22); + address farm = balancerFarmDeployer.createFarm(_data); + + assertEq(Demeter_BalancerFarm(farm).FARM_ID(), "Demeter_BalancerV2_v1"); + + return farm; + } + + /// @notice Farm specific deposit logic + function deposit(address farm, bool locked, uint256 baseAmt) public override useKnownActor(user) { + assertEq(currentActor, actors[0], "Wrong actor"); + address poolAddress = getPoolAddress(); + uint256 amt = baseAmt * 10 ** ERC20(poolAddress).decimals(); + deal(poolAddress, currentActor, amt); + ERC20(poolAddress).approve(address(farm), amt); + uint256 usrBalanceBefore = ERC20(poolAddress).balanceOf(currentActor); + uint256 farmBalanceBefore = ERC20(poolAddress).balanceOf(farm); + vm.expectEmit(true, true, false, true); + emit Deposited(currentActor, locked, BaseFarm(farm).getNumDeposits(currentActor) + 1, amt); + Demeter_BalancerFarm(farm).deposit(amt, locked); + uint256 usrBalanceAfter = ERC20(poolAddress).balanceOf(currentActor); + uint256 farmBalanceAfter = ERC20(poolAddress).balanceOf(farm); + assertEq(usrBalanceAfter, usrBalanceBefore - amt); + assertEq(farmBalanceAfter, farmBalanceBefore + amt); + } + + /// @notice Farm specific deposit logic + function deposit(address farm, bool locked, uint256 baseAmt, bytes memory revertMsg) + public + override + useKnownActor(user) + { + address poolAddress = getPoolAddress(); + uint256 amt = baseAmt * 10 ** ERC20(poolAddress).decimals(); + deal(poolAddress, currentActor, amt); + ERC20(poolAddress).approve(address(farm), amt); + + vm.expectRevert(revertMsg); + Demeter_BalancerFarm(farm).deposit(amt, locked); + } + + function getPoolAddress() public view override returns (address) { + address poolAddress; + (poolAddress,) = IBalancerVault(BALANCER_VAULT).getPool(POOL_ID); + return poolAddress; + } +} diff --git a/test/utils/BaseSetup.t.sol b/test/utils/BaseSetup.t.sol new file mode 100644 index 00000000..a0cca8b4 --- /dev/null +++ b/test/utils/BaseSetup.t.sol @@ -0,0 +1,58 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.16; + +import {Test} from "forge-std/Test.sol"; +import {BaseFarm} from "../../contracts/BaseFarm.sol"; +import {FarmFactory} from "../../contracts/FarmFactory.sol"; +import {BaseFarmDeployer} from "../../contracts/BaseFarmDeployer.sol"; +import {ProxyAdmin} from "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; + +abstract contract BaseSetup is Test { + // Define global constants | Test config + // @dev Make it 0 to test on latest + uint256 public constant NUM_ACTORS = 12; + uint256 public constant GAS_LIMIT = 1000000000; + + // Define Demeter constants here + address internal PROXY_OWNER; + address internal FACTORY_OWNER; + address internal PROXY_ADMIN; + address internal DEMETER_FACTORY; + + // Define fork networks + uint256 internal forkCheck; + + address public owner; + address public factory; + address[] public actors; + address internal currentActor; + + /// @notice Get a pre-set address for prank + /// @param actorIndex Index of the actor + modifier useActor(uint256 actorIndex) { + currentActor = actors[bound(actorIndex, 0, actors.length - 1)]; + vm.startPrank(currentActor); + _; + vm.stopPrank(); + } + + /// @notice Start a prank session with a known user addr + modifier useKnownActor(address user) { + currentActor = user; + vm.startPrank(currentActor); + _; + vm.stopPrank(); + } + + /// @notice Initialize global test configuration. + function setUp() public virtual { + /// @dev Initialize actors for testing. + string memory mnemonic = vm.envString("TEST_MNEMONIC"); + for (uint32 i = 0; i < NUM_ACTORS; ++i) { + (address act,) = deriveRememberKey(mnemonic, i); + actors.push(act); + } + owner = actors[4]; + FACTORY_OWNER = actors[5]; + } +} diff --git a/test/utils/TestNetworkConfig.t.sol b/test/utils/TestNetworkConfig.t.sol new file mode 100644 index 00000000..a3e52f91 --- /dev/null +++ b/test/utils/TestNetworkConfig.t.sol @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.16; + +import {Arbitrum} from "./networkConfig/Arbitrum.t.sol"; + +// Select the test network configuration +abstract contract TestNetworkConfig is Arbitrum { + function setUp() public virtual override { + super.setUp(); + } +} diff --git a/test/utils/UpgradeUtil.t.sol b/test/utils/UpgradeUtil.t.sol new file mode 100644 index 00000000..a8bc5b86 --- /dev/null +++ b/test/utils/UpgradeUtil.t.sol @@ -0,0 +1,22 @@ +//SPDX-License-Identifier: Unlicensed +pragma solidity 0.8.16; + +import {ProxyAdmin} from "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; +import {TransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; + +contract UpgradeUtil { + ProxyAdmin public proxyAdmin; + + constructor() { + proxyAdmin = new ProxyAdmin(); + } + + function deployErc1967Proxy(address impl) public returns (address) { + TransparentUpgradeableProxy proxy = new TransparentUpgradeableProxy( + impl, + address(proxyAdmin), + "" + ); + return address(proxy); + } +} diff --git a/test/utils/networkConfig/Arbitrum.t.sol b/test/utils/networkConfig/Arbitrum.t.sol new file mode 100644 index 00000000..2a17b3ba --- /dev/null +++ b/test/utils/networkConfig/Arbitrum.t.sol @@ -0,0 +1,71 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.16; + +import {BaseSetup} from "../BaseSetup.t.sol"; +import {INetworkConfig} from "./INetworkConfig.sol"; +import {IERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; + +interface IVault { + function mintBySpecifyingCollateralAmt( + address _collateral, + uint256 _collateralAmt, + uint256 _minUSDSAmt, + uint256 _maxSPAburnt, + uint256 _deadline + ) external; +} + +abstract contract Arbitrum is BaseSetup, INetworkConfig { + // Tokens + address public constant SPA = 0x5575552988A3A80504bBaeB1311674fCFd40aD4B; + address public constant USDS = 0xD74f5255D557944cf7Dd0E45FF521520002D5748; + address public constant DAI = 0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1; + address public constant USDCe = 0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8; + address public constant USDT = 0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9; + + // Demeter constants + // @note Add only demeter related constants and configurations + address public constant SPA_REWARD_MANAGER = 0x432c3BcdF5E26Ec010dF9C1ddf8603bbe261c188; + address public constant USDS_VAULT = 0xF783DD830A4650D2A8594423F123250652340E3f; + + // Farm constants + // @note Add only specific farm related params, try to group them together + // Balancer + address public constant BALANCER_VAULT = 0xBA12222222228d8Ba445958a75a0704d566BF2C8; + + function fundFeeToken() public useKnownActor(owner) { + uint256 amt = 1e22; + deal(USDCe, currentActor, amt); + IERC20(USDCe).approve(USDS_VAULT, amt); + IVault(USDS_VAULT).mintBySpecifyingCollateralAmt(USDCe, amt, 0, 0, block.timestamp + 1200); + } + + function setForkNetwork() public override { + uint256 forkBlock = vm.envUint("FORK_BLOCK"); + string memory arbRpcUrl = vm.envString("ARB_URL"); + forkCheck = vm.createFork(arbRpcUrl); + vm.selectFork(forkCheck); + if (forkBlock != 0) vm.rollFork(forkBlock); + } + + function setUp() public virtual override { + super.setUp(); + setForkNetwork(); + + fundFeeToken(); + + // ** Setup global addresses ** // + // Demeter addresses + PROXY_OWNER = 0x6d5240f086637fb408c7F727010A10cf57D51B62; + PROXY_ADMIN = 0x3E49925A79CbFb68BAa5bc9DFb4f7D955D1ddF25; + DEMETER_FACTORY = 0xC4fb09E0CD212367642974F6bA81D8e23780A659; + } + + function FEE_TOKEN() public pure override returns (address) { + return USDS; + } + + function NETWORK_ID() public pure override returns (string memory) { + return "Arbitrum"; + } +} diff --git a/test/utils/networkConfig/INetworkConfig.sol b/test/utils/networkConfig/INetworkConfig.sol new file mode 100644 index 00000000..3cf57670 --- /dev/null +++ b/test/utils/networkConfig/INetworkConfig.sol @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.16; + +interface INetworkConfig { + function setForkNetwork() external; + + function FEE_TOKEN() external pure returns (address); + + function NETWORK_ID() external pure returns (string memory); +}