From 410b3d936cf9ed8bc8f9c0abe00c2d980a543a6d Mon Sep 17 00:00:00 2001 From: Julien Date: Sun, 3 Jul 2022 18:34:18 +0200 Subject: [PATCH 01/57] :rocket: (aave-v2) create a deployment script using Solidity for aave-v2 --- config/mumbai-testnet/aave-v2/Config.sol | 20 +++ contracts/external/ProxyAdmin.sol | 99 +++++++++++++ .../external/TransparentUpgradeableProxy.sol | 132 ++++++++++++++++++ remappings.txt | 1 + scripts/DeployMorphoAaveV2.s.sol | 92 ++++++++++++ scripts/arguments.ts | 4 - 6 files changed, 344 insertions(+), 4 deletions(-) create mode 100644 config/mumbai-testnet/aave-v2/Config.sol create mode 100644 contracts/external/ProxyAdmin.sol create mode 100644 contracts/external/TransparentUpgradeableProxy.sol create mode 100644 scripts/DeployMorphoAaveV2.s.sol delete mode 100644 scripts/arguments.ts diff --git a/config/mumbai-testnet/aave-v2/Config.sol b/config/mumbai-testnet/aave-v2/Config.sol new file mode 100644 index 000000000..212c4a8eb --- /dev/null +++ b/config/mumbai-testnet/aave-v2/Config.sol @@ -0,0 +1,20 @@ +pragma solidity ^0.8.0; +import "../../../contracts/aave-v2/libraries/Types.sol"; + +contract Config { + address constant lendingPoolAddressesProvider = 0x178113104fEcbcD7fF8669a0150721e231F0FD4B; + address constant lendingPool = 0x9198F13B08E299d85E096929fA9781A1E3d5d827; + + address constant aave = 0x341d1f30e77D3FBfbD43D17183E2acb9dF25574E; + address constant dai = 0x001B3B4d0F3714Ca98ba10F6042DaEbF0B1B7b6F; + address constant usdc = 0x2058A9D7613eEE744279e3856Ef0eAda5FCbaA7e; + address constant usdt = 0xBD21A10F619BE90d6066c941b04e340841F1F989; + address constant wbtc = 0x0d787a4a1548f673ed375445535a6c7A1EE56180; + address constant weth = 0x3C68CE8504087f89c640D02d133646d98e64ddd9; + address constant wmatic = 0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889; + + Types.MaxGasForMatching defaultMaxGasForMatching = + Types.MaxGasForMatching({supply: 3e6, borrow: 3e6, withdraw: 3e6, repay: 3e6}); + + uint256 constant defaultMaxSortedUsers = 20; +} diff --git a/contracts/external/ProxyAdmin.sol b/contracts/external/ProxyAdmin.sol new file mode 100644 index 000000000..63b0107d7 --- /dev/null +++ b/contracts/external/ProxyAdmin.sol @@ -0,0 +1,99 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity 0.8.12; + +import "./TransparentUpgradeableProxy.sol"; +import "@openzeppelin/contracts/access/Ownable.sol"; + +/** + * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an + * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}. + * This contract was fully forked from OpenZeppelin `ProxyAdmin` + */ +contract ProxyAdmin is Ownable { + /** + * @dev Returns the current implementation of `proxy`. + * + * Requirements: + * + * - This contract must be the admin of `proxy`. + */ + function getProxyImplementation(TransparentUpgradeableProxy proxy) + public + view + virtual + returns (address) + { + // We need to manually run the static call since the getter cannot be flagged as view + // bytes4(keccak256("implementation()")) == 0x5c60da1b + (bool success, bytes memory returndata) = address(proxy).staticcall(hex"5c60da1b"); + require(success); + return abi.decode(returndata, (address)); + } + + /** + * @dev Returns the current admin of `proxy`. + * + * Requirements: + * + * - This contract must be the admin of `proxy`. + */ + function getProxyAdmin(TransparentUpgradeableProxy proxy) + public + view + virtual + returns (address) + { + // We need to manually run the static call since the getter cannot be flagged as view + // bytes4(keccak256("admin()")) == 0xf851a440 + (bool success, bytes memory returndata) = address(proxy).staticcall(hex"f851a440"); + require(success); + return abi.decode(returndata, (address)); + } + + /** + * @dev Changes the admin of `proxy` to `newAdmin`. + * + * Requirements: + * + * - This contract must be the current admin of `proxy`. + */ + function changeProxyAdmin(TransparentUpgradeableProxy proxy, address newAdmin) + public + virtual + onlyOwner + { + proxy.changeAdmin(newAdmin); + } + + /** + * @dev Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}. + * + * Requirements: + * + * - This contract must be the admin of `proxy`. + */ + function upgrade(TransparentUpgradeableProxy proxy, address implementation) + public + virtual + onlyOwner + { + proxy.upgradeTo(implementation); + } + + /** + * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation. See + * {TransparentUpgradeableProxy-upgradeToAndCall}. + * + * Requirements: + * + * - This contract must be the admin of `proxy`. + */ + function upgradeAndCall( + TransparentUpgradeableProxy proxy, + address implementation, + bytes memory data + ) public payable virtual onlyOwner { + proxy.upgradeToAndCall{value: msg.value}(implementation, data); + } +} diff --git a/contracts/external/TransparentUpgradeableProxy.sol b/contracts/external/TransparentUpgradeableProxy.sol new file mode 100644 index 000000000..d823e6500 --- /dev/null +++ b/contracts/external/TransparentUpgradeableProxy.sol @@ -0,0 +1,132 @@ +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity 0.8.12; + +import "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; + +/** + * @dev This contract implements a proxy that is upgradeable by an admin. It is fully forked from OpenZeppelin + * `TransparentUpgradeableProxy` + * + * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector + * clashing], which can potentially be used in an attack, this contract uses the + * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two + * things that go hand in hand: + * + * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if + * that call matches one of the admin functions exposed by the proxy itself. + * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the + * implementation. If the admin tries to call a function on the implementation it will fail with an error that says + * "admin cannot fallback to proxy target". + * + * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing + * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due + * to sudden errors when trying to call a function from the proxy implementation. + * + * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, + * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy. + */ +contract TransparentUpgradeableProxy is ERC1967Proxy { + /** + * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and + * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}. + */ + constructor( + address _logic, + address admin_, + bytes memory _data + ) payable ERC1967Proxy(_logic, _data) { + assert(_ADMIN_SLOT == bytes32(uint256(keccak256("eip1967.proxy.admin")) - 1)); + _changeAdmin(admin_); + } + + /** + * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin. + */ + modifier ifAdmin() { + if (msg.sender == _getAdmin()) { + _; + } else { + _fallback(); + } + } + + /** + * @dev Returns the current admin. + * + * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. + * + * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the + * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. + * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103` + */ + function admin() external ifAdmin returns (address admin_) { + admin_ = _getAdmin(); + } + + /** + * @dev Returns the current implementation. + * + * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. + * + * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the + * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. + * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc` + */ + function implementation() external ifAdmin returns (address implementation_) { + implementation_ = _implementation(); + } + + /** + * @dev Changes the admin of the proxy. + * + * Emits an {AdminChanged} event. + * + * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}. + */ + function changeAdmin(address newAdmin) external virtual ifAdmin { + _changeAdmin(newAdmin); + } + + /** + * @dev Upgrade the implementation of the proxy. + * + * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}. + */ + function upgradeTo(address newImplementation) external ifAdmin { + _upgradeToAndCall(newImplementation, bytes(""), false); + } + + /** + * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified + * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the + * proxied contract. + * + * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}. + */ + function upgradeToAndCall(address newImplementation, bytes calldata data) + external + payable + ifAdmin + { + _upgradeToAndCall(newImplementation, data, true); + } + + /** + * @dev Returns the current admin. + */ + function _admin() internal view virtual returns (address) { + return _getAdmin(); + } + + /** + * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}. + */ + function _beforeFallback() internal virtual override { + require( + msg.sender != _getAdmin(), + "TransparentUpgradeableProxy: admin cannot fallback to proxy target" + ); + super._beforeFallback(); + } +} diff --git a/remappings.txt b/remappings.txt index 5e74107f7..eea625207 100644 --- a/remappings.txt +++ b/remappings.txt @@ -6,3 +6,4 @@ forge-std/=lib/forge-std/src/ @aave/periphery-v3/=lib/aave-v3-periphery/ @contracts/=contracts/ +@config/=config/ diff --git a/scripts/DeployMorphoAaveV2.s.sol b/scripts/DeployMorphoAaveV2.s.sol new file mode 100644 index 000000000..85104e967 --- /dev/null +++ b/scripts/DeployMorphoAaveV2.s.sol @@ -0,0 +1,92 @@ +import "@contracts/aave-v2/interfaces/IRewardsManager.sol"; +import {ILendingPoolAddressesProvider} from "@contracts/aave-v2/interfaces/aave/ILendingPoolAddressesProvider.sol"; + +import "forge-std/Script.sol"; +import "@config/mumbai-testnet/aave-v2/Config.sol"; +import "@contracts/external/ProxyAdmin.sol"; +import {EntryPositionsManager} from "@contracts/aave-v2/EntryPositionsManager.sol"; +import {ExitPositionsManager} from "@contracts/aave-v2/ExitPositionsManager.sol"; +import {Morpho} from "@contracts/aave-v2/Morpho.sol"; +import {InterestRatesManager} from "@contracts/aave-v2/InterestRatesManager.sol"; +import {RewardsManagerOnPolygon} from "@contracts/aave-v2/rewards-managers/RewardsManagerOnPolygon.sol"; +import {Lens} from "@contracts/aave-v2/Lens.sol"; + +/// @notice Contract to deploy Morpho AAVE on testnet +/// more informations here: https://book.getfoundry.sh/tutorials/solidity-scripting.html +contract DeployMorphoAaveV2 is Script, Config { + event ContractDeployed(string name, address deployedAddress); + + function run() external { + vm.startBroadcast(); + + ProxyAdmin proxyAdmin = new ProxyAdmin(); + emit ContractDeployed("Proxy Admin", address(proxyAdmin)); + + // Deploy Morpho's dependencies + EntryPositionsManager entryPositionsManager = new EntryPositionsManager(); + emit ContractDeployed("EntryPositionsManager", address(entryPositionsManager)); + ExitPositionsManager exitPositionsManager = new ExitPositionsManager(); + emit ContractDeployed("ExitPositionsManager", address(exitPositionsManager)); + InterestRatesManager interestRatesManager = new InterestRatesManager(); + emit ContractDeployed("InterestRatesManager", address(interestRatesManager)); + + // Deploy Morpho proxy + Morpho morphoImplementation = new Morpho(); + emit ContractDeployed("MorphoImplementation", address(morphoImplementation)); + TransparentUpgradeableProxy morphoProxy = new TransparentUpgradeableProxy( + address(morphoImplementation), + address(proxyAdmin), + abi.encodeWithSelector( // initialize function + morphoImplementation.initialize.selector, + entryPositionsManager, + exitPositionsManager, + interestRatesManager, + lendingPoolAddressesProvider, + defaultMaxGasForMatching, + defaultMaxSortedUsers + ) + ); + emit ContractDeployed("MorphoProxy", address(morphoProxy)); + + // Deploy Upgradeable RewardsManager + IRewardsManager rewardsManagerImplementation = new RewardsManagerOnPolygon(); + emit ContractDeployed( + "RewardsManagerImplementation", + address(rewardsManagerImplementation) + ); + + TransparentUpgradeableProxy rewardsManagerProxy = new TransparentUpgradeableProxy( + address(rewardsManagerImplementation), + address(proxyAdmin), + abi.encodeWithSelector( // initialize function + rewardsManagerImplementation.initialize.selector, + address(morphoProxy) + ) + ); + emit ContractDeployed("RewardsManagerProxy", address(rewardsManagerProxy)); + Morpho morpho = Morpho(address(morphoProxy)); + morpho.setRewardsManager(IRewardsManager(address(rewardsManagerProxy))); + + // Deploy Upgradeable Lens + Lens lens = new Lens( + address(morpho), + ILendingPoolAddressesProvider(lendingPoolAddressesProvider) + ); + emit ContractDeployed("Lens", address(lens)); + + // Deploy markets + Types.MarketParameters memory defaultMarketParameters = Types.MarketParameters({ + reserveFactor: 1000, + p2pIndexCursor: 3333 + }); + morpho.createMarket(aave, defaultMarketParameters); + morpho.createMarket(dai, defaultMarketParameters); + morpho.createMarket(usdc, defaultMarketParameters); + morpho.createMarket(usdt, defaultMarketParameters); + morpho.createMarket(wbtc, defaultMarketParameters); + morpho.createMarket(weth, defaultMarketParameters); + morpho.createMarket(wmatic, defaultMarketParameters); + + vm.stopBroadcast(); + } +} diff --git a/scripts/arguments.ts b/scripts/arguments.ts deleted file mode 100644 index 46608e734..000000000 --- a/scripts/arguments.ts +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = [ - '0xAa46616494A3A6359401f92eC324E540707EB539', // Markets - '0xcfa7b0e37f5ac60f3ae25226f5e39ec59ad26152', // Proxy -]; From 65e16884bca249a56fe602b044a56179d9f44416 Mon Sep 17 00:00:00 2001 From: Julien Date: Sun, 3 Jul 2022 18:38:30 +0200 Subject: [PATCH 02/57] :memo: (aave-v2) document the deployment command using in the `README.md` --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c3fa47834..36a8e823c 100644 --- a/README.md +++ b/README.md @@ -114,13 +114,17 @@ By default, PR are rebased with `dev` before merging to keep a clean historic of ## Deploying a contract on a network 🚀 -You can run the following command to deploy Morpho's contracts for Aave on Polygon: +You can run the following command to deploy Morpho's contracts for Aave on Mumbai by using foundry: ```bash -yarn deploy:aave:polygon +forge script script/DeployMorphoAaveV2.s.sol:DeployMorphoAaveV2 --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast --verify --etherscan-api-key $ETHERSCAN_API_KEY -vvvv ``` -For the other commands, check the [package.json](./package.json) file. +Make sure to have the correct environement variables setted before running the deployment script. You can add them to a .env.local environement file, and run this before executing the previous deployment command: + +```bash +source .env.local +``` ## Publishing and verifying a contract on Etherscan 📡 From c0da1c93c5dacd18d89d82a88e5d946a7c1227fb Mon Sep 17 00:00:00 2001 From: Julien Date: Thu, 7 Jul 2022 10:19:35 +0200 Subject: [PATCH 03/57] :hammer: (aave-v2) add the deployment script to the `Makefile` --- Makefile | 5 +++++ README.md | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9bd22612f..a1a5e9c92 100644 --- a/Makefile +++ b/Makefile @@ -104,6 +104,11 @@ ansi-s-%: @echo Running single test $* of ${PROTOCOL} on ${NETWORK} @forge test -vvvvv --match-test $* > trace.ansi +run-script-%: + @echo Running single script $* of ${PROTOCOL} on ${NETWORK} + @forge script scripts/$*.s.sol:$* --private-key $PRIVATE_KEY --broadcast -vvvv + + config: @forge config diff --git a/README.md b/README.md index 36a8e823c..640748b05 100644 --- a/README.md +++ b/README.md @@ -117,7 +117,7 @@ By default, PR are rebased with `dev` before merging to keep a clean historic of You can run the following command to deploy Morpho's contracts for Aave on Mumbai by using foundry: ```bash -forge script script/DeployMorphoAaveV2.s.sol:DeployMorphoAaveV2 --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast --verify --etherscan-api-key $ETHERSCAN_API_KEY -vvvv +PRIVATE_KEY=abcabcabc make run-script-DeployMorphoAaveV2 ``` Make sure to have the correct environement variables setted before running the deployment script. You can add them to a .env.local environement file, and run this before executing the previous deployment command: From 5071f8d0c4294728763165a38f56cd9c29c4dc3d Mon Sep 17 00:00:00 2001 From: Rubilmax Date: Wed, 20 Jul 2022 15:49:40 +0200 Subject: [PATCH 04/57] =?UTF-8?q?=E2=9C=A8=20Added=20Morpho-Compound=20dep?= =?UTF-8?q?loyment=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 22 ++- README.md | 10 +- config/goerli-config.json | 32 ---- config/goerli/compound/Config.sol | 22 +++ config/mainnet-config.json | 60 ------ config/polygon-mainnet-config.json | 158 ---------------- config/polygon-mumbai-config.json | 109 ----------- .../aave-v2/Config.sol | 10 +- config/rinkeby-config.json | 29 --- config/ropsten-config.json | 26 --- config/ropsten/compound/Config.sol | 36 ++++ contracts/external/ProxyAdmin.sol | 99 ---------- .../external/TransparentUpgradeableProxy.sol | 132 -------------- foundry.toml | 2 +- remappings.txt | 1 - scripts/DeployMorphoAaveV2.s.sol | 92 ---------- scripts/aave-v2/Deploy.s.sol | 89 +++++++++ scripts/compound/Deploy.s.sol | 100 ++++++++++ scripts/compound/deploy.sh | 171 ------------------ 19 files changed, 268 insertions(+), 932 deletions(-) delete mode 100644 config/goerli-config.json create mode 100644 config/goerli/compound/Config.sol delete mode 100644 config/mainnet-config.json delete mode 100644 config/polygon-mainnet-config.json delete mode 100644 config/polygon-mumbai-config.json rename config/{mumbai-testnet => polygon-mumbai}/aave-v2/Config.sol (80%) delete mode 100644 config/rinkeby-config.json delete mode 100644 config/ropsten-config.json create mode 100644 config/ropsten/compound/Config.sol delete mode 100644 contracts/external/ProxyAdmin.sol delete mode 100644 contracts/external/TransparentUpgradeableProxy.sol delete mode 100644 scripts/DeployMorphoAaveV2.s.sol create mode 100644 scripts/aave-v2/Deploy.s.sol create mode 100644 scripts/compound/Deploy.s.sol delete mode 100755 scripts/compound/deploy.sh diff --git a/Makefile b/Makefile index a1a5e9c92..94275f405 100644 --- a/Makefile +++ b/Makefile @@ -3,11 +3,13 @@ PROTOCOL?=compound NETWORK?=eth-mainnet +SMODE?=blockchain FOUNDRY_SRC=contracts/${PROTOCOL}/ FOUNDRY_TEST=test-foundry/${PROTOCOL}/ FOUNDRY_REMAPPINGS=@config/=config/${NETWORK}/${PROTOCOL}/ FOUNDRY_ETH_RPC_URL?=https://${NETWORK}.g.alchemy.com/v2/${ALCHEMY_KEY} +FOUNDRY_PRIVATE_KEY?=${DEPLOYER_PRIVATE_KEY} ifeq (${NETWORK}, eth-mainnet) FOUNDRY_CHAIN_ID=1 @@ -35,10 +37,14 @@ ifeq (${NETWORK}, avalanche-mainnet) else endif -ifneq (, $(filter ${NETWORK}, ropsten rinkeby)) +ifneq (, $(filter ${NETWORK}, ropsten rinkeby goerli)) FOUNDRY_ETH_RPC_URL=https://${NETWORK}.infura.io/v3/${INFURA_PROJECT_ID} endif +ifeq (${SMODE}, anvil) + FOUNDRY_ETH_RPC_URL=http://localhost:8545 +endif + install: @yarn @@ -47,11 +53,13 @@ install: @chmod +x ./scripts/**/*.sh -deploy: - ./scripts/${PROTOCOL}/deploy.sh +anvil: + @echo Starting fork of ${NETWORK} + @anvil --fork-url ${FOUNDRY_ETH_RPC_URL} -initialize: - ./scripts/${PROTOCOL}/initialize.sh +script-%: + @echo Running script $* of ${PROTOCOL} on ${NETWORK} with script mode: ${SMODE} + @forge script scripts/${PROTOCOL}/$*.s.sol:$* --broadcast -vvvv create-market: ./scripts/create-market.sh @@ -104,10 +112,6 @@ ansi-s-%: @echo Running single test $* of ${PROTOCOL} on ${NETWORK} @forge test -vvvvv --match-test $* > trace.ansi -run-script-%: - @echo Running single script $* of ${PROTOCOL} on ${NETWORK} - @forge script scripts/$*.s.sol:$* --private-key $PRIVATE_KEY --broadcast -vvvv - config: @forge config diff --git a/README.md b/README.md index 640748b05..2d639f108 100644 --- a/README.md +++ b/README.md @@ -114,16 +114,10 @@ By default, PR are rebased with `dev` before merging to keep a clean historic of ## Deploying a contract on a network 🚀 -You can run the following command to deploy Morpho's contracts for Aave on Mumbai by using foundry: +You can run the following command to deploy Morpho-Aave's contracts on Mumbai by using foundry: ```bash -PRIVATE_KEY=abcabcabc make run-script-DeployMorphoAaveV2 -``` - -Make sure to have the correct environement variables setted before running the deployment script. You can add them to a .env.local environement file, and run this before executing the previous deployment command: - -```bash -source .env.local +make script-DeployMorphoAaveV2 PROTOCOL=aave-v2 NETWORK=polygon-mumbai ``` ## Publishing and verifying a contract on Etherscan 📡 diff --git a/config/goerli-config.json b/config/goerli-config.json deleted file mode 100644 index 77bc1accb..000000000 --- a/config/goerli-config.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "tokens": { - "cDai": { - "address": "0x822397d9a55d0fefd20f5c4bcab33c5f65bd28eb", - "abi": "@config/abis/mainnet/CErc20.json" - }, - "cUsdc": { - "address": "0xcec4a43ebb02f9b80916f1c718338169d6d5c1f0", - "abi": "@config/abis/mainnet/CErc20.json" - }, - "cBat": { - "address": "0xccaf265e7492c0d9b7c2f0018bf6382ba7f0148d", - "abi": "@config/abis/mainnet/CErc20.json" - }, - "cZrx": { - "address": "0xa253295ec2157b8b69c44b2cb35360016daa25b1", - "abi": "@config/abis/mainnet/CErc20.json" - }, - "cEth": { - "address": "0x20572e4c090f15667cf7378e16fad2ea0e2f3eff" - }, - "wEth": { - "address": "0xffc94fb06b924e6dba5f0325bbed941807a018cd" - } - }, - "compound": { - "comptroller": { - "address": "0xe16c7165c8fea64069802ae4c4c9c320783f2b6e", - "abi": "@config/abis/mainnet/Comptroller.json" - } - } -} diff --git a/config/goerli/compound/Config.sol b/config/goerli/compound/Config.sol new file mode 100644 index 000000000..43ebe0bf5 --- /dev/null +++ b/config/goerli/compound/Config.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GNU AGPLv3 +pragma solidity 0.8.13; + +import "@contracts/compound/libraries/Types.sol"; + +contract Config { + address constant cBat = 0xCCaF265E7492c0d9b7C2f0018bf6382Ba7f0148D; + address constant cDai = 0x822397d9a55d0fefd20F5c4bCaB33C5F65bd28Eb; + address constant cEth = 0x20572e4c090f15667cF7378e16FaD2eA0e2f3EfF; + address constant cRep = 0x1d70B01A2C3e3B2e56FcdcEfe50d5c5d70109a5D; + address constant cSai = 0x5D4373F8C1AF21C391aD7eC755762D8dD3CCA809; + address constant cUsdc = 0xCEC4a43eBB02f9B80916F1c718338169d6d5C1F0; + address constant cWbtc = 0x6CE27497A64fFFb5517AA4aeE908b1E7EB63B9fF; + address constant cZrx = 0xA253295eC2157B8b69C44b2cb35360016DAa25b1; + + address constant wEth = 0xb7e94Cce902E34e618A23Cb82432B95d03096146; + address constant comptroller = 0x627EA49279FD0dE89186A58b8758aD02B6Be2867; + + uint256 constant defaultMaxSortedUsers = 8; + Types.MaxGasForMatching defaultMaxGasForMatching = + Types.MaxGasForMatching({supply: 1e5, borrow: 1e5, withdraw: 1e5, repay: 1e5}); +} diff --git a/config/mainnet-config.json b/config/mainnet-config.json deleted file mode 100644 index 86964453b..000000000 --- a/config/mainnet-config.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "tokens": { - "cToken": { - "abi": "@config/abis/mainnet/CErc20.json" - }, - "cEth": { - "address": "0x4Ddc2D193948926D02f9B1fE9e1daa0718270ED5", - "abi": "@config/abis/mainnet/CEth.json" - }, - "cDai": { - "address": "0x5d3a536e4d6dbd6114cc1ead35777bab948e3643", - "abi": "@config/abis/mainnet/CErc20.json" - }, - "cUsdc": { - "address": "0x39AA39c021dfbaE8faC545936693aC917d5E7563", - "abi": "@config/abis/mainnet/CErc20.json" - }, - "cUsdt": { - "address": "0xf650c3d88d12db855b8bf7d11be6c55a4e07dcc9", - "abi": "@config/abis/mainnet/CErc20.json" - }, - "cUni": { - "address": "0x35a18000230da775cac24873d00ff85bccded550", - "abi": "@config/abis/mainnet/CErc20.json" - }, - "cMkr": { - "address": "0x95b4ef2869ebd94beb4eee400a99824bf5dc325b", - "abi": "@config/abis/mainnet/CErc20.json" - }, - "dai": { - "address": "0x6B175474E89094C44Da98b954EedeAC495271d0F", - "whale": "0x60594a405d53811d3bc4766596efd80fd545a270", - "abi": "@config/abis/mainnet/Dai.json" - }, - "usdc": { - "address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", - "whale": "0x72a53cdbbcc1b9efa39c834a540550e23463aacb", - "abi": "@config/abis/mainnet/USDC.json" - }, - "usdt": { - "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7", - "whale": "0x11b815efb8f581194ae79006d24e0d814b7697f6", - "abi": "@config/abis/mainnet/USDT.json" - }, - "uni": { - "address": "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984", - "whale": "0x1d42064fc4beb5f8aaf85f4617ae8b3b5b8bd801", - "abi": "@config/abis/mainnet/UNI.json" - } - }, - "compound": { - "comptroller": { - "address": "0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B", - "abi": "@config/abis/mainnet/Comptroller.json" - }, - "oracle": { - "abi": "@config/abis/mainnet/UniswapAnchoredView.json" - } - } -} diff --git a/config/polygon-mainnet-config.json b/config/polygon-mainnet-config.json deleted file mode 100644 index 5264aad27..000000000 --- a/config/polygon-mainnet-config.json +++ /dev/null @@ -1,158 +0,0 @@ -{ - "tokens": { - "cToken": { - "abi": "@config/abis/polygon/CErc20.json" - }, - "cEth": { - "_comment": "This is for crMATIC", - "address": "0x3FaE5e5722C51cdb5B0afD8c7082e8a6AF336Ee8", - "abi": "@config/abis/polygon/CEth.json" - }, - "cDai": { - "address": "0x4eCEDdF62277eD78623f9A94995c680f8fd6C00e", - "abi": "@config/abis/polygon/CErc20.json" - }, - "cUsdc": { - "address": "0x73CF8c5D14Aa0EbC89f18272A568319F5BAB6cBD", - "abi": "@config/abis/polygon/CErc20.json" - }, - "cUsdt": { - "address": "0xf976C9bc0E16B250E0B1523CffAa9E4c07Bc5C8a", - "abi": "@config/abis/polygon/CErc20.json" - }, - "cUni": { - "address": "0x7ea7174dD0CB4Ab84f42177F01e9a8a79475d381", - "abi": "@config/abis/polygon/CErc20.json" - }, - "cMkr": { - "_comment": "There is no crMKR crToken, so this address is in fact crLINK", - "address": "0x20d5d319C2964ecb52e1B006a4C059b7f6d6ad0a", - "abi": "@config/abis/polygon/CErc20.json" - }, - "dai": { - "address": "0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063", - "whale": "0x27f8d03b3a2196956ed754badc28d73be8830a6e", - "abi": "@config/abis/polygon/Dai.json" - }, - "usdc": { - "address": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174", - "whale": "0x1a13f4ca1d028320a707d99520abfefca3998b7f", - "abi": "@config/abis/polygon/USDC.json" - }, - "usdt": { - "address": "0xc2132d05d31c914a87c6611c10748aeb04b58e8f", - "whale": "0x0d0707963952f2fba59dd06f2b425ace40b492fe", - "abi": "@config/abis/polygon/USDT.json" - }, - "uni": { - "address": "0xb33eaad8d922b1083446dc23f610c2567fb5180f", - "whale": "0xf7135272a5584eb116f5a77425118a8b4a2ddfdb", - "abi": "@config/abis/polygon/UNI.json" - }, - "wbtc": { - "address": "0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6", - "whale": "0xdc9232e2df177d7a12fdff6ecbab114e2231198d", - "abi": "@config/abis/polygon/WBTC.json" - }, - "wmatic": { - "address": "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270", - "whale": "0xadbf1854e5883eb8aa7baf50705338739e558e5b", - "abi": "@config/abis/polygon/WMATIC.json" - }, - "wEth": { - "address": "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619", - "abi": "@config/abis/polygon/WETH.json" - }, - "aave": { - "address": "0xD6DF932A45C0f255f85145f286eA0b292B21C90B", - "abi": "@config/abis/polygon/AAVE.json" - }, - "aToken": { - "abi": "@config/abis/polygon/aToken.json" - }, - "variableDebtToken": { - "abi": "@config/abis/polygon/VariableDebtToken.json" - }, - "aDai": { - "address": "0x27F8D03b3a2196956ED754baDc28D73be8830A6e", - "abi": "@config/abis/polygon/aToken.json" - }, - "aUsdc": { - "address": "0x1a13F4Ca1d028320A707D99520AbFefca3998b7F", - "abi": "@config/abis/polygon/aToken.json" - }, - "aUsdt": { - "address": "0x60D55F02A771d515e077c9C2403a1ef324885CeC", - "abi": "@config/abis/polygon/aToken.json" - }, - "aWeth": { - "address": "0x28424507fefb6f7f8E9D3860F56504E4e5f5f390", - "abi": "@config/abis/polygon/aToken.json" - }, - "aWbtc": { - "address": "0x5c2ed810328349100A66B82b78a1791B101C9D61", - "abi": "@config/abis/polygon/aToken.json" - }, - "aWmatic": { - "address": "0x8dF3aad3a84da6b69A4DA8aeC3eA40d9091B2Ac4", - "abi": "@config/abis/polygon/aToken.json" - }, - "aAave": { - "address": "0x1d2a0E5EC8E5bBDCA5CB219e649B565d8e5c3360", - "abi": "@config/abis/polygon/aToken.json" - }, - "variableDebtDai": { - "address": "0x75c4d1Fb84429023170086f06E682DcbBF537b7d", - "abi": "@config/abis/polygon/VariableDebtToken.json" - }, - "variableDebtUsdc": { - "address": "0x248960A9d75EdFa3de94F7193eae3161Eb349a12", - "abi": "@config/abis/polygon/VariableDebtToken.json" - }, - "variableDebtUsdt": { - "address": "0x8038857FD47108A07d1f6Bf652ef1cBeC279A2f3", - "abi": "@config/abis/polygon/VariableDebtToken.json" - }, - "variableDebtWbtc": { - "address": "0xF664F50631A6f0D72ecdaa0e49b0c019Fa72a8dC", - "abi": "@config/abis/polygon/VariableDebtToken.json" - } - }, - "compound": { - "comptroller": { - "address": "0x20CA53E2395FA571798623F1cFBD11Fe2C114c24", - "abi": "@config/abis/polygon/Comptroller.json" - }, - "oracle": { - "abi": "@config/abis/polygon/UniswapAnchoredView.json" - } - }, - "aave": { - "lendingPoolAddressesProvider": { - "address": "0xd05e3E715d945B59290df0ae8eF85c1BdB684744", - "abi": "@config/abis/polygon/LendingPoolAddressesProvider.json" - }, - "lendingPool": { - "address": "0x8dff5e27ea6b7ac08ebfdf9eb090f32ee9a30fcf", - "abi": "@config/abis/polygon/LendingPool.json" - }, - "protocolDataProvider": { - "address": "0x7551b5D2763519d4e37e8B81929D336De671d46d", - "abi": "@config/abis/polygon/ProtocolDataProvider.json" - }, - "oracle": { - "address": "0x0229f777b0fab107f9591a41d5f02e4e98db6f2d", - "abi": "@config/abis/polygon/PriceOracle.json" - }, - "aaveIncentivesController": { - "address": "0x357D51124f59836DeD84c8a1730D72B749d8BC23", - "abi": "@config/abis/polygon/AaveIncentivesController.json" - } - }, - "uni-v3": { - "swapRouter": { - "address": "0xE592427A0AEce92De3Edee1F18E0157C05861564", - "abi": "@config/abis/polygon/SwapRouter.json" - } - } -} \ No newline at end of file diff --git a/config/polygon-mumbai-config.json b/config/polygon-mumbai-config.json deleted file mode 100644 index e2b6838c8..000000000 --- a/config/polygon-mumbai-config.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "tokens": { - "dai": { - "address": "0x001B3B4d0F3714Ca98ba10F6042DaEbF0B1B7b6F", - "whale": "0xda8ab4137fe28f969b27c780d313d1bb62c8341e", - "abi": "@config/abis/polygon/Dai.json" - }, - "usdc": { - "address": "0x2058A9D7613eEE744279e3856Ef0eAda5FCbaA7e", - "whale": "0x1480376ab166eb712cf944592d215ece0d47f268", - "abi": "@config/abis/polygon/USDC.json" - }, - "usdt": { - "address": "0xBD21A10F619BE90d6066c941b04e340841F1F989", - "whale": "0xdc8a8ec235dc8b3ffe03c7547849c8f1771ed733", - "abi": "@config/abis/polygon/USDT.json" - }, - "wbtc": { - "address": "0x0d787a4a1548f673ed375445535a6c7A1EE56180", - "whale": "0x95298790beb442f204e3864c5bd4073905185108", - "abi": "@config/abis/polygon/WBTC.json" - }, - "wmatic": { - "address": "0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889", - "whale": "0x8a2f72e86eb3b4a336d09b099f83a4255ef21d25", - "abi": "@config/abis/polygon/WMATIC.json" - }, - "wEth": { - "address": "0x3C68CE8504087f89c640D02d133646d98e64ddd9", - "abi": "@config/abis/polygon/WETH.json" - }, - "aave": { - "address": "0x341d1f30e77D3FBfbD43D17183E2acb9dF25574E", - "abi": "@config/abis/polygon/AAVE.json" - }, - "aToken": { - "abi": "@config/abis/polygon/aToken.json" - }, - "variableDebtToken": { - "abi": "@config/abis/polygon/VariableDebtToken.json" - }, - "aDai": { - "address": "0x639cB7b21ee2161DF9c882483C9D55c90c20Ca3e", - "abi": "@config/abis/polygon/aToken.json" - }, - "aUsdc": { - "address": "0x2271e3Fef9e15046d09E1d78a8FF038c691E9Cf9", - "abi": "@config/abis/polygon/aToken.json" - }, - "aUsdt": { - "address": "0xF8744C0bD8C7adeA522d6DDE2298b17284A79D1b", - "abi": "@config/abis/polygon/aToken.json" - }, - "aWeth": { - "address": "0x7aE20397Ca327721F013BB9e140C707F82871b56", - "abi": "@config/abis/polygon/aToken.json" - }, - "aWbtc": { - "address": "0xc9276ECa6798A14f64eC33a526b547DAd50bDa2F", - "abi": "@config/abis/polygon/aToken.json" - }, - "aWmatic": { - "address": "0xF45444171435d0aCB08a8af493837eF18e86EE27", - "abi": "@config/abis/polygon/aToken.json" - }, - "aAave": { - "address": "0x7ec62b6fC19174255335C8f4346E0C2fcf870a6B", - "abi": "@config/abis/polygon/aToken.json" - }, - "variableDebtDai": { - "address": "0x6D29322ba6549B95e98E9B08033F5ffb857f19c5", - "abi": "@config/abis/polygon/VariableDebtToken.json" - }, - "variableDebtUsdc": { - "address": "0x05771A896327ee702F965FB6E4A35A9A57C84a2a", - "abi": "@config/abis/polygon/VariableDebtToken.json" - }, - "variableDebtUsdt": { - "address": "0x6C0a86573a63672D8a66C037036e441A59086d68", - "abi": "@config/abis/polygon/VariableDebtToken.json" - }, - "variableDebtWbtc": { - "address": "0xc156967272b7177DcE40E3b3E7c4269f750F3160", - "abi": "@config/abis/polygon/VariableDebtToken.json" - } - }, - "aave": { - "lendingPoolAddressesProvider": { - "address": "0x178113104fEcbcD7fF8669a0150721e231F0FD4B", - "abi": "@config/abis/polygon/LendingPoolAddressesProvider.json" - }, - "lendingPool": { - "address": "0x9198F13B08E299d85E096929fA9781A1E3d5d827", - "abi": "@config/abis/polygon/LendingPool.json" - }, - "protocolDataProvider": { - "address": "0xFA3bD19110d986c5e5E9DD5F69362d05035D045B", - "abi": "@config/abis/polygon/ProtocolDataProvider.json" - }, - "oracle": { - "address": "0xC365C653f7229894F93994CD0b30947Ab69Ff1D5", - "abi": "@config/abis/polygon/PriceOracle.json" - }, - "aaveIncentivesController": { - "address": "0xd41aE58e803Edf4304334acCE4DC4Ec34a63C644", - "abi": "@config/abis/polygon/AaveIncentivesController.json" - } - } -} diff --git a/config/mumbai-testnet/aave-v2/Config.sol b/config/polygon-mumbai/aave-v2/Config.sol similarity index 80% rename from config/mumbai-testnet/aave-v2/Config.sol rename to config/polygon-mumbai/aave-v2/Config.sol index 212c4a8eb..c27b92340 100644 --- a/config/mumbai-testnet/aave-v2/Config.sol +++ b/config/polygon-mumbai/aave-v2/Config.sol @@ -1,9 +1,10 @@ pragma solidity ^0.8.0; -import "../../../contracts/aave-v2/libraries/Types.sol"; + +import "@contracts/aave-v2/libraries/Types.sol"; contract Config { - address constant lendingPoolAddressesProvider = 0x178113104fEcbcD7fF8669a0150721e231F0FD4B; address constant lendingPool = 0x9198F13B08E299d85E096929fA9781A1E3d5d827; + address constant lendingPoolAddressesProvider = 0x178113104fEcbcD7fF8669a0150721e231F0FD4B; address constant aave = 0x341d1f30e77D3FBfbD43D17183E2acb9dF25574E; address constant dai = 0x001B3B4d0F3714Ca98ba10F6042DaEbF0B1B7b6F; @@ -13,8 +14,7 @@ contract Config { address constant weth = 0x3C68CE8504087f89c640D02d133646d98e64ddd9; address constant wmatic = 0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889; + uint256 constant defaultMaxSortedUsers = 8; Types.MaxGasForMatching defaultMaxGasForMatching = - Types.MaxGasForMatching({supply: 3e6, borrow: 3e6, withdraw: 3e6, repay: 3e6}); - - uint256 constant defaultMaxSortedUsers = 20; + Types.MaxGasForMatching({supply: 1e5, borrow: 1e5, withdraw: 1e5, repay: 1e5}); } diff --git a/config/rinkeby-config.json b/config/rinkeby-config.json deleted file mode 100644 index 1bd7c6653..000000000 --- a/config/rinkeby-config.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "tokens": { - "cDai": { - "address": "0x6d7f0754ffeb405d23c51ce938289d4835be3b14", - "abi": "@config/abis/mainnet/CErc20.json" - }, - "cUsdc": { - "address": "0x5b281a6dda0b271e91ae35de655ad301c976edb1", - "abi": "@config/abis/mainnet/CErc20.json" - }, - "cBat": { - "address": "0xebf1a11532b93a529b5bc942b4baa98647913002", - "abi": "@config/abis/mainnet/CErc20.json" - }, - "cZrx": { - "address": "0x52201ff1720134bbbbb2f6bc97bf3715490ec19b", - "abi": "@config/abis/mainnet/CErc20.json" - }, - "cEth": { - "address": "0xd6801a1dffcd0a410336ef88def4320d6df1883e" - } - }, - "compound": { - "comptroller": { - "address": "0x2eaa9d77ae4d8f9cdd9faacd44016e746485bddb", - "abi": "@config/abis/mainnet/Comptroller.json" - } - } -} diff --git a/config/ropsten-config.json b/config/ropsten-config.json deleted file mode 100644 index d6488f67e..000000000 --- a/config/ropsten-config.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "tokens": { - "cDai": { - "address": "0xbc689667c13fb2a04f09272753760e38a95b998c", - "abi": "@config/abis/mainnet/CErc20.json" - }, - "cUsdc": { - "address": "0x2973e69b20563bcc66dc63bde153072c33ef37fe", - "abi": "@config/abis/mainnet/CErc20.json" - }, - "cBat": { - "address": "0xaf50a5a6af87418dac1f28f9797ceb3bfb62750a", - "abi": "@config/abis/mainnet/CErc20.json" - }, - "cZrx": { - "address": "0x6b8b0d7875b4182fb126877023fb93b934dd302a", - "abi": "@config/abis/mainnet/CErc20.json" - } - }, - "compound": { - "comptroller": { - "address": "0xcfa7b0e37f5ac60f3ae25226f5e39ec59ad26152", - "abi": "@config/abis/mainnet/Comptroller.json" - } - } -} diff --git a/config/ropsten/compound/Config.sol b/config/ropsten/compound/Config.sol new file mode 100644 index 000000000..326ab5e1b --- /dev/null +++ b/config/ropsten/compound/Config.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: GNU AGPLv3 +pragma solidity 0.8.13; + +import "@contracts/compound/libraries/Types.sol"; + +contract Config { + address constant wEth = address(0); + address constant dai = 0x31F42841c2db5173425b5223809CF3A38FEde360; + address constant usdc = 0x07865c6E87B9F70255377e024ace6630C1Eaa37F; + address constant usdt = 0x110a13FC3efE6A245B50102D2d79B3E76125Ae83; + address constant wbtc = 0x442Be68395613bDCD19778e761f03261ec46C06D; + address constant bat = 0x50390975D942E83D661D4Bde43BF73B0ef27b426; + address constant uni = 0xC8F88977E21630Cf93c02D02d9E8812ff0DFC37a; + address constant comp = 0xf76D4a441E4ba86A923ce32B89AFF89dBccAA075; + address constant zrx = 0xc0e2D7d9279846B80EacdEa57220AB2333BC049d; + address constant rep = 0xb1cBa8b721C7a241b9AD08C17F328886B014ACfE; + address constant sai = 0x63F7AB2f24322Ae2eaD6b971Cb9a71A1CC2eee03; + + address constant cEth = 0x859e9d8a4edadfEDb5A2fF311243af80F85A91b8; + address constant cDai = 0xbc689667C13FB2a04f09272753760E38a95B998C; + address constant cUsdc = 0x2973e69b20563bcc66dC63Bde153072c33eF37fe; + address constant cUsdt = 0xF6958Cf3127e62d3EB26c79F4f45d3F3b2CcdeD4; + address constant cWbtc = 0x541c9cB0E97b77F142684cc33E8AC9aC17B1990F; + address constant cBat = 0xaF50a5A6Af87418DAC1F28F9797CeB3bfB62750A; + address constant cUni = 0x65280b21167BBD059221488B7cBE759F9fB18bB5; + address constant cComp = 0x70014768996439F71C041179Ffddce973a83EEf2; + address constant cZrx = 0x6B8b0D7875B4182Fb126877023fB93b934dD302A; + address constant cRep = 0x2862065D57749f1576F48eF4393eb81c45fC2d88; + address constant cSai = 0x7Ac65E0f6dBA0EcB8845f17d07bF0776842690f8; + + address constant comptroller = 0xcfa7b0e37f5AC60f3ae25226F5e39ec59AD26152; + + uint256 constant defaultMaxSortedUsers = 8; + Types.MaxGasForMatching defaultMaxGasForMatching = + Types.MaxGasForMatching({supply: 1e5, borrow: 1e5, withdraw: 1e5, repay: 1e5}); +} diff --git a/contracts/external/ProxyAdmin.sol b/contracts/external/ProxyAdmin.sol deleted file mode 100644 index 63b0107d7..000000000 --- a/contracts/external/ProxyAdmin.sol +++ /dev/null @@ -1,99 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0 - -pragma solidity 0.8.12; - -import "./TransparentUpgradeableProxy.sol"; -import "@openzeppelin/contracts/access/Ownable.sol"; - -/** - * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an - * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}. - * This contract was fully forked from OpenZeppelin `ProxyAdmin` - */ -contract ProxyAdmin is Ownable { - /** - * @dev Returns the current implementation of `proxy`. - * - * Requirements: - * - * - This contract must be the admin of `proxy`. - */ - function getProxyImplementation(TransparentUpgradeableProxy proxy) - public - view - virtual - returns (address) - { - // We need to manually run the static call since the getter cannot be flagged as view - // bytes4(keccak256("implementation()")) == 0x5c60da1b - (bool success, bytes memory returndata) = address(proxy).staticcall(hex"5c60da1b"); - require(success); - return abi.decode(returndata, (address)); - } - - /** - * @dev Returns the current admin of `proxy`. - * - * Requirements: - * - * - This contract must be the admin of `proxy`. - */ - function getProxyAdmin(TransparentUpgradeableProxy proxy) - public - view - virtual - returns (address) - { - // We need to manually run the static call since the getter cannot be flagged as view - // bytes4(keccak256("admin()")) == 0xf851a440 - (bool success, bytes memory returndata) = address(proxy).staticcall(hex"f851a440"); - require(success); - return abi.decode(returndata, (address)); - } - - /** - * @dev Changes the admin of `proxy` to `newAdmin`. - * - * Requirements: - * - * - This contract must be the current admin of `proxy`. - */ - function changeProxyAdmin(TransparentUpgradeableProxy proxy, address newAdmin) - public - virtual - onlyOwner - { - proxy.changeAdmin(newAdmin); - } - - /** - * @dev Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}. - * - * Requirements: - * - * - This contract must be the admin of `proxy`. - */ - function upgrade(TransparentUpgradeableProxy proxy, address implementation) - public - virtual - onlyOwner - { - proxy.upgradeTo(implementation); - } - - /** - * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation. See - * {TransparentUpgradeableProxy-upgradeToAndCall}. - * - * Requirements: - * - * - This contract must be the admin of `proxy`. - */ - function upgradeAndCall( - TransparentUpgradeableProxy proxy, - address implementation, - bytes memory data - ) public payable virtual onlyOwner { - proxy.upgradeToAndCall{value: msg.value}(implementation, data); - } -} diff --git a/contracts/external/TransparentUpgradeableProxy.sol b/contracts/external/TransparentUpgradeableProxy.sol deleted file mode 100644 index d823e6500..000000000 --- a/contracts/external/TransparentUpgradeableProxy.sol +++ /dev/null @@ -1,132 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0 - -pragma solidity 0.8.12; - -import "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; - -/** - * @dev This contract implements a proxy that is upgradeable by an admin. It is fully forked from OpenZeppelin - * `TransparentUpgradeableProxy` - * - * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector - * clashing], which can potentially be used in an attack, this contract uses the - * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two - * things that go hand in hand: - * - * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if - * that call matches one of the admin functions exposed by the proxy itself. - * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the - * implementation. If the admin tries to call a function on the implementation it will fail with an error that says - * "admin cannot fallback to proxy target". - * - * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing - * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due - * to sudden errors when trying to call a function from the proxy implementation. - * - * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, - * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy. - */ -contract TransparentUpgradeableProxy is ERC1967Proxy { - /** - * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and - * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}. - */ - constructor( - address _logic, - address admin_, - bytes memory _data - ) payable ERC1967Proxy(_logic, _data) { - assert(_ADMIN_SLOT == bytes32(uint256(keccak256("eip1967.proxy.admin")) - 1)); - _changeAdmin(admin_); - } - - /** - * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin. - */ - modifier ifAdmin() { - if (msg.sender == _getAdmin()) { - _; - } else { - _fallback(); - } - } - - /** - * @dev Returns the current admin. - * - * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. - * - * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the - * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. - * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103` - */ - function admin() external ifAdmin returns (address admin_) { - admin_ = _getAdmin(); - } - - /** - * @dev Returns the current implementation. - * - * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. - * - * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the - * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. - * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc` - */ - function implementation() external ifAdmin returns (address implementation_) { - implementation_ = _implementation(); - } - - /** - * @dev Changes the admin of the proxy. - * - * Emits an {AdminChanged} event. - * - * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}. - */ - function changeAdmin(address newAdmin) external virtual ifAdmin { - _changeAdmin(newAdmin); - } - - /** - * @dev Upgrade the implementation of the proxy. - * - * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}. - */ - function upgradeTo(address newImplementation) external ifAdmin { - _upgradeToAndCall(newImplementation, bytes(""), false); - } - - /** - * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified - * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the - * proxied contract. - * - * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}. - */ - function upgradeToAndCall(address newImplementation, bytes calldata data) - external - payable - ifAdmin - { - _upgradeToAndCall(newImplementation, data, true); - } - - /** - * @dev Returns the current admin. - */ - function _admin() internal view virtual returns (address) { - return _getAdmin(); - } - - /** - * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}. - */ - function _beforeFallback() internal virtual override { - require( - msg.sender != _getAdmin(), - "TransparentUpgradeableProxy: admin cannot fallback to proxy target" - ); - super._beforeFallback(); - } -} diff --git a/foundry.toml b/foundry.toml index d53ef6bc1..c705dbfa4 100644 --- a/foundry.toml +++ b/foundry.toml @@ -1,4 +1,4 @@ -[default] +[profile.default] auto_detect_solc = true optimizer = true optimizer_runs = 200 diff --git a/remappings.txt b/remappings.txt index eea625207..5e74107f7 100644 --- a/remappings.txt +++ b/remappings.txt @@ -6,4 +6,3 @@ forge-std/=lib/forge-std/src/ @aave/periphery-v3/=lib/aave-v3-periphery/ @contracts/=contracts/ -@config/=config/ diff --git a/scripts/DeployMorphoAaveV2.s.sol b/scripts/DeployMorphoAaveV2.s.sol deleted file mode 100644 index 85104e967..000000000 --- a/scripts/DeployMorphoAaveV2.s.sol +++ /dev/null @@ -1,92 +0,0 @@ -import "@contracts/aave-v2/interfaces/IRewardsManager.sol"; -import {ILendingPoolAddressesProvider} from "@contracts/aave-v2/interfaces/aave/ILendingPoolAddressesProvider.sol"; - -import "forge-std/Script.sol"; -import "@config/mumbai-testnet/aave-v2/Config.sol"; -import "@contracts/external/ProxyAdmin.sol"; -import {EntryPositionsManager} from "@contracts/aave-v2/EntryPositionsManager.sol"; -import {ExitPositionsManager} from "@contracts/aave-v2/ExitPositionsManager.sol"; -import {Morpho} from "@contracts/aave-v2/Morpho.sol"; -import {InterestRatesManager} from "@contracts/aave-v2/InterestRatesManager.sol"; -import {RewardsManagerOnPolygon} from "@contracts/aave-v2/rewards-managers/RewardsManagerOnPolygon.sol"; -import {Lens} from "@contracts/aave-v2/Lens.sol"; - -/// @notice Contract to deploy Morpho AAVE on testnet -/// more informations here: https://book.getfoundry.sh/tutorials/solidity-scripting.html -contract DeployMorphoAaveV2 is Script, Config { - event ContractDeployed(string name, address deployedAddress); - - function run() external { - vm.startBroadcast(); - - ProxyAdmin proxyAdmin = new ProxyAdmin(); - emit ContractDeployed("Proxy Admin", address(proxyAdmin)); - - // Deploy Morpho's dependencies - EntryPositionsManager entryPositionsManager = new EntryPositionsManager(); - emit ContractDeployed("EntryPositionsManager", address(entryPositionsManager)); - ExitPositionsManager exitPositionsManager = new ExitPositionsManager(); - emit ContractDeployed("ExitPositionsManager", address(exitPositionsManager)); - InterestRatesManager interestRatesManager = new InterestRatesManager(); - emit ContractDeployed("InterestRatesManager", address(interestRatesManager)); - - // Deploy Morpho proxy - Morpho morphoImplementation = new Morpho(); - emit ContractDeployed("MorphoImplementation", address(morphoImplementation)); - TransparentUpgradeableProxy morphoProxy = new TransparentUpgradeableProxy( - address(morphoImplementation), - address(proxyAdmin), - abi.encodeWithSelector( // initialize function - morphoImplementation.initialize.selector, - entryPositionsManager, - exitPositionsManager, - interestRatesManager, - lendingPoolAddressesProvider, - defaultMaxGasForMatching, - defaultMaxSortedUsers - ) - ); - emit ContractDeployed("MorphoProxy", address(morphoProxy)); - - // Deploy Upgradeable RewardsManager - IRewardsManager rewardsManagerImplementation = new RewardsManagerOnPolygon(); - emit ContractDeployed( - "RewardsManagerImplementation", - address(rewardsManagerImplementation) - ); - - TransparentUpgradeableProxy rewardsManagerProxy = new TransparentUpgradeableProxy( - address(rewardsManagerImplementation), - address(proxyAdmin), - abi.encodeWithSelector( // initialize function - rewardsManagerImplementation.initialize.selector, - address(morphoProxy) - ) - ); - emit ContractDeployed("RewardsManagerProxy", address(rewardsManagerProxy)); - Morpho morpho = Morpho(address(morphoProxy)); - morpho.setRewardsManager(IRewardsManager(address(rewardsManagerProxy))); - - // Deploy Upgradeable Lens - Lens lens = new Lens( - address(morpho), - ILendingPoolAddressesProvider(lendingPoolAddressesProvider) - ); - emit ContractDeployed("Lens", address(lens)); - - // Deploy markets - Types.MarketParameters memory defaultMarketParameters = Types.MarketParameters({ - reserveFactor: 1000, - p2pIndexCursor: 3333 - }); - morpho.createMarket(aave, defaultMarketParameters); - morpho.createMarket(dai, defaultMarketParameters); - morpho.createMarket(usdc, defaultMarketParameters); - morpho.createMarket(usdt, defaultMarketParameters); - morpho.createMarket(wbtc, defaultMarketParameters); - morpho.createMarket(weth, defaultMarketParameters); - morpho.createMarket(wmatic, defaultMarketParameters); - - vm.stopBroadcast(); - } -} diff --git a/scripts/aave-v2/Deploy.s.sol b/scripts/aave-v2/Deploy.s.sol new file mode 100644 index 000000000..61b388ad4 --- /dev/null +++ b/scripts/aave-v2/Deploy.s.sol @@ -0,0 +1,89 @@ +// SPDX-License-Identifier: GNU AGPLv3 +pragma solidity 0.8.13; + +import "@contracts/aave-v2/interfaces/IRewardsManager.sol"; +import "@contracts/aave-v2/interfaces/aave/ILendingPoolAddressesProvider.sol"; + +import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; +import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; + +import {InterestRatesManager} from "@contracts/aave-v2/InterestRatesManager.sol"; +import {RewardsManagerOnPolygon} from "@contracts/aave-v2/rewards-managers/RewardsManagerOnPolygon.sol"; +import {EntryPositionsManager} from "@contracts/aave-v2/EntryPositionsManager.sol"; +import {ExitPositionsManager} from "@contracts/aave-v2/ExitPositionsManager.sol"; +import {Lens} from "@contracts/aave-v2/Lens.sol"; +import "@contracts/aave-v2/Morpho.sol"; + +import "@config/Config.sol"; +import "forge-std/Script.sol"; + +contract Deploy is Script, Config { + ProxyAdmin public proxyAdmin; + + Lens public lens; + Morpho public morpho; + IEntryPositionsManager public entryPositionsManager; + IExitPositionsManager public exitPositionsManager; + IInterestRatesManager public interestRatesManager; + IIncentivesVault public incentivesVault; + RewardsManagerOnPolygon public rewardsManager; + + function run() external { + vm.startBroadcast(); + + proxyAdmin = new ProxyAdmin(); + + // Deploy Morpho's dependencies + entryPositionsManager = new EntryPositionsManager(); + exitPositionsManager = new ExitPositionsManager(); + interestRatesManager = new InterestRatesManager(); + + // Deploy Morpho Proxy + Morpho morphoImpl = new Morpho(); + TransparentUpgradeableProxy morphoProxy = new TransparentUpgradeableProxy( + address(morphoImpl), + address(proxyAdmin), + abi.encodeWithSelector( + morphoImpl.initialize.selector, + entryPositionsManager, + exitPositionsManager, + interestRatesManager, + lendingPoolAddressesProvider, + defaultMaxGasForMatching, + defaultMaxSortedUsers + ) + ); + morpho = Morpho(address(morphoProxy)); + + // Deploy RewardsManager Proxy + IRewardsManager rewardsManagerImpl = new RewardsManagerOnPolygon(); + + TransparentUpgradeableProxy rewardsManagerProxy = new TransparentUpgradeableProxy( + address(rewardsManagerImpl), + address(proxyAdmin), + abi.encodeWithSelector(rewardsManagerImpl.initialize.selector, address(morphoProxy)) + ); + morpho.setRewardsManager(IRewardsManager(address(rewardsManagerProxy))); + + // Deploy Lens + lens = new Lens( + address(morpho), + ILendingPoolAddressesProvider(lendingPoolAddressesProvider) + ); + + // Deploy markets + Types.MarketParameters memory defaultMarketParameters = Types.MarketParameters({ + reserveFactor: 1000, + p2pIndexCursor: 3333 + }); + morpho.createMarket(aave, defaultMarketParameters); + morpho.createMarket(dai, defaultMarketParameters); + morpho.createMarket(usdc, defaultMarketParameters); + morpho.createMarket(usdt, defaultMarketParameters); + morpho.createMarket(wbtc, defaultMarketParameters); + morpho.createMarket(weth, defaultMarketParameters); + morpho.createMarket(wmatic, defaultMarketParameters); + + vm.stopBroadcast(); + } +} diff --git a/scripts/compound/Deploy.s.sol b/scripts/compound/Deploy.s.sol new file mode 100644 index 000000000..0148c18d7 --- /dev/null +++ b/scripts/compound/Deploy.s.sol @@ -0,0 +1,100 @@ +// SPDX-License-Identifier: GNU AGPLv3 +pragma solidity 0.8.13; + +import "@contracts/compound/interfaces/compound/ICompound.sol"; +import "@contracts/compound/interfaces/IRewardsManager.sol"; + +import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; +import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; + +import {IncentivesVault} from "@contracts/compound/IncentivesVault.sol"; +import {RewardsManager} from "@contracts/compound/RewardsManager.sol"; +import {InterestRatesManager} from "@contracts/compound/InterestRatesManager.sol"; +import {PositionsManager} from "@contracts/compound/PositionsManager.sol"; +import {Lens} from "@contracts/compound/lens/Lens.sol"; +import "@contracts/compound/Morpho.sol"; + +import "@config/Config.sol"; +import "forge-std/Script.sol"; + +contract Deploy is Script, Config { + ProxyAdmin public proxyAdmin; + + Lens public lens; + Morpho public morpho; + IPositionsManager public positionsManager; + IInterestRatesManager public interestRatesManager; + IIncentivesVault public incentivesVault; + RewardsManager public rewardsManager; + + function run() external { + vm.label(comptroller, "Comptroller"); + vm.label(cDai, "cDAI"); + vm.label(cEth, "cETH"); + vm.label(cUsdc, "cUSDC"); + vm.label(cWbtc, "cWBTC"); + vm.label(cBat, "cBAT"); + vm.label(wEth, "WETH"); + + vm.startBroadcast(); + + proxyAdmin = new ProxyAdmin(); + + // Deploy Morpho's dependencies + interestRatesManager = new InterestRatesManager(); + positionsManager = new PositionsManager(); + + // Deploy Morpho Proxy + Morpho morphoImpl = new Morpho(); + TransparentUpgradeableProxy morphoProxy = new TransparentUpgradeableProxy( + address(morphoImpl), + address(proxyAdmin), + abi.encodeWithSelector( + morphoImpl.initialize.selector, + positionsManager, + interestRatesManager, + comptroller, + defaultMaxGasForMatching, + 1, + defaultMaxSortedUsers, + cEth, + wEth + ) + ); + morpho = Morpho(payable(morphoProxy)); + + // Deploy RewardsManager Proxy + IRewardsManager rewardsManagerImpl = new RewardsManager(); + + TransparentUpgradeableProxy rewardsManagerProxy = new TransparentUpgradeableProxy( + address(rewardsManagerImpl), + address(proxyAdmin), + abi.encodeWithSelector(rewardsManagerImpl.initialize.selector, address(morpho)) + ); + rewardsManager = RewardsManager(address(rewardsManagerProxy)); + + morpho.setRewardsManager(IRewardsManager(address(rewardsManager))); + + // Deploy Lens Proxy + Lens lensImpl = new Lens(); + TransparentUpgradeableProxy lensProxy = new TransparentUpgradeableProxy( + address(lensImpl), + address(proxyAdmin), + abi.encodeWithSelector(lensImpl.initialize.selector, address(morpho)) + ); + lens = Lens(address(lensProxy)); + + // Create markets + Types.MarketParameters memory defaultMarketParameters = Types.MarketParameters({ + reserveFactor: 0, + p2pIndexCursor: 3333 + }); + morpho.createMarket(cDai, defaultMarketParameters); + morpho.createMarket(cUsdc, defaultMarketParameters); + morpho.createMarket(cEth, defaultMarketParameters); + morpho.createMarket(cWbtc, defaultMarketParameters); + morpho.createMarket(cBat, defaultMarketParameters); + + vm.stopBroadcast(); + } +} diff --git a/scripts/compound/deploy.sh b/scripts/compound/deploy.sh deleted file mode 100755 index 5f95b8342..000000000 --- a/scripts/compound/deploy.sh +++ /dev/null @@ -1,171 +0,0 @@ -#!/bin/bash -set -euo pipefail # exit on error -export $(xargs < .env.local) - - -read -p "🚀❓ Deploy Morpho-Compound's InterestRatesManager on ${NETWORK}? " -n 1 -r -echo - -if [[ $REPLY =~ ^[Yy]$ ]] -then - echo "Deploying Morpho-Compound's InterestRatesManager on ${NETWORK}..." - - forge create --private-key "${DEPLOYER_PRIVATE_KEY}" \ - --contracts contracts/compound \ - --optimize contracts/compound/InterestRatesManager.sol:InterestRatesManager \ - --verify - - echo "🎉 InterestRatesManager deployed!" -fi - - -echo "---" -read -p "🚀❓ Deploy Morpho-Compound's PositionsManager on ${NETWORK}? " -n 1 -r -echo - -if [[ $REPLY =~ ^[Yy]$ ]] -then - echo "Deploying Morpho-Compound's PositionsManager on ${NETWORK}..." - - forge create --private-key "${DEPLOYER_PRIVATE_KEY}" \ - --contracts contracts/compound \ - --optimize contracts/compound/PositionsManager.sol:PositionsManager \ - --verify - - echo "🎉 PositionsManager deployed!" -fi - - -echo "---" -read -p "🚀❓ Deploy Morpho-Compound's RewardsManager Implementation on ${NETWORK}? " -n 1 -r -echo - -if [[ $REPLY =~ ^[Yy]$ ]] -then - echo "Deploying Morpho-Compound's RewardsManager Implementation on ${NETWORK}..." - - forge create --private-key "${DEPLOYER_PRIVATE_KEY}" \ - --contracts contracts/compound \ - --optimize contracts/compound/RewardsManager.sol:RewardsManager \ - --verify - - echo "🎉 RewardsManager Implementation deployed!" -fi - - -echo "---" -read -p "🚀❓ Deploy Morpho-Compound's Implementation on ${NETWORK}? " -n 1 -r -echo - -if [[ $REPLY =~ ^[Yy]$ ]] -then - echo "Deploying Morpho-Compound's Implementation on ${NETWORK}..." - - forge create --private-key "${DEPLOYER_PRIVATE_KEY}" \ - --contracts contracts/compound \ - --optimize contracts/compound/Morpho.sol:Morpho \ - --verify - - echo "🎉 Morpho Implementation deployed!" -fi - - -echo "---" -read -p "🚀❓ Deploy Morpho-Compound's Lens Implementation on ${NETWORK}? " -n 1 -r -echo - -if [[ $REPLY =~ ^[Yy]$ ]] -then - echo "Deploying Morpho-Compound's Lens Implementation on $NETWORK..." - - forge create --private-key "${DEPLOYER_PRIVATE_KEY}" \ - --contracts contracts/compound \ - --optimize contracts/compound/Lens.sol:Lens \ - --verify - - echo "🎉 Lens Implementation deployed!" -fi - - -echo "---" -read -p "🚀❓ Deploy Morpho-Compound's ProxyAdmin on ${NETWORK}? " -n 1 -r -echo - -if [[ $REPLY =~ ^[Yy]$ ]] -then - echo "Deploying Morpho-Compound's ProxyAdmin on ${NETWORK}..." - - forge create --private-key "${DEPLOYER_PRIVATE_KEY}" \ - --contracts node_modules/@openzeppelin/contracts/proxy \ - --optimize node_modules/@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol:ProxyAdmin \ - --verify - - echo "🎉 ProxyAdmin deployed!" -fi - - -echo "---" -read -p "🚀❓ Deploy Morpho-Compound's Proxy on ${NETWORK}? " -n 1 -r -echo - -if [[ $REPLY =~ ^[Yy]$ ]] -then - read -p " Morpho-Compound's Implementation address? " -r MORPHO_IMPL_ADDRESS - read -p " Morpho-Compound's ProxyAdmin address on ${NETWORK}? " -r MORPHO_PROXY_ADMIN_ADDRESS - - echo "Deploying Morpho-Compound's Proxy on ${NETWORK} for Implementation at ${MORPHO_IMPL_ADDRESS}, owned by ${MORPHO_PROXY_ADMIN_ADDRESS}..." - - forge create --private-key "${DEPLOYER_PRIVATE_KEY}" \ - --contracts node_modules/@openzeppelin/contracts/proxy \ - --optimize node_modules/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol:TransparentUpgradeableProxy \ - --verify \ - --constructor-args "${MORPHO_IMPL_ADDRESS}" "${MORPHO_PROXY_ADMIN_ADDRESS}" "" - - echo "🎉 Morpho Proxy deployed!" -fi - - -echo "---" -read -p "🚀❓ Deploy Morpho-Compound's RewardsManager Proxy on ${NETWORK}? " -n 1 -r -echo - -if [[ $REPLY =~ ^[Yy]$ ]] -then - read -p " Morpho-Compound's RewardsManager Implementation address? " -r MORPHO_REWARDS_MANAGER_IMPL_ADDRESS - read -p " Morpho-Compound's ProxyAdmin address on ${NETWORK}? " -r MORPHO_PROXY_ADMIN_ADDRESS - - echo "Deploying Morpho-Compound's RewardsManager Proxy on ${NETWORK} for Implementation at ${MORPHO_REWARDS_MANAGER_IMPL_ADDRESS}, owned by ${MORPHO_PROXY_ADMIN_ADDRESS}..." - - forge create --private-key "${DEPLOYER_PRIVATE_KEY}" \ - --contracts node_modules/@openzeppelin/contracts/proxy \ - --optimize node_modules/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol:TransparentUpgradeableProxy \ - --verify \ - --constructor-args "${MORPHO_REWARDS_MANAGER_IMPL_ADDRESS}" "${MORPHO_PROXY_ADMIN_ADDRESS}" "" - - echo "🎉 RewardsManager Proxy deployed!" -fi - - -echo "---" -read -p "🚀❓ Deploy Morpho-Compound's Lens Proxy on ${NETWORK}? " -n 1 -r -echo - -if [[ $REPLY =~ ^[Yy]$ ]] -then - read -p " Morpho-Compound's Lens Implementation address? " -r MORPHO_LENS_IMPL_ADDRESS - read -p " Morpho-Compound's ProxyAdmin address on ${NETWORK}? " -r MORPHO_PROXY_ADMIN_ADDRESS - - echo "Deploying Morpho-Compound's Lens Proxy on ${NETWORK} for Implementation at ${MORPHO_LENS_IMPL_ADDRESS}, owned by ${MORPHO_PROXY_ADMIN_ADDRESS}..." - - forge create --private-key "${DEPLOYER_PRIVATE_KEY}" \ - --contracts node_modules/@openzeppelin/contracts/proxy \ - --optimize node_modules/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol:TransparentUpgradeableProxy \ - --verify \ - --constructor-args "${MORPHO_LENS_IMPL_ADDRESS}" "${MORPHO_PROXY_ADMIN_ADDRESS}" "" - - echo "🎉 Lens Proxy deployed!" -fi - - -echo "---" -echo "🎉 Deployment completed!" From ee37be32249d56c139c893d51640a10bb49b1c3d Mon Sep 17 00:00:00 2001 From: Rubilmax Date: Thu, 21 Jul 2022 15:47:10 +0200 Subject: [PATCH 05/57] =?UTF-8?q?=F0=9F=94=A5=20Fixed=20useless=20comments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 1 - scripts/aave-v2/Deploy.s.sol | 12 ++++++++---- scripts/compound/Deploy.s.sol | 15 +++++++++------ 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 94275f405..75342b4ea 100644 --- a/Makefile +++ b/Makefile @@ -112,7 +112,6 @@ ansi-s-%: @echo Running single test $* of ${PROTOCOL} on ${NETWORK} @forge test -vvvvv --match-test $* > trace.ansi - config: @forge config diff --git a/scripts/aave-v2/Deploy.s.sol b/scripts/aave-v2/Deploy.s.sol index 61b388ad4..76df5693e 100644 --- a/scripts/aave-v2/Deploy.s.sol +++ b/scripts/aave-v2/Deploy.s.sol @@ -2,6 +2,10 @@ pragma solidity 0.8.13; import "@contracts/aave-v2/interfaces/IRewardsManager.sol"; +import "@contracts/aave-v2/interfaces/IIncentivesVault.sol"; +import "@contracts/aave-v2/interfaces/IInterestRatesManager.sol"; +import "@contracts/aave-v2/interfaces/IExitPositionsManager.sol"; +import "@contracts/aave-v2/interfaces/IEntryPositionsManager.sol"; import "@contracts/aave-v2/interfaces/aave/ILendingPoolAddressesProvider.sol"; import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; @@ -11,8 +15,8 @@ import {InterestRatesManager} from "@contracts/aave-v2/InterestRatesManager.sol" import {RewardsManagerOnPolygon} from "@contracts/aave-v2/rewards-managers/RewardsManagerOnPolygon.sol"; import {EntryPositionsManager} from "@contracts/aave-v2/EntryPositionsManager.sol"; import {ExitPositionsManager} from "@contracts/aave-v2/ExitPositionsManager.sol"; +import {Morpho} from "@contracts/aave-v2/Morpho.sol"; import {Lens} from "@contracts/aave-v2/Lens.sol"; -import "@contracts/aave-v2/Morpho.sol"; import "@config/Config.sol"; import "forge-std/Script.sol"; @@ -38,7 +42,7 @@ contract Deploy is Script, Config { exitPositionsManager = new ExitPositionsManager(); interestRatesManager = new InterestRatesManager(); - // Deploy Morpho Proxy + // Deploy Morpho Morpho morphoImpl = new Morpho(); TransparentUpgradeableProxy morphoProxy = new TransparentUpgradeableProxy( address(morphoImpl), @@ -55,7 +59,7 @@ contract Deploy is Script, Config { ); morpho = Morpho(address(morphoProxy)); - // Deploy RewardsManager Proxy + // Deploy RewardsManager IRewardsManager rewardsManagerImpl = new RewardsManagerOnPolygon(); TransparentUpgradeableProxy rewardsManagerProxy = new TransparentUpgradeableProxy( @@ -71,7 +75,7 @@ contract Deploy is Script, Config { ILendingPoolAddressesProvider(lendingPoolAddressesProvider) ); - // Deploy markets + // Create markets Types.MarketParameters memory defaultMarketParameters = Types.MarketParameters({ reserveFactor: 1000, p2pIndexCursor: 3333 diff --git a/scripts/compound/Deploy.s.sol b/scripts/compound/Deploy.s.sol index 0148c18d7..561c03cc4 100644 --- a/scripts/compound/Deploy.s.sol +++ b/scripts/compound/Deploy.s.sol @@ -1,8 +1,11 @@ // SPDX-License-Identifier: GNU AGPLv3 pragma solidity 0.8.13; -import "@contracts/compound/interfaces/compound/ICompound.sol"; import "@contracts/compound/interfaces/IRewardsManager.sol"; +import "@contracts/compound/interfaces/IIncentivesVault.sol"; +import "@contracts/compound/interfaces/IInterestRatesManager.sol"; +import "@contracts/compound/interfaces/IPositionsManager.sol"; +import "@contracts/compound/interfaces/compound/ICompound.sol"; import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; @@ -11,8 +14,8 @@ import {IncentivesVault} from "@contracts/compound/IncentivesVault.sol"; import {RewardsManager} from "@contracts/compound/RewardsManager.sol"; import {InterestRatesManager} from "@contracts/compound/InterestRatesManager.sol"; import {PositionsManager} from "@contracts/compound/PositionsManager.sol"; +import {Morpho} from "@contracts/compound/Morpho.sol"; import {Lens} from "@contracts/compound/lens/Lens.sol"; -import "@contracts/compound/Morpho.sol"; import "@config/Config.sol"; import "forge-std/Script.sol"; @@ -44,7 +47,7 @@ contract Deploy is Script, Config { interestRatesManager = new InterestRatesManager(); positionsManager = new PositionsManager(); - // Deploy Morpho Proxy + // Deploy Morpho Morpho morphoImpl = new Morpho(); TransparentUpgradeableProxy morphoProxy = new TransparentUpgradeableProxy( address(morphoImpl), @@ -63,8 +66,8 @@ contract Deploy is Script, Config { ); morpho = Morpho(payable(morphoProxy)); - // Deploy RewardsManager Proxy - IRewardsManager rewardsManagerImpl = new RewardsManager(); + // Deploy RewardsManager + RewardsManager rewardsManagerImpl = new RewardsManager(); TransparentUpgradeableProxy rewardsManagerProxy = new TransparentUpgradeableProxy( address(rewardsManagerImpl), @@ -75,7 +78,7 @@ contract Deploy is Script, Config { morpho.setRewardsManager(IRewardsManager(address(rewardsManager))); - // Deploy Lens Proxy + // Deploy Lens Lens lensImpl = new Lens(); TransparentUpgradeableProxy lensProxy = new TransparentUpgradeableProxy( address(lensImpl), From 515abe0316d2a73ad8d332cd5fb4e9e344dea8b3 Mon Sep 17 00:00:00 2001 From: Rubilmax Date: Fri, 22 Jul 2022 16:14:55 +0200 Subject: [PATCH 06/57] =?UTF-8?q?=E2=9C=A8=20Re-added=20temporary=20shell?= =?UTF-8?q?=20scripts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 12 +++ scripts/compound/deploy.sh | 165 +++++++++++++++++++++++++++++++++ scripts/compound/initialize.sh | 29 +++--- scripts/create-market.sh | 11 ++- 4 files changed, 199 insertions(+), 18 deletions(-) create mode 100755 scripts/compound/deploy.sh diff --git a/Makefile b/Makefile index 75342b4ea..1afb69890 100644 --- a/Makefile +++ b/Makefile @@ -53,6 +53,18 @@ install: @chmod +x ./scripts/**/*.sh +deploy: + @echo Deploying Morpho-${PROTOCOL} on ${NETWORK} + ./scripts/${PROTOCOL}/deploy.sh + +initialize: + @echo Initializing Morpho-${PROTOCOL} on ${NETWORK} + ./scripts/${PROTOCOL}/initialize.sh + +create-market: + @echo Creating market on Morpho-${PROTOCOL} on ${NETWORK} + ./scripts/${PROTOCOL}/create-market.sh + anvil: @echo Starting fork of ${NETWORK} @anvil --fork-url ${FOUNDRY_ETH_RPC_URL} diff --git a/scripts/compound/deploy.sh b/scripts/compound/deploy.sh new file mode 100755 index 000000000..69d5e84ce --- /dev/null +++ b/scripts/compound/deploy.sh @@ -0,0 +1,165 @@ +#!/bin/bash +set -euo pipefail # exit on error + +unset FOUNDRY_TEST +export FOUNDRY_SRC=contracts/commpound/ + +read -p "🚀❓ Deploy Morpho-Compound's InterestRatesManager on ${NETWORK}? " -n 1 -r +echo + +if [[ $REPLY =~ ^[Yy]$ ]] +then + echo "Deploying Morpho-Compound's InterestRatesManager on ${NETWORK}..." + + forge create --private-key "${DEPLOYER_PRIVATE_KEY}" \ + --optimize contracts/compound/InterestRatesManager.sol:InterestRatesManager \ + --verify + + echo "🎉 InterestRatesManager deployed!" +fi + + +echo "---" +read -p "🚀❓ Deploy Morpho-Compound's PositionsManager on ${NETWORK}? " -n 1 -r +echo + +if [[ $REPLY =~ ^[Yy]$ ]] +then + echo "Deploying Morpho-Compound's PositionsManager on ${NETWORK}..." + + forge create --private-key "${DEPLOYER_PRIVATE_KEY}" \ + --optimize contracts/compound/PositionsManager.sol:PositionsManager \ + --verify + + echo "🎉 PositionsManager deployed!" +fi + + +echo "---" +read -p "🚀❓ Deploy Morpho-Compound's RewardsManager Implementation on ${NETWORK}? " -n 1 -r +echo + +if [[ $REPLY =~ ^[Yy]$ ]] +then + echo "Deploying Morpho-Compound's RewardsManager Implementation on ${NETWORK}..." + + forge create --private-key "${DEPLOYER_PRIVATE_KEY}" \ + --optimize contracts/compound/RewardsManager.sol:RewardsManager \ + --verify + + echo "🎉 RewardsManager Implementation deployed!" +fi + + +echo "---" +read -p "🚀❓ Deploy Morpho-Compound's Implementation on ${NETWORK}? " -n 1 -r +echo + +if [[ $REPLY =~ ^[Yy]$ ]] +then + echo "Deploying Morpho-Compound's Implementation on ${NETWORK}..." + + forge create --private-key "${DEPLOYER_PRIVATE_KEY}" \ + --optimize contracts/compound/Morpho.sol:Morpho \ + --verify + + echo "🎉 Morpho Implementation deployed!" +fi + + +echo "---" +read -p "🚀❓ Deploy Morpho-Compound's Lens Implementation on ${NETWORK}? " -n 1 -r +echo + +if [[ $REPLY =~ ^[Yy]$ ]] +then + echo "Deploying Morpho-Compound's Lens Implementation on $NETWORK..." + + forge create --private-key "${DEPLOYER_PRIVATE_KEY}" \ + --optimize contracts/compound/lens/Lens.sol:Lens \ + --verify + + echo "🎉 Lens Implementation deployed!" +fi + + +export FOUNDRY_SRC=node_modules/@openzeppelin/contracts/proxy/transparent/ + +echo "---" +read -p "🚀❓ Deploy Morpho-Compound's ProxyAdmin on ${NETWORK}? " -n 1 -r +echo + +if [[ $REPLY =~ ^[Yy]$ ]] +then + echo "Deploying Morpho-Compound's ProxyAdmin on ${NETWORK}..." + + forge create --private-key "${DEPLOYER_PRIVATE_KEY}" \ + --optimize node_modules/@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol:ProxyAdmin \ + --verify + + echo "🎉 ProxyAdmin deployed!" +fi + + +echo "---" +read -p "🚀❓ Deploy Morpho-Compound's Proxy on ${NETWORK}? " -n 1 -r +echo + +if [[ $REPLY =~ ^[Yy]$ ]] +then + read -p " Morpho-Compound's Implementation address? " -r MORPHO_IMPL_ADDRESS + read -p " Morpho-Compound's ProxyAdmin address on ${NETWORK}? " -r MORPHO_PROXY_ADMIN_ADDRESS + + echo "Deploying Morpho-Compound's Proxy on ${NETWORK} for Implementation at ${MORPHO_IMPL_ADDRESS}, owned by ${MORPHO_PROXY_ADMIN_ADDRESS}..." + + forge create --private-key "${DEPLOYER_PRIVATE_KEY}" \ + --optimize node_modules/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol:TransparentUpgradeableProxy \ + --verify \ + --constructor-args "${MORPHO_IMPL_ADDRESS}" "${MORPHO_PROXY_ADMIN_ADDRESS}" "" + + echo "🎉 Morpho Proxy deployed!" +fi + + +echo "---" +read -p "🚀❓ Deploy Morpho-Compound's RewardsManager Proxy on ${NETWORK}? " -n 1 -r +echo + +if [[ $REPLY =~ ^[Yy]$ ]] +then + read -p " Morpho-Compound's RewardsManager Implementation address? " -r MORPHO_REWARDS_MANAGER_IMPL_ADDRESS + read -p " Morpho-Compound's ProxyAdmin address on ${NETWORK}? " -r MORPHO_PROXY_ADMIN_ADDRESS + + echo "Deploying Morpho-Compound's RewardsManager Proxy on ${NETWORK} for Implementation at ${MORPHO_REWARDS_MANAGER_IMPL_ADDRESS}, owned by ${MORPHO_PROXY_ADMIN_ADDRESS}..." + + forge create --private-key "${DEPLOYER_PRIVATE_KEY}" \ + --optimize node_modules/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol:TransparentUpgradeableProxy \ + --verify \ + --constructor-args "${MORPHO_REWARDS_MANAGER_IMPL_ADDRESS}" "${MORPHO_PROXY_ADMIN_ADDRESS}" "" + + echo "🎉 RewardsManager Proxy deployed!" +fi + + +echo "---" +read -p "🚀❓ Deploy Morpho-Compound's Lens Proxy on ${NETWORK}? " -n 1 -r +echo + +if [[ $REPLY =~ ^[Yy]$ ]] +then + read -p " Morpho-Compound's Lens Implementation address? " -r MORPHO_LENS_IMPL_ADDRESS + read -p " Morpho-Compound's ProxyAdmin address on ${NETWORK}? " -r MORPHO_PROXY_ADMIN_ADDRESS + + echo "Deploying Morpho-Compound's Lens Proxy on ${NETWORK} for Implementation at ${MORPHO_LENS_IMPL_ADDRESS}, owned by ${MORPHO_PROXY_ADMIN_ADDRESS}..." + + forge create --private-key "${DEPLOYER_PRIVATE_KEY}" \ + --optimize node_modules/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol:TransparentUpgradeableProxy \ + --verify \ + --constructor-args "${MORPHO_LENS_IMPL_ADDRESS}" "${MORPHO_PROXY_ADMIN_ADDRESS}" "" + + echo "🎉 Lens Proxy deployed!" +fi + + +echo "---" +echo "🎉 Deployment completed!" diff --git a/scripts/compound/initialize.sh b/scripts/compound/initialize.sh index 1de9e2981..2551b592f 100755 --- a/scripts/compound/initialize.sh +++ b/scripts/compound/initialize.sh @@ -1,7 +1,5 @@ #!/bin/bash set -euo pipefail # exit on error -export $(xargs < .env.local) - echo "---" read -p "⚡❓ Initialize Morpho-Compound's Proxy on ${NETWORK}? " -n 1 -r @@ -21,14 +19,20 @@ then echo "Initializing Morpho-Compound's Proxy on ${NETWORK} at ${MORPHO_PROXY_ADDRESS}, with ${DEFAULT_MAX_GAS_FOR_MATCHING} defaultMaxGasForMatching, ${DUST_THRESHOLD} dustThreshold & ${MAX_SORTED_USERS} maxSortedUsers..." - POSITIONS_MANAGERO_INTEREST_RATES_MANAGER_COMPTROLLER_ADDRESS=$(cast abi-encode "tuple(address,address,address)" "${MORPHO_POSITIONS_MANAGER_ADDRESS}" "${MORPHO_INTEREST_RATES_MANAGER_ADDRESS}" "${COMPTROLLER_ADDRESS}") - DUST_THRESHOLD_MAX_SORTED_USERS=$(cast abi-encode "tuple(uint256,uint256)" "${DUST_THRESHOLD}" "${MAX_SORTED_USERS}") - DEFAULT_MAX_GAS_FOR_MATCHING=$(cast abi-encode "tuple(uint64,uint64,uint64,uint64)" "${DEFAULT_MAX_GAS_FOR_MATCHING}" "${DEFAULT_MAX_GAS_FOR_MATCHING}" "${DEFAULT_MAX_GAS_FOR_MATCHING}" "${DEFAULT_MAX_GAS_FOR_MATCHING}") - CETH_WETH_ADDRESS=$(cast abi-encode "tuple(address,address)" "${CETH_ADDRESS}" "${WETH_ADDRESS}") + INITIALIZE_CALLDATA=$( + cast abi-encode "initialize(address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,address,address)" \ + "${MORPHO_POSITIONS_MANAGER_ADDRESS}" \ + "${MORPHO_INTEREST_RATES_MANAGER_ADDRESS}" \ + "${COMPTROLLER_ADDRESS}" \ + "${DEFAULT_MAX_GAS_FOR_MATCHING}" "${DEFAULT_MAX_GAS_FOR_MATCHING}" "${DEFAULT_MAX_GAS_FOR_MATCHING}" "${DEFAULT_MAX_GAS_FOR_MATCHING}" \ + "${DUST_THRESHOLD}" \ + "${MAX_SORTED_USERS}" \ + "${CETH_ADDRESS}" \ + "${WETH_ADDRESS}" + ) cast send --private-key "${DEPLOYER_PRIVATE_KEY}" \ - "${MORPHO_PROXY_ADDRESS}" \ - 0x34544040"${POSITIONS_MANAGERO_INTEREST_RATES_MANAGER_COMPTROLLER_ADDRESS:2}""${DEFAULT_MAX_GAS_FOR_MATCHING:2}""${DUST_THRESHOLD_MAX_SORTED_USERS:2}""${CETH_WETH_ADDRESS:2}" + "${MORPHO_PROXY_ADDRESS}" 0x34544040"${INITIALIZE_CALLDATA:2}" echo "🎉 Morpho Proxy initialized!" fi @@ -46,11 +50,9 @@ then echo "Initializing Morpho-Compound's RewardsManager Proxy on ${NETWORK} at ${MORPHO_REWARDS_MANAGER_PROXY_ADDRESS}..." cast send --private-key "${DEPLOYER_PRIVATE_KEY}" \ - "${MORPHO_REWARDS_MANAGER_PROXY_ADDRESS}" \ - "initialize(address)" "${MORPHO_PROXY_ADDRESS}" + "${MORPHO_REWARDS_MANAGER_PROXY_ADDRESS}" "initialize(address)" "${MORPHO_PROXY_ADDRESS}" cast send --private-key "${DEPLOYER_PRIVATE_KEY}" \ - "${MORPHO_PROXY_ADDRESS}" \ - "setRewardsManager(address)" "${MORPHO_REWARDS_MANAGER_PROXY_ADDRESS}" + "${MORPHO_PROXY_ADDRESS}" "setRewardsManager(address)" "${MORPHO_REWARDS_MANAGER_PROXY_ADDRESS}" echo "🎉 RewardsManager Proxy initialized!" fi @@ -68,8 +70,7 @@ then echo "Initializing Morpho-Compound's Lens Proxy on ${NETWORK} at ${MORPHO_REWARDS_MANAGER_PROXY_ADDRESS}..." cast send --private-key "${DEPLOYER_PRIVATE_KEY}" \ - "${MORPHO_REWARDS_MANAGER_PROXY_ADDRESS}" \ - "initialize(address)" "${MORPHO_PROXY_ADDRESS}" + "${MORPHO_REWARDS_MANAGER_PROXY_ADDRESS}" "initialize(address)" "${MORPHO_PROXY_ADDRESS}" echo "🎉 Lens Proxy initialized!" fi diff --git a/scripts/create-market.sh b/scripts/create-market.sh index 0fa29d8d1..ade6a8156 100755 --- a/scripts/create-market.sh +++ b/scripts/create-market.sh @@ -7,12 +7,15 @@ read -p "Morpho-${PROTOCOL}'s p2pIndexCursor for market ${POOL_TOKEN_ADDRESS} on echo "Creating market ${POOL_TOKEN_ADDRESS} via Morpho-${PROTOCOL}'s Proxy on ${NETWORK} at ${MORPHO_PROXY_ADDRESS}, with ${RESERVE_FACTOR} bps reserveFactor & ${P2P_INDEX_CURSOR} bps p2pIndexCursor..." -POOL_TOKEN_ADDRESS=$(cast abi-encode "tuple(address)" "${POOL_TOKEN_ADDRESS}") -RESERVE_FACTOR_P2P_INDEX_CURSOR=$(cast abi-encode "tuple(uint16,uint16)" "${RESERVE_FACTOR}" "${P2P_INDEX_CURSOR}") +CREATE_MARKET_CALLDATA=$( + cast abi-encode "createMarket(address,uint16,uint16)" \ + "${POOL_TOKEN_ADDRESS}" \ + "${RESERVE_FACTOR}" \ + "${P2P_INDEX_CURSOR}" +) cast send --private-key "${DEPLOYER_PRIVATE_KEY}" \ - "${MORPHO_PROXY_ADDRESS}" \ - 0x7a663121"${POOL_TOKEN_ADDRESS:2}""${RESERVE_FACTOR_P2P_INDEX_CURSOR:2}" + "${MORPHO_PROXY_ADDRESS}" 0x7a663121"${CREATE_MARKET_CALLDATA:2}" echo "---" From be90d4a12fde329c1e0377d01d0ba8d7d67cac00 Mon Sep 17 00:00:00 2001 From: Rubilmax Date: Fri, 29 Jul 2022 14:33:35 +0200 Subject: [PATCH 07/57] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Bump=20foundry-gas-d?= =?UTF-8?q?iff?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/actions/ci-foundry/action.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/actions/ci-foundry/action.yml b/.github/actions/ci-foundry/action.yml index a8249585a..bf7cc0acf 100644 --- a/.github/actions/ci-foundry/action.yml +++ b/.github/actions/ci-foundry/action.yml @@ -52,9 +52,8 @@ runs: ALCHEMY_KEY: ${{ inputs.alchemyKey }} - name: Compare gas reports - uses: Rubilmax/foundry-gas-diff@v3.7 + uses: Rubilmax/foundry-gas-diff@v3.8 with: - workflowId: ci-foundry-${{ inputs.protocol }}.yml report: ${{ inputs.protocol }}.gasreport.ansi ignore: test-foundry/**/* title: Morpho-${{ inputs.protocol }} gas impacts (${{ inputs.network }}) From 81f68703e94bfb61355a60649304c1254f0aad7f Mon Sep 17 00:00:00 2001 From: Rubilmax Date: Fri, 29 Jul 2022 17:58:58 +0200 Subject: [PATCH 08/57] =?UTF-8?q?=F0=9F=8E=A8=20Improve=20logs=20with=20te?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/actions/ci-foundry/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/ci-foundry/action.yml b/.github/actions/ci-foundry/action.yml index bf7cc0acf..fc5066118 100644 --- a/.github/actions/ci-foundry/action.yml +++ b/.github/actions/ci-foundry/action.yml @@ -44,7 +44,7 @@ runs: key: ${{ github.base_ref || github.ref_name }}-foundry-${{ inputs.protocol }} # always keep compiled contracts from base branch - name: Run tests - run: make ci > ${{ inputs.protocol }}.gasreport.ansi + run: make ci | tee ${{ inputs.protocol }}.gasreport.ansi shell: bash env: PROTOCOL: ${{ inputs.protocol }} From dbac355d3dafdfccb6b0dc458c17b56c2bf32136 Mon Sep 17 00:00:00 2001 From: Rubilmax Date: Tue, 2 Aug 2022 11:32:45 +0200 Subject: [PATCH 09/57] Rename default smode --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1afb69890..98af3cce3 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ PROTOCOL?=compound NETWORK?=eth-mainnet -SMODE?=blockchain +SMODE?=network FOUNDRY_SRC=contracts/${PROTOCOL}/ FOUNDRY_TEST=test-foundry/${PROTOCOL}/ From 703e1db6f1188883a5280c83271a585716530e30 Mon Sep 17 00:00:00 2001 From: Rubilmax Date: Tue, 2 Aug 2022 11:33:58 +0200 Subject: [PATCH 10/57] Remove duplicate create-market command --- Makefile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Makefile b/Makefile index 98af3cce3..7fb4e9e30 100644 --- a/Makefile +++ b/Makefile @@ -73,9 +73,6 @@ script-%: @echo Running script $* of ${PROTOCOL} on ${NETWORK} with script mode: ${SMODE} @forge script scripts/${PROTOCOL}/$*.s.sol:$* --broadcast -vvvv -create-market: - ./scripts/create-market.sh - ci: @forge test -vv --gas-report --no-match-test testFuzz From 2672bbe46a58a2d9c73f830689225f55e5038888 Mon Sep 17 00:00:00 2001 From: Rubilmax Date: Tue, 2 Aug 2022 11:36:43 +0200 Subject: [PATCH 11/57] Rename local smode --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7fb4e9e30..63b455145 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,7 @@ ifneq (, $(filter ${NETWORK}, ropsten rinkeby goerli)) FOUNDRY_ETH_RPC_URL=https://${NETWORK}.infura.io/v3/${INFURA_PROJECT_ID} endif -ifeq (${SMODE}, anvil) +ifeq (${SMODE}, local) FOUNDRY_ETH_RPC_URL=http://localhost:8545 endif From f56bff099d5ff6972975c1e940b0bedcd95359e4 Mon Sep 17 00:00:00 2001 From: Rubilmax Date: Tue, 2 Aug 2022 11:40:51 +0200 Subject: [PATCH 12/57] Added documentation --- README.md | 26 ++++++++++++++++++++++++++ lib/morpho-utils | 1 + 2 files changed, 27 insertions(+) create mode 160000 lib/morpho-utils diff --git a/README.md b/README.md index 2d639f108..991766bd7 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,32 @@ yarn test:hardhat --- +## Deployment & Upgrades + +### Network mode (default) + +Run the Foundry deployment script with: + +```bash +make script-Deploy PROTOCOL=compound NETWORK=goerli +``` + +### Local mode + +First start a local EVM: + +```bash +make anvil NETWORK=goerli +``` + +Then run the Foundry deployment script in a separate shell, using `SMODE=local`: + +```bash +make script-Deploy PROTOCOL=compound NETWORK=goerli SMODE=local +``` + +--- + ## Style guide 💅 ### Code Formatting diff --git a/lib/morpho-utils b/lib/morpho-utils new file mode 160000 index 000000000..174140ab5 --- /dev/null +++ b/lib/morpho-utils @@ -0,0 +1 @@ +Subproject commit 174140ab5b9a5db28f3700f4d0378cb0a64510e3 From 07b659c5be4813bbf30cf9f5b9b3cbfe44c4d168 Mon Sep 17 00:00:00 2001 From: Rubilmax Date: Tue, 2 Aug 2022 15:58:45 +0200 Subject: [PATCH 13/57] Remove rinkeby --- Makefile | 14 +++++++++----- lib/data-structures | 2 +- package.json | 5 ++--- scripts/compound/deploy.sh | 2 +- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 63b455145..38264891c 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,9 @@ -include .env.local .EXPORT_ALL_VARIABLES: +SMODE?=network PROTOCOL?=compound NETWORK?=eth-mainnet -SMODE?=network FOUNDRY_SRC=contracts/${PROTOCOL}/ FOUNDRY_TEST=test-foundry/${PROTOCOL}/ @@ -16,6 +16,14 @@ ifeq (${NETWORK}, eth-mainnet) FOUNDRY_FORK_BLOCK_NUMBER=14292587 endif +ifeq (${NETWORK}, eth-ropsten) + FOUNDRY_CHAIN_ID=3 +endif + +ifeq (${NETWORK}, eth-goerli) + FOUNDRY_CHAIN_ID=5 +endif + ifeq (${NETWORK}, polygon-mainnet) FOUNDRY_CHAIN_ID=137 FOUNDRY_FORK_BLOCK_NUMBER=22116728 @@ -37,10 +45,6 @@ ifeq (${NETWORK}, avalanche-mainnet) else endif -ifneq (, $(filter ${NETWORK}, ropsten rinkeby goerli)) - FOUNDRY_ETH_RPC_URL=https://${NETWORK}.infura.io/v3/${INFURA_PROJECT_ID} -endif - ifeq (${SMODE}, local) FOUNDRY_ETH_RPC_URL=http://localhost:8545 endif diff --git a/lib/data-structures b/lib/data-structures index 83577ec6b..0cd679077 160000 --- a/lib/data-structures +++ b/lib/data-structures @@ -1 +1 @@ -Subproject commit 83577ec6bdc18fc3c83b4a15969e0582a07c287e +Subproject commit 0cd679077f2e80f4db85dcd87bd8a5087d060cdb diff --git a/package.json b/package.json index 6ba9d2678..2523893fd 100644 --- a/package.json +++ b/package.json @@ -7,9 +7,8 @@ "contracts" ], "scripts": { - "upgrade:compound:ropsten": "NETWORK=ropsten hardhat run scripts/upgrade-compound.ts --network ropsten", - "upgrade:compound:rinkeby": "NETWORK=rinkeby hardhat run scripts/upgrade-compound.ts --network rinkeby", - "upgrade:compound:goerli": "NETWORK=goerli hardhat run scripts/upgrade-compound.ts --network goerli", + "upgrade:compound:ropsten": "hardhat run scripts/upgrade-compound.ts --network ropsten", + "upgrade:compound:goerli": "hardhat run scripts/upgrade-compound.ts --network goerli", "test:hardhat": "hardhat test", "lint": "yarn lint:sol && yarn lint:ts", "lint:ts": "eslint . --ext .ts", diff --git a/scripts/compound/deploy.sh b/scripts/compound/deploy.sh index 69d5e84ce..47b79b3af 100755 --- a/scripts/compound/deploy.sh +++ b/scripts/compound/deploy.sh @@ -2,7 +2,7 @@ set -euo pipefail # exit on error unset FOUNDRY_TEST -export FOUNDRY_SRC=contracts/commpound/ +export FOUNDRY_SRC=contracts/compound/ read -p "🚀❓ Deploy Morpho-Compound's InterestRatesManager on ${NETWORK}? " -n 1 -r echo From 4b281b638ca62a2513ae34946e1f5715ddf44e7f Mon Sep 17 00:00:00 2001 From: Rubilmax Date: Tue, 2 Aug 2022 10:57:44 +0200 Subject: [PATCH 14/57] Add automatic retry --- .github/actions/ci-foundry/action.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/actions/ci-foundry/action.yml b/.github/actions/ci-foundry/action.yml index fc5066118..808222114 100644 --- a/.github/actions/ci-foundry/action.yml +++ b/.github/actions/ci-foundry/action.yml @@ -43,13 +43,12 @@ runs: out key: ${{ github.base_ref || github.ref_name }}-foundry-${{ inputs.protocol }} # always keep compiled contracts from base branch - - name: Run tests - run: make ci | tee ${{ inputs.protocol }}.gasreport.ansi - shell: bash - env: - PROTOCOL: ${{ inputs.protocol }} - NETWORK: ${{ inputs.network }} - ALCHEMY_KEY: ${{ inputs.alchemyKey }} + - uses: nick-fields/retry@v2.7.0 + with: + command: set -o pipefail && PROTOCOL=${{ inputs.protocol }} NETWORK=${{ inputs.network }} ALCHEMY_KEY=${{ inputs.alchemyKey }} make ci | tee ${{ inputs.protocol }}.gasreport.ansi + max_attempts: 3 + retry_on_exit_code: 2 + timeout_minutes: 30 - name: Compare gas reports uses: Rubilmax/foundry-gas-diff@v3.8 From d03a65781ac7b2530612410fee3779d9a49dfa74 Mon Sep 17 00:00:00 2001 From: Rubilmax Date: Tue, 2 Aug 2022 13:47:47 +0200 Subject: [PATCH 15/57] Fix fuzz seed for ci --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 394e29472..b993e2a6a 100644 --- a/Makefile +++ b/Makefile @@ -78,7 +78,7 @@ script-%: @forge script scripts/${PROTOCOL}/$*.s.sol:$* --broadcast -vvvv ci: - @forge test -vv --gas-report --no-match-test testFuzz + @forge test -vv --gas-report --fuzz-seed 0 test: @echo Running all ${PROTOCOL} tests on ${NETWORK} From 8a73e270902cbba8491fb7936fca1b2c661a6dc0 Mon Sep 17 00:00:00 2001 From: Rubilmax Date: Tue, 2 Aug 2022 16:13:36 +0200 Subject: [PATCH 16/57] Remove useless testFuzz filter --- Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index b993e2a6a..149154a21 100644 --- a/Makefile +++ b/Makefile @@ -82,19 +82,19 @@ ci: test: @echo Running all ${PROTOCOL} tests on ${NETWORK} - @forge test -vv --no-match-test testFuzz + @forge test -vv test-ansi: @echo Running all ${PROTOCOL} tests on ${NETWORK} - @forge test -vv --no-match-test testFuzz > trace.ansi + @forge test -vv > trace.ansi coverage: @echo Create coverage report for ${PROTOCOL} tests on ${NETWORK} - @forge coverage --no-match-test testFuzz + @forge coverage coverage-lcov: @echo Create coverage lcov for ${PROTOCOL} tests on ${NETWORK} - @forge coverage --report lcov --no-match-test testFuzz + @forge coverage --report lcov fuzz: $(eval FOUNDRY_TEST=test-foundry/fuzzing/${PROTOCOL}/) @@ -111,11 +111,11 @@ test-common: contract-% c-%: @echo Running tests for contract $* of ${PROTOCOL} on ${NETWORK} - @forge test -vvv/$*.t.sol --match-contract $* + @forge test -vvv --match-contract $* ansi-c-%: @echo Running tests for contract $* of ${PROTOCOL} on ${NETWORK} - @forge test -vvv/$*.t.sol --match-contract $* > trace.ansi + @forge test -vvv --match-contract $* > trace.ansi single-% s-%: @echo Running single test $* of ${PROTOCOL} on ${NETWORK} From bf2b7e868aee9316a96f25af265f9333e80ed486 Mon Sep 17 00:00:00 2001 From: Rubilmax Date: Wed, 3 Aug 2022 10:58:16 +0200 Subject: [PATCH 17/57] Remove fuzzing when gas report --- .github/actions/ci-foundry/action.yml | 22 ++++++++++++++++------ Makefile | 25 +++++-------------------- foundry.toml | 3 +++ 3 files changed, 24 insertions(+), 26 deletions(-) diff --git a/.github/actions/ci-foundry/action.yml b/.github/actions/ci-foundry/action.yml index 808222114..da1a8b3fb 100644 --- a/.github/actions/ci-foundry/action.yml +++ b/.github/actions/ci-foundry/action.yml @@ -43,12 +43,22 @@ runs: out key: ${{ github.base_ref || github.ref_name }}-foundry-${{ inputs.protocol }} # always keep compiled contracts from base branch - - uses: nick-fields/retry@v2.7.0 - with: - command: set -o pipefail && PROTOCOL=${{ inputs.protocol }} NETWORK=${{ inputs.network }} ALCHEMY_KEY=${{ inputs.alchemyKey }} make ci | tee ${{ inputs.protocol }}.gasreport.ansi - max_attempts: 3 - retry_on_exit_code: 2 - timeout_minutes: 30 + - name: Run tests + run: make test + shell: bash + env: + PROTOCOL: ${{ inputs.protocol }} + NETWORK: ${{ inputs.network }} + ALCHEMY_KEY: ${{ inputs.alchemyKey }} + + - name: Run gas report + run: make gas-report > ${{ inputs.protocol }}.gasreport.ansi + shell: bash + env: + PROTOCOL: ${{ inputs.protocol }} + NETWORK: ${{ inputs.network }} + ALCHEMY_KEY: ${{ inputs.alchemyKey }} + FOUNDRY_PROFILE: gas-report - name: Compare gas reports uses: Rubilmax/foundry-gas-diff@v3.8 diff --git a/Makefile b/Makefile index 149154a21..f67b5b031 100644 --- a/Makefile +++ b/Makefile @@ -77,16 +77,9 @@ script-%: @echo Running script $* of ${PROTOCOL} on ${NETWORK} with script mode: ${SMODE} @forge script scripts/${PROTOCOL}/$*.s.sol:$* --broadcast -vvvv -ci: - @forge test -vv --gas-report --fuzz-seed 0 - test: @echo Running all ${PROTOCOL} tests on ${NETWORK} - @forge test -vv - -test-ansi: - @echo Running all ${PROTOCOL} tests on ${NETWORK} - @forge test -vv > trace.ansi + @forge test -vv | tee trace.ansi coverage: @echo Create coverage report for ${PROTOCOL} tests on ${NETWORK} @@ -102,8 +95,8 @@ fuzz: @forge test -vv gas-report: - @echo Creating gas consumption report for ${PROTOCOL} on ${NETWORK} - @forge test -vvv --gas-report > gas_report.ansi + @echo Creating gas report for ${PROTOCOL} on ${NETWORK} + @forge test --gas-report test-common: @echo Running all common tests on ${NETWORK} @@ -111,19 +104,11 @@ test-common: contract-% c-%: @echo Running tests for contract $* of ${PROTOCOL} on ${NETWORK} - @forge test -vvv --match-contract $* - -ansi-c-%: - @echo Running tests for contract $* of ${PROTOCOL} on ${NETWORK} - @forge test -vvv --match-contract $* > trace.ansi + @forge test -vvv --match-contract $* | tee trace.ansi single-% s-%: @echo Running single test $* of ${PROTOCOL} on ${NETWORK} - @forge test -vvv --match-test $* - -ansi-s-%: - @echo Running single test $* of ${PROTOCOL} on ${NETWORK} - @forge test -vvvvv --match-test $* > trace.ansi + @forge test -vvv --match-test $* | tee trace.ansi storage-layout-generate: @./scripts/storage-layout.sh generate snapshots/.storage-layout-${PROTOCOL} Morpho RewardsManager Lens diff --git a/foundry.toml b/foundry.toml index c705dbfa4..65f8bd1f9 100644 --- a/foundry.toml +++ b/foundry.toml @@ -7,3 +7,6 @@ via_ir = false revert_strings = "default" names = true sizes = true + +[profile.gas-report] +fuzz_runs = 0 From 504d846cc49b87080d86678471a971b954033f71 Mon Sep 17 00:00:00 2001 From: Rubilmax Date: Wed, 3 Aug 2022 14:36:55 +0200 Subject: [PATCH 18/57] Improve compilation cache --- .github/actions/ci-foundry/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/ci-foundry/action.yml b/.github/actions/ci-foundry/action.yml index da1a8b3fb..24fc06d4a 100644 --- a/.github/actions/ci-foundry/action.yml +++ b/.github/actions/ci-foundry/action.yml @@ -41,7 +41,7 @@ runs: path: | cache out - key: ${{ github.base_ref || github.ref_name }}-foundry-${{ inputs.protocol }} # always keep compiled contracts from base branch + key: ${{ github.base_ref || github.ref_name }}-foundry-${{ inputs.protocol }}-${{ inputs.network }} # always keep compiled contracts from base branch - name: Run tests run: make test From ce78648d4ee0db6e51fdb95021575e4c092cc74e Mon Sep 17 00:00:00 2001 From: Rubilmax Date: Wed, 3 Aug 2022 14:41:22 +0200 Subject: [PATCH 19/57] Fix gas reports names --- .github/actions/ci-foundry/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/ci-foundry/action.yml b/.github/actions/ci-foundry/action.yml index 24fc06d4a..a463051a0 100644 --- a/.github/actions/ci-foundry/action.yml +++ b/.github/actions/ci-foundry/action.yml @@ -52,7 +52,7 @@ runs: ALCHEMY_KEY: ${{ inputs.alchemyKey }} - name: Run gas report - run: make gas-report > ${{ inputs.protocol }}.gasreport.ansi + run: make gas-report > ${{ inputs.protocol }}.${{ inputs.network }}.gasreport.ansi shell: bash env: PROTOCOL: ${{ inputs.protocol }} @@ -63,7 +63,7 @@ runs: - name: Compare gas reports uses: Rubilmax/foundry-gas-diff@v3.8 with: - report: ${{ inputs.protocol }}.gasreport.ansi + report: ${{ inputs.protocol }}.${{ inputs.network }}.gasreport.ansi ignore: test-foundry/**/* title: Morpho-${{ inputs.protocol }} gas impacts (${{ inputs.network }}) id: gas_diff From 0d8a3f869a85791a539baea900ca4685e601fc32 Mon Sep 17 00:00:00 2001 From: Rubilmax Date: Wed, 3 Aug 2022 16:02:26 +0200 Subject: [PATCH 20/57] Simplify CI gas report setup --- .github/actions/ci-foundry/action.yml | 1 - Makefile | 2 +- foundry.toml | 4 +--- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/actions/ci-foundry/action.yml b/.github/actions/ci-foundry/action.yml index a463051a0..dffd688d9 100644 --- a/.github/actions/ci-foundry/action.yml +++ b/.github/actions/ci-foundry/action.yml @@ -58,7 +58,6 @@ runs: PROTOCOL: ${{ inputs.protocol }} NETWORK: ${{ inputs.network }} ALCHEMY_KEY: ${{ inputs.alchemyKey }} - FOUNDRY_PROFILE: gas-report - name: Compare gas reports uses: Rubilmax/foundry-gas-diff@v3.8 diff --git a/Makefile b/Makefile index f67b5b031..31017aef4 100644 --- a/Makefile +++ b/Makefile @@ -96,7 +96,7 @@ fuzz: gas-report: @echo Creating gas report for ${PROTOCOL} on ${NETWORK} - @forge test --gas-report + @FOUNDRY_FUZZ_RUNS=0 forge test --gas-report test-common: @echo Running all common tests on ${NETWORK} diff --git a/foundry.toml b/foundry.toml index 65f8bd1f9..d5e09fa5f 100644 --- a/foundry.toml +++ b/foundry.toml @@ -7,6 +7,4 @@ via_ir = false revert_strings = "default" names = true sizes = true - -[profile.gas-report] -fuzz_runs = 0 +fuzz_runs = 1024 From 35b35c80629eadda0711abcbec4a2bc3ba5ca64d Mon Sep 17 00:00:00 2001 From: Rubilmax Date: Wed, 3 Aug 2022 15:49:48 +0200 Subject: [PATCH 21/57] Make fuzzing deterministic in gas report --- .github/actions/ci-foundry/action.yml | 11 ++--------- Makefile | 2 +- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/actions/ci-foundry/action.yml b/.github/actions/ci-foundry/action.yml index dffd688d9..08c9ec831 100644 --- a/.github/actions/ci-foundry/action.yml +++ b/.github/actions/ci-foundry/action.yml @@ -44,20 +44,13 @@ runs: key: ${{ github.base_ref || github.ref_name }}-foundry-${{ inputs.protocol }}-${{ inputs.network }} # always keep compiled contracts from base branch - name: Run tests - run: make test - shell: bash - env: - PROTOCOL: ${{ inputs.protocol }} - NETWORK: ${{ inputs.network }} - ALCHEMY_KEY: ${{ inputs.alchemyKey }} - - - name: Run gas report - run: make gas-report > ${{ inputs.protocol }}.${{ inputs.network }}.gasreport.ansi + run: make gas-report | tee ${{ inputs.protocol }}.${{ inputs.network }}.gasreport.ansi shell: bash env: PROTOCOL: ${{ inputs.protocol }} NETWORK: ${{ inputs.network }} ALCHEMY_KEY: ${{ inputs.alchemyKey }} + FOUNDRY_FUZZ_SEED: 0x${{ github.event.pull_request.base.sha || github.sha }} - name: Compare gas reports uses: Rubilmax/foundry-gas-diff@v3.8 diff --git a/Makefile b/Makefile index 31017aef4..f67b5b031 100644 --- a/Makefile +++ b/Makefile @@ -96,7 +96,7 @@ fuzz: gas-report: @echo Creating gas report for ${PROTOCOL} on ${NETWORK} - @FOUNDRY_FUZZ_RUNS=0 forge test --gas-report + @forge test --gas-report test-common: @echo Running all common tests on ${NETWORK} From 75b0923022b83de8778884cec4044fe58bc820b5 Mon Sep 17 00:00:00 2001 From: Rubilmax Date: Thu, 4 Aug 2022 16:00:04 +0200 Subject: [PATCH 22/57] Bump foundry-gas-diff --- .github/actions/ci-foundry/action.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/actions/ci-foundry/action.yml b/.github/actions/ci-foundry/action.yml index 08c9ec831..f43988bec 100644 --- a/.github/actions/ci-foundry/action.yml +++ b/.github/actions/ci-foundry/action.yml @@ -53,11 +53,12 @@ runs: FOUNDRY_FUZZ_SEED: 0x${{ github.event.pull_request.base.sha || github.sha }} - name: Compare gas reports - uses: Rubilmax/foundry-gas-diff@v3.8 + uses: Rubilmax/foundry-gas-diff@v3.9 with: report: ${{ inputs.protocol }}.${{ inputs.network }}.gasreport.ansi ignore: test-foundry/**/* - title: Morpho-${{ inputs.protocol }} gas impacts (${{ inputs.network }}) + header: | + # Morpho-${{ inputs.protocol }} gas impacts (${{ inputs.network }}) id: gas_diff - name: Add gas diff to sticky comment From 63b16ac73ded366a92978d12d2d594b0257bf9f9 Mon Sep 17 00:00:00 2001 From: Rubilmax Date: Thu, 4 Aug 2022 13:51:09 +0200 Subject: [PATCH 23/57] (gas-opti) Use a `storage` variable for balances --- contracts/aave-v2/EntryPositionsManager.sol | 24 +++-- contracts/aave-v2/ExitPositionsManager.sol | 64 ++++++------ contracts/aave-v2/MatchingEngine.sol | 103 ++++++++++++-------- contracts/aave-v3/EntryPositionsManager.sol | 24 +++-- contracts/aave-v3/ExitPositionsManager.sol | 64 ++++++------ contracts/aave-v3/MatchingEngine.sol | 82 ++++++++++------ contracts/compound/MatchingEngine.sol | 46 +++++---- contracts/compound/PositionsManager.sol | 70 +++++++------ test-foundry/aave-v2/TestWithdraw.t.sol | 4 +- test-foundry/aave-v3/TestWithdraw.t.sol | 4 +- test-foundry/compound/TestWithdraw.t.sol | 4 +- 11 files changed, 283 insertions(+), 206 deletions(-) diff --git a/contracts/aave-v2/EntryPositionsManager.sol b/contracts/aave-v2/EntryPositionsManager.sol index b66dfe0d7..6d91cc0f4 100644 --- a/contracts/aave-v2/EntryPositionsManager.sol +++ b/contracts/aave-v2/EntryPositionsManager.sol @@ -141,11 +141,15 @@ contract EntryPositionsManager is IEntryPositionsManager, PositionsManagerUtils } } + Types.SupplyBalance storage onBehalfSupplyBalance = supplyBalanceInOf[_poolToken][ + _onBehalf + ]; + if (vars.toRepay > 0) { uint256 toAddInP2P = vars.toRepay.rayDiv(p2pSupplyIndex[_poolToken]); delta.p2pSupplyAmount += toAddInP2P; - supplyBalanceInOf[_poolToken][_onBehalf].inP2P += toAddInP2P; + onBehalfSupplyBalance.inP2P += toAddInP2P; _repayToPool(underlyingToken, vars.toRepay); // Reverts on error. emit P2PAmountsUpdated(_poolToken, delta.p2pSupplyAmount, delta.p2pBorrowAmount); @@ -155,7 +159,7 @@ contract EntryPositionsManager is IEntryPositionsManager, PositionsManagerUtils // Supply on pool. if (vars.remainingToSupply > 0) { - supplyBalanceInOf[_poolToken][_onBehalf].onPool += vars.remainingToSupply.rayDiv( + onBehalfSupplyBalance.onPool += vars.remainingToSupply.rayDiv( poolIndexes[_poolToken].poolSupplyIndex ); // In scaled balance. _supplyToPool(underlyingToken, vars.remainingToSupply); // Reverts on error. @@ -168,8 +172,8 @@ contract EntryPositionsManager is IEntryPositionsManager, PositionsManagerUtils _onBehalf, _poolToken, _amount, - supplyBalanceInOf[_poolToken][_onBehalf].onPool, - supplyBalanceInOf[_poolToken][_onBehalf].inP2P + onBehalfSupplyBalance.onPool, + onBehalfSupplyBalance.inP2P ); } @@ -237,11 +241,15 @@ contract EntryPositionsManager is IEntryPositionsManager, PositionsManagerUtils } } + Types.BorrowBalance storage borrowerBorrowBalance = borrowBalanceInOf[_poolToken][ + msg.sender + ]; + if (toWithdraw > 0) { uint256 toAddInP2P = toWithdraw.rayDiv(p2pBorrowIndex[_poolToken]); // In peer-to-peer unit. deltas[_poolToken].p2pBorrowAmount += toAddInP2P; - borrowBalanceInOf[_poolToken][msg.sender].inP2P += toAddInP2P; + borrowerBorrowBalance.inP2P += toAddInP2P; emit P2PAmountsUpdated(_poolToken, delta.p2pSupplyAmount, delta.p2pBorrowAmount); _withdrawFromPool(underlyingToken, _poolToken, toWithdraw); // Reverts on error. @@ -251,7 +259,7 @@ contract EntryPositionsManager is IEntryPositionsManager, PositionsManagerUtils // Borrow on pool. if (remainingToBorrow > 0) { - borrowBalanceInOf[_poolToken][msg.sender].onPool += remainingToBorrow.rayDiv( + borrowerBorrowBalance.onPool += remainingToBorrow.rayDiv( poolIndexes[_poolToken].poolBorrowIndex ); // In adUnit. _borrowFromPool(underlyingToken, remainingToBorrow); @@ -264,8 +272,8 @@ contract EntryPositionsManager is IEntryPositionsManager, PositionsManagerUtils msg.sender, _poolToken, _amount, - borrowBalanceInOf[_poolToken][msg.sender].onPool, - borrowBalanceInOf[_poolToken][msg.sender].inP2P + borrowerBorrowBalance.onPool, + borrowerBorrowBalance.inP2P ); } diff --git a/contracts/aave-v2/ExitPositionsManager.sol b/contracts/aave-v2/ExitPositionsManager.sol index 4dcea2d21..4347312b8 100644 --- a/contracts/aave-v2/ExitPositionsManager.sol +++ b/contracts/aave-v2/ExitPositionsManager.sol @@ -271,9 +271,13 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { vars.remainingGasForMatching = _maxGasForMatching; vars.poolSupplyIndex = poolIndexes[_poolToken].poolSupplyIndex; + Types.SupplyBalance storage supplierSupplyBalance = supplyBalanceInOf[_poolToken][ + _supplier + ]; + /// Pool withdraw /// - vars.onPoolSupply = supplyBalanceInOf[_poolToken][_supplier].onPool; + vars.onPoolSupply = supplierSupplyBalance.onPool; if (vars.onPoolSupply > 0) { vars.toWithdraw = Math.min( vars.onPoolSupply.rayMul(vars.poolSupplyIndex), @@ -281,7 +285,7 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { ); vars.remainingToWithdraw -= vars.toWithdraw; - supplyBalanceInOf[_poolToken][_supplier].onPool -= Math.min( + supplierSupplyBalance.onPool -= Math.min( vars.onPoolSupply, vars.toWithdraw.rayDiv(vars.poolSupplyIndex) ); @@ -289,10 +293,8 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { if (vars.remainingToWithdraw == 0) { _updateSupplierInDS(_poolToken, _supplier); - if ( - supplyBalanceInOf[_poolToken][_supplier].inP2P == 0 && - supplyBalanceInOf[_poolToken][_supplier].onPool == 0 - ) _setSupplying(_supplier, borrowMask[_poolToken], false); + if (supplierSupplyBalance.inP2P == 0 && supplierSupplyBalance.onPool == 0) + _setSupplying(_supplier, borrowMask[_poolToken], false); _withdrawFromPool(underlyingToken, _poolToken, vars.toWithdraw); // Reverts on error. underlyingToken.safeTransfer(_receiver, _amount); @@ -302,8 +304,8 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { _receiver, _poolToken, _amount, - supplyBalanceInOf[_poolToken][_supplier].onPool, - supplyBalanceInOf[_poolToken][_supplier].inP2P + supplierSupplyBalance.onPool, + supplierSupplyBalance.inP2P ); return; @@ -313,8 +315,8 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { Types.Delta storage delta = deltas[_poolToken]; vars.p2pSupplyIndex = p2pSupplyIndex[_poolToken]; - supplyBalanceInOf[_poolToken][_supplier].inP2P -= Math.min( - supplyBalanceInOf[_poolToken][_supplier].inP2P, + supplierSupplyBalance.inP2P -= Math.min( + supplierSupplyBalance.inP2P, vars.remainingToWithdraw.rayDiv(vars.p2pSupplyIndex) ); // In peer-to-peer supply unit. _updateSupplierInDS(_poolToken, _supplier); @@ -392,10 +394,8 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { _borrowFromPool(underlyingToken, vars.remainingToWithdraw); // Reverts on error. } - if ( - supplyBalanceInOf[_poolToken][_supplier].inP2P == 0 && - supplyBalanceInOf[_poolToken][_supplier].onPool == 0 - ) _setSupplying(_supplier, borrowMask[_poolToken], false); + if (supplierSupplyBalance.inP2P == 0 && supplierSupplyBalance.onPool == 0) + _setSupplying(_supplier, borrowMask[_poolToken], false); underlyingToken.safeTransfer(_receiver, _amount); emit Withdrawn( @@ -403,8 +403,8 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { _receiver, _poolToken, _amount, - supplyBalanceInOf[_poolToken][_supplier].onPool, - supplyBalanceInOf[_poolToken][_supplier].inP2P + supplierSupplyBalance.onPool, + supplierSupplyBalance.inP2P ); } @@ -428,9 +428,13 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { vars.remainingGasForMatching = _maxGasForMatching; vars.poolBorrowIndex = poolIndexes[_poolToken].poolBorrowIndex; + Types.BorrowBalance storage onBehalfBorrowBalance = borrowBalanceInOf[_poolToken][ + _onBehalf + ]; + /// Pool repay /// - vars.borrowedOnPool = borrowBalanceInOf[_poolToken][_onBehalf].onPool; + vars.borrowedOnPool = onBehalfBorrowBalance.onPool; if (vars.borrowedOnPool > 0) { vars.toRepay = Math.min( vars.borrowedOnPool.rayMul(vars.poolBorrowIndex), @@ -438,7 +442,7 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { ); vars.remainingToRepay -= vars.toRepay; - borrowBalanceInOf[_poolToken][_onBehalf].onPool -= Math.min( + onBehalfBorrowBalance.onPool -= Math.min( vars.borrowedOnPool, vars.toRepay.rayDiv(vars.poolBorrowIndex) ); // In adUnit. @@ -447,18 +451,16 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { _updateBorrowerInDS(_poolToken, _onBehalf); _repayToPool(underlyingToken, vars.toRepay); // Reverts on error. - if ( - borrowBalanceInOf[_poolToken][_onBehalf].inP2P == 0 && - borrowBalanceInOf[_poolToken][_onBehalf].onPool == 0 - ) _setBorrowing(_onBehalf, borrowMask[_poolToken], false); + if (onBehalfBorrowBalance.inP2P == 0 && onBehalfBorrowBalance.onPool == 0) + _setBorrowing(_onBehalf, borrowMask[_poolToken], false); emit Repaid( _repayer, _onBehalf, _poolToken, _amount, - borrowBalanceInOf[_poolToken][_onBehalf].onPool, - borrowBalanceInOf[_poolToken][_onBehalf].inP2P + onBehalfBorrowBalance.onPool, + onBehalfBorrowBalance.inP2P ); return; @@ -469,8 +471,8 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { vars.p2pSupplyIndex = p2pSupplyIndex[_poolToken]; vars.p2pBorrowIndex = p2pBorrowIndex[_poolToken]; vars.poolSupplyIndex = poolIndexes[_poolToken].poolSupplyIndex; - borrowBalanceInOf[_poolToken][_onBehalf].inP2P -= Math.min( - borrowBalanceInOf[_poolToken][_onBehalf].inP2P, + onBehalfBorrowBalance.inP2P -= Math.min( + onBehalfBorrowBalance.inP2P, vars.remainingToRepay.rayDiv(vars.p2pBorrowIndex) ); // In peer-to-peer borrow unit. _updateBorrowerInDS(_poolToken, _onBehalf); @@ -567,18 +569,16 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { _supplyToPool(underlyingToken, vars.remainingToRepay); // Reverts on error. } - if ( - borrowBalanceInOf[_poolToken][_onBehalf].inP2P == 0 && - borrowBalanceInOf[_poolToken][_onBehalf].onPool == 0 - ) _setBorrowing(_onBehalf, borrowMask[_poolToken], false); + if (onBehalfBorrowBalance.inP2P == 0 && onBehalfBorrowBalance.onPool == 0) + _setBorrowing(_onBehalf, borrowMask[_poolToken], false); emit Repaid( _repayer, _onBehalf, _poolToken, _amount, - borrowBalanceInOf[_poolToken][_onBehalf].onPool, - borrowBalanceInOf[_poolToken][_onBehalf].inP2P + onBehalfBorrowBalance.onPool, + onBehalfBorrowBalance.inP2P ); } diff --git a/contracts/aave-v2/MatchingEngine.sol b/contracts/aave-v2/MatchingEngine.sol index aff844df9..efabaf349 100644 --- a/contracts/aave-v2/MatchingEngine.sol +++ b/contracts/aave-v2/MatchingEngine.sol @@ -87,21 +87,20 @@ abstract contract MatchingEngine is MorphoUtils { if (gasLeftAtTheBeginning - gasleft() >= _maxGasForMatching) break; } firstPoolSupplierBalance = supplyBalanceInOf[_poolToken][firstPoolSupplier]; + vars.toMatch = Math.min( - firstPoolSupplierBalance.onPool.rayMul(vars.poolIndex), + (newPoolSupplyBalance = firstPoolSupplierBalance.onPool).rayMul(vars.poolIndex), remainingToMatch ); remainingToMatch -= vars.toMatch; - newPoolSupplyBalance = - firstPoolSupplierBalance.onPool - - vars.toMatch.rayDiv(vars.poolIndex); + newPoolSupplyBalance -= vars.toMatch.rayDiv(vars.poolIndex); newP2PSupplyBalance = firstPoolSupplierBalance.inP2P + vars.toMatch.rayDiv(vars.p2pIndex); - supplyBalanceInOf[_poolToken][firstPoolSupplier].onPool = newPoolSupplyBalance; - supplyBalanceInOf[_poolToken][firstPoolSupplier].inP2P = newP2PSupplyBalance; + firstPoolSupplierBalance.onPool = newPoolSupplyBalance; + firstPoolSupplierBalance.inP2P = newP2PSupplyBalance; _updateSupplierInDS(_poolToken, firstPoolSupplier); emit SupplierPositionUpdated( firstPoolSupplier, @@ -153,7 +152,7 @@ abstract contract MatchingEngine is MorphoUtils { } firstP2PSupplierBalance = supplyBalanceInOf[_poolToken][firstP2PSupplier]; vars.toUnmatch = Math.min( - firstP2PSupplierBalance.inP2P.rayMul(vars.p2pIndex), + (newP2PSupplyBalance = firstP2PSupplierBalance.inP2P).rayMul(vars.p2pIndex), remainingToUnmatch ); remainingToUnmatch -= vars.toUnmatch; @@ -161,12 +160,10 @@ abstract contract MatchingEngine is MorphoUtils { newPoolSupplyBalance = firstP2PSupplierBalance.onPool + vars.toUnmatch.rayDiv(vars.poolIndex); - newP2PSupplyBalance = - firstP2PSupplierBalance.inP2P - - vars.toUnmatch.rayDiv(vars.p2pIndex); + newP2PSupplyBalance -= vars.toUnmatch.rayDiv(vars.p2pIndex); - supplyBalanceInOf[_poolToken][firstP2PSupplier].onPool = newPoolSupplyBalance; - supplyBalanceInOf[_poolToken][firstP2PSupplier].inP2P = newP2PSupplyBalance; + firstP2PSupplierBalance.onPool = newPoolSupplyBalance; + firstP2PSupplierBalance.inP2P = newP2PSupplyBalance; _updateSupplierInDS(_poolToken, firstP2PSupplier); emit SupplierPositionUpdated( firstP2PSupplier, @@ -216,20 +213,18 @@ abstract contract MatchingEngine is MorphoUtils { } firstPoolBorrowerBalance = borrowBalanceInOf[_poolToken][firstPoolBorrower]; vars.toMatch = Math.min( - firstPoolBorrowerBalance.onPool.rayMul(vars.poolIndex), + (newPoolBorrowBalance = firstPoolBorrowerBalance.onPool).rayMul(vars.poolIndex), remainingToMatch ); remainingToMatch -= vars.toMatch; - newPoolBorrowBalance = - firstPoolBorrowerBalance.onPool - - vars.toMatch.rayDiv(vars.poolIndex); + newPoolBorrowBalance -= vars.toMatch.rayDiv(vars.poolIndex); newP2PBorrowBalance = firstPoolBorrowerBalance.inP2P + vars.toMatch.rayDiv(vars.p2pIndex); - borrowBalanceInOf[_poolToken][firstPoolBorrower].onPool = newPoolBorrowBalance; - borrowBalanceInOf[_poolToken][firstPoolBorrower].inP2P = newP2PBorrowBalance; + firstPoolBorrowerBalance.onPool = newPoolBorrowBalance; + firstPoolBorrowerBalance.inP2P = newP2PBorrowBalance; _updateBorrowerInDS(_poolToken, firstPoolBorrower); emit BorrowerPositionUpdated( firstPoolBorrower, @@ -281,7 +276,7 @@ abstract contract MatchingEngine is MorphoUtils { } firstP2PBorrowerBalance = borrowBalanceInOf[_poolToken][firstP2PBorrower]; vars.toUnmatch = Math.min( - firstP2PBorrowerBalance.inP2P.rayMul(vars.p2pIndex), + (newP2PBorrowBalance = firstP2PBorrowerBalance.inP2P).rayMul(vars.p2pIndex), remainingToUnmatch ); remainingToUnmatch -= vars.toUnmatch; @@ -289,12 +284,10 @@ abstract contract MatchingEngine is MorphoUtils { newPoolBorrowBalance = firstP2PBorrowerBalance.onPool + vars.toUnmatch.rayDiv(vars.poolIndex); - newP2PBorrowBalance = - firstP2PBorrowerBalance.inP2P - - vars.toUnmatch.rayDiv(vars.p2pIndex); + newP2PBorrowBalance -= vars.toUnmatch.rayDiv(vars.p2pIndex); - borrowBalanceInOf[_poolToken][firstP2PBorrower].onPool = newPoolBorrowBalance; - borrowBalanceInOf[_poolToken][firstP2PBorrower].inP2P = newP2PBorrowBalance; + firstP2PBorrowerBalance.onPool = newPoolBorrowBalance; + firstP2PBorrowerBalance.inP2P = newP2PBorrowBalance; _updateBorrowerInDS(_poolToken, firstP2PBorrower); emit BorrowerPositionUpdated( firstP2PBorrower, @@ -314,15 +307,27 @@ abstract contract MatchingEngine is MorphoUtils { /// @param _poolToken The address of the market on which to update the suppliers data structure. /// @param _user The address of the user. function _updateSupplierInDS(address _poolToken, address _user) internal { - uint256 onPool = supplyBalanceInOf[_poolToken][_user].onPool; - uint256 inP2P = supplyBalanceInOf[_poolToken][_user].inP2P; - uint256 formerValueOnPool = suppliersOnPool[_poolToken].getValueOf(_user); - uint256 formerValueInP2P = suppliersInP2P[_poolToken].getValueOf(_user); - - suppliersOnPool[_poolToken].update(_user, formerValueOnPool, onPool, maxSortedUsers); - suppliersInP2P[_poolToken].update(_user, formerValueInP2P, inP2P, maxSortedUsers); - - if (formerValueOnPool != onPool && address(rewardsManager) != address(0)) + Types.SupplyBalance memory userSupplyBalance = supplyBalanceInOf[_poolToken][_user]; + HeapOrdering.HeapArray storage marketSupliersOnPool = suppliersOnPool[_poolToken]; + HeapOrdering.HeapArray storage marketSupliersInP2P = suppliersInP2P[_poolToken]; + + uint256 formerValueOnPool = marketSupliersOnPool.getValueOf(_user); + uint256 formerValueInP2P = marketSupliersInP2P.getValueOf(_user); + + marketSupliersOnPool.update( + _user, + formerValueOnPool, + userSupplyBalance.onPool, + maxSortedUsers + ); + marketSupliersInP2P.update( + _user, + formerValueInP2P, + userSupplyBalance.inP2P, + maxSortedUsers + ); + + if (formerValueOnPool != userSupplyBalance.onPool && address(rewardsManager) != address(0)) rewardsManager.updateUserAssetAndAccruedRewards( _user, _poolToken, @@ -335,15 +340,29 @@ abstract contract MatchingEngine is MorphoUtils { /// @param _poolToken The address of the market on which to update the borrowers data structure. /// @param _user The address of the user. function _updateBorrowerInDS(address _poolToken, address _user) internal { - uint256 onPool = borrowBalanceInOf[_poolToken][_user].onPool; - uint256 inP2P = borrowBalanceInOf[_poolToken][_user].inP2P; - uint256 formerValueOnPool = borrowersOnPool[_poolToken].getValueOf(_user); - uint256 formerValueInP2P = borrowersInP2P[_poolToken].getValueOf(_user); - - borrowersOnPool[_poolToken].update(_user, formerValueOnPool, onPool, maxSortedUsers); - borrowersInP2P[_poolToken].update(_user, formerValueInP2P, inP2P, maxSortedUsers); - - if (formerValueOnPool != onPool && address(rewardsManager) != address(0)) { + Types.BorrowBalance memory userBorrowBalance = borrowBalanceInOf[_poolToken][_user]; + HeapOrdering.HeapArray storage marketBorrowersOnPool = borrowersOnPool[_poolToken]; + HeapOrdering.HeapArray storage marketBorrowersInP2P = borrowersInP2P[_poolToken]; + + uint256 formerValueOnPool = marketBorrowersOnPool.getValueOf(_user); + uint256 formerValueInP2P = marketBorrowersInP2P.getValueOf(_user); + + marketBorrowersOnPool.update( + _user, + formerValueOnPool, + userBorrowBalance.onPool, + maxSortedUsers + ); + marketBorrowersInP2P.update( + _user, + formerValueInP2P, + userBorrowBalance.inP2P, + maxSortedUsers + ); + + if ( + formerValueOnPool != userBorrowBalance.onPool && address(rewardsManager) != address(0) + ) { address variableDebtTokenAddress = pool .getReserveData(market[_poolToken].underlyingToken) .variableDebtTokenAddress; diff --git a/contracts/aave-v3/EntryPositionsManager.sol b/contracts/aave-v3/EntryPositionsManager.sol index 17d0857f4..0f70ed014 100644 --- a/contracts/aave-v3/EntryPositionsManager.sol +++ b/contracts/aave-v3/EntryPositionsManager.sol @@ -141,11 +141,15 @@ contract EntryPositionsManager is IEntryPositionsManager, PositionsManagerUtils } } + Types.SupplyBalance storage onBehalfSupplyBalance = supplyBalanceInOf[_poolToken][ + _onBehalf + ]; + if (vars.toRepay > 0) { uint256 toAddInP2P = vars.toRepay.rayDiv(p2pSupplyIndex[_poolToken]); delta.p2pSupplyAmount += toAddInP2P; - supplyBalanceInOf[_poolToken][_onBehalf].inP2P += toAddInP2P; + onBehalfSupplyBalance.inP2P += toAddInP2P; _repayToPool(underlyingToken, vars.toRepay); // Reverts on error. emit P2PAmountsUpdated(_poolToken, delta.p2pSupplyAmount, delta.p2pBorrowAmount); @@ -155,7 +159,7 @@ contract EntryPositionsManager is IEntryPositionsManager, PositionsManagerUtils // Supply on pool. if (vars.remainingToSupply > 0) { - supplyBalanceInOf[_poolToken][_onBehalf].onPool += vars.remainingToSupply.rayDiv( + onBehalfSupplyBalance.onPool += vars.remainingToSupply.rayDiv( poolIndexes[_poolToken].poolSupplyIndex ); // In scaled balance. _supplyToPool(underlyingToken, vars.remainingToSupply); // Reverts on error. @@ -168,8 +172,8 @@ contract EntryPositionsManager is IEntryPositionsManager, PositionsManagerUtils _onBehalf, _poolToken, _amount, - supplyBalanceInOf[_poolToken][_onBehalf].onPool, - supplyBalanceInOf[_poolToken][_onBehalf].inP2P + onBehalfSupplyBalance.onPool, + onBehalfSupplyBalance.inP2P ); } @@ -237,11 +241,15 @@ contract EntryPositionsManager is IEntryPositionsManager, PositionsManagerUtils } } + Types.BorrowBalance storage borrowerBorrowBalance = borrowBalanceInOf[_poolToken][ + msg.sender + ]; + if (toWithdraw > 0) { uint256 toAddInP2P = toWithdraw.rayDiv(p2pBorrowIndex[_poolToken]); // In peer-to-peer unit. deltas[_poolToken].p2pBorrowAmount += toAddInP2P; - borrowBalanceInOf[_poolToken][msg.sender].inP2P += toAddInP2P; + borrowerBorrowBalance.inP2P += toAddInP2P; emit P2PAmountsUpdated(_poolToken, delta.p2pSupplyAmount, delta.p2pBorrowAmount); _withdrawFromPool(underlyingToken, _poolToken, toWithdraw); // Reverts on error. @@ -251,7 +259,7 @@ contract EntryPositionsManager is IEntryPositionsManager, PositionsManagerUtils // Borrow on pool. if (remainingToBorrow > 0) { - borrowBalanceInOf[_poolToken][msg.sender].onPool += remainingToBorrow.rayDiv( + borrowerBorrowBalance.onPool += remainingToBorrow.rayDiv( poolIndexes[_poolToken].poolBorrowIndex ); // In adUnit. _borrowFromPool(underlyingToken, remainingToBorrow); @@ -264,8 +272,8 @@ contract EntryPositionsManager is IEntryPositionsManager, PositionsManagerUtils msg.sender, _poolToken, _amount, - borrowBalanceInOf[_poolToken][msg.sender].onPool, - borrowBalanceInOf[_poolToken][msg.sender].inP2P + borrowerBorrowBalance.onPool, + borrowerBorrowBalance.inP2P ); } diff --git a/contracts/aave-v3/ExitPositionsManager.sol b/contracts/aave-v3/ExitPositionsManager.sol index 052997123..b612428b2 100644 --- a/contracts/aave-v3/ExitPositionsManager.sol +++ b/contracts/aave-v3/ExitPositionsManager.sol @@ -270,9 +270,13 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { vars.remainingGasForMatching = _maxGasForMatching; vars.poolSupplyIndex = poolIndexes[_poolToken].poolSupplyIndex; + Types.SupplyBalance storage supplierSupplyBalance = supplyBalanceInOf[_poolToken][ + _supplier + ]; + /// Pool withdraw /// - vars.onPoolSupply = supplyBalanceInOf[_poolToken][_supplier].onPool; + vars.onPoolSupply = supplierSupplyBalance.onPool; if (vars.onPoolSupply > 0) { vars.toWithdraw = Math.min( vars.onPoolSupply.rayMul(vars.poolSupplyIndex), @@ -280,7 +284,7 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { ); vars.remainingToWithdraw -= vars.toWithdraw; - supplyBalanceInOf[_poolToken][_supplier].onPool -= Math.min( + supplierSupplyBalance.onPool -= Math.min( vars.onPoolSupply, vars.toWithdraw.rayDiv(vars.poolSupplyIndex) ); @@ -288,10 +292,8 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { if (vars.remainingToWithdraw == 0) { _updateSupplierInDS(_poolToken, _supplier); - if ( - supplyBalanceInOf[_poolToken][_supplier].inP2P == 0 && - supplyBalanceInOf[_poolToken][_supplier].onPool == 0 - ) _setSupplying(_supplier, borrowMask[_poolToken], false); + if (supplierSupplyBalance.inP2P == 0 && supplierSupplyBalance.onPool == 0) + _setSupplying(_supplier, borrowMask[_poolToken], false); _withdrawFromPool(underlyingToken, _poolToken, vars.toWithdraw); // Reverts on error. underlyingToken.safeTransfer(_receiver, _amount); @@ -301,8 +303,8 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { _receiver, _poolToken, _amount, - supplyBalanceInOf[_poolToken][_supplier].onPool, - supplyBalanceInOf[_poolToken][_supplier].inP2P + supplierSupplyBalance.onPool, + supplierSupplyBalance.inP2P ); return; @@ -312,8 +314,8 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { Types.Delta storage delta = deltas[_poolToken]; vars.p2pSupplyIndex = p2pSupplyIndex[_poolToken]; - supplyBalanceInOf[_poolToken][_supplier].inP2P -= Math.min( - supplyBalanceInOf[_poolToken][_supplier].inP2P, + supplierSupplyBalance.inP2P -= Math.min( + supplierSupplyBalance.inP2P, vars.remainingToWithdraw.rayDiv(vars.p2pSupplyIndex) ); // In peer-to-peer supply unit. _updateSupplierInDS(_poolToken, _supplier); @@ -391,10 +393,8 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { _borrowFromPool(underlyingToken, vars.remainingToWithdraw); // Reverts on error. } - if ( - supplyBalanceInOf[_poolToken][_supplier].inP2P == 0 && - supplyBalanceInOf[_poolToken][_supplier].onPool == 0 - ) _setSupplying(_supplier, borrowMask[_poolToken], false); + if (supplierSupplyBalance.inP2P == 0 && supplierSupplyBalance.onPool == 0) + _setSupplying(_supplier, borrowMask[_poolToken], false); underlyingToken.safeTransfer(_receiver, _amount); emit Withdrawn( @@ -402,8 +402,8 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { _receiver, _poolToken, _amount, - supplyBalanceInOf[_poolToken][_supplier].onPool, - supplyBalanceInOf[_poolToken][_supplier].inP2P + supplierSupplyBalance.onPool, + supplierSupplyBalance.inP2P ); } @@ -427,9 +427,13 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { vars.remainingGasForMatching = _maxGasForMatching; vars.poolBorrowIndex = poolIndexes[_poolToken].poolBorrowIndex; + Types.BorrowBalance storage onBehalfBorrowBalance = borrowBalanceInOf[_poolToken][ + _onBehalf + ]; + /// Pool repay /// - vars.borrowedOnPool = borrowBalanceInOf[_poolToken][_onBehalf].onPool; + vars.borrowedOnPool = onBehalfBorrowBalance.onPool; if (vars.borrowedOnPool > 0) { vars.toRepay = Math.min( vars.borrowedOnPool.rayMul(vars.poolBorrowIndex), @@ -437,7 +441,7 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { ); vars.remainingToRepay -= vars.toRepay; - borrowBalanceInOf[_poolToken][_onBehalf].onPool -= Math.min( + onBehalfBorrowBalance.onPool -= Math.min( vars.borrowedOnPool, vars.toRepay.rayDiv(vars.poolBorrowIndex) ); // In adUnit. @@ -446,18 +450,16 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { _updateBorrowerInDS(_poolToken, _onBehalf); _repayToPool(underlyingToken, vars.toRepay); // Reverts on error. - if ( - borrowBalanceInOf[_poolToken][_onBehalf].inP2P == 0 && - borrowBalanceInOf[_poolToken][_onBehalf].onPool == 0 - ) _setBorrowing(_onBehalf, borrowMask[_poolToken], false); + if (onBehalfBorrowBalance.inP2P == 0 && onBehalfBorrowBalance.onPool == 0) + _setBorrowing(_onBehalf, borrowMask[_poolToken], false); emit Repaid( _repayer, _onBehalf, _poolToken, _amount, - borrowBalanceInOf[_poolToken][_onBehalf].onPool, - borrowBalanceInOf[_poolToken][_onBehalf].inP2P + onBehalfBorrowBalance.onPool, + onBehalfBorrowBalance.inP2P ); return; @@ -468,8 +470,8 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { vars.p2pSupplyIndex = p2pSupplyIndex[_poolToken]; vars.p2pBorrowIndex = p2pBorrowIndex[_poolToken]; vars.poolSupplyIndex = poolIndexes[_poolToken].poolSupplyIndex; - borrowBalanceInOf[_poolToken][_onBehalf].inP2P -= Math.min( - borrowBalanceInOf[_poolToken][_onBehalf].inP2P, + onBehalfBorrowBalance.inP2P -= Math.min( + onBehalfBorrowBalance.inP2P, vars.remainingToRepay.rayDiv(vars.p2pBorrowIndex) ); // In peer-to-peer borrow unit. _updateBorrowerInDS(_poolToken, _onBehalf); @@ -566,18 +568,16 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { _supplyToPool(underlyingToken, vars.remainingToRepay); // Reverts on error. } - if ( - borrowBalanceInOf[_poolToken][_onBehalf].inP2P == 0 && - borrowBalanceInOf[_poolToken][_onBehalf].onPool == 0 - ) _setBorrowing(_onBehalf, borrowMask[_poolToken], false); + if (onBehalfBorrowBalance.inP2P == 0 && onBehalfBorrowBalance.onPool == 0) + _setBorrowing(_onBehalf, borrowMask[_poolToken], false); emit Repaid( _repayer, _onBehalf, _poolToken, _amount, - borrowBalanceInOf[_poolToken][_onBehalf].onPool, - borrowBalanceInOf[_poolToken][_onBehalf].inP2P + onBehalfBorrowBalance.onPool, + onBehalfBorrowBalance.inP2P ); } diff --git a/contracts/aave-v3/MatchingEngine.sol b/contracts/aave-v3/MatchingEngine.sol index 146c42c1f..9c2ccb341 100644 --- a/contracts/aave-v3/MatchingEngine.sol +++ b/contracts/aave-v3/MatchingEngine.sol @@ -216,20 +216,18 @@ abstract contract MatchingEngine is MorphoUtils { } firstPoolBorrowerBalance = borrowBalanceInOf[_poolToken][firstPoolBorrower]; vars.toMatch = Math.min( - firstPoolBorrowerBalance.onPool.rayMul(vars.poolIndex), + (newPoolBorrowBalance = firstPoolBorrowerBalance.onPool).rayMul(vars.poolIndex), remainingToMatch ); remainingToMatch -= vars.toMatch; - newPoolBorrowBalance = - firstPoolBorrowerBalance.onPool - - vars.toMatch.rayDiv(vars.poolIndex); + newPoolBorrowBalance -= vars.toMatch.rayDiv(vars.poolIndex); newP2PBorrowBalance = firstPoolBorrowerBalance.inP2P + vars.toMatch.rayDiv(vars.p2pIndex); - borrowBalanceInOf[_poolToken][firstPoolBorrower].onPool = newPoolBorrowBalance; - borrowBalanceInOf[_poolToken][firstPoolBorrower].inP2P = newP2PBorrowBalance; + firstPoolBorrowerBalance.onPool = newPoolBorrowBalance; + firstPoolBorrowerBalance.inP2P = newP2PBorrowBalance; _updateBorrowerInDS(_poolToken, firstPoolBorrower); emit BorrowerPositionUpdated( firstPoolBorrower, @@ -281,7 +279,7 @@ abstract contract MatchingEngine is MorphoUtils { } firstP2PBorrowerBalance = borrowBalanceInOf[_poolToken][firstP2PBorrower]; vars.toUnmatch = Math.min( - firstP2PBorrowerBalance.inP2P.rayMul(vars.p2pIndex), + (newP2PBorrowBalance = firstP2PBorrowerBalance.inP2P).rayMul(vars.p2pIndex), remainingToUnmatch ); remainingToUnmatch -= vars.toUnmatch; @@ -289,12 +287,10 @@ abstract contract MatchingEngine is MorphoUtils { newPoolBorrowBalance = firstP2PBorrowerBalance.onPool + vars.toUnmatch.rayDiv(vars.poolIndex); - newP2PBorrowBalance = - firstP2PBorrowerBalance.inP2P - - vars.toUnmatch.rayDiv(vars.p2pIndex); + newP2PBorrowBalance -= vars.toUnmatch.rayDiv(vars.p2pIndex); - borrowBalanceInOf[_poolToken][firstP2PBorrower].onPool = newPoolBorrowBalance; - borrowBalanceInOf[_poolToken][firstP2PBorrower].inP2P = newP2PBorrowBalance; + firstP2PBorrowerBalance.onPool = newPoolBorrowBalance; + firstP2PBorrowerBalance.inP2P = newP2PBorrowBalance; _updateBorrowerInDS(_poolToken, firstP2PBorrower); emit BorrowerPositionUpdated( firstP2PBorrower, @@ -314,15 +310,27 @@ abstract contract MatchingEngine is MorphoUtils { /// @param _poolToken The address of the market on which to update the suppliers data structure. /// @param _user The address of the user. function _updateSupplierInDS(address _poolToken, address _user) internal { - uint256 onPool = supplyBalanceInOf[_poolToken][_user].onPool; - uint256 inP2P = supplyBalanceInOf[_poolToken][_user].inP2P; - uint256 formerValueOnPool = suppliersOnPool[_poolToken].getValueOf(_user); - uint256 formerValueInP2P = suppliersInP2P[_poolToken].getValueOf(_user); - - suppliersOnPool[_poolToken].update(_user, formerValueOnPool, onPool, maxSortedUsers); - suppliersInP2P[_poolToken].update(_user, formerValueInP2P, inP2P, maxSortedUsers); - - if (formerValueOnPool != onPool && address(rewardsManager) != address(0)) + Types.SupplyBalance memory userSupplyBalance = supplyBalanceInOf[_poolToken][_user]; + HeapOrdering.HeapArray storage marketSupliersOnPool = suppliersOnPool[_poolToken]; + HeapOrdering.HeapArray storage marketSupliersInP2P = suppliersInP2P[_poolToken]; + + uint256 formerValueOnPool = marketSupliersOnPool.getValueOf(_user); + uint256 formerValueInP2P = marketSupliersInP2P.getValueOf(_user); + + marketSupliersOnPool.update( + _user, + formerValueOnPool, + userSupplyBalance.onPool, + maxSortedUsers + ); + marketSupliersInP2P.update( + _user, + formerValueInP2P, + userSupplyBalance.inP2P, + maxSortedUsers + ); + + if (formerValueOnPool != userSupplyBalance.onPool && address(rewardsManager) != address(0)) rewardsManager.updateUserAssetAndAccruedRewards( rewardsController, _user, @@ -336,15 +344,29 @@ abstract contract MatchingEngine is MorphoUtils { /// @param _poolToken The address of the market on which to update the borrowers data structure. /// @param _user The address of the user. function _updateBorrowerInDS(address _poolToken, address _user) internal { - uint256 onPool = borrowBalanceInOf[_poolToken][_user].onPool; - uint256 inP2P = borrowBalanceInOf[_poolToken][_user].inP2P; - uint256 formerValueOnPool = borrowersOnPool[_poolToken].getValueOf(_user); - uint256 formerValueInP2P = borrowersInP2P[_poolToken].getValueOf(_user); - - borrowersOnPool[_poolToken].update(_user, formerValueOnPool, onPool, maxSortedUsers); - borrowersInP2P[_poolToken].update(_user, formerValueInP2P, inP2P, maxSortedUsers); - - if (formerValueOnPool != onPool && address(rewardsManager) != address(0)) { + Types.BorrowBalance memory userBorrowBalance = borrowBalanceInOf[_poolToken][_user]; + HeapOrdering.HeapArray storage marketBorrowersOnPool = borrowersOnPool[_poolToken]; + HeapOrdering.HeapArray storage marketBorrowersInP2P = borrowersInP2P[_poolToken]; + + uint256 formerValueOnPool = marketBorrowersOnPool.getValueOf(_user); + uint256 formerValueInP2P = marketBorrowersInP2P.getValueOf(_user); + + marketBorrowersOnPool.update( + _user, + formerValueOnPool, + userBorrowBalance.onPool, + maxSortedUsers + ); + marketBorrowersInP2P.update( + _user, + formerValueInP2P, + userBorrowBalance.inP2P, + maxSortedUsers + ); + + if ( + formerValueOnPool != userBorrowBalance.onPool && address(rewardsManager) != address(0) + ) { address variableDebtTokenAddress = pool .getReserveData(market[_poolToken].underlyingToken) .variableDebtTokenAddress; diff --git a/contracts/compound/MatchingEngine.sol b/contracts/compound/MatchingEngine.sol index 0adda8fe7..caa52affb 100644 --- a/contracts/compound/MatchingEngine.sol +++ b/contracts/compound/MatchingEngine.sol @@ -315,29 +315,32 @@ abstract contract MatchingEngine is MorphoUtils { /// @param _poolToken The address of the market on which to update the suppliers data structure. /// @param _user The address of the user. function _updateSupplierInDS(address _poolToken, address _user) internal { - uint256 onPool = supplyBalanceInOf[_poolToken][_user].onPool; - uint256 inP2P = supplyBalanceInOf[_poolToken][_user].inP2P; - uint256 formerValueOnPool = suppliersOnPool[_poolToken].getValueOf(_user); - uint256 formerValueInP2P = suppliersInP2P[_poolToken].getValueOf(_user); + Types.SupplyBalance storage userSupplyBalance = supplyBalanceInOf[_poolToken][_user]; + uint256 onPool = userSupplyBalance.onPool; + uint256 inP2P = userSupplyBalance.inP2P; + DoubleLinkedList.List storage marketSuppliersOnPool = suppliersOnPool[_poolToken]; + DoubleLinkedList.List storage marketSuppliersInP2P = suppliersInP2P[_poolToken]; + uint256 formerValueOnPool = marketSuppliersOnPool.getValueOf(_user); + uint256 formerValueInP2P = marketSuppliersInP2P.getValueOf(_user); // Round pool balance to 0 if below threshold. if (onPool <= dustThreshold) { - supplyBalanceInOf[_poolToken][_user].onPool = 0; + userSupplyBalance.onPool = 0; onPool = 0; } if (formerValueOnPool != onPool) { - if (formerValueOnPool > 0) suppliersOnPool[_poolToken].remove(_user); - if (onPool > 0) suppliersOnPool[_poolToken].insertSorted(_user, onPool, maxSortedUsers); + if (formerValueOnPool > 0) marketSuppliersOnPool.remove(_user); + if (onPool > 0) marketSuppliersOnPool.insertSorted(_user, onPool, maxSortedUsers); } // Round peer-to-peer balance to 0 if below threshold. if (inP2P <= dustThreshold) { - supplyBalanceInOf[_poolToken][_user].inP2P = 0; + userSupplyBalance.inP2P = 0; inP2P = 0; } if (formerValueInP2P != inP2P) { - if (formerValueInP2P > 0) suppliersInP2P[_poolToken].remove(_user); - if (inP2P > 0) suppliersInP2P[_poolToken].insertSorted(_user, inP2P, maxSortedUsers); + if (formerValueInP2P > 0) marketSuppliersInP2P.remove(_user); + if (inP2P > 0) marketSuppliersInP2P.insertSorted(_user, inP2P, maxSortedUsers); } if (address(rewardsManager) != address(0)) @@ -348,29 +351,32 @@ abstract contract MatchingEngine is MorphoUtils { /// @param _poolToken The address of the market on which to update the borrowers data structure. /// @param _user The address of the user. function _updateBorrowerInDS(address _poolToken, address _user) internal { - uint256 onPool = borrowBalanceInOf[_poolToken][_user].onPool; - uint256 inP2P = borrowBalanceInOf[_poolToken][_user].inP2P; - uint256 formerValueOnPool = borrowersOnPool[_poolToken].getValueOf(_user); - uint256 formerValueInP2P = borrowersInP2P[_poolToken].getValueOf(_user); + Types.BorrowBalance storage userBorrowBalance = borrowBalanceInOf[_poolToken][_user]; + uint256 onPool = userBorrowBalance.onPool; + uint256 inP2P = userBorrowBalance.inP2P; + DoubleLinkedList.List storage marketBorrowersOnPool = borrowersOnPool[_poolToken]; + DoubleLinkedList.List storage marketBorrowersInP2P = borrowersInP2P[_poolToken]; + uint256 formerValueOnPool = marketBorrowersOnPool.getValueOf(_user); + uint256 formerValueInP2P = marketBorrowersInP2P.getValueOf(_user); // Round pool balance to 0 if below threshold. if (onPool <= dustThreshold) { - borrowBalanceInOf[_poolToken][_user].onPool = 0; + userBorrowBalance.onPool = 0; onPool = 0; } if (formerValueOnPool != onPool) { - if (formerValueOnPool > 0) borrowersOnPool[_poolToken].remove(_user); - if (onPool > 0) borrowersOnPool[_poolToken].insertSorted(_user, onPool, maxSortedUsers); + if (formerValueOnPool > 0) marketBorrowersOnPool.remove(_user); + if (onPool > 0) marketBorrowersOnPool.insertSorted(_user, onPool, maxSortedUsers); } // Round peer-to-peer balance to 0 if below threshold. if (inP2P <= dustThreshold) { - borrowBalanceInOf[_poolToken][_user].inP2P = 0; + userBorrowBalance.inP2P = 0; inP2P = 0; } if (formerValueInP2P != inP2P) { - if (formerValueInP2P > 0) borrowersInP2P[_poolToken].remove(_user); - if (inP2P > 0) borrowersInP2P[_poolToken].insertSorted(_user, inP2P, maxSortedUsers); + if (formerValueInP2P > 0) marketBorrowersInP2P.remove(_user); + if (inP2P > 0) marketBorrowersInP2P.insertSorted(_user, inP2P, maxSortedUsers); } if (address(rewardsManager) != address(0)) diff --git a/contracts/compound/PositionsManager.sol b/contracts/compound/PositionsManager.sol index cd486b769..1079bfe0d 100644 --- a/contracts/compound/PositionsManager.sol +++ b/contracts/compound/PositionsManager.sol @@ -262,11 +262,15 @@ contract PositionsManager is IPositionsManager, MatchingEngine { } } + Types.SupplyBalance storage onBehalfSupplyBalance = supplyBalanceInOf[_poolToken][ + _onBehalf + ]; + if (vars.toRepay > 0) { uint256 toAddInP2P = vars.toRepay.div(p2pSupplyIndex[_poolToken]); delta.p2pSupplyAmount += toAddInP2P; - supplyBalanceInOf[_poolToken][_onBehalf].inP2P += toAddInP2P; + onBehalfSupplyBalance.inP2P += toAddInP2P; _repayToPool(_poolToken, underlyingToken, vars.toRepay); // Reverts on error. emit P2PAmountsUpdated(_poolToken, delta.p2pSupplyAmount, delta.p2pBorrowAmount); @@ -276,7 +280,7 @@ contract PositionsManager is IPositionsManager, MatchingEngine { // Supply on pool. if (vars.remainingToSupply > 0) { - supplyBalanceInOf[_poolToken][_onBehalf].onPool += vars.remainingToSupply.div( + onBehalfSupplyBalance.onPool += vars.remainingToSupply.div( ICToken(_poolToken).exchangeRateStored() // Exchange rate has already been updated. ); // In scaled balance. _supplyToPool(_poolToken, underlyingToken, vars.remainingToSupply); // Reverts on error. @@ -289,8 +293,8 @@ contract PositionsManager is IPositionsManager, MatchingEngine { _onBehalf, _poolToken, _amount, - supplyBalanceInOf[_poolToken][_onBehalf].onPool, - supplyBalanceInOf[_poolToken][_onBehalf].inP2P + onBehalfSupplyBalance.onPool, + onBehalfSupplyBalance.inP2P ); } @@ -355,11 +359,15 @@ contract PositionsManager is IPositionsManager, MatchingEngine { } } + Types.BorrowBalance storage borrowerBorrowBalance = borrowBalanceInOf[_poolToken][ + msg.sender + ]; + if (toWithdraw > 0) { uint256 toAddInP2P = toWithdraw.div(p2pBorrowIndex[_poolToken]); // In peer-to-peer unit. deltas[_poolToken].p2pBorrowAmount += toAddInP2P; - borrowBalanceInOf[_poolToken][msg.sender].inP2P += toAddInP2P; + borrowerBorrowBalance.inP2P += toAddInP2P; emit P2PAmountsUpdated(_poolToken, delta.p2pSupplyAmount, delta.p2pBorrowAmount); // If this value is equal to 0 the withdraw will revert on Compound. @@ -370,7 +378,7 @@ contract PositionsManager is IPositionsManager, MatchingEngine { // Borrow on pool. if (remainingToBorrow > 0) { - borrowBalanceInOf[_poolToken][msg.sender].onPool += remainingToBorrow.div( + borrowerBorrowBalance.onPool += remainingToBorrow.div( ICToken(_poolToken).borrowIndex() ); // In cdUnit. _borrowFromPool(_poolToken, remainingToBorrow); @@ -383,8 +391,8 @@ contract PositionsManager is IPositionsManager, MatchingEngine { msg.sender, _poolToken, _amount, - borrowBalanceInOf[_poolToken][msg.sender].onPool, - borrowBalanceInOf[_poolToken][msg.sender].inP2P + borrowerBorrowBalance.onPool, + borrowerBorrowBalance.inP2P ); } @@ -514,10 +522,14 @@ contract PositionsManager is IPositionsManager, MatchingEngine { if (_amount.div(vars.poolSupplyIndex) == 0) revert WithdrawTooSmall(); + Types.SupplyBalance storage supplierSupplyBalance = supplyBalanceInOf[_poolToken][ + _supplier + ]; + /// Pool withdraw /// // Withdraw supply on pool. - uint256 onPoolSupply = supplyBalanceInOf[_poolToken][_supplier].onPool; + uint256 onPoolSupply = supplierSupplyBalance.onPool; if (onPoolSupply > 0) { uint256 maxToWithdrawOnPool = onPoolSupply.mul(vars.poolSupplyIndex); @@ -528,13 +540,11 @@ contract PositionsManager is IPositionsManager, MatchingEngine { vars.toWithdraw = CompoundMath.min(vars.remainingToWithdraw, vars.withdrawable); vars.remainingToWithdraw -= vars.toWithdraw; - supplyBalanceInOf[_poolToken][_supplier].onPool -= vars.toWithdraw.div( - vars.poolSupplyIndex - ); + supplierSupplyBalance.onPool -= vars.toWithdraw.div(vars.poolSupplyIndex); } else { vars.toWithdraw = maxToWithdrawOnPool; vars.remainingToWithdraw -= maxToWithdrawOnPool; - supplyBalanceInOf[_poolToken][_supplier].onPool = 0; + supplierSupplyBalance.onPool = 0; } if (vars.remainingToWithdraw == 0) { @@ -551,8 +561,8 @@ contract PositionsManager is IPositionsManager, MatchingEngine { _receiver, _poolToken, _amount, - supplyBalanceInOf[_poolToken][_supplier].onPool, - supplyBalanceInOf[_poolToken][_supplier].inP2P + supplierSupplyBalance.onPool, + supplierSupplyBalance.inP2P ); return; @@ -562,8 +572,8 @@ contract PositionsManager is IPositionsManager, MatchingEngine { Types.Delta storage delta = deltas[_poolToken]; vars.p2pSupplyIndex = p2pSupplyIndex[_poolToken]; - supplyBalanceInOf[_poolToken][_supplier].inP2P -= CompoundMath.min( - supplyBalanceInOf[_poolToken][_supplier].inP2P, + supplierSupplyBalance.inP2P -= CompoundMath.min( + supplierSupplyBalance.inP2P, vars.remainingToWithdraw.div(vars.p2pSupplyIndex) ); // In peer-to-peer unit _updateSupplierInDS(_poolToken, _supplier); @@ -656,8 +666,8 @@ contract PositionsManager is IPositionsManager, MatchingEngine { _receiver, _poolToken, _amount, - supplyBalanceInOf[_poolToken][_supplier].onPool, - supplyBalanceInOf[_poolToken][_supplier].inP2P + supplierSupplyBalance.onPool, + supplierSupplyBalance.inP2P ); } @@ -684,17 +694,21 @@ contract PositionsManager is IPositionsManager, MatchingEngine { vars.remainingGasForMatching = _maxGasForMatching; vars.poolBorrowIndex = ICToken(_poolToken).borrowIndex(); + Types.BorrowBalance storage onBehalfBorrowBalance = borrowBalanceInOf[_poolToken][ + _onBehalf + ]; + /// Pool repay /// // Repay borrow on pool. - vars.borrowedOnPool = borrowBalanceInOf[_poolToken][_onBehalf].onPool; + vars.borrowedOnPool = onBehalfBorrowBalance.onPool; if (vars.borrowedOnPool > 0) { vars.maxToRepayOnPool = vars.borrowedOnPool.mul(vars.poolBorrowIndex); if (vars.maxToRepayOnPool > vars.remainingToRepay) { vars.toRepay = vars.remainingToRepay; - borrowBalanceInOf[_poolToken][_onBehalf].onPool -= CompoundMath.min( + onBehalfBorrowBalance.onPool -= CompoundMath.min( vars.borrowedOnPool, vars.toRepay.div(vars.poolBorrowIndex) ); // In cdUnit. @@ -708,8 +722,8 @@ contract PositionsManager is IPositionsManager, MatchingEngine { _onBehalf, _poolToken, _amount, - borrowBalanceInOf[_poolToken][_onBehalf].onPool, - borrowBalanceInOf[_poolToken][_onBehalf].inP2P + onBehalfBorrowBalance.onPool, + onBehalfBorrowBalance.inP2P ); return; @@ -717,7 +731,7 @@ contract PositionsManager is IPositionsManager, MatchingEngine { vars.toRepay = vars.maxToRepayOnPool; vars.remainingToRepay -= vars.toRepay; - borrowBalanceInOf[_poolToken][_onBehalf].onPool = 0; + onBehalfBorrowBalance.onPool = 0; } } @@ -725,8 +739,8 @@ contract PositionsManager is IPositionsManager, MatchingEngine { vars.p2pSupplyIndex = p2pSupplyIndex[_poolToken]; vars.p2pBorrowIndex = p2pBorrowIndex[_poolToken]; - borrowBalanceInOf[_poolToken][_onBehalf].inP2P -= CompoundMath.min( - borrowBalanceInOf[_poolToken][_onBehalf].inP2P, + onBehalfBorrowBalance.inP2P -= CompoundMath.min( + onBehalfBorrowBalance.inP2P, vars.remainingToRepay.div(vars.p2pBorrowIndex) ); // In peer-to-peer unit. _updateBorrowerInDS(_poolToken, _onBehalf); @@ -825,8 +839,8 @@ contract PositionsManager is IPositionsManager, MatchingEngine { _onBehalf, _poolToken, _amount, - borrowBalanceInOf[_poolToken][_onBehalf].onPool, - borrowBalanceInOf[_poolToken][_onBehalf].inP2P + onBehalfBorrowBalance.onPool, + onBehalfBorrowBalance.inP2P ); } diff --git a/test-foundry/aave-v2/TestWithdraw.t.sol b/test-foundry/aave-v2/TestWithdraw.t.sol index a7020fcd1..b92b2f81a 100644 --- a/test-foundry/aave-v2/TestWithdraw.t.sol +++ b/test-foundry/aave-v2/TestWithdraw.t.sol @@ -558,8 +558,8 @@ contract TestWithdraw is TestSetup { } function testDeltaWithdrawAll() public { - // 1.3e6 allows only 10 unmatch borrowers - setDefaultMaxGasForMatchingHelper(3e6, 3e6, 2.6e6, 3e6); + // 1.4e6 allows only 10 unmatch borrowers + setDefaultMaxGasForMatchingHelper(3e6, 3e6, 2e6, 3e6); uint256 borrowedAmount = 1 ether; uint256 collateral = 2 * borrowedAmount; diff --git a/test-foundry/aave-v3/TestWithdraw.t.sol b/test-foundry/aave-v3/TestWithdraw.t.sol index 323b0b3e8..e8b998c9c 100644 --- a/test-foundry/aave-v3/TestWithdraw.t.sol +++ b/test-foundry/aave-v3/TestWithdraw.t.sol @@ -565,8 +565,8 @@ contract TestWithdraw is TestSetup { } function testDeltaWithdrawAll() public { - // 1.3e6 allows only 10 unmatch borrowers - setDefaultMaxGasForMatchingHelper(3e6, 3e6, 2.6e6, 3e6); + // 1.5e6 allows only 10 unmatch borrowers + setDefaultMaxGasForMatchingHelper(3e6, 3e6, 1.5e6, 3e6); uint256 borrowedAmount = 1 ether; uint256 collateral = 2 * borrowedAmount; diff --git a/test-foundry/compound/TestWithdraw.t.sol b/test-foundry/compound/TestWithdraw.t.sol index 8edfeb854..c2746deb2 100644 --- a/test-foundry/compound/TestWithdraw.t.sol +++ b/test-foundry/compound/TestWithdraw.t.sol @@ -390,7 +390,7 @@ contract TestWithdraw is TestSetup { function testDeltaWithdraw() public { // Allows only 10 unmatch borrowers. - _setDefaultMaxGasForMatching(3e6, 3e6, 1e6, 3e6); + _setDefaultMaxGasForMatching(3e6, 3e6, 9e5, 3e6); uint256 borrowedAmount = 1 ether; uint256 collateral = 2 * borrowedAmount; @@ -551,7 +551,7 @@ contract TestWithdraw is TestSetup { function testDeltaWithdrawAll() public { // Allows only 10 unmatch borrowers. - _setDefaultMaxGasForMatching(3e6, 3e6, 1e6, 3e6); + _setDefaultMaxGasForMatching(3e6, 3e6, 9e5, 3e6); uint256 borrowedAmount = 1 ether; uint256 collateral = 2 * borrowedAmount; From 99d7db71bf032e4e949cd8a34e18a8bf3cc14851 Mon Sep 17 00:00:00 2001 From: Rubilmax Date: Thu, 4 Aug 2022 13:52:00 +0200 Subject: [PATCH 24/57] =?UTF-8?q?=E2=9C=A8=20Harmonizing=20variables=20wit?= =?UTF-8?q?h=20Morpho-Compound?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contracts/aave-v2/MatchingEngine.sol | 46 +++++++++------------------- contracts/aave-v3/MatchingEngine.sol | 46 +++++++++------------------- 2 files changed, 28 insertions(+), 64 deletions(-) diff --git a/contracts/aave-v2/MatchingEngine.sol b/contracts/aave-v2/MatchingEngine.sol index efabaf349..ef9b04562 100644 --- a/contracts/aave-v2/MatchingEngine.sol +++ b/contracts/aave-v2/MatchingEngine.sol @@ -307,27 +307,19 @@ abstract contract MatchingEngine is MorphoUtils { /// @param _poolToken The address of the market on which to update the suppliers data structure. /// @param _user The address of the user. function _updateSupplierInDS(address _poolToken, address _user) internal { - Types.SupplyBalance memory userSupplyBalance = supplyBalanceInOf[_poolToken][_user]; + Types.SupplyBalance storage userSupplyBalance = supplyBalanceInOf[_poolToken][_user]; + uint256 onPool = userSupplyBalance.onPool; + uint256 inP2P = userSupplyBalance.inP2P; HeapOrdering.HeapArray storage marketSupliersOnPool = suppliersOnPool[_poolToken]; HeapOrdering.HeapArray storage marketSupliersInP2P = suppliersInP2P[_poolToken]; uint256 formerValueOnPool = marketSupliersOnPool.getValueOf(_user); uint256 formerValueInP2P = marketSupliersInP2P.getValueOf(_user); - marketSupliersOnPool.update( - _user, - formerValueOnPool, - userSupplyBalance.onPool, - maxSortedUsers - ); - marketSupliersInP2P.update( - _user, - formerValueInP2P, - userSupplyBalance.inP2P, - maxSortedUsers - ); - - if (formerValueOnPool != userSupplyBalance.onPool && address(rewardsManager) != address(0)) + marketSupliersOnPool.update(_user, formerValueOnPool, onPool, maxSortedUsers); + marketSupliersInP2P.update(_user, formerValueInP2P, inP2P, maxSortedUsers); + + if (formerValueOnPool != onPool && address(rewardsManager) != address(0)) rewardsManager.updateUserAssetAndAccruedRewards( _user, _poolToken, @@ -340,29 +332,19 @@ abstract contract MatchingEngine is MorphoUtils { /// @param _poolToken The address of the market on which to update the borrowers data structure. /// @param _user The address of the user. function _updateBorrowerInDS(address _poolToken, address _user) internal { - Types.BorrowBalance memory userBorrowBalance = borrowBalanceInOf[_poolToken][_user]; + Types.BorrowBalance storage userBorrowBalance = borrowBalanceInOf[_poolToken][_user]; + uint256 onPool = userBorrowBalance.onPool; + uint256 inP2P = userBorrowBalance.inP2P; HeapOrdering.HeapArray storage marketBorrowersOnPool = borrowersOnPool[_poolToken]; HeapOrdering.HeapArray storage marketBorrowersInP2P = borrowersInP2P[_poolToken]; uint256 formerValueOnPool = marketBorrowersOnPool.getValueOf(_user); uint256 formerValueInP2P = marketBorrowersInP2P.getValueOf(_user); - marketBorrowersOnPool.update( - _user, - formerValueOnPool, - userBorrowBalance.onPool, - maxSortedUsers - ); - marketBorrowersInP2P.update( - _user, - formerValueInP2P, - userBorrowBalance.inP2P, - maxSortedUsers - ); - - if ( - formerValueOnPool != userBorrowBalance.onPool && address(rewardsManager) != address(0) - ) { + marketBorrowersOnPool.update(_user, formerValueOnPool, onPool, maxSortedUsers); + marketBorrowersInP2P.update(_user, formerValueInP2P, inP2P, maxSortedUsers); + + if (formerValueOnPool != onPool && address(rewardsManager) != address(0)) { address variableDebtTokenAddress = pool .getReserveData(market[_poolToken].underlyingToken) .variableDebtTokenAddress; diff --git a/contracts/aave-v3/MatchingEngine.sol b/contracts/aave-v3/MatchingEngine.sol index 9c2ccb341..e9691cad5 100644 --- a/contracts/aave-v3/MatchingEngine.sol +++ b/contracts/aave-v3/MatchingEngine.sol @@ -310,27 +310,19 @@ abstract contract MatchingEngine is MorphoUtils { /// @param _poolToken The address of the market on which to update the suppliers data structure. /// @param _user The address of the user. function _updateSupplierInDS(address _poolToken, address _user) internal { - Types.SupplyBalance memory userSupplyBalance = supplyBalanceInOf[_poolToken][_user]; + Types.SupplyBalance storage userSupplyBalance = supplyBalanceInOf[_poolToken][_user]; + uint256 onPool = userSupplyBalance.onPool; + uint256 inP2P = userSupplyBalance.inP2P; HeapOrdering.HeapArray storage marketSupliersOnPool = suppliersOnPool[_poolToken]; HeapOrdering.HeapArray storage marketSupliersInP2P = suppliersInP2P[_poolToken]; uint256 formerValueOnPool = marketSupliersOnPool.getValueOf(_user); uint256 formerValueInP2P = marketSupliersInP2P.getValueOf(_user); - marketSupliersOnPool.update( - _user, - formerValueOnPool, - userSupplyBalance.onPool, - maxSortedUsers - ); - marketSupliersInP2P.update( - _user, - formerValueInP2P, - userSupplyBalance.inP2P, - maxSortedUsers - ); - - if (formerValueOnPool != userSupplyBalance.onPool && address(rewardsManager) != address(0)) + marketSupliersOnPool.update(_user, formerValueOnPool, onPool, maxSortedUsers); + marketSupliersInP2P.update(_user, formerValueInP2P, inP2P, maxSortedUsers); + + if (formerValueOnPool != onPool && address(rewardsManager) != address(0)) rewardsManager.updateUserAssetAndAccruedRewards( rewardsController, _user, @@ -344,29 +336,19 @@ abstract contract MatchingEngine is MorphoUtils { /// @param _poolToken The address of the market on which to update the borrowers data structure. /// @param _user The address of the user. function _updateBorrowerInDS(address _poolToken, address _user) internal { - Types.BorrowBalance memory userBorrowBalance = borrowBalanceInOf[_poolToken][_user]; + Types.BorrowBalance storage userBorrowBalance = borrowBalanceInOf[_poolToken][_user]; + uint256 onPool = userBorrowBalance.onPool; + uint256 inP2P = userBorrowBalance.inP2P; HeapOrdering.HeapArray storage marketBorrowersOnPool = borrowersOnPool[_poolToken]; HeapOrdering.HeapArray storage marketBorrowersInP2P = borrowersInP2P[_poolToken]; uint256 formerValueOnPool = marketBorrowersOnPool.getValueOf(_user); uint256 formerValueInP2P = marketBorrowersInP2P.getValueOf(_user); - marketBorrowersOnPool.update( - _user, - formerValueOnPool, - userBorrowBalance.onPool, - maxSortedUsers - ); - marketBorrowersInP2P.update( - _user, - formerValueInP2P, - userBorrowBalance.inP2P, - maxSortedUsers - ); - - if ( - formerValueOnPool != userBorrowBalance.onPool && address(rewardsManager) != address(0) - ) { + marketBorrowersOnPool.update(_user, formerValueOnPool, onPool, maxSortedUsers); + marketBorrowersInP2P.update(_user, formerValueInP2P, inP2P, maxSortedUsers); + + if (formerValueOnPool != onPool && address(rewardsManager) != address(0)) { address variableDebtTokenAddress = pool .getReserveData(market[_poolToken].underlyingToken) .variableDebtTokenAddress; From d9289d889661123209bd1b325555bf26414e1a0a Mon Sep 17 00:00:00 2001 From: Rubilmax Date: Thu, 4 Aug 2022 13:52:39 +0200 Subject: [PATCH 25/57] Minor fixes --- contracts/aave-v3/MatchingEngine.sol | 20 ++++++++------------ test-foundry/aave-v2/TestWithdraw.t.sol | 2 +- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/contracts/aave-v3/MatchingEngine.sol b/contracts/aave-v3/MatchingEngine.sol index e9691cad5..0dae5eefa 100644 --- a/contracts/aave-v3/MatchingEngine.sol +++ b/contracts/aave-v3/MatchingEngine.sol @@ -88,20 +88,18 @@ abstract contract MatchingEngine is MorphoUtils { } firstPoolSupplierBalance = supplyBalanceInOf[_poolToken][firstPoolSupplier]; vars.toMatch = Math.min( - firstPoolSupplierBalance.onPool.rayMul(vars.poolIndex), + (newPoolSupplyBalance = firstPoolSupplierBalance.onPool).rayMul(vars.poolIndex), remainingToMatch ); remainingToMatch -= vars.toMatch; - newPoolSupplyBalance = - firstPoolSupplierBalance.onPool - - vars.toMatch.rayDiv(vars.poolIndex); + newPoolSupplyBalance -= vars.toMatch.rayDiv(vars.poolIndex); newP2PSupplyBalance = firstPoolSupplierBalance.inP2P + vars.toMatch.rayDiv(vars.p2pIndex); - supplyBalanceInOf[_poolToken][firstPoolSupplier].onPool = newPoolSupplyBalance; - supplyBalanceInOf[_poolToken][firstPoolSupplier].inP2P = newP2PSupplyBalance; + firstPoolSupplierBalance.onPool = newPoolSupplyBalance; + firstPoolSupplierBalance.inP2P = newP2PSupplyBalance; _updateSupplierInDS(_poolToken, firstPoolSupplier); emit SupplierPositionUpdated( firstPoolSupplier, @@ -153,7 +151,7 @@ abstract contract MatchingEngine is MorphoUtils { } firstP2PSupplierBalance = supplyBalanceInOf[_poolToken][firstP2PSupplier]; vars.toUnmatch = Math.min( - firstP2PSupplierBalance.inP2P.rayMul(vars.p2pIndex), + (newP2PSupplyBalance = firstP2PSupplierBalance.inP2P).rayMul(vars.p2pIndex), remainingToUnmatch ); remainingToUnmatch -= vars.toUnmatch; @@ -161,12 +159,10 @@ abstract contract MatchingEngine is MorphoUtils { newPoolSupplyBalance = firstP2PSupplierBalance.onPool + vars.toUnmatch.rayDiv(vars.poolIndex); - newP2PSupplyBalance = - firstP2PSupplierBalance.inP2P - - vars.toUnmatch.rayDiv(vars.p2pIndex); + newP2PSupplyBalance -= vars.toUnmatch.rayDiv(vars.p2pIndex); - supplyBalanceInOf[_poolToken][firstP2PSupplier].onPool = newPoolSupplyBalance; - supplyBalanceInOf[_poolToken][firstP2PSupplier].inP2P = newP2PSupplyBalance; + firstP2PSupplierBalance.onPool = newPoolSupplyBalance; + firstP2PSupplierBalance.inP2P = newP2PSupplyBalance; _updateSupplierInDS(_poolToken, firstP2PSupplier); emit SupplierPositionUpdated( firstP2PSupplier, diff --git a/test-foundry/aave-v2/TestWithdraw.t.sol b/test-foundry/aave-v2/TestWithdraw.t.sol index b92b2f81a..28b0c383e 100644 --- a/test-foundry/aave-v2/TestWithdraw.t.sol +++ b/test-foundry/aave-v2/TestWithdraw.t.sol @@ -397,7 +397,7 @@ contract TestWithdraw is TestSetup { } function testDeltaWithdraw() public { - // 1.3e6 allows only 10 unmatch borrowers + // Allows only 10 unmatch borrowers setDefaultMaxGasForMatchingHelper(3e6, 3e6, 1.2e6, 3e6); uint256 borrowedAmount = 1 ether; From 58ba2c5f67cd06259ef38df35bf7712ca7086e5b Mon Sep 17 00:00:00 2001 From: makcandrov Date: Mon, 1 Aug 2022 11:16:15 +0100 Subject: [PATCH 26/57] =?UTF-8?q?=F0=9F=8E=A8=20Update=20commentaries?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test-foundry/aave-v2/TestWithdraw.t.sol | 2 +- test-foundry/aave-v3/TestWithdraw.t.sol | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test-foundry/aave-v2/TestWithdraw.t.sol b/test-foundry/aave-v2/TestWithdraw.t.sol index 28b0c383e..604848ff4 100644 --- a/test-foundry/aave-v2/TestWithdraw.t.sol +++ b/test-foundry/aave-v2/TestWithdraw.t.sol @@ -558,7 +558,7 @@ contract TestWithdraw is TestSetup { } function testDeltaWithdrawAll() public { - // 1.4e6 allows only 10 unmatch borrowers + // Allows only 10 unmatch borrowers setDefaultMaxGasForMatchingHelper(3e6, 3e6, 2e6, 3e6); uint256 borrowedAmount = 1 ether; diff --git a/test-foundry/aave-v3/TestWithdraw.t.sol b/test-foundry/aave-v3/TestWithdraw.t.sol index e8b998c9c..78d816910 100644 --- a/test-foundry/aave-v3/TestWithdraw.t.sol +++ b/test-foundry/aave-v3/TestWithdraw.t.sol @@ -565,7 +565,7 @@ contract TestWithdraw is TestSetup { } function testDeltaWithdrawAll() public { - // 1.5e6 allows only 10 unmatch borrowers + // Allows only 10 unmatch borrowers setDefaultMaxGasForMatchingHelper(3e6, 3e6, 1.5e6, 3e6); uint256 borrowedAmount = 1 ether; From 1c5aed2581ca8d2e4a2c1ae1f3311c795430d4e2 Mon Sep 17 00:00:00 2001 From: Rubilmax Date: Thu, 4 Aug 2022 13:53:15 +0200 Subject: [PATCH 27/57] Restore symmetry between variables --- contracts/aave-v2/MatchingEngine.sol | 48 ++++++++++++++------------ contracts/aave-v3/MatchingEngine.sol | 50 ++++++++++++++++------------ 2 files changed, 54 insertions(+), 44 deletions(-) diff --git a/contracts/aave-v2/MatchingEngine.sol b/contracts/aave-v2/MatchingEngine.sol index ef9b04562..5cb16ff8d 100644 --- a/contracts/aave-v2/MatchingEngine.sol +++ b/contracts/aave-v2/MatchingEngine.sol @@ -88,19 +88,18 @@ abstract contract MatchingEngine is MorphoUtils { } firstPoolSupplierBalance = supplyBalanceInOf[_poolToken][firstPoolSupplier]; - vars.toMatch = Math.min( - (newPoolSupplyBalance = firstPoolSupplierBalance.onPool).rayMul(vars.poolIndex), - remainingToMatch - ); + newPoolSupplyBalance = firstPoolSupplierBalance.onPool; + newP2PSupplyBalance = firstPoolSupplierBalance.inP2P; + + vars.toMatch = Math.min(newPoolSupplyBalance.rayMul(vars.poolIndex), remainingToMatch); remainingToMatch -= vars.toMatch; newPoolSupplyBalance -= vars.toMatch.rayDiv(vars.poolIndex); - newP2PSupplyBalance = - firstPoolSupplierBalance.inP2P + - vars.toMatch.rayDiv(vars.p2pIndex); + newP2PSupplyBalance += vars.toMatch.rayDiv(vars.p2pIndex); firstPoolSupplierBalance.onPool = newPoolSupplyBalance; firstPoolSupplierBalance.inP2P = newP2PSupplyBalance; + _updateSupplierInDS(_poolToken, firstPoolSupplier); emit SupplierPositionUpdated( firstPoolSupplier, @@ -151,15 +150,17 @@ abstract contract MatchingEngine is MorphoUtils { if (gasLeftAtTheBeginning - gasleft() >= _maxGasForMatching) break; } firstP2PSupplierBalance = supplyBalanceInOf[_poolToken][firstP2PSupplier]; + + newPoolSupplyBalance = firstP2PSupplierBalance.onPool; + newP2PSupplyBalance = firstP2PSupplierBalance.inP2P; + vars.toUnmatch = Math.min( - (newP2PSupplyBalance = firstP2PSupplierBalance.inP2P).rayMul(vars.p2pIndex), + newP2PSupplyBalance.rayMul(vars.p2pIndex), remainingToUnmatch ); remainingToUnmatch -= vars.toUnmatch; - newPoolSupplyBalance = - firstP2PSupplierBalance.onPool + - vars.toUnmatch.rayDiv(vars.poolIndex); + newPoolSupplyBalance += vars.toUnmatch.rayDiv(vars.poolIndex); newP2PSupplyBalance -= vars.toUnmatch.rayDiv(vars.p2pIndex); firstP2PSupplierBalance.onPool = newPoolSupplyBalance; @@ -212,19 +213,19 @@ abstract contract MatchingEngine is MorphoUtils { if (gasLeftAtTheBeginning - gasleft() >= _maxGasForMatching) break; } firstPoolBorrowerBalance = borrowBalanceInOf[_poolToken][firstPoolBorrower]; - vars.toMatch = Math.min( - (newPoolBorrowBalance = firstPoolBorrowerBalance.onPool).rayMul(vars.poolIndex), - remainingToMatch - ); + + newPoolBorrowBalance = firstPoolBorrowerBalance.onPool; + newP2PBorrowBalance = firstPoolBorrowerBalance.inP2P; + + vars.toMatch = Math.min(newPoolBorrowBalance.rayMul(vars.poolIndex), remainingToMatch); remainingToMatch -= vars.toMatch; newPoolBorrowBalance -= vars.toMatch.rayDiv(vars.poolIndex); - newP2PBorrowBalance = - firstPoolBorrowerBalance.inP2P + - vars.toMatch.rayDiv(vars.p2pIndex); + newP2PBorrowBalance += vars.toMatch.rayDiv(vars.p2pIndex); firstPoolBorrowerBalance.onPool = newPoolBorrowBalance; firstPoolBorrowerBalance.inP2P = newP2PBorrowBalance; + _updateBorrowerInDS(_poolToken, firstPoolBorrower); emit BorrowerPositionUpdated( firstPoolBorrower, @@ -275,19 +276,22 @@ abstract contract MatchingEngine is MorphoUtils { if (gasLeftAtTheBeginning - gasleft() >= _maxGasForMatching) break; } firstP2PBorrowerBalance = borrowBalanceInOf[_poolToken][firstP2PBorrower]; + + newPoolBorrowBalance = firstP2PBorrowerBalance.onPool; + newP2PBorrowBalance = firstP2PBorrowerBalance.inP2P; + vars.toUnmatch = Math.min( - (newP2PBorrowBalance = firstP2PBorrowerBalance.inP2P).rayMul(vars.p2pIndex), + newP2PBorrowBalance.rayMul(vars.p2pIndex), remainingToUnmatch ); remainingToUnmatch -= vars.toUnmatch; - newPoolBorrowBalance = - firstP2PBorrowerBalance.onPool + - vars.toUnmatch.rayDiv(vars.poolIndex); + newPoolBorrowBalance += vars.toUnmatch.rayDiv(vars.poolIndex); newP2PBorrowBalance -= vars.toUnmatch.rayDiv(vars.p2pIndex); firstP2PBorrowerBalance.onPool = newPoolBorrowBalance; firstP2PBorrowerBalance.inP2P = newP2PBorrowBalance; + _updateBorrowerInDS(_poolToken, firstP2PBorrower); emit BorrowerPositionUpdated( firstP2PBorrower, diff --git a/contracts/aave-v3/MatchingEngine.sol b/contracts/aave-v3/MatchingEngine.sol index 0dae5eefa..73b03d61c 100644 --- a/contracts/aave-v3/MatchingEngine.sol +++ b/contracts/aave-v3/MatchingEngine.sol @@ -87,19 +87,19 @@ abstract contract MatchingEngine is MorphoUtils { if (gasLeftAtTheBeginning - gasleft() >= _maxGasForMatching) break; } firstPoolSupplierBalance = supplyBalanceInOf[_poolToken][firstPoolSupplier]; - vars.toMatch = Math.min( - (newPoolSupplyBalance = firstPoolSupplierBalance.onPool).rayMul(vars.poolIndex), - remainingToMatch - ); + + newPoolSupplyBalance = firstPoolSupplierBalance.onPool; + newP2PSupplyBalance = firstPoolSupplierBalance.inP2P; + + vars.toMatch = Math.min(newPoolSupplyBalance.rayMul(vars.poolIndex), remainingToMatch); remainingToMatch -= vars.toMatch; newPoolSupplyBalance -= vars.toMatch.rayDiv(vars.poolIndex); - newP2PSupplyBalance = - firstPoolSupplierBalance.inP2P + - vars.toMatch.rayDiv(vars.p2pIndex); + newP2PSupplyBalance += vars.toMatch.rayDiv(vars.p2pIndex); firstPoolSupplierBalance.onPool = newPoolSupplyBalance; firstPoolSupplierBalance.inP2P = newP2PSupplyBalance; + _updateSupplierInDS(_poolToken, firstPoolSupplier); emit SupplierPositionUpdated( firstPoolSupplier, @@ -150,19 +150,22 @@ abstract contract MatchingEngine is MorphoUtils { if (gasLeftAtTheBeginning - gasleft() >= _maxGasForMatching) break; } firstP2PSupplierBalance = supplyBalanceInOf[_poolToken][firstP2PSupplier]; + + newPoolSupplyBalance = firstP2PSupplierBalance.onPool; + newP2PSupplyBalance = firstP2PSupplierBalance.inP2P; + vars.toUnmatch = Math.min( - (newP2PSupplyBalance = firstP2PSupplierBalance.inP2P).rayMul(vars.p2pIndex), + newP2PSupplyBalance.rayMul(vars.p2pIndex), remainingToUnmatch ); remainingToUnmatch -= vars.toUnmatch; - newPoolSupplyBalance = - firstP2PSupplierBalance.onPool + - vars.toUnmatch.rayDiv(vars.poolIndex); + newPoolSupplyBalance += vars.toUnmatch.rayDiv(vars.poolIndex); newP2PSupplyBalance -= vars.toUnmatch.rayDiv(vars.p2pIndex); firstP2PSupplierBalance.onPool = newPoolSupplyBalance; firstP2PSupplierBalance.inP2P = newP2PSupplyBalance; + _updateSupplierInDS(_poolToken, firstP2PSupplier); emit SupplierPositionUpdated( firstP2PSupplier, @@ -211,19 +214,19 @@ abstract contract MatchingEngine is MorphoUtils { if (gasLeftAtTheBeginning - gasleft() >= _maxGasForMatching) break; } firstPoolBorrowerBalance = borrowBalanceInOf[_poolToken][firstPoolBorrower]; - vars.toMatch = Math.min( - (newPoolBorrowBalance = firstPoolBorrowerBalance.onPool).rayMul(vars.poolIndex), - remainingToMatch - ); + + newPoolBorrowBalance = firstPoolBorrowerBalance.onPool; + newP2PBorrowBalance = firstPoolBorrowerBalance.inP2P; + + vars.toMatch = Math.min(newPoolBorrowBalance.rayMul(vars.poolIndex), remainingToMatch); remainingToMatch -= vars.toMatch; newPoolBorrowBalance -= vars.toMatch.rayDiv(vars.poolIndex); - newP2PBorrowBalance = - firstPoolBorrowerBalance.inP2P + - vars.toMatch.rayDiv(vars.p2pIndex); + newP2PBorrowBalance += vars.toMatch.rayDiv(vars.p2pIndex); firstPoolBorrowerBalance.onPool = newPoolBorrowBalance; firstPoolBorrowerBalance.inP2P = newP2PBorrowBalance; + _updateBorrowerInDS(_poolToken, firstPoolBorrower); emit BorrowerPositionUpdated( firstPoolBorrower, @@ -274,19 +277,22 @@ abstract contract MatchingEngine is MorphoUtils { if (gasLeftAtTheBeginning - gasleft() >= _maxGasForMatching) break; } firstP2PBorrowerBalance = borrowBalanceInOf[_poolToken][firstP2PBorrower]; + + newPoolBorrowBalance = firstP2PBorrowerBalance.onPool; + newP2PBorrowBalance = firstP2PBorrowerBalance.inP2P; + vars.toUnmatch = Math.min( - (newP2PBorrowBalance = firstP2PBorrowerBalance.inP2P).rayMul(vars.p2pIndex), + newP2PBorrowBalance.rayMul(vars.p2pIndex), remainingToUnmatch ); remainingToUnmatch -= vars.toUnmatch; - newPoolBorrowBalance = - firstP2PBorrowerBalance.onPool + - vars.toUnmatch.rayDiv(vars.poolIndex); + newPoolBorrowBalance += vars.toUnmatch.rayDiv(vars.poolIndex); newP2PBorrowBalance -= vars.toUnmatch.rayDiv(vars.p2pIndex); firstP2PBorrowerBalance.onPool = newPoolBorrowBalance; firstP2PBorrowerBalance.inP2P = newP2PBorrowBalance; + _updateBorrowerInDS(_poolToken, firstP2PBorrower); emit BorrowerPositionUpdated( firstP2PBorrower, From fc986331382cef226f5d66d945a46bdc9ea5c17e Mon Sep 17 00:00:00 2001 From: Rubilmax Date: Fri, 5 Aug 2022 10:58:59 +0200 Subject: [PATCH 28/57] Added indexed reward address --- contracts/aave-v3/Morpho.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/aave-v3/Morpho.sol b/contracts/aave-v3/Morpho.sol index 41d5e0ef4..3dbb46496 100644 --- a/contracts/aave-v3/Morpho.sol +++ b/contracts/aave-v3/Morpho.sol @@ -21,7 +21,7 @@ contract Morpho is MorphoGovernance { /// @param _traded Whether or not the pool tokens are traded against Morpho tokens. event RewardsClaimed( address indexed _user, - address _reward, + address indexed _reward, uint256 _amountClaimed, bool indexed _traded ); From 9735f63af2623a1f9828fa8386e714c491a22048 Mon Sep 17 00:00:00 2001 From: Rubilmax Date: Fri, 5 Aug 2022 11:12:47 +0200 Subject: [PATCH 29/57] Remove incentives controller from rewards manager storage --- contracts/aave-v2/MatchingEngine.sol | 2 + contracts/aave-v2/Morpho.sol | 2 +- contracts/aave-v2/RewardsManager.sol | 98 ++++++++++--------- .../aave-v2/interfaces/IRewardsManager.sol | 13 +-- .../RewardsManagerOnMainnetAndAvalanche.sol | 14 +-- .../RewardsManagerOnPolygon.sol | 14 +-- test-foundry/aave-v2/helpers/User.sol | 6 -- 7 files changed, 78 insertions(+), 71 deletions(-) diff --git a/contracts/aave-v2/MatchingEngine.sol b/contracts/aave-v2/MatchingEngine.sol index aff844df9..75b52b21f 100644 --- a/contracts/aave-v2/MatchingEngine.sol +++ b/contracts/aave-v2/MatchingEngine.sol @@ -324,6 +324,7 @@ abstract contract MatchingEngine is MorphoUtils { if (formerValueOnPool != onPool && address(rewardsManager) != address(0)) rewardsManager.updateUserAssetAndAccruedRewards( + aaveIncentivesController, _user, _poolToken, formerValueOnPool, @@ -348,6 +349,7 @@ abstract contract MatchingEngine is MorphoUtils { .getReserveData(market[_poolToken].underlyingToken) .variableDebtTokenAddress; rewardsManager.updateUserAssetAndAccruedRewards( + aaveIncentivesController, _user, variableDebtTokenAddress, formerValueOnPool, diff --git a/contracts/aave-v2/Morpho.sol b/contracts/aave-v2/Morpho.sol index 94ecb6219..e1b77e49b 100644 --- a/contracts/aave-v2/Morpho.sol +++ b/contracts/aave-v2/Morpho.sol @@ -189,7 +189,7 @@ contract Morpho is MorphoGovernance { returns (uint256 claimedAmount) { if (isClaimRewardsPaused) revert ClaimRewardsPaused(); - claimedAmount = rewardsManager.claimRewards(_assets, msg.sender); + claimedAmount = rewardsManager.claimRewards(aaveIncentivesController, _assets, msg.sender); if (claimedAmount > 0) { if (_tradeForMorphoToken) { diff --git a/contracts/aave-v2/RewardsManager.sol b/contracts/aave-v2/RewardsManager.sol index 2cb21760a..cafffa880 100644 --- a/contracts/aave-v2/RewardsManager.sol +++ b/contracts/aave-v2/RewardsManager.sol @@ -28,16 +28,11 @@ abstract contract RewardsManager is IRewardsManager, OwnableUpgradeable { mapping(address => uint256) public userUnclaimedRewards; // The unclaimed rewards of the user. mapping(address => LocalAssetData) public localAssetData; // The local data related to a given market. - IAaveIncentivesController public override aaveIncentivesController; - ILendingPool public pool; IMorpho public morpho; + ILendingPool public pool; /// EVENTS /// - /// @notice Emitted the address of the `aaveIncentivesController` is set. - /// @param _aaveIncentivesController The new address of the `aaveIncentivesController`. - event AaveIncentivesControllerSet(address indexed _aaveIncentivesController); - /// @notice Emitted when rewards of an asset are accrued on behalf of a user. /// @param _asset The address of the incentivized asset. /// @param _user The address of the user that rewards are accrued on behalf of. @@ -82,49 +77,45 @@ abstract contract RewardsManager is IRewardsManager, OwnableUpgradeable { __Ownable_init(); morpho = IMorpho(_morpho); - aaveIncentivesController = IMorpho(_morpho).aaveIncentivesController(); pool = ILendingPool(morpho.pool()); } /// EXTERNAL /// - /// @notice Sets the `aaveIncentivesController`. - /// @param _aaveIncentivesController The address of the `aaveIncentivesController`. - function setAaveIncentivesController(address _aaveIncentivesController) - external - override - onlyOwner - { - aaveIncentivesController = IAaveIncentivesController(_aaveIncentivesController); - emit AaveIncentivesControllerSet(_aaveIncentivesController); - } - /// @notice Accrues unclaimed rewards for the given assets and returns the total unclaimed rewards. + /// @param _aaveIncentivesController The incentives controller used to query rewards. /// @param _assets The assets for which to accrue rewards (aToken or variable debt token). /// @param _user The address of the user. /// @return unclaimedRewards The unclaimed rewards claimed by the user. - function claimRewards(address[] calldata _assets, address _user) - external - override - onlyMorpho - returns (uint256 unclaimedRewards) - { - unclaimedRewards = _accrueUserUnclaimedRewards(_assets, _user); + function claimRewards( + IAaveIncentivesController _aaveIncentivesController, + address[] calldata _assets, + address _user + ) external override onlyMorpho returns (uint256 unclaimedRewards) { + unclaimedRewards = _accrueUserUnclaimedRewards(_aaveIncentivesController, _assets, _user); userUnclaimedRewards[_user] = 0; } /// @notice Updates the unclaimed rewards of an user. + /// @param _aaveIncentivesController The incentives controller used to query rewards. /// @param _user The address of the user. /// @param _asset The address of the reference asset of the distribution (aToken or variable debt token). /// @param _userBalance The user balance of tokens in the distribution. /// @param _totalBalance The total balance of tokens in the distribution. function updateUserAssetAndAccruedRewards( + IAaveIncentivesController _aaveIncentivesController, address _user, address _asset, uint256 _userBalance, uint256 _totalBalance ) external onlyMorpho { - userUnclaimedRewards[_user] += _updateUserAsset(_user, _asset, _userBalance, _totalBalance); + userUnclaimedRewards[_user] += _updateUserAsset( + _aaveIncentivesController, + _user, + _asset, + _userBalance, + _totalBalance + ); } /// @notice Returns the index of the `_user` for a given `_asset`. @@ -172,13 +163,15 @@ abstract contract RewardsManager is IRewardsManager, OwnableUpgradeable { /// INTERNAL /// /// @notice Accrues unclaimed rewards for the given assets and returns the total unclaimed rewards. + /// @param _aaveIncentivesController The incentives controller used to query rewards. /// @param _assets The assets for which to accrue rewards (aToken or variable debt token). /// @param _user The address of the user. /// @return unclaimedRewards The user unclaimed rewards. - function _accrueUserUnclaimedRewards(address[] calldata _assets, address _user) - internal - returns (uint256 unclaimedRewards) - { + function _accrueUserUnclaimedRewards( + IAaveIncentivesController _aaveIncentivesController, + address[] calldata _assets, + address _user + ) internal returns (uint256 unclaimedRewards) { unclaimedRewards = userUnclaimedRewards[_user]; uint256 assetsLength = _assets.length; @@ -196,7 +189,13 @@ abstract contract RewardsManager is IRewardsManager, OwnableUpgradeable { uint256 totalBalance = IScaledBalanceToken(asset).scaledTotalSupply(); - unclaimedRewards += _updateUserAsset(_user, asset, userBalance, totalBalance); + unclaimedRewards += _updateUserAsset( + _aaveIncentivesController, + _user, + asset, + userBalance, + totalBalance + ); unchecked { ++i; @@ -207,13 +206,15 @@ abstract contract RewardsManager is IRewardsManager, OwnableUpgradeable { } /// @dev Updates asset's data. + /// @param _aaveIncentivesController The incentives controller used to query rewards. /// @param _asset The address of the reference asset of the distribution (aToken or variable debt token). /// @param _totalBalance The total balance of tokens in the distribution. - function _updateAsset(address _asset, uint256 _totalBalance) - internal - returns (uint256 oldIndex, uint256 newIndex) - { - (oldIndex, newIndex) = _getAssetIndex(_asset, _totalBalance); + function _updateAsset( + IAaveIncentivesController _aaveIncentivesController, + address _asset, + uint256 _totalBalance + ) internal returns (uint256 oldIndex, uint256 newIndex) { + (oldIndex, newIndex) = _getAssetIndex(_aaveIncentivesController, _asset, _totalBalance); if (oldIndex != newIndex) { localAssetData[_asset].lastUpdateTimestamp = block.timestamp; localAssetData[_asset].lastIndex = newIndex; @@ -221,19 +222,21 @@ abstract contract RewardsManager is IRewardsManager, OwnableUpgradeable { } /// @dev Updates the state of a user in a distribution. + /// @param _aaveIncentivesController The incentives controller used to query rewards. /// @param _user The address of the user. /// @param _asset The address of the reference asset of the distribution (aToken or variable debt token). /// @param _userBalance The user balance of tokens in the distribution. /// @param _totalBalance The total balance of tokens in the distribution. /// @return accruedRewards The accrued rewards for the user until the moment for this asset. function _updateUserAsset( + IAaveIncentivesController _aaveIncentivesController, address _user, address _asset, uint256 _userBalance, uint256 _totalBalance ) internal returns (uint256 accruedRewards) { uint256 formerUserIndex = localAssetData[_asset].userIndex[_user]; - (, uint256 newIndex) = _updateAsset(_asset, _totalBalance); + (, uint256 newIndex) = _updateAsset(_aaveIncentivesController, _asset, _totalBalance); if (formerUserIndex != newIndex) { if (_userBalance != 0) {} @@ -258,25 +261,31 @@ abstract contract RewardsManager is IRewardsManager, OwnableUpgradeable { uint256 _totalBalance ) internal view returns (uint256 accruedRewards) { uint256 formerUserIndex = localAssetData[_asset].userIndex[_user]; - (, uint256 newIndex) = _getAssetIndex(_asset, _totalBalance); + (, uint256 newIndex) = _getAssetIndex( + morpho.aaveIncentivesController(), + _asset, + _totalBalance + ); if (formerUserIndex != newIndex && _userBalance != 0) accruedRewards = _getRewards(_userBalance, newIndex, formerUserIndex); } /// @dev Computes and returns the next value of a specific distribution index. + /// @param _aaveIncentivesController The incentives controller used to query rewards. /// @param _currentIndex The current index of the distribution. /// @param _emissionPerSecond The total rewards distributed per second per asset unit, on the distribution. /// @param _lastUpdateTimestamp The last moment this distribution was updated. /// @param _totalBalance The total balance of tokens in the distribution. /// @return The new index. function _computeIndex( + IAaveIncentivesController _aaveIncentivesController, uint256 _currentIndex, uint256 _emissionPerSecond, uint256 _lastUpdateTimestamp, uint256 _totalBalance ) internal view returns (uint256) { - uint256 distributionEnd = aaveIncentivesController.DISTRIBUTION_END(); + uint256 distributionEnd = _aaveIncentivesController.DISTRIBUTION_END(); uint256 currentTimestamp = block.timestamp; if ( @@ -305,13 +314,14 @@ abstract contract RewardsManager is IRewardsManager, OwnableUpgradeable { } /// @dev Returns the next reward index. + /// @param _aaveIncentivesController The incentives controller used to query rewards. /// @param _asset The address of the reference asset of the distribution (aToken or variable debt token). /// @param _totalBalance The total balance of tokens in the distribution. /// @return oldIndex The old distribution index. /// @return newIndex The new distribution index. - function _getAssetIndex(address _asset, uint256 _totalBalance) - internal - view - virtual - returns (uint256 oldIndex, uint256 newIndex); + function _getAssetIndex( + IAaveIncentivesController _aaveIncentivesController, + address _asset, + uint256 _totalBalance + ) internal view virtual returns (uint256 oldIndex, uint256 newIndex); } diff --git a/contracts/aave-v2/interfaces/IRewardsManager.sol b/contracts/aave-v2/interfaces/IRewardsManager.sol index aca08b93e..34b520879 100644 --- a/contracts/aave-v2/interfaces/IRewardsManager.sol +++ b/contracts/aave-v2/interfaces/IRewardsManager.sol @@ -6,20 +6,21 @@ import "./aave/IAaveIncentivesController.sol"; interface IRewardsManager { function initialize(address _morpho) external; - function aaveIncentivesController() external view returns (IAaveIncentivesController); - - function setAaveIncentivesController(address) external; - function getUserIndex(address, address) external returns (uint256); function getUserUnclaimedRewards(address[] calldata, address) external view returns (uint256); + function claimRewards( + IAaveIncentivesController _aaveIncentivesController, + address[] calldata, + address + ) external returns (uint256); + function updateUserAssetAndAccruedRewards( + IAaveIncentivesController _aaveIncentivesController, address _user, address _asset, uint256 _userBalance, uint256 _totalBalance ) external; - - function claimRewards(address[] calldata, address) external returns (uint256); } diff --git a/contracts/aave-v2/rewards-managers/RewardsManagerOnMainnetAndAvalanche.sol b/contracts/aave-v2/rewards-managers/RewardsManagerOnMainnetAndAvalanche.sol index bd135f741..692390925 100644 --- a/contracts/aave-v2/rewards-managers/RewardsManagerOnMainnetAndAvalanche.sol +++ b/contracts/aave-v2/rewards-managers/RewardsManagerOnMainnetAndAvalanche.sol @@ -9,12 +9,11 @@ import "../RewardsManager.sol"; /// @notice This contract is used to manage the rewards from the Aave protocol on Mainnet or Avalanche. contract RewardsManagerOnMainnetAndAvalanche is RewardsManager { /// @inheritdoc RewardsManager - function _getAssetIndex(address _asset, uint256 _totalBalance) - internal - view - override - returns (uint256 oldIndex, uint256 newIndex) - { + function _getAssetIndex( + IAaveIncentivesController _aaveIncentivesController, + address _asset, + uint256 _totalBalance + ) internal view override returns (uint256 oldIndex, uint256 newIndex) { if (localAssetData[_asset].lastUpdateTimestamp == block.timestamp) oldIndex = newIndex = localAssetData[_asset].lastIndex; else { @@ -22,10 +21,11 @@ contract RewardsManagerOnMainnetAndAvalanche is RewardsManager { uint256 oldIndexOnAave, uint256 emissionPerSecond, uint256 lastTimestampOnAave - ) = aaveIncentivesController.getAssetData(_asset); + ) = _aaveIncentivesController.getAssetData(_asset); oldIndex = localAssetData[_asset].lastIndex; newIndex = _computeIndex( + _aaveIncentivesController, oldIndexOnAave, emissionPerSecond, lastTimestampOnAave, diff --git a/contracts/aave-v2/rewards-managers/RewardsManagerOnPolygon.sol b/contracts/aave-v2/rewards-managers/RewardsManagerOnPolygon.sol index 72e96f118..3703ca7e6 100644 --- a/contracts/aave-v2/rewards-managers/RewardsManagerOnPolygon.sol +++ b/contracts/aave-v2/rewards-managers/RewardsManagerOnPolygon.sol @@ -9,21 +9,21 @@ import "../RewardsManager.sol"; /// @notice This contract is used to manage the rewards from the Aave protocol on Polygon. contract RewardsManagerOnPolygon is RewardsManager { /// @inheritdoc RewardsManager - function _getAssetIndex(address _asset, uint256 _totalBalance) - internal - view - override - returns (uint256 oldIndex, uint256 newIndex) - { + function _getAssetIndex( + IAaveIncentivesController _aaveIncentivesController, + address _asset, + uint256 _totalBalance + ) internal view override returns (uint256 oldIndex, uint256 newIndex) { if (localAssetData[_asset].lastUpdateTimestamp == block.timestamp) oldIndex = newIndex = localAssetData[_asset].lastIndex; else { - IAaveIncentivesController.AssetData memory assetData = aaveIncentivesController.assets( + IAaveIncentivesController.AssetData memory assetData = _aaveIncentivesController.assets( _asset ); oldIndex = localAssetData[_asset].lastIndex; newIndex = _computeIndex( + _aaveIncentivesController, assetData.index, assetData.emissionPerSecond, assetData.lastUpdateTimestamp, diff --git a/test-foundry/aave-v2/helpers/User.sol b/test-foundry/aave-v2/helpers/User.sol index b7524ff09..c2b9f0efb 100644 --- a/test-foundry/aave-v2/helpers/User.sol +++ b/test-foundry/aave-v2/helpers/User.sol @@ -133,10 +133,4 @@ contract User { function setTreasuryVault(address _newTreasuryVault) external { morpho.setTreasuryVault(_newTreasuryVault); } - - function setAaveIncentivesControllerOnRewardsManager(address _aaveIncentivesController) - external - { - rewardsManager.setAaveIncentivesController(_aaveIncentivesController); - } } From d8cc333df4ea7b5aad57ffccc92d415b8cfe31af Mon Sep 17 00:00:00 2001 From: Rubilmax Date: Fri, 5 Aug 2022 11:30:01 +0200 Subject: [PATCH 30/57] =?UTF-8?q?=F0=9F=92=A1=20Update=20comments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contracts/aave-v2/IncentivesVault.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/aave-v2/IncentivesVault.sol b/contracts/aave-v2/IncentivesVault.sol index 6671d0323..43adcd267 100644 --- a/contracts/aave-v2/IncentivesVault.sol +++ b/contracts/aave-v2/IncentivesVault.sol @@ -55,7 +55,7 @@ contract IncentivesVault is IIncentivesVault, Ownable { /// @notice Emitted when reward tokens are traded for MORPHO tokens. /// @param receiver The address of the receiver. /// @param rewardAmount The amount of reward token traded. - /// @param morphoAmount The amount of MORPHO sent. + /// @param morphoAmount The amount of MORPHO transferred. event RewardTokensTraded(address indexed receiver, uint256 rewardAmount, uint256 morphoAmount); /// ERRORS /// @@ -129,7 +129,7 @@ contract IncentivesVault is IIncentivesVault, Ownable { /// @notice Trades reward tokens for MORPHO tokens and sends them to the receiver. /// @dev The amount of rewards to trade for MORPHO tokens is supposed to have been transferred to this contract before calling the function. /// @param _receiver The address of the receiver. - /// @param _amount The amount to transfer to the receiver. + /// @param _amount The amount claimed, to trade for MORPHO tokens. function tradeRewardTokensForMorphoTokens(address _receiver, uint256 _amount) external { if (msg.sender != address(morpho)) revert OnlyMorpho(); if (isPaused) revert VaultIsPaused(); From cb0381513d6b8293d7ebdcbb2706fb2c56e1ee35 Mon Sep 17 00:00:00 2001 From: Rubilmax Date: Fri, 5 Aug 2022 11:32:34 +0200 Subject: [PATCH 31/57] Switched order in storage --- contracts/aave-v2/MorphoStorage.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/aave-v2/MorphoStorage.sol b/contracts/aave-v2/MorphoStorage.sol index 9b0b635cb..4c140e029 100644 --- a/contracts/aave-v2/MorphoStorage.sol +++ b/contracts/aave-v2/MorphoStorage.sol @@ -58,8 +58,8 @@ abstract contract MorphoStorage is OwnableUpgradeable, ReentrancyGuardUpgradeabl /// CONTRACTS AND ADDRESSES /// - IAaveIncentivesController public aaveIncentivesController; ILendingPoolAddressesProvider public addressesProvider; + IAaveIncentivesController public aaveIncentivesController; ILendingPool public pool; IEntryPositionsManager public entryPositionsManager; From c08e42734b9daa537e825427c089cbc91fb7b261 Mon Sep 17 00:00:00 2001 From: makcandrov Date: Fri, 5 Aug 2022 10:56:24 +0100 Subject: [PATCH 32/57] Renaming variables --- contracts/aave-v2/EntryPositionsManager.sol | 10 +-- contracts/aave-v2/ExitPositionsManager.sol | 22 +++---- contracts/aave-v2/MatchingEngine.sol | 71 ++++++++++----------- contracts/aave-v3/EntryPositionsManager.sol | 10 +-- contracts/aave-v3/ExitPositionsManager.sol | 22 +++---- contracts/aave-v3/MatchingEngine.sol | 71 ++++++++++----------- contracts/compound/MatchingEngine.sol | 62 +++++++++--------- contracts/compound/PositionsManager.sol | 30 ++++----- 8 files changed, 145 insertions(+), 153 deletions(-) diff --git a/contracts/aave-v2/EntryPositionsManager.sol b/contracts/aave-v2/EntryPositionsManager.sol index 6d91cc0f4..3f47867a4 100644 --- a/contracts/aave-v2/EntryPositionsManager.sol +++ b/contracts/aave-v2/EntryPositionsManager.sol @@ -141,7 +141,7 @@ contract EntryPositionsManager is IEntryPositionsManager, PositionsManagerUtils } } - Types.SupplyBalance storage onBehalfSupplyBalance = supplyBalanceInOf[_poolToken][ + Types.SupplyBalance storage supplierSupplyBalance = supplyBalanceInOf[_poolToken][ _onBehalf ]; @@ -149,7 +149,7 @@ contract EntryPositionsManager is IEntryPositionsManager, PositionsManagerUtils uint256 toAddInP2P = vars.toRepay.rayDiv(p2pSupplyIndex[_poolToken]); delta.p2pSupplyAmount += toAddInP2P; - onBehalfSupplyBalance.inP2P += toAddInP2P; + supplierSupplyBalance.inP2P += toAddInP2P; _repayToPool(underlyingToken, vars.toRepay); // Reverts on error. emit P2PAmountsUpdated(_poolToken, delta.p2pSupplyAmount, delta.p2pBorrowAmount); @@ -159,7 +159,7 @@ contract EntryPositionsManager is IEntryPositionsManager, PositionsManagerUtils // Supply on pool. if (vars.remainingToSupply > 0) { - onBehalfSupplyBalance.onPool += vars.remainingToSupply.rayDiv( + supplierSupplyBalance.onPool += vars.remainingToSupply.rayDiv( poolIndexes[_poolToken].poolSupplyIndex ); // In scaled balance. _supplyToPool(underlyingToken, vars.remainingToSupply); // Reverts on error. @@ -172,8 +172,8 @@ contract EntryPositionsManager is IEntryPositionsManager, PositionsManagerUtils _onBehalf, _poolToken, _amount, - onBehalfSupplyBalance.onPool, - onBehalfSupplyBalance.inP2P + supplierSupplyBalance.onPool, + supplierSupplyBalance.inP2P ); } diff --git a/contracts/aave-v2/ExitPositionsManager.sol b/contracts/aave-v2/ExitPositionsManager.sol index 4347312b8..a13196000 100644 --- a/contracts/aave-v2/ExitPositionsManager.sol +++ b/contracts/aave-v2/ExitPositionsManager.sol @@ -428,13 +428,13 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { vars.remainingGasForMatching = _maxGasForMatching; vars.poolBorrowIndex = poolIndexes[_poolToken].poolBorrowIndex; - Types.BorrowBalance storage onBehalfBorrowBalance = borrowBalanceInOf[_poolToken][ + Types.BorrowBalance storage borrowerBorrowBalance = borrowBalanceInOf[_poolToken][ _onBehalf ]; /// Pool repay /// - vars.borrowedOnPool = onBehalfBorrowBalance.onPool; + vars.borrowedOnPool = borrowerBorrowBalance.onPool; if (vars.borrowedOnPool > 0) { vars.toRepay = Math.min( vars.borrowedOnPool.rayMul(vars.poolBorrowIndex), @@ -442,7 +442,7 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { ); vars.remainingToRepay -= vars.toRepay; - onBehalfBorrowBalance.onPool -= Math.min( + borrowerBorrowBalance.onPool -= Math.min( vars.borrowedOnPool, vars.toRepay.rayDiv(vars.poolBorrowIndex) ); // In adUnit. @@ -451,7 +451,7 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { _updateBorrowerInDS(_poolToken, _onBehalf); _repayToPool(underlyingToken, vars.toRepay); // Reverts on error. - if (onBehalfBorrowBalance.inP2P == 0 && onBehalfBorrowBalance.onPool == 0) + if (borrowerBorrowBalance.inP2P == 0 && borrowerBorrowBalance.onPool == 0) _setBorrowing(_onBehalf, borrowMask[_poolToken], false); emit Repaid( @@ -459,8 +459,8 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { _onBehalf, _poolToken, _amount, - onBehalfBorrowBalance.onPool, - onBehalfBorrowBalance.inP2P + borrowerBorrowBalance.onPool, + borrowerBorrowBalance.inP2P ); return; @@ -471,8 +471,8 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { vars.p2pSupplyIndex = p2pSupplyIndex[_poolToken]; vars.p2pBorrowIndex = p2pBorrowIndex[_poolToken]; vars.poolSupplyIndex = poolIndexes[_poolToken].poolSupplyIndex; - onBehalfBorrowBalance.inP2P -= Math.min( - onBehalfBorrowBalance.inP2P, + borrowerBorrowBalance.inP2P -= Math.min( + borrowerBorrowBalance.inP2P, vars.remainingToRepay.rayDiv(vars.p2pBorrowIndex) ); // In peer-to-peer borrow unit. _updateBorrowerInDS(_poolToken, _onBehalf); @@ -569,7 +569,7 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { _supplyToPool(underlyingToken, vars.remainingToRepay); // Reverts on error. } - if (onBehalfBorrowBalance.inP2P == 0 && onBehalfBorrowBalance.onPool == 0) + if (borrowerBorrowBalance.inP2P == 0 && borrowerBorrowBalance.onPool == 0) _setBorrowing(_onBehalf, borrowMask[_poolToken], false); emit Repaid( @@ -577,8 +577,8 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { _onBehalf, _poolToken, _amount, - onBehalfBorrowBalance.onPool, - onBehalfBorrowBalance.inP2P + borrowerBorrowBalance.onPool, + borrowerBorrowBalance.inP2P ); } diff --git a/contracts/aave-v2/MatchingEngine.sol b/contracts/aave-v2/MatchingEngine.sol index 5cb16ff8d..652ed7698 100644 --- a/contracts/aave-v2/MatchingEngine.sol +++ b/contracts/aave-v2/MatchingEngine.sol @@ -200,8 +200,8 @@ abstract contract MatchingEngine is MorphoUtils { Types.BorrowBalance storage firstPoolBorrowerBalance; uint256 remainingToMatch = _amount; - uint256 newPoolBorrowBalance; - uint256 newP2PBorrowBalance; + uint256 poolBorrowBalance; + uint256 p2pBorrowBalance; uint256 gasLeftAtTheBeginning = gasleft(); while ( @@ -214,24 +214,24 @@ abstract contract MatchingEngine is MorphoUtils { } firstPoolBorrowerBalance = borrowBalanceInOf[_poolToken][firstPoolBorrower]; - newPoolBorrowBalance = firstPoolBorrowerBalance.onPool; - newP2PBorrowBalance = firstPoolBorrowerBalance.inP2P; + poolBorrowBalance = firstPoolBorrowerBalance.onPool; + p2pBorrowBalance = firstPoolBorrowerBalance.inP2P; - vars.toMatch = Math.min(newPoolBorrowBalance.rayMul(vars.poolIndex), remainingToMatch); + vars.toMatch = Math.min(poolBorrowBalance.rayMul(vars.poolIndex), remainingToMatch); remainingToMatch -= vars.toMatch; - newPoolBorrowBalance -= vars.toMatch.rayDiv(vars.poolIndex); - newP2PBorrowBalance += vars.toMatch.rayDiv(vars.p2pIndex); + poolBorrowBalance -= vars.toMatch.rayDiv(vars.poolIndex); + p2pBorrowBalance += vars.toMatch.rayDiv(vars.p2pIndex); - firstPoolBorrowerBalance.onPool = newPoolBorrowBalance; - firstPoolBorrowerBalance.inP2P = newP2PBorrowBalance; + firstPoolBorrowerBalance.onPool = poolBorrowBalance; + firstPoolBorrowerBalance.inP2P = p2pBorrowBalance; _updateBorrowerInDS(_poolToken, firstPoolBorrower); emit BorrowerPositionUpdated( firstPoolBorrower, _poolToken, - newPoolBorrowBalance, - newP2PBorrowBalance + poolBorrowBalance, + p2pBorrowBalance ); } @@ -263,8 +263,8 @@ abstract contract MatchingEngine is MorphoUtils { Types.BorrowBalance storage firstP2PBorrowerBalance; uint256 remainingToUnmatch = _amount; - uint256 newPoolBorrowBalance; - uint256 newP2PBorrowBalance; + uint256 poolBorrowBalance; + uint256 p2pBorrowBalance; uint256 gasLeftAtTheBeginning = gasleft(); while ( @@ -277,27 +277,24 @@ abstract contract MatchingEngine is MorphoUtils { } firstP2PBorrowerBalance = borrowBalanceInOf[_poolToken][firstP2PBorrower]; - newPoolBorrowBalance = firstP2PBorrowerBalance.onPool; - newP2PBorrowBalance = firstP2PBorrowerBalance.inP2P; + poolBorrowBalance = firstP2PBorrowerBalance.onPool; + p2pBorrowBalance = firstP2PBorrowerBalance.inP2P; - vars.toUnmatch = Math.min( - newP2PBorrowBalance.rayMul(vars.p2pIndex), - remainingToUnmatch - ); + vars.toUnmatch = Math.min(p2pBorrowBalance.rayMul(vars.p2pIndex), remainingToUnmatch); remainingToUnmatch -= vars.toUnmatch; - newPoolBorrowBalance += vars.toUnmatch.rayDiv(vars.poolIndex); - newP2PBorrowBalance -= vars.toUnmatch.rayDiv(vars.p2pIndex); + poolBorrowBalance += vars.toUnmatch.rayDiv(vars.poolIndex); + p2pBorrowBalance -= vars.toUnmatch.rayDiv(vars.p2pIndex); - firstP2PBorrowerBalance.onPool = newPoolBorrowBalance; - firstP2PBorrowerBalance.inP2P = newP2PBorrowBalance; + firstP2PBorrowerBalance.onPool = poolBorrowBalance; + firstP2PBorrowerBalance.inP2P = p2pBorrowBalance; _updateBorrowerInDS(_poolToken, firstP2PBorrower); emit BorrowerPositionUpdated( firstP2PBorrower, _poolToken, - newPoolBorrowBalance, - newP2PBorrowBalance + poolBorrowBalance, + p2pBorrowBalance ); } @@ -311,17 +308,17 @@ abstract contract MatchingEngine is MorphoUtils { /// @param _poolToken The address of the market on which to update the suppliers data structure. /// @param _user The address of the user. function _updateSupplierInDS(address _poolToken, address _user) internal { - Types.SupplyBalance storage userSupplyBalance = supplyBalanceInOf[_poolToken][_user]; - uint256 onPool = userSupplyBalance.onPool; - uint256 inP2P = userSupplyBalance.inP2P; - HeapOrdering.HeapArray storage marketSupliersOnPool = suppliersOnPool[_poolToken]; - HeapOrdering.HeapArray storage marketSupliersInP2P = suppliersInP2P[_poolToken]; + Types.SupplyBalance storage supplierSupplyBalance = supplyBalanceInOf[_poolToken][_user]; + uint256 onPool = supplierSupplyBalance.onPool; + uint256 inP2P = supplierSupplyBalance.inP2P; + HeapOrdering.HeapArray storage marketSuppliersOnPool = suppliersOnPool[_poolToken]; + HeapOrdering.HeapArray storage marketSuppliersInP2P = suppliersInP2P[_poolToken]; - uint256 formerValueOnPool = marketSupliersOnPool.getValueOf(_user); - uint256 formerValueInP2P = marketSupliersInP2P.getValueOf(_user); + uint256 formerValueOnPool = marketSuppliersOnPool.getValueOf(_user); + uint256 formerValueInP2P = marketSuppliersInP2P.getValueOf(_user); - marketSupliersOnPool.update(_user, formerValueOnPool, onPool, maxSortedUsers); - marketSupliersInP2P.update(_user, formerValueInP2P, inP2P, maxSortedUsers); + marketSuppliersOnPool.update(_user, formerValueOnPool, onPool, maxSortedUsers); + marketSuppliersInP2P.update(_user, formerValueInP2P, inP2P, maxSortedUsers); if (formerValueOnPool != onPool && address(rewardsManager) != address(0)) rewardsManager.updateUserAssetAndAccruedRewards( @@ -336,9 +333,9 @@ abstract contract MatchingEngine is MorphoUtils { /// @param _poolToken The address of the market on which to update the borrowers data structure. /// @param _user The address of the user. function _updateBorrowerInDS(address _poolToken, address _user) internal { - Types.BorrowBalance storage userBorrowBalance = borrowBalanceInOf[_poolToken][_user]; - uint256 onPool = userBorrowBalance.onPool; - uint256 inP2P = userBorrowBalance.inP2P; + Types.BorrowBalance storage borrowerBorrowBalance = borrowBalanceInOf[_poolToken][_user]; + uint256 onPool = borrowerBorrowBalance.onPool; + uint256 inP2P = borrowerBorrowBalance.inP2P; HeapOrdering.HeapArray storage marketBorrowersOnPool = borrowersOnPool[_poolToken]; HeapOrdering.HeapArray storage marketBorrowersInP2P = borrowersInP2P[_poolToken]; diff --git a/contracts/aave-v3/EntryPositionsManager.sol b/contracts/aave-v3/EntryPositionsManager.sol index 0f70ed014..1d5b9821f 100644 --- a/contracts/aave-v3/EntryPositionsManager.sol +++ b/contracts/aave-v3/EntryPositionsManager.sol @@ -141,7 +141,7 @@ contract EntryPositionsManager is IEntryPositionsManager, PositionsManagerUtils } } - Types.SupplyBalance storage onBehalfSupplyBalance = supplyBalanceInOf[_poolToken][ + Types.SupplyBalance storage supplierSupplyBalance = supplyBalanceInOf[_poolToken][ _onBehalf ]; @@ -149,7 +149,7 @@ contract EntryPositionsManager is IEntryPositionsManager, PositionsManagerUtils uint256 toAddInP2P = vars.toRepay.rayDiv(p2pSupplyIndex[_poolToken]); delta.p2pSupplyAmount += toAddInP2P; - onBehalfSupplyBalance.inP2P += toAddInP2P; + supplierSupplyBalance.inP2P += toAddInP2P; _repayToPool(underlyingToken, vars.toRepay); // Reverts on error. emit P2PAmountsUpdated(_poolToken, delta.p2pSupplyAmount, delta.p2pBorrowAmount); @@ -159,7 +159,7 @@ contract EntryPositionsManager is IEntryPositionsManager, PositionsManagerUtils // Supply on pool. if (vars.remainingToSupply > 0) { - onBehalfSupplyBalance.onPool += vars.remainingToSupply.rayDiv( + supplierSupplyBalance.onPool += vars.remainingToSupply.rayDiv( poolIndexes[_poolToken].poolSupplyIndex ); // In scaled balance. _supplyToPool(underlyingToken, vars.remainingToSupply); // Reverts on error. @@ -172,8 +172,8 @@ contract EntryPositionsManager is IEntryPositionsManager, PositionsManagerUtils _onBehalf, _poolToken, _amount, - onBehalfSupplyBalance.onPool, - onBehalfSupplyBalance.inP2P + supplierSupplyBalance.onPool, + supplierSupplyBalance.inP2P ); } diff --git a/contracts/aave-v3/ExitPositionsManager.sol b/contracts/aave-v3/ExitPositionsManager.sol index b612428b2..1b52d0b05 100644 --- a/contracts/aave-v3/ExitPositionsManager.sol +++ b/contracts/aave-v3/ExitPositionsManager.sol @@ -427,13 +427,13 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { vars.remainingGasForMatching = _maxGasForMatching; vars.poolBorrowIndex = poolIndexes[_poolToken].poolBorrowIndex; - Types.BorrowBalance storage onBehalfBorrowBalance = borrowBalanceInOf[_poolToken][ + Types.BorrowBalance storage borrowerBorrowBalance = borrowBalanceInOf[_poolToken][ _onBehalf ]; /// Pool repay /// - vars.borrowedOnPool = onBehalfBorrowBalance.onPool; + vars.borrowedOnPool = borrowerBorrowBalance.onPool; if (vars.borrowedOnPool > 0) { vars.toRepay = Math.min( vars.borrowedOnPool.rayMul(vars.poolBorrowIndex), @@ -441,7 +441,7 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { ); vars.remainingToRepay -= vars.toRepay; - onBehalfBorrowBalance.onPool -= Math.min( + borrowerBorrowBalance.onPool -= Math.min( vars.borrowedOnPool, vars.toRepay.rayDiv(vars.poolBorrowIndex) ); // In adUnit. @@ -450,7 +450,7 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { _updateBorrowerInDS(_poolToken, _onBehalf); _repayToPool(underlyingToken, vars.toRepay); // Reverts on error. - if (onBehalfBorrowBalance.inP2P == 0 && onBehalfBorrowBalance.onPool == 0) + if (borrowerBorrowBalance.inP2P == 0 && borrowerBorrowBalance.onPool == 0) _setBorrowing(_onBehalf, borrowMask[_poolToken], false); emit Repaid( @@ -458,8 +458,8 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { _onBehalf, _poolToken, _amount, - onBehalfBorrowBalance.onPool, - onBehalfBorrowBalance.inP2P + borrowerBorrowBalance.onPool, + borrowerBorrowBalance.inP2P ); return; @@ -470,8 +470,8 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { vars.p2pSupplyIndex = p2pSupplyIndex[_poolToken]; vars.p2pBorrowIndex = p2pBorrowIndex[_poolToken]; vars.poolSupplyIndex = poolIndexes[_poolToken].poolSupplyIndex; - onBehalfBorrowBalance.inP2P -= Math.min( - onBehalfBorrowBalance.inP2P, + borrowerBorrowBalance.inP2P -= Math.min( + borrowerBorrowBalance.inP2P, vars.remainingToRepay.rayDiv(vars.p2pBorrowIndex) ); // In peer-to-peer borrow unit. _updateBorrowerInDS(_poolToken, _onBehalf); @@ -568,7 +568,7 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { _supplyToPool(underlyingToken, vars.remainingToRepay); // Reverts on error. } - if (onBehalfBorrowBalance.inP2P == 0 && onBehalfBorrowBalance.onPool == 0) + if (borrowerBorrowBalance.inP2P == 0 && borrowerBorrowBalance.onPool == 0) _setBorrowing(_onBehalf, borrowMask[_poolToken], false); emit Repaid( @@ -576,8 +576,8 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { _onBehalf, _poolToken, _amount, - onBehalfBorrowBalance.onPool, - onBehalfBorrowBalance.inP2P + borrowerBorrowBalance.onPool, + borrowerBorrowBalance.inP2P ); } diff --git a/contracts/aave-v3/MatchingEngine.sol b/contracts/aave-v3/MatchingEngine.sol index 73b03d61c..b81452405 100644 --- a/contracts/aave-v3/MatchingEngine.sol +++ b/contracts/aave-v3/MatchingEngine.sol @@ -201,8 +201,8 @@ abstract contract MatchingEngine is MorphoUtils { Types.BorrowBalance storage firstPoolBorrowerBalance; uint256 remainingToMatch = _amount; - uint256 newPoolBorrowBalance; - uint256 newP2PBorrowBalance; + uint256 poolBorrowBalance; + uint256 p2pBorrowBalance; uint256 gasLeftAtTheBeginning = gasleft(); while ( @@ -215,24 +215,24 @@ abstract contract MatchingEngine is MorphoUtils { } firstPoolBorrowerBalance = borrowBalanceInOf[_poolToken][firstPoolBorrower]; - newPoolBorrowBalance = firstPoolBorrowerBalance.onPool; - newP2PBorrowBalance = firstPoolBorrowerBalance.inP2P; + poolBorrowBalance = firstPoolBorrowerBalance.onPool; + p2pBorrowBalance = firstPoolBorrowerBalance.inP2P; - vars.toMatch = Math.min(newPoolBorrowBalance.rayMul(vars.poolIndex), remainingToMatch); + vars.toMatch = Math.min(poolBorrowBalance.rayMul(vars.poolIndex), remainingToMatch); remainingToMatch -= vars.toMatch; - newPoolBorrowBalance -= vars.toMatch.rayDiv(vars.poolIndex); - newP2PBorrowBalance += vars.toMatch.rayDiv(vars.p2pIndex); + poolBorrowBalance -= vars.toMatch.rayDiv(vars.poolIndex); + p2pBorrowBalance += vars.toMatch.rayDiv(vars.p2pIndex); - firstPoolBorrowerBalance.onPool = newPoolBorrowBalance; - firstPoolBorrowerBalance.inP2P = newP2PBorrowBalance; + firstPoolBorrowerBalance.onPool = poolBorrowBalance; + firstPoolBorrowerBalance.inP2P = p2pBorrowBalance; _updateBorrowerInDS(_poolToken, firstPoolBorrower); emit BorrowerPositionUpdated( firstPoolBorrower, _poolToken, - newPoolBorrowBalance, - newP2PBorrowBalance + poolBorrowBalance, + p2pBorrowBalance ); } @@ -264,8 +264,8 @@ abstract contract MatchingEngine is MorphoUtils { Types.BorrowBalance storage firstP2PBorrowerBalance; uint256 remainingToUnmatch = _amount; - uint256 newPoolBorrowBalance; - uint256 newP2PBorrowBalance; + uint256 poolBorrowBalance; + uint256 p2pBorrowBalance; uint256 gasLeftAtTheBeginning = gasleft(); while ( @@ -278,27 +278,24 @@ abstract contract MatchingEngine is MorphoUtils { } firstP2PBorrowerBalance = borrowBalanceInOf[_poolToken][firstP2PBorrower]; - newPoolBorrowBalance = firstP2PBorrowerBalance.onPool; - newP2PBorrowBalance = firstP2PBorrowerBalance.inP2P; + poolBorrowBalance = firstP2PBorrowerBalance.onPool; + p2pBorrowBalance = firstP2PBorrowerBalance.inP2P; - vars.toUnmatch = Math.min( - newP2PBorrowBalance.rayMul(vars.p2pIndex), - remainingToUnmatch - ); + vars.toUnmatch = Math.min(p2pBorrowBalance.rayMul(vars.p2pIndex), remainingToUnmatch); remainingToUnmatch -= vars.toUnmatch; - newPoolBorrowBalance += vars.toUnmatch.rayDiv(vars.poolIndex); - newP2PBorrowBalance -= vars.toUnmatch.rayDiv(vars.p2pIndex); + poolBorrowBalance += vars.toUnmatch.rayDiv(vars.poolIndex); + p2pBorrowBalance -= vars.toUnmatch.rayDiv(vars.p2pIndex); - firstP2PBorrowerBalance.onPool = newPoolBorrowBalance; - firstP2PBorrowerBalance.inP2P = newP2PBorrowBalance; + firstP2PBorrowerBalance.onPool = poolBorrowBalance; + firstP2PBorrowerBalance.inP2P = p2pBorrowBalance; _updateBorrowerInDS(_poolToken, firstP2PBorrower); emit BorrowerPositionUpdated( firstP2PBorrower, _poolToken, - newPoolBorrowBalance, - newP2PBorrowBalance + poolBorrowBalance, + p2pBorrowBalance ); } @@ -312,17 +309,17 @@ abstract contract MatchingEngine is MorphoUtils { /// @param _poolToken The address of the market on which to update the suppliers data structure. /// @param _user The address of the user. function _updateSupplierInDS(address _poolToken, address _user) internal { - Types.SupplyBalance storage userSupplyBalance = supplyBalanceInOf[_poolToken][_user]; - uint256 onPool = userSupplyBalance.onPool; - uint256 inP2P = userSupplyBalance.inP2P; - HeapOrdering.HeapArray storage marketSupliersOnPool = suppliersOnPool[_poolToken]; - HeapOrdering.HeapArray storage marketSupliersInP2P = suppliersInP2P[_poolToken]; + Types.SupplyBalance storage supplierSupplyBalance = supplyBalanceInOf[_poolToken][_user]; + uint256 onPool = supplierSupplyBalance.onPool; + uint256 inP2P = supplierSupplyBalance.inP2P; + HeapOrdering.HeapArray storage marketSuppliersOnPool = suppliersOnPool[_poolToken]; + HeapOrdering.HeapArray storage marketSuppliersInP2P = suppliersInP2P[_poolToken]; - uint256 formerValueOnPool = marketSupliersOnPool.getValueOf(_user); - uint256 formerValueInP2P = marketSupliersInP2P.getValueOf(_user); + uint256 formerValueOnPool = marketSuppliersOnPool.getValueOf(_user); + uint256 formerValueInP2P = marketSuppliersInP2P.getValueOf(_user); - marketSupliersOnPool.update(_user, formerValueOnPool, onPool, maxSortedUsers); - marketSupliersInP2P.update(_user, formerValueInP2P, inP2P, maxSortedUsers); + marketSuppliersOnPool.update(_user, formerValueOnPool, onPool, maxSortedUsers); + marketSuppliersInP2P.update(_user, formerValueInP2P, inP2P, maxSortedUsers); if (formerValueOnPool != onPool && address(rewardsManager) != address(0)) rewardsManager.updateUserAssetAndAccruedRewards( @@ -338,9 +335,9 @@ abstract contract MatchingEngine is MorphoUtils { /// @param _poolToken The address of the market on which to update the borrowers data structure. /// @param _user The address of the user. function _updateBorrowerInDS(address _poolToken, address _user) internal { - Types.BorrowBalance storage userBorrowBalance = borrowBalanceInOf[_poolToken][_user]; - uint256 onPool = userBorrowBalance.onPool; - uint256 inP2P = userBorrowBalance.inP2P; + Types.BorrowBalance storage borrowerBorrowBalance = borrowBalanceInOf[_poolToken][_user]; + uint256 onPool = borrowerBorrowBalance.onPool; + uint256 inP2P = borrowerBorrowBalance.inP2P; HeapOrdering.HeapArray storage marketBorrowersOnPool = borrowersOnPool[_poolToken]; HeapOrdering.HeapArray storage marketBorrowersInP2P = borrowersInP2P[_poolToken]; diff --git a/contracts/compound/MatchingEngine.sol b/contracts/compound/MatchingEngine.sol index caa52affb..4a74d76f4 100644 --- a/contracts/compound/MatchingEngine.sol +++ b/contracts/compound/MatchingEngine.sol @@ -213,35 +213,33 @@ abstract contract MatchingEngine is MorphoUtils { firstPoolBorrowerBalance = borrowBalanceInOf[_poolToken][firstPoolBorrower]; vars.inUnderlying = firstPoolBorrowerBalance.onPool.mul(vars.poolIndex); - uint256 newPoolBorrowBalance; - uint256 newP2PBorrowBalance; + uint256 poolBorrowBalance; + uint256 p2pBorrowBalance; uint256 maxToMatch = _amount - matched; if (vars.inUnderlying <= maxToMatch) { - // newPoolBorrowBalance is 0. - newP2PBorrowBalance = + // poolBorrowBalance is 0. + p2pBorrowBalance = firstPoolBorrowerBalance.inP2P + vars.inUnderlying.div(vars.p2pIndex); matched += vars.inUnderlying; } else { - newPoolBorrowBalance = + poolBorrowBalance = firstPoolBorrowerBalance.onPool - maxToMatch.div(vars.poolIndex); - newP2PBorrowBalance = - firstPoolBorrowerBalance.inP2P + - maxToMatch.div(vars.p2pIndex); + p2pBorrowBalance = firstPoolBorrowerBalance.inP2P + maxToMatch.div(vars.p2pIndex); matched = _amount; } - firstPoolBorrowerBalance.onPool = newPoolBorrowBalance; - firstPoolBorrowerBalance.inP2P = newP2PBorrowBalance; + firstPoolBorrowerBalance.onPool = poolBorrowBalance; + firstPoolBorrowerBalance.inP2P = p2pBorrowBalance; _updateBorrowerInDS(_poolToken, firstPoolBorrower); emit BorrowerPositionUpdated( firstPoolBorrower, _poolToken, - newPoolBorrowBalance, - newP2PBorrowBalance + poolBorrowBalance, + p2pBorrowBalance ); } @@ -277,34 +275,34 @@ abstract contract MatchingEngine is MorphoUtils { firstP2PBorrowerBalance = borrowBalanceInOf[_poolToken][firstP2PBorrower]; vars.inUnderlying = firstP2PBorrowerBalance.inP2P.mul(vars.p2pIndex); - uint256 newPoolBorrowBalance; - uint256 newP2PBorrowBalance; + uint256 poolBorrowBalance; + uint256 p2pBorrowBalance; if (vars.inUnderlying <= remainingToUnmatch) { - // newP2PBorrowBalance is 0. - newPoolBorrowBalance = + // p2pBorrowBalance is 0. + poolBorrowBalance = firstP2PBorrowerBalance.onPool + vars.inUnderlying.div(vars.poolIndex); remainingToUnmatch -= vars.inUnderlying; } else { - newPoolBorrowBalance = + poolBorrowBalance = firstP2PBorrowerBalance.onPool + remainingToUnmatch.div(vars.poolIndex); - newP2PBorrowBalance = + p2pBorrowBalance = firstP2PBorrowerBalance.inP2P - remainingToUnmatch.div(vars.p2pIndex); remainingToUnmatch = 0; } - firstP2PBorrowerBalance.onPool = newPoolBorrowBalance; - firstP2PBorrowerBalance.inP2P = newP2PBorrowBalance; + firstP2PBorrowerBalance.onPool = poolBorrowBalance; + firstP2PBorrowerBalance.inP2P = p2pBorrowBalance; _updateBorrowerInDS(_poolToken, firstP2PBorrower); emit BorrowerPositionUpdated( firstP2PBorrower, _poolToken, - newPoolBorrowBalance, - newP2PBorrowBalance + poolBorrowBalance, + p2pBorrowBalance ); } @@ -315,9 +313,9 @@ abstract contract MatchingEngine is MorphoUtils { /// @param _poolToken The address of the market on which to update the suppliers data structure. /// @param _user The address of the user. function _updateSupplierInDS(address _poolToken, address _user) internal { - Types.SupplyBalance storage userSupplyBalance = supplyBalanceInOf[_poolToken][_user]; - uint256 onPool = userSupplyBalance.onPool; - uint256 inP2P = userSupplyBalance.inP2P; + Types.SupplyBalance storage supplierSupplyBalance = supplyBalanceInOf[_poolToken][_user]; + uint256 onPool = supplierSupplyBalance.onPool; + uint256 inP2P = supplierSupplyBalance.inP2P; DoubleLinkedList.List storage marketSuppliersOnPool = suppliersOnPool[_poolToken]; DoubleLinkedList.List storage marketSuppliersInP2P = suppliersInP2P[_poolToken]; uint256 formerValueOnPool = marketSuppliersOnPool.getValueOf(_user); @@ -325,7 +323,7 @@ abstract contract MatchingEngine is MorphoUtils { // Round pool balance to 0 if below threshold. if (onPool <= dustThreshold) { - userSupplyBalance.onPool = 0; + supplierSupplyBalance.onPool = 0; onPool = 0; } if (formerValueOnPool != onPool) { @@ -335,7 +333,7 @@ abstract contract MatchingEngine is MorphoUtils { // Round peer-to-peer balance to 0 if below threshold. if (inP2P <= dustThreshold) { - userSupplyBalance.inP2P = 0; + supplierSupplyBalance.inP2P = 0; inP2P = 0; } if (formerValueInP2P != inP2P) { @@ -351,9 +349,9 @@ abstract contract MatchingEngine is MorphoUtils { /// @param _poolToken The address of the market on which to update the borrowers data structure. /// @param _user The address of the user. function _updateBorrowerInDS(address _poolToken, address _user) internal { - Types.BorrowBalance storage userBorrowBalance = borrowBalanceInOf[_poolToken][_user]; - uint256 onPool = userBorrowBalance.onPool; - uint256 inP2P = userBorrowBalance.inP2P; + Types.BorrowBalance storage borrowerBorrowBalance = borrowBalanceInOf[_poolToken][_user]; + uint256 onPool = borrowerBorrowBalance.onPool; + uint256 inP2P = borrowerBorrowBalance.inP2P; DoubleLinkedList.List storage marketBorrowersOnPool = borrowersOnPool[_poolToken]; DoubleLinkedList.List storage marketBorrowersInP2P = borrowersInP2P[_poolToken]; uint256 formerValueOnPool = marketBorrowersOnPool.getValueOf(_user); @@ -361,7 +359,7 @@ abstract contract MatchingEngine is MorphoUtils { // Round pool balance to 0 if below threshold. if (onPool <= dustThreshold) { - userBorrowBalance.onPool = 0; + borrowerBorrowBalance.onPool = 0; onPool = 0; } if (formerValueOnPool != onPool) { @@ -371,7 +369,7 @@ abstract contract MatchingEngine is MorphoUtils { // Round peer-to-peer balance to 0 if below threshold. if (inP2P <= dustThreshold) { - userBorrowBalance.inP2P = 0; + borrowerBorrowBalance.inP2P = 0; inP2P = 0; } if (formerValueInP2P != inP2P) { diff --git a/contracts/compound/PositionsManager.sol b/contracts/compound/PositionsManager.sol index 1079bfe0d..f690add77 100644 --- a/contracts/compound/PositionsManager.sol +++ b/contracts/compound/PositionsManager.sol @@ -262,7 +262,7 @@ contract PositionsManager is IPositionsManager, MatchingEngine { } } - Types.SupplyBalance storage onBehalfSupplyBalance = supplyBalanceInOf[_poolToken][ + Types.SupplyBalance storage supplierSupplyBalance = supplyBalanceInOf[_poolToken][ _onBehalf ]; @@ -270,7 +270,7 @@ contract PositionsManager is IPositionsManager, MatchingEngine { uint256 toAddInP2P = vars.toRepay.div(p2pSupplyIndex[_poolToken]); delta.p2pSupplyAmount += toAddInP2P; - onBehalfSupplyBalance.inP2P += toAddInP2P; + supplierSupplyBalance.inP2P += toAddInP2P; _repayToPool(_poolToken, underlyingToken, vars.toRepay); // Reverts on error. emit P2PAmountsUpdated(_poolToken, delta.p2pSupplyAmount, delta.p2pBorrowAmount); @@ -280,7 +280,7 @@ contract PositionsManager is IPositionsManager, MatchingEngine { // Supply on pool. if (vars.remainingToSupply > 0) { - onBehalfSupplyBalance.onPool += vars.remainingToSupply.div( + supplierSupplyBalance.onPool += vars.remainingToSupply.div( ICToken(_poolToken).exchangeRateStored() // Exchange rate has already been updated. ); // In scaled balance. _supplyToPool(_poolToken, underlyingToken, vars.remainingToSupply); // Reverts on error. @@ -293,8 +293,8 @@ contract PositionsManager is IPositionsManager, MatchingEngine { _onBehalf, _poolToken, _amount, - onBehalfSupplyBalance.onPool, - onBehalfSupplyBalance.inP2P + supplierSupplyBalance.onPool, + supplierSupplyBalance.inP2P ); } @@ -694,21 +694,21 @@ contract PositionsManager is IPositionsManager, MatchingEngine { vars.remainingGasForMatching = _maxGasForMatching; vars.poolBorrowIndex = ICToken(_poolToken).borrowIndex(); - Types.BorrowBalance storage onBehalfBorrowBalance = borrowBalanceInOf[_poolToken][ + Types.BorrowBalance storage borrowerBorrowBalance = borrowBalanceInOf[_poolToken][ _onBehalf ]; /// Pool repay /// // Repay borrow on pool. - vars.borrowedOnPool = onBehalfBorrowBalance.onPool; + vars.borrowedOnPool = borrowerBorrowBalance.onPool; if (vars.borrowedOnPool > 0) { vars.maxToRepayOnPool = vars.borrowedOnPool.mul(vars.poolBorrowIndex); if (vars.maxToRepayOnPool > vars.remainingToRepay) { vars.toRepay = vars.remainingToRepay; - onBehalfBorrowBalance.onPool -= CompoundMath.min( + borrowerBorrowBalance.onPool -= CompoundMath.min( vars.borrowedOnPool, vars.toRepay.div(vars.poolBorrowIndex) ); // In cdUnit. @@ -722,8 +722,8 @@ contract PositionsManager is IPositionsManager, MatchingEngine { _onBehalf, _poolToken, _amount, - onBehalfBorrowBalance.onPool, - onBehalfBorrowBalance.inP2P + borrowerBorrowBalance.onPool, + borrowerBorrowBalance.inP2P ); return; @@ -731,7 +731,7 @@ contract PositionsManager is IPositionsManager, MatchingEngine { vars.toRepay = vars.maxToRepayOnPool; vars.remainingToRepay -= vars.toRepay; - onBehalfBorrowBalance.onPool = 0; + borrowerBorrowBalance.onPool = 0; } } @@ -739,8 +739,8 @@ contract PositionsManager is IPositionsManager, MatchingEngine { vars.p2pSupplyIndex = p2pSupplyIndex[_poolToken]; vars.p2pBorrowIndex = p2pBorrowIndex[_poolToken]; - onBehalfBorrowBalance.inP2P -= CompoundMath.min( - onBehalfBorrowBalance.inP2P, + borrowerBorrowBalance.inP2P -= CompoundMath.min( + borrowerBorrowBalance.inP2P, vars.remainingToRepay.div(vars.p2pBorrowIndex) ); // In peer-to-peer unit. _updateBorrowerInDS(_poolToken, _onBehalf); @@ -839,8 +839,8 @@ contract PositionsManager is IPositionsManager, MatchingEngine { _onBehalf, _poolToken, _amount, - onBehalfBorrowBalance.onPool, - onBehalfBorrowBalance.inP2P + borrowerBorrowBalance.onPool, + borrowerBorrowBalance.inP2P ); } From 4851af93c8aa8d9efdbf2b8dca1be0e54b66d879 Mon Sep 17 00:00:00 2001 From: makcandrov Date: Sun, 7 Aug 2022 11:40:55 +0100 Subject: [PATCH 33/57] Renaming variables --- contracts/aave-v2/MatchingEngine.sol | 47 +++++++++++++--------------- contracts/aave-v3/MatchingEngine.sol | 47 +++++++++++++--------------- 2 files changed, 44 insertions(+), 50 deletions(-) diff --git a/contracts/aave-v2/MatchingEngine.sol b/contracts/aave-v2/MatchingEngine.sol index 652ed7698..253f10e84 100644 --- a/contracts/aave-v2/MatchingEngine.sol +++ b/contracts/aave-v2/MatchingEngine.sol @@ -74,8 +74,8 @@ abstract contract MatchingEngine is MorphoUtils { Types.SupplyBalance storage firstPoolSupplierBalance; uint256 remainingToMatch = _amount; - uint256 newPoolSupplyBalance; - uint256 newP2PSupplyBalance; + uint256 poolSupplyBalance; + uint256 p2pSupplyBalance; uint256 gasLeftAtTheBeginning = gasleft(); while ( @@ -88,24 +88,24 @@ abstract contract MatchingEngine is MorphoUtils { } firstPoolSupplierBalance = supplyBalanceInOf[_poolToken][firstPoolSupplier]; - newPoolSupplyBalance = firstPoolSupplierBalance.onPool; - newP2PSupplyBalance = firstPoolSupplierBalance.inP2P; + poolSupplyBalance = firstPoolSupplierBalance.onPool; + p2pSupplyBalance = firstPoolSupplierBalance.inP2P; - vars.toMatch = Math.min(newPoolSupplyBalance.rayMul(vars.poolIndex), remainingToMatch); + vars.toMatch = Math.min(poolSupplyBalance.rayMul(vars.poolIndex), remainingToMatch); remainingToMatch -= vars.toMatch; - newPoolSupplyBalance -= vars.toMatch.rayDiv(vars.poolIndex); - newP2PSupplyBalance += vars.toMatch.rayDiv(vars.p2pIndex); + poolSupplyBalance -= vars.toMatch.rayDiv(vars.poolIndex); + p2pSupplyBalance += vars.toMatch.rayDiv(vars.p2pIndex); - firstPoolSupplierBalance.onPool = newPoolSupplyBalance; - firstPoolSupplierBalance.inP2P = newP2PSupplyBalance; + firstPoolSupplierBalance.onPool = poolSupplyBalance; + firstPoolSupplierBalance.inP2P = p2pSupplyBalance; _updateSupplierInDS(_poolToken, firstPoolSupplier); emit SupplierPositionUpdated( firstPoolSupplier, _poolToken, - newPoolSupplyBalance, - newP2PSupplyBalance + poolSupplyBalance, + p2pSupplyBalance ); } @@ -137,8 +137,8 @@ abstract contract MatchingEngine is MorphoUtils { Types.SupplyBalance storage firstP2PSupplierBalance; uint256 remainingToUnmatch = _amount; - uint256 newPoolSupplyBalance; - uint256 newP2PSupplyBalance; + uint256 poolSupplyBalance; + uint256 p2pSupplyBalance; uint256 gasLeftAtTheBeginning = gasleft(); while ( @@ -151,26 +151,23 @@ abstract contract MatchingEngine is MorphoUtils { } firstP2PSupplierBalance = supplyBalanceInOf[_poolToken][firstP2PSupplier]; - newPoolSupplyBalance = firstP2PSupplierBalance.onPool; - newP2PSupplyBalance = firstP2PSupplierBalance.inP2P; + poolSupplyBalance = firstP2PSupplierBalance.onPool; + p2pSupplyBalance = firstP2PSupplierBalance.inP2P; - vars.toUnmatch = Math.min( - newP2PSupplyBalance.rayMul(vars.p2pIndex), - remainingToUnmatch - ); + vars.toUnmatch = Math.min(p2pSupplyBalance.rayMul(vars.p2pIndex), remainingToUnmatch); remainingToUnmatch -= vars.toUnmatch; - newPoolSupplyBalance += vars.toUnmatch.rayDiv(vars.poolIndex); - newP2PSupplyBalance -= vars.toUnmatch.rayDiv(vars.p2pIndex); + poolSupplyBalance += vars.toUnmatch.rayDiv(vars.poolIndex); + p2pSupplyBalance -= vars.toUnmatch.rayDiv(vars.p2pIndex); - firstP2PSupplierBalance.onPool = newPoolSupplyBalance; - firstP2PSupplierBalance.inP2P = newP2PSupplyBalance; + firstP2PSupplierBalance.onPool = poolSupplyBalance; + firstP2PSupplierBalance.inP2P = p2pSupplyBalance; _updateSupplierInDS(_poolToken, firstP2PSupplier); emit SupplierPositionUpdated( firstP2PSupplier, _poolToken, - newPoolSupplyBalance, - newP2PSupplyBalance + poolSupplyBalance, + p2pSupplyBalance ); } diff --git a/contracts/aave-v3/MatchingEngine.sol b/contracts/aave-v3/MatchingEngine.sol index b81452405..a3fcaad43 100644 --- a/contracts/aave-v3/MatchingEngine.sol +++ b/contracts/aave-v3/MatchingEngine.sol @@ -74,8 +74,8 @@ abstract contract MatchingEngine is MorphoUtils { Types.SupplyBalance storage firstPoolSupplierBalance; uint256 remainingToMatch = _amount; - uint256 newPoolSupplyBalance; - uint256 newP2PSupplyBalance; + uint256 poolSupplyBalance; + uint256 p2pSupplyBalance; uint256 gasLeftAtTheBeginning = gasleft(); while ( @@ -88,24 +88,24 @@ abstract contract MatchingEngine is MorphoUtils { } firstPoolSupplierBalance = supplyBalanceInOf[_poolToken][firstPoolSupplier]; - newPoolSupplyBalance = firstPoolSupplierBalance.onPool; - newP2PSupplyBalance = firstPoolSupplierBalance.inP2P; + poolSupplyBalance = firstPoolSupplierBalance.onPool; + p2pSupplyBalance = firstPoolSupplierBalance.inP2P; - vars.toMatch = Math.min(newPoolSupplyBalance.rayMul(vars.poolIndex), remainingToMatch); + vars.toMatch = Math.min(poolSupplyBalance.rayMul(vars.poolIndex), remainingToMatch); remainingToMatch -= vars.toMatch; - newPoolSupplyBalance -= vars.toMatch.rayDiv(vars.poolIndex); - newP2PSupplyBalance += vars.toMatch.rayDiv(vars.p2pIndex); + poolSupplyBalance -= vars.toMatch.rayDiv(vars.poolIndex); + p2pSupplyBalance += vars.toMatch.rayDiv(vars.p2pIndex); - firstPoolSupplierBalance.onPool = newPoolSupplyBalance; - firstPoolSupplierBalance.inP2P = newP2PSupplyBalance; + firstPoolSupplierBalance.onPool = poolSupplyBalance; + firstPoolSupplierBalance.inP2P = p2pSupplyBalance; _updateSupplierInDS(_poolToken, firstPoolSupplier); emit SupplierPositionUpdated( firstPoolSupplier, _poolToken, - newPoolSupplyBalance, - newP2PSupplyBalance + poolSupplyBalance, + p2pSupplyBalance ); } @@ -137,8 +137,8 @@ abstract contract MatchingEngine is MorphoUtils { Types.SupplyBalance storage firstP2PSupplierBalance; uint256 remainingToUnmatch = _amount; - uint256 newPoolSupplyBalance; - uint256 newP2PSupplyBalance; + uint256 poolSupplyBalance; + uint256 p2pSupplyBalance; uint256 gasLeftAtTheBeginning = gasleft(); while ( @@ -151,27 +151,24 @@ abstract contract MatchingEngine is MorphoUtils { } firstP2PSupplierBalance = supplyBalanceInOf[_poolToken][firstP2PSupplier]; - newPoolSupplyBalance = firstP2PSupplierBalance.onPool; - newP2PSupplyBalance = firstP2PSupplierBalance.inP2P; + poolSupplyBalance = firstP2PSupplierBalance.onPool; + p2pSupplyBalance = firstP2PSupplierBalance.inP2P; - vars.toUnmatch = Math.min( - newP2PSupplyBalance.rayMul(vars.p2pIndex), - remainingToUnmatch - ); + vars.toUnmatch = Math.min(p2pSupplyBalance.rayMul(vars.p2pIndex), remainingToUnmatch); remainingToUnmatch -= vars.toUnmatch; - newPoolSupplyBalance += vars.toUnmatch.rayDiv(vars.poolIndex); - newP2PSupplyBalance -= vars.toUnmatch.rayDiv(vars.p2pIndex); + poolSupplyBalance += vars.toUnmatch.rayDiv(vars.poolIndex); + p2pSupplyBalance -= vars.toUnmatch.rayDiv(vars.p2pIndex); - firstP2PSupplierBalance.onPool = newPoolSupplyBalance; - firstP2PSupplierBalance.inP2P = newP2PSupplyBalance; + firstP2PSupplierBalance.onPool = poolSupplyBalance; + firstP2PSupplierBalance.inP2P = p2pSupplyBalance; _updateSupplierInDS(_poolToken, firstP2PSupplier); emit SupplierPositionUpdated( firstP2PSupplier, _poolToken, - newPoolSupplyBalance, - newP2PSupplyBalance + poolSupplyBalance, + p2pSupplyBalance ); } From 38c112c2d7b1417308535ed89f0942d393534d8c Mon Sep 17 00:00:00 2001 From: MerlinEgalite Date: Sat, 6 Aug 2022 10:27:38 +0200 Subject: [PATCH 34/57] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20(opti-balance-storag?= =?UTF-8?q?e)=20Save=20gas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contracts/aave-v2/MatchingEngine.sol | 58 ++++++++++++--------------- contracts/aave-v3/MatchingEngine.sol | 57 ++++++++++++-------------- contracts/compound/MatchingEngine.sol | 28 +++++++------ 3 files changed, 67 insertions(+), 76 deletions(-) diff --git a/contracts/aave-v2/MatchingEngine.sol b/contracts/aave-v2/MatchingEngine.sol index 253f10e84..c43e8d1a2 100644 --- a/contracts/aave-v2/MatchingEngine.sol +++ b/contracts/aave-v2/MatchingEngine.sol @@ -71,13 +71,9 @@ abstract contract MatchingEngine is MorphoUtils { vars.poolIndex = poolIndexes[_poolToken].poolSupplyIndex; vars.p2pIndex = p2pSupplyIndex[_poolToken]; address firstPoolSupplier; - Types.SupplyBalance storage firstPoolSupplierBalance; uint256 remainingToMatch = _amount; - - uint256 poolSupplyBalance; - uint256 p2pSupplyBalance; - uint256 gasLeftAtTheBeginning = gasleft(); + while ( remainingToMatch > 0 && (firstPoolSupplier = suppliersOnPool[_poolToken].getHead()) != address(0) @@ -86,10 +82,12 @@ abstract contract MatchingEngine is MorphoUtils { unchecked { if (gasLeftAtTheBeginning - gasleft() >= _maxGasForMatching) break; } - firstPoolSupplierBalance = supplyBalanceInOf[_poolToken][firstPoolSupplier]; + Types.SupplyBalance storage firstPoolSupplierBalance = supplyBalanceInOf[_poolToken][ + firstPoolSupplier + ]; - poolSupplyBalance = firstPoolSupplierBalance.onPool; - p2pSupplyBalance = firstPoolSupplierBalance.inP2P; + uint256 poolSupplyBalance = firstPoolSupplierBalance.onPool; + uint256 p2pSupplyBalance = firstPoolSupplierBalance.inP2P; vars.toMatch = Math.min(poolSupplyBalance.rayMul(vars.poolIndex), remainingToMatch); remainingToMatch -= vars.toMatch; @@ -134,13 +132,9 @@ abstract contract MatchingEngine is MorphoUtils { vars.poolIndex = poolIndexes[_poolToken].poolSupplyIndex; vars.p2pIndex = p2pSupplyIndex[_poolToken]; address firstP2PSupplier; - Types.SupplyBalance storage firstP2PSupplierBalance; uint256 remainingToUnmatch = _amount; - - uint256 poolSupplyBalance; - uint256 p2pSupplyBalance; - uint256 gasLeftAtTheBeginning = gasleft(); + while ( remainingToUnmatch > 0 && (firstP2PSupplier = suppliersInP2P[_poolToken].getHead()) != address(0) @@ -149,10 +143,12 @@ abstract contract MatchingEngine is MorphoUtils { unchecked { if (gasLeftAtTheBeginning - gasleft() >= _maxGasForMatching) break; } - firstP2PSupplierBalance = supplyBalanceInOf[_poolToken][firstP2PSupplier]; + Types.SupplyBalance storage firstP2PSupplierBalance = supplyBalanceInOf[_poolToken][ + firstP2PSupplier + ]; - poolSupplyBalance = firstP2PSupplierBalance.onPool; - p2pSupplyBalance = firstP2PSupplierBalance.inP2P; + uint256 poolSupplyBalance = firstP2PSupplierBalance.onPool; + uint256 p2pSupplyBalance = firstP2PSupplierBalance.inP2P; vars.toUnmatch = Math.min(p2pSupplyBalance.rayMul(vars.p2pIndex), remainingToUnmatch); remainingToUnmatch -= vars.toUnmatch; @@ -162,6 +158,7 @@ abstract contract MatchingEngine is MorphoUtils { firstP2PSupplierBalance.onPool = poolSupplyBalance; firstP2PSupplierBalance.inP2P = p2pSupplyBalance; + _updateSupplierInDS(_poolToken, firstP2PSupplier); emit SupplierPositionUpdated( firstP2PSupplier, @@ -190,17 +187,14 @@ abstract contract MatchingEngine is MorphoUtils { uint256 _maxGasForMatching ) internal returns (uint256 matched, uint256 gasConsumedInMatching) { if (_maxGasForMatching == 0) return (0, 0); + MatchVars memory vars; vars.poolIndex = poolIndexes[_poolToken].poolBorrowIndex; vars.p2pIndex = p2pBorrowIndex[_poolToken]; address firstPoolBorrower; - Types.BorrowBalance storage firstPoolBorrowerBalance; uint256 remainingToMatch = _amount; - - uint256 poolBorrowBalance; - uint256 p2pBorrowBalance; - uint256 gasLeftAtTheBeginning = gasleft(); + while ( remainingToMatch > 0 && (firstPoolBorrower = borrowersOnPool[_poolToken].getHead()) != address(0) @@ -209,10 +203,12 @@ abstract contract MatchingEngine is MorphoUtils { unchecked { if (gasLeftAtTheBeginning - gasleft() >= _maxGasForMatching) break; } - firstPoolBorrowerBalance = borrowBalanceInOf[_poolToken][firstPoolBorrower]; + Types.BorrowBalance storage firstPoolBorrowerBalance = borrowBalanceInOf[_poolToken][ + firstPoolBorrower + ]; - poolBorrowBalance = firstPoolBorrowerBalance.onPool; - p2pBorrowBalance = firstPoolBorrowerBalance.inP2P; + uint256 poolBorrowBalance = firstPoolBorrowerBalance.onPool; + uint256 p2pBorrowBalance = firstPoolBorrowerBalance.inP2P; vars.toMatch = Math.min(poolBorrowBalance.rayMul(vars.poolIndex), remainingToMatch); remainingToMatch -= vars.toMatch; @@ -257,13 +253,9 @@ abstract contract MatchingEngine is MorphoUtils { vars.poolIndex = poolIndexes[_poolToken].poolBorrowIndex; vars.p2pIndex = p2pBorrowIndex[_poolToken]; address firstP2PBorrower; - Types.BorrowBalance storage firstP2PBorrowerBalance; uint256 remainingToUnmatch = _amount; - - uint256 poolBorrowBalance; - uint256 p2pBorrowBalance; - uint256 gasLeftAtTheBeginning = gasleft(); + while ( remainingToUnmatch > 0 && (firstP2PBorrower = borrowersInP2P[_poolToken].getHead()) != address(0) @@ -272,10 +264,12 @@ abstract contract MatchingEngine is MorphoUtils { unchecked { if (gasLeftAtTheBeginning - gasleft() >= _maxGasForMatching) break; } - firstP2PBorrowerBalance = borrowBalanceInOf[_poolToken][firstP2PBorrower]; + Types.BorrowBalance storage firstP2PBorrowerBalance = borrowBalanceInOf[_poolToken][ + firstP2PBorrower + ]; - poolBorrowBalance = firstP2PBorrowerBalance.onPool; - p2pBorrowBalance = firstP2PBorrowerBalance.inP2P; + uint256 poolBorrowBalance = firstP2PBorrowerBalance.onPool; + uint256 p2pBorrowBalance = firstP2PBorrowerBalance.inP2P; vars.toUnmatch = Math.min(p2pBorrowBalance.rayMul(vars.p2pIndex), remainingToUnmatch); remainingToUnmatch -= vars.toUnmatch; diff --git a/contracts/aave-v3/MatchingEngine.sol b/contracts/aave-v3/MatchingEngine.sol index a3fcaad43..bc24cd07f 100644 --- a/contracts/aave-v3/MatchingEngine.sol +++ b/contracts/aave-v3/MatchingEngine.sol @@ -71,13 +71,9 @@ abstract contract MatchingEngine is MorphoUtils { vars.poolIndex = poolIndexes[_poolToken].poolSupplyIndex; vars.p2pIndex = p2pSupplyIndex[_poolToken]; address firstPoolSupplier; - Types.SupplyBalance storage firstPoolSupplierBalance; uint256 remainingToMatch = _amount; - - uint256 poolSupplyBalance; - uint256 p2pSupplyBalance; - uint256 gasLeftAtTheBeginning = gasleft(); + while ( remainingToMatch > 0 && (firstPoolSupplier = suppliersOnPool[_poolToken].getHead()) != address(0) @@ -86,10 +82,12 @@ abstract contract MatchingEngine is MorphoUtils { unchecked { if (gasLeftAtTheBeginning - gasleft() >= _maxGasForMatching) break; } - firstPoolSupplierBalance = supplyBalanceInOf[_poolToken][firstPoolSupplier]; + Types.SupplyBalance storage firstPoolSupplierBalance = supplyBalanceInOf[_poolToken][ + firstPoolSupplier + ]; - poolSupplyBalance = firstPoolSupplierBalance.onPool; - p2pSupplyBalance = firstPoolSupplierBalance.inP2P; + uint256 poolSupplyBalance = firstPoolSupplierBalance.onPool; + uint256 p2pSupplyBalance = firstPoolSupplierBalance.inP2P; vars.toMatch = Math.min(poolSupplyBalance.rayMul(vars.poolIndex), remainingToMatch); remainingToMatch -= vars.toMatch; @@ -134,13 +132,9 @@ abstract contract MatchingEngine is MorphoUtils { vars.poolIndex = poolIndexes[_poolToken].poolSupplyIndex; vars.p2pIndex = p2pSupplyIndex[_poolToken]; address firstP2PSupplier; - Types.SupplyBalance storage firstP2PSupplierBalance; uint256 remainingToUnmatch = _amount; - - uint256 poolSupplyBalance; - uint256 p2pSupplyBalance; - uint256 gasLeftAtTheBeginning = gasleft(); + while ( remainingToUnmatch > 0 && (firstP2PSupplier = suppliersInP2P[_poolToken].getHead()) != address(0) @@ -149,10 +143,12 @@ abstract contract MatchingEngine is MorphoUtils { unchecked { if (gasLeftAtTheBeginning - gasleft() >= _maxGasForMatching) break; } - firstP2PSupplierBalance = supplyBalanceInOf[_poolToken][firstP2PSupplier]; + Types.SupplyBalance storage firstP2PSupplierBalance = supplyBalanceInOf[_poolToken][ + firstP2PSupplier + ]; - poolSupplyBalance = firstP2PSupplierBalance.onPool; - p2pSupplyBalance = firstP2PSupplierBalance.inP2P; + uint256 poolSupplyBalance = firstP2PSupplierBalance.onPool; + uint256 p2pSupplyBalance = firstP2PSupplierBalance.inP2P; vars.toUnmatch = Math.min(p2pSupplyBalance.rayMul(vars.p2pIndex), remainingToUnmatch); remainingToUnmatch -= vars.toUnmatch; @@ -191,17 +187,14 @@ abstract contract MatchingEngine is MorphoUtils { uint256 _maxGasForMatching ) internal returns (uint256 matched, uint256 gasConsumedInMatching) { if (_maxGasForMatching == 0) return (0, 0); + MatchVars memory vars; vars.poolIndex = poolIndexes[_poolToken].poolBorrowIndex; vars.p2pIndex = p2pBorrowIndex[_poolToken]; address firstPoolBorrower; - Types.BorrowBalance storage firstPoolBorrowerBalance; uint256 remainingToMatch = _amount; - - uint256 poolBorrowBalance; - uint256 p2pBorrowBalance; - uint256 gasLeftAtTheBeginning = gasleft(); + while ( remainingToMatch > 0 && (firstPoolBorrower = borrowersOnPool[_poolToken].getHead()) != address(0) @@ -210,10 +203,12 @@ abstract contract MatchingEngine is MorphoUtils { unchecked { if (gasLeftAtTheBeginning - gasleft() >= _maxGasForMatching) break; } - firstPoolBorrowerBalance = borrowBalanceInOf[_poolToken][firstPoolBorrower]; + Types.BorrowBalance storage firstPoolBorrowerBalance = borrowBalanceInOf[_poolToken][ + firstPoolBorrower + ]; - poolBorrowBalance = firstPoolBorrowerBalance.onPool; - p2pBorrowBalance = firstPoolBorrowerBalance.inP2P; + uint256 poolBorrowBalance = firstPoolBorrowerBalance.onPool; + uint256 p2pBorrowBalance = firstPoolBorrowerBalance.inP2P; vars.toMatch = Math.min(poolBorrowBalance.rayMul(vars.poolIndex), remainingToMatch); remainingToMatch -= vars.toMatch; @@ -258,13 +253,9 @@ abstract contract MatchingEngine is MorphoUtils { vars.poolIndex = poolIndexes[_poolToken].poolBorrowIndex; vars.p2pIndex = p2pBorrowIndex[_poolToken]; address firstP2PBorrower; - Types.BorrowBalance storage firstP2PBorrowerBalance; uint256 remainingToUnmatch = _amount; - - uint256 poolBorrowBalance; - uint256 p2pBorrowBalance; - uint256 gasLeftAtTheBeginning = gasleft(); + while ( remainingToUnmatch > 0 && (firstP2PBorrower = borrowersInP2P[_poolToken].getHead()) != address(0) @@ -273,10 +264,12 @@ abstract contract MatchingEngine is MorphoUtils { unchecked { if (gasLeftAtTheBeginning - gasleft() >= _maxGasForMatching) break; } - firstP2PBorrowerBalance = borrowBalanceInOf[_poolToken][firstP2PBorrower]; + Types.BorrowBalance storage firstP2PBorrowerBalance = borrowBalanceInOf[_poolToken][ + firstP2PBorrower + ]; - poolBorrowBalance = firstP2PBorrowerBalance.onPool; - p2pBorrowBalance = firstP2PBorrowerBalance.inP2P; + uint256 poolBorrowBalance = firstP2PBorrowerBalance.onPool; + uint256 p2pBorrowBalance = firstP2PBorrowerBalance.inP2P; vars.toUnmatch = Math.min(p2pBorrowBalance.rayMul(vars.p2pIndex), remainingToUnmatch); remainingToUnmatch -= vars.toUnmatch; diff --git a/contracts/compound/MatchingEngine.sol b/contracts/compound/MatchingEngine.sol index 4a74d76f4..3f306cc8a 100644 --- a/contracts/compound/MatchingEngine.sol +++ b/contracts/compound/MatchingEngine.sol @@ -75,15 +75,16 @@ abstract contract MatchingEngine is MorphoUtils { vars.poolIndex = ICToken(_poolToken).exchangeRateStored(); // Exchange rate has already been updated. vars.p2pIndex = p2pSupplyIndex[_poolToken]; address firstPoolSupplier; - Types.SupplyBalance storage firstPoolSupplierBalance; - vars.gasLeftAtTheBeginning = gasleft(); + while ( matched < _amount && (firstPoolSupplier = suppliersOnPool[_poolToken].getHead()) != address(0) && vars.gasLeftAtTheBeginning - gasleft() < _maxGasForMatching ) { - firstPoolSupplierBalance = supplyBalanceInOf[_poolToken][firstPoolSupplier]; + Types.SupplyBalance storage firstPoolSupplierBalance = supplyBalanceInOf[_poolToken][ + firstPoolSupplier + ]; vars.inUnderlying = firstPoolSupplierBalance.onPool.mul(vars.poolIndex); uint256 newPoolSupplyBalance; @@ -138,16 +139,17 @@ abstract contract MatchingEngine is MorphoUtils { vars.poolIndex = ICToken(_poolToken).exchangeRateStored(); // Exchange rate has already been updated. vars.p2pIndex = p2pSupplyIndex[_poolToken]; address firstP2PSupplier; - Types.SupplyBalance storage firstP2PSupplierBalance; uint256 remainingToUnmatch = _amount; - vars.gasLeftAtTheBeginning = gasleft(); + while ( remainingToUnmatch > 0 && (firstP2PSupplier = suppliersInP2P[_poolToken].getHead()) != address(0) && vars.gasLeftAtTheBeginning - gasleft() < _maxGasForMatching ) { - firstP2PSupplierBalance = supplyBalanceInOf[_poolToken][firstP2PSupplier]; + Types.SupplyBalance storage firstP2PSupplierBalance = supplyBalanceInOf[_poolToken][ + firstP2PSupplier + ]; vars.inUnderlying = firstP2PSupplierBalance.inP2P.mul(vars.p2pIndex); uint256 newPoolSupplyBalance; @@ -202,15 +204,16 @@ abstract contract MatchingEngine is MorphoUtils { vars.poolIndex = ICToken(_poolToken).borrowIndex(); vars.p2pIndex = p2pBorrowIndex[_poolToken]; address firstPoolBorrower; - Types.BorrowBalance storage firstPoolBorrowerBalance; - vars.gasLeftAtTheBeginning = gasleft(); + while ( matched < _amount && (firstPoolBorrower = borrowersOnPool[_poolToken].getHead()) != address(0) && vars.gasLeftAtTheBeginning - gasleft() < _maxGasForMatching ) { - firstPoolBorrowerBalance = borrowBalanceInOf[_poolToken][firstPoolBorrower]; + Types.BorrowBalance storage firstPoolBorrowerBalance = borrowBalanceInOf[_poolToken][ + firstPoolBorrower + ]; vars.inUnderlying = firstPoolBorrowerBalance.onPool.mul(vars.poolIndex); uint256 poolBorrowBalance; @@ -263,16 +266,17 @@ abstract contract MatchingEngine is MorphoUtils { vars.poolIndex = ICToken(_poolToken).borrowIndex(); vars.p2pIndex = p2pBorrowIndex[_poolToken]; address firstP2PBorrower; - Types.BorrowBalance storage firstP2PBorrowerBalance; uint256 remainingToUnmatch = _amount; - vars.gasLeftAtTheBeginning = gasleft(); + while ( remainingToUnmatch > 0 && (firstP2PBorrower = borrowersInP2P[_poolToken].getHead()) != address(0) && vars.gasLeftAtTheBeginning - gasleft() < _maxGasForMatching ) { - firstP2PBorrowerBalance = borrowBalanceInOf[_poolToken][firstP2PBorrower]; + Types.BorrowBalance storage firstP2PBorrowerBalance = borrowBalanceInOf[_poolToken][ + firstP2PBorrower + ]; vars.inUnderlying = firstP2PBorrowerBalance.inP2P.mul(vars.p2pIndex); uint256 poolBorrowBalance; From de9473bbdc00ad6243caf6f76d10c91c2d14c8d2 Mon Sep 17 00:00:00 2001 From: MerlinEgalite Date: Mon, 8 Aug 2022 11:41:52 +0200 Subject: [PATCH 35/57] =?UTF-8?q?=F0=9F=93=8C=20(#1163)=20Pin=20morpho-uti?= =?UTF-8?q?ls=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/morpho-utils | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/morpho-utils b/lib/morpho-utils index 174140ab5..cb43513a1 160000 --- a/lib/morpho-utils +++ b/lib/morpho-utils @@ -1 +1 @@ -Subproject commit 174140ab5b9a5db28f3700f4d0378cb0a64510e3 +Subproject commit cb43513a1a2d6b2eed485b7e58a9724255ca417d From a0b4e31770c107b2979a3312b44bde43e6ff30bb Mon Sep 17 00:00:00 2001 From: MerlinEgalite Date: Wed, 10 Aug 2022 14:30:12 +0200 Subject: [PATCH 36/57] =?UTF-8?q?=F0=9F=A9=B9=20(#1209)=20Fix=20max=20debt?= =?UTF-8?q?=20update?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contracts/aave-v2/MorphoUtils.sol | 11 ++++++----- contracts/aave-v3/MorphoUtils.sol | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/contracts/aave-v2/MorphoUtils.sol b/contracts/aave-v2/MorphoUtils.sol index 8bd9b354a..699fdc5cf 100644 --- a/contracts/aave-v2/MorphoUtils.sol +++ b/contracts/aave-v2/MorphoUtils.sol @@ -334,12 +334,13 @@ abstract contract MorphoUtils is MorphoStorage { // Subtract withdrawn amount from liquidation threshold and collateral. if (_poolToken == vars.poolToken && _amountWithdrawn > 0) { - values.collateral -= - (_amountWithdrawn * vars.underlyingPrice) / + uint256 withdrawn = (_amountWithdrawn * vars.underlyingPrice) / assetData.tokenUnit; - values.liquidationThreshold -= ((_amountWithdrawn * vars.underlyingPrice) / - assetData.tokenUnit) - .percentMul(assetData.liquidationThreshold); + values.collateral -= withdrawn; + values.liquidationThreshold -= withdrawn.percentMul( + assetData.liquidationThreshold + ); + values.maxDebt -= withdrawn.percentMul(assetData.ltv); } } diff --git a/contracts/aave-v3/MorphoUtils.sol b/contracts/aave-v3/MorphoUtils.sol index 8747b8c61..5255e9857 100644 --- a/contracts/aave-v3/MorphoUtils.sol +++ b/contracts/aave-v3/MorphoUtils.sol @@ -335,12 +335,13 @@ abstract contract MorphoUtils is MorphoStorage { // Subtract withdrawn amount from liquidation threshold and collateral. if (_poolToken == vars.poolToken && _amountWithdrawn > 0) { - values.collateral -= - (_amountWithdrawn * vars.underlyingPrice) / + uint256 withdrawn = (_amountWithdrawn * vars.underlyingPrice) / assetData.tokenUnit; - values.liquidationThreshold -= ((_amountWithdrawn * vars.underlyingPrice) / - assetData.tokenUnit) - .percentMul(assetData.liquidationThreshold); + values.collateral -= withdrawn; + values.liquidationThreshold -= withdrawn.percentMul( + assetData.liquidationThreshold + ); + values.maxDebt -= withdrawn.percentMul(assetData.ltv); } } From 614815db1b5bfc7201347721a46ba393dbca69aa Mon Sep 17 00:00:00 2001 From: MerlinEgalite Date: Wed, 10 Aug 2022 14:45:15 +0200 Subject: [PATCH 37/57] =?UTF-8?q?=F0=9F=A9=B9=20(#1205)=20Fix=20LTV=200?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contracts/aave-v3/MorphoUtils.sol | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contracts/aave-v3/MorphoUtils.sol b/contracts/aave-v3/MorphoUtils.sol index 5255e9857..bf4d4a894 100644 --- a/contracts/aave-v3/MorphoUtils.sol +++ b/contracts/aave-v3/MorphoUtils.sol @@ -294,6 +294,10 @@ abstract contract MorphoUtils is MorphoStorage { ) = pool.getConfiguration(vars.underlyingAddress).getParams(); + // If a LTV has been reduced to 0 on Aave v3, the other assets of the collateral are frozen. + // In response, Morpho disables the asset as collateral and sets its liquidation threshold to 0. + if (assetData.ltv == 0) assetData.liquidationThreshold = 0; + unchecked { assetData.tokenUnit = 10**assetData.reserveDecimals; } From e43debbd3be46c1b3ac384e36265504f7d02f5bf Mon Sep 17 00:00:00 2001 From: MerlinEgalite Date: Wed, 10 Aug 2022 16:34:00 +0200 Subject: [PATCH 38/57] =?UTF-8?q?=E2=9C=A8=20(#1218)=20Add=20bonus=20guard?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contracts/aave-v2/IncentivesVault.sol | 5 +++++ contracts/aave-v3/IncentivesVault.sol | 5 +++++ contracts/compound/IncentivesVault.sol | 5 +++++ test-foundry/aave-v2/TestIncentivesVault.t.sol | 6 ++++++ test-foundry/aave-v3/TestIncentivesVault.t.sol | 6 ++++++ test-foundry/compound/TestIncentivesVault.t.sol | 6 ++++++ 6 files changed, 33 insertions(+) diff --git a/contracts/aave-v2/IncentivesVault.sol b/contracts/aave-v2/IncentivesVault.sol index 43adcd267..ae5481a3e 100644 --- a/contracts/aave-v2/IncentivesVault.sol +++ b/contracts/aave-v2/IncentivesVault.sol @@ -66,6 +66,9 @@ contract IncentivesVault is IIncentivesVault, Ownable { /// @notice Thrown when the vault is paused. error VaultIsPaused(); + /// @notice Thrown when the input is above the max basis points value (100%). + error ExceedsMaxBasisPoints(); + /// CONSTRUCTOR /// /// @notice Constructs the IncentivesVault contract. @@ -107,6 +110,8 @@ contract IncentivesVault is IIncentivesVault, Ownable { /// @notice Sets the reward bonus. /// @param _newBonus The new reward bonus. function setBonus(uint256 _newBonus) external onlyOwner { + if (_newBonus > MAX_BASIS_POINTS) revert ExceedsMaxBasisPoints(); + bonus = _newBonus; emit BonusSet(_newBonus); } diff --git a/contracts/aave-v3/IncentivesVault.sol b/contracts/aave-v3/IncentivesVault.sol index 6c89e0b0b..5a6a715ba 100644 --- a/contracts/aave-v3/IncentivesVault.sol +++ b/contracts/aave-v3/IncentivesVault.sol @@ -64,6 +64,9 @@ contract IncentivesVault is IIncentivesVault, Ownable { /// @notice Thrown when the vault is paused. error VaultIsPaused(); + /// @notice Thrown when the input is above the max basis points value (100%). + error ExceedsMaxBasisPoints(); + /// CONSTRUCTOR /// /// @notice Constructs the IncentivesVault contract. @@ -102,6 +105,8 @@ contract IncentivesVault is IIncentivesVault, Ownable { /// @notice Sets the reward bonus. /// @param _newBonus The new reward bonus. function setBonus(uint256 _newBonus) external onlyOwner { + if (_newBonus > MAX_BASIS_POINTS) revert ExceedsMaxBasisPoints(); + bonus = _newBonus; emit BonusSet(_newBonus); } diff --git a/contracts/compound/IncentivesVault.sol b/contracts/compound/IncentivesVault.sol index d0c84006d..6406d6283 100644 --- a/contracts/compound/IncentivesVault.sol +++ b/contracts/compound/IncentivesVault.sol @@ -66,6 +66,9 @@ contract IncentivesVault is IIncentivesVault, Ownable { /// @notice Thrown when the vault is paused. error VaultIsPaused(); + /// @notice Thrown when the input is above the max basis points value (100%). + error ExceedsMaxBasisPoints(); + /// CONSTRUCTOR /// /// @notice Constructs the IncentivesVault contract. @@ -107,6 +110,8 @@ contract IncentivesVault is IIncentivesVault, Ownable { /// @notice Sets the reward bonus. /// @param _newBonus The new reward bonus. function setBonus(uint256 _newBonus) external onlyOwner { + if (_newBonus > MAX_BASIS_POINTS) revert ExceedsMaxBasisPoints(); + bonus = _newBonus; emit BonusSet(_newBonus); } diff --git a/test-foundry/aave-v2/TestIncentivesVault.t.sol b/test-foundry/aave-v2/TestIncentivesVault.t.sol index 2c2f4427c..2ff645c87 100644 --- a/test-foundry/aave-v2/TestIncentivesVault.t.sol +++ b/test-foundry/aave-v2/TestIncentivesVault.t.sol @@ -47,6 +47,12 @@ contract TestIncentivesVault is Test, Config { hevm.label(morpho, "morpho"); } + function testShouldNotSetBonusAboveMaxBasisPoints() public { + uint256 moreThanMaxBasisPoints = incentivesVault.MAX_BASIS_POINTS() + 1; + hevm.expectRevert(abi.encodeWithSelector(IncentivesVault.ExceedsMaxBasisPoints.selector)); + incentivesVault.setBonus(moreThanMaxBasisPoints); + } + function testOnlyOwnerShouldSetBonus() public { uint256 bonusToSet = 1; diff --git a/test-foundry/aave-v3/TestIncentivesVault.t.sol b/test-foundry/aave-v3/TestIncentivesVault.t.sol index 81d220e0f..64572c16a 100644 --- a/test-foundry/aave-v3/TestIncentivesVault.t.sol +++ b/test-foundry/aave-v3/TestIncentivesVault.t.sol @@ -47,6 +47,12 @@ contract TestIncentivesVault is Test, Config { hevm.label(morpho, "morpho"); } + function testShouldNotSetBonusAboveMaxBasisPoints() public { + uint256 moreThanMaxBasisPoints = incentivesVault.MAX_BASIS_POINTS() + 1; + hevm.expectRevert(abi.encodeWithSelector(IncentivesVault.ExceedsMaxBasisPoints.selector)); + incentivesVault.setBonus(moreThanMaxBasisPoints); + } + function testOnlyOwnerShouldSetBonus() public { uint256 bonusToSet = 1; diff --git a/test-foundry/compound/TestIncentivesVault.t.sol b/test-foundry/compound/TestIncentivesVault.t.sol index b715e1e0a..5b4d2e9ce 100644 --- a/test-foundry/compound/TestIncentivesVault.t.sol +++ b/test-foundry/compound/TestIncentivesVault.t.sol @@ -46,6 +46,12 @@ contract TestIncentivesVault is Test, Config { hevm.label(morpho, "morpho"); } + function testShouldNotSetBonusAboveMaxBasisPoints() public { + uint256 moreThanMaxBasisPoints = incentivesVault.MAX_BASIS_POINTS() + 1; + hevm.expectRevert(abi.encodeWithSelector(IncentivesVault.ExceedsMaxBasisPoints.selector)); + incentivesVault.setBonus(moreThanMaxBasisPoints); + } + function testOnlyOwnerShouldSetBonus() public { uint256 bonusToSet = 1; From 95d2c433f763cd63aade111b718d0c5ecb4f3b09 Mon Sep 17 00:00:00 2001 From: MerlinEgalite Date: Wed, 10 Aug 2022 17:05:19 +0200 Subject: [PATCH 39/57] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20(#1215)=20Add=20miss?= =?UTF-8?q?ing=20constant=20in=20interfaces?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contracts/aave-v2/interfaces/IMorpho.sol | 3 ++- contracts/aave-v3/interfaces/IMorpho.sol | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/contracts/aave-v2/interfaces/IMorpho.sol b/contracts/aave-v2/interfaces/IMorpho.sol index c29e27309..e80955ff4 100644 --- a/contracts/aave-v2/interfaces/IMorpho.sol +++ b/contracts/aave-v2/interfaces/IMorpho.sol @@ -21,8 +21,9 @@ interface IMorpho { function MAX_BASIS_POINTS() external view returns(uint16); function DEFAULT_LIQUIDATION_CLOSE_FACTOR() external view returns(uint16); function HEALTH_FACTOR_LIQUIDATION_THRESHOLD() external view returns(uint256); - function BORROWING_MASK() external view returns(uint256); function MAX_NB_OF_MARKETS() external view returns(uint256); + function BORROWING_MASK() external view returns(bytes32); + function ONE() external view returns(bytes32); function isClaimRewardsPaused() external view returns (bool); function defaultMaxGasForMatching() external view returns (Types.MaxGasForMatching memory); diff --git a/contracts/aave-v3/interfaces/IMorpho.sol b/contracts/aave-v3/interfaces/IMorpho.sol index 28c5bf42f..a1c3aa167 100644 --- a/contracts/aave-v3/interfaces/IMorpho.sol +++ b/contracts/aave-v3/interfaces/IMorpho.sol @@ -21,8 +21,9 @@ interface IMorpho { function MAX_BASIS_POINTS() external view returns(uint16); function DEFAULT_LIQUIDATION_CLOSE_FACTOR() external view returns(uint16); function HEALTH_FACTOR_LIQUIDATION_THRESHOLD() external view returns(uint256); - function BORROWING_MASK() external view returns(uint256); function MAX_NB_OF_MARKETS() external view returns(uint256); + function BORROWING_MASK() external view returns(bytes32); + function ONE() external view returns(bytes32); function isClaimRewardsPaused() external view returns (bool); function defaultMaxGasForMatching() external view returns (Types.MaxGasForMatching memory); From 4eda16f406d42a703496ca5998d18105e541a15d Mon Sep 17 00:00:00 2001 From: MerlinEgalite Date: Wed, 10 Aug 2022 17:07:03 +0200 Subject: [PATCH 40/57] =?UTF-8?q?=F0=9F=94=A5=20(#1214)=20Remove=20unused?= =?UTF-8?q?=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../aave-v3/interfaces/IGetterIncentivesController.sol | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 contracts/aave-v3/interfaces/IGetterIncentivesController.sol diff --git a/contracts/aave-v3/interfaces/IGetterIncentivesController.sol b/contracts/aave-v3/interfaces/IGetterIncentivesController.sol deleted file mode 100644 index 93e782640..000000000 --- a/contracts/aave-v3/interfaces/IGetterIncentivesController.sol +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: GNU AGPLv3 -pragma solidity ^0.8.0; - -interface IGetterIncentivesController { - function getIncentivesController() external view returns (address); -} From 1876fd00f72b963ed56bb4eaf5526fa994874b91 Mon Sep 17 00:00:00 2001 From: MerlinEgalite Date: Wed, 10 Aug 2022 17:09:18 +0200 Subject: [PATCH 41/57] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20(#121?= =?UTF-8?q?3)=20reserveDecimals=20->=20decimals?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contracts/aave-v2/Lens.sol | 4 +- contracts/aave-v2/MorphoUtils.sol | 12 ++-- contracts/aave-v2/libraries/Types.sol | 2 +- contracts/aave-v3/Lens.sol | 4 +- contracts/aave-v3/MorphoUtils.sol | 13 ++-- contracts/aave-v3/libraries/Types.sol | 2 +- test-foundry/aave-v2/TestLens.t.sol | 86 ++++++++++++--------------- test-foundry/aave-v3/TestLens.t.sol | 83 ++++++++++++-------------- 8 files changed, 88 insertions(+), 118 deletions(-) diff --git a/contracts/aave-v2/Lens.sol b/contracts/aave-v2/Lens.sol index c4e538be9..04aa0cbd4 100644 --- a/contracts/aave-v2/Lens.sol +++ b/contracts/aave-v2/Lens.sol @@ -151,11 +151,11 @@ contract Lens { address underlyingToken = IAToken(_poolToken).UNDERLYING_ASSET_ADDRESS(); assetData.underlyingPrice = _oracle.getAssetPrice(underlyingToken); // In ETH. - (assetData.ltv, assetData.liquidationThreshold, , assetData.reserveDecimals, ) = pool + (assetData.ltv, assetData.liquidationThreshold, , assetData.decimals, ) = pool .getConfiguration(underlyingToken) .getParamsMemory(); - assetData.tokenUnit = 10**assetData.reserveDecimals; + assetData.tokenUnit = 10**assetData.decimals; assetData.debt = (_getUserBorrowBalanceInOf(_poolToken, _user) * assetData.underlyingPrice) / assetData.tokenUnit; diff --git a/contracts/aave-v2/MorphoUtils.sol b/contracts/aave-v2/MorphoUtils.sol index 699fdc5cf..b454c6def 100644 --- a/contracts/aave-v2/MorphoUtils.sol +++ b/contracts/aave-v2/MorphoUtils.sol @@ -285,16 +285,12 @@ abstract contract MorphoUtils is MorphoStorage { if (vars.poolToken != _poolToken) _updateIndexes(vars.poolToken); - ( - assetData.ltv, - assetData.liquidationThreshold, - , - assetData.reserveDecimals, - - ) = pool.getConfiguration(vars.underlyingAddress).getParamsMemory(); + (assetData.ltv, assetData.liquidationThreshold, , assetData.decimals, ) = pool + .getConfiguration(vars.underlyingAddress) + .getParamsMemory(); unchecked { - assetData.tokenUnit = 10**assetData.reserveDecimals; + assetData.tokenUnit = 10**assetData.decimals; } if (_isBorrowing(vars.userMarkets, vars.borrowMask)) { diff --git a/contracts/aave-v2/libraries/Types.sol b/contracts/aave-v2/libraries/Types.sol index 34f80bf7b..f45961bcc 100644 --- a/contracts/aave-v2/libraries/Types.sol +++ b/contracts/aave-v2/libraries/Types.sol @@ -43,7 +43,7 @@ library Types { } struct AssetLiquidityData { - uint256 reserveDecimals; // The number of decimals of the underlying token. + uint256 decimals; // The number of decimals of the underlying token. uint256 tokenUnit; // The token unit considering its decimals. uint256 liquidationThreshold; // The liquidation threshold applied on this token (in basis point). uint256 ltv; // The LTV applied on this token (in basis point). diff --git a/contracts/aave-v3/Lens.sol b/contracts/aave-v3/Lens.sol index 6dbab7ecd..dd4e0e8b1 100644 --- a/contracts/aave-v3/Lens.sol +++ b/contracts/aave-v3/Lens.sol @@ -151,11 +151,11 @@ contract Lens { address underlyingToken = morpho.market(_poolToken).underlyingToken; assetData.underlyingPrice = _oracle.getAssetPrice(underlyingToken); // In base currency in wad. - (assetData.ltv, assetData.liquidationThreshold, , assetData.reserveDecimals, , ) = pool + (assetData.ltv, assetData.liquidationThreshold, , assetData.decimals, , ) = pool .getConfiguration(underlyingToken) .getParams(); - assetData.tokenUnit = 10**assetData.reserveDecimals; + assetData.tokenUnit = 10**assetData.decimals; assetData.debt = (_getUserBorrowBalanceInOf(_poolToken, _user) * assetData.underlyingPrice) / assetData.tokenUnit; diff --git a/contracts/aave-v3/MorphoUtils.sol b/contracts/aave-v3/MorphoUtils.sol index bf4d4a894..9ec47c9fd 100644 --- a/contracts/aave-v3/MorphoUtils.sol +++ b/contracts/aave-v3/MorphoUtils.sol @@ -285,21 +285,16 @@ abstract contract MorphoUtils is MorphoStorage { if (vars.poolToken != _poolToken) _updateIndexes(vars.poolToken); - ( - assetData.ltv, - assetData.liquidationThreshold, - , - assetData.reserveDecimals, - , - - ) = pool.getConfiguration(vars.underlyingAddress).getParams(); + (assetData.ltv, assetData.liquidationThreshold, , assetData.decimals, , ) = pool + .getConfiguration(vars.underlyingAddress) + .getParams(); // If a LTV has been reduced to 0 on Aave v3, the other assets of the collateral are frozen. // In response, Morpho disables the asset as collateral and sets its liquidation threshold to 0. if (assetData.ltv == 0) assetData.liquidationThreshold = 0; unchecked { - assetData.tokenUnit = 10**assetData.reserveDecimals; + assetData.tokenUnit = 10**assetData.decimals; } if (_isBorrowing(vars.userMarkets, vars.borrowMask)) { diff --git a/contracts/aave-v3/libraries/Types.sol b/contracts/aave-v3/libraries/Types.sol index 9f799b9a8..e548c8894 100644 --- a/contracts/aave-v3/libraries/Types.sol +++ b/contracts/aave-v3/libraries/Types.sol @@ -43,7 +43,7 @@ library Types { } struct AssetLiquidityData { - uint256 reserveDecimals; // The number of decimals of the underlying token. + uint256 decimals; // The number of decimals of the underlying token. uint256 tokenUnit; // The token unit considering its decimals. uint256 liquidationThreshold; // The liquidation threshold applied on this token (in basis point). uint256 ltv; // The LTV applied on this token (in basis point). diff --git a/test-foundry/aave-v2/TestLens.t.sol b/test-foundry/aave-v2/TestLens.t.sol index 77fdb18ac..e503952d2 100644 --- a/test-foundry/aave-v2/TestLens.t.sol +++ b/test-foundry/aave-v2/TestLens.t.sol @@ -63,15 +63,15 @@ contract TestLens is TestSetup { oracle ); - (uint256 ltv, uint256 liquidationThreshold, , uint256 reserveDecimals, ) = pool + (uint256 ltv, uint256 liquidationThreshold, , uint256 decimals, ) = pool .getConfiguration(dai) .getParamsMemory(); uint256 underlyingPrice = oracle.getAssetPrice(dai); - uint256 tokenUnit = 10**reserveDecimals; + uint256 tokenUnit = 10**decimals; assertEq(assetData.liquidationThreshold, liquidationThreshold); assertEq(assetData.ltv, ltv); - assertEq(assetData.reserveDecimals, reserveDecimals); + assertEq(assetData.decimals, decimals); assertEq(assetData.underlyingPrice, underlyingPrice); assertEq(assetData.tokenUnit, tokenUnit); assertEq(assetData.collateral, 0); @@ -90,11 +90,11 @@ contract TestLens is TestSetup { oracle ); - (uint256 ltv, uint256 liquidationThreshold, , uint256 reserveDecimals, ) = pool + (uint256 ltv, uint256 liquidationThreshold, , uint256 decimals, ) = pool .getConfiguration(dai) .getParamsMemory(); uint256 underlyingPrice = oracle.getAssetPrice(dai); - uint256 tokenUnit = 10**reserveDecimals; + uint256 tokenUnit = 10**decimals; uint256 collateral = (amount * underlyingPrice) / tokenUnit; assertEq(assetData.ltv, ltv, "ltv"); @@ -119,18 +119,18 @@ contract TestLens is TestSetup { oracle ); - (uint256 ltv, uint256 liquidationThreshold, , uint256 reserveDecimals, ) = pool + (uint256 ltv, uint256 liquidationThreshold, , uint256 decimals, ) = pool .getConfiguration(dai) .getParamsMemory(); uint256 underlyingPrice = oracle.getAssetPrice(dai); - uint256 tokenUnit = 10**reserveDecimals; + uint256 tokenUnit = 10**decimals; uint256 collateral = (amount * underlyingPrice) / tokenUnit; uint256 debt = (toBorrow * underlyingPrice) / tokenUnit; assertEq(assetData.liquidationThreshold, liquidationThreshold, "liquidationThreshold"); assertEq(assetData.ltv, ltv, "ltv"); assertEq(assetData.underlyingPrice, underlyingPrice, "underlyingPrice"); - assertEq(assetData.reserveDecimals, reserveDecimals, "reserveDecimals"); + assertEq(assetData.decimals, decimals, "decimals"); assertEq(assetData.tokenUnit, tokenUnit, "tokenUnit"); assertApproxEqAbs(assetData.collateral, collateral, 2, "collateral"); assertEq(assetData.debt, debt, "debt"); @@ -157,17 +157,13 @@ contract TestLens is TestSetup { ); Types.AssetLiquidityData memory expectedDataUsdc; - uint256 reserveDecimalsUsdc; + uint256 decimalsUsdc; - ( - expectedDataUsdc.ltv, - expectedDataUsdc.liquidationThreshold, - , - reserveDecimalsUsdc, - - ) = pool.getConfiguration(usdc).getParamsMemory(); + (expectedDataUsdc.ltv, expectedDataUsdc.liquidationThreshold, , decimalsUsdc, ) = pool + .getConfiguration(usdc) + .getParamsMemory(); expectedDataUsdc.underlyingPrice = oracle.getAssetPrice(usdc); - expectedDataUsdc.tokenUnit = 10**reserveDecimalsUsdc; + expectedDataUsdc.tokenUnit = 10**decimalsUsdc; expectedDataUsdc.debt = (toBorrow * expectedDataUsdc.underlyingPrice) / expectedDataUsdc.tokenUnit; @@ -188,13 +184,13 @@ contract TestLens is TestSetup { assertEq(assetDataUsdc.debt, expectedDataUsdc.debt, "debtValueUsdc"); Types.AssetLiquidityData memory expectedDataDai; - uint256 reserveDecimalsDai; + uint256 decimalsDai; - (expectedDataDai.ltv, expectedDataDai.liquidationThreshold, , reserveDecimalsDai, ) = pool + (expectedDataDai.ltv, expectedDataDai.liquidationThreshold, , decimalsDai, ) = pool .getConfiguration(dai) .getParamsMemory(); expectedDataDai.underlyingPrice = oracle.getAssetPrice(dai); - expectedDataDai.tokenUnit = 10**reserveDecimalsDai; + expectedDataDai.tokenUnit = 10**decimalsDai; expectedDataDai.collateral = (amount * expectedDataDai.underlyingPrice) / expectedDataDai.tokenUnit; @@ -325,16 +321,16 @@ contract TestLens is TestSetup { Types.LiquidityData memory states = lens.getUserBalanceStates(address(borrower1)); // USDC data - (, , , uint256 reserveDecimalsUsdc, ) = pool.getConfiguration(usdc).getParamsMemory(); + (, , , uint256 decimalsUsdc, ) = pool.getConfiguration(usdc).getParamsMemory(); uint256 underlyingPriceUsdc = oracle.getAssetPrice(usdc); - uint256 tokenUnitUsdc = 10**reserveDecimalsUsdc; + uint256 tokenUnitUsdc = 10**decimalsUsdc; // DAI data - (uint256 ltvDai, uint256 liquidationThresholdDai, , uint256 reserveDecimalsDai, ) = pool + (uint256 ltvDai, uint256 liquidationThresholdDai, , uint256 decimalsDai, ) = pool .getConfiguration(dai) .getParamsMemory(); uint256 underlyingPriceDai = oracle.getAssetPrice(dai); - uint256 tokenUnitDai = 10**reserveDecimalsDai; + uint256 tokenUnitDai = 10**decimalsDai; expectedStates.collateral = (amount * underlyingPriceDai) / tokenUnitDai; expectedStates.debt = (toBorrow * underlyingPriceUsdc) / tokenUnitUsdc; @@ -376,11 +372,11 @@ contract TestLens is TestSetup { Types.LiquidityData memory states = lens.getUserBalanceStates(address(borrower1)); // USDC data - (uint256 ltv, uint256 liquidationThreshold, , uint256 reserveDecimals, ) = pool + (uint256 ltv, uint256 liquidationThreshold, , uint256 decimals, ) = pool .getConfiguration(usdc) .getParamsMemory(); uint256 collateralValueToAdd = (to6Decimals(amount) * oracle.getAssetPrice(usdc)) / - 10**reserveDecimals; + 10**decimals; expectedStates.collateral += collateralValueToAdd; expectedStates.liquidationThreshold += collateralValueToAdd.percentMul( liquidationThreshold @@ -388,10 +384,8 @@ contract TestLens is TestSetup { expectedStates.maxDebt += collateralValueToAdd.percentMul(ltv); // DAI data - (ltv, liquidationThreshold, , reserveDecimals, ) = pool - .getConfiguration(dai) - .getParamsMemory(); - collateralValueToAdd = (amount * oracle.getAssetPrice(dai)) / 10**reserveDecimals; + (ltv, liquidationThreshold, , decimals, ) = pool.getConfiguration(dai).getParamsMemory(); + collateralValueToAdd = (amount * oracle.getAssetPrice(dai)) / 10**decimals; expectedStates.collateral += collateralValueToAdd; expectedStates.liquidationThreshold += collateralValueToAdd.percentMul( liquidationThreshold @@ -399,14 +393,12 @@ contract TestLens is TestSetup { expectedStates.maxDebt += collateralValueToAdd.percentMul(ltv); // WBTC data - (, , , reserveDecimals, ) = pool.getConfiguration(wbtc).getParamsMemory(); - expectedStates.debt += (toBorrowWbtc * oracle.getAssetPrice(wbtc)) / 10**reserveDecimals; + (, , , decimals, ) = pool.getConfiguration(wbtc).getParamsMemory(); + expectedStates.debt += (toBorrowWbtc * oracle.getAssetPrice(wbtc)) / 10**decimals; // USDT data - (, , , reserveDecimals, ) = pool.getConfiguration(usdt).getParamsMemory(); - expectedStates.debt += - (to6Decimals(toBorrow) * oracle.getAssetPrice(usdt)) / - 10**reserveDecimals; + (, , , decimals, ) = pool.getConfiguration(usdt).getParamsMemory(); + expectedStates.debt += (to6Decimals(toBorrow) * oracle.getAssetPrice(usdt)) / 10**decimals; uint256 healthFactor = states.liquidationThreshold.wadDiv(states.debt); uint256 expectedHealthFactor = expectedStates.liquidationThreshold.wadDiv( @@ -463,7 +455,7 @@ contract TestLens is TestSetup { borrower1.borrow(aUsdc, toBorrow); borrower1.borrow(aUsdt, toBorrow); - uint256 reserveDecimals; + uint256 decimals; uint256 ltv; uint256 liquidationThreshold; @@ -471,31 +463,27 @@ contract TestLens is TestSetup { Types.LiquidityData memory states = lens.getUserBalanceStates(address(borrower1)); // USDT data - (ltv, liquidationThreshold, , reserveDecimals, ) = pool - .getConfiguration(usdt) - .getParamsMemory(); + (ltv, liquidationThreshold, , decimals, ) = pool.getConfiguration(usdt).getParamsMemory(); uint256 collateralValueUsdt = (to6Decimals(amount) * oracle.getAssetPrice(usdt)) / - 10**reserveDecimals; + 10**decimals; expectedStates.collateral += collateralValueUsdt; expectedStates.liquidationThreshold += collateralValueUsdt.percentMul(liquidationThreshold); expectedStates.maxDebt += collateralValueUsdt.percentMul(ltv); // DAI data - (ltv, liquidationThreshold, , reserveDecimals, ) = pool - .getConfiguration(dai) - .getParamsMemory(); - uint256 collateralValueDai = (amount * oracle.getAssetPrice(dai)) / 10**reserveDecimals; + (ltv, liquidationThreshold, , decimals, ) = pool.getConfiguration(dai).getParamsMemory(); + uint256 collateralValueDai = (amount * oracle.getAssetPrice(dai)) / 10**decimals; expectedStates.collateral += collateralValueDai; expectedStates.liquidationThreshold += collateralValueDai.percentMul(liquidationThreshold); expectedStates.maxDebt += collateralValueDai.percentMul(ltv); // USDC data - (, , , reserveDecimals, ) = pool.getConfiguration(usdc).getParamsMemory(); - expectedStates.debt += (toBorrow * oracle.getAssetPrice(usdc)) / 10**reserveDecimals; + (, , , decimals, ) = pool.getConfiguration(usdc).getParamsMemory(); + expectedStates.debt += (toBorrow * oracle.getAssetPrice(usdc)) / 10**decimals; // USDT data - (, , , reserveDecimals, ) = pool.getConfiguration(usdt).getParamsMemory(); - expectedStates.debt += (toBorrow * oracle.getAssetPrice(usdt)) / 10**reserveDecimals; + (, , , decimals, ) = pool.getConfiguration(usdt).getParamsMemory(); + expectedStates.debt += (toBorrow * oracle.getAssetPrice(usdt)) / 10**decimals; uint256 healthFactor = states.liquidationThreshold.wadDiv(states.debt); uint256 expectedHealthFactor = expectedStates.liquidationThreshold.wadDiv( diff --git a/test-foundry/aave-v3/TestLens.t.sol b/test-foundry/aave-v3/TestLens.t.sol index 7ccc9410b..9a785009e 100644 --- a/test-foundry/aave-v3/TestLens.t.sol +++ b/test-foundry/aave-v3/TestLens.t.sol @@ -43,15 +43,15 @@ contract TestLens is TestSetup { oracle ); - (uint256 ltv, uint256 liquidationThreshold, , uint256 reserveDecimals, , ) = pool + (uint256 ltv, uint256 liquidationThreshold, , uint256 decimals, , ) = pool .getConfiguration(dai) .getParams(); uint256 underlyingPrice = oracle.getAssetPrice(dai); - uint256 tokenUnit = 10**reserveDecimals; + uint256 tokenUnit = 10**decimals; assertEq(assetData.liquidationThreshold, liquidationThreshold); assertEq(assetData.ltv, ltv); - assertEq(assetData.reserveDecimals, reserveDecimals); + assertEq(assetData.decimals, decimals); assertEq(assetData.underlyingPrice, underlyingPrice); assertEq(assetData.tokenUnit, tokenUnit); assertEq(assetData.collateral, 0); @@ -70,11 +70,11 @@ contract TestLens is TestSetup { oracle ); - (uint256 ltv, uint256 liquidationThreshold, , uint256 reserveDecimals, , ) = pool + (uint256 ltv, uint256 liquidationThreshold, , uint256 decimals, , ) = pool .getConfiguration(dai) .getParams(); uint256 underlyingPrice = oracle.getAssetPrice(dai); - uint256 tokenUnit = 10**reserveDecimals; + uint256 tokenUnit = 10**decimals; uint256 collateral = (amount * underlyingPrice) / tokenUnit; assertEq(assetData.ltv, ltv, "ltv"); @@ -99,18 +99,18 @@ contract TestLens is TestSetup { oracle ); - (uint256 ltv, uint256 liquidationThreshold, , uint256 reserveDecimals, , ) = pool + (uint256 ltv, uint256 liquidationThreshold, , uint256 decimals, , ) = pool .getConfiguration(dai) .getParams(); uint256 underlyingPrice = oracle.getAssetPrice(dai); - uint256 tokenUnit = 10**reserveDecimals; + uint256 tokenUnit = 10**decimals; uint256 collateral = (amount * underlyingPrice) / tokenUnit; uint256 debt = (toBorrow * underlyingPrice) / tokenUnit; assertEq(assetData.liquidationThreshold, liquidationThreshold, "liquidationThreshold"); assertEq(assetData.ltv, ltv, "ltv"); assertEq(assetData.underlyingPrice, underlyingPrice, "underlyingPrice"); - assertEq(assetData.reserveDecimals, reserveDecimals, "reserveDecimals"); + assertEq(assetData.decimals, decimals, "decimals"); assertEq(assetData.tokenUnit, tokenUnit, "tokenUnit"); assertApproxEqAbs(assetData.collateral, collateral, 2, "collateral"); assertEq(assetData.debt, debt, "debt"); @@ -137,18 +137,13 @@ contract TestLens is TestSetup { ); Types.AssetLiquidityData memory expectedDataUsdc; - uint256 reserveDecimalsUsdc; + uint256 decimalsUsdc; - ( - expectedDataUsdc.ltv, - expectedDataUsdc.liquidationThreshold, - , - reserveDecimalsUsdc, - , - - ) = pool.getConfiguration(usdc).getParams(); + (expectedDataUsdc.ltv, expectedDataUsdc.liquidationThreshold, , decimalsUsdc, , ) = pool + .getConfiguration(usdc) + .getParams(); expectedDataUsdc.underlyingPrice = oracle.getAssetPrice(usdc); - expectedDataUsdc.tokenUnit = 10**reserveDecimalsUsdc; + expectedDataUsdc.tokenUnit = 10**decimalsUsdc; expectedDataUsdc.debt = (toBorrow * expectedDataUsdc.underlyingPrice) / expectedDataUsdc.tokenUnit; @@ -169,13 +164,13 @@ contract TestLens is TestSetup { assertEq(assetDataUsdc.debt, expectedDataUsdc.debt, "debtValueUsdc"); Types.AssetLiquidityData memory expectedDataDai; - uint256 reserveDecimalsDai; + uint256 decimalsDai; - (expectedDataDai.ltv, expectedDataDai.liquidationThreshold, , reserveDecimalsDai, , ) = pool + (expectedDataDai.ltv, expectedDataDai.liquidationThreshold, , decimalsDai, , ) = pool .getConfiguration(dai) .getParams(); expectedDataDai.underlyingPrice = oracle.getAssetPrice(dai); - expectedDataDai.tokenUnit = 10**reserveDecimalsDai; + expectedDataDai.tokenUnit = 10**decimalsDai; expectedDataDai.collateral = (amount * expectedDataDai.underlyingPrice) / expectedDataDai.tokenUnit; @@ -306,16 +301,16 @@ contract TestLens is TestSetup { Types.LiquidityData memory states = lens.getUserBalanceStates(address(borrower1)); // USDC data - (, , , uint256 reserveDecimalsUsdc, , ) = pool.getConfiguration(usdc).getParams(); + (, , , uint256 decimalsUsdc, , ) = pool.getConfiguration(usdc).getParams(); uint256 underlyingPriceUsdc = oracle.getAssetPrice(usdc); - uint256 tokenUnitUsdc = 10**reserveDecimalsUsdc; + uint256 tokenUnitUsdc = 10**decimalsUsdc; // DAI data - (uint256 ltvDai, uint256 liquidationThresholdDai, , uint256 reserveDecimalsDai, , ) = pool + (uint256 ltvDai, uint256 liquidationThresholdDai, , uint256 decimalsDai, , ) = pool .getConfiguration(dai) .getParams(); uint256 underlyingPriceDai = oracle.getAssetPrice(dai); - uint256 tokenUnitDai = 10**reserveDecimalsDai; + uint256 tokenUnitDai = 10**decimalsDai; expectedStates.collateral = (amount * underlyingPriceDai) / tokenUnitDai; expectedStates.debt = (toBorrow * underlyingPriceUsdc) / tokenUnitUsdc; @@ -357,11 +352,11 @@ contract TestLens is TestSetup { Types.LiquidityData memory states = lens.getUserBalanceStates(address(borrower1)); // USDC data - (uint256 ltv, uint256 liquidationThreshold, , uint256 reserveDecimals, , ) = pool + (uint256 ltv, uint256 liquidationThreshold, , uint256 decimals, , ) = pool .getConfiguration(usdc) .getParams(); uint256 collateralValueToAdd = (to6Decimals(amount) * oracle.getAssetPrice(usdc)) / - 10**reserveDecimals; + 10**decimals; expectedStates.collateral += collateralValueToAdd; expectedStates.liquidationThreshold += collateralValueToAdd.percentMul( liquidationThreshold @@ -369,8 +364,8 @@ contract TestLens is TestSetup { expectedStates.maxDebt += collateralValueToAdd.percentMul(ltv); // DAI data - (ltv, liquidationThreshold, , reserveDecimals, , ) = pool.getConfiguration(dai).getParams(); - collateralValueToAdd = (amount * oracle.getAssetPrice(dai)) / 10**reserveDecimals; + (ltv, liquidationThreshold, , decimals, , ) = pool.getConfiguration(dai).getParams(); + collateralValueToAdd = (amount * oracle.getAssetPrice(dai)) / 10**decimals; expectedStates.collateral += collateralValueToAdd; expectedStates.liquidationThreshold += collateralValueToAdd.percentMul( liquidationThreshold @@ -378,14 +373,12 @@ contract TestLens is TestSetup { expectedStates.maxDebt += collateralValueToAdd.percentMul(ltv); // WBTC data - (, , , reserveDecimals, , ) = pool.getConfiguration(wbtc).getParams(); - expectedStates.debt += (toBorrowWbtc * oracle.getAssetPrice(wbtc)) / 10**reserveDecimals; + (, , , decimals, , ) = pool.getConfiguration(wbtc).getParams(); + expectedStates.debt += (toBorrowWbtc * oracle.getAssetPrice(wbtc)) / 10**decimals; // USDT data - (, , , reserveDecimals, , ) = pool.getConfiguration(usdt).getParams(); - expectedStates.debt += - (to6Decimals(toBorrow) * oracle.getAssetPrice(usdt)) / - 10**reserveDecimals; + (, , , decimals, , ) = pool.getConfiguration(usdt).getParams(); + expectedStates.debt += (to6Decimals(toBorrow) * oracle.getAssetPrice(usdt)) / 10**decimals; uint256 healthFactor = states.liquidationThreshold.wadDiv(states.debt); uint256 expectedHealthFactor = expectedStates.liquidationThreshold.wadDiv( @@ -420,7 +413,7 @@ contract TestLens is TestSetup { borrower1.borrow(aUsdt, toBorrow); borrower1.borrow(aUsdc, toBorrow); - uint256 reserveDecimals; + uint256 decimals; uint256 ltv; uint256 liquidationThreshold; @@ -428,29 +421,27 @@ contract TestLens is TestSetup { Types.LiquidityData memory states = lens.getUserBalanceStates(address(borrower1)); // USDT data - (ltv, liquidationThreshold, , reserveDecimals, , ) = pool - .getConfiguration(usdt) - .getParams(); + (ltv, liquidationThreshold, , decimals, , ) = pool.getConfiguration(usdt).getParams(); uint256 collateralValueUsdt = (to6Decimals(amount) * oracle.getAssetPrice(usdt)) / - 10**reserveDecimals; + 10**decimals; expectedStates.collateral += collateralValueUsdt; expectedStates.liquidationThreshold += collateralValueUsdt.percentMul(liquidationThreshold); expectedStates.maxDebt += collateralValueUsdt.percentMul(ltv); // DAI data - (ltv, liquidationThreshold, , reserveDecimals, , ) = pool.getConfiguration(dai).getParams(); - uint256 collateralValueDai = (amount * oracle.getAssetPrice(dai)) / 10**reserveDecimals; + (ltv, liquidationThreshold, , decimals, , ) = pool.getConfiguration(dai).getParams(); + uint256 collateralValueDai = (amount * oracle.getAssetPrice(dai)) / 10**decimals; expectedStates.collateral += collateralValueDai; expectedStates.liquidationThreshold += collateralValueDai.percentMul(liquidationThreshold); expectedStates.maxDebt += collateralValueDai.percentMul(ltv); // USDC data - (, , , reserveDecimals, , ) = pool.getConfiguration(usdc).getParams(); - expectedStates.debt += (toBorrow * oracle.getAssetPrice(usdc)) / 10**reserveDecimals; + (, , , decimals, , ) = pool.getConfiguration(usdc).getParams(); + expectedStates.debt += (toBorrow * oracle.getAssetPrice(usdc)) / 10**decimals; // USDT data - (, , , reserveDecimals, , ) = pool.getConfiguration(usdt).getParams(); - expectedStates.debt += (toBorrow * oracle.getAssetPrice(usdt)) / 10**reserveDecimals; + (, , , decimals, , ) = pool.getConfiguration(usdt).getParams(); + expectedStates.debt += (toBorrow * oracle.getAssetPrice(usdt)) / 10**decimals; uint256 healthFactor = states.liquidationThreshold.wadDiv(states.debt); uint256 expectedHealthFactor = expectedStates.liquidationThreshold.wadDiv( From e93a1fd3349198e4942fbfe4e371ae6cc6fd4a44 Mon Sep 17 00:00:00 2001 From: MerlinEgalite Date: Wed, 10 Aug 2022 17:23:25 +0200 Subject: [PATCH 42/57] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20(#121?= =?UTF-8?q?3)=20underlyingAddress=20->=20underlyingToken?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contracts/aave-v2/MorphoUtils.sol | 6 +++--- contracts/aave-v2/libraries/Types.sol | 2 +- contracts/aave-v3/MorphoUtils.sol | 6 +++--- contracts/aave-v3/libraries/Types.sol | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/contracts/aave-v2/MorphoUtils.sol b/contracts/aave-v2/MorphoUtils.sol index b454c6def..596b04d97 100644 --- a/contracts/aave-v2/MorphoUtils.sol +++ b/contracts/aave-v2/MorphoUtils.sol @@ -280,13 +280,13 @@ abstract contract MorphoUtils is MorphoStorage { vars.borrowMask = borrowMask[vars.poolToken]; if (_isSupplyingOrBorrowing(vars.userMarkets, vars.borrowMask)) { - vars.underlyingAddress = market[vars.poolToken].underlyingToken; - vars.underlyingPrice = oracle.getAssetPrice(vars.underlyingAddress); + vars.underlyingToken = market[vars.poolToken].underlyingToken; + vars.underlyingPrice = oracle.getAssetPrice(vars.underlyingToken); if (vars.poolToken != _poolToken) _updateIndexes(vars.poolToken); (assetData.ltv, assetData.liquidationThreshold, , assetData.decimals, ) = pool - .getConfiguration(vars.underlyingAddress) + .getConfiguration(vars.underlyingToken) .getParamsMemory(); unchecked { diff --git a/contracts/aave-v2/libraries/Types.sol b/contracts/aave-v2/libraries/Types.sol index f45961bcc..b8194a49a 100644 --- a/contracts/aave-v2/libraries/Types.sol +++ b/contracts/aave-v2/libraries/Types.sol @@ -81,7 +81,7 @@ library Types { uint256 poolTokensLength; bytes32 userMarkets; bytes32 borrowMask; - address underlyingAddress; + address underlyingToken; uint256 underlyingPrice; } } diff --git a/contracts/aave-v3/MorphoUtils.sol b/contracts/aave-v3/MorphoUtils.sol index 9ec47c9fd..ce8368791 100644 --- a/contracts/aave-v3/MorphoUtils.sol +++ b/contracts/aave-v3/MorphoUtils.sol @@ -280,13 +280,13 @@ abstract contract MorphoUtils is MorphoStorage { vars.borrowMask = borrowMask[vars.poolToken]; if (_isSupplyingOrBorrowing(vars.userMarkets, vars.borrowMask)) { - vars.underlyingAddress = market[vars.poolToken].underlyingToken; - vars.underlyingPrice = oracle.getAssetPrice(vars.underlyingAddress); + vars.underlyingToken = market[vars.poolToken].underlyingToken; + vars.underlyingPrice = oracle.getAssetPrice(vars.underlyingToken); if (vars.poolToken != _poolToken) _updateIndexes(vars.poolToken); (assetData.ltv, assetData.liquidationThreshold, , assetData.decimals, , ) = pool - .getConfiguration(vars.underlyingAddress) + .getConfiguration(vars.underlyingToken) .getParams(); // If a LTV has been reduced to 0 on Aave v3, the other assets of the collateral are frozen. diff --git a/contracts/aave-v3/libraries/Types.sol b/contracts/aave-v3/libraries/Types.sol index e548c8894..62f98ce80 100644 --- a/contracts/aave-v3/libraries/Types.sol +++ b/contracts/aave-v3/libraries/Types.sol @@ -81,7 +81,7 @@ library Types { uint256 poolTokensLength; bytes32 userMarkets; bytes32 borrowMask; - address underlyingAddress; + address underlyingToken; uint256 underlyingPrice; } } From 98682bcd31970ff68d19af73a8f082aaf90e7719 Mon Sep 17 00:00:00 2001 From: MerlinEgalite Date: Wed, 10 Aug 2022 17:24:36 +0200 Subject: [PATCH 43/57] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20(#121?= =?UTF-8?q?3)=20firstTerm=20->=20totalEmitted?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contracts/aave-v3/RewardsManager.sol | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contracts/aave-v3/RewardsManager.sol b/contracts/aave-v3/RewardsManager.sol index b17565c36..291533411 100644 --- a/contracts/aave-v3/RewardsManager.sol +++ b/contracts/aave-v3/RewardsManager.sol @@ -498,13 +498,13 @@ contract RewardsManager is IRewardsManager, OwnableUpgradeable { currentTimestamp = currentTimestamp > distributionEnd ? distributionEnd : currentTimestamp; - uint256 firstTerm = emissionPerSecond * + uint256 totalEmitted = emissionPerSecond * (currentTimestamp - lastUpdateTimestamp) * _assetUnit; assembly { - firstTerm := div(firstTerm, _totalSupply) + totalEmitted := div(totalEmitted, _totalSupply) } - return (_localRewardData.index, (firstTerm + rewardIndex)); + return (_localRewardData.index, (totalEmitted + rewardIndex)); } } From 142442d1e7c12a0c43ab396f9649db5cfdc42b69 Mon Sep 17 00:00:00 2001 From: MerlinEgalite Date: Wed, 10 Aug 2022 17:35:18 +0200 Subject: [PATCH 44/57] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20(#121?= =?UTF-8?q?7)=20Remove=20useless=20var=20logged?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contracts/aave-v3/RewardsManager.sol | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/contracts/aave-v3/RewardsManager.sol b/contracts/aave-v3/RewardsManager.sol index 291533411..51279ddcf 100644 --- a/contracts/aave-v3/RewardsManager.sol +++ b/contracts/aave-v3/RewardsManager.sol @@ -46,15 +46,13 @@ contract RewardsManager is IRewardsManager, OwnableUpgradeable { /// @param _asset The address of the incentivized asset. /// @param _reward The address of the reward token. /// @param _user The address of the user that rewards are accrued on behalf of. - /// @param _assetIndex The index of the asset distribution. - /// @param _userIndex The index of the asset distribution on behalf of the user. + /// @param _assetIndex The index of the distributed asset (same as the user's index for this asset when the event is logged). /// @param _rewardsAccrued The amount of rewards accrued. event Accrued( address indexed _asset, address indexed _reward, address indexed _user, uint256 _assetIndex, - uint256 _userIndex, uint256 _rewardsAccrued ); @@ -348,14 +346,7 @@ contract RewardsManager is IRewardsManager, OwnableUpgradeable { ); if (rewardDataUpdated || userDataUpdated) - emit Accrued( - _asset, - reward, - _user, - newAssetIndex, - newAssetIndex, - rewardsAccrued - ); + emit Accrued(_asset, reward, _user, newAssetIndex, rewardsAccrued); } } } From 071c6846bca711aade3635630cd0c9f9b0f36113 Mon Sep 17 00:00:00 2001 From: Merlin <44097430+MerlinEgalite@users.noreply.github.com> Date: Thu, 11 Aug 2022 15:52:31 +0100 Subject: [PATCH 45/57] =?UTF-8?q?=F0=9F=93=9D=20(#1213)=20Improve=20commen?= =?UTF-8?q?ts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Quentin Garchery Signed-off-by: Merlin <44097430+MerlinEgalite@users.noreply.github.com> --- contracts/aave-v3/RewardsManager.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/aave-v3/RewardsManager.sol b/contracts/aave-v3/RewardsManager.sol index 51279ddcf..bb9096e7c 100644 --- a/contracts/aave-v3/RewardsManager.sol +++ b/contracts/aave-v3/RewardsManager.sol @@ -46,7 +46,7 @@ contract RewardsManager is IRewardsManager, OwnableUpgradeable { /// @param _asset The address of the incentivized asset. /// @param _reward The address of the reward token. /// @param _user The address of the user that rewards are accrued on behalf of. - /// @param _assetIndex The index of the distributed asset (same as the user's index for this asset when the event is logged). + /// @param _assetIndex The reward index for the asset (same as the user's index for this asset when the event is logged). /// @param _rewardsAccrued The amount of rewards accrued. event Accrued( address indexed _asset, From c6313bb0875f33ca94570a0c57f63e615682552a Mon Sep 17 00:00:00 2001 From: MerlinEgalite Date: Wed, 10 Aug 2022 17:45:39 +0200 Subject: [PATCH 46/57] =?UTF-8?q?=F0=9F=93=9D=20(#1208)=20Clarify=20doc=20?= =?UTF-8?q?for=20getNext?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contracts/aave-v2/MorphoUtils.sol | 2 ++ contracts/aave-v3/MorphoUtils.sol | 2 ++ 2 files changed, 4 insertions(+) diff --git a/contracts/aave-v2/MorphoUtils.sol b/contracts/aave-v2/MorphoUtils.sol index 596b04d97..81ea8f1e6 100644 --- a/contracts/aave-v2/MorphoUtils.sol +++ b/contracts/aave-v2/MorphoUtils.sol @@ -87,6 +87,8 @@ abstract contract MorphoUtils is MorphoStorage { } /// @notice Gets the next user after `_user` in the data structure on a specific market (for UI). + /// @dev Beware that this function does not give the next account susceptible to get matched, + /// nor the next account with highest liquidity. Use it only to go through every account. /// @param _poolToken The address of the market from which to get the user. /// @param _positionType The type of user from which to get the next user. /// @param _user The address of the user from which to get the next user. diff --git a/contracts/aave-v3/MorphoUtils.sol b/contracts/aave-v3/MorphoUtils.sol index ce8368791..aeb5b4fd9 100644 --- a/contracts/aave-v3/MorphoUtils.sol +++ b/contracts/aave-v3/MorphoUtils.sol @@ -87,6 +87,8 @@ abstract contract MorphoUtils is MorphoStorage { } /// @notice Gets the next user after `_user` in the data structure on a specific market (for UI). + /// @dev Beware that this function does not give the next account susceptible to get matched, + /// nor the next account with highest liquidity. Use it only to go through every account. /// @param _poolToken The address of the market from which to get the user. /// @param _positionType The type of user from which to get the next user. /// @param _user The address of the user from which to get the next user. From e8a3962ac0305ba066e4d7e42a09e7e9a7ec6fc8 Mon Sep 17 00:00:00 2001 From: MerlinEgalite Date: Wed, 10 Aug 2022 17:55:15 +0200 Subject: [PATCH 47/57] =?UTF-8?q?=F0=9F=93=9D=20(#1210)=20Comments=20impro?= =?UTF-8?q?vements?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contracts/aave-v2/libraries/Types.sol | 4 ++-- contracts/aave-v3/RewardsManager.sol | 4 ++-- contracts/aave-v3/libraries/Types.sol | 4 ++-- contracts/compound/libraries/Types.sol | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/contracts/aave-v2/libraries/Types.sol b/contracts/aave-v2/libraries/Types.sol index b8194a49a..2d8acf702 100644 --- a/contracts/aave-v2/libraries/Types.sol +++ b/contracts/aave-v2/libraries/Types.sol @@ -61,14 +61,14 @@ library Types { // Variables are packed together to save gas (will not exceed their limit during Morpho's lifetime). struct PoolIndexes { - uint32 lastUpdateTimestamp; // The last time the peer-to-peer indexes were updated. + uint32 lastUpdateTimestamp; // The last time the (pool and peer-to-peer) indexes were updated. uint112 poolSupplyIndex; // Last pool supply index. uint112 poolBorrowIndex; // Last pool borrow index. } struct Market { address underlyingToken; // The underlying address of the market. - uint16 reserveFactor; // Proportion of the interest earned by users sent to the DAO for each market, in basis point (100% = 10 000). The default value is 0. + uint16 reserveFactor; // Proportion of the additional interest earned compared to the pool while using Morpho. It is sent to the DAO for each market, in basis point (100% = 10 000). The default value is 0. uint16 p2pIndexCursor; // Position of the peer-to-peer rate in the pool's spread. Determine the weights of the weighted arithmetic average in the indexes computations ((1 - p2pIndexCursor) * r^S + p2pIndexCursor * r^B) (in basis point). bool isCreated; // Whether or not this market is created. bool isPaused; // Whether the market is paused or not (all entry points on Morpho are frozen; supply, borrow, withdraw, repay and liquidate). diff --git a/contracts/aave-v3/RewardsManager.sol b/contracts/aave-v3/RewardsManager.sol index bb9096e7c..6d09b995d 100644 --- a/contracts/aave-v3/RewardsManager.sol +++ b/contracts/aave-v3/RewardsManager.sol @@ -23,8 +23,8 @@ contract RewardsManager is IRewardsManager, OwnableUpgradeable { } struct UserData { - uint128 index; // The user's index for a specific (asset, reward) couple. - uint128 accrued; // The user's accrued rewards for a specific (asset, reward) couple in (in reward token decimals). + uint128 index; // The user's index for a specific (asset, reward) pair. + uint128 accrued; // The user's accrued rewards for a specific (asset, reward) pair (in reward token decimals). } struct RewardData { diff --git a/contracts/aave-v3/libraries/Types.sol b/contracts/aave-v3/libraries/Types.sol index 62f98ce80..bd0ce9cd7 100644 --- a/contracts/aave-v3/libraries/Types.sol +++ b/contracts/aave-v3/libraries/Types.sol @@ -61,14 +61,14 @@ library Types { // Variables are packed together to save gas (will not exceed their limit during Morpho's lifetime). struct PoolIndexes { - uint32 lastUpdateTimestamp; // The last time the peer-to-peer indexes were updated. + uint32 lastUpdateTimestamp; // The last time the (pool and peer-to-peer) indexes were updated. uint112 poolSupplyIndex; // Last pool supply index (in ray). uint112 poolBorrowIndex; // Last pool borrow index (in ray). } struct Market { address underlyingToken; // The underlying address of the market. - uint16 reserveFactor; // Proportion of the interest earned by users sent to the DAO for each market, in basis point (100% = 10 000). The default value is 0. + uint16 reserveFactor; // Proportion of the additional interest earned compared to the pool while using Morpho. It is sent to the DAO for each market, in basis point (100% = 10 000). The default value is 0. uint16 p2pIndexCursor; // Position of the peer-to-peer rate in the pool's spread. Determine the weights of the weighted arithmetic average in the indexes computations ((1 - p2pIndexCursor) * r^S + p2pIndexCursor * r^B) (in basis point). bool isCreated; // Whether or not this market is created. bool isPaused; // Whether the market is paused or not (all entry points on Morpho are frozen; supply, borrow, withdraw, repay and liquidate). diff --git a/contracts/compound/libraries/Types.sol b/contracts/compound/libraries/Types.sol index 2929acde4..efabf8d36 100644 --- a/contracts/compound/libraries/Types.sol +++ b/contracts/compound/libraries/Types.sol @@ -58,7 +58,7 @@ library Types { // Variables are packed together to save gas (will not exceed their limit during Morpho's lifetime). struct LastPoolIndexes { - uint32 lastUpdateBlockNumber; // The last time the peer-to-peer indexes were updated. + uint32 lastUpdateBlockNumber; // The last time the (pool and peer-to-peer) indexes were updated.. uint112 lastSupplyPoolIndex; // Last pool supply index. uint112 lastBorrowPoolIndex; // Last pool borrow index. } From ac3eb30a6778e93cea88b3a171a7fb1d39b94cb3 Mon Sep 17 00:00:00 2001 From: MerlinEgalite Date: Wed, 10 Aug 2022 22:02:45 +0200 Subject: [PATCH 48/57] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20(#1212)=20Remove=20m?= =?UTF-8?q?isleading=20comments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contracts/aave-v2/libraries/Types.sol | 8 ++++---- contracts/aave-v3/libraries/Types.sol | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/contracts/aave-v2/libraries/Types.sol b/contracts/aave-v2/libraries/Types.sol index 2d8acf702..e19356b9a 100644 --- a/contracts/aave-v2/libraries/Types.sol +++ b/contracts/aave-v2/libraries/Types.sol @@ -36,10 +36,10 @@ library Types { } struct Delta { - uint256 p2pSupplyDelta; // Difference between the stored peer-to-peer supply amount and the real peer-to-peer supply amount (in aToken). (in underlying decimals) - uint256 p2pBorrowDelta; // Difference between the stored peer-to-peer borrow amount and the real peer-to-peer borrow amount (in adUnit). (in underlying decimals) - uint256 p2pSupplyAmount; // Sum of all stored peer-to-peer supply (in peer-to-peer unit). (in underlying decimals) - uint256 p2pBorrowAmount; // Sum of all stored peer-to-peer borrow (in peer-to-peer unit). (in underlying decimals) + uint256 p2pSupplyDelta; // Difference between the stored peer-to-peer supply amount and the real peer-to-peer supply amount (in aToken). + uint256 p2pBorrowDelta; // Difference between the stored peer-to-peer borrow amount and the real peer-to-peer borrow amount (in adUnit). + uint256 p2pSupplyAmount; // Sum of all stored peer-to-peer supply (in peer-to-peer unit). + uint256 p2pBorrowAmount; // Sum of all stored peer-to-peer borrow (in peer-to-peer unit). } struct AssetLiquidityData { diff --git a/contracts/aave-v3/libraries/Types.sol b/contracts/aave-v3/libraries/Types.sol index bd0ce9cd7..543120387 100644 --- a/contracts/aave-v3/libraries/Types.sol +++ b/contracts/aave-v3/libraries/Types.sol @@ -36,10 +36,10 @@ library Types { } struct Delta { - uint256 p2pSupplyDelta; // Difference between the stored peer-to-peer supply amount and the real peer-to-peer supply amount (in aToken). (in underlying decimals) - uint256 p2pBorrowDelta; // Difference between the stored peer-to-peer borrow amount and the real peer-to-peer borrow amount (in adUnit). (in underlying decimals) - uint256 p2pSupplyAmount; // Sum of all stored peer-to-peer supply (in peer-to-peer unit). (in underlying decimals) - uint256 p2pBorrowAmount; // Sum of all stored peer-to-peer borrow (in peer-to-peer unit). (in underlying decimals) + uint256 p2pSupplyDelta; // Difference between the stored peer-to-peer supply amount and the real peer-to-peer supply amount (in aToken). + uint256 p2pBorrowDelta; // Difference between the stored peer-to-peer borrow amount and the real peer-to-peer borrow amount (in adUnit). + uint256 p2pSupplyAmount; // Sum of all stored peer-to-peer supply (in peer-to-peer unit). + uint256 p2pBorrowAmount; // Sum of all stored peer-to-peer borrow (in peer-to-peer unit). } struct AssetLiquidityData { From 49700be8f9d0c6c5bb7ea799eea9295e1bf6aa80 Mon Sep 17 00:00:00 2001 From: MerlinEgalite Date: Wed, 10 Aug 2022 22:25:23 +0200 Subject: [PATCH 49/57] =?UTF-8?q?=F0=9F=8E=A8=20(#1206)=20Remove=20useless?= =?UTF-8?q?=20else?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contracts/aave-v3/RewardsManager.sol | 47 +++++++++++++--------------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/contracts/aave-v3/RewardsManager.sol b/contracts/aave-v3/RewardsManager.sol index 6d09b995d..59c34c8b3 100644 --- a/contracts/aave-v3/RewardsManager.sol +++ b/contracts/aave-v3/RewardsManager.sol @@ -471,32 +471,29 @@ contract RewardsManager is IRewardsManager, OwnableUpgradeable { if (currentTimestamp == _localRewardData.lastUpdateTimestamp) return (_localRewardData.index, _localRewardData.index); - else { - ( - uint256 rewardIndex, - uint256 emissionPerSecond, - uint256 lastUpdateTimestamp, - uint256 distributionEnd - ) = morpho.rewardsController().getRewardsData(_asset, _reward); - - if ( - emissionPerSecond == 0 || - _totalSupply == 0 || - lastUpdateTimestamp == currentTimestamp || - lastUpdateTimestamp >= distributionEnd - ) return (_localRewardData.index, rewardIndex); - - currentTimestamp = currentTimestamp > distributionEnd - ? distributionEnd - : currentTimestamp; - uint256 totalEmitted = emissionPerSecond * - (currentTimestamp - lastUpdateTimestamp) * - _assetUnit; - assembly { - totalEmitted := div(totalEmitted, _totalSupply) - } - return (_localRewardData.index, (totalEmitted + rewardIndex)); + + ( + uint256 rewardIndex, + uint256 emissionPerSecond, + uint256 lastUpdateTimestamp, + uint256 distributionEnd + ) = morpho.rewardsController().getRewardsData(_asset, _reward); + + if ( + emissionPerSecond == 0 || + _totalSupply == 0 || + lastUpdateTimestamp == currentTimestamp || + lastUpdateTimestamp >= distributionEnd + ) return (_localRewardData.index, rewardIndex); + + currentTimestamp = currentTimestamp > distributionEnd ? distributionEnd : currentTimestamp; + uint256 totalEmitted = emissionPerSecond * + (currentTimestamp - lastUpdateTimestamp) * + _assetUnit; + assembly { + totalEmitted := div(totalEmitted, _totalSupply) } + return (_localRewardData.index, (totalEmitted + rewardIndex)); } /// @dev Returns user balances and total supply of all the assets specified by the assets parameter. From 3bf010037fe7273021d86d63cde6a699b081fe17 Mon Sep 17 00:00:00 2001 From: MerlinEgalite Date: Thu, 11 Aug 2022 11:16:27 +0200 Subject: [PATCH 50/57] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20(#1207)=20Remove=20c?= =?UTF-8?q?heck=20matched?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contracts/aave-v2/EntryPositionsManager.sol | 16 ++++++---------- contracts/aave-v2/ExitPositionsManager.sol | 12 ++++-------- contracts/aave-v3/EntryPositionsManager.sol | 16 ++++++---------- contracts/aave-v3/ExitPositionsManager.sol | 12 ++++-------- 4 files changed, 20 insertions(+), 36 deletions(-) diff --git a/contracts/aave-v2/EntryPositionsManager.sol b/contracts/aave-v2/EntryPositionsManager.sol index 3f47867a4..0210488d0 100644 --- a/contracts/aave-v2/EntryPositionsManager.sol +++ b/contracts/aave-v2/EntryPositionsManager.sol @@ -134,11 +134,9 @@ contract EntryPositionsManager is IEntryPositionsManager, PositionsManagerUtils _maxGasForMatching ); // In underlying. - if (matched > 0) { - vars.toRepay += matched; - vars.remainingToSupply -= matched; - delta.p2pBorrowAmount += matched.rayDiv(p2pBorrowIndex[_poolToken]); - } + vars.toRepay += matched; + vars.remainingToSupply -= matched; + delta.p2pBorrowAmount += matched.rayDiv(p2pBorrowIndex[_poolToken]); } Types.SupplyBalance storage supplierSupplyBalance = supplyBalanceInOf[_poolToken][ @@ -234,11 +232,9 @@ contract EntryPositionsManager is IEntryPositionsManager, PositionsManagerUtils _maxGasForMatching ); // In underlying. - if (matched > 0) { - toWithdraw += matched; - remainingToBorrow -= matched; - deltas[_poolToken].p2pSupplyAmount += matched.rayDiv(p2pSupplyIndex[_poolToken]); - } + toWithdraw += matched; + remainingToBorrow -= matched; + deltas[_poolToken].p2pSupplyAmount += matched.rayDiv(p2pSupplyIndex[_poolToken]); } Types.BorrowBalance storage borrowerBorrowBalance = borrowBalanceInOf[_poolToken][ diff --git a/contracts/aave-v2/ExitPositionsManager.sol b/contracts/aave-v2/ExitPositionsManager.sol index a13196000..2aaf21504 100644 --- a/contracts/aave-v2/ExitPositionsManager.sol +++ b/contracts/aave-v2/ExitPositionsManager.sol @@ -355,10 +355,8 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { vars.remainingGasForMatching = 0; else vars.remainingGasForMatching -= gasConsumedInMatching; - if (matched > 0) { - vars.remainingToWithdraw -= matched; - vars.toWithdraw += matched; - } + vars.remainingToWithdraw -= matched; + vars.toWithdraw += matched; } if (vars.toWithdraw > 0) _withdrawFromPool(underlyingToken, _poolToken, vars.toWithdraw); // Reverts on error. @@ -529,10 +527,8 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { vars.remainingGasForMatching = 0; else vars.remainingGasForMatching -= gasConsumedInMatching; - if (matched > 0) { - vars.remainingToRepay -= matched; - vars.toRepay += matched; - } + vars.remainingToRepay -= matched; + vars.toRepay += matched; } _repayToPool(underlyingToken, vars.toRepay); // Reverts on error. diff --git a/contracts/aave-v3/EntryPositionsManager.sol b/contracts/aave-v3/EntryPositionsManager.sol index 1d5b9821f..a9dc55952 100644 --- a/contracts/aave-v3/EntryPositionsManager.sol +++ b/contracts/aave-v3/EntryPositionsManager.sol @@ -134,11 +134,9 @@ contract EntryPositionsManager is IEntryPositionsManager, PositionsManagerUtils _maxGasForMatching ); // In underlying. - if (matched > 0) { - vars.toRepay += matched; - vars.remainingToSupply -= matched; - delta.p2pBorrowAmount += matched.rayDiv(p2pBorrowIndex[_poolToken]); - } + vars.toRepay += matched; + vars.remainingToSupply -= matched; + delta.p2pBorrowAmount += matched.rayDiv(p2pBorrowIndex[_poolToken]); } Types.SupplyBalance storage supplierSupplyBalance = supplyBalanceInOf[_poolToken][ @@ -234,11 +232,9 @@ contract EntryPositionsManager is IEntryPositionsManager, PositionsManagerUtils _maxGasForMatching ); // In underlying. - if (matched > 0) { - toWithdraw += matched; - remainingToBorrow -= matched; - deltas[_poolToken].p2pSupplyAmount += matched.rayDiv(p2pSupplyIndex[_poolToken]); - } + toWithdraw += matched; + remainingToBorrow -= matched; + deltas[_poolToken].p2pSupplyAmount += matched.rayDiv(p2pSupplyIndex[_poolToken]); } Types.BorrowBalance storage borrowerBorrowBalance = borrowBalanceInOf[_poolToken][ diff --git a/contracts/aave-v3/ExitPositionsManager.sol b/contracts/aave-v3/ExitPositionsManager.sol index 1b52d0b05..68bbfd8a1 100644 --- a/contracts/aave-v3/ExitPositionsManager.sol +++ b/contracts/aave-v3/ExitPositionsManager.sol @@ -354,10 +354,8 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { vars.remainingGasForMatching = 0; else vars.remainingGasForMatching -= gasConsumedInMatching; - if (matched > 0) { - vars.remainingToWithdraw -= matched; - vars.toWithdraw += matched; - } + vars.remainingToWithdraw -= matched; + vars.toWithdraw += matched; } if (vars.toWithdraw > 0) _withdrawFromPool(underlyingToken, _poolToken, vars.toWithdraw); // Reverts on error. @@ -528,10 +526,8 @@ contract ExitPositionsManager is IExitPositionsManager, PositionsManagerUtils { vars.remainingGasForMatching = 0; else vars.remainingGasForMatching -= gasConsumedInMatching; - if (matched > 0) { - vars.remainingToRepay -= matched; - vars.toRepay += matched; - } + vars.remainingToRepay -= matched; + vars.toRepay += matched; } _repayToPool(underlyingToken, vars.toRepay); // Reverts on error. From 77d4526002de57d2f1e0020347c0cfffd6d07af9 Mon Sep 17 00:00:00 2001 From: MerlinEgalite Date: Thu, 11 Aug 2022 11:18:49 +0200 Subject: [PATCH 51/57] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20(#1207)=20Use=20stor?= =?UTF-8?q?age=20var?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contracts/aave-v2/EntryPositionsManager.sol | 4 ++-- contracts/aave-v3/EntryPositionsManager.sol | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contracts/aave-v2/EntryPositionsManager.sol b/contracts/aave-v2/EntryPositionsManager.sol index 0210488d0..222377708 100644 --- a/contracts/aave-v2/EntryPositionsManager.sol +++ b/contracts/aave-v2/EntryPositionsManager.sol @@ -234,7 +234,7 @@ contract EntryPositionsManager is IEntryPositionsManager, PositionsManagerUtils toWithdraw += matched; remainingToBorrow -= matched; - deltas[_poolToken].p2pSupplyAmount += matched.rayDiv(p2pSupplyIndex[_poolToken]); + delta.p2pSupplyAmount += matched.rayDiv(p2pSupplyIndex[_poolToken]); } Types.BorrowBalance storage borrowerBorrowBalance = borrowBalanceInOf[_poolToken][ @@ -244,7 +244,7 @@ contract EntryPositionsManager is IEntryPositionsManager, PositionsManagerUtils if (toWithdraw > 0) { uint256 toAddInP2P = toWithdraw.rayDiv(p2pBorrowIndex[_poolToken]); // In peer-to-peer unit. - deltas[_poolToken].p2pBorrowAmount += toAddInP2P; + delta.p2pBorrowAmount += toAddInP2P; borrowerBorrowBalance.inP2P += toAddInP2P; emit P2PAmountsUpdated(_poolToken, delta.p2pSupplyAmount, delta.p2pBorrowAmount); diff --git a/contracts/aave-v3/EntryPositionsManager.sol b/contracts/aave-v3/EntryPositionsManager.sol index a9dc55952..85addd895 100644 --- a/contracts/aave-v3/EntryPositionsManager.sol +++ b/contracts/aave-v3/EntryPositionsManager.sol @@ -234,7 +234,7 @@ contract EntryPositionsManager is IEntryPositionsManager, PositionsManagerUtils toWithdraw += matched; remainingToBorrow -= matched; - deltas[_poolToken].p2pSupplyAmount += matched.rayDiv(p2pSupplyIndex[_poolToken]); + delta.p2pSupplyAmount += matched.rayDiv(p2pSupplyIndex[_poolToken]); } Types.BorrowBalance storage borrowerBorrowBalance = borrowBalanceInOf[_poolToken][ @@ -244,7 +244,7 @@ contract EntryPositionsManager is IEntryPositionsManager, PositionsManagerUtils if (toWithdraw > 0) { uint256 toAddInP2P = toWithdraw.rayDiv(p2pBorrowIndex[_poolToken]); // In peer-to-peer unit. - deltas[_poolToken].p2pBorrowAmount += toAddInP2P; + delta.p2pBorrowAmount += toAddInP2P; borrowerBorrowBalance.inP2P += toAddInP2P; emit P2PAmountsUpdated(_poolToken, delta.p2pSupplyAmount, delta.p2pBorrowAmount); From 3f9b40f28cc96ca32303f2def629983b13201b3a Mon Sep 17 00:00:00 2001 From: MerlinEgalite Date: Thu, 11 Aug 2022 11:34:16 +0200 Subject: [PATCH 52/57] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20(#1207)=20Gas=20opti?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contracts/aave-v3/IncentivesVault.sol | 3 +-- contracts/aave-v3/RewardsManager.sol | 11 ++++------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/contracts/aave-v3/IncentivesVault.sol b/contracts/aave-v3/IncentivesVault.sol index 5a6a715ba..ce94b6979 100644 --- a/contracts/aave-v3/IncentivesVault.sol +++ b/contracts/aave-v3/IncentivesVault.sol @@ -138,10 +138,9 @@ contract IncentivesVault is IIncentivesVault, Ownable { if (msg.sender != address(morpho)) revert OnlyMorpho(); if (isPaused) revert VaultIsPaused(); - uint256 rewardsListLength = _rewardsList.length; uint256 amountOut; - for (uint256 i; i < rewardsListLength; ) { + for (uint256 i; i < _rewardsList.length; ) { address reward = _rewardsList[i]; uint256 claimedAmount = _claimedAmounts[i]; diff --git a/contracts/aave-v3/RewardsManager.sol b/contracts/aave-v3/RewardsManager.sol index 59c34c8b3..3e99cfe91 100644 --- a/contracts/aave-v3/RewardsManager.sol +++ b/contracts/aave-v3/RewardsManager.sol @@ -103,16 +103,14 @@ contract RewardsManager is IRewardsManager, OwnableUpgradeable { address _user ) external onlyMorpho returns (address[] memory rewardsList, uint256[] memory claimedAmounts) { rewardsList = _rewardsController.getRewardsList(); - uint256 rewardsListLength = rewardsList.length; - uint256 assetsLength = _assets.length; - claimedAmounts = new uint256[](rewardsListLength); + claimedAmounts = new uint256[](rewardsList.length); _updateDataMultiple(_rewardsController, _user, _getUserAssetBalances(_assets, _user)); - for (uint256 i; i < assetsLength; ) { + for (uint256 i; i < _assets.length; ) { address asset = _assets[i]; - for (uint256 j; j < rewardsListLength; ) { + for (uint256 j; j < rewardsList.length; ) { uint256 rewardAmount = localAssetData[asset][rewardsList[j]] .usersData[_user] .accrued; @@ -359,8 +357,7 @@ contract RewardsManager is IRewardsManager, OwnableUpgradeable { address _user, UserAssetBalance[] memory _userAssetBalances ) internal { - uint256 userAssetBalancesLength = _userAssetBalances.length; - for (uint256 i; i < userAssetBalancesLength; ) { + for (uint256 i; i < _userAssetBalances.length; ) { _updateData( _rewardsController, _user, From 0355e1c361190c927daa46ff36e2cc8d1e8d6ea7 Mon Sep 17 00:00:00 2001 From: MerlinEgalite Date: Thu, 11 Aug 2022 11:55:56 +0200 Subject: [PATCH 53/57] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20(#120?= =?UTF-8?q?6)=20Ease=20readability=20in=20MorphoUtils?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contracts/aave-v2/MorphoUtils.sol | 115 +++++++++++++--------------- contracts/aave-v3/MorphoUtils.sol | 123 ++++++++++++++---------------- 2 files changed, 110 insertions(+), 128 deletions(-) diff --git a/contracts/aave-v2/MorphoUtils.sol b/contracts/aave-v2/MorphoUtils.sol index 81ea8f1e6..02faa4876 100644 --- a/contracts/aave-v2/MorphoUtils.sol +++ b/contracts/aave-v2/MorphoUtils.sol @@ -277,73 +277,64 @@ abstract contract MorphoUtils is MorphoStorage { vars.poolTokensLength = marketsCreated.length; vars.userMarkets = userMarkets[_user]; - for (uint256 i; i < vars.poolTokensLength; ) { + for (uint256 i; i < vars.poolTokensLength; ++i) { vars.poolToken = marketsCreated[i]; vars.borrowMask = borrowMask[vars.poolToken]; - if (_isSupplyingOrBorrowing(vars.userMarkets, vars.borrowMask)) { - vars.underlyingToken = market[vars.poolToken].underlyingToken; - vars.underlyingPrice = oracle.getAssetPrice(vars.underlyingToken); - - if (vars.poolToken != _poolToken) _updateIndexes(vars.poolToken); - - (assetData.ltv, assetData.liquidationThreshold, , assetData.decimals, ) = pool - .getConfiguration(vars.underlyingToken) - .getParamsMemory(); - - unchecked { - assetData.tokenUnit = 10**assetData.decimals; - } - - if (_isBorrowing(vars.userMarkets, vars.borrowMask)) { - values.debt += _debtValue( - vars.poolToken, - _user, - vars.underlyingPrice, - assetData.tokenUnit - ); - } - - // Cache current asset collateral value. - uint256 assetCollateralValue; - if (_isSupplying(vars.userMarkets, vars.borrowMask)) { - assetCollateralValue = _collateralValue( - vars.poolToken, - _user, - vars.underlyingPrice, - assetData.tokenUnit - ); - values.collateral += assetCollateralValue; - // Calculate LTV for borrow. - values.maxDebt += assetCollateralValue.percentMul(assetData.ltv); - } - - // Update debt variable for borrowed token. - if (_poolToken == vars.poolToken && _amountBorrowed > 0) - values.debt += (_amountBorrowed * vars.underlyingPrice).divUp( - assetData.tokenUnit - ); - - // Update LT variable for withdraw. - if (assetCollateralValue > 0) - values.liquidationThreshold += assetCollateralValue.percentMul( - assetData.liquidationThreshold - ); - - // Subtract withdrawn amount from liquidation threshold and collateral. - if (_poolToken == vars.poolToken && _amountWithdrawn > 0) { - uint256 withdrawn = (_amountWithdrawn * vars.underlyingPrice) / - assetData.tokenUnit; - values.collateral -= withdrawn; - values.liquidationThreshold -= withdrawn.percentMul( - assetData.liquidationThreshold - ); - values.maxDebt -= withdrawn.percentMul(assetData.ltv); - } - } + if (!_isSupplyingOrBorrowing(vars.userMarkets, vars.borrowMask)) continue; + + vars.underlyingToken = market[vars.poolToken].underlyingToken; + vars.underlyingPrice = oracle.getAssetPrice(vars.underlyingToken); + + if (vars.poolToken != _poolToken) _updateIndexes(vars.poolToken); + + (assetData.ltv, assetData.liquidationThreshold, , assetData.decimals, ) = pool + .getConfiguration(vars.underlyingToken) + .getParamsMemory(); unchecked { - ++i; + assetData.tokenUnit = 10**assetData.decimals; + } + + if (_isBorrowing(vars.userMarkets, vars.borrowMask)) { + values.debt += _debtValue( + vars.poolToken, + _user, + vars.underlyingPrice, + assetData.tokenUnit + ); + } + + // Cache current asset collateral value. + uint256 assetCollateralValue; + if (_isSupplying(vars.userMarkets, vars.borrowMask)) { + assetCollateralValue = _collateralValue( + vars.poolToken, + _user, + vars.underlyingPrice, + assetData.tokenUnit + ); + values.collateral += assetCollateralValue; + // Calculate LTV for borrow. + values.maxDebt += assetCollateralValue.percentMul(assetData.ltv); + } + + // Update debt variable for borrowed token. + if (_poolToken == vars.poolToken && _amountBorrowed > 0) + values.debt += (_amountBorrowed * vars.underlyingPrice).divUp(assetData.tokenUnit); + + // Update LT variable for withdraw. + if (assetCollateralValue > 0) + values.liquidationThreshold += assetCollateralValue.percentMul( + assetData.liquidationThreshold + ); + + // Subtract withdrawn amount from liquidation threshold and collateral. + if (_poolToken == vars.poolToken && _amountWithdrawn > 0) { + uint256 withdrawn = (_amountWithdrawn * vars.underlyingPrice) / assetData.tokenUnit; + values.collateral -= withdrawn; + values.liquidationThreshold -= withdrawn.percentMul(assetData.liquidationThreshold); + values.maxDebt -= withdrawn.percentMul(assetData.ltv); } } } diff --git a/contracts/aave-v3/MorphoUtils.sol b/contracts/aave-v3/MorphoUtils.sol index aeb5b4fd9..8321491e3 100644 --- a/contracts/aave-v3/MorphoUtils.sol +++ b/contracts/aave-v3/MorphoUtils.sol @@ -277,77 +277,68 @@ abstract contract MorphoUtils is MorphoStorage { vars.poolTokensLength = marketsCreated.length; vars.userMarkets = userMarkets[_user]; - for (uint256 i; i < vars.poolTokensLength; ) { + for (uint256 i; i < vars.poolTokensLength; ++i) { vars.poolToken = marketsCreated[i]; vars.borrowMask = borrowMask[vars.poolToken]; - if (_isSupplyingOrBorrowing(vars.userMarkets, vars.borrowMask)) { - vars.underlyingToken = market[vars.poolToken].underlyingToken; - vars.underlyingPrice = oracle.getAssetPrice(vars.underlyingToken); - - if (vars.poolToken != _poolToken) _updateIndexes(vars.poolToken); - - (assetData.ltv, assetData.liquidationThreshold, , assetData.decimals, , ) = pool - .getConfiguration(vars.underlyingToken) - .getParams(); - - // If a LTV has been reduced to 0 on Aave v3, the other assets of the collateral are frozen. - // In response, Morpho disables the asset as collateral and sets its liquidation threshold to 0. - if (assetData.ltv == 0) assetData.liquidationThreshold = 0; - - unchecked { - assetData.tokenUnit = 10**assetData.decimals; - } - - if (_isBorrowing(vars.userMarkets, vars.borrowMask)) { - values.debt += _debtValue( - vars.poolToken, - _user, - vars.underlyingPrice, - assetData.tokenUnit - ); - } - - // Cache current asset collateral value. - uint256 assetCollateralValue; - if (_isSupplying(vars.userMarkets, vars.borrowMask)) { - assetCollateralValue = _collateralValue( - vars.poolToken, - _user, - vars.underlyingPrice, - assetData.tokenUnit - ); - values.collateral += assetCollateralValue; - // Calculate LTV for borrow. - values.maxDebt += assetCollateralValue.percentMul(assetData.ltv); - } - - // Update debt variable for borrowed token. - if (_poolToken == vars.poolToken && _amountBorrowed > 0) - values.debt += (_amountBorrowed * vars.underlyingPrice).divUp( - assetData.tokenUnit - ); - - // Update LT variable for withdraw. - if (assetCollateralValue > 0) - values.liquidationThreshold += assetCollateralValue.percentMul( - assetData.liquidationThreshold - ); - - // Subtract withdrawn amount from liquidation threshold and collateral. - if (_poolToken == vars.poolToken && _amountWithdrawn > 0) { - uint256 withdrawn = (_amountWithdrawn * vars.underlyingPrice) / - assetData.tokenUnit; - values.collateral -= withdrawn; - values.liquidationThreshold -= withdrawn.percentMul( - assetData.liquidationThreshold - ); - values.maxDebt -= withdrawn.percentMul(assetData.ltv); - } - } + if (!_isSupplyingOrBorrowing(vars.userMarkets, vars.borrowMask)) continue; + + vars.underlyingToken = market[vars.poolToken].underlyingToken; + vars.underlyingPrice = oracle.getAssetPrice(vars.underlyingToken); + + if (vars.poolToken != _poolToken) _updateIndexes(vars.poolToken); + + (assetData.ltv, assetData.liquidationThreshold, , assetData.decimals, , ) = pool + .getConfiguration(vars.underlyingToken) + .getParams(); + + // If a LTV has been reduced to 0 on Aave v3, the other assets of the collateral are frozen. + // In response, Morpho disables the asset as collateral and sets its liquidation threshold to 0. + if (assetData.ltv == 0) assetData.liquidationThreshold = 0; unchecked { - ++i; + assetData.tokenUnit = 10**assetData.decimals; + } + + if (_isBorrowing(vars.userMarkets, vars.borrowMask)) { + values.debt += _debtValue( + vars.poolToken, + _user, + vars.underlyingPrice, + assetData.tokenUnit + ); + } + + // Cache current asset collateral value. + uint256 assetCollateralValue; + if (_isSupplying(vars.userMarkets, vars.borrowMask)) { + assetCollateralValue = _collateralValue( + vars.poolToken, + _user, + vars.underlyingPrice, + assetData.tokenUnit + ); + values.collateral += assetCollateralValue; + // Calculate LTV for borrow. + values.maxDebt += assetCollateralValue.percentMul(assetData.ltv); + } + + // Update debt variable for borrowed token. + if (_poolToken == vars.poolToken && _amountBorrowed > 0) + values.debt += (_amountBorrowed * vars.underlyingPrice).divUp(assetData.tokenUnit); + + // Update LT variable for withdraw. + if (assetCollateralValue > 0) + values.liquidationThreshold += assetCollateralValue.percentMul( + assetData.liquidationThreshold + ); + + // Subtract withdrawn amount from liquidation threshold and collateral. + if (_poolToken == vars.poolToken && _amountWithdrawn > 0) { + uint256 withdrawn = (_amountWithdrawn * vars.underlyingPrice) / assetData.tokenUnit; + values.collateral -= withdrawn; + values.liquidationThreshold -= withdrawn.percentMul(assetData.liquidationThreshold); + values.maxDebt -= withdrawn.percentMul(assetData.ltv); } } } From 9261bc63001dd118f7af91c3e351eeab9e2f6cd1 Mon Sep 17 00:00:00 2001 From: MerlinEgalite Date: Thu, 11 Aug 2022 12:00:23 +0200 Subject: [PATCH 54/57] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20(#120?= =?UTF-8?q?6)=20Ease=20readability=20in=20InterestRatesManager?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contracts/aave-v2/InterestRatesManager.sol | 64 +++++++++++----------- contracts/aave-v3/InterestRatesManager.sol | 64 +++++++++++----------- 2 files changed, 64 insertions(+), 64 deletions(-) diff --git a/contracts/aave-v2/InterestRatesManager.sol b/contracts/aave-v2/InterestRatesManager.sol index c89db7019..a3664dee9 100644 --- a/contracts/aave-v2/InterestRatesManager.sol +++ b/contracts/aave-v2/InterestRatesManager.sol @@ -55,42 +55,42 @@ contract InterestRatesManager is IInterestRatesManager, MorphoStorage { function updateIndexes(address _poolToken) external { Types.PoolIndexes storage marketPoolIndexes = poolIndexes[_poolToken]; - if (block.timestamp > marketPoolIndexes.lastUpdateTimestamp) { - Types.Market storage market = market[_poolToken]; - - address underlyingToken = market.underlyingToken; - uint256 newPoolSupplyIndex = pool.getReserveNormalizedIncome(underlyingToken); - uint256 newPoolBorrowIndex = pool.getReserveNormalizedVariableDebt(underlyingToken); - - Params memory params = Params( - p2pSupplyIndex[_poolToken], - p2pBorrowIndex[_poolToken], - newPoolSupplyIndex, - newPoolBorrowIndex, - marketPoolIndexes.poolSupplyIndex, - marketPoolIndexes.poolBorrowIndex, - market.reserveFactor, - market.p2pIndexCursor, - deltas[_poolToken] - ); + if (block.timestamp == marketPoolIndexes.lastUpdateTimestamp) return; + + Types.Market storage market = market[_poolToken]; + + address underlyingToken = market.underlyingToken; + uint256 newPoolSupplyIndex = pool.getReserveNormalizedIncome(underlyingToken); + uint256 newPoolBorrowIndex = pool.getReserveNormalizedVariableDebt(underlyingToken); + + Params memory params = Params( + p2pSupplyIndex[_poolToken], + p2pBorrowIndex[_poolToken], + newPoolSupplyIndex, + newPoolBorrowIndex, + marketPoolIndexes.poolSupplyIndex, + marketPoolIndexes.poolBorrowIndex, + market.reserveFactor, + market.p2pIndexCursor, + deltas[_poolToken] + ); - (uint256 newP2PSupplyIndex, uint256 newP2PBorrowIndex) = _computeP2PIndexes(params); + (uint256 newP2PSupplyIndex, uint256 newP2PBorrowIndex) = _computeP2PIndexes(params); - p2pSupplyIndex[_poolToken] = newP2PSupplyIndex; - p2pBorrowIndex[_poolToken] = newP2PBorrowIndex; + p2pSupplyIndex[_poolToken] = newP2PSupplyIndex; + p2pBorrowIndex[_poolToken] = newP2PBorrowIndex; - marketPoolIndexes.lastUpdateTimestamp = uint32(block.timestamp); - marketPoolIndexes.poolSupplyIndex = uint112(newPoolSupplyIndex); - marketPoolIndexes.poolBorrowIndex = uint112(newPoolBorrowIndex); + marketPoolIndexes.lastUpdateTimestamp = uint32(block.timestamp); + marketPoolIndexes.poolSupplyIndex = uint112(newPoolSupplyIndex); + marketPoolIndexes.poolBorrowIndex = uint112(newPoolBorrowIndex); - emit P2PIndexesUpdated( - _poolToken, - newP2PSupplyIndex, - newP2PBorrowIndex, - newPoolSupplyIndex, - newPoolBorrowIndex - ); - } + emit P2PIndexesUpdated( + _poolToken, + newP2PSupplyIndex, + newP2PBorrowIndex, + newPoolSupplyIndex, + newPoolBorrowIndex + ); } /// INTERNAL /// diff --git a/contracts/aave-v3/InterestRatesManager.sol b/contracts/aave-v3/InterestRatesManager.sol index 23b6cb7e1..f3f53a8f8 100644 --- a/contracts/aave-v3/InterestRatesManager.sol +++ b/contracts/aave-v3/InterestRatesManager.sol @@ -55,42 +55,42 @@ contract InterestRatesManager is IInterestRatesManager, MorphoStorage { function updateIndexes(address _poolToken) external { Types.PoolIndexes storage marketPoolIndexes = poolIndexes[_poolToken]; - if (block.timestamp > marketPoolIndexes.lastUpdateTimestamp) { - Types.Market storage market = market[_poolToken]; - - address underlyingToken = market.underlyingToken; - uint256 newPoolSupplyIndex = pool.getReserveNormalizedIncome(underlyingToken); - uint256 newPoolBorrowIndex = pool.getReserveNormalizedVariableDebt(underlyingToken); - - Params memory params = Params( - p2pSupplyIndex[_poolToken], - p2pBorrowIndex[_poolToken], - newPoolSupplyIndex, - newPoolBorrowIndex, - marketPoolIndexes.poolSupplyIndex, - marketPoolIndexes.poolBorrowIndex, - market.reserveFactor, - market.p2pIndexCursor, - deltas[_poolToken] - ); + if (block.timestamp == marketPoolIndexes.lastUpdateTimestamp) return; + + Types.Market storage market = market[_poolToken]; + + address underlyingToken = market.underlyingToken; + uint256 newPoolSupplyIndex = pool.getReserveNormalizedIncome(underlyingToken); + uint256 newPoolBorrowIndex = pool.getReserveNormalizedVariableDebt(underlyingToken); + + Params memory params = Params( + p2pSupplyIndex[_poolToken], + p2pBorrowIndex[_poolToken], + newPoolSupplyIndex, + newPoolBorrowIndex, + marketPoolIndexes.poolSupplyIndex, + marketPoolIndexes.poolBorrowIndex, + market.reserveFactor, + market.p2pIndexCursor, + deltas[_poolToken] + ); - (uint256 newP2PSupplyIndex, uint256 newP2PBorrowIndex) = _computeP2PIndexes(params); + (uint256 newP2PSupplyIndex, uint256 newP2PBorrowIndex) = _computeP2PIndexes(params); - p2pSupplyIndex[_poolToken] = newP2PSupplyIndex; - p2pBorrowIndex[_poolToken] = newP2PBorrowIndex; + p2pSupplyIndex[_poolToken] = newP2PSupplyIndex; + p2pBorrowIndex[_poolToken] = newP2PBorrowIndex; - marketPoolIndexes.lastUpdateTimestamp = uint32(block.timestamp); - marketPoolIndexes.poolSupplyIndex = uint112(newPoolSupplyIndex); - marketPoolIndexes.poolBorrowIndex = uint112(newPoolBorrowIndex); + marketPoolIndexes.lastUpdateTimestamp = uint32(block.timestamp); + marketPoolIndexes.poolSupplyIndex = uint112(newPoolSupplyIndex); + marketPoolIndexes.poolBorrowIndex = uint112(newPoolBorrowIndex); - emit P2PIndexesUpdated( - _poolToken, - newP2PSupplyIndex, - newP2PBorrowIndex, - newPoolSupplyIndex, - newPoolBorrowIndex - ); - } + emit P2PIndexesUpdated( + _poolToken, + newP2PSupplyIndex, + newP2PBorrowIndex, + newPoolSupplyIndex, + newPoolBorrowIndex + ); } /// INTERNAL /// From 6956f6e1f6610f502e0006bb5ebf6aa5e009cb03 Mon Sep 17 00:00:00 2001 From: MerlinEgalite Date: Thu, 11 Aug 2022 13:25:28 +0200 Subject: [PATCH 55/57] =?UTF-8?q?=F0=9F=94=A5=20Remove=20useless=20depende?= =?UTF-8?q?ncies?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 10 +- yarn.lock | 2247 ++++++++++++++++++++++++-------------------------- 2 files changed, 1101 insertions(+), 1156 deletions(-) diff --git a/package.json b/package.json index 2523893fd..ae1795d05 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,6 @@ "hardhat-upgrades": "^0.0.0", "husky": "7.0.1", "merkletreejs": "0.2.31", - "module-alias": "2.2.2", "prettier": "2.3.2", "prettier-plugin-solidity": "1.0.0-beta.13", "solhint": "3.3.6", @@ -63,13 +62,6 @@ }, "dependencies": { "@openzeppelin/contracts": "4.5.0", - "@openzeppelin/contracts-upgradeable": "4.5.2", - "@rari-capital/solmate": "^6.4.0", - "@uniswap/v2-periphery": "1.1.0-beta.0", - "@uniswap/v3-core": "Uniswap/v3-core#36bc9101b91e2b8b5690f59e0911a85deb2d2480", - "@uniswap/v3-periphery": "^1.4.0" - }, - "_moduleAliases": { - "@config": "config" + "@openzeppelin/contracts-upgradeable": "4.5.2" } } diff --git a/yarn.lock b/yarn.lock index 146b9d835..e92138b6a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3,23 +3,23 @@ "@babel/code-frame@^7.0.0": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.16.7.tgz#44416b6bd7624b998f5b1af5d470856c40138789" - integrity sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg== + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" + integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== dependencies: - "@babel/highlight" "^7.16.7" + "@babel/highlight" "^7.18.6" -"@babel/helper-validator-identifier@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz#e8c602438c4a8195751243da9031d1607d247cad" - integrity sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw== +"@babel/helper-validator-identifier@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz#9c97e30d31b2b8c72a1d08984f2ca9b574d7a076" + integrity sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g== -"@babel/highlight@^7.16.7": - version "7.16.10" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.16.10.tgz#744f2eb81579d6eea753c227b0f570ad785aba88" - integrity sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw== +"@babel/highlight@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" + integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== dependencies: - "@babel/helper-validator-identifier" "^7.16.7" + "@babel/helper-validator-identifier" "^7.18.6" chalk "^2.0.0" js-tokens "^4.0.0" @@ -104,45 +104,37 @@ patch-package "^6.2.2" postinstall-postinstall "^2.1.0" -"@ethereumjs/block@^3.5.0", "@ethereumjs/block@^3.6.2": - version "3.6.2" - resolved "https://registry.yarnpkg.com/@ethereumjs/block/-/block-3.6.2.tgz#63d1e26d0b7a7a3684fce920de6ebabec1e5b674" - integrity sha512-mOqYWwMlAZpYUEOEqt7EfMFuVL2eyLqWWIzcf4odn6QgXY8jBI2NhVuJncrMCKeMZrsJAe7/auaRRB6YcdH+Qw== +"@ethereumjs/block@^3.5.0", "@ethereumjs/block@^3.6.2", "@ethereumjs/block@^3.6.3": + version "3.6.3" + resolved "https://registry.yarnpkg.com/@ethereumjs/block/-/block-3.6.3.tgz#d96cbd7af38b92ebb3424223dbf773f5ccd27f84" + integrity sha512-CegDeryc2DVKnDkg5COQrE0bJfw/p0v3GBk2W5/Dj5dOVfEmb50Ux0GLnSPypooLnfqjwFaorGuT9FokWB3GRg== dependencies: - "@ethereumjs/common" "^2.6.3" - "@ethereumjs/tx" "^3.5.1" - ethereumjs-util "^7.1.4" + "@ethereumjs/common" "^2.6.5" + "@ethereumjs/tx" "^3.5.2" + ethereumjs-util "^7.1.5" merkle-patricia-tree "^4.2.4" -"@ethereumjs/blockchain@^5.5.2": - version "5.5.2" - resolved "https://registry.yarnpkg.com/@ethereumjs/blockchain/-/blockchain-5.5.2.tgz#1848abd9dc1ee56acf8cec4c84304d7f4667d027" - integrity sha512-Jz26iJmmsQtngerW6r5BDFaew/f2mObLrRZo3rskLOx1lmtMZ8+TX/vJexmivrnWgmAsTdNWhlKUYY4thPhPig== +"@ethereumjs/blockchain@^5.5.2", "@ethereumjs/blockchain@^5.5.3": + version "5.5.3" + resolved "https://registry.yarnpkg.com/@ethereumjs/blockchain/-/blockchain-5.5.3.tgz#aa49a6a04789da6b66b5bcbb0d0b98efc369f640" + integrity sha512-bi0wuNJ1gw4ByNCV56H0Z4Q7D+SxUbwyG12Wxzbvqc89PXLRNR20LBcSUZRKpN0+YCPo6m0XZL/JLio3B52LTw== dependencies: "@ethereumjs/block" "^3.6.2" - "@ethereumjs/common" "^2.6.3" + "@ethereumjs/common" "^2.6.4" "@ethereumjs/ethash" "^1.1.0" debug "^4.3.3" - ethereumjs-util "^7.1.4" + ethereumjs-util "^7.1.5" level-mem "^5.0.1" lru-cache "^5.1.1" semaphore-async-await "^1.5.1" -"@ethereumjs/common@^2.6.3": - version "2.6.3" - resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.6.3.tgz#39ddece7300b336276bad6c02f6a9f1a082caa05" - integrity sha512-mQwPucDL7FDYIg9XQ8DL31CnIYZwGhU5hyOO5E+BMmT71G0+RHvIT5rIkLBirJEKxV6+Rcf9aEIY0kXInxUWpQ== +"@ethereumjs/common@^2.6.4", "@ethereumjs/common@^2.6.5": + version "2.6.5" + resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.6.5.tgz#0a75a22a046272579d91919cb12d84f2756e8d30" + integrity sha512-lRyVQOeCDaIVtgfbowla32pzeDv2Obr8oR8Put5RdUBNRGr1VGPGQNGP6elWIpgK3YdpzqTOh4GyUGOureVeeA== dependencies: crc-32 "^1.2.0" - ethereumjs-util "^7.1.4" - -"@ethereumjs/common@^2.6.4": - version "2.6.4" - resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.6.4.tgz#1b3cdd3aa4ee3b0ca366756fc35e4a03022a01cc" - integrity sha512-RDJh/R/EAr+B7ZRg5LfJ0BIpf/1LydFgYdvZEuTraojCbVypO2sQ+QnpP5u2wJf9DASyooKqu8O4FJEWUV6NXw== - dependencies: - crc-32 "^1.2.0" - ethereumjs-util "^7.1.4" + ethereumjs-util "^7.1.5" "@ethereumjs/ethash@^1.1.0": version "1.1.0" @@ -155,27 +147,27 @@ ethereumjs-util "^7.1.1" miller-rabin "^4.0.0" -"@ethereumjs/tx@^3.5.1": - version "3.5.1" - resolved "https://registry.yarnpkg.com/@ethereumjs/tx/-/tx-3.5.1.tgz#8d941b83a602b4a89949c879615f7ea9a90e6671" - integrity sha512-xzDrTiu4sqZXUcaBxJ4n4W5FrppwxLxZB4ZDGVLtxSQR4lVuOnFR6RcUHdg1mpUhAPVrmnzLJpxaeXnPxIyhWA== +"@ethereumjs/tx@^3.5.1", "@ethereumjs/tx@^3.5.2": + version "3.5.2" + resolved "https://registry.yarnpkg.com/@ethereumjs/tx/-/tx-3.5.2.tgz#197b9b6299582ad84f9527ca961466fce2296c1c" + integrity sha512-gQDNJWKrSDGu2w7w0PzVXVBNMzb7wwdDOmOqczmhNjqFxFuIbhVJDwiGEnxFNC2/b8ifcZzY7MLcluizohRzNw== dependencies: - "@ethereumjs/common" "^2.6.3" - ethereumjs-util "^7.1.4" + "@ethereumjs/common" "^2.6.4" + ethereumjs-util "^7.1.5" "@ethereumjs/vm@^5.9.0": - version "5.9.0" - resolved "https://registry.yarnpkg.com/@ethereumjs/vm/-/vm-5.9.0.tgz#54e485097c6dbb42554d541ef8d84d06b7ddf12f" - integrity sha512-0IRsj4IuF8lFDWVVLc4mFOImaSX8VWF8CGm3mXHG/LLlQ/Tryy/kKXMw/bU9D+Zw03CdteW+wCGqNFS6+mPjpg== - dependencies: - "@ethereumjs/block" "^3.6.2" - "@ethereumjs/blockchain" "^5.5.2" - "@ethereumjs/common" "^2.6.4" - "@ethereumjs/tx" "^3.5.1" + version "5.9.3" + resolved "https://registry.yarnpkg.com/@ethereumjs/vm/-/vm-5.9.3.tgz#6d69202e4c132a4a1e1628ac246e92062e230823" + integrity sha512-Ha04TeF8goEglr8eL7hkkYyjhzdZS0PsoRURzYlTF6I0VVId5KjKb0N7MrA8GMgheN+UeTncfTgYx52D/WhEmg== + dependencies: + "@ethereumjs/block" "^3.6.3" + "@ethereumjs/blockchain" "^5.5.3" + "@ethereumjs/common" "^2.6.5" + "@ethereumjs/tx" "^3.5.2" async-eventemitter "^0.2.4" core-js-pure "^3.0.1" debug "^4.3.3" - ethereumjs-util "^7.1.4" + ethereumjs-util "^7.1.5" functional-red-black-tree "^1.0.1" mcl-wasm "^0.7.1" merkle-patricia-tree "^4.2.4" @@ -211,20 +203,20 @@ "@ethersproject/properties" "^5.4.0" "@ethersproject/strings" "^5.4.0" -"@ethersproject/abi@5.6.0", "@ethersproject/abi@^5.1.2", "@ethersproject/abi@^5.4.0", "@ethersproject/abi@^5.5.0", "@ethersproject/abi@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.6.0.tgz#ea07cbc1eec2374d32485679c12408005895e9f3" - integrity sha512-AhVByTwdXCc2YQ20v300w6KVHle9g2OFc28ZAFCPnJyEpkv1xKXjZcSTgWOlv1i+0dqlgF8RCF2Rn2KC1t+1Vg== - dependencies: - "@ethersproject/address" "^5.6.0" - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/constants" "^5.6.0" - "@ethersproject/hash" "^5.6.0" - "@ethersproject/keccak256" "^5.6.0" +"@ethersproject/abi@5.6.4", "@ethersproject/abi@^5.1.2", "@ethersproject/abi@^5.4.0", "@ethersproject/abi@^5.5.0", "@ethersproject/abi@^5.6.3": + version "5.6.4" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.6.4.tgz#f6e01b6ed391a505932698ecc0d9e7a99ee60362" + integrity sha512-TTeZUlCeIHG6527/2goZA6gW5F8Emoc7MrZDC7hhP84aRGvW3TEdTnZR08Ls88YXM1m2SuK42Osw/jSi3uO8gg== + dependencies: + "@ethersproject/address" "^5.6.1" + "@ethersproject/bignumber" "^5.6.2" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/constants" "^5.6.1" + "@ethersproject/hash" "^5.6.1" + "@ethersproject/keccak256" "^5.6.1" "@ethersproject/logger" "^5.6.0" "@ethersproject/properties" "^5.6.0" - "@ethersproject/strings" "^5.6.0" + "@ethersproject/strings" "^5.6.1" "@ethersproject/abstract-provider@5.4.0": version "5.4.0" @@ -239,18 +231,18 @@ "@ethersproject/transactions" "^5.4.0" "@ethersproject/web" "^5.4.0" -"@ethersproject/abstract-provider@5.6.0", "@ethersproject/abstract-provider@^5.4.0", "@ethersproject/abstract-provider@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.6.0.tgz#0c4ac7054650dbd9c476cf5907f588bbb6ef3061" - integrity sha512-oPMFlKLN+g+y7a79cLK3WiLcjWFnZQtXWgnLAbHZcN3s7L4v90UHpTOrLk+m3yr0gt+/h9STTM6zrr7PM8uoRw== +"@ethersproject/abstract-provider@5.6.1", "@ethersproject/abstract-provider@^5.4.0", "@ethersproject/abstract-provider@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.6.1.tgz#02ddce150785caf0c77fe036a0ebfcee61878c59" + integrity sha512-BxlIgogYJtp1FS8Muvj8YfdClk3unZH0vRMVX791Z9INBNT/kuACZ9GzaY1Y4yFq+YSy6/w4gzj3HCRKrK9hsQ== dependencies: - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" + "@ethersproject/bignumber" "^5.6.2" + "@ethersproject/bytes" "^5.6.1" "@ethersproject/logger" "^5.6.0" - "@ethersproject/networks" "^5.6.0" + "@ethersproject/networks" "^5.6.3" "@ethersproject/properties" "^5.6.0" - "@ethersproject/transactions" "^5.6.0" - "@ethersproject/web" "^5.6.0" + "@ethersproject/transactions" "^5.6.2" + "@ethersproject/web" "^5.6.1" "@ethersproject/abstract-signer@5.4.0": version "5.4.0" @@ -263,14 +255,14 @@ "@ethersproject/logger" "^5.4.0" "@ethersproject/properties" "^5.4.0" -"@ethersproject/abstract-signer@5.6.0", "@ethersproject/abstract-signer@^5.4.0", "@ethersproject/abstract-signer@^5.4.1", "@ethersproject/abstract-signer@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.6.0.tgz#9cd7ae9211c2b123a3b29bf47aab17d4d016e3e7" - integrity sha512-WOqnG0NJKtI8n0wWZPReHtaLkDByPL67tn4nBaDAhmVq8sjHTPbCdz4DRhVu/cfTOvfy9w3iq5QZ7BX7zw56BQ== +"@ethersproject/abstract-signer@5.6.2", "@ethersproject/abstract-signer@^5.4.0", "@ethersproject/abstract-signer@^5.4.1", "@ethersproject/abstract-signer@^5.6.2": + version "5.6.2" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.6.2.tgz#491f07fc2cbd5da258f46ec539664713950b0b33" + integrity sha512-n1r6lttFBG0t2vNiI3HoWaS/KdOt8xyDjzlP2cuevlWLG6EX0OwcKLyG/Kp/cuwNxdy/ous+R/DEMdTUwWQIjQ== dependencies: - "@ethersproject/abstract-provider" "^5.6.0" - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" + "@ethersproject/abstract-provider" "^5.6.1" + "@ethersproject/bignumber" "^5.6.2" + "@ethersproject/bytes" "^5.6.1" "@ethersproject/logger" "^5.6.0" "@ethersproject/properties" "^5.6.0" @@ -285,16 +277,16 @@ "@ethersproject/logger" "^5.4.0" "@ethersproject/rlp" "^5.4.0" -"@ethersproject/address@5.6.0", "@ethersproject/address@>=5.0.0-beta.128", "@ethersproject/address@^5.0.2", "@ethersproject/address@^5.4.0", "@ethersproject/address@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.6.0.tgz#13c49836d73e7885fc148ad633afad729da25012" - integrity sha512-6nvhYXjbXsHPS+30sHZ+U4VMagFC/9zAk6Gd/h3S21YW4+yfb0WfRtaAIZ4kfM4rrVwqiy284LP0GtL5HXGLxQ== +"@ethersproject/address@5.6.1", "@ethersproject/address@>=5.0.0-beta.128", "@ethersproject/address@^5.0.2", "@ethersproject/address@^5.4.0", "@ethersproject/address@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.6.1.tgz#ab57818d9aefee919c5721d28cd31fd95eff413d" + integrity sha512-uOgF0kS5MJv9ZvCz7x6T2EXJSzotiybApn4XlOgoTX0xdtyVIJ7pF+6cGPxiEq/dpBiTfMiw7Yc81JcwhSYA0Q== dependencies: - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/keccak256" "^5.6.0" + "@ethersproject/bignumber" "^5.6.2" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/keccak256" "^5.6.1" "@ethersproject/logger" "^5.6.0" - "@ethersproject/rlp" "^5.6.0" + "@ethersproject/rlp" "^5.6.1" "@ethersproject/base64@5.4.0": version "5.4.0" @@ -303,12 +295,12 @@ dependencies: "@ethersproject/bytes" "^5.4.0" -"@ethersproject/base64@5.6.0", "@ethersproject/base64@^5.4.0", "@ethersproject/base64@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.6.0.tgz#a12c4da2a6fb86d88563216b0282308fc15907c9" - integrity sha512-2Neq8wxJ9xHxCF9TUgmKeSh9BXJ6OAxWfeGWvbauPh8FuHEjamgHilllx8KkSd5ErxyHIX7Xv3Fkcud2kY9ezw== +"@ethersproject/base64@5.6.1", "@ethersproject/base64@^5.4.0", "@ethersproject/base64@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.6.1.tgz#2c40d8a0310c9d1606c2c37ae3092634b41d87cb" + integrity sha512-qB76rjop6a0RIYYMiB4Eh/8n+Hxu2NIZm8S/Q7kNo5pmZfXhHGHmS4MinUainiBC54SCyRnwzL+KZjj8zbsSsw== dependencies: - "@ethersproject/bytes" "^5.6.0" + "@ethersproject/bytes" "^5.6.1" "@ethersproject/basex@5.4.0": version "5.4.0" @@ -318,12 +310,12 @@ "@ethersproject/bytes" "^5.4.0" "@ethersproject/properties" "^5.4.0" -"@ethersproject/basex@5.6.0", "@ethersproject/basex@^5.4.0", "@ethersproject/basex@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.6.0.tgz#9ea7209bf0a1c3ddc2a90f180c3a7f0d7d2e8a69" - integrity sha512-qN4T+hQd/Md32MoJpc69rOwLYRUXwjTlhHDIeUkUmiN/JyWkkLLMoG0TqvSQKNqZOMgN5stbUYN6ILC+eD7MEQ== +"@ethersproject/basex@5.6.1", "@ethersproject/basex@^5.4.0", "@ethersproject/basex@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.6.1.tgz#badbb2f1d4a6f52ce41c9064f01eab19cc4c5305" + integrity sha512-a52MkVz4vuBXR06nvflPMotld1FJWSj2QT0985v7P/emPZO00PucFAkbcmq2vpVU7Ts7umKiSI6SppiLykVWsA== dependencies: - "@ethersproject/bytes" "^5.6.0" + "@ethersproject/bytes" "^5.6.1" "@ethersproject/properties" "^5.6.0" "@ethersproject/bignumber@5.4.0": @@ -335,14 +327,14 @@ "@ethersproject/logger" "^5.4.0" bn.js "^4.11.9" -"@ethersproject/bignumber@5.6.0", "@ethersproject/bignumber@>=5.0.0-beta.130", "@ethersproject/bignumber@^5.4.0", "@ethersproject/bignumber@^5.4.1", "@ethersproject/bignumber@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.6.0.tgz#116c81b075c57fa765a8f3822648cf718a8a0e26" - integrity sha512-VziMaXIUHQlHJmkv1dlcd6GY2PmT0khtAqaMctCIDogxkrarMzA9L94KN1NeXqqOfFD6r0sJT3vCTOFSmZ07DA== +"@ethersproject/bignumber@5.6.2", "@ethersproject/bignumber@>=5.0.0-beta.130", "@ethersproject/bignumber@^5.4.0", "@ethersproject/bignumber@^5.4.1", "@ethersproject/bignumber@^5.6.2": + version "5.6.2" + resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.6.2.tgz#72a0717d6163fab44c47bcc82e0c550ac0315d66" + integrity sha512-v7+EEUbhGqT3XJ9LMPsKvXYHFc8eHxTowFCG/HgJErmq4XHJ2WR7aeyICg3uTOAQ7Icn0GFHAohXEhxQHq4Ubw== dependencies: - "@ethersproject/bytes" "^5.6.0" + "@ethersproject/bytes" "^5.6.1" "@ethersproject/logger" "^5.6.0" - bn.js "^4.11.9" + bn.js "^5.2.1" "@ethersproject/bytes@5.4.0": version "5.4.0" @@ -351,7 +343,7 @@ dependencies: "@ethersproject/logger" "^5.4.0" -"@ethersproject/bytes@5.6.1", "@ethersproject/bytes@>=5.0.0-beta.129", "@ethersproject/bytes@^5.4.0", "@ethersproject/bytes@^5.6.0": +"@ethersproject/bytes@5.6.1", "@ethersproject/bytes@>=5.0.0-beta.129", "@ethersproject/bytes@^5.4.0", "@ethersproject/bytes@^5.6.1": version "5.6.1" resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.6.1.tgz#24f916e411f82a8a60412344bf4a813b917eefe7" integrity sha512-NwQt7cKn5+ZE4uDn+X5RAXLp46E1chXoaMmrxAyA0rblpxz8t58lVkrHXoRIn0lz1joQElQ8410GqhTqMOwc6g== @@ -365,12 +357,12 @@ dependencies: "@ethersproject/bignumber" "^5.4.0" -"@ethersproject/constants@5.6.0", "@ethersproject/constants@>=5.0.0-beta.128", "@ethersproject/constants@^5.4.0", "@ethersproject/constants@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.6.0.tgz#55e3eb0918584d3acc0688e9958b0cedef297088" - integrity sha512-SrdaJx2bK0WQl23nSpV/b1aq293Lh0sUaZT/yYKPDKn4tlAbkH96SPJwIhwSwTsoQQZxuh1jnqsKwyymoiBdWA== +"@ethersproject/constants@5.6.1", "@ethersproject/constants@>=5.0.0-beta.128", "@ethersproject/constants@^5.4.0", "@ethersproject/constants@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.6.1.tgz#e2e974cac160dd101cf79fdf879d7d18e8cb1370" + integrity sha512-QSq9WVnZbxXYFftrjSjZDUshp6/eKp6qrtdBtUCm0QxCV5z1fG/w3kdlcsjMCQuQHUnAclKoK7XpXMezhRDOLg== dependencies: - "@ethersproject/bignumber" "^5.6.0" + "@ethersproject/bignumber" "^5.6.2" "@ethersproject/contracts@5.4.0": version "5.4.0" @@ -388,21 +380,21 @@ "@ethersproject/properties" "^5.4.0" "@ethersproject/transactions" "^5.4.0" -"@ethersproject/contracts@5.6.0", "@ethersproject/contracts@^5.4.1": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.6.0.tgz#60f2cfc7addd99a865c6c8cfbbcec76297386067" - integrity sha512-74Ge7iqTDom0NX+mux8KbRUeJgu1eHZ3iv6utv++sLJG80FVuU9HnHeKVPfjd9s3woFhaFoQGf3B3iH/FrQmgw== - dependencies: - "@ethersproject/abi" "^5.6.0" - "@ethersproject/abstract-provider" "^5.6.0" - "@ethersproject/abstract-signer" "^5.6.0" - "@ethersproject/address" "^5.6.0" - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/constants" "^5.6.0" +"@ethersproject/contracts@5.6.2", "@ethersproject/contracts@^5.4.1": + version "5.6.2" + resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.6.2.tgz#20b52e69ebc1b74274ff8e3d4e508de971c287bc" + integrity sha512-hguUA57BIKi6WY0kHvZp6PwPlWF87MCeB4B7Z7AbUpTxfFXFdn/3b0GmjZPagIHS+3yhcBJDnuEfU4Xz+Ks/8g== + dependencies: + "@ethersproject/abi" "^5.6.3" + "@ethersproject/abstract-provider" "^5.6.1" + "@ethersproject/abstract-signer" "^5.6.2" + "@ethersproject/address" "^5.6.1" + "@ethersproject/bignumber" "^5.6.2" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/constants" "^5.6.1" "@ethersproject/logger" "^5.6.0" "@ethersproject/properties" "^5.6.0" - "@ethersproject/transactions" "^5.6.0" + "@ethersproject/transactions" "^5.6.2" "@ethersproject/hash@5.4.0": version "5.4.0" @@ -418,19 +410,19 @@ "@ethersproject/properties" "^5.4.0" "@ethersproject/strings" "^5.4.0" -"@ethersproject/hash@5.6.0", "@ethersproject/hash@>=5.0.0-beta.128", "@ethersproject/hash@^5.4.0", "@ethersproject/hash@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.6.0.tgz#d24446a5263e02492f9808baa99b6e2b4c3429a2" - integrity sha512-fFd+k9gtczqlr0/BruWLAu7UAOas1uRRJvOR84uDf4lNZ+bTkGl366qvniUZHKtlqxBRU65MkOobkmvmpHU+jA== - dependencies: - "@ethersproject/abstract-signer" "^5.6.0" - "@ethersproject/address" "^5.6.0" - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/keccak256" "^5.6.0" +"@ethersproject/hash@5.6.1", "@ethersproject/hash@>=5.0.0-beta.128", "@ethersproject/hash@^5.4.0", "@ethersproject/hash@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.6.1.tgz#224572ea4de257f05b4abf8ae58b03a67e99b0f4" + integrity sha512-L1xAHurbaxG8VVul4ankNX5HgQ8PNCTrnVXEiFnE9xoRnaUcgfD12tZINtDinSllxPLCtGwguQxJ5E6keE84pA== + dependencies: + "@ethersproject/abstract-signer" "^5.6.2" + "@ethersproject/address" "^5.6.1" + "@ethersproject/bignumber" "^5.6.2" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/keccak256" "^5.6.1" "@ethersproject/logger" "^5.6.0" "@ethersproject/properties" "^5.6.0" - "@ethersproject/strings" "^5.6.0" + "@ethersproject/strings" "^5.6.1" "@ethersproject/hdnode@5.4.0": version "5.4.0" @@ -450,23 +442,23 @@ "@ethersproject/transactions" "^5.4.0" "@ethersproject/wordlists" "^5.4.0" -"@ethersproject/hdnode@5.6.0", "@ethersproject/hdnode@^5.4.0", "@ethersproject/hdnode@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.6.0.tgz#9dcbe8d629bbbcf144f2cae476337fe92d320998" - integrity sha512-61g3Jp3nwDqJcL/p4nugSyLrpl/+ChXIOtCEM8UDmWeB3JCAt5FoLdOMXQc3WWkc0oM2C0aAn6GFqqMcS/mHTw== +"@ethersproject/hdnode@5.6.2", "@ethersproject/hdnode@^5.4.0", "@ethersproject/hdnode@^5.6.2": + version "5.6.2" + resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.6.2.tgz#26f3c83a3e8f1b7985c15d1db50dc2903418b2d2" + integrity sha512-tERxW8Ccf9CxW2db3WsN01Qao3wFeRsfYY9TCuhmG0xNpl2IO8wgXU3HtWIZ49gUWPggRy4Yg5axU0ACaEKf1Q== dependencies: - "@ethersproject/abstract-signer" "^5.6.0" - "@ethersproject/basex" "^5.6.0" - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" + "@ethersproject/abstract-signer" "^5.6.2" + "@ethersproject/basex" "^5.6.1" + "@ethersproject/bignumber" "^5.6.2" + "@ethersproject/bytes" "^5.6.1" "@ethersproject/logger" "^5.6.0" - "@ethersproject/pbkdf2" "^5.6.0" + "@ethersproject/pbkdf2" "^5.6.1" "@ethersproject/properties" "^5.6.0" - "@ethersproject/sha2" "^5.6.0" - "@ethersproject/signing-key" "^5.6.0" - "@ethersproject/strings" "^5.6.0" - "@ethersproject/transactions" "^5.6.0" - "@ethersproject/wordlists" "^5.6.0" + "@ethersproject/sha2" "^5.6.1" + "@ethersproject/signing-key" "^5.6.2" + "@ethersproject/strings" "^5.6.1" + "@ethersproject/transactions" "^5.6.2" + "@ethersproject/wordlists" "^5.6.1" "@ethersproject/json-wallets@5.4.0": version "5.4.0" @@ -487,22 +479,22 @@ aes-js "3.0.0" scrypt-js "3.0.1" -"@ethersproject/json-wallets@5.6.0", "@ethersproject/json-wallets@^5.4.0", "@ethersproject/json-wallets@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.6.0.tgz#4c2fc27f17e36c583e7a252fb938bc46f98891e5" - integrity sha512-fmh86jViB9r0ibWXTQipxpAGMiuxoqUf78oqJDlCAJXgnJF024hOOX7qVgqsjtbeoxmcLwpPsXNU0WEe/16qPQ== - dependencies: - "@ethersproject/abstract-signer" "^5.6.0" - "@ethersproject/address" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/hdnode" "^5.6.0" - "@ethersproject/keccak256" "^5.6.0" +"@ethersproject/json-wallets@5.6.1", "@ethersproject/json-wallets@^5.4.0", "@ethersproject/json-wallets@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.6.1.tgz#3f06ba555c9c0d7da46756a12ac53483fe18dd91" + integrity sha512-KfyJ6Zwz3kGeX25nLihPwZYlDqamO6pfGKNnVMWWfEVVp42lTfCZVXXy5Ie8IZTN0HKwAngpIPi7gk4IJzgmqQ== + dependencies: + "@ethersproject/abstract-signer" "^5.6.2" + "@ethersproject/address" "^5.6.1" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/hdnode" "^5.6.2" + "@ethersproject/keccak256" "^5.6.1" "@ethersproject/logger" "^5.6.0" - "@ethersproject/pbkdf2" "^5.6.0" + "@ethersproject/pbkdf2" "^5.6.1" "@ethersproject/properties" "^5.6.0" - "@ethersproject/random" "^5.6.0" - "@ethersproject/strings" "^5.6.0" - "@ethersproject/transactions" "^5.6.0" + "@ethersproject/random" "^5.6.1" + "@ethersproject/strings" "^5.6.1" + "@ethersproject/transactions" "^5.6.2" aes-js "3.0.0" scrypt-js "3.0.1" @@ -514,12 +506,12 @@ "@ethersproject/bytes" "^5.4.0" js-sha3 "0.5.7" -"@ethersproject/keccak256@5.6.0", "@ethersproject/keccak256@>=5.0.0-beta.127", "@ethersproject/keccak256@^5.4.0", "@ethersproject/keccak256@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.6.0.tgz#fea4bb47dbf8f131c2e1774a1cecbfeb9d606459" - integrity sha512-tk56BJ96mdj/ksi7HWZVWGjCq0WVl/QvfhFQNeL8fxhBlGoP+L80uDCiQcpJPd+2XxkivS3lwRm3E0CXTfol0w== +"@ethersproject/keccak256@5.6.1", "@ethersproject/keccak256@>=5.0.0-beta.127", "@ethersproject/keccak256@^5.4.0", "@ethersproject/keccak256@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.6.1.tgz#b867167c9b50ba1b1a92bccdd4f2d6bd168a91cc" + integrity sha512-bB7DQHCTRDooZZdL3lk9wpL0+XuG3XLGHLh3cePnybsO3V0rdCAOQGpn/0R3aODmnTOOkCATJiD2hnL+5bwthA== dependencies: - "@ethersproject/bytes" "^5.6.0" + "@ethersproject/bytes" "^5.6.1" js-sha3 "0.8.0" "@ethersproject/logger@5.4.0": @@ -539,10 +531,10 @@ dependencies: "@ethersproject/logger" "^5.4.0" -"@ethersproject/networks@5.6.1", "@ethersproject/networks@^5.4.0", "@ethersproject/networks@^5.6.0": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.6.1.tgz#7a21ed1f83e86121737b16841961ec99ccf5c9c7" - integrity sha512-b2rrupf3kCTcc3jr9xOWBuHylSFtbpJf79Ga7QR98ienU2UqGimPGEsYMgbI29KHJfA5Us89XwGVmxrlxmSrMg== +"@ethersproject/networks@5.6.4", "@ethersproject/networks@^5.4.0", "@ethersproject/networks@^5.6.3": + version "5.6.4" + resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.6.4.tgz#51296d8fec59e9627554f5a8a9c7791248c8dc07" + integrity sha512-KShHeHPahHI2UlWdtDMn2lJETcbtaJge4k7XSjDR9h79QTd6yQJmv6Cp2ZA4JdqWnhszAOLSuJEd9C0PRw7hSQ== dependencies: "@ethersproject/logger" "^5.6.0" @@ -554,13 +546,13 @@ "@ethersproject/bytes" "^5.4.0" "@ethersproject/sha2" "^5.4.0" -"@ethersproject/pbkdf2@5.6.0", "@ethersproject/pbkdf2@^5.4.0", "@ethersproject/pbkdf2@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.6.0.tgz#04fcc2d7c6bff88393f5b4237d906a192426685a" - integrity sha512-Wu1AxTgJo3T3H6MIu/eejLFok9TYoSdgwRr5oGY1LTLfmGesDoSx05pemsbrPT2gG4cQME+baTSCp5sEo2erZQ== +"@ethersproject/pbkdf2@5.6.1", "@ethersproject/pbkdf2@^5.4.0", "@ethersproject/pbkdf2@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.6.1.tgz#f462fe320b22c0d6b1d72a9920a3963b09eb82d1" + integrity sha512-k4gRQ+D93zDRPNUfmduNKq065uadC2YjMP/CqwwX5qG6R05f47boq6pLZtV/RnC4NZAYOPH1Cyo54q0c9sshRQ== dependencies: - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/sha2" "^5.6.0" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/sha2" "^5.6.1" "@ethersproject/properties@5.4.0": version "5.4.0" @@ -601,28 +593,29 @@ bech32 "1.1.4" ws "7.4.6" -"@ethersproject/providers@5.6.2", "@ethersproject/providers@^5.4.4": - version "5.6.2" - resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.6.2.tgz#b9807b1c8c6f59fa2ee4b3cf6519724d07a9f422" - integrity sha512-6/EaFW/hNWz+224FXwl8+HdMRzVHt8DpPmu5MZaIQqx/K/ELnC9eY236SMV7mleCM3NnEArFwcAAxH5kUUgaRg== - dependencies: - "@ethersproject/abstract-provider" "^5.6.0" - "@ethersproject/abstract-signer" "^5.6.0" - "@ethersproject/address" "^5.6.0" - "@ethersproject/basex" "^5.6.0" - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/constants" "^5.6.0" - "@ethersproject/hash" "^5.6.0" +"@ethersproject/providers@5.6.8", "@ethersproject/providers@^5.4.4": + version "5.6.8" + resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.6.8.tgz#22e6c57be215ba5545d3a46cf759d265bb4e879d" + integrity sha512-Wf+CseT/iOJjrGtAOf3ck9zS7AgPmr2fZ3N97r4+YXN3mBePTG2/bJ8DApl9mVwYL+RpYbNxMEkEp4mPGdwG/w== + dependencies: + "@ethersproject/abstract-provider" "^5.6.1" + "@ethersproject/abstract-signer" "^5.6.2" + "@ethersproject/address" "^5.6.1" + "@ethersproject/base64" "^5.6.1" + "@ethersproject/basex" "^5.6.1" + "@ethersproject/bignumber" "^5.6.2" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/constants" "^5.6.1" + "@ethersproject/hash" "^5.6.1" "@ethersproject/logger" "^5.6.0" - "@ethersproject/networks" "^5.6.0" + "@ethersproject/networks" "^5.6.3" "@ethersproject/properties" "^5.6.0" - "@ethersproject/random" "^5.6.0" - "@ethersproject/rlp" "^5.6.0" - "@ethersproject/sha2" "^5.6.0" - "@ethersproject/strings" "^5.6.0" - "@ethersproject/transactions" "^5.6.0" - "@ethersproject/web" "^5.6.0" + "@ethersproject/random" "^5.6.1" + "@ethersproject/rlp" "^5.6.1" + "@ethersproject/sha2" "^5.6.1" + "@ethersproject/strings" "^5.6.1" + "@ethersproject/transactions" "^5.6.2" + "@ethersproject/web" "^5.6.1" bech32 "1.1.4" ws "7.4.6" @@ -634,12 +627,12 @@ "@ethersproject/bytes" "^5.4.0" "@ethersproject/logger" "^5.4.0" -"@ethersproject/random@5.6.0", "@ethersproject/random@^5.4.0", "@ethersproject/random@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.6.0.tgz#1505d1ab6a250e0ee92f436850fa3314b2cb5ae6" - integrity sha512-si0PLcLjq+NG/XHSZz90asNf+YfKEqJGVdxoEkSukzbnBgC8rydbgbUgBbBGLeHN4kAJwUFEKsu3sCXT93YMsw== +"@ethersproject/random@5.6.1", "@ethersproject/random@^5.4.0", "@ethersproject/random@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.6.1.tgz#66915943981bcd3e11bbd43733f5c3ba5a790255" + integrity sha512-/wtPNHwbmng+5yi3fkipA8YBT59DdkGRoC2vWk09Dci/q5DlgnMkhIycjHlavrvrjJBkFjO/ueLyT+aUDfc4lA== dependencies: - "@ethersproject/bytes" "^5.6.0" + "@ethersproject/bytes" "^5.6.1" "@ethersproject/logger" "^5.6.0" "@ethersproject/rlp@5.4.0": @@ -650,12 +643,12 @@ "@ethersproject/bytes" "^5.4.0" "@ethersproject/logger" "^5.4.0" -"@ethersproject/rlp@5.6.0", "@ethersproject/rlp@^5.4.0", "@ethersproject/rlp@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.6.0.tgz#55a7be01c6f5e64d6e6e7edb6061aa120962a717" - integrity sha512-dz9WR1xpcTL+9DtOT/aDO+YyxSSdO8YIS0jyZwHHSlAmnxA6cKU3TrTd4Xc/bHayctxTgGLYNuVVoiXE4tTq1g== +"@ethersproject/rlp@5.6.1", "@ethersproject/rlp@^5.4.0", "@ethersproject/rlp@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.6.1.tgz#df8311e6f9f24dcb03d59a2bac457a28a4fe2bd8" + integrity sha512-uYjmcZx+DKlFUk7a5/W9aQVaoEC7+1MOBgNtvNg13+RnuUwT4F0zTovC0tmay5SmRslb29V1B7Y5KCri46WhuQ== dependencies: - "@ethersproject/bytes" "^5.6.0" + "@ethersproject/bytes" "^5.6.1" "@ethersproject/logger" "^5.6.0" "@ethersproject/sha2@5.4.0": @@ -667,12 +660,12 @@ "@ethersproject/logger" "^5.4.0" hash.js "1.1.7" -"@ethersproject/sha2@5.6.0", "@ethersproject/sha2@^5.4.0", "@ethersproject/sha2@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.6.0.tgz#364c4c11cc753bda36f31f001628706ebadb64d9" - integrity sha512-1tNWCPFLu1n3JM9t4/kytz35DkuF9MxqkGGEHNauEbaARdm2fafnOyw1s0tIQDPKF/7bkP1u3dbrmjpn5CelyA== +"@ethersproject/sha2@5.6.1", "@ethersproject/sha2@^5.4.0", "@ethersproject/sha2@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.6.1.tgz#211f14d3f5da5301c8972a8827770b6fd3e51656" + integrity sha512-5K2GyqcW7G4Yo3uenHegbXRPDgARpWUiXc6RiF7b6i/HXUoWlb7uCARh7BAHg7/qT/Q5ydofNwiZcim9qpjB6g== dependencies: - "@ethersproject/bytes" "^5.6.0" + "@ethersproject/bytes" "^5.6.1" "@ethersproject/logger" "^5.6.0" hash.js "1.1.7" @@ -688,15 +681,15 @@ elliptic "6.5.4" hash.js "1.1.7" -"@ethersproject/signing-key@5.6.0", "@ethersproject/signing-key@^5.4.0", "@ethersproject/signing-key@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.6.0.tgz#4f02e3fb09e22b71e2e1d6dc4bcb5dafa69ce042" - integrity sha512-S+njkhowmLeUu/r7ir8n78OUKx63kBdMCPssePS89So1TH4hZqnWFsThEd/GiXYp9qMxVrydf7KdM9MTGPFukA== +"@ethersproject/signing-key@5.6.2", "@ethersproject/signing-key@^5.4.0", "@ethersproject/signing-key@^5.6.2": + version "5.6.2" + resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.6.2.tgz#8a51b111e4d62e5a62aee1da1e088d12de0614a3" + integrity sha512-jVbu0RuP7EFpw82vHcL+GP35+KaNruVAZM90GxgQnGqB6crhBqW/ozBfFvdeImtmb4qPko0uxXjn8l9jpn0cwQ== dependencies: - "@ethersproject/bytes" "^5.6.0" + "@ethersproject/bytes" "^5.6.1" "@ethersproject/logger" "^5.6.0" "@ethersproject/properties" "^5.6.0" - bn.js "^4.11.9" + bn.js "^5.2.1" elliptic "6.5.4" hash.js "1.1.7" @@ -711,17 +704,17 @@ "@ethersproject/sha2" "^5.4.0" "@ethersproject/strings" "^5.4.0" -"@ethersproject/solidity@5.6.0", "@ethersproject/solidity@^5.4.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.6.0.tgz#64657362a596bf7f5630bdc921c07dd78df06dc3" - integrity sha512-YwF52vTNd50kjDzqKaoNNbC/r9kMDPq3YzDWmsjFTRBcIF1y4JCQJ8gB30wsTfHbaxgxelI5BfxQSxD/PbJOww== +"@ethersproject/solidity@5.6.1", "@ethersproject/solidity@^5.4.0": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.6.1.tgz#5845e71182c66d32e6ec5eefd041fca091a473e2" + integrity sha512-KWqVLkUUoLBfL1iwdzUVlkNqAUIFMpbbeH0rgCfKmJp0vFtY4AsaN91gHKo9ZZLkC4UOm3cI3BmMV4N53BOq4g== dependencies: - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/keccak256" "^5.6.0" + "@ethersproject/bignumber" "^5.6.2" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/keccak256" "^5.6.1" "@ethersproject/logger" "^5.6.0" - "@ethersproject/sha2" "^5.6.0" - "@ethersproject/strings" "^5.6.0" + "@ethersproject/sha2" "^5.6.1" + "@ethersproject/strings" "^5.6.1" "@ethersproject/strings@5.4.0": version "5.4.0" @@ -732,13 +725,13 @@ "@ethersproject/constants" "^5.4.0" "@ethersproject/logger" "^5.4.0" -"@ethersproject/strings@5.6.0", "@ethersproject/strings@>=5.0.0-beta.130", "@ethersproject/strings@^5.4.0", "@ethersproject/strings@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.6.0.tgz#9891b26709153d996bf1303d39a7f4bc047878fd" - integrity sha512-uv10vTtLTZqrJuqBZR862ZQjTIa724wGPWQqZrofaPI/kUsf53TBG0I0D+hQ1qyNtllbNzaW+PDPHHUI6/65Mg== +"@ethersproject/strings@5.6.1", "@ethersproject/strings@>=5.0.0-beta.130", "@ethersproject/strings@^5.4.0", "@ethersproject/strings@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.6.1.tgz#dbc1b7f901db822b5cafd4ebf01ca93c373f8952" + integrity sha512-2X1Lgk6Jyfg26MUnsHiT456U9ijxKUybz8IM1Vih+NJxYtXhmvKBcHOmvGqpFSVJ0nQ4ZCoIViR8XlRw1v/+Cw== dependencies: - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/constants" "^5.6.0" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/constants" "^5.6.1" "@ethersproject/logger" "^5.6.0" "@ethersproject/transactions@5.4.0": @@ -756,20 +749,20 @@ "@ethersproject/rlp" "^5.4.0" "@ethersproject/signing-key" "^5.4.0" -"@ethersproject/transactions@5.6.0", "@ethersproject/transactions@^5.0.0-beta.135", "@ethersproject/transactions@^5.4.0", "@ethersproject/transactions@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.6.0.tgz#4b594d73a868ef6e1529a2f8f94a785e6791ae4e" - integrity sha512-4HX+VOhNjXHZyGzER6E/LVI2i6lf9ejYeWD6l4g50AdmimyuStKc39kvKf1bXWQMg7QNVh+uC7dYwtaZ02IXeg== - dependencies: - "@ethersproject/address" "^5.6.0" - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/constants" "^5.6.0" - "@ethersproject/keccak256" "^5.6.0" +"@ethersproject/transactions@5.6.2", "@ethersproject/transactions@^5.0.0-beta.135", "@ethersproject/transactions@^5.4.0", "@ethersproject/transactions@^5.6.2": + version "5.6.2" + resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.6.2.tgz#793a774c01ced9fe7073985bb95a4b4e57a6370b" + integrity sha512-BuV63IRPHmJvthNkkt9G70Ullx6AcM+SDc+a8Aw/8Yew6YwT51TcBKEp1P4oOQ/bP25I18JJr7rcFRgFtU9B2Q== + dependencies: + "@ethersproject/address" "^5.6.1" + "@ethersproject/bignumber" "^5.6.2" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/constants" "^5.6.1" + "@ethersproject/keccak256" "^5.6.1" "@ethersproject/logger" "^5.6.0" "@ethersproject/properties" "^5.6.0" - "@ethersproject/rlp" "^5.6.0" - "@ethersproject/signing-key" "^5.6.0" + "@ethersproject/rlp" "^5.6.1" + "@ethersproject/signing-key" "^5.6.2" "@ethersproject/units@5.4.0": version "5.4.0" @@ -780,13 +773,13 @@ "@ethersproject/constants" "^5.4.0" "@ethersproject/logger" "^5.4.0" -"@ethersproject/units@5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.6.0.tgz#e5cbb1906988f5740254a21b9ded6bd51e826d9c" - integrity sha512-tig9x0Qmh8qbo1w8/6tmtyrm/QQRviBh389EQ+d8fP4wDsBrJBf08oZfoiz1/uenKK9M78yAP4PoR7SsVoTjsw== +"@ethersproject/units@5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.6.1.tgz#ecc590d16d37c8f9ef4e89e2005bda7ddc6a4e6f" + integrity sha512-rEfSEvMQ7obcx3KWD5EWWx77gqv54K6BKiZzKxkQJqtpriVsICrktIQmKl8ReNToPeIYPnFHpXvKpi068YFZXw== dependencies: - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/constants" "^5.6.0" + "@ethersproject/bignumber" "^5.6.2" + "@ethersproject/constants" "^5.6.1" "@ethersproject/logger" "^5.6.0" "@ethersproject/wallet@5.4.0": @@ -810,26 +803,26 @@ "@ethersproject/transactions" "^5.4.0" "@ethersproject/wordlists" "^5.4.0" -"@ethersproject/wallet@5.6.0", "@ethersproject/wallet@^5.4.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.6.0.tgz#33d11a806d783864208f348709a5a3badac8e22a" - integrity sha512-qMlSdOSTyp0MBeE+r7SUhr1jjDlC1zAXB8VD84hCnpijPQiSNbxr6GdiLXxpUs8UKzkDiNYYC5DRI3MZr+n+tg== - dependencies: - "@ethersproject/abstract-provider" "^5.6.0" - "@ethersproject/abstract-signer" "^5.6.0" - "@ethersproject/address" "^5.6.0" - "@ethersproject/bignumber" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/hash" "^5.6.0" - "@ethersproject/hdnode" "^5.6.0" - "@ethersproject/json-wallets" "^5.6.0" - "@ethersproject/keccak256" "^5.6.0" +"@ethersproject/wallet@5.6.2", "@ethersproject/wallet@^5.4.0": + version "5.6.2" + resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.6.2.tgz#cd61429d1e934681e413f4bc847a5f2f87e3a03c" + integrity sha512-lrgh0FDQPuOnHcF80Q3gHYsSUODp6aJLAdDmDV0xKCN/T7D99ta1jGVhulg3PY8wiXEngD0DfM0I2XKXlrqJfg== + dependencies: + "@ethersproject/abstract-provider" "^5.6.1" + "@ethersproject/abstract-signer" "^5.6.2" + "@ethersproject/address" "^5.6.1" + "@ethersproject/bignumber" "^5.6.2" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/hash" "^5.6.1" + "@ethersproject/hdnode" "^5.6.2" + "@ethersproject/json-wallets" "^5.6.1" + "@ethersproject/keccak256" "^5.6.1" "@ethersproject/logger" "^5.6.0" "@ethersproject/properties" "^5.6.0" - "@ethersproject/random" "^5.6.0" - "@ethersproject/signing-key" "^5.6.0" - "@ethersproject/transactions" "^5.6.0" - "@ethersproject/wordlists" "^5.6.0" + "@ethersproject/random" "^5.6.1" + "@ethersproject/signing-key" "^5.6.2" + "@ethersproject/transactions" "^5.6.2" + "@ethersproject/wordlists" "^5.6.1" "@ethersproject/web@5.4.0": version "5.4.0" @@ -842,16 +835,16 @@ "@ethersproject/properties" "^5.4.0" "@ethersproject/strings" "^5.4.0" -"@ethersproject/web@5.6.0", "@ethersproject/web@^5.4.0", "@ethersproject/web@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.6.0.tgz#4bf8b3cbc17055027e1a5dd3c357e37474eaaeb8" - integrity sha512-G/XHj0hV1FxI2teHRfCGvfBUHFmU+YOSbCxlAMqJklxSa7QMiHFQfAxvwY2PFqgvdkxEKwRNr/eCjfAPEm2Ctg== +"@ethersproject/web@5.6.1", "@ethersproject/web@^5.4.0", "@ethersproject/web@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.6.1.tgz#6e2bd3ebadd033e6fe57d072db2b69ad2c9bdf5d" + integrity sha512-/vSyzaQlNXkO1WV+RneYKqCJwualcUdx/Z3gseVovZP0wIlOFcCE1hkRhKBH8ImKbGQbMl9EAAyJFrJu7V0aqA== dependencies: - "@ethersproject/base64" "^5.6.0" - "@ethersproject/bytes" "^5.6.0" + "@ethersproject/base64" "^5.6.1" + "@ethersproject/bytes" "^5.6.1" "@ethersproject/logger" "^5.6.0" "@ethersproject/properties" "^5.6.0" - "@ethersproject/strings" "^5.6.0" + "@ethersproject/strings" "^5.6.1" "@ethersproject/wordlists@5.4.0": version "5.4.0" @@ -864,16 +857,16 @@ "@ethersproject/properties" "^5.4.0" "@ethersproject/strings" "^5.4.0" -"@ethersproject/wordlists@5.6.0", "@ethersproject/wordlists@^5.4.0", "@ethersproject/wordlists@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.6.0.tgz#79e62c5276e091d8575f6930ba01a29218ded032" - integrity sha512-q0bxNBfIX3fUuAo9OmjlEYxP40IB8ABgb7HjEZCL5IKubzV3j30CWi2rqQbjTS2HfoyQbfINoKcTVWP4ejwR7Q== +"@ethersproject/wordlists@5.6.1", "@ethersproject/wordlists@^5.4.0", "@ethersproject/wordlists@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.6.1.tgz#1e78e2740a8a21e9e99947e47979d72e130aeda1" + integrity sha512-wiPRgBpNbNwCQFoCr8bcWO8o5I810cqO6mkdtKfLKFlLxeCWcnzDi4Alu8iyNzlhYuS9npCwivMbRWF19dyblw== dependencies: - "@ethersproject/bytes" "^5.6.0" - "@ethersproject/hash" "^5.6.0" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/hash" "^5.6.1" "@ethersproject/logger" "^5.6.0" "@ethersproject/properties" "^5.6.0" - "@ethersproject/strings" "^5.6.0" + "@ethersproject/strings" "^5.6.1" "@metamask/eth-sig-util@^4.0.0": version "4.0.1" @@ -886,6 +879,16 @@ tweetnacl "^1.0.3" tweetnacl-util "^0.15.1" +"@noble/hashes@1.1.2", "@noble/hashes@~1.1.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.1.2.tgz#e9e035b9b166ca0af657a7848eb2718f0f22f183" + integrity sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA== + +"@noble/secp256k1@1.6.3", "@noble/secp256k1@~1.6.0": + version "1.6.3" + resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.6.3.tgz#7eed12d9f4404b416999d0c87686836c4c5c9b94" + integrity sha512-T04e4iTurVy7I8Sw4+c5OSN9/RkPlo1uKxAomtxQNLq8j1uPAqnsqG1bqvY3Jv7c13gyr6dui0zmh/I3+f/JaQ== + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -938,23 +941,19 @@ resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.5.2.tgz#90d9e47bacfd8693bfad0ac8a394645575528d05" integrity sha512-xgWZYaPlrEOQo3cBj97Ufiuv79SPd8Brh4GcFYhPgb6WvAq4ppz8dWKL6h+jLAK01rUqMRp/TS9AdXgAeNvCLA== -"@openzeppelin/contracts@3.4.1-solc-0.7-2": - version "3.4.1-solc-0.7-2" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-3.4.1-solc-0.7-2.tgz#371c67ebffe50f551c3146a9eec5fe6ffe862e92" - integrity sha512-tAG9LWg8+M2CMu7hIsqHPaTyG4uDzjr6mhvH96LvOpLZZj6tgzTluBt+LsCf1/QaYrlis6pITvpIaIhE+iZB+Q== - "@openzeppelin/contracts@4.5.0": version "4.5.0" resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.5.0.tgz#3fd75d57de172b3743cdfc1206883f56430409cc" integrity sha512-fdkzKPYMjrRiPK6K4y64e6GzULR7R7RwxSigHS8DDp7aWDeoReqsQI+cxHV1UuhAqX69L1lAaWDxenfP+xiqzA== "@openzeppelin/hardhat-upgrades@*": - version "1.19.0" - resolved "https://registry.yarnpkg.com/@openzeppelin/hardhat-upgrades/-/hardhat-upgrades-1.19.0.tgz#8f17210b924eb04c3ea4aa9795c1bb01d8a7dc3f" - integrity sha512-351QqDO3nZ96g0BO/bQnaTflix4Nw4ELWC/hZ8PwicsuVxRmxN/GZhxPrs62AOdiQdZ+xweawrVXa5knliRd4A== + version "1.20.0" + resolved "https://registry.yarnpkg.com/@openzeppelin/hardhat-upgrades/-/hardhat-upgrades-1.20.0.tgz#fe1bddc4ab591ccf185caf4cfa269a4851b73599" + integrity sha512-ign7fc/ZdPe+KAYCB91619o+wlBr7sIEEt1nqLhoXAJ9f0qVuXkwAaTdLB0MTSWH85TzlUUT2fTJp1ZnZ1o4LQ== dependencies: - "@openzeppelin/upgrades-core" "^1.16.0" + "@openzeppelin/upgrades-core" "^1.18.0" chalk "^4.1.0" + debug "^4.1.1" proper-lockfile "^4.1.1" "@openzeppelin/hardhat-upgrades@1.17.0": @@ -966,12 +965,11 @@ chalk "^4.1.0" proper-lockfile "^4.1.1" -"@openzeppelin/upgrades-core@^1.14.1", "@openzeppelin/upgrades-core@^1.16.0": - version "1.16.1" - resolved "https://registry.yarnpkg.com/@openzeppelin/upgrades-core/-/upgrades-core-1.16.1.tgz#a4c383fc628cc9d37d5a276def99a093c951644b" - integrity sha512-+hejbeAfsZWIQL5Ih13gkdm2KO6kbERc1ektzcyb25/OtUwaRjIIHxW++LdC/3Hg5uzThVOzJBfiLdAbgwD+OA== +"@openzeppelin/upgrades-core@^1.14.1", "@openzeppelin/upgrades-core@^1.18.0": + version "1.18.0" + resolved "https://registry.yarnpkg.com/@openzeppelin/upgrades-core/-/upgrades-core-1.18.0.tgz#a5db80d15e6b87d45307ad27314c91807a506c00" + integrity sha512-fFp5sscGC876yhq7BU595LG45yky21sZFa6cDJigluUjAyJSPoLwF7GD9bSwQMMo4jC7ii1UJBtLipUxN6PVTA== dependencies: - bn.js "^5.1.2" cbor "^8.0.0" chalk "^4.1.0" compare-versions "^4.0.0" @@ -980,11 +978,6 @@ proper-lockfile "^4.1.1" solidity-ast "^0.4.15" -"@rari-capital/solmate@^6.4.0": - version "6.4.0" - resolved "https://registry.yarnpkg.com/@rari-capital/solmate/-/solmate-6.4.0.tgz#c6ee4110c8075f14b415e420b13bd8bdbbc93d9e" - integrity sha512-BXWIHHbG5Zbgrxi0qVYe0Zs+bfx+XgOciVUACjuIApV0KzC0kY8XdO1higusIei/ZKCC+GUKdcdQZflxYPUTKQ== - "@resolver-engine/core@^0.3.3": version "0.3.3" resolved "https://registry.yarnpkg.com/@resolver-engine/core/-/core-0.3.3.tgz#590f77d85d45bc7ecc4e06c654f41345db6ca967" @@ -1022,6 +1015,28 @@ path-browserify "^1.0.0" url "^0.11.0" +"@scure/base@~1.1.0": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.1.tgz#ebb651ee52ff84f420097055f4bf46cfba403938" + integrity sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA== + +"@scure/bip32@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.1.0.tgz#dea45875e7fbc720c2b4560325f1cf5d2246d95b" + integrity sha512-ftTW3kKX54YXLCxH6BB7oEEoJfoE2pIgw7MINKAs5PsS6nqKPuKk1haTF/EuHmYqG330t5GSrdmtRuHaY1a62Q== + dependencies: + "@noble/hashes" "~1.1.1" + "@noble/secp256k1" "~1.6.0" + "@scure/base" "~1.1.0" + +"@scure/bip39@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.1.0.tgz#92f11d095bae025f166bef3defcc5bf4945d419a" + integrity sha512-pwrPOS16VeTKg98dYXQyIjJEcWfz7/1YJIwxUEPFfQPtc86Ym/1sVgQ2RLoD43AazMk2l/unK4ITySSpW2+82w== + dependencies: + "@noble/hashes" "~1.1.1" + "@scure/base" "~1.1.0" + "@sentry/core@5.30.0": version "5.30.0" resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.30.0.tgz#6b203664f69e75106ee8b5a2fe1d717379b331f3" @@ -1102,10 +1117,10 @@ dependencies: antlr4ts "^0.5.0-alpha.4" -"@solidity-parser/parser@^0.14.1": - version "0.14.1" - resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.14.1.tgz#179afb29f4e295a77cc141151f26b3848abc3c46" - integrity sha512-eLjj2L6AuQjBB6s/ibwCAc0DwrR5Ge+ys+wgWo+bviU7fV2nTMQhU63CGaDKXg9iTmMxwhkyoggdIR7ZGRfMgw== +"@solidity-parser/parser@^0.14.2": + version "0.14.3" + resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.14.3.tgz#0d627427b35a40d8521aaa933cc3df7d07bfa36f" + integrity sha512-29g2SZ29HtsqA58pLCtopI1P/cPy5/UAzlcAXO6T/CNJimG6yA8kx4NaseMyJULiC+TEs02Y9/yeHzClqoA0hw== dependencies: antlr4ts "^0.5.0-alpha.4" @@ -1126,24 +1141,24 @@ js-yaml "^3.14.0" "@tsconfig/node10@^1.0.7": - version "1.0.8" - resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.8.tgz#c1e4e80d6f964fbecb3359c43bd48b40f7cadad9" - integrity sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg== + version "1.0.9" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" + integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA== "@tsconfig/node12@^1.0.7": - version "1.0.9" - resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.9.tgz#62c1f6dee2ebd9aead80dc3afa56810e58e1a04c" - integrity sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw== + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== "@tsconfig/node14@^1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.1.tgz#95f2d167ffb9b8d2068b0b235302fafd4df711f2" - integrity sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg== + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== "@tsconfig/node16@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.2.tgz#423c77877d0569db20e1fc80885ac4118314010e" - integrity sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA== + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e" + integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== "@typechain/ethers-v5@^2.0.0": version "2.0.0" @@ -1172,9 +1187,9 @@ "@types/node" "*" "@types/chai@*": - version "4.3.0" - resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.0.tgz#23509ebc1fa32f1b4d50d6a66c4032d5b8eaabdc" - integrity sha512-/ceqdqeRraGolFTcfoXNiqjyQhZzbINDngeoAq9GoHa8PPK1yNzTaxWjA6BFWp5Ua9JpXEMSS4s5i9tS0hOJtw== + version "4.3.3" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.3.tgz#3c90752792660c4b562ad73b3fbd68bf3bc7ae07" + integrity sha512-hC7OMnszpxhZPduX+m+nrx+uFoLkWOMiR4oa/AZF3MuSETYTZmFfJAHqZEM8MVlvfG7BEUcgvtwoCTxBp6hm3g== "@types/chai@4.2.22": version "4.2.22" @@ -1218,17 +1233,17 @@ integrity sha512-scN0hAWyLVAvLR9AyW7HoFF5sJZglyBsbPuHO4fv7JRvfmPBMfp1ozWqOf/e4wwPNxezBZXRfWzMb6iFLgEVRA== "@types/node-fetch@^2.5.5": - version "2.6.1" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.1.tgz#8f127c50481db65886800ef496f20bbf15518975" - integrity sha512-oMqjURCaxoSIsHSr1E47QHzbmzNR5rK8McHuNb11BOM9cHcIK3Avy0s/b2JlXHoQGTYS3NsvWzV1M0iK7l0wbA== + version "2.6.2" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.2.tgz#d1a9c5fd049d9415dce61571557104dec3ec81da" + integrity sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A== dependencies: "@types/node" "*" form-data "^3.0.0" "@types/node@*": - version "17.0.23" - resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.23.tgz#3b41a6e643589ac6442bdbd7a4a3ded62f33f7da" - integrity sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw== + version "18.7.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.1.tgz#352bee64f93117d867d05f7406642a52685cbca6" + integrity sha512-GKX1Qnqxo4S+Z/+Z8KKPLpH282LD7jLHWJcVryOflnsnH+BtSDfieR6ObwBMwpnNws0bUK8GI7z0unQf9bARNQ== "@types/node@17.0.8": version "17.0.8" @@ -1236,9 +1251,9 @@ integrity sha512-YofkM6fGv4gDJq78g4j0mMuGMkZVxZDgtU0JRdx6FgiJDG+0fY0GKVolOV8WqVmEhLCXkQRjwDdKyPxJp/uucg== "@types/node@^12.12.6": - version "12.20.47" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.47.tgz#ca9237d51f2a2557419688511dab1c8daf475188" - integrity sha512-BzcaRsnFuznzOItW1WpQrDHM7plAa7GIDMZ6b5pnMbkqEtM/6WCOhvZar39oeMQP79gwvFUWjjptE7/KGcNqFg== + version "12.20.55" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240" + integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== "@types/pbkdf2@^3.0.0": version "3.1.0" @@ -1248,9 +1263,9 @@ "@types/node" "*" "@types/prettier@^2.1.1": - version "2.4.4" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.4.4.tgz#5d9b63132df54d8909fce1c3f8ca260fdd693e17" - integrity sha512-ReVR2rLTV1kvtlWFyuot+d1pkpG2Fw/XKE3PDAdj57rbM97ttSp9JZ2UsP+2EHTylra9cUf6JA7tGwW1INzUrA== + version "2.7.0" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.0.tgz#ea03e9f0376a4446f44797ca19d9c46c36e352dc" + integrity sha512-RI1L7N4JnW5gQw2spvL7Sllfuf1SaHdrZpCHiBlCXjIlufi1SMNnbu2teze3/QE67Fg2tBlH7W+mi4hVNk4p0A== "@types/qs@^6.9.7": version "6.9.7" @@ -1280,9 +1295,9 @@ "@types/sinon" "*" "@types/sinon@*": - version "10.0.11" - resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-10.0.11.tgz#8245827b05d3fc57a6601bd35aee1f7ad330fc42" - integrity sha512-dmZsHlBsKUtBpHriNjlK0ndlvEh8dcb9uV9Afsbt89QIyydpC7NcR+nWlAhASfy3GHnxTl4FX/aKE7XZUt/B4g== + version "10.0.13" + resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-10.0.13.tgz#60a7a87a70d9372d0b7b38cc03e825f46981fb83" + integrity sha512-UVjDqJblVNQYvVNUsj0PuYYw0ELRmgt1Nt5Vk0pT5f16ROGfcKJY8o1HVuMOJOpD727RrGB9EGvoaTQE5tgxZQ== dependencies: "@types/sinonjs__fake-timers" "*" @@ -1379,55 +1394,6 @@ resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== -"@uniswap/lib@1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@uniswap/lib/-/lib-1.1.1.tgz#0afd29601846c16e5d082866cbb24a9e0758e6bc" - integrity sha512-2yK7sLpKIT91TiS5sewHtOa7YuM8IuBXVl4GZv2jZFys4D2sY7K5vZh6MqD25TPA95Od+0YzCVq6cTF2IKrOmg== - -"@uniswap/lib@^4.0.1-alpha": - version "4.0.1-alpha" - resolved "https://registry.yarnpkg.com/@uniswap/lib/-/lib-4.0.1-alpha.tgz#2881008e55f075344675b3bca93f020b028fbd02" - integrity sha512-f6UIliwBbRsgVLxIaBANF6w09tYqc6Y/qXdsrbEmXHyFA7ILiKrIwRFXe1yOg8M3cksgVsO9N7yuL2DdCGQKBA== - -"@uniswap/v2-core@1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@uniswap/v2-core/-/v2-core-1.0.0.tgz#e0fab91a7d53e8cafb5326ae4ca18351116b0844" - integrity sha512-BJiXrBGnN8mti7saW49MXwxDBRFiWemGetE58q8zgfnPPzQKq55ADltEILqOt6VFZ22kVeVKbF8gVd8aY3l7pA== - -"@uniswap/v2-core@1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@uniswap/v2-core/-/v2-core-1.0.1.tgz#af8f508bf183204779938969e2e54043e147d425" - integrity sha512-MtybtkUPSyysqLY2U210NBDeCHX+ltHt3oADGdjqoThZaFRDKwM6k1Nb3F0A3hk5hwuQvytFWhrWHOEq6nVJ8Q== - -"@uniswap/v2-periphery@1.1.0-beta.0": - version "1.1.0-beta.0" - resolved "https://registry.yarnpkg.com/@uniswap/v2-periphery/-/v2-periphery-1.1.0-beta.0.tgz#20a4ccfca22f1a45402303aedb5717b6918ebe6d" - integrity sha512-6dkwAMKza8nzqYiXEr2D86dgW3TTavUvCR0w2Tu33bAbM8Ah43LKAzH7oKKPRT5VJQaMi1jtkGs1E8JPor1n5g== - dependencies: - "@uniswap/lib" "1.1.1" - "@uniswap/v2-core" "1.0.0" - -"@uniswap/v3-core@1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@uniswap/v3-core/-/v3-core-1.0.0.tgz#6c24adacc4c25dceee0ba3ca142b35adbd7e359d" - integrity sha512-kSC4djMGKMHj7sLMYVnn61k9nu+lHjMIxgg9CDQT+s2QYLoA56GbSK9Oxr+qJXzzygbkrmuY6cwgP6cW2JXPFA== - -"@uniswap/v3-core@Uniswap/v3-core#36bc9101b91e2b8b5690f59e0911a85deb2d2480": - version "1.0.1-solc-0.8" - resolved "https://codeload.github.com/Uniswap/v3-core/tar.gz/36bc9101b91e2b8b5690f59e0911a85deb2d2480" - -"@uniswap/v3-periphery@^1.4.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@uniswap/v3-periphery/-/v3-periphery-1.4.0.tgz#9abb733fc596916718070c688b5f426fd8d01fe3" - integrity sha512-OXikenS40UIEa2XxQ+TyGpFFcTOfSW8eH3Ngy7sGOYp+7yr6uGU2UzomeTsqzagBEAXUDTwxqkk9oUS1KtWTUw== - dependencies: - "@openzeppelin/contracts" "3.4.1-solc-0.7-2" - "@uniswap/lib" "^4.0.1-alpha" - "@uniswap/v2-core" "1.0.1" - "@uniswap/v3-core" "1.0.0" - base64-sol "1.0.1" - hardhat-watcher "^2.1.1" - "@yarnpkg/lockfile@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" @@ -1514,9 +1480,9 @@ acorn@^6.0.7: integrity sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ== acorn@^8.4.1: - version "8.7.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.0.tgz#90951fde0f8f09df93549481e5fc141445b791cf" - integrity sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ== + version "8.8.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.0.tgz#88c0187620435c7f6015803f5539dae05a9dbea8" + integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w== adm-zip@^0.4.16: version "0.4.16" @@ -1526,7 +1492,7 @@ adm-zip@^0.4.16: aes-js@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" - integrity sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0= + integrity sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw== aes-js@^3.1.1: version "3.1.2" @@ -1558,11 +1524,16 @@ ajv@^6.10.2, ajv@^6.12.3, ajv@^6.6.1, ajv@^6.9.1: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ansi-colors@4.1.1, ansi-colors@^4.1.1: +ansi-colors@4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== +ansi-colors@^4.1.1: + version "4.1.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" + integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== + ansi-escapes@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" @@ -1578,12 +1549,12 @@ ansi-escapes@^4.3.0: ansi-regex@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= + integrity sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA== ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + version "3.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1" + integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw== ansi-regex@^4.1.0: version "4.1.1" @@ -1598,7 +1569,7 @@ ansi-regex@^5.0.1: ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= + integrity sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA== ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" @@ -1652,7 +1623,7 @@ argparse@^2.0.1: arr-diff@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" - integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= + integrity sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA== arr-flatten@^1.1.0: version "1.1.0" @@ -1662,12 +1633,12 @@ arr-flatten@^1.1.0: arr-union@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" - integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= + integrity sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q== array-back@^1.0.3, array-back@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/array-back/-/array-back-1.0.4.tgz#644ba7f095f7ffcf7c43b5f0dc39d3c1f03c063b" - integrity sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs= + integrity sha512-1WxbZvrmyhkNoeYcizokbmh5oiOCIfyvGtcqbK3Ls1v1fKcquzxnQSceOx6tzq7jmai2kFLWIpGND2cLhH6TPw== dependencies: typical "^2.6.0" @@ -1681,7 +1652,7 @@ array-back@^2.0.0: array-flatten@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= + integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== array-union@^2.1.0: version "2.1.0" @@ -1691,7 +1662,18 @@ array-union@^2.1.0: array-unique@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" - integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= + integrity sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ== + +array.prototype.reduce@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/array.prototype.reduce/-/array.prototype.reduce-1.0.4.tgz#8167e80089f78bff70a99e20bd4201d4663b0a6f" + integrity sha512-WnM+AjG/DvLRLo4DDl+r+SvCzYtD2Jd9oeBYMcEaI7t3fFrHY9M53/wdLcTvmZNQ70IU6Htj0emFkZ5TS+lrdw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.2" + es-array-method-boxes-properly "^1.0.0" + is-string "^1.0.7" asn1.js@^5.2.0: version "5.4.1" @@ -1713,7 +1695,7 @@ asn1@~0.2.3: assert-plus@1.0.0, assert-plus@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= + integrity sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw== assertion-error@^1.1.0: version "1.1.0" @@ -1723,12 +1705,12 @@ assertion-error@^1.1.0: assign-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" - integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= + integrity sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw== ast-parents@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/ast-parents/-/ast-parents-0.0.1.tgz#508fd0f05d0c48775d9eccda2e174423261e8dd3" - integrity sha1-UI/Q8F0MSHddnszaLhdEIyYejdM= + integrity sha512-XHusKxKz3zoYk1ic8Un640joHbFMhbqneyoZfoKnEGtf2ey9Uh/IdpcQplODdO/kENaMIWsD0nJm4+wX3UNLHA== astral-regex@^1.0.0: version "1.0.0" @@ -1757,19 +1739,19 @@ async@2.6.2: async@^1.4.2: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" - integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= + integrity sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w== async@^2.0.1, async@^2.1.2, async@^2.4.0, async@^2.5.0, async@^2.6.1: - version "2.6.3" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" - integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg== + version "2.6.4" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.4.tgz#706b7ff6084664cd7eae713f6f965433b5504221" + integrity sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA== dependencies: lodash "^4.17.14" asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== at-least-node@^1.0.0: version "1.0.0" @@ -1784,7 +1766,7 @@ atob@^2.1.2: aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= + integrity sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA== aws4@^1.8.0: version "1.11.0" @@ -1801,7 +1783,7 @@ axios@^0.21.1: babel-code-frame@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" - integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= + integrity sha512-XqYMR2dfdGMW+hd0IUZ2PwK+fGeFkOxZJ0wY+JaQAHzt1Zx8LcvpiZD2NiGkEG8qx0CfkAOr5xt76d1e8vG90g== dependencies: chalk "^1.1.3" esutils "^2.0.2" @@ -1849,7 +1831,7 @@ babel-generator@^6.26.0: babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664" - integrity sha1-zORReto1b0IgvK6KAsKzRvmlZmQ= + integrity sha512-gCtfYORSG1fUMX4kKraymq607FWgMWg+j42IFPc18kFQEsmtaibP4UrqsXt8FlEJle25HUd4tsoDR7H2wDhe9Q== dependencies: babel-helper-explode-assignable-expression "^6.24.1" babel-runtime "^6.22.0" @@ -1858,7 +1840,7 @@ babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: babel-helper-call-delegate@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" - integrity sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340= + integrity sha512-RL8n2NiEj+kKztlrVJM9JT1cXzzAdvWFh76xh/H1I4nKwunzE4INBXn8ieCZ+wh4zWszZk7NBS1s/8HR5jDkzQ== dependencies: babel-helper-hoist-variables "^6.24.1" babel-runtime "^6.22.0" @@ -1868,7 +1850,7 @@ babel-helper-call-delegate@^6.24.1: babel-helper-define-map@^6.24.1: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz#a5f56dab41a25f97ecb498c7ebaca9819f95be5f" - integrity sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8= + integrity sha512-bHkmjcC9lM1kmZcVpA5t2om2nzT/xiZpo6TJq7UlZ3wqKfzia4veeXbIhKvJXAMzhhEBd3cR1IElL5AenWEUpA== dependencies: babel-helper-function-name "^6.24.1" babel-runtime "^6.26.0" @@ -1878,7 +1860,7 @@ babel-helper-define-map@^6.24.1: babel-helper-explode-assignable-expression@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa" - integrity sha1-8luCz33BBDPFX3BZLVdGQArCLKo= + integrity sha512-qe5csbhbvq6ccry9G7tkXbzNtcDiH4r51rrPUbwwoTzZ18AqxWYRZT6AOmxrpxKnQBW0pYlBI/8vh73Z//78nQ== dependencies: babel-runtime "^6.22.0" babel-traverse "^6.24.1" @@ -1887,7 +1869,7 @@ babel-helper-explode-assignable-expression@^6.24.1: babel-helper-function-name@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" - integrity sha1-00dbjAPtmCQqJbSDUasYOZ01gKk= + integrity sha512-Oo6+e2iX+o9eVvJ9Y5eKL5iryeRdsIkwRYheCuhYdVHsdEQysbc2z2QkqCLIYnNxkT5Ss3ggrHdXiDI7Dhrn4Q== dependencies: babel-helper-get-function-arity "^6.24.1" babel-runtime "^6.22.0" @@ -1898,7 +1880,7 @@ babel-helper-function-name@^6.24.1: babel-helper-get-function-arity@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" - integrity sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0= + integrity sha512-WfgKFX6swFB1jS2vo+DwivRN4NB8XUdM3ij0Y1gnC21y1tdBoe6xjVnd7NSI6alv+gZXCtJqvrTeMW3fR/c0ng== dependencies: babel-runtime "^6.22.0" babel-types "^6.24.1" @@ -1906,7 +1888,7 @@ babel-helper-get-function-arity@^6.24.1: babel-helper-hoist-variables@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76" - integrity sha1-HssnaJydJVE+rbyZFKc/VAi+enY= + integrity sha512-zAYl3tqerLItvG5cKYw7f1SpvIxS9zi7ohyGHaI9cgDUjAT6YcY9jIEH5CstetP5wHIVSceXwNS7Z5BpJg+rOw== dependencies: babel-runtime "^6.22.0" babel-types "^6.24.1" @@ -1914,7 +1896,7 @@ babel-helper-hoist-variables@^6.24.1: babel-helper-optimise-call-expression@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" - integrity sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc= + integrity sha512-Op9IhEaxhbRT8MDXx2iNuMgciu2V8lDvYCNQbDGjdBNCjaMvyLf4wl4A3b8IgndCyQF8TwfgsQ8T3VD8aX1/pA== dependencies: babel-runtime "^6.22.0" babel-types "^6.24.1" @@ -1922,7 +1904,7 @@ babel-helper-optimise-call-expression@^6.24.1: babel-helper-regex@^6.24.1: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz#325c59f902f82f24b74faceed0363954f6495e72" - integrity sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI= + integrity sha512-VlPiWmqmGJp0x0oK27Out1D+71nVVCTSdlbhIVoaBAj2lUgrNjBCRR9+llO4lTSb2O4r7PJg+RobRkhBrf6ofg== dependencies: babel-runtime "^6.26.0" babel-types "^6.26.0" @@ -1931,7 +1913,7 @@ babel-helper-regex@^6.24.1: babel-helper-remap-async-to-generator@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b" - integrity sha1-XsWBgnrXI/7N04HxySg5BnbkVRs= + integrity sha512-RYqaPD0mQyQIFRu7Ho5wE2yvA/5jxqCIj/Lv4BXNq23mHYu/vxikOy2JueLiBxQknwapwrJeNCesvY0ZcfnlHg== dependencies: babel-helper-function-name "^6.24.1" babel-runtime "^6.22.0" @@ -1942,7 +1924,7 @@ babel-helper-remap-async-to-generator@^6.24.1: babel-helper-replace-supers@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a" - integrity sha1-v22/5Dk40XNpohPKiov3S2qQqxo= + integrity sha512-sLI+u7sXJh6+ToqDr57Bv973kCepItDhMou0xCP2YPVmR1jkHSCY+p1no8xErbV1Siz5QE8qKT1WIwybSWlqjw== dependencies: babel-helper-optimise-call-expression "^6.24.1" babel-messages "^6.23.0" @@ -1954,7 +1936,7 @@ babel-helper-replace-supers@^6.24.1: babel-helpers@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" - integrity sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI= + integrity sha512-n7pFrqQm44TCYvrCDb0MqabAF+JUBq+ijBvNMUxpkLjJaAu32faIexewMumrH5KLLJ1HDyT0PTEqRyAe/GwwuQ== dependencies: babel-runtime "^6.22.0" babel-template "^6.24.1" @@ -1962,36 +1944,36 @@ babel-helpers@^6.24.1: babel-messages@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" - integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4= + integrity sha512-Bl3ZiA+LjqaMtNYopA9TYE9HP1tQ+E5dLxE0XrAzcIJeK2UqF0/EaqXwBn9esd4UmTfEab+P+UYQ1GnioFIb/w== dependencies: babel-runtime "^6.22.0" babel-plugin-check-es2015-constants@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" - integrity sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o= + integrity sha512-B1M5KBP29248dViEo1owyY32lk1ZSH2DaNNrXLGt8lyjjHm7pBqAdQ7VKUPR6EEDO323+OvT3MQXbCin8ooWdA== dependencies: babel-runtime "^6.22.0" babel-plugin-syntax-async-functions@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" - integrity sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU= + integrity sha512-4Zp4unmHgw30A1eWI5EpACji2qMocisdXhAftfhXoSV9j0Tvj6nRFE3tOmRY912E0FMRm/L5xWE7MGVT2FoLnw== babel-plugin-syntax-exponentiation-operator@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" - integrity sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4= + integrity sha512-Z/flU+T9ta0aIEKl1tGEmN/pZiI1uXmCiGFRegKacQfEJzp7iNsKloZmyJlQr+75FCJtiFfGIK03SiCvCt9cPQ== babel-plugin-syntax-trailing-function-commas@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" - integrity sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM= + integrity sha512-Gx9CH3Q/3GKbhs07Bszw5fPTlU+ygrOGfAhEt7W2JICwufpC4SuO0mG0+4NykPBSYPMJhqvVlDBU17qB1D+hMQ== babel-plugin-transform-async-to-generator@^6.22.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761" - integrity sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E= + integrity sha512-7BgYJujNCg0Ti3x0c/DL3tStvnKS6ktIYOmo9wginv/dfZOrbSZ+qG4IRRHMBOzZ5Awb1skTiAsQXg/+IWkZYw== dependencies: babel-helper-remap-async-to-generator "^6.24.1" babel-plugin-syntax-async-functions "^6.8.0" @@ -2000,21 +1982,21 @@ babel-plugin-transform-async-to-generator@^6.22.0: babel-plugin-transform-es2015-arrow-functions@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" - integrity sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE= + integrity sha512-PCqwwzODXW7JMrzu+yZIaYbPQSKjDTAsNNlK2l5Gg9g4rz2VzLnZsStvp/3c46GfXpwkyufb3NCyG9+50FF1Vg== dependencies: babel-runtime "^6.22.0" babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" - integrity sha1-u8UbSflk1wy42OC5ToICRs46YUE= + integrity sha512-2+ujAT2UMBzYFm7tidUsYh+ZoIutxJ3pN9IYrF1/H6dCKtECfhmB8UkHVpyxDwkj0CYbQG35ykoz925TUnBc3A== dependencies: babel-runtime "^6.22.0" babel-plugin-transform-es2015-block-scoping@^6.23.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f" - integrity sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8= + integrity sha512-YiN6sFAQ5lML8JjCmr7uerS5Yc/EMbgg9G8ZNmk2E3nYX4ckHR01wrkeeMijEf5WHNK5TW0Sl0Uu3pv3EdOJWw== dependencies: babel-runtime "^6.26.0" babel-template "^6.26.0" @@ -2025,7 +2007,7 @@ babel-plugin-transform-es2015-block-scoping@^6.23.0: babel-plugin-transform-es2015-classes@^6.23.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" - integrity sha1-WkxYpQyclGHlZLSyo7+ryXolhNs= + integrity sha512-5Dy7ZbRinGrNtmWpquZKZ3EGY8sDgIVB4CU8Om8q8tnMLrD/m94cKglVcHps0BCTdZ0TJeeAWOq2TK9MIY6cag== dependencies: babel-helper-define-map "^6.24.1" babel-helper-function-name "^6.24.1" @@ -2040,7 +2022,7 @@ babel-plugin-transform-es2015-classes@^6.23.0: babel-plugin-transform-es2015-computed-properties@^6.22.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" - integrity sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM= + integrity sha512-C/uAv4ktFP/Hmh01gMTvYvICrKze0XVX9f2PdIXuriCSvUmV9j+u+BB9f5fJK3+878yMK6dkdcq+Ymr9mrcLzw== dependencies: babel-runtime "^6.22.0" babel-template "^6.24.1" @@ -2048,14 +2030,14 @@ babel-plugin-transform-es2015-computed-properties@^6.22.0: babel-plugin-transform-es2015-destructuring@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" - integrity sha1-mXux8auWf2gtKwh2/jWNYOdlxW0= + integrity sha512-aNv/GDAW0j/f4Uy1OEPZn1mqD+Nfy9viFGBfQ5bZyT35YqOiqx7/tXdyfZkJ1sC21NyEsBdfDY6PYmLHF4r5iA== dependencies: babel-runtime "^6.22.0" babel-plugin-transform-es2015-duplicate-keys@^6.22.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" - integrity sha1-c+s9MQypaePvnskcU3QabxV2Qj4= + integrity sha512-ossocTuPOssfxO2h+Z3/Ea1Vo1wWx31Uqy9vIiJusOP4TbF7tPs9U0sJ9pX9OJPf4lXRGj5+6Gkl/HHKiAP5ug== dependencies: babel-runtime "^6.22.0" babel-types "^6.24.1" @@ -2063,14 +2045,14 @@ babel-plugin-transform-es2015-duplicate-keys@^6.22.0: babel-plugin-transform-es2015-for-of@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" - integrity sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE= + integrity sha512-DLuRwoygCoXx+YfxHLkVx5/NpeSbVwfoTeBykpJK7JhYWlL/O8hgAK/reforUnZDlxasOrVPPJVI/guE3dCwkw== dependencies: babel-runtime "^6.22.0" babel-plugin-transform-es2015-function-name@^6.22.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" - integrity sha1-g0yJhTvDaxrw86TF26qU/Y6sqos= + integrity sha512-iFp5KIcorf11iBqu/y/a7DK3MN5di3pNCzto61FqCNnUX4qeBwcV1SLqe10oXNnCaxBUImX3SckX2/o1nsrTcg== dependencies: babel-helper-function-name "^6.24.1" babel-runtime "^6.22.0" @@ -2079,14 +2061,14 @@ babel-plugin-transform-es2015-function-name@^6.22.0: babel-plugin-transform-es2015-literals@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" - integrity sha1-T1SgLWzWbPkVKAAZox0xklN3yi4= + integrity sha512-tjFl0cwMPpDYyoqYA9li1/7mGFit39XiNX5DKC/uCNjBctMxyL1/PT/l4rSlbvBG1pOKI88STRdUsWXB3/Q9hQ== dependencies: babel-runtime "^6.22.0" babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015-modules-amd@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154" - integrity sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ= + integrity sha512-LnIIdGWIKdw7zwckqx+eGjcS8/cl8D74A3BpJbGjKTFFNJSMrjN4bIh22HY1AlkUbeLG6X6OZj56BDvWD+OeFA== dependencies: babel-plugin-transform-es2015-modules-commonjs "^6.24.1" babel-runtime "^6.22.0" @@ -2105,7 +2087,7 @@ babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-e babel-plugin-transform-es2015-modules-systemjs@^6.23.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" - integrity sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM= + integrity sha512-ONFIPsq8y4bls5PPsAWYXH/21Hqv64TBxdje0FvU3MhIV6QM2j5YS7KvAzg/nTIVLot2D2fmFQrFWCbgHlFEjg== dependencies: babel-helper-hoist-variables "^6.24.1" babel-runtime "^6.22.0" @@ -2114,7 +2096,7 @@ babel-plugin-transform-es2015-modules-systemjs@^6.23.0: babel-plugin-transform-es2015-modules-umd@^6.23.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" - integrity sha1-rJl+YoXNGO1hdq22B9YCNErThGg= + integrity sha512-LpVbiT9CLsuAIp3IG0tfbVo81QIhn6pE8xBJ7XSeCtFlMltuar5VuBV6y6Q45tpui9QWcy5i0vLQfCfrnF7Kiw== dependencies: babel-plugin-transform-es2015-modules-amd "^6.24.1" babel-runtime "^6.22.0" @@ -2123,7 +2105,7 @@ babel-plugin-transform-es2015-modules-umd@^6.23.0: babel-plugin-transform-es2015-object-super@^6.22.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" - integrity sha1-JM72muIcuDp/hgPa0CH1cusnj40= + integrity sha512-8G5hpZMecb53vpD3mjs64NhI1au24TAmokQ4B+TBFBjN9cVoGoOvotdrMMRmHvVZUEvqGUPWL514woru1ChZMA== dependencies: babel-helper-replace-supers "^6.24.1" babel-runtime "^6.22.0" @@ -2131,7 +2113,7 @@ babel-plugin-transform-es2015-object-super@^6.22.0: babel-plugin-transform-es2015-parameters@^6.23.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" - integrity sha1-V6w1GrScrxSpfNE7CfZv3wpiXys= + integrity sha512-8HxlW+BB5HqniD+nLkQ4xSAVq3bR/pcYW9IigY+2y0dI+Y7INFeTbfAQr+63T3E4UDsZGjyb+l9txUnABWxlOQ== dependencies: babel-helper-call-delegate "^6.24.1" babel-helper-get-function-arity "^6.24.1" @@ -2143,7 +2125,7 @@ babel-plugin-transform-es2015-parameters@^6.23.0: babel-plugin-transform-es2015-shorthand-properties@^6.22.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" - integrity sha1-JPh11nIch2YbvZmkYi5R8U3jiqA= + integrity sha512-mDdocSfUVm1/7Jw/FIRNw9vPrBQNePy6wZJlR8HAUBLybNp1w/6lr6zZ2pjMShee65t/ybR5pT8ulkLzD1xwiw== dependencies: babel-runtime "^6.22.0" babel-types "^6.24.1" @@ -2151,14 +2133,14 @@ babel-plugin-transform-es2015-shorthand-properties@^6.22.0: babel-plugin-transform-es2015-spread@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" - integrity sha1-1taKmfia7cRTbIGlQujdnxdG+NE= + integrity sha512-3Ghhi26r4l3d0Js933E5+IhHwk0A1yiutj9gwvzmFbVV0sPMYk2lekhOufHBswX7NCoSeF4Xrl3sCIuSIa+zOg== dependencies: babel-runtime "^6.22.0" babel-plugin-transform-es2015-sticky-regex@^6.22.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" - integrity sha1-AMHNsaynERLN8M9hJsLta0V8zbw= + integrity sha512-CYP359ADryTo3pCsH0oxRo/0yn6UsEZLqYohHmvLQdfS9xkf+MbCzE3/Kolw9OYIY4ZMilH25z/5CbQbwDD+lQ== dependencies: babel-helper-regex "^6.24.1" babel-runtime "^6.22.0" @@ -2167,21 +2149,21 @@ babel-plugin-transform-es2015-sticky-regex@^6.22.0: babel-plugin-transform-es2015-template-literals@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" - integrity sha1-qEs0UPfp+PH2g51taH2oS7EjbY0= + integrity sha512-x8b9W0ngnKzDMHimVtTfn5ryimars1ByTqsfBDwAqLibmuuQY6pgBQi5z1ErIsUOWBdw1bW9FSz5RZUojM4apg== dependencies: babel-runtime "^6.22.0" babel-plugin-transform-es2015-typeof-symbol@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" - integrity sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I= + integrity sha512-fz6J2Sf4gYN6gWgRZaoFXmq93X+Li/8vf+fb0sGDVtdeWvxC9y5/bTD7bvfWMEq6zetGEHpWjtzRGSugt5kNqw== dependencies: babel-runtime "^6.22.0" babel-plugin-transform-es2015-unicode-regex@^6.22.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" - integrity sha1-04sS9C6nMj9yk4fxinxa4frrNek= + integrity sha512-v61Dbbihf5XxnYjtBN04B/JBvsScY37R1cZT5r9permN1cp+b70DY3Ib3fIkgn1DI9U3tGgBJZVD8p/mE/4JbQ== dependencies: babel-helper-regex "^6.24.1" babel-runtime "^6.22.0" @@ -2190,7 +2172,7 @@ babel-plugin-transform-es2015-unicode-regex@^6.22.0: babel-plugin-transform-exponentiation-operator@^6.22.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e" - integrity sha1-KrDJx/MJj6SJB3cruBP+QejeOg4= + integrity sha512-LzXDmbMkklvNhprr20//RStKVcT8Cu+SQtX18eMHLhjHf2yFzwtQ0S2f0jQ+89rokoNdmwoSqYzAhq86FxlLSQ== dependencies: babel-helper-builder-binary-assignment-operator-visitor "^6.24.1" babel-plugin-syntax-exponentiation-operator "^6.8.0" @@ -2199,14 +2181,14 @@ babel-plugin-transform-exponentiation-operator@^6.22.0: babel-plugin-transform-regenerator@^6.22.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f" - integrity sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8= + integrity sha512-LS+dBkUGlNR15/5WHKe/8Neawx663qttS6AGqoOUhICc9d1KciBvtrQSuc0PI+CxQ2Q/S1aKuJ+u64GtLdcEZg== dependencies: regenerator-transform "^0.10.0" babel-plugin-transform-strict-mode@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" - integrity sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g= + integrity sha512-j3KtSpjyLSJxNoCDrhwiJad8kw0gJ9REGj8/CqL0HeRyLnvUNYV9zcqluL6QJSXh3nfsLEmSLvwRfGzrgR96Pw== dependencies: babel-runtime "^6.22.0" babel-types "^6.24.1" @@ -2250,7 +2232,7 @@ babel-preset-env@^1.7.0: babel-register@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" - integrity sha1-btAhFz4vy0htestFxgCahW9kcHE= + integrity sha512-veliHlHX06wjaeY8xNITbveXSiI+ASFnOqvne/LaIJIqOWi2Ogmj91KOugEz/hoh/fwMhXNBJPCv8Xaz5CyM4A== dependencies: babel-core "^6.26.0" babel-runtime "^6.26.0" @@ -2263,7 +2245,7 @@ babel-register@^6.26.0: babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" - integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= + integrity sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g== dependencies: core-js "^2.4.0" regenerator-runtime "^0.11.0" @@ -2271,7 +2253,7 @@ babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0: babel-template@^6.24.1, babel-template@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" - integrity sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI= + integrity sha512-PCOcLFW7/eazGUKIoqH97sO9A2UYMahsn/yRQ7uOk37iutwjq7ODtcTNF+iFDSHNfkctqsLRjLP7URnOx0T1fg== dependencies: babel-runtime "^6.26.0" babel-traverse "^6.26.0" @@ -2282,7 +2264,7 @@ babel-template@^6.24.1, babel-template@^6.26.0: babel-traverse@^6.24.1, babel-traverse@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" - integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4= + integrity sha512-iSxeXx7apsjCHe9c7n8VtRXGzI2Bk1rBSOJgCCjfyXb6v1aCqE1KSEpq/8SXuVN8Ka/Rh1WDTF0MDzkvTA4MIA== dependencies: babel-code-frame "^6.26.0" babel-messages "^6.23.0" @@ -2297,7 +2279,7 @@ babel-traverse@^6.24.1, babel-traverse@^6.26.0: babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" - integrity sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc= + integrity sha512-zhe3V/26rCWsEZK8kZN+HaQj5yQ1CilTObixFzKW1UWjqG7618Twz6YEsCnjfg5gBcJh02DrpCkS9h98ZqDY+g== dependencies: babel-runtime "^6.26.0" esutils "^2.0.2" @@ -2307,7 +2289,7 @@ babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: babelify@^7.3.0: version "7.3.0" resolved "https://registry.yarnpkg.com/babelify/-/babelify-7.3.0.tgz#aa56aede7067fd7bd549666ee16dc285087e88e5" - integrity sha1-qlau3nBn/XvVSWZu4W3ChQh+iOU= + integrity sha512-vID8Fz6pPN5pJMdlUnNFSfrlcx5MUule4k9aKs/zbZPyXxMTcRrB0M4Tarw22L8afr8eYSWxDPYCob3TdrqtlA== dependencies: babel-core "^6.0.14" object-assign "^4.0.0" @@ -2320,7 +2302,7 @@ babylon@^6.18.0: backoff@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/backoff/-/backoff-2.5.0.tgz#f616eda9d3e4b66b8ca7fca79f695722c5f8e26f" - integrity sha1-9hbtqdPktmuMp/ynn2lXIsX44m8= + integrity sha512-wC5ihrnUXmR2douXmXLCe5O3zg3GKIyvRi/hi58a/XyRxVI+3/yM0PYueQOZXPXQ9pxBislYkw+sF9b7C/RuMA== dependencies: precond "0.2" @@ -2341,11 +2323,6 @@ base64-js@^1.3.1: resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== -base64-sol@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/base64-sol/-/base64-sol-1.0.1.tgz#91317aa341f0bc763811783c5729f1c2574600f6" - integrity sha512-ld3cCNMeXt4uJXmLZBHFGMvVpK9KsLVEhPpFRXnvSVAqABKbuNZg/+dsq3NuM+wxFLb/UrVkz7m1ciWmkMfTbg== - base@^0.11.1: version "0.11.2" resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" @@ -2362,7 +2339,7 @@ base@^0.11.1: bcrypt-pbkdf@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" - integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= + integrity sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w== dependencies: tweetnacl "^0.14.3" @@ -2372,9 +2349,9 @@ bech32@1.1.4: integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== bignumber.js@^9.0.0, bignumber.js@^9.0.1: - version "9.0.2" - resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.2.tgz#71c6c6bed38de64e24a65ebe16cfcf23ae693673" - integrity sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw== + version "9.1.0" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.0.tgz#8d340146107fe3a6cb8d40699643c302e8773b62" + integrity sha512-4LwHK4nfDOraBCtst+wOWIHbu1vhvAPJK8g8nROd4iuc3PSEjWif/qwbkh8jwCJz6yDBvtU4KPynETgrfh7y3A== binary-extensions@^2.0.0: version "2.2.0" @@ -2405,33 +2382,35 @@ bluebird@^3.5.0, bluebird@^3.5.2: bn.js@4.11.6: version "4.11.6" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" - integrity sha1-UzRK2xRhehP26N0s4okF0cC6MhU= + integrity sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA== bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.10.0, bn.js@^4.11.0, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.11.9, bn.js@^4.8.0: version "4.12.0" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== -bn.js@^5.0.0, bn.js@^5.1.1, bn.js@^5.1.2, bn.js@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002" - integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== +bn.js@^5.0.0, bn.js@^5.1.1, bn.js@^5.1.2, bn.js@^5.2.0, bn.js@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" + integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== -body-parser@1.19.2, body-parser@^1.16.0: - version "1.19.2" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.2.tgz#4714ccd9c157d44797b8b5607d72c0b89952f26e" - integrity sha512-SAAwOxgoCKMGs9uUAUFHygfLAyaniaoun6I8mFY9pRAJL9+Kec34aU+oIjDhTycub1jozEfEwx1W1IuOYxVSFw== +body-parser@1.20.0, body-parser@^1.16.0: + version "1.20.0" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.0.tgz#3de69bd89011c11573d7bfee6a64f11b6bd27cc5" + integrity sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg== dependencies: bytes "3.1.2" content-type "~1.0.4" debug "2.6.9" - depd "~1.1.2" - http-errors "1.8.1" + depd "2.0.0" + destroy "1.2.0" + http-errors "2.0.0" iconv-lite "0.4.24" - on-finished "~2.3.0" - qs "6.9.7" - raw-body "2.4.3" + on-finished "2.4.1" + qs "6.10.3" + raw-body "2.5.1" type-is "~1.6.18" + unpipe "1.0.0" brace-expansion@^1.1.7: version "1.1.11" @@ -2441,6 +2420,13 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + braces@^2.3.1: version "2.3.2" resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" @@ -2467,7 +2453,7 @@ braces@^3.0.2, braces@~3.0.2: brorand@^1.0.1, brorand@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= + integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== browser-stdout@1.3.1: version "1.3.1" @@ -2539,7 +2525,7 @@ browserslist@^3.2.6: bs58@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" - integrity sha1-vhYedsNU9veIrkBx9j806MTwpCo= + integrity sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw== dependencies: base-x "^3.0.2" @@ -2560,17 +2546,17 @@ buffer-from@^1.0.0: buffer-reverse@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/buffer-reverse/-/buffer-reverse-1.0.1.tgz#49283c8efa6f901bc01fa3304d06027971ae2f60" - integrity sha1-SSg8jvpvkBvAH6MwTQYCeXGuL2A= + integrity sha512-M87YIUBsZ6N924W57vDwT/aOu8hw7ZgdByz6ijksLjmHJELBASmYTTlNHRgjE+pTsT9oJXGaDSgqqwfdHotDUg== buffer-to-arraybuffer@^0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz#6064a40fa76eb43c723aba9ef8f6e1216d10511a" - integrity sha1-YGSkD6dutDxyOrqe+PbhIW0QURo= + integrity sha512-3dthu5CYiVB1DEJp61FtApNnNndTckcqe4pFcLdvHtrpG+kcyekCJKg4MRiDcFW7A6AODnXB9U4dwQiCW5kzJQ== buffer-xor@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= + integrity sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ== buffer-xor@^2.0.1: version "2.0.2" @@ -2602,14 +2588,14 @@ bytes@3.1.2: bytewise-core@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/bytewise-core/-/bytewise-core-1.2.3.tgz#3fb410c7e91558eb1ab22a82834577aa6bd61d42" - integrity sha1-P7QQx+kVWOsasiqCg0V3qmvWHUI= + integrity sha512-nZD//kc78OOxeYtRlVk8/zXqTB4gf/nlguL1ggWA8FuchMyOxcyHR4QPQZMUmA7czC+YnaBrPUCubqAWe50DaA== dependencies: typewise-core "^1.2" bytewise@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/bytewise/-/bytewise-1.1.0.tgz#1d13cbff717ae7158094aa881b35d081b387253e" - integrity sha1-HRPL/3F65xWAlKqIGzXQgbOHJT4= + integrity sha512-rHuuseJ9iQ0na6UDhnrRVDh8YnWVlU6xM3VH6q/+yHDeUH2zIhUzP+2/h3LIrhLDBtTqzWpE3p3tP/boefskKQ== dependencies: bytewise-core "^1.2.2" typewise "^1.0.3" @@ -2645,7 +2631,7 @@ cacheable-request@^6.0.0: cachedown@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/cachedown/-/cachedown-1.0.0.tgz#d43f036e4510696b31246d7db31ebf0f7ac32d15" - integrity sha1-1D8DbkUQaWsxJG19sx6/D3rDLRU= + integrity sha512-t+yVk82vQWCJF3PsWHMld+jhhjkkWjcAzz8NbFx1iULOXWl8Tm/FdM4smZNVw3MRr0X+lVTx9PKzvEn4Ng19RQ== dependencies: abstract-leveldown "^2.4.1" lru-cache "^3.2.0" @@ -2661,21 +2647,21 @@ call-bind@^1.0.0, call-bind@^1.0.2, call-bind@~1.0.2: caller-callsite@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" - integrity sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ= + integrity sha512-JuG3qI4QOftFsZyOn1qq87fq5grLIyk1JYd5lJmdA+fG7aQ9pA/i3JIJGcO3q0MrRcHlOt1U+ZeHW8Dq9axALQ== dependencies: callsites "^2.0.0" caller-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-2.0.0.tgz#468f83044e369ab2010fac5f06ceee15bb2cb1f4" - integrity sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ= + integrity sha512-MCL3sf6nCSXOwCTzvPKhN18TU7AHTvdtam8DAogxcrJ8Rjfbbg7Lgng64H9Iy+vUV6VGFClN/TyxBkAebLRR4A== dependencies: caller-callsite "^2.0.0" callsites@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" - integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= + integrity sha512-ksWePWBloaWPxJYQ8TL0JHvtci6G5QTKwQ95RcWAa/lzoAKuAOflGdAK92hpHXjkwb8zLxoLNUoNYZgVsaJzvQ== callsites@^3.0.0: version "3.1.0" @@ -2685,7 +2671,7 @@ callsites@^3.0.0: camelcase@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" - integrity sha1-MvxLn82vhF/N9+c7uXysImHwqwo= + integrity sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg== camelcase@^6.0.0: version "6.3.0" @@ -2693,14 +2679,14 @@ camelcase@^6.0.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30000844: - version "1.0.30001320" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001320.tgz#8397391bec389b8ccce328636499b7284ee13285" - integrity sha512-MWPzG54AGdo3nWx7zHZTefseM5Y1ccM7hlQKHRqJkPozUaw3hNbBTMmLn16GG2FUzjR13Cr3NPfhIieX5PzXDA== + version "1.0.30001375" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001375.tgz#8e73bc3d1a4c800beb39f3163bf0190d7e5d7672" + integrity sha512-kWIMkNzLYxSvnjy0hL8w1NOaWNr2rn39RTAVyIwcw8juu60bZDWiF1/loOYANzjtJmy6qPgNmn38ro5Pygagdw== caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= + integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== cbor@^5.0.2: version "5.2.0" @@ -2732,7 +2718,7 @@ chai@4.3.4: chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= + integrity sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A== dependencies: ansi-styles "^2.2.1" escape-string-regexp "^1.0.2" @@ -2765,16 +2751,16 @@ chardet@^0.7.0: check-error@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" - integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= + integrity sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA== checkpoint-store@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/checkpoint-store/-/checkpoint-store-1.1.0.tgz#04e4cb516b91433893581e6d4601a78e9552ea06" - integrity sha1-BOTLUWuRQziTWB5tRgGnjpVS6gY= + integrity sha512-J/NdY2WvIx654cc6LWSq/IYFFCUf75fFTgwzFnmbqyORH4MwgiQCgswLLKBGzmsyTI5V7i5bp/So6sMbDWhedg== dependencies: functional-red-black-tree "^1.0.1" -chokidar@3.5.3, chokidar@^3.4.0, chokidar@^3.4.3, chokidar@^3.5.2: +chokidar@3.5.3, chokidar@^3.4.0, chokidar@^3.5.2: version "3.5.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== @@ -2841,7 +2827,7 @@ clean-stack@^2.0.0: cli-cursor@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" - integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= + integrity sha512-8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw== dependencies: restore-cursor "^2.0.0" @@ -2853,7 +2839,7 @@ cli-width@^2.0.0: cliui@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" - integrity sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0= + integrity sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w== dependencies: string-width "^1.0.1" strip-ansi "^3.0.1" @@ -2869,26 +2855,26 @@ cliui@^7.0.2: wrap-ansi "^7.0.0" clone-response@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" - integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= + version "1.0.3" + resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.3.tgz#af2032aa47816399cf5f0a1d0db902f517abb8c3" + integrity sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA== dependencies: mimic-response "^1.0.0" clone@2.1.2, clone@^2.0.0: version "2.1.2" resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" - integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18= + integrity sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w== code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= + integrity sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA== collection-visit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" - integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= + integrity sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw== dependencies: map-visit "^1.0.0" object-visit "^1.0.0" @@ -2910,7 +2896,7 @@ color-convert@^2.0.1: color-name@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== color-name@~1.1.4: version "1.1.4" @@ -2961,7 +2947,7 @@ component-emitter@^1.2.1: concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== concat-stream@^1.5.1: version "1.6.2" @@ -3004,9 +2990,14 @@ convert-source-map@^1.5.1: cookie-signature@1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" - integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= + integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== + +cookie@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b" + integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== -cookie@0.4.2, cookie@^0.4.1: +cookie@^0.4.1: version "0.4.2" resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== @@ -3019,12 +3010,12 @@ cookiejar@^2.1.1: copy-descriptor@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" - integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= + integrity sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw== core-js-pure@^3.0.1: - version "3.21.1" - resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.21.1.tgz#8c4d1e78839f5f46208de7230cebfb72bc3bdb51" - integrity sha512-12VZfFIu+wyVbBebyHmRTuEE/tZrB4tJToWcwAMcsp3h4+sHR+fMJWbKpYiCRWlhFBq+KNyO8rIV9rTkeVmznQ== + version "3.24.1" + resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.24.1.tgz#8839dde5da545521bf282feb7dc6d0b425f39fd3" + integrity sha512-r1nJk41QLLPyozHUUPmILCEMtMw24NG4oWK6RbsDdjzQgg9ZvrUsPBj1MnG0wXXp1DCDU6j+wUvEmBSrtRbLXg== core-js@^2.4.0, core-js@^2.5.0: version "2.6.12" @@ -3034,7 +3025,7 @@ core-js@^2.4.0, core-js@^2.5.0: core-util-is@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ== core-util-is@~1.0.0: version "1.0.3" @@ -3060,12 +3051,9 @@ cosmiconfig@^5.0.7: parse-json "^4.0.0" crc-32@^1.2.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.1.tgz#436d2bcaad27bcb6bd073a2587139d3024a16460" - integrity sha512-Dn/xm/1vFFgs3nfrpEVScHoIslO9NZRITWGz/1E/St6u4xw99vfZzVkW0OSnzx2h9egej9xwMCEut6sqwokM/w== - dependencies: - exit-on-epipe "~1.0.1" - printj "~1.3.1" + version "1.2.2" + resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff" + integrity sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ== create-ecdh@^4.0.0: version "4.0.4" @@ -3104,12 +3092,12 @@ create-require@^1.1.0: integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== cross-fetch@^2.1.0, cross-fetch@^2.1.1: - version "2.2.5" - resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-2.2.5.tgz#afaf5729f3b6c78d89c9296115c9f142541a5705" - integrity sha512-xqYAhQb4NhCJSRym03dwxpP1bYXpK3y7UN83Bo2WFi3x1Zmzn0SL/6xGoPr+gpt4WmNrgCCX3HPysvOwFOW36w== + version "2.2.6" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-2.2.6.tgz#2ef0bb39a24ac034787965c457368a28730e220a" + integrity sha512-9JZz+vXCmfKUZ68zAptS7k4Nu8e2qcibe7WVZYps7sAgk5R8GYTc+T1WR0v1rlP9HxgARmOX1UTIJZFytajpNA== dependencies: - node-fetch "2.6.1" - whatwg-fetch "2.0.4" + node-fetch "^2.6.7" + whatwg-fetch "^2.0.4" cross-spawn@^6.0.5: version "6.0.5" @@ -3155,7 +3143,7 @@ d@1, d@^1.0.1: dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= + integrity sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g== dependencies: assert-plus "^1.0.0" @@ -3173,20 +3161,13 @@ debug@3.2.6: dependencies: ms "^2.1.1" -debug@4, debug@^4.0.1, debug@^4.1.1, debug@^4.3.2, debug@^4.3.3: +debug@4, debug@4.3.4, debug@^4.0.1, debug@^4.1.1, debug@^4.3.2, debug@^4.3.3: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== dependencies: ms "2.1.2" -debug@4.3.3: - version "4.3.3" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" - integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== - dependencies: - ms "2.1.2" - debug@^3.1.0: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" @@ -3197,7 +3178,7 @@ debug@^3.1.0: decamelize@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= + integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== decamelize@^4.0.0: version "4.0.0" @@ -3212,12 +3193,12 @@ decimal.js@10.3.1: decode-uri-component@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" - integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= + integrity sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og== decompress-response@^3.2.0, decompress-response@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" - integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M= + integrity sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA== dependencies: mimic-response "^1.0.0" @@ -3273,24 +3254,25 @@ deferred-leveldown@~5.3.0: abstract-leveldown "~6.2.1" inherits "^2.0.3" -define-properties@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" - integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== +define-properties@^1.1.3, define-properties@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.4.tgz#0b14d7bd7fbeb2f3572c3a7eda80ea5d57fb05b1" + integrity sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA== dependencies: - object-keys "^1.0.12" + has-property-descriptors "^1.0.0" + object-keys "^1.1.1" define-property@^0.2.5: version "0.2.5" resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" - integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= + integrity sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA== dependencies: is-descriptor "^0.1.0" define-property@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" - integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= + integrity sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA== dependencies: is-descriptor "^1.0.0" @@ -3305,23 +3287,18 @@ define-property@^2.0.2: defined@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" - integrity sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM= + integrity sha512-Y2caI5+ZwS5c3RiNDJ6u53VhQHv+hHKwhkI1iHvceKUHw9Df6EK2zRLfjejRgMuCuxK7PfSWIMwWecceVvThjQ== delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= + integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== depd@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== -depd@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" - integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= - des.js@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" @@ -3330,15 +3307,15 @@ des.js@^1.0.0: inherits "^2.0.1" minimalistic-assert "^1.0.0" -destroy@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" - integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= +destroy@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" + integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== detect-indent@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" - integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg= + integrity sha512-BDKtmHlOzwI7iRuEkhzsnPoi5ypEhWAJB5RvHWe1kMr06js3uK5B3734i3ui5Yd+wOJV1cpE4JnivPD283GU/A== dependencies: repeating "^2.0.0" @@ -3393,14 +3370,14 @@ dotignore@~0.1.2: minimatch "^3.0.4" duplexer3@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" - integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= + version "0.1.5" + resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.5.tgz#0b5e4d7bad5de8901ea4440624c8e1d20099217e" + integrity sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA== ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" - integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= + integrity sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw== dependencies: jsbn "~0.1.0" safer-buffer "^2.1.0" @@ -3408,12 +3385,12 @@ ecc-jsbn@~0.1.1: ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= + integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== electron-to-chromium@^1.3.47: - version "1.4.94" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.94.tgz#f19206c977361264a51d53a7ea7ef861a94baa10" - integrity sha512-CoOKsuACoa0PAG3hQXxbh/XDiFcjGuSyGKUi09cjMHOt6RCi7/EXgXhaFF3I+aC89Omudqmkzd0YOQKxwtf/Bg== + version "1.4.215" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.215.tgz#553372e74bde3164290d61f6792f93e443b16733" + integrity sha512-vqZxT8C5mlDZ//hQFhneHmOLnj1LhbzxV0+I1yqHV8SB1Oo4Y5Ne9+qQhwHl7O1s9s9cRuo2l5CoLEHdhMTwZg== elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.3, elliptic@^6.5.4: version "6.5.4" @@ -3451,7 +3428,7 @@ encode-utf8@^1.0.2: encodeurl@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= + integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== encoding-down@5.0.4, encoding-down@~5.0.0: version "5.0.4" @@ -3514,31 +3491,39 @@ error-ex@^1.2.0, error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.19.1: - version "1.19.1" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.19.1.tgz#d4885796876916959de78edaa0df456627115ec3" - integrity sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w== +es-abstract@^1.19.0, es-abstract@^1.19.2, es-abstract@^1.19.5, es-abstract@^1.20.1: + version "1.20.1" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.1.tgz#027292cd6ef44bd12b1913b828116f54787d1814" + integrity sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA== dependencies: 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-symbols "^1.0.2" + 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.1" + is-negative-zero "^2.0.2" is-regex "^1.1.4" - is-shared-array-buffer "^1.0.1" + is-shared-array-buffer "^1.0.2" is-string "^1.0.7" - is-weakref "^1.0.1" - object-inspect "^1.11.0" + is-weakref "^1.0.2" + object-inspect "^1.12.0" object-keys "^1.1.1" object.assign "^4.1.2" - string.prototype.trimend "^1.0.4" - string.prototype.trimstart "^1.0.4" - unbox-primitive "^1.0.1" + regexp.prototype.flags "^1.4.3" + string.prototype.trimend "^1.0.5" + string.prototype.trimstart "^1.0.5" + unbox-primitive "^1.0.2" + +es-array-method-boxes-properly@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz#873f3e84418de4ee19c5be752990b2e44718d09e" + integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA== es-to-primitive@^1.2.1: version "1.2.1" @@ -3550,9 +3535,9 @@ es-to-primitive@^1.2.1: is-symbol "^1.0.2" es5-ext@^0.10.35, es5-ext@^0.10.50: - version "0.10.59" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.59.tgz#71038939730eb6f4f165f1421308fb60be363bc6" - integrity sha512-cOgyhW0tIJyQY1Kfw6Kr0viu9ZlUctVchRMZ7R0HiH3dxTSp5zJDLecwxUqPUrGKMsgBI1wd1FL+d9Jxfi4cLw== + version "0.10.62" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5" + integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA== dependencies: es6-iterator "^2.0.3" es6-symbol "^3.1.3" @@ -3561,7 +3546,7 @@ es5-ext@^0.10.35, es5-ext@^0.10.50: es6-iterator@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" - integrity sha1-p96IkUGgWpSwhUQDstCg+/qY87c= + integrity sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g== dependencies: d "1" es5-ext "^0.10.35" @@ -3583,7 +3568,7 @@ escalade@^3.1.1: escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= + integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== escape-string-regexp@4.0.0, escape-string-regexp@^4.0.0: version "4.0.0" @@ -3593,7 +3578,7 @@ escape-string-regexp@4.0.0, escape-string-regexp@^4.0.0: escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== eslint-config-prettier@8.3.0: version "8.3.0" @@ -3740,7 +3725,7 @@ esutils@^2.0.2: etag@~1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= + integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== eth-block-tracker@^3.0.0: version "3.0.1" @@ -3758,7 +3743,7 @@ eth-block-tracker@^3.0.0: eth-ens-namehash@2.0.8, eth-ens-namehash@^2.0.8: version "2.0.8" resolved "https://registry.yarnpkg.com/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz#229ac46eca86d52e0c991e7cb2aef83ff0f68bcf" - integrity sha1-IprEbsqG1S4MmR58sq74P/D2i88= + integrity sha512-VWEI1+KJfz4Km//dadyvBBoBeSQ0MHTXPvr8UIXiLW6IanxvAV+DmlZAijZwAyggqGUfwQBeHf7tc9wzc1piSw== dependencies: idna-uts46-hx "^2.3.1" js-sha3 "^0.5.7" @@ -3816,7 +3801,7 @@ eth-lib@^0.1.26: eth-query@^2.0.2, eth-query@^2.1.0, eth-query@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/eth-query/-/eth-query-2.1.2.tgz#d6741d9000106b51510c72db92d6365456a6da5e" - integrity sha1-1nQdkAAQa1FRDHLbktY2VFam2l4= + integrity sha512-srES0ZcvwkR/wd5OQBRA1bIJMww1skfGS0s8wlwK3/oNP4+wnds60krvu5R1QbpRQjMmpG5OMIWro5s7gvDPsA== dependencies: json-rpc-random-id "^1.0.0" xtend "^4.0.1" @@ -3836,7 +3821,7 @@ eth-sig-util@3.0.0: eth-sig-util@^1.4.2: version "1.4.2" resolved "https://registry.yarnpkg.com/eth-sig-util/-/eth-sig-util-1.4.2.tgz#8d958202c7edbaae839707fba6f09ff327606210" - integrity sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA= + integrity sha512-iNZ576iTOGcfllftB73cPB5AN+XUQAT/T8xzsILsghXC1o8gJUqe3RHlcDqagu+biFpYQ61KQrZZJza8eRSYqw== dependencies: ethereumjs-abi "git+https://github.com/ethereumjs/ethereumjs-abi.git" ethereumjs-util "^5.1.1" @@ -3882,9 +3867,9 @@ ethereum-common@0.2.0: ethereum-common@^0.0.18: version "0.0.18" resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.0.18.tgz#2fdc3576f232903358976eb39da783213ff9523f" - integrity sha1-L9w1dvIykDNYl26znaeDIT/5Uj8= + integrity sha512-EoltVQTRNg2Uy4o84qpa2aXymXDJhxm7eos/ACOg0DG4baAbMjhbdAEsx9GeE8sC3XCxnYvrrzZDH8D8MtA2iQ== -ethereum-cryptography@^0.1.2, ethereum-cryptography@^0.1.3: +ethereum-cryptography@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz#8d6143cfc3d74bf79bbd8edecdf29e4ae20dd191" integrity sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ== @@ -3905,6 +3890,16 @@ ethereum-cryptography@^0.1.2, ethereum-cryptography@^0.1.3: secp256k1 "^4.0.1" setimmediate "^1.0.5" +ethereum-cryptography@^1.0.3: + version "1.1.2" + resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-1.1.2.tgz#74f2ac0f0f5fe79f012c889b3b8446a9a6264e6d" + integrity sha512-XDSJlg4BD+hq9N2FjvotwUET9Tfxpxc3kWGE2AqUG5vcbeunnbImVk3cj6e/xT3phdW21mE8R5IugU4fspQDcQ== + dependencies: + "@noble/hashes" "1.1.2" + "@noble/secp256k1" "1.6.3" + "@scure/bip32" "1.1.0" + "@scure/bip39" "1.1.0" + ethereum-waffle@3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/ethereum-waffle/-/ethereum-waffle-3.4.0.tgz#990b3c6c26db9c2dd943bf26750a496f60c04720" @@ -3919,7 +3914,7 @@ ethereum-waffle@3.4.0: ethereumjs-abi@0.6.5: version "0.6.5" resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.5.tgz#5a637ef16ab43473fa72a29ad90871405b3f5241" - integrity sha1-WmN+8Wq0NHP6cqKa2QhxQFs/UkE= + integrity sha512-rCjJZ/AE96c/AAZc6O3kaog4FhOsAViaysBxqJNy2+LHP0ttH0zkZ7nXdVHOAyt6lFwLO0nlCwWszysG/ao1+g== dependencies: bn.js "^4.10.0" ethereumjs-util "^4.3.0" @@ -4058,10 +4053,10 @@ ethereumjs-util@^5.0.0, ethereumjs-util@^5.0.1, ethereumjs-util@^5.1.1, ethereum rlp "^2.0.0" safe-buffer "^5.1.1" -ethereumjs-util@^7.0.2, ethereumjs-util@^7.0.3, ethereumjs-util@^7.1.0, ethereumjs-util@^7.1.1, ethereumjs-util@^7.1.4: - version "7.1.4" - resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.4.tgz#a6885bcdd92045b06f596c7626c3e89ab3312458" - integrity sha512-p6KmuPCX4mZIqsQzXfmSx9Y0l2hqf+VkAiwSisW3UKUFdk8ZkAt+AYaor83z2nSi6CU2zSsXMlD80hAbNEGM0A== +ethereumjs-util@^7.0.2, ethereumjs-util@^7.0.3, ethereumjs-util@^7.1.0, ethereumjs-util@^7.1.1, ethereumjs-util@^7.1.4, ethereumjs-util@^7.1.5: + version "7.1.5" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz#9ecf04861e4fbbeed7465ece5f23317ad1129181" + integrity sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg== dependencies: "@types/bn.js" "^5.1.0" bn.js "^5.1.2" @@ -4159,45 +4154,45 @@ ethers@5.4.1: "@ethersproject/wordlists" "5.4.0" ethers@^5.0.1, ethers@^5.0.2, ethers@^5.5.2: - version "5.6.2" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.6.2.tgz#e75bac7f038c5e0fdde667dba62fc223924143a2" - integrity sha512-EzGCbns24/Yluu7+ToWnMca3SXJ1Jk1BvWB7CCmVNxyOeM4LLvw2OLuIHhlkhQk1dtOcj9UMsdkxUh8RiG1dxQ== - dependencies: - "@ethersproject/abi" "5.6.0" - "@ethersproject/abstract-provider" "5.6.0" - "@ethersproject/abstract-signer" "5.6.0" - "@ethersproject/address" "5.6.0" - "@ethersproject/base64" "5.6.0" - "@ethersproject/basex" "5.6.0" - "@ethersproject/bignumber" "5.6.0" + version "5.6.9" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.6.9.tgz#4e12f8dfcb67b88ae7a78a9519b384c23c576a4d" + integrity sha512-lMGC2zv9HC5EC+8r429WaWu3uWJUCgUCt8xxKCFqkrFuBDZXDYIdzDUECxzjf2BMF8IVBByY1EBoGSL3RTm8RA== + dependencies: + "@ethersproject/abi" "5.6.4" + "@ethersproject/abstract-provider" "5.6.1" + "@ethersproject/abstract-signer" "5.6.2" + "@ethersproject/address" "5.6.1" + "@ethersproject/base64" "5.6.1" + "@ethersproject/basex" "5.6.1" + "@ethersproject/bignumber" "5.6.2" "@ethersproject/bytes" "5.6.1" - "@ethersproject/constants" "5.6.0" - "@ethersproject/contracts" "5.6.0" - "@ethersproject/hash" "5.6.0" - "@ethersproject/hdnode" "5.6.0" - "@ethersproject/json-wallets" "5.6.0" - "@ethersproject/keccak256" "5.6.0" + "@ethersproject/constants" "5.6.1" + "@ethersproject/contracts" "5.6.2" + "@ethersproject/hash" "5.6.1" + "@ethersproject/hdnode" "5.6.2" + "@ethersproject/json-wallets" "5.6.1" + "@ethersproject/keccak256" "5.6.1" "@ethersproject/logger" "5.6.0" - "@ethersproject/networks" "5.6.1" - "@ethersproject/pbkdf2" "5.6.0" + "@ethersproject/networks" "5.6.4" + "@ethersproject/pbkdf2" "5.6.1" "@ethersproject/properties" "5.6.0" - "@ethersproject/providers" "5.6.2" - "@ethersproject/random" "5.6.0" - "@ethersproject/rlp" "5.6.0" - "@ethersproject/sha2" "5.6.0" - "@ethersproject/signing-key" "5.6.0" - "@ethersproject/solidity" "5.6.0" - "@ethersproject/strings" "5.6.0" - "@ethersproject/transactions" "5.6.0" - "@ethersproject/units" "5.6.0" - "@ethersproject/wallet" "5.6.0" - "@ethersproject/web" "5.6.0" - "@ethersproject/wordlists" "5.6.0" + "@ethersproject/providers" "5.6.8" + "@ethersproject/random" "5.6.1" + "@ethersproject/rlp" "5.6.1" + "@ethersproject/sha2" "5.6.1" + "@ethersproject/signing-key" "5.6.2" + "@ethersproject/solidity" "5.6.1" + "@ethersproject/strings" "5.6.1" + "@ethersproject/transactions" "5.6.2" + "@ethersproject/units" "5.6.1" + "@ethersproject/wallet" "5.6.2" + "@ethersproject/web" "5.6.1" + "@ethersproject/wordlists" "5.6.1" ethjs-unit@0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/ethjs-unit/-/ethjs-unit-0.1.6.tgz#c665921e476e87bce2a9d588a6fe0405b2c41699" - integrity sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk= + integrity sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw== dependencies: bn.js "4.11.6" number-to-bn "1.7.0" @@ -4233,15 +4228,10 @@ evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: md5.js "^1.3.4" safe-buffer "^5.1.1" -exit-on-epipe@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz#0bdd92e87d5285d267daa8171d0eb06159689692" - integrity sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw== - expand-brackets@^2.1.4: version "2.1.4" resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" - integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= + integrity sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA== dependencies: debug "^2.3.3" define-property "^0.2.5" @@ -4252,37 +4242,38 @@ expand-brackets@^2.1.4: to-regex "^3.0.1" express@^4.14.0: - version "4.17.3" - resolved "https://registry.yarnpkg.com/express/-/express-4.17.3.tgz#f6c7302194a4fb54271b73a1fe7a06478c8f85a1" - integrity sha512-yuSQpz5I+Ch7gFrPCk4/c+dIBKlQUxtgwqzph132bsT6qhuzss6I8cLJQz7B3rFblzd6wtcI0ZbGltH/C4LjUg== + version "4.18.1" + resolved "https://registry.yarnpkg.com/express/-/express-4.18.1.tgz#7797de8b9c72c857b9cd0e14a5eea80666267caf" + integrity sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q== dependencies: accepts "~1.3.8" array-flatten "1.1.1" - body-parser "1.19.2" + body-parser "1.20.0" content-disposition "0.5.4" content-type "~1.0.4" - cookie "0.4.2" + cookie "0.5.0" cookie-signature "1.0.6" debug "2.6.9" - depd "~1.1.2" + depd "2.0.0" encodeurl "~1.0.2" escape-html "~1.0.3" etag "~1.8.1" - finalhandler "~1.1.2" + finalhandler "1.2.0" fresh "0.5.2" + http-errors "2.0.0" merge-descriptors "1.0.1" methods "~1.1.2" - on-finished "~2.3.0" + on-finished "2.4.1" parseurl "~1.3.3" path-to-regexp "0.1.7" proxy-addr "~2.0.7" - qs "6.9.7" + qs "6.10.3" range-parser "~1.2.1" safe-buffer "5.2.1" - send "0.17.2" - serve-static "1.14.2" + send "0.18.0" + serve-static "1.15.0" setprototypeof "1.2.0" - statuses "~1.5.0" + statuses "2.0.1" type-is "~1.6.18" utils-merge "1.0.1" vary "~1.1.2" @@ -4297,14 +4288,14 @@ ext@^1.1.2: extend-shallow@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" - integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= + integrity sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug== dependencies: is-extendable "^0.1.0" extend-shallow@^3.0.0, extend-shallow@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" - integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= + integrity sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q== dependencies: assign-symbols "^1.0.0" is-extendable "^1.0.1" @@ -4340,7 +4331,7 @@ extglob@^2.0.4: extsprintf@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= + integrity sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g== extsprintf@^1.2.0: version "1.4.1" @@ -4350,7 +4341,7 @@ extsprintf@^1.2.0: fake-merkle-patricia-tree@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/fake-merkle-patricia-tree/-/fake-merkle-patricia-tree-1.0.1.tgz#4b8c3acfb520afadf9860b1f14cd8ce3402cddd3" - integrity sha1-S4w6z7Ugr635hgsfFM2M40As3dM= + integrity sha512-Tgq37lkc9pUIgIKw5uitNUKcgcYL3R6JvXtKQbOf/ZSavXbidsksgp/pAY6p//uhw0I4yoMsvTSovvVIsk/qxA== dependencies: checkpoint-store "^1.1.0" @@ -4383,7 +4374,7 @@ fast-json-stable-stringify@^2.0.0: fast-levenshtein@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== fastq@^1.6.0: version "1.13.0" @@ -4395,14 +4386,14 @@ fastq@^1.6.0: fetch-ponyfill@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/fetch-ponyfill/-/fetch-ponyfill-4.1.0.tgz#ae3ce5f732c645eab87e4ae8793414709b239893" - integrity sha1-rjzl9zLGReq4fkroeTQUcJsjmJM= + integrity sha512-knK9sGskIg2T7OnYLdZ2hZXn0CtDrAIBxYQLpmEf0BqfdWnwmM1weccUl5+4EdA44tzNSFAuxITPbXtPehUB3g== dependencies: node-fetch "~1.7.1" figures@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" - integrity sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI= + integrity sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA== dependencies: escape-string-regexp "^1.0.5" @@ -4416,7 +4407,7 @@ file-entry-cache@^5.0.1: fill-range@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" - integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= + integrity sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ== dependencies: extend-shallow "^2.0.1" is-number "^3.0.0" @@ -4430,23 +4421,23 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -finalhandler@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" - integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== +finalhandler@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" + integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== dependencies: debug "2.6.9" encodeurl "~1.0.2" escape-html "~1.0.3" - on-finished "~2.3.0" + on-finished "2.4.1" parseurl "~1.3.3" - statuses "~1.5.0" + statuses "2.0.1" unpipe "~1.0.0" find-replace@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-1.0.3.tgz#b88e7364d2d9c959559f388c66670d6130441fa0" - integrity sha1-uI5zZNLZyVlVnziMZmcNYTBEH6A= + integrity sha512-KrUnjzDCD9426YnCP56zGYy/eieTnhtK6Vn++j+JJzmlsWWwEkDnsyVF575spT6HJ6Ow9tlbT3TQTDsa+O4UWA== dependencies: array-back "^1.0.4" test-value "^2.1.0" @@ -4462,7 +4453,7 @@ find-up@5.0.0: find-up@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" - integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= + integrity sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA== dependencies: path-exists "^2.0.0" pinkie-promise "^2.0.0" @@ -4470,7 +4461,7 @@ find-up@^1.0.0: find-up@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" - integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= + integrity sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ== dependencies: locate-path "^2.0.0" @@ -4511,19 +4502,19 @@ flatted@^2.0.0: flow-stoplight@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/flow-stoplight/-/flow-stoplight-1.0.0.tgz#4a292c5bcff8b39fa6cc0cb1a853d86f27eeff7b" - integrity sha1-SiksW8/4s5+mzAyxqFPYbyfu/3s= + integrity sha512-rDjbZUKpN8OYhB0IE/vY/I8UWO/602IIJEU/76Tv4LvYnwHCk0BCsvz4eRr9n+FQcri7L5cyaXOo0+/Kh4HisA== fmix@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/fmix/-/fmix-0.1.0.tgz#c7bbf124dec42c9d191cfb947d0a9778dd986c0c" - integrity sha1-x7vxJN7ELJ0ZHPuUfQqXeN2YbAw= + integrity sha512-Y6hyofImk9JdzU8k5INtTXX1cu8LDlePWDFU5sftm9H+zKCr5SGrVjdhkvsim646cw5zD0nADj8oHyXMZmCZ9w== dependencies: imul "^1.0.0" follow-redirects@^1.12.1, follow-redirects@^1.14.0: - version "1.14.9" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.9.tgz#dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7" - integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w== + version "1.15.1" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.1.tgz#0ca6a452306c9b276e4d3127483e29575e207ad5" + integrity sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA== for-each@^0.3.3, for-each@~0.3.3: version "0.3.3" @@ -4535,12 +4526,12 @@ for-each@^0.3.3, for-each@~0.3.3: for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= + integrity sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ== forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= + integrity sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw== form-data@^3.0.0: version "3.0.1" @@ -4587,19 +4578,19 @@ fp-ts@^1.0.0: fragment-cache@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" - integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= + integrity sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA== dependencies: map-cache "^0.2.2" fresh@0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= + integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== fs-extra@^0.30.0: version "0.30.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" - integrity sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A= + integrity sha512-UvSPKyhMn6LEd/WpUaV9C9t3zATuqoqfWc3QdPhPLb58prN9tqYPlPWi8Krxi44loBoUzlobqZ3+8tGpxxSzwA== dependencies: graceful-fs "^4.1.2" jsonfile "^2.1.0" @@ -4608,9 +4599,9 @@ fs-extra@^0.30.0: rimraf "^2.2.8" fs-extra@^10.0.0: - version "10.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.0.1.tgz#27de43b4320e833f6867cc044bfce29fdf0ef3b8" - integrity sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag== + version "10.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" + integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== dependencies: graceful-fs "^4.2.0" jsonfile "^6.0.1" @@ -4654,7 +4645,7 @@ fs-minipass@^1.2.7: fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== fsevents@~2.3.2: version "2.3.2" @@ -4666,10 +4657,25 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +function.prototype.name@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" + integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.0" + functions-have-names "^1.2.2" + functional-red-black-tree@^1.0.1, functional-red-black-tree@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" - integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= + integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== + +functions-have-names@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" + integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== ganache-core@^2.13.2: version "2.13.2" @@ -4721,21 +4727,21 @@ get-caller-file@^2.0.5: get-func-name@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" - integrity sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= + integrity sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig== get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" - integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== + version "1.1.2" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.2.tgz#336975123e05ad0b7ba41f152ee4aadbea6cf598" + integrity sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA== dependencies: function-bind "^1.1.1" has "^1.0.3" - has-symbols "^1.0.1" + has-symbols "^1.0.3" get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" - integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= + integrity sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ== get-stream@^4.1.0: version "4.1.0" @@ -4762,12 +4768,12 @@ get-symbol-description@^1.0.0: get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" - integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= + integrity sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA== getpass@^0.1.1: version "0.1.7" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= + integrity sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng== dependencies: assert-plus "^1.0.0" @@ -4778,7 +4784,7 @@ glob-parent@^5.1.2, glob-parent@~5.1.2: dependencies: is-glob "^4.0.1" -glob@7.2.0, glob@^7.1.2, glob@^7.1.3, glob@~7.2.0: +glob@7.2.0: version "7.2.0" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== @@ -4790,6 +4796,18 @@ glob@7.2.0, glob@^7.1.2, glob@^7.1.3, glob@~7.2.0: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.1.2, glob@^7.1.3, glob@~7.2.0: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + global@~4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/global/-/global-4.4.0.tgz#3e7b105179006a323ed71aafca3e9c57a5cc6406" @@ -4857,25 +4875,15 @@ got@^7.1.0: url-parse-lax "^1.0.0" url-to-options "^1.0.1" -graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0: - version "4.2.9" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.9.tgz#041b05df45755e587a24942279b9d113146e1c96" - integrity sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ== - -graceful-fs@^4.2.4: +graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.4: version "4.2.10" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== -growl@1.10.5: - version "1.10.5" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" - integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== - har-schema@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= + integrity sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q== har-validator@~5.1.3: version "5.1.5" @@ -4924,17 +4932,10 @@ hardhat-upgrades@^0.0.0: dependencies: "@openzeppelin/hardhat-upgrades" "*" -hardhat-watcher@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/hardhat-watcher/-/hardhat-watcher-2.1.1.tgz#8b05fec429ed45da11808bbf6054a90f3e34c51a" - integrity sha512-zilmvxAYD34IofBrwOliQn4z92UiDmt2c949DW4Gokf0vS0qk4YTfVCi/LmUBICThGygNANE3WfnRTpjCJGtDA== - dependencies: - chokidar "^3.4.3" - hardhat@^2.9.7: - version "2.9.7" - resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.9.7.tgz#b31302b089486ec1c13c5a3dff18fe71f955f33b" - integrity sha512-PVSgTlM4Mtc4HNEoISpcM6rRNAK3ngqhxUaTmSw9eCtuVmtxTK86Tqnuq4zNPmlrtcuReXry9k3LGEnk2gJgbA== + version "2.10.1" + resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.10.1.tgz#37fdc0c96d6a5d16b322269db2ad8f9f115c4046" + integrity sha512-0FN9TyCtn7Lt25SB2ei2G7nA2rZjP+RN6MvFOm+zYwherxLZNo6RbD8nDz88eCbhRapevmXqOiL2nM8INKsjmA== dependencies: "@ethereumjs/block" "^3.6.2" "@ethereumjs/blockchain" "^5.5.2" @@ -4944,7 +4945,7 @@ hardhat@^2.9.7: "@ethersproject/abi" "^5.1.2" "@metamask/eth-sig-util" "^4.0.0" "@sentry/node" "^5.18.1" - "@solidity-parser/parser" "^0.14.1" + "@solidity-parser/parser" "^0.14.2" "@types/bn.js" "^5.1.0" "@types/lru-cache" "^5.1.0" abort-controller "^3.0.0" @@ -4957,7 +4958,7 @@ hardhat@^2.9.7: debug "^4.1.1" enquirer "^2.3.0" env-paths "^2.2.0" - ethereum-cryptography "^0.1.2" + ethereum-cryptography "^1.0.3" ethereumjs-abi "^0.6.8" ethereumjs-util "^7.1.4" find-up "^2.1.0" @@ -4969,7 +4970,7 @@ hardhat@^2.9.7: lodash "^4.17.11" merkle-patricia-tree "^4.2.4" mnemonist "^0.38.0" - mocha "^9.2.0" + mocha "^10.0.0" p-map "^4.0.0" qs "^6.7.0" raw-body "^2.4.1" @@ -4981,38 +4982,45 @@ hardhat@^2.9.7: stacktrace-parser "^0.1.10" "true-case-path" "^2.2.1" tsort "0.0.1" - undici "^4.14.1" + undici "^5.4.0" uuid "^8.3.2" ws "^7.4.6" has-ansi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= + integrity sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg== dependencies: ansi-regex "^2.0.0" -has-bigints@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" - integrity sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA== +has-bigints@^1.0.1, has-bigints@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" + integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== has-flag@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== +has-property-descriptors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" + integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== + dependencies: + get-intrinsic "^1.1.1" + has-symbol-support-x@^1.4.1: version "1.4.2" resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" integrity sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw== -has-symbols@^1.0.1, has-symbols@^1.0.2: +has-symbols@^1.0.1, has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== @@ -5034,7 +5042,7 @@ has-tostringtag@^1.0.0: has-value@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" - integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= + integrity sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q== dependencies: get-value "^2.0.3" has-values "^0.1.4" @@ -5043,7 +5051,7 @@ has-value@^0.3.1: has-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" - integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= + integrity sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw== dependencies: get-value "^2.0.6" has-values "^1.0.0" @@ -5052,12 +5060,12 @@ has-value@^1.0.0: has-values@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" - integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= + integrity sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ== has-values@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" - integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= + integrity sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ== dependencies: is-number "^3.0.0" kind-of "^4.0.0" @@ -5094,12 +5102,12 @@ he@1.2.0: heap@0.2.6: version "0.2.6" resolved "https://registry.yarnpkg.com/heap/-/heap-0.2.6.tgz#087e1f10b046932fc8594dd9e6d378afc9d1e5ac" - integrity sha1-CH4fELBGky/IWU3Z5tN4r8nR5aw= + integrity sha512-MzzWcnfB1e4EG2vHi3dXHoBupmuXNZzx6pY6HldVS55JKKBoq3xOyzfSaZRkJp37HIhEYC78knabHff3zc4dQQ== hmac-drbg@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= + integrity sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg== dependencies: hash.js "^1.0.3" minimalistic-assert "^1.0.0" @@ -5108,7 +5116,7 @@ hmac-drbg@^1.0.1: home-or-tmp@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" - integrity sha1-42w/LSyufXRqhX440Y1fMqeILbg= + integrity sha512-ycURW7oUxE2sNiPVw1HVEFsW+ecOpJ5zaj7eC0RlwhibhRBod20muUN8qu/gzx956YrLolVvs1MTXwKgC2rVEg== dependencies: os-homedir "^1.0.0" os-tmpdir "^1.0.1" @@ -5123,17 +5131,6 @@ http-cache-semantics@^4.0.0: resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== -http-errors@1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.8.1.tgz#7c3f28577cbc8a207388455dbd62295ed07bd68c" - integrity sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g== - dependencies: - depd "~1.1.2" - inherits "2.0.4" - setprototypeof "1.2.0" - statuses ">= 1.5.0 < 2" - toidentifier "1.0.1" - http-errors@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" @@ -5148,21 +5145,21 @@ http-errors@2.0.0: http-https@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/http-https/-/http-https-1.0.0.tgz#2f908dd5f1db4068c058cd6e6d4ce392c913389b" - integrity sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs= + integrity sha512-o0PWwVCSp3O0wS6FvNr6xfBCHgt0m1tvPLFOCc2iFDKTRAXhB7m8klDf7ErowFH8POa6dVdGatKU5I1YYwzUyg== http-signature@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" - integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= + integrity sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ== dependencies: assert-plus "^1.0.0" jsprim "^1.2.2" sshpk "^1.7.0" https-proxy-agent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" - integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA== + version "5.0.1" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" + integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== dependencies: agent-base "6" debug "4" @@ -5216,17 +5213,17 @@ immediate@^3.2.3: immediate@~3.2.3: version "3.2.3" resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.2.3.tgz#d140fa8f614659bd6541233097ddaac25cdd991c" - integrity sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw= + integrity sha512-RrGCXRm/fRVqMIhqXrGEX9rRADavPiDFSoMb/k64i9XMk8uH4r/Omi5Ctierj6XzNecwDbO4WuFbDD1zmpl3Tg== immutable@^4.0.0-rc.12: - version "4.0.0" - resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.0.0.tgz#b86f78de6adef3608395efb269a91462797e2c23" - integrity sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw== + version "4.1.0" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.1.0.tgz#f795787f0db780183307b9eb2091fcac1f6fafef" + integrity sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ== import-fresh@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" - integrity sha1-2BNVwVYS04bGH53dOSLUMEgipUY= + integrity sha512-eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg== dependencies: caller-path "^2.0.0" resolve-from "^3.0.0" @@ -5242,12 +5239,12 @@ import-fresh@^3.0.0: imul@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/imul/-/imul-1.0.1.tgz#9d5867161e8b3de96c2c38d5dc7cb102f35e2ac9" - integrity sha1-nVhnFh6LPelsLDjV3HyxAvNeKsk= + integrity sha512-WFAgfwPLAjU66EKt6vRdTlKj4nAgIDQzh29JonLa4Bqtl6D8JrIMvWjCnx7xEjVNmP3U0fM5o8ZObk7d0f62bA== imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== indent-string@^4.0.0: version "4.0.0" @@ -5257,7 +5254,7 @@ indent-string@^4.0.0: inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== dependencies: once "^1.3.0" wrappy "1" @@ -5305,7 +5302,7 @@ invariant@^2.2.2: invert-kv@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" - integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= + integrity sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ== io-ts@1.10.4: version "1.10.4" @@ -5322,7 +5319,7 @@ ipaddr.js@1.9.1: is-accessor-descriptor@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" - integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= + integrity sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A== dependencies: kind-of "^3.0.2" @@ -5344,7 +5341,7 @@ is-arguments@^1.0.4: is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= + integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== is-bigint@^1.0.1: version "1.0.4" @@ -5385,17 +5382,17 @@ is-ci@^2.0.0: dependencies: ci-info "^2.0.0" -is-core-module@^2.8.1: - version "2.8.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.1.tgz#f59fdfca701d5879d0a6b100a40aa1560ce27211" - integrity sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA== +is-core-module@^2.9.0: + version "2.10.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.10.0.tgz#9012ede0a91c69587e647514e1d5277019e728ed" + integrity sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg== dependencies: has "^1.0.3" is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" - integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= + integrity sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg== dependencies: kind-of "^3.0.2" @@ -5434,7 +5431,7 @@ is-descriptor@^1.0.0, is-descriptor@^1.0.2: is-directory@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" - integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= + integrity sha512-yVChGzahRFvbkscn2MlwGismPO12i9+znNruC5gVEntG3qu0xQMzsGg/JFbrsqDOHtHFPci+V5aP5T9I+yeKqw== is-docker@^2.0.0: version "2.2.1" @@ -5444,7 +5441,7 @@ is-docker@^2.0.0: is-extendable@^0.1.0, is-extendable@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= + integrity sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw== is-extendable@^1.0.1: version "1.0.1" @@ -5456,7 +5453,7 @@ is-extendable@^1.0.1: is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== is-finite@^1.0.0: version "1.1.0" @@ -5466,19 +5463,19 @@ is-finite@^1.0.0: is-fn@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-fn/-/is-fn-1.0.0.tgz#9543d5de7bcf5b08a22ec8a20bae6e286d510d8c" - integrity sha1-lUPV3nvPWwiiLsiiC65uKG1RDYw= + integrity sha512-XoFPJQmsAShb3jEQRfzf2rqXavq7fIqF/jOekp308JlThqrODnMpweVSGilKTCXELfLhltGP2AGgbQGVP8F1dg== is-fullwidth-code-point@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= + integrity sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw== dependencies: number-is-nan "^1.0.0" is-fullwidth-code-point@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + integrity sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w== is-fullwidth-code-point@^3.0.0: version "3.0.0" @@ -5500,24 +5497,24 @@ is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: is-hex-prefixed@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554" - integrity sha1-fY035q135dEnFIkTxXPggtd39VQ= + integrity sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA== -is-negative-zero@^2.0.1: +is-negative-zero@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== is-number-object@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.6.tgz#6a7aaf838c7f0686a50b4553f7e54a96494e89f0" - integrity sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g== + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" + integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== dependencies: has-tostringtag "^1.0.0" is-number@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" - integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= + integrity sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg== dependencies: kind-of "^3.0.2" @@ -5534,7 +5531,7 @@ is-object@^1.0.1: is-plain-obj@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" - integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= + integrity sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg== is-plain-obj@^2.1.0: version "2.1.0" @@ -5561,15 +5558,17 @@ is-retry-allowed@^1.0.0: resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== -is-shared-array-buffer@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz#97b0c85fbdacb59c9c446fe653b82cf2b5b7cfe6" - integrity sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA== +is-shared-array-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" + integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== + dependencies: + call-bind "^1.0.2" is-stream@^1.0.0, is-stream@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= + integrity sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ== is-string@^1.0.5, is-string@^1.0.7: version "1.0.7" @@ -5588,7 +5587,7 @@ is-symbol@^1.0.2, is-symbol@^1.0.3: is-typedarray@^1.0.0, is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= + integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== is-unicode-supported@^0.1.0: version "0.1.0" @@ -5603,9 +5602,9 @@ is-url@^1.2.4: is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" - integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= + integrity sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q== -is-weakref@^1.0.1: +is-weakref@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== @@ -5627,34 +5626,34 @@ is-wsl@^2.1.1: isarray@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" - integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= + integrity sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ== isarray@1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== isobject@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= + integrity sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA== dependencies: isarray "1.0.0" isobject@^3.0.0, isobject@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" - integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= + integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= + integrity sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g== isurl@^1.0.0-alpha5: version "1.0.0" @@ -5667,7 +5666,7 @@ isurl@^1.0.0-alpha5: js-sha3@0.5.7, js-sha3@^0.5.7: version "0.5.7" resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.7.tgz#0d4ffd8002d5333aabaf4a23eed2f6374c9f28e7" - integrity sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc= + integrity sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g== js-sha3@0.8.0, js-sha3@^0.8.0: version "0.8.0" @@ -5682,7 +5681,7 @@ js-sha3@0.8.0, js-sha3@^0.8.0: js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" - integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= + integrity sha512-RjTcuD4xjtthQkaWH7dFlH85L+QaVtSoOyGdZ3g6HFhS9dFNDfLyqgm2NFe2X6cQpeFmt0452FJjFG5UameExg== js-yaml@4.1.0: version "4.1.0" @@ -5702,22 +5701,22 @@ js-yaml@^3.12.0, js-yaml@^3.13.0, js-yaml@^3.13.1, js-yaml@^3.14.0: jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= + integrity sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg== jsesc@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" - integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= + integrity sha512-Mke0DA0QjUWuJlhsE0ZPPhYiJkRap642SmI/4ztCFaUs6V2AiH1sfecc+57NgaryfAA2VR3v6O+CSjC1jZJKOA== jsesc@~0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" - integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= + integrity sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA== json-buffer@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" - integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= + integrity sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ== json-parse-better-errors@^1.0.1: version "1.0.2" @@ -5739,14 +5738,14 @@ json-rpc-engine@^3.4.0, json-rpc-engine@^3.6.0: json-rpc-error@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/json-rpc-error/-/json-rpc-error-2.0.0.tgz#a7af9c202838b5e905c7250e547f1aff77258a02" - integrity sha1-p6+cICg4tekFxyUOVH8a/3cligI= + integrity sha512-EwUeWP+KgAZ/xqFpaP6YDAXMtCJi+o/QQpCQFIYyxr01AdADi2y413eM8hSqJcoQym9WMePAJWoaODEJufC4Ug== dependencies: inherits "^2.0.1" json-rpc-random-id@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/json-rpc-random-id/-/json-rpc-random-id-1.0.1.tgz#ba49d96aded1444dbb8da3d203748acbbcdec8c8" - integrity sha1-uknZat7RRE27jaPSA3SKy7zeyMg= + integrity sha512-RJ9YYNCkhVDBuP4zN5BBtYAzEl03yq/jIIsyif0JY9qyJuQQZNeDK7anAPKKlyEtLSj2s8h6hNh2F8zO5q7ScA== json-schema-traverse@^0.4.1: version "0.4.1" @@ -5761,36 +5760,36 @@ json-schema@0.4.0: json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" - integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= + integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== json-stable-stringify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" - integrity sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8= + integrity sha512-i/J297TW6xyj7sDFa7AmBPkQvLIxWr2kKPWI26tXydnZrzVAocNqn5DMNT1Mzk0vit1V5UkRM7C1KdVNp7Lmcg== dependencies: jsonify "~0.0.0" json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= + integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== json5@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" - integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= + integrity sha512-4xrs1aW+6N5DalkqSVA8fxh458CXvR99WU8WLKmq4v8eWAL86Xo3BVqyd3SkA9wEVjCMqyvvRRkshAdOnBp5rw== jsonfile@^2.1.0: version "2.4.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" - integrity sha1-NzaitCi4e72gzIO1P6PWM6NcKug= + integrity sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw== optionalDependencies: graceful-fs "^4.1.6" jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" - integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= + integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== optionalDependencies: graceful-fs "^4.1.6" @@ -5806,7 +5805,7 @@ jsonfile@^6.0.1: jsonify@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" - integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= + integrity sha512-trvBk1ki43VZptdBI5rIlG4YOzyeH/WefQt5rj1grasPn4iiZWKet8nkgc4GlsAylaztn0qZfUYOiTsASJFdNA== jsprim@^1.2.2: version "1.4.2" @@ -5845,14 +5844,14 @@ keyv@^3.0.0: kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" - integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= + integrity sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ== dependencies: is-buffer "^1.1.5" kind-of@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" - integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= + integrity sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw== dependencies: is-buffer "^1.1.5" @@ -5876,14 +5875,14 @@ klaw-sync@^6.0.0: klaw@^1.0.0: version "1.3.1" resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" - integrity sha1-QIhDO0azsbolnXh4XY6W9zugJDk= + integrity sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw== optionalDependencies: graceful-fs "^4.1.9" lcid@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" - integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= + integrity sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw== dependencies: invert-kv "^1.0.0" @@ -5937,7 +5936,7 @@ level-iterator-stream@^2.0.3: level-iterator-stream@~1.3.0: version "1.3.1" resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-1.3.1.tgz#e43b78b1a8143e6fa97a4f485eb8ea530352f2ed" - integrity sha1-5Dt4sagUPm+pek9IXrjqUwNS8u0= + integrity sha512-1qua0RHNtr4nrZBgYlpV0qHHeHpcRRWTxEZJ8xsemoHAXNL5tbooh4tPEEqIqsbWCAJBmUmkwYK/sW5OrFjWWw== dependencies: inherits "^2.0.1" level-errors "^1.0.3" @@ -6027,7 +6026,7 @@ level-supports@~1.0.0: level-ws@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/level-ws/-/level-ws-0.0.0.tgz#372e512177924a00424b0b43aef2bb42496d228b" - integrity sha1-Ny5RIXeSSgBCSwtDrvK7QkltIos= + integrity sha512-XUTaO/+Db51Uiyp/t7fCMGVFOTdtLS/NIACxE/GHsij15mKzxksZifKVjlXDF41JMUP/oM1Oc4YNGdKnc3dVLw== dependencies: readable-stream "~1.0.15" xtend "~2.1.1" @@ -6087,7 +6086,7 @@ levelup@^4.3.2: levn@^0.3.0, levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" - integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= + integrity sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA== dependencies: prelude-ls "~1.1.2" type-check "~0.3.2" @@ -6095,7 +6094,7 @@ levn@^0.3.0, levn@~0.3.0: load-json-file@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" - integrity sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA= + integrity sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A== dependencies: graceful-fs "^4.1.2" parse-json "^2.2.0" @@ -6106,7 +6105,7 @@ load-json-file@^1.0.0: locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" - integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= + integrity sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA== dependencies: p-locate "^2.0.0" path-exists "^3.0.0" @@ -6121,7 +6120,7 @@ locate-path@^6.0.0: lodash.assign@^4.0.3, lodash.assign@^4.0.6: version "4.2.0" resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" - integrity sha1-DZnzzNem0mHRm9rrkkUAXShYCOc= + integrity sha512-hFuH8TY+Yji7Eja3mGiuAxBqLagejScbG8GbG0j6o9vzn0YL14My+ktnqtZgFTosKymC9/44wP6s7xyuLfnClw== lodash@4.17.20: version "4.17.20" @@ -6144,12 +6143,12 @@ log-symbols@4.1.0: looper@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/looper/-/looper-2.0.0.tgz#66cd0c774af3d4fedac53794f742db56da8f09ec" - integrity sha1-Zs0Md0rz1P7axTeU90LbVtqPCew= + integrity sha512-6DzMHJcjbQX/UPHc1rRCBfKlLwDkvuGZ715cIR36wSdYqWXFT35uLXq5P/2orl3tz+t+VOVPxw4yPinQlUDGDQ== looper@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/looper/-/looper-3.0.0.tgz#2efa54c3b1cbaba9b94aee2e5914b0be57fbb749" - integrity sha1-LvpUw7HLq6m5Su4uWRSwvlf7t0k= + integrity sha512-LJ9wplN/uSn72oJRsXTx+snxPet5c8XiZmOKCm906NVYu+ag6SB6vUcnJcWxgnl2NfbIyeobAn7Bwv6xRj2XJg== loose-envify@^1.0.0: version "1.4.0" @@ -6178,7 +6177,7 @@ lru-cache@5.1.1, lru-cache@^5.1.1: lru-cache@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-3.2.0.tgz#71789b3b7f5399bec8565dda38aa30d2a097efee" - integrity sha1-cXibO39Tmb7IVl3aOKow0qCX7+4= + integrity sha512-91gyOKTc2k66UG6kHiH4h3S2eltcPwE1STVfMYC/NG+nZwf8IIuiamfmpGZjpbbxzSyEJaLC0tNSmhjlQUTJow== dependencies: pseudomap "^1.0.1" @@ -6192,17 +6191,17 @@ lru-cache@^6.0.0: lru_map@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd" - integrity sha1-tcg1G5Rky9dQM1p5ZQoOwOVhGN0= + integrity sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ== ltgt@^2.1.2, ltgt@~2.2.0: version "2.2.1" resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.2.1.tgz#f35ca91c493f7b73da0e07495304f17b31f87ee5" - integrity sha1-81ypHEk/e3PaDgdJUwTxezH4fuU= + integrity sha512-AI2r85+4MquTw9ZYqabu4nMwy9Oftlfa/e/52t9IjtfG+mGBbTNdAoZ3RQKLHR6r0wQnwZnPIEh/Ya6XTWAKNA== ltgt@~2.1.1: version "2.1.3" resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.1.3.tgz#10851a06d9964b971178441c23c9e52698eece34" - integrity sha1-EIUaBtmWS5cReEQcI8nlJpjuzjQ= + integrity sha512-5VjHC5GsENtIi5rbJd+feEpDKhfr7j0odoUR2Uh978g+2p93nd5o34cTjQWohXsPsCZeqoDnIqEf88mPCe0Pfw== make-error@^1.1.1: version "1.3.6" @@ -6212,12 +6211,12 @@ make-error@^1.1.1: map-cache@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" - integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= + integrity sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg== map-visit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" - integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= + integrity sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w== dependencies: object-visit "^1.0.0" @@ -6243,12 +6242,12 @@ md5.js@^1.3.4: media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= + integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== memdown@^1.0.0: version "1.4.1" resolved "https://registry.yarnpkg.com/memdown/-/memdown-1.4.1.tgz#b4e4e192174664ffbae41361aa500f3119efe215" - integrity sha1-tOThkhdGZP+65BNhqlAPMRnv4hU= + integrity sha512-iVrGHZB8i4OQfM155xx8akvG9FIj+ht14DX5CQkCTG4EHzZ3d3sgckIf/Lm9ivZalEsFuEVnWv2B2WZvbrro2w== dependencies: abstract-leveldown "~2.7.1" functional-red-black-tree "^1.0.1" @@ -6284,12 +6283,12 @@ memdown@~3.0.0: memorystream@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" - integrity sha1-htcJCzDORV1j+64S3aUaR93K+bI= + integrity sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw== merge-descriptors@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" - integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= + integrity sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w== merge2@^1.3.0, merge2@^1.4.1: version "1.4.1" @@ -6349,7 +6348,7 @@ merkletreejs@0.2.31: methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" - integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= + integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== micromatch@^3.1.4: version "3.1.10" @@ -6416,7 +6415,7 @@ mimic-response@^1.0.0, mimic-response@^1.0.1: min-document@^2.19.0: version "2.19.0" resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" - integrity sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU= + integrity sha512-9Wy1B3m3f66bPPmU5hdA4DR4PB2OfDU/+GS3yAB7IQozE3tqXaVv2zOjgla7MEGSRv95+ILmOuvhLkOK6wJtCQ== dependencies: dom-walk "^0.1.0" @@ -6428,23 +6427,23 @@ minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: minimalistic-crypto-utils@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= + integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== -minimatch@4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-4.2.1.tgz#40d9d511a46bdc4e563c22c3080cde9c0d8299b4" - integrity sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g== +minimatch@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" + integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== dependencies: - brace-expansion "^1.1.7" + brace-expansion "^2.0.1" -minimatch@^3.0.4: +minimatch@^3.0.4, minimatch@^3.1.1: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" -minimist@^1.2.0, minimist@^1.2.6, minimist@~1.2.5: +minimist@^1.2.0, minimist@^1.2.6, minimist@~1.2.6: version "1.2.6" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== @@ -6475,7 +6474,7 @@ mixin-deep@^1.2.0: mkdirp-promise@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz#e9b8f68e552c68a9c1713b84883f7a1dd039b8a1" - integrity sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE= + integrity sha512-Hepn5kb1lJPtVW84RFT40YG1OddBNTOVUZR2bzQUHc+Z03en8/3uX0+060JDhcEzyO08HmipsN9DcnFMxhIL9w== dependencies: mkdirp "*" @@ -6498,32 +6497,30 @@ mnemonist@^0.38.0: dependencies: obliterator "^2.0.0" -mocha@^9.2.0: - version "9.2.2" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-9.2.2.tgz#d70db46bdb93ca57402c809333e5a84977a88fb9" - integrity sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g== +mocha@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.0.0.tgz#205447d8993ec755335c4b13deba3d3a13c4def9" + integrity sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA== dependencies: "@ungap/promise-all-settled" "1.1.2" ansi-colors "4.1.1" browser-stdout "1.3.1" chokidar "3.5.3" - debug "4.3.3" + debug "4.3.4" diff "5.0.0" escape-string-regexp "4.0.0" find-up "5.0.0" glob "7.2.0" - growl "1.10.5" he "1.2.0" js-yaml "4.1.0" log-symbols "4.1.0" - minimatch "4.2.1" + minimatch "5.0.1" ms "2.1.3" - nanoid "3.3.1" + nanoid "3.3.3" serialize-javascript "6.0.0" strip-json-comments "3.1.1" supports-color "8.1.1" - which "2.0.2" - workerpool "6.2.0" + workerpool "6.2.1" yargs "16.2.0" yargs-parser "20.2.4" yargs-unparser "2.0.0" @@ -6533,15 +6530,10 @@ mock-fs@^4.1.0: resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.14.0.tgz#ce5124d2c601421255985e6e94da80a7357b1b18" integrity sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw== -module-alias@2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/module-alias/-/module-alias-2.2.2.tgz#151cdcecc24e25739ff0aa6e51e1c5716974c0e0" - integrity sha512-A/78XjoX2EmNvppVWEhM2oGk3x4lLxnkEA4jTbaK97QKSDjkIoOsKQlfylt/d3kKKi596Qy3NP5XrXJ6fZIC9Q== - ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== ms@2.1.2: version "2.1.2" @@ -6605,17 +6597,17 @@ murmur-128@^0.2.1: mute-stream@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" - integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= + integrity sha512-r65nCZhrbXXb6dXOACihYApHw2Q6pV0M3V0PSxd74N0+D8nzAdEAITq2oAjA1jVnKI+tGvEBUpqiMh0+rW6zDQ== nano-json-stream-parser@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz#0cc8f6d0e2b622b479c40d499c46d64b755c6f5f" - integrity sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18= + integrity sha512-9MqxMH/BSJC7dnLsEMPyfN5Dvoo49IsPFYMcHw3Bcfc2kN0lpHRBSzlMSVx4HGyJ7s9B31CyBTVehWJoQ8Ctew== -nanoid@3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.1.tgz#6347a18cac88af88f58af0b3594b723d5e99bb35" - integrity sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw== +nanoid@3.3.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" + integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== nanomatch@^1.2.9: version "1.2.13" @@ -6637,7 +6629,7 @@ nanomatch@^1.2.9: natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== negotiator@0.6.3: version "0.6.3" @@ -6659,12 +6651,7 @@ node-addon-api@^2.0.0: resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== -node-fetch@2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" - integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== - -node-fetch@^2.6.0, node-fetch@^2.6.1: +node-fetch@^2.6.0, node-fetch@^2.6.1, node-fetch@^2.6.7: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== @@ -6680,9 +6667,9 @@ node-fetch@~1.7.1: is-stream "^1.0.1" node-gyp-build@^4.2.0, node-gyp-build@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.3.0.tgz#9f256b03e5826150be39c764bf51e993946d71a3" - integrity sha512-iWjXZvmboq0ja1pUGULQBexmxq8CV4xBhX7VDOTbL7ZR4FOowwY/VOtRxBN/yKxmdGoIp4j5ysNT4u3S2pDQ3Q== + version "4.5.0" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.5.0.tgz#7a64eefa0b21112f89f58379da128ac177f20e40" + integrity sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg== nofilter@^1.0.4: version "1.0.4" @@ -6717,12 +6704,12 @@ normalize-url@^4.1.0: number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= + integrity sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ== number-to-bn@1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/number-to-bn/-/number-to-bn-1.7.0.tgz#bb3623592f7e5f9e0030b1977bd41a0c53fe1ea0" - integrity sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA= + integrity sha512-wsJ9gfSz1/s4ZsJN01lyonwuxA1tml6X1yBDnfpMglypcBRFZZkus26EdPSlqS5GJfYddVZa22p3VNb3z5m5Ig== dependencies: bn.js "4.11.6" strip-hex-prefix "1.0.0" @@ -6735,21 +6722,21 @@ oauth-sign@~0.9.0: object-assign@^4, object-assign@^4.0.0, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== object-copy@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" - integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= + integrity sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ== dependencies: copy-descriptor "^0.1.0" define-property "^0.2.5" kind-of "^3.0.3" -object-inspect@^1.11.0, object-inspect@^1.9.0, object-inspect@~1.12.0: - version "1.12.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.0.tgz#6e2c120e868fd1fd18cb4f18c31741d0d6e776f0" - integrity sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g== +object-inspect@^1.12.0, object-inspect@^1.9.0, object-inspect@~1.12.0: + version "1.12.2" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" + integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== object-is@^1.0.1: version "1.1.5" @@ -6759,7 +6746,7 @@ object-is@^1.0.1: call-bind "^1.0.2" define-properties "^1.1.3" -object-keys@^1.0.12, object-keys@^1.1.1: +object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== @@ -6767,71 +6754,72 @@ object-keys@^1.0.12, object-keys@^1.1.1: object-keys@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-0.4.0.tgz#28a6aae7428dd2c3a92f3d95f21335dd204e0336" - integrity sha1-KKaq50KN0sOpLz2V8hM13SBOAzY= + integrity sha512-ncrLw+X55z7bkl5PnUvHwFK9FcGuFYo9gtjws2XtSzL+aZ8tm830P60WJ0dSmFVaSalWieW5MD7kEdnXda9yJw== object-visit@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" - integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= + integrity sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA== dependencies: isobject "^3.0.0" object.assign@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" - integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== + version "4.1.3" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.3.tgz#d36b7700ddf0019abb6b1df1bb13f6445f79051f" + integrity sha512-ZFJnX3zltyjcYJL0RoCJuzb+11zWGyaDbjgxZbdV7rFEcHQuYxrZqhow67aA7xpes6LhojyFDaBKAFfogQrikA== dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - has-symbols "^1.0.1" + call-bind "^1.0.2" + define-properties "^1.1.4" + has-symbols "^1.0.3" object-keys "^1.1.1" object.getownpropertydescriptors@^2.1.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.3.tgz#b223cf38e17fefb97a63c10c91df72ccb386df9e" - integrity sha512-VdDoCwvJI4QdC6ndjpqFmoL3/+HxffFBbcJzKi5hwLLqqx3mdbedRpfZDdK0SrOSauj8X4GzBvnDZl4vTN7dOw== + version "2.1.4" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.4.tgz#7965e6437a57278b587383831a9b829455a4bc37" + integrity sha512-sccv3L/pMModT6dJAYF3fzGMVcb38ysQ0tEE6ixv2yXJDtEIPph268OlAdJj5/qZMZDq2g/jqvwppt36uS/uQQ== dependencies: + array.prototype.reduce "^1.0.4" call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.1" + define-properties "^1.1.4" + es-abstract "^1.20.1" object.pick@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" - integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= + integrity sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ== dependencies: isobject "^3.0.1" obliterator@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/obliterator/-/obliterator-2.0.2.tgz#25f50dc92e1181371b9d8209d11890f1a3c2fc21" - integrity sha512-g0TrA7SbUggROhDPK8cEu/qpItwH2LSKcNl4tlfBNT54XY+nOsqrs0Q68h1V9b3HOSpIWv15jb1lax2hAggdIg== + version "2.0.4" + resolved "https://registry.yarnpkg.com/obliterator/-/obliterator-2.0.4.tgz#fa650e019b2d075d745e44f1effeb13a2adbe816" + integrity sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ== oboe@2.1.4: version "2.1.4" resolved "https://registry.yarnpkg.com/oboe/-/oboe-2.1.4.tgz#20c88cdb0c15371bb04119257d4fdd34b0aa49f6" - integrity sha1-IMiM2wwVNxuwQRklfU/dNLCqSfY= + integrity sha512-ymBJ4xSC6GBXLT9Y7lirj+xbqBLa+jADGJldGEYG7u8sZbS9GyG+u1Xk9c5cbriKwSpCg41qUhPjvU5xOpvIyQ== dependencies: http-https "^1.0.0" -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= +on-finished@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" + integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== dependencies: ee-first "1.1.1" once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== dependencies: wrappy "1" onetime@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" - integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= + integrity sha512-oyyPpiMaKARvvcgip+JV+7zci5L8D1W9RZIz2l1o08AM3pfspitVWnPt3mzHcBPp12oYMTy0pqrFs/C+m3EwsQ== dependencies: mimic-fn "^1.0.0" @@ -6858,19 +6846,19 @@ optionator@^0.8.2: os-homedir@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= + integrity sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ== os-locale@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" - integrity sha1-IPnxeuKe00XoveWDsT0gCYA8FNk= + integrity sha512-PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g== dependencies: lcid "^1.0.0" os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= + integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== p-cancelable@^0.3.0: version "0.3.0" @@ -6885,7 +6873,7 @@ p-cancelable@^1.0.0: p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" - integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= + integrity sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow== p-limit@^1.1.0: version "1.3.0" @@ -6904,7 +6892,7 @@ p-limit@^3.0.2: p-locate@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= + integrity sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg== dependencies: p-limit "^1.1.0" @@ -6925,14 +6913,14 @@ p-map@^4.0.0: p-timeout@^1.1.1: version "1.2.1" resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-1.2.1.tgz#5eb3b353b7fce99f101a1038880bb054ebbea386" - integrity sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y= + integrity sha512-gb0ryzr+K2qFqFv6qi3khoeqMZF/+ajxQipEF6NteZVnvz9tzdsfAVj3lYtn1gAXvH5lfLwfxEII799gt/mRIA== dependencies: p-finally "^1.0.0" p-try@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= + integrity sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww== parent-module@^1.0.0: version "1.0.1" @@ -6960,14 +6948,14 @@ parse-headers@^2.0.0: parse-json@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" - integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= + integrity sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ== dependencies: error-ex "^1.2.0" parse-json@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" - integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= + integrity sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw== dependencies: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" @@ -6980,7 +6968,7 @@ parseurl@~1.3.3: pascalcase@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" - integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= + integrity sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw== patch-package@6.2.2: version "6.2.2" @@ -7027,14 +7015,14 @@ path-browserify@^1.0.0: path-exists@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" - integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= + integrity sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ== dependencies: pinkie-promise "^2.0.0" path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + integrity sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ== path-exists@^4.0.0: version "4.0.0" @@ -7044,17 +7032,17 @@ path-exists@^4.0.0: path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== path-is-inside@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" - integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= + integrity sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w== path-key@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= + integrity sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw== path-parse@^1.0.6, path-parse@^1.0.7: version "1.0.7" @@ -7064,12 +7052,12 @@ path-parse@^1.0.6, path-parse@^1.0.7: path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= + integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== path-type@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" - integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= + integrity sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg== dependencies: graceful-fs "^4.1.2" pify "^2.0.0" @@ -7099,7 +7087,7 @@ pbkdf2@^3.0.17, pbkdf2@^3.0.3, pbkdf2@^3.0.9: performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= + integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow== picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: version "2.3.1" @@ -7109,24 +7097,24 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: pify@^2.0.0, pify@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= + integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog== pinkie-promise@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= + integrity sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw== dependencies: pinkie "^2.0.0" pinkie@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= + integrity sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg== posix-character-classes@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" - integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= + integrity sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg== postinstall-postinstall@^2.1.0: version "2.1.0" @@ -7136,22 +7124,22 @@ postinstall-postinstall@^2.1.0: precond@0.2: version "0.2.3" resolved "https://registry.yarnpkg.com/precond/-/precond-0.2.3.tgz#aa9591bcaa24923f1e0f4849d240f47efc1075ac" - integrity sha1-qpWRvKokkj8eD0hJ0kD0fvwQdaw= + integrity sha512-QCYG84SgGyGzqJ/vlMsxeXd/pgL/I94ixdNFyh1PusWmTCyVfPJjZ1K1jvHtsbfnXQs2TSkEP2fR7QiMZAnKFQ== prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" - integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= + integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== prepend-http@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" - integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= + integrity sha512-PhmXi5XmoyKw1Un4E+opM2KcsJInDvKyuOumcjjw3waw86ZNjHwVUOOWLc4bCzLdcKNaWBH9e99sbWzDQsVaYg== prepend-http@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" - integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= + integrity sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA== prettier-linter-helpers@^1.0.0: version "1.0.0" @@ -7183,14 +7171,9 @@ prettier@^1.14.3: integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== prettier@^2.1.2: - version "2.6.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.6.1.tgz#d472797e0d7461605c1609808e27b80c0f9cfe17" - integrity sha512-8UVbTBYGwN37Bs9LERmxCPjdvPxlEowx2urIL6urHzdb3SDq4B/Z6xLFCblrSnE4iKWcS6ziJ3aOYrc1kz/E2A== - -printj@~1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/printj/-/printj-1.3.1.tgz#9af6b1d55647a1587ac44f4c1654a4b95b8e12cb" - integrity sha512-GA3TdL8szPK4AQ2YnOe/b+Y1jUFwmmGMMK/qbY7VcE3Z7FU8JstbKiKRzO6CIiAKPhTO8m01NoQ0V5f3jc4OGg== + version "2.7.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" + integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== private@^0.1.6, private@^0.1.8: version "0.1.8" @@ -7205,7 +7188,7 @@ process-nextick-args@~2.0.0: process@^0.11.10: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= + integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== progress@^2.0.0: version "2.0.3" @@ -7215,7 +7198,7 @@ progress@^2.0.0: promise-to-callback@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/promise-to-callback/-/promise-to-callback-1.0.0.tgz#5d2a749010bfb67d963598fcd3960746a68feef7" - integrity sha1-XSp0kBC/tn2WNZj805YHRqaP7vc= + integrity sha512-uhMIZmKM5ZteDMfLgJnoSq9GCwsNKrYau73Awf1jIy6/eUcuuZ3P+CD9zUv0kJsIUbU+x6uLNIhXhLHDs1pNPA== dependencies: is-fn "^1.0.0" set-immediate-shim "^1.0.1" @@ -7240,17 +7223,17 @@ proxy-addr@~2.0.7: prr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" - integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= + integrity sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw== pseudomap@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= + integrity sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ== psl@^1.1.28: - version "1.8.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" - integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== + version "1.9.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" + integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== public-encrypt@^4.0.0: version "4.0.3" @@ -7267,7 +7250,7 @@ public-encrypt@^4.0.0: pull-cat@^1.1.9: version "1.1.11" resolved "https://registry.yarnpkg.com/pull-cat/-/pull-cat-1.1.11.tgz#b642dd1255da376a706b6db4fa962f5fdb74c31b" - integrity sha1-tkLdElXaN2pwa220+pYvX9t0wxs= + integrity sha512-i3w+xZ3DCtTVz8S62hBOuNLRHqVDsHMNZmgrZsjPnsxXUgbWtXEee84lo1XswE7W2a3WHyqsNuDJTjVLAQR8xg== pull-defer@^0.2.2: version "0.2.3" @@ -7290,7 +7273,7 @@ pull-level@^2.0.3: pull-live@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/pull-live/-/pull-live-1.0.1.tgz#a4ecee01e330155e9124bbbcf4761f21b38f51f5" - integrity sha1-pOzuAeMwFV6RJLu89HYfIbOPUfU= + integrity sha512-tkNz1QT5gId8aPhV5+dmwoIiA1nmfDOzJDlOOUpU5DNusj6neNd3EePybJ5+sITr2FwyCs/FVpx74YMCfc8YeA== dependencies: pull-cat "^1.1.9" pull-stream "^3.4.0" @@ -7298,7 +7281,7 @@ pull-live@^1.0.1: pull-pushable@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/pull-pushable/-/pull-pushable-2.2.0.tgz#5f2f3aed47ad86919f01b12a2e99d6f1bd776581" - integrity sha1-Xy867UethpGfAbEqLpnW8b13ZYE= + integrity sha512-M7dp95enQ2kaHvfCt2+DJfyzgCSpWVR2h2kWYnVsW6ZpxQBx5wOu0QWOvQPVoPnBLUZYitYP2y7HyHkLQNeGXg== pull-stream@^3.2.3, pull-stream@^3.4.0, pull-stream@^3.6.8: version "3.6.14" @@ -7308,7 +7291,7 @@ pull-stream@^3.2.3, pull-stream@^3.4.0, pull-stream@^3.6.8: pull-window@^2.1.4: version "2.1.4" resolved "https://registry.yarnpkg.com/pull-window/-/pull-window-2.1.4.tgz#fc3b86feebd1920c7ae297691e23f705f88552f0" - integrity sha1-/DuG/uvRkgx64pdpHiP3BfiFUvA= + integrity sha512-cbDzN76BMlcGG46OImrgpkMf/VkCnupj8JhsrpBw3aWBM9ye345aYnqitmZCgauBkc0HbbRRn9hCnsa3k2FNUg== dependencies: looper "^2.0.0" @@ -7323,30 +7306,32 @@ pump@^3.0.0: punycode@1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= + integrity sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw== punycode@2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d" - integrity sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0= + integrity sha512-Yxz2kRwT90aPiWEMHVYnEf4+rhwF1tBmmZ4KepCP+Wkium9JxtWnUm1nqGwpiAHr/tnTSeHqr3wb++jgSkXjhA== punycode@^2.1.0, punycode@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -qs@6.9.7: - version "6.9.7" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.7.tgz#4610846871485e1e048f44ae3b94033f0e675afe" - integrity sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw== - -qs@^6.7.0, qs@^6.9.4: +qs@6.10.3: version "6.10.3" resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.3.tgz#d6cde1b2ffca87b5aa57889816c5f81535e22e8e" integrity sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ== dependencies: side-channel "^1.0.4" +qs@^6.7.0, qs@^6.9.4: + version "6.11.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" + integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== + dependencies: + side-channel "^1.0.4" + qs@~6.5.2: version "6.5.3" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" @@ -7364,7 +7349,7 @@ query-string@^5.0.1: querystring@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= + integrity sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g== queue-microtask@^1.2.2: version "1.2.3" @@ -7391,17 +7376,7 @@ range-parser@~1.2.1: resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== -raw-body@2.4.3: - version "2.4.3" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.3.tgz#8f80305d11c2a0a545c2d9d89d7a0286fcead43c" - integrity sha512-UlTNLIcu0uzb4D2f4WltY6cVjLi+/jEN4lgEUj3E04tpMDpUlkBo/eSn6zou9hum2VMNpCCUone0O0WeJim07g== - dependencies: - bytes "3.1.2" - http-errors "1.8.1" - iconv-lite "0.4.24" - unpipe "1.0.0" - -raw-body@^2.4.1: +raw-body@2.5.1, raw-body@^2.4.1: version "2.5.1" resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.1.tgz#fe1b1628b181b700215e5fd42389f98b71392857" integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig== @@ -7414,7 +7389,7 @@ raw-body@^2.4.1: read-pkg-up@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" - integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI= + integrity sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A== dependencies: find-up "^1.0.0" read-pkg "^1.0.0" @@ -7422,7 +7397,7 @@ read-pkg-up@^1.0.1: read-pkg@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" - integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= + integrity sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ== dependencies: load-json-file "^1.0.0" normalize-package-data "^2.3.2" @@ -7431,7 +7406,7 @@ read-pkg@^1.0.0: readable-stream@^1.0.33: version "1.1.14" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" - integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= + integrity sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ== dependencies: core-util-is "~1.0.0" inherits "~2.0.1" @@ -7463,7 +7438,7 @@ readable-stream@^3.0.6, readable-stream@^3.1.0, readable-stream@^3.4.0, readable readable-stream@~1.0.15: version "1.0.34" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" - integrity sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw= + integrity sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg== dependencies: core-util-is "~1.0.0" inherits "~2.0.1" @@ -7504,13 +7479,14 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" -regexp.prototype.flags@^1.2.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.1.tgz#b3f4c0059af9e47eca9f3f660e51d81307e72307" - integrity sha512-pMR7hBVUUGI7PMA37m2ofIdQCsomVnas+Jn5UPGAHQ+/LlwKm/aTLJHdasmHRzlfeZwHiAOaRSo2rbBDm3nNUQ== +regexp.prototype.flags@^1.2.0, regexp.prototype.flags@^1.4.3: + version "1.4.3" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz#87cab30f80f66660181a3bb7bf5981a872b367ac" + integrity sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA== dependencies: call-bind "^1.0.2" define-properties "^1.1.3" + functions-have-names "^1.2.2" regexpp@^2.0.1: version "2.0.1" @@ -7525,7 +7501,7 @@ regexpp@^3.2.0: regexpu-core@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" - integrity sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA= + integrity sha512-tJ9+S4oKjxY8IZ9jmjnp/mtytu1u3iyIQAfmI51IKWH6bFf7XR1ybtaO6j7INhZKXOTYADk7V5qxaqLkmNxiZQ== dependencies: regenerate "^1.2.1" regjsgen "^0.2.0" @@ -7534,12 +7510,12 @@ regexpu-core@^2.0.0: regjsgen@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" - integrity sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc= + integrity sha512-x+Y3yA24uF68m5GA+tBjbGYo64xXVJpbToBaWCoSNSc1hdk6dfctaRWrNFTVJZIIhL5GxW8zwjoixbnifnK59g== regjsparser@^0.1.4: version "0.1.5" resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" - integrity sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw= + integrity sha512-jlQ9gYLfk2p3V5Ag5fYhA7fv7OHzd1KUH0PRP46xc3TgwjwgROIW572AfYg/X9kaNq/LJnu6oJcFRXlIrGoTRw== dependencies: jsesc "~0.5.0" @@ -7551,12 +7527,12 @@ repeat-element@^1.1.2: repeat-string@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= + integrity sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w== repeating@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" - integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= + integrity sha512-ZqtSMuVybkISo2OWvqvm7iHSWngvdaW3IpsT9/uP8v4gMi591LY6h35wdOfvQdWCKFWZWm2Y1Opp4kV7vQKT6A== dependencies: is-finite "^1.0.0" @@ -7589,12 +7565,12 @@ request@^2.79.0, request@^2.85.0: require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== require-from-string@^1.1.0: version "1.2.1" resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" - integrity sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg= + integrity sha512-H7AkJWMobeskkttHyhTVtS0fxpFLjxhbfMa6Bk3wimP7sdPRGL3EyCg3sAQenFfAe+xQ+oAc85Nmtvq0ROM83Q== require-from-string@^2.0.0: version "2.0.2" @@ -7604,12 +7580,12 @@ require-from-string@^2.0.0: require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" - integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= + integrity sha512-IqSUtOVP4ksd1C/ej5zeEh/BIP2ajqpn8c5x+q99gvcIG/Qf0cud5raVnE/Dwd0ua9TXYDoDc0RE5hBSdz22Ug== resolve-from@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" - integrity sha1-six699nWiBvItuZTM17rywoYh0g= + integrity sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw== resolve-from@^4.0.0: version "4.0.0" @@ -7619,7 +7595,7 @@ resolve-from@^4.0.0: resolve-url@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" - integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= + integrity sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg== resolve@1.17.0: version "1.17.0" @@ -7629,25 +7605,25 @@ resolve@1.17.0: path-parse "^1.0.6" resolve@^1.10.0, resolve@^1.8.1, resolve@~1.22.0: - version "1.22.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.0.tgz#5e0b8c67c15df57a89bdbabe603a002f21731198" - integrity sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw== + version "1.22.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" + integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== dependencies: - is-core-module "^2.8.1" + is-core-module "^2.9.0" path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" responselike@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" - integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= + integrity sha512-/Fpe5guzJk1gPqdJLJR5u7eG/gNY4nImjbRDaVWVMRhne55TCmj2i9Q+54PBRfatRC8v/rIiv9BN0pMd9OV5EQ== dependencies: lowercase-keys "^1.0.0" restore-cursor@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" - integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368= + integrity sha512-6IzJLuGi4+R14vwagDHX+JrXmPVtPpn4mffDJ1UdR7/Edm87fl6yi8mMBIVvFtJaNTUvjughmW4hwLhRG7gC1Q== dependencies: onetime "^2.0.0" signal-exit "^3.0.2" @@ -7655,7 +7631,7 @@ restore-cursor@^2.0.0: resumer@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/resumer/-/resumer-0.0.0.tgz#f1e8f461e4064ba39e82af3cdc2a8c893d076759" - integrity sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k= + integrity sha512-Fn9X8rX8yYF4m81rZCK/5VmrmsSbqS/i3rDLl6ZZHAXgC2nTAx3dhwG8q8odP/RmdLa2YrybDJaAMg+X1ajY3w== dependencies: through "~2.3.4" @@ -7747,7 +7723,7 @@ safe-event-emitter@^1.0.1: safe-regex@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" - integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= + integrity sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg== dependencies: ret "~0.1.10" @@ -7764,7 +7740,7 @@ scrypt-js@3.0.1, scrypt-js@^3.0.0, scrypt-js@^3.0.1: scryptsy@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/scryptsy/-/scryptsy-1.2.1.tgz#a3225fa4b2524f802700761e2855bdf3b2d92163" - integrity sha1-oyJfpLJST4AnAHYeKFW987LZIWM= + integrity sha512-aldIRgMozSJ/Gl6K6qmJZysRP82lz83Wb42vl4PWN8SaLFHIaOzLPc9nUUW2jQN88CuGm5q5HefJ9jZ3nWSmTw== dependencies: pbkdf2 "^3.0.3" @@ -7785,7 +7761,7 @@ seedrandom@3.0.1: semaphore-async-await@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/semaphore-async-await/-/semaphore-async-await-1.5.1.tgz#857bef5e3644601ca4b9570b87e9df5ca12974fa" - integrity sha1-hXvvXjZEYBykuVcLh+nfXKEpdPo= + integrity sha512-b/ptP11hETwYWpeilHXXQiV5UJNJl7ZWWooKRE5eBIYWoom6dZ0SluCIdCtKycsMtZgKWE01/qAw6jblw1YVhg== semaphore@>=1.0.1, semaphore@^1.0.3, semaphore@^1.1.0: version "1.1.0" @@ -7803,9 +7779,9 @@ semver@^6.3.0: integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== semver@^7.3.5: - version "7.3.5" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" - integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== + version "7.3.7" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" + integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== dependencies: lru-cache "^6.0.0" @@ -7814,24 +7790,24 @@ semver@~5.4.1: resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" integrity sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg== -send@0.17.2: - version "0.17.2" - resolved "https://registry.yarnpkg.com/send/-/send-0.17.2.tgz#926622f76601c41808012c8bf1688fe3906f7820" - integrity sha512-UJYB6wFSJE3G00nEivR5rgWp8c2xXvJ3OPWPhmuteU0IKj8nKbG3DrjiOmLwpnHGYWAVwA69zmTm++YG0Hmwww== +send@0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" + integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== dependencies: debug "2.6.9" - depd "~1.1.2" - destroy "~1.0.4" + depd "2.0.0" + destroy "1.2.0" encodeurl "~1.0.2" escape-html "~1.0.3" etag "~1.8.1" fresh "0.5.2" - http-errors "1.8.1" + http-errors "2.0.0" mime "1.6.0" ms "2.1.3" - on-finished "~2.3.0" + on-finished "2.4.1" range-parser "~1.2.1" - statuses "~1.5.0" + statuses "2.0.1" serialize-javascript@6.0.0: version "6.0.0" @@ -7840,15 +7816,15 @@ serialize-javascript@6.0.0: dependencies: randombytes "^2.1.0" -serve-static@1.14.2: - version "1.14.2" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.2.tgz#722d6294b1d62626d41b43a013ece4598d292bfa" - integrity sha512-+TMNA9AFxUEGuC0z2mevogSnn9MXKb4fa7ngeRMJaaGv8vTwnIEkKi+QGvPt33HSnf8pRS+WGM0EbMtCJLKMBQ== +serve-static@1.15.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" + integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== dependencies: encodeurl "~1.0.2" escape-html "~1.0.3" parseurl "~1.3.3" - send "0.17.2" + send "0.18.0" servify@^0.1.12: version "0.1.12" @@ -7864,12 +7840,12 @@ servify@^0.1.12: set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== set-immediate-shim@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" - integrity sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E= + integrity sha512-Li5AOqrZWCVA2n5kryzEmqai6bKSIvpz5oUJHPVj6+dsbD3X1ixtsY5tEnsaNpH3pFAHmG8eIHUrtEtohrg+UQ== set-value@^2.0.0, set-value@^2.0.1: version "2.0.1" @@ -7884,7 +7860,7 @@ set-value@^2.0.0, set-value@^2.0.1: setimmediate@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= + integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA== setprototypeof@1.2.0: version "1.2.0" @@ -7902,14 +7878,14 @@ sha.js@^2.4.0, sha.js@^2.4.8: shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= + integrity sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg== dependencies: shebang-regex "^1.0.0" shebang-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= + integrity sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ== side-channel@^1.0.4: version "1.0.4" @@ -7942,7 +7918,7 @@ simple-get@^2.7.0: slash@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" - integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= + integrity sha512-3TYDR7xWt4dIqV2JauJr+EJeW356RXijHeUlO+8djJ+uBXPn8/2dpzBc8yQhh583sVvc9CvFAeQVgijsH+PNNg== slash@^2.0.0: version "2.0.0" @@ -8063,9 +8039,9 @@ solhint@3.3.6: prettier "^1.14.3" solidity-ast@^0.4.15: - version "0.4.34" - resolved "https://registry.yarnpkg.com/solidity-ast/-/solidity-ast-0.4.34.tgz#1d782e4bfa0c9601f9e25219d6063b16eff7ef52" - integrity sha512-wqBCPzJyAumW0iVcrMZhDDwomNrMT8NL4hebtKnjIDFVBRMumknCndP32kSPrYHL7mqWZ9HecXT3ZZHBkOtcwg== + version "0.4.35" + resolved "https://registry.yarnpkg.com/solidity-ast/-/solidity-ast-0.4.35.tgz#82e064b14dc989338123264bde2235cad751f128" + integrity sha512-F5bTDLh3rmDxRmLSrs3qt3nvxJprWSEkS7h2KmuXDx7XTfJ6ZKVTV1rtPIYCqJAuPsU/qa8YUeFn7jdOAZcTPA== solidity-comments-extractor@^0.0.7: version "0.0.7" @@ -8114,7 +8090,7 @@ source-map-url@^0.4.0: source-map@^0.5.6, source-map@^0.5.7: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= + integrity sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ== source-map@^0.6.0: version "0.6.1" @@ -8157,7 +8133,7 @@ split-string@^3.0.1, split-string@^3.0.2: sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== sshpk@^1.7.0: version "1.17.0" @@ -8184,7 +8160,7 @@ stacktrace-parser@^0.1.10: static-extend@^0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" - integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= + integrity sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g== dependencies: define-property "^0.2.5" object-copy "^0.1.0" @@ -8194,11 +8170,6 @@ statuses@2.0.1: resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== -"statuses@>= 1.5.0 < 2", statuses@~1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" - integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= - stream-to-pull-stream@^1.7.1: version "1.7.3" resolved "https://registry.yarnpkg.com/stream-to-pull-stream/-/stream-to-pull-stream-1.7.3.tgz#4161aa2d2eb9964de60bfa1af7feaf917e874ece" @@ -8210,12 +8181,12 @@ stream-to-pull-stream@^1.7.1: strict-uri-encode@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" - integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= + integrity sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ== string-width@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= + integrity sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw== dependencies: code-point-at "^1.0.0" is-fullwidth-code-point "^1.0.0" @@ -8248,29 +8219,31 @@ string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2: strip-ansi "^6.0.1" string.prototype.trim@~1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.5.tgz#a587bcc8bfad8cb9829a577f5de30dd170c1682c" - integrity sha512-Lnh17webJVsD6ECeovpVN17RlAKjmz4rF9S+8Y45CkMc/ufVpTkU3vZIyIC7sllQ1FCvObZnnCdNs/HXTUOTlg== + version "1.2.6" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.6.tgz#824960787db37a9e24711802ed0c1d1c0254f83e" + integrity sha512-8lMR2m+U0VJTPp6JjvJTtGyc4FIGq9CdRt7O9p6T0e6K4vjU+OP+SQJpbe/SBmRcCUIvNUnjsbmY6lnMp8MhsQ== dependencies: call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.1" + define-properties "^1.1.4" + es-abstract "^1.19.5" -string.prototype.trimend@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz#e75ae90c2942c63504686c18b287b4a0b1a45f80" - integrity sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A== +string.prototype.trimend@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz#914a65baaab25fbdd4ee291ca7dde57e869cb8d0" + integrity sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog== dependencies: call-bind "^1.0.2" - define-properties "^1.1.3" + define-properties "^1.1.4" + es-abstract "^1.19.5" -string.prototype.trimstart@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz#b36399af4ab2999b4c9c648bd7a3fb2bb26feeed" - integrity sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw== +string.prototype.trimstart@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz#5466d93ba58cfa2134839f81d7f42437e8c01fef" + integrity sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg== dependencies: call-bind "^1.0.2" - define-properties "^1.1.3" + define-properties "^1.1.4" + es-abstract "^1.19.5" string_decoder@^1.1.1: version "1.3.0" @@ -8282,7 +8255,7 @@ string_decoder@^1.1.1: string_decoder@~0.10.x: version "0.10.31" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= + integrity sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ== string_decoder@~1.1.1: version "1.1.1" @@ -8294,14 +8267,14 @@ string_decoder@~1.1.1: strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= + integrity sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg== dependencies: ansi-regex "^2.0.0" strip-ansi@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= + integrity sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow== dependencies: ansi-regex "^3.0.0" @@ -8322,14 +8295,14 @@ strip-ansi@^6.0.0, strip-ansi@^6.0.1: strip-bom@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" - integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= + integrity sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g== dependencies: is-utf8 "^0.2.0" strip-hex-prefix@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz#0c5f155fef1151373377de9dbb588da05500e36f" - integrity sha1-DF8VX+8RUTczd96du1iNoFUA428= + integrity sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A== dependencies: is-hex-prefixed "1.0.0" @@ -8341,7 +8314,7 @@ strip-json-comments@3.1.1: strip-json-comments@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== supports-color@8.1.1: version "8.1.1" @@ -8353,7 +8326,7 @@ supports-color@8.1.1: supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= + integrity sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g== supports-color@^5.3.0: version "5.5.0" @@ -8402,9 +8375,9 @@ table@^5.2.3: string-width "^3.0.0" tape@^4.6.3: - version "4.15.0" - resolved "https://registry.yarnpkg.com/tape/-/tape-4.15.0.tgz#1b8a9563b4bc7e51302216c137732fb2ce6d1a99" - integrity sha512-SfRmG2I8QGGgJE/MCiLH8c11L5XxyUXxwK9xLRD0uiK5fehRkkSZGmR6Y1pxOt8vJ19m3sY+POTQpiaVv45/LQ== + version "4.15.1" + resolved "https://registry.yarnpkg.com/tape/-/tape-4.15.1.tgz#88fb662965a11f9be1bddb04c11662d7eceb129e" + integrity sha512-k7F5pyr91n9D/yjSJwbLLYDCrTWXxMSXbbmHX2n334lSIc2rxeXyFkaBv4UuUd2gBYMrAOalPutAiCxC6q1qbw== dependencies: call-bind "~1.0.2" deep-equal "~1.1.1" @@ -8415,7 +8388,7 @@ tape@^4.6.3: has "~1.0.3" inherits "~2.0.4" is-regex "~1.1.4" - minimist "~1.2.5" + minimist "~1.2.6" object-inspect "~1.12.0" resolve "~1.22.0" resumer "~0.0.0" @@ -8438,7 +8411,7 @@ tar@^4.0.2: test-value@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/test-value/-/test-value-2.1.0.tgz#11da6ff670f3471a73b625ca4f3fdcf7bb748291" - integrity sha1-Edpv9nDzRxpztiXKTz/c97t0gpE= + integrity sha512-+1epbAxtKeXttkGFMTX9H42oqzOTufR1ceCF+GYA5aOmvaPq9wd4PUS8329fn2RRLGNeUkgRLnVpycjx8DsO2w== dependencies: array-back "^1.0.3" typical "^2.6.0" @@ -8451,7 +8424,7 @@ testrpc@0.0.1: text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= + integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== through2@^2.0.3: version "2.0.5" @@ -8464,12 +8437,12 @@ through2@^2.0.3: through@^2.3.6, through@~2.3.4, through@~2.3.8: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= + integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== timed-out@^4.0.0, timed-out@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" - integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= + integrity sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA== tmp@0.0.33, tmp@^0.0.33: version "0.0.33" @@ -8488,12 +8461,12 @@ tmp@0.1.0: to-fast-properties@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" - integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= + integrity sha512-lxrWP8ejsq+7E3nNjwYmUBMAgjMTZoTI+sdBOpvNyijeDLa29LUn9QaoXAHv4+Z578hbmHHJKZknzxVtvo77og== to-object-path@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" - integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= + integrity sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg== dependencies: kind-of "^3.0.2" @@ -8505,7 +8478,7 @@ to-readable-stream@^1.0.0: to-regex-range@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" - integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= + integrity sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg== dependencies: is-number "^3.0.0" repeat-string "^1.6.1" @@ -8543,7 +8516,7 @@ tough-cookie@~2.5.0: tr46@~0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" - integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= + integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== treeify@^1.1.0: version "1.1.0" @@ -8553,7 +8526,7 @@ treeify@^1.1.0: trim-right@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" - integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= + integrity sha512-WZGXGstmCWgeevgTL54hrCuw1dyMQIzWy7ZfqRJfSmJZBwklI15egmQytFP6bPidmw3M8d5yEowl1niq4vmqZw== "true-case-path@^2.2.1": version "2.2.1" @@ -8611,7 +8584,7 @@ tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: tsort@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/tsort/-/tsort-0.0.1.tgz#e2280f5e817f8bf4275657fd0f9aebd44f5a2786" - integrity sha1-4igPXoF/i/QnVlf9D5rr1E9aJ4Y= + integrity sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw== tsutils@^3.21.0: version "3.21.0" @@ -8623,7 +8596,7 @@ tsutils@^3.21.0: tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= + integrity sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== dependencies: safe-buffer "^5.0.1" @@ -8635,7 +8608,7 @@ tweetnacl-util@^0.15.0, tweetnacl-util@^0.15.1: tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= + integrity sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA== tweetnacl@^1.0.0, tweetnacl@^1.0.3: version "1.0.3" @@ -8645,7 +8618,7 @@ tweetnacl@^1.0.0, tweetnacl@^1.0.3: type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" - integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= + integrity sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg== dependencies: prelude-ls "~1.1.2" @@ -8678,9 +8651,9 @@ type@^1.0.1: integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== type@^2.5.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/type/-/type-2.6.0.tgz#3ca6099af5981d36ca86b78442973694278a219f" - integrity sha512-eiDBDOmkih5pMbo9OqsqPRGMljLodLcwd5XD5JbtNB0o89xZAwynY9EdCDsJU7LtcVCClu9DvM7/0Ep1hYX3EQ== + version "2.7.2" + resolved "https://registry.yarnpkg.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0" + integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== typechain@^3.0.0: version "3.0.0" @@ -8705,7 +8678,7 @@ typedarray-to-buffer@^3.1.5: typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= + integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== typescript@4.5.2: version "4.5.2" @@ -8715,38 +8688,38 @@ typescript@4.5.2: typewise-core@^1.2, typewise-core@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/typewise-core/-/typewise-core-1.2.0.tgz#97eb91805c7f55d2f941748fa50d315d991ef195" - integrity sha1-l+uRgFx/VdL5QXSPpQ0xXZke8ZU= + integrity sha512-2SCC/WLzj2SbUwzFOzqMCkz5amXLlxtJqDKTICqg30x+2DZxcfZN2MvQZmGfXWKNWaKK9pBPsvkcwv8bF/gxKg== typewise@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/typewise/-/typewise-1.0.3.tgz#1067936540af97937cc5dcf9922486e9fa284651" - integrity sha1-EGeTZUCvl5N8xdz5kiSG6fooRlE= + integrity sha512-aXofE06xGhaQSPzt8hlTY+/YWQhm9P0jYUp1f2XtmW/3Bk0qzXcyFWAtPoo2uTGQj1ZwbDuSyuxicq+aDo8lCQ== dependencies: typewise-core "^1.2.0" typewiselite@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/typewiselite/-/typewiselite-1.0.0.tgz#c8882fa1bb1092c06005a97f34ef5c8508e3664e" - integrity sha1-yIgvobsQksBgBal/NO9chQjjZk4= + integrity sha512-J9alhjVHupW3Wfz6qFRGgQw0N3gr8hOkw6zm7FZ6UR1Cse/oD9/JVok7DNE9TT9IbciDHX2Ex9+ksE6cRmtymw== typical@^2.6.0, typical@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/typical/-/typical-2.6.1.tgz#5c080e5d661cbbe38259d2e70a3c7253e873881d" - integrity sha1-XAgOXWYcu+OCWdLnCjxyU+hziB0= + integrity sha512-ofhi8kjIje6npGozTip9Fr8iecmYfEbS06i0JnIg+rh51KakryWF4+jX8lLKZVhy6N+ID45WYSFCxPOdTWCzNg== ultron@~1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" integrity sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og== -unbox-primitive@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.1.tgz#085e215625ec3162574dc8859abee78a59b14471" - integrity sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw== +unbox-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" + integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== dependencies: - function-bind "^1.1.1" - has-bigints "^1.0.1" - has-symbols "^1.0.2" + call-bind "^1.0.2" + has-bigints "^1.0.2" + has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" underscore@1.9.1: @@ -8754,10 +8727,10 @@ underscore@1.9.1: resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== -undici@^4.14.1: - version "4.16.0" - resolved "https://registry.yarnpkg.com/undici/-/undici-4.16.0.tgz#469bb87b3b918818d3d7843d91a1d08da357d5ff" - integrity sha512-tkZSECUYi+/T1i4u+4+lwZmQgLXd4BLGlrc7KZPcLIW7Jpq99+Xpc30ONv7nS6F5UNOxp/HBZSSL9MafUrvJbw== +undici@^5.4.0: + version "5.8.2" + resolved "https://registry.yarnpkg.com/undici/-/undici-5.8.2.tgz#071fc8a6a5d24db0ad510ad442f607d9b09d5eec" + integrity sha512-3KLq3pXMS0Y4IELV045fTxqz04Nk9Ms7yfBBHum3yxsTR4XNn+ZCaUbf/mWitgYDAhsplQ0B1G4S5D345lMO3A== union-value@^1.0.0: version "1.0.1" @@ -8787,12 +8760,12 @@ unorm@^1.3.3: unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= + integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== unset-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" - integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= + integrity sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ== dependencies: has-value "^0.3.1" isobject "^3.0.0" @@ -8807,36 +8780,36 @@ uri-js@^4.2.2: urix@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" - integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= + integrity sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg== url-parse-lax@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" - integrity sha1-evjzA2Rem9eaJy56FKxovAYJ2nM= + integrity sha512-BVA4lR5PIviy2PMseNd2jbFQ+jwSwQGdJejf5ctd1rEXt0Ypd7yanUK9+lYechVlN5VaTJGsu2U/3MDDu6KgBA== dependencies: prepend-http "^1.0.1" url-parse-lax@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c" - integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= + integrity sha512-NjFKA0DidqPa5ciFcSrXnAltTtzz84ogy+NebPvfEgAck0+TNg4UJ4IN+fB7zRZfbgUf0syOo9MDxFkDSMuFaQ== dependencies: prepend-http "^2.0.0" url-set-query@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/url-set-query/-/url-set-query-1.0.0.tgz#016e8cfd7c20ee05cafe7795e892bd0702faa339" - integrity sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk= + integrity sha512-3AChu4NiXquPfeckE5R5cGdiHCMWJx1dwCWOmWIL4KHAziJNOFIYJlpGFeKDvwLPHovZRCxK3cYlwzqI9Vp+Gg== url-to-options@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" - integrity sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k= + integrity sha512-0kQLIzG4fdk/G5NONku64rSH/x32NOA39LVQqlK8Le6lvTF6GGRJpqaQFGgU+CLwySIqBSMdwYM0sYcW9f6P4A== url@^0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" - integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= + integrity sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ== dependencies: punycode "1.3.2" querystring "0.2.0" @@ -8861,7 +8834,7 @@ utf8@3.0.0, utf8@^3.0.0: util-deprecate@^1.0.1, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== util.promisify@^1.0.0: version "1.1.1" @@ -8877,7 +8850,7 @@ util.promisify@^1.0.0: utils-merge@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= + integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== uuid@3.3.2: version "3.3.2" @@ -8910,12 +8883,12 @@ varint@^5.0.0: vary@^1, vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= + integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= + integrity sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw== dependencies: assert-plus "^1.0.0" core-util-is "1.0.2" @@ -9173,25 +9146,12 @@ web3-utils@1.2.11: underscore "1.9.1" utf8 "3.0.0" -web3-utils@^1.0.0-beta.31: - version "1.7.1" - resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.7.1.tgz#77d8bacaf426c66027d8aa4864d77f0ed211aacd" - integrity sha512-fef0EsqMGJUgiHPdX+KN9okVWshbIumyJPmR+btnD1HgvoXijKEkuKBv0OmUqjbeqmLKP2/N9EiXKJel5+E1Dw== - dependencies: - bn.js "^4.11.9" - ethereum-bloom-filters "^1.0.6" - ethereumjs-util "^7.1.0" - ethjs-unit "0.1.6" - number-to-bn "1.7.0" - randombytes "^2.1.0" - utf8 "3.0.0" - -web3-utils@^1.3.4: - version "1.7.3" - resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.7.3.tgz#b214d05f124530d8694ad364509ac454d05f207c" - integrity sha512-g6nQgvb/bUpVUIxJE+ezVN+rYwYmlFyMvMIRSuqpi1dk6ApDD00YNArrk7sPcZnjvxOJ76813Xs2vIN2rgh4lg== +web3-utils@^1.0.0-beta.31, web3-utils@^1.3.4: + version "1.7.5" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.7.5.tgz#081a952ac6e0322e25ac97b37358a43c7372ef6a" + integrity sha512-9AqNOziQky4wNQadEwEfHiBdOZqopIHzQQVzmvvv6fJwDSMhP+khqmAZC7YTiGjs0MboyZ8tWNivqSO1699XQw== dependencies: - bn.js "^4.11.9" + bn.js "^5.2.1" ethereum-bloom-filters "^1.0.6" ethereumjs-util "^7.1.0" ethjs-unit "0.1.6" @@ -9215,7 +9175,7 @@ web3@1.2.11: webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" - integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE= + integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== websocket@1.0.32: version "1.0.32" @@ -9241,7 +9201,7 @@ websocket@^1.0.31: utf-8-validate "^5.0.2" yaeti "^0.0.6" -whatwg-fetch@2.0.4: +whatwg-fetch@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" integrity sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng== @@ -9249,7 +9209,7 @@ whatwg-fetch@2.0.4: whatwg-url@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" - integrity sha1-lmRU6HZUYuN2RNNib2dCzotwll0= + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== dependencies: tr46 "~0.0.3" webidl-conversions "^3.0.0" @@ -9268,14 +9228,7 @@ which-boxed-primitive@^1.0.2: which-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" - integrity sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8= - -which@2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" + integrity sha512-F6+WgncZi/mJDrammbTuHe1q0R5hOXv/mBaiNA2TCNT/LTHusX0V+CJnj9XT8ki5ln2UZyyddDgHfCzyrOH7MQ== which@^1.2.9: version "1.3.1" @@ -9287,22 +9240,22 @@ which@^1.2.9: window-size@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" - integrity sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU= + integrity sha512-UD7d8HFA2+PZsbKyaOCEy8gMh1oDtHgJh1LfgjQ4zVXmYjAT/kvz3PueITKuqDiIXQe7yzpPnxX3lNc+AhQMyw== word-wrap@~1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== -workerpool@6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.0.tgz#827d93c9ba23ee2019c3ffaff5c27fccea289e8b" - integrity sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A== +workerpool@6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" + integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== wrap-ansi@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" - integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= + integrity sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw== dependencies: string-width "^1.0.1" strip-ansi "^3.0.1" @@ -9319,7 +9272,7 @@ wrap-ansi@^7.0.0: wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== write@1.0.3: version "1.0.3" @@ -9350,9 +9303,9 @@ ws@^5.1.1: async-limiter "~1.0.0" ws@^7.4.6: - version "7.5.7" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.7.tgz#9e0ac77ee50af70d58326ecff7e85eb3fa375e67" - integrity sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A== + version "7.5.9" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" + integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== xhr-request-promise@^0.1.2: version "0.1.3" @@ -9377,7 +9330,7 @@ xhr-request@^1.0.1, xhr-request@^1.1.0: xhr2-cookies@1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz#7d77449d0999197f155cb73b23df72505ed89d48" - integrity sha1-fXdEnQmZGX8VXLc7I99yUF7YnUg= + integrity sha512-hjXUA6q+jl/bd8ADHcVfFsSPIf+tyLIjuO9TwJC9WI6JP2zKcS7C+p56I9kCLLsaCiNT035iYvEUUzdEFj/8+g== dependencies: cookiejar "^2.1.1" @@ -9399,7 +9352,7 @@ xtend@^4.0.0, xtend@^4.0.1, xtend@^4.0.2, xtend@~4.0.0, xtend@~4.0.1: xtend@~2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-2.1.2.tgz#6efecc2a4dad8e6962c4901b337ce7ba87b5d28b" - integrity sha1-bv7MKk2tjmlixJAbM3znuoe10os= + integrity sha512-vMNKzr2rHP9Dp/e1NQFnLQlwlhp9L/LfvnsVdHxN1f+uggyVI3i08uD14GPvCToPkdsRfyPqIyYGmIk58V98ZQ== dependencies: object-keys "~0.4.0" @@ -9416,7 +9369,7 @@ y18n@^5.0.5: yaeti@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/yaeti/-/yaeti-0.0.6.tgz#f26f484d72684cf42bedfb76970aa1608fbf9577" - integrity sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc= + integrity sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug== yallist@^3.0.0, yallist@^3.0.2, yallist@^3.1.1: version "3.1.1" @@ -9436,7 +9389,7 @@ yargs-parser@20.2.4: yargs-parser@^2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-2.4.1.tgz#85568de3cf150ff49fa51825f03a8c880ddcc5c4" - integrity sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ= + integrity sha512-9pIKIJhnI5tonzG6OnCFlz/yln8xHYcGl+pn3xR0Vzff0vzN1PbNRaelgfgRUwZ3s4i3jvxT9WhmUGL4whnasA== dependencies: camelcase "^3.0.0" lodash.assign "^4.0.6" @@ -9472,7 +9425,7 @@ yargs@16.2.0: yargs@^4.7.1: version "4.8.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-4.8.1.tgz#c0c42924ca4aaa6b0e6da1739dfb216439f9ddc0" - integrity sha1-wMQpJMpKqmsObaFznfshZDn53cA= + integrity sha512-LqodLrnIDM3IFT+Hf/5sxBnEGECrfdC1uIbgZeJmESCSo4HoCAaKEus8MylXHAkdacGc0ye+Qa+dpkuom8uVYA== dependencies: cliui "^3.2.0" decamelize "^1.1.1" From e9be16a5191a2a5fc5622783d3570163e38d2abe Mon Sep 17 00:00:00 2001 From: MerlinEgalite Date: Wed, 10 Aug 2022 19:56:02 +0200 Subject: [PATCH 56/57] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20(#1216)=20Rename=20m?= =?UTF-8?q?orpho=20dao=20to=20incentives=20treasury=20vault?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contracts/aave-v2/IncentivesVault.sol | 26 +++++++-------- .../aave-v2/interfaces/IIncentivesVault.sol | 2 +- contracts/aave-v3/IncentivesVault.sol | 28 ++++++++-------- .../aave-v3/interfaces/IIncentivesVault.sol | 2 +- contracts/compound/IncentivesVault.sol | 32 +++++++++++-------- .../compound/interfaces/IIncentivesVault.sol | 2 +- .../aave-v2/TestIncentivesVault.t.sol | 18 +++++------ .../aave-v3/TestIncentivesVault.t.sol | 18 +++++------ .../compound/TestIncentivesVault.t.sol | 18 +++++------ 9 files changed, 75 insertions(+), 71 deletions(-) diff --git a/contracts/aave-v2/IncentivesVault.sol b/contracts/aave-v2/IncentivesVault.sol index ae5481a3e..bbffa1d62 100644 --- a/contracts/aave-v2/IncentivesVault.sol +++ b/contracts/aave-v2/IncentivesVault.sol @@ -25,7 +25,7 @@ contract IncentivesVault is IIncentivesVault, Ownable { ERC20 public immutable morphoToken; // The MORPHO token. IOracle public oracle; // The oracle used to get the price of MORPHO tokens against token reward tokens. - address public morphoDao; // The address of the Morpho DAO treasury. + address public incentivesTreasuryVault; // The address of the incentives treasury vault. uint256 public bonus; // The bonus percentage of MORPHO tokens to give to the user. bool public isPaused; // Whether the trade of token rewards for MORPHO rewards is paused or not. @@ -35,9 +35,9 @@ contract IncentivesVault is IIncentivesVault, Ownable { /// @param newOracle The new oracle set. event OracleSet(address newOracle); - /// @notice Emitted when the Morpho DAO is set. - /// @param newMorphoDao The address of the Morpho DAO. - event MorphoDaoSet(address newMorphoDao); + /// @notice Emitted when the incentives treasury vault is set. + /// @param newIncentivesTreasuryVault The address of the incentives treasury vault. + event IncentivesTreasuryVaultSet(address newIncentivesTreasuryVault); /// @notice Emitted when the reward bonus is set. /// @param newBonus The new bonus set. @@ -75,19 +75,19 @@ contract IncentivesVault is IIncentivesVault, Ownable { /// @param _morpho The main Morpho contract. /// @param _morphoToken The MORPHO token. /// @param _rewardToken The reward token. - /// @param _morphoDao The address of the Morpho DAO. + /// @param _incentivesTreasuryVault The address of the incentives treasury vault. /// @param _oracle The oracle. constructor( IMorpho _morpho, ERC20 _morphoToken, ERC20 _rewardToken, - address _morphoDao, + address _incentivesTreasuryVault, IOracle _oracle ) { morpho = _morpho; morphoToken = _morphoToken; rewardToken = _rewardToken; - morphoDao = _morphoDao; + incentivesTreasuryVault = _incentivesTreasuryVault; oracle = _oracle; } @@ -100,11 +100,11 @@ contract IncentivesVault is IIncentivesVault, Ownable { emit OracleSet(address(_newOracle)); } - /// @notice Sets the morpho DAO. - /// @param _newMorphoDao The address of the Morpho DAO. - function setMorphoDao(address _newMorphoDao) external onlyOwner { - morphoDao = _newMorphoDao; - emit MorphoDaoSet(_newMorphoDao); + /// @notice Sets the incentives treasury vault. + /// @param _newIncentivesTreasuryVault The address of the incentives treasury vault. + function setIncentivesTreasuryVault(address _newIncentivesTreasuryVault) external onlyOwner { + incentivesTreasuryVault = _newIncentivesTreasuryVault; + emit IncentivesTreasuryVaultSet(_newIncentivesTreasuryVault); } /// @notice Sets the reward bonus. @@ -127,7 +127,7 @@ contract IncentivesVault is IIncentivesVault, Ownable { /// @param _token The address of the token to transfer. /// @param _amount The amount of token to transfer to the DAO. function transferTokensToDao(address _token, uint256 _amount) external onlyOwner { - ERC20(_token).safeTransfer(morphoDao, _amount); + ERC20(_token).safeTransfer(incentivesTreasuryVault, _amount); emit TokensTransferred(_token, _amount); } diff --git a/contracts/aave-v2/interfaces/IIncentivesVault.sol b/contracts/aave-v2/interfaces/IIncentivesVault.sol index c9a4bba93..5209b6db2 100644 --- a/contracts/aave-v2/interfaces/IIncentivesVault.sol +++ b/contracts/aave-v2/interfaces/IIncentivesVault.sol @@ -6,7 +6,7 @@ import "./IOracle.sol"; interface IIncentivesVault { function setOracle(IOracle _newOracle) external; - function setMorphoDao(address _newMorphoDao) external; + function setIncentivesTreasuryVault(address _newIncentivesTreasuryVault) external; function setBonus(uint256 _newBonus) external; diff --git a/contracts/aave-v3/IncentivesVault.sol b/contracts/aave-v3/IncentivesVault.sol index ce94b6979..84c9ec282 100644 --- a/contracts/aave-v3/IncentivesVault.sol +++ b/contracts/aave-v3/IncentivesVault.sol @@ -24,7 +24,7 @@ contract IncentivesVault is IIncentivesVault, Ownable { ERC20 public immutable morphoToken; // The MORPHO token. IOracle public oracle; // The oracle used to get the price of MORPHO tokens against token reward tokens. - address public morphoDao; // The address of the Morpho DAO treasury. + address public incentivesTreasuryVault; // The address of the incentives treasury vault. uint256 public bonus; // The bonus percentage of MORPHO tokens to give to the user. bool public isPaused; // Whether the trade of token rewards for MORPHO rewards is paused or not. @@ -34,9 +34,9 @@ contract IncentivesVault is IIncentivesVault, Ownable { /// @param newOracle The new oracle set. event OracleSet(address newOracle); - /// @notice Emitted when the Morpho DAO is set. - /// @param newMorphoDao The address of the Morpho DAO. - event MorphoDaoSet(address newMorphoDao); + /// @notice Emitted when the incentives treasury vault is set. + /// @param newIncentivesTreasuryVault The address of the incentives treasury vault. + event IncentivesTreasuryVaultSet(address newIncentivesTreasuryVault); /// @notice Emitted when the reward bonus is set. /// @param newBonus The new bonus set. @@ -72,17 +72,17 @@ contract IncentivesVault is IIncentivesVault, Ownable { /// @notice Constructs the IncentivesVault contract. /// @param _morpho The main Morpho contract. /// @param _morphoToken The MORPHO token. - /// @param _morphoDao The address of the Morpho DAO. + /// @param _incentivesTreasuryVault The address of the incentives treasury vault. /// @param _oracle The oracle. constructor( IMorpho _morpho, ERC20 _morphoToken, - address _morphoDao, + address _incentivesTreasuryVault, IOracle _oracle ) { morpho = _morpho; morphoToken = _morphoToken; - morphoDao = _morphoDao; + incentivesTreasuryVault = _incentivesTreasuryVault; oracle = _oracle; } @@ -95,11 +95,11 @@ contract IncentivesVault is IIncentivesVault, Ownable { emit OracleSet(address(_newOracle)); } - /// @notice Sets the morpho DAO. - /// @param _newMorphoDao The address of the Morpho DAO. - function setMorphoDao(address _newMorphoDao) external onlyOwner { - morphoDao = _newMorphoDao; - emit MorphoDaoSet(_newMorphoDao); + /// @notice Sets the incentives treasury vault. + /// @param _newIncentivesTreasuryVault The address of the incentives treasury vault. + function setIncentivesTreasuryVault(address _newIncentivesTreasuryVault) external onlyOwner { + incentivesTreasuryVault = _newIncentivesTreasuryVault; + emit IncentivesTreasuryVaultSet(_newIncentivesTreasuryVault); } /// @notice Sets the reward bonus. @@ -122,7 +122,7 @@ contract IncentivesVault is IIncentivesVault, Ownable { /// @param _token The address of the token to transfer. /// @param _amount The amount of token to transfer to the DAO. function transferTokensToDao(address _token, uint256 _amount) external onlyOwner { - ERC20(_token).safeTransfer(morphoDao, _amount); + ERC20(_token).safeTransfer(incentivesTreasuryVault, _amount); emit TokensTransferred(_token, _amount); } @@ -146,7 +146,7 @@ contract IncentivesVault is IIncentivesVault, Ownable { if (claimedAmount > 0) { // Transfer reward tokens to the DAO. - ERC20(reward).safeTransferFrom(msg.sender, morphoDao, claimedAmount); + ERC20(reward).safeTransferFrom(msg.sender, incentivesTreasuryVault, claimedAmount); // Add a bonus on MORPHO rewards. amountOut += ((oracle.consult(claimedAmount, reward) * (MAX_BASIS_POINTS + bonus)) / diff --git a/contracts/aave-v3/interfaces/IIncentivesVault.sol b/contracts/aave-v3/interfaces/IIncentivesVault.sol index 85586175d..55af329ce 100644 --- a/contracts/aave-v3/interfaces/IIncentivesVault.sol +++ b/contracts/aave-v3/interfaces/IIncentivesVault.sol @@ -6,7 +6,7 @@ import "./IOracle.sol"; interface IIncentivesVault { function setOracle(IOracle _newOracle) external; - function setMorphoDao(address _newMorphoDao) external; + function setIncentivesTreasuryVault(address _newIncentivesTreasuryVault) external; function setBonus(uint256 _newBonus) external; diff --git a/contracts/compound/IncentivesVault.sol b/contracts/compound/IncentivesVault.sol index 6406d6283..2410ec827 100644 --- a/contracts/compound/IncentivesVault.sol +++ b/contracts/compound/IncentivesVault.sol @@ -25,7 +25,7 @@ contract IncentivesVault is IIncentivesVault, Ownable { ERC20 public immutable morphoToken; // The MORPHO token. IOracle public oracle; // The oracle used to get the price of MORPHO tokens against COMP tokens. - address public morphoDao; // The address of the Morpho DAO treasury. + address public incentivesTreasuryVault; // The address of the incentives treasury vault. uint256 public bonus; // The bonus percentage of MORPHO tokens to give to the user. bool public isPaused; // Whether the trade of COMP rewards for MORPHO rewards is paused or not. @@ -35,9 +35,9 @@ contract IncentivesVault is IIncentivesVault, Ownable { /// @param newOracle The new oracle set. event OracleSet(address newOracle); - /// @notice Emitted when the Morpho DAO is set. - /// @param newMorphoDao The address of the Morpho DAO. - event MorphoDaoSet(address newMorphoDao); + /// @notice Emitted when the incentives treasury vault is set. + /// @param newIncentivesTreasuryVault The address of the incentives treasury vault. + event IncentivesTreasuryVaultSet(address newIncentivesTreasuryVault); /// @notice Emitted when the reward bonus is set. /// @param newBonus The new bonus set. @@ -75,19 +75,19 @@ contract IncentivesVault is IIncentivesVault, Ownable { /// @param _comptroller The Compound comptroller. /// @param _morpho The main Morpho contract. /// @param _morphoToken The MORPHO token. - /// @param _morphoDao The address of the Morpho DAO. + /// @param _incentivesTreasuryVault The address of the incentives treasury vault. /// @param _oracle The oracle. constructor( IComptroller _comptroller, IMorpho _morpho, ERC20 _morphoToken, - address _morphoDao, + address _incentivesTreasuryVault, IOracle _oracle ) { morpho = _morpho; comptroller = _comptroller; morphoToken = _morphoToken; - morphoDao = _morphoDao; + incentivesTreasuryVault = _incentivesTreasuryVault; oracle = _oracle; } @@ -100,11 +100,11 @@ contract IncentivesVault is IIncentivesVault, Ownable { emit OracleSet(address(_newOracle)); } - /// @notice Sets the morpho DAO. - /// @param _newMorphoDao The address of the Morpho DAO. - function setMorphoDao(address _newMorphoDao) external onlyOwner { - morphoDao = _newMorphoDao; - emit MorphoDaoSet(_newMorphoDao); + /// @notice Sets the incentives treasury vault. + /// @param _newIncentivesTreasuryVault The address of the incentives treasury vault. + function setIncentivesTreasuryVault(address _newIncentivesTreasuryVault) external onlyOwner { + incentivesTreasuryVault = _newIncentivesTreasuryVault; + emit IncentivesTreasuryVaultSet(_newIncentivesTreasuryVault); } /// @notice Sets the reward bonus. @@ -127,7 +127,7 @@ contract IncentivesVault is IIncentivesVault, Ownable { /// @param _token The address of the token to transfer. /// @param _amount The amount of token to transfer to the DAO. function transferTokensToDao(address _token, uint256 _amount) external onlyOwner { - ERC20(_token).safeTransfer(morphoDao, _amount); + ERC20(_token).safeTransfer(incentivesTreasuryVault, _amount); emit TokensTransferred(_token, _amount); } @@ -138,7 +138,11 @@ contract IncentivesVault is IIncentivesVault, Ownable { if (msg.sender != address(morpho)) revert OnlyMorpho(); if (isPaused) revert VaultIsPaused(); // Transfer COMP to the DAO. - ERC20(comptroller.getCompAddress()).safeTransferFrom(msg.sender, morphoDao, _amount); + ERC20(comptroller.getCompAddress()).safeTransferFrom( + msg.sender, + incentivesTreasuryVault, + _amount + ); // Add a bonus on MORPHO rewards. uint256 amountOut = (oracle.consult(_amount) * (MAX_BASIS_POINTS + bonus)) / diff --git a/contracts/compound/interfaces/IIncentivesVault.sol b/contracts/compound/interfaces/IIncentivesVault.sol index 880abb994..284f3f002 100644 --- a/contracts/compound/interfaces/IIncentivesVault.sol +++ b/contracts/compound/interfaces/IIncentivesVault.sol @@ -6,7 +6,7 @@ import "./IOracle.sol"; interface IIncentivesVault { function setOracle(IOracle _newOracle) external; - function setMorphoDao(address _newMorphoDao) external; + function setIncentivesTreasuryVault(address _newIncentivesTreasuryVault) external; function setBonus(uint256 _newBonus) external; diff --git a/test-foundry/aave-v2/TestIncentivesVault.t.sol b/test-foundry/aave-v2/TestIncentivesVault.t.sol index 2ff645c87..b3244f826 100644 --- a/test-foundry/aave-v2/TestIncentivesVault.t.sol +++ b/test-foundry/aave-v2/TestIncentivesVault.t.sol @@ -18,7 +18,7 @@ contract TestIncentivesVault is Test, Config { Vm public hevm = Vm(HEVM_ADDRESS); address public REWARD_TOKEN = IAaveIncentivesController(aaveIncentivesControllerAddress).REWARD_TOKEN(); - address public morphoDao = address(1); + address public incentivesTreasuryVault = address(1); address public morpho = address(3); IncentivesVault public incentivesVault; MorphoToken public morphoToken; @@ -32,7 +32,7 @@ contract TestIncentivesVault is Test, Config { IMorpho(address(morpho)), morphoToken, ERC20(REWARD_TOKEN), - morphoDao, + incentivesTreasuryVault, dumbOracle ); ERC20(morphoToken).transfer( @@ -64,13 +64,13 @@ contract TestIncentivesVault is Test, Config { assertEq(incentivesVault.bonus(), bonusToSet); } - function testOnlyOwnerShouldSetMorphoDao() public { + function testOnlyOwnerShouldSetIncentivesTreasuryVault() public { hevm.prank(address(0)); hevm.expectRevert("Ownable: caller is not the owner"); - incentivesVault.setMorphoDao(morphoDao); + incentivesVault.setIncentivesTreasuryVault(incentivesTreasuryVault); - incentivesVault.setMorphoDao(morphoDao); - assertEq(incentivesVault.morphoDao(), morphoDao); + incentivesVault.setIncentivesTreasuryVault(incentivesTreasuryVault); + assertEq(incentivesVault.incentivesTreasuryVault(), incentivesTreasuryVault); } function testOnlyOwnerShouldSetOracle() public { @@ -102,7 +102,7 @@ contract TestIncentivesVault is Test, Config { incentivesVault.transferTokensToDao(address(morphoToken), 1); incentivesVault.transferTokensToDao(address(morphoToken), 1); - assertEq(ERC20(morphoToken).balanceOf(morphoDao), 1); + assertEq(ERC20(morphoToken).balanceOf(incentivesTreasuryVault), 1); } function testFailWhenContractNotActive() public { @@ -113,7 +113,7 @@ contract TestIncentivesVault is Test, Config { } function testOnlyMorphoShouldTriggerRewardTradeFunction() public { - incentivesVault.setMorphoDao(address(1)); + incentivesVault.setIncentivesTreasuryVault(address(1)); uint256 amount = 100; deal(REWARD_TOKEN, address(morpho), amount); @@ -128,7 +128,7 @@ contract TestIncentivesVault is Test, Config { } function testShouldGiveTheRightAmountOfRewards() public { - incentivesVault.setMorphoDao(address(1)); + incentivesVault.setIncentivesTreasuryVault(address(1)); uint256 toApprove = 1_000 ether; deal(REWARD_TOKEN, address(morpho), toApprove); diff --git a/test-foundry/aave-v3/TestIncentivesVault.t.sol b/test-foundry/aave-v3/TestIncentivesVault.t.sol index 64572c16a..177f0f0a2 100644 --- a/test-foundry/aave-v3/TestIncentivesVault.t.sol +++ b/test-foundry/aave-v3/TestIncentivesVault.t.sol @@ -19,7 +19,7 @@ contract TestIncentivesVault is Test, Config { address public REWARD_TOKEN = rewardToken; - address public morphoDao = address(1); + address public incentivesTreasuryVault = address(1); address public morpho = address(3); IncentivesVault public incentivesVault; MorphoToken public morphoToken; @@ -32,7 +32,7 @@ contract TestIncentivesVault is Test, Config { incentivesVault = new IncentivesVault( IMorpho(address(morpho)), morphoToken, - morphoDao, + incentivesTreasuryVault, dumbOracle ); ERC20(morphoToken).transfer( @@ -64,13 +64,13 @@ contract TestIncentivesVault is Test, Config { assertEq(incentivesVault.bonus(), bonusToSet); } - function testOnlyOwnerShouldSetMorphoDao() public { + function testOnlyOwnerShouldSetIncentivesTreasuryVault() public { hevm.prank(address(0)); hevm.expectRevert("Ownable: caller is not the owner"); - incentivesVault.setMorphoDao(morphoDao); + incentivesVault.setIncentivesTreasuryVault(incentivesTreasuryVault); - incentivesVault.setMorphoDao(morphoDao); - assertEq(incentivesVault.morphoDao(), morphoDao); + incentivesVault.setIncentivesTreasuryVault(incentivesTreasuryVault); + assertEq(incentivesVault.incentivesTreasuryVault(), incentivesTreasuryVault); } function testOnlyOwnerShouldSetOracle() public { @@ -102,7 +102,7 @@ contract TestIncentivesVault is Test, Config { incentivesVault.transferTokensToDao(address(morphoToken), 1); incentivesVault.transferTokensToDao(address(morphoToken), 1); - assertEq(ERC20(morphoToken).balanceOf(morphoDao), 1); + assertEq(ERC20(morphoToken).balanceOf(incentivesTreasuryVault), 1); } function testFailWhenContractNotActive() public { @@ -118,7 +118,7 @@ contract TestIncentivesVault is Test, Config { } function testOnlyMorphoShouldTriggerRewardTradeFunction() public { - incentivesVault.setMorphoDao(address(1)); + incentivesVault.setIncentivesTreasuryVault(address(1)); uint256 amount = 100; deal(REWARD_TOKEN, address(morpho), amount); @@ -138,7 +138,7 @@ contract TestIncentivesVault is Test, Config { } function testShouldGiveTheRightAmountOfRewards() public { - incentivesVault.setMorphoDao(address(1)); + incentivesVault.setIncentivesTreasuryVault(address(1)); uint256 toApprove = 1_000 ether; deal(REWARD_TOKEN, address(morpho), toApprove); diff --git a/test-foundry/compound/TestIncentivesVault.t.sol b/test-foundry/compound/TestIncentivesVault.t.sol index 5b4d2e9ce..980c863d0 100644 --- a/test-foundry/compound/TestIncentivesVault.t.sol +++ b/test-foundry/compound/TestIncentivesVault.t.sol @@ -17,7 +17,7 @@ contract TestIncentivesVault is Test, Config { Vm public hevm = Vm(HEVM_ADDRESS); address public constant COMP = 0xc00e94Cb662C3520282E6f5717214004A7f26888; - address public morphoDao = address(1); + address public incentivesTreasuryVault = address(1); address public morpho = address(3); IncentivesVault public incentivesVault; MorphoToken public morphoToken; @@ -31,7 +31,7 @@ contract TestIncentivesVault is Test, Config { IComptroller(comptrollerAddress), IMorpho(address(morpho)), morphoToken, - morphoDao, + incentivesTreasuryVault, dumbOracle ); ERC20(morphoToken).transfer( @@ -63,13 +63,13 @@ contract TestIncentivesVault is Test, Config { assertEq(incentivesVault.bonus(), bonusToSet); } - function testOnlyOwnerShouldSetMorphoDao() public { + function testOnlyOwnerShouldSetIncentivesTreasuryVault() public { hevm.prank(address(0)); hevm.expectRevert("Ownable: caller is not the owner"); - incentivesVault.setMorphoDao(morphoDao); + incentivesVault.setIncentivesTreasuryVault(incentivesTreasuryVault); - incentivesVault.setMorphoDao(morphoDao); - assertEq(incentivesVault.morphoDao(), morphoDao); + incentivesVault.setIncentivesTreasuryVault(incentivesTreasuryVault); + assertEq(incentivesVault.incentivesTreasuryVault(), incentivesTreasuryVault); } function testOnlyOwnerShouldSetOracle() public { @@ -101,7 +101,7 @@ contract TestIncentivesVault is Test, Config { incentivesVault.transferTokensToDao(address(morphoToken), 1); incentivesVault.transferTokensToDao(address(morphoToken), 1); - assertEq(ERC20(morphoToken).balanceOf(morphoDao), 1); + assertEq(ERC20(morphoToken).balanceOf(incentivesTreasuryVault), 1); } function testFailWhenContractNotActive() public { @@ -112,7 +112,7 @@ contract TestIncentivesVault is Test, Config { } function testOnlyMorphoShouldTriggerCompConvertFunction() public { - incentivesVault.setMorphoDao(address(1)); + incentivesVault.setIncentivesTreasuryVault(address(1)); uint256 amount = 100; deal(COMP, address(morpho), amount); @@ -127,7 +127,7 @@ contract TestIncentivesVault is Test, Config { } function testShouldGiveTheRightAmountOfRewards() public { - incentivesVault.setMorphoDao(address(1)); + incentivesVault.setIncentivesTreasuryVault(address(1)); uint256 toApprove = 1_000 ether; deal(COMP, address(morpho), toApprove); From c826273b0bf9569963f16cdd66c980c5ef35499a Mon Sep 17 00:00:00 2001 From: Merlin <44097430+MerlinEgalite@users.noreply.github.com> Date: Fri, 12 Aug 2022 15:11:02 +0100 Subject: [PATCH 57/57] =?UTF-8?q?=F0=9F=93=9D=20Clarify=20comments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Merlin <44097430+MerlinEgalite@users.noreply.github.com> Co-Authored-By: Mathis Gontier Delaunay <74971347+MathisGD@users.noreply.github.com> --- contracts/aave-v2/libraries/Types.sol | 4 ++-- contracts/aave-v3/libraries/Types.sol | 4 ++-- contracts/compound/libraries/Types.sol | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/contracts/aave-v2/libraries/Types.sol b/contracts/aave-v2/libraries/Types.sol index e19356b9a..9ecfb8fce 100644 --- a/contracts/aave-v2/libraries/Types.sol +++ b/contracts/aave-v2/libraries/Types.sol @@ -61,14 +61,14 @@ library Types { // Variables are packed together to save gas (will not exceed their limit during Morpho's lifetime). struct PoolIndexes { - uint32 lastUpdateTimestamp; // The last time the (pool and peer-to-peer) indexes were updated. + uint32 lastUpdateTimestamp; // The last time the local pool and peer-to-peer indexes were updated. uint112 poolSupplyIndex; // Last pool supply index. uint112 poolBorrowIndex; // Last pool borrow index. } struct Market { address underlyingToken; // The underlying address of the market. - uint16 reserveFactor; // Proportion of the additional interest earned compared to the pool while using Morpho. It is sent to the DAO for each market, in basis point (100% = 10 000). The default value is 0. + uint16 reserveFactor; // Proportion of the additional interest earned being matched peer-to-peer on Morpho compared to being on the pool. It is sent to the DAO for each market. The default value is 0. In basis point (100% = 10 000). uint16 p2pIndexCursor; // Position of the peer-to-peer rate in the pool's spread. Determine the weights of the weighted arithmetic average in the indexes computations ((1 - p2pIndexCursor) * r^S + p2pIndexCursor * r^B) (in basis point). bool isCreated; // Whether or not this market is created. bool isPaused; // Whether the market is paused or not (all entry points on Morpho are frozen; supply, borrow, withdraw, repay and liquidate). diff --git a/contracts/aave-v3/libraries/Types.sol b/contracts/aave-v3/libraries/Types.sol index 543120387..413cff998 100644 --- a/contracts/aave-v3/libraries/Types.sol +++ b/contracts/aave-v3/libraries/Types.sol @@ -61,14 +61,14 @@ library Types { // Variables are packed together to save gas (will not exceed their limit during Morpho's lifetime). struct PoolIndexes { - uint32 lastUpdateTimestamp; // The last time the (pool and peer-to-peer) indexes were updated. + uint32 lastUpdateTimestamp; // The last time the local pool and peer-to-peer indexes were updated. uint112 poolSupplyIndex; // Last pool supply index (in ray). uint112 poolBorrowIndex; // Last pool borrow index (in ray). } struct Market { address underlyingToken; // The underlying address of the market. - uint16 reserveFactor; // Proportion of the additional interest earned compared to the pool while using Morpho. It is sent to the DAO for each market, in basis point (100% = 10 000). The default value is 0. + uint16 reserveFactor; // Proportion of the additional interest earned being matched peer-to-peer on Morpho compared to being on the pool. It is sent to the DAO for each market. The default value is 0. In basis point (100% = 10 000). uint16 p2pIndexCursor; // Position of the peer-to-peer rate in the pool's spread. Determine the weights of the weighted arithmetic average in the indexes computations ((1 - p2pIndexCursor) * r^S + p2pIndexCursor * r^B) (in basis point). bool isCreated; // Whether or not this market is created. bool isPaused; // Whether the market is paused or not (all entry points on Morpho are frozen; supply, borrow, withdraw, repay and liquidate). diff --git a/contracts/compound/libraries/Types.sol b/contracts/compound/libraries/Types.sol index efabf8d36..702abc108 100644 --- a/contracts/compound/libraries/Types.sol +++ b/contracts/compound/libraries/Types.sol @@ -58,7 +58,7 @@ library Types { // Variables are packed together to save gas (will not exceed their limit during Morpho's lifetime). struct LastPoolIndexes { - uint32 lastUpdateBlockNumber; // The last time the (pool and peer-to-peer) indexes were updated.. + uint32 lastUpdateBlockNumber; // The last time the local pool and peer-to-peer indexes were updated. uint112 lastSupplyPoolIndex; // Last pool supply index. uint112 lastBorrowPoolIndex; // Last pool borrow index. }