diff --git a/contracts/CapitalAgent.sol b/contracts/CapitalAgent.sol index 9c305db..4880827 100644 --- a/contracts/CapitalAgent.sol +++ b/contracts/CapitalAgent.sol @@ -23,7 +23,6 @@ contract CapitalAgent is ICapitalAgent, ReentrancyGuardUpgradeable, AccessContro struct PoolInfo { uint256 totalCapital; - uint256 SCR; address currency; bool exist; uint256 totalWithdrawPendingCapital; @@ -38,6 +37,7 @@ contract CapitalAgent is ICapitalAgent, ReentrancyGuardUpgradeable, AccessContro mapping(address => PoolInfo) public poolInfo; address[] private currencyList; + address[] private poolList; mapping(address => bool) public existedCurrencies; mapping(address => uint256) public totalCapitalStakedByCurrency; @@ -45,7 +45,7 @@ contract CapitalAgent is ICapitalAgent, ReentrancyGuardUpgradeable, AccessContro uint256 public totalUtilizedAmount; - uint256 public MCR; + // Maximum Leverage Ratio uint256 public MLR; uint256 public constant CALC_PRECISION = 1e18; @@ -54,7 +54,8 @@ contract CapitalAgent is ICapitalAgent, ReentrancyGuardUpgradeable, AccessContro mapping(address => mapping(uint256 => uint256)) public claimedAmount; - event LogAddPool(address indexed _ssip, address _currency, uint256 _scr); + event LogAddPool(address indexed _ssip, address _currency); + event LogAddPoolToList(address indexed _ssip); event LogRemovePool(address indexed _ssip); event LogSetPolicy(address indexed _salesPolicy); event LogRemovePolicy(address indexed _salesPolicy); @@ -67,9 +68,7 @@ contract CapitalAgent is ICapitalAgent, ReentrancyGuardUpgradeable, AccessContro ); event LogUpdatePolicyExpired(address indexed _policy, uint256 _policyTokenId); event LogMarkToClaimPolicy(address indexed _policy, uint256 _policyTokenId); - event LogSetMCR(address indexed _owner, address indexed _capitalAgent, uint256 _MCR); event LogSetMLR(address indexed _owner, address indexed _capitalAgent, uint256 _MLR); - event LogSetSCR(address indexed _owner, address indexed _capitalAgent, address indexed _pool, uint256 _SCR); event LogSetExchangeAgent(address indexed _owner, address indexed _capitalAgent, address _exchangeAgent); event LogSetSalesPolicyFactory(address indexed _factory); event LogAddPoolWhiteList(address indexed _pool); @@ -111,15 +110,19 @@ contract CapitalAgent is ICapitalAgent, ReentrancyGuardUpgradeable, AccessContro return (_policy.policy, _policy.utilizedAmount, _policy.exist); } - function getPoolInfo(address _pool) external view returns (uint256, uint256, address, bool, uint256) { + function getPoolInfo(address _pool) external view returns (uint256, address, bool, uint256) { PoolInfo memory _poolInfo = poolInfo[_pool]; - return ( - _poolInfo.totalCapital, - _poolInfo.SCR, - _poolInfo.currency, - _poolInfo.exist, - _poolInfo.totalWithdrawPendingCapital - ); + return (_poolInfo.totalCapital, _poolInfo.currency, _poolInfo.exist, _poolInfo.totalWithdrawPendingCapital); + } + + // Getter function to return the poolList array + function getPoolList() public view returns (address[] memory) { + return poolList; + } + + // Getter function to return the curencyList array + function getCurrencyList() public view returns (address[] memory) { + return currencyList; } /** @@ -180,13 +183,34 @@ contract CapitalAgent is ICapitalAgent, ReentrancyGuardUpgradeable, AccessContro return _getTotalCapitalStakedInUSDC(); } + /** + * @dev add pool into poolList, can only be call by whitelisted addresses + * @param _ssip address of pool to add + **/ + function addPoolToList(address _ssip) external onlyRole(ADMIN_ROLE) { + require(_ssip != address(0), "UnoRe: zero address"); + require(poolInfo[_ssip].exist == true, "UnoRe: no exist pool"); + bool contains = false; + + for (uint i = 0; i < poolList.length; i++) { + if (poolList[i] == _ssip) { + contains = true; + break; + } + } + + if (!contains) { + poolList.push(_ssip); + emit LogAddPoolToList(_ssip); + } + } + /** * @dev add pool into capitalAgent to stake capital, can only be call by whitelisted pools * @param _ssip address of pool to add * @param _currency pool lp currency address - * @param _scr pool scr value(minimum capital should maintain in capital agent) **/ - function addPool(address _ssip, address _currency, uint256 _scr) external override onlyPoolWhiteList { + function addPool(address _ssip, address _currency) external override onlyPoolWhiteList { require(_ssip != address(0), "UnoRe: zero address"); require(!poolInfo[_ssip].exist, "UnoRe: already exist pool"); @@ -194,24 +218,19 @@ contract CapitalAgent is ICapitalAgent, ReentrancyGuardUpgradeable, AccessContro existedCurrencies[_currency] = true; currencyList.push(_currency); } - poolInfo[_ssip] = PoolInfo({ - totalCapital: 0, - currency: _currency, - SCR: _scr, - exist: true, - totalWithdrawPendingCapital: 0 - }); - emit LogAddPool(_ssip, _currency, _scr); + poolList.push(_ssip); + poolInfo[_ssip] = PoolInfo({totalCapital: 0, currency: _currency, exist: true, totalWithdrawPendingCapital: 0}); + + emit LogAddPool(_ssip, _currency); } /** * @dev add pool into capitalAgent to stake capital, can only be call by admin role * @param _ssip address of pool to add * @param _currency pool lp currency address - * @param _scr pool scr value(minimum capital should maintain in capital agent) **/ - function addPoolByAdmin(address _ssip, address _currency, uint256 _scr) external onlyRole(ADMIN_ROLE) { + function addPoolByAdmin(address _ssip, address _currency) external onlyRole(ADMIN_ROLE) { require(_ssip != address(0), "UnoRe: zero address"); require(!poolInfo[_ssip].exist, "UnoRe: already exist pool"); @@ -219,15 +238,9 @@ contract CapitalAgent is ICapitalAgent, ReentrancyGuardUpgradeable, AccessContro existedCurrencies[_currency] = true; currencyList.push(_currency); } - poolInfo[_ssip] = PoolInfo({ - totalCapital: 0, - currency: _currency, - SCR: _scr, - exist: true, - totalWithdrawPendingCapital: 0 - }); - - emit LogAddPool(_ssip, _currency, _scr); + poolInfo[_ssip] = PoolInfo({totalCapital: 0, currency: _currency, exist: true, totalWithdrawPendingCapital: 0}); + poolList.push(_ssip); + emit LogAddPool(_ssip, _currency); } /** @@ -278,7 +291,7 @@ contract CapitalAgent is ICapitalAgent, ReentrancyGuardUpgradeable, AccessContro * @dev remove sales policy from capital agent, can only be call by admin role **/ function removePolicy() external onlyRole(ADMIN_ROLE) nonReentrant { - require(policyInfo.exist, "UnoRe: no exit pool"); + require(policyInfo.exist, "UnoRe: non existing policy on Capital Agent"); totalUtilizedAmount = 0; address _policy = policyInfo.policy; policyInfo.policy = address(0); @@ -290,12 +303,12 @@ contract CapitalAgent is ICapitalAgent, ReentrancyGuardUpgradeable, AccessContro /** * @dev update pool(caller) capital from capital agent, * decrease capital of pool by _withdrawAmount, if user withdraw from pool - * remaning pool capital and total capital staked from same currency should be greater pool SCR and MCR respectively + * remaning pool capital times MLR should be greater than or equal to the totalPremiumSold * @param _withdrawAmount amount to withdraw **/ function SSIPWithdraw(uint256 _withdrawAmount) external override nonReentrant { require(poolInfo[msg.sender].exist, "UnoRe: no exist ssip"); - require(_checkCapitalByMCRAndSCR(msg.sender, _withdrawAmount), "UnoRe: minimum capital underflow"); + require(_checkCapitalByMLR(msg.sender, _withdrawAmount), "UnoRe: minimum capital underflow"); _updatePoolCapital(msg.sender, _withdrawAmount, false); _updatePoolWithdrawPendingCapital(msg.sender, _withdrawAmount, false); } @@ -345,12 +358,12 @@ contract CapitalAgent is ICapitalAgent, ReentrancyGuardUpgradeable, AccessContro /** * @dev return if pool can withdraw this amount, - * remaning pool capital and total capital staked from same currency should be greater pool SCR and MCR respectively + * remaning pool capital times MLR should be greater than or equal to the totalPremiumSold * @param _pool address of pool * @param _withdrawAmount withdraw amount **/ - function checkCapitalByMCR(address _pool, uint256 _withdrawAmount) external view override returns (bool) { - return _checkCapitalByMCRAndSCR(_pool, _withdrawAmount); + function checkCapitalByMLR(address _pool, uint256 _withdrawAmount) external view override returns (bool) { + return _checkCapitalByMLR(_pool, _withdrawAmount); } /** @@ -436,22 +449,22 @@ contract CapitalAgent is ICapitalAgent, ReentrancyGuardUpgradeable, AccessContro emit LogUpdatePolicyCoverage(policyInfo.policy, _amount, policyInfo.utilizedAmount, totalUtilizedAmount); } - function _checkCapitalByMCRAndSCR(address _pool, uint256 _withdrawAmount) private view returns (bool) { + function _checkCapitalByMLR(address _pool, uint256 _withdrawAmount) private view returns (bool) { address currency = poolInfo[_pool].currency; - uint256 totalCapitalStakedInUSDCPool; - uint256 mcrInUSDC; - uint256 scrInUSDC; + uint256 totalCapitalStakedInUSDC; uint256 totalWithdrawPendingCapital; - totalWithdrawPendingCapital = _convertTokenToUSDC(currency, poolInfo[_pool].totalWithdrawPendingCapital); - totalCapitalStakedInUSDCPool = _convertTokenToUSDC(currency, totalCapitalStakedByCurrency[currency]); - mcrInUSDC = _convertTokenToUSDC(currency, totalCapitalStakedByCurrency[currency] - _withdrawAmount); - scrInUSDC = _convertTokenToUSDC(currency, poolInfo[_pool].totalCapital - _withdrawAmount); + //Withdraw amount in USDC + uint256 withdrawInUSDC = _convertTokenToUSDC(currency, _withdrawAmount); + //Total Capital Staked in Pools + totalCapitalStakedInUSDC = _convertTokenToUSDC(currency, _getTotalCapitalStakedInUSDC()); + //Total Capital pending in withdraw + totalWithdrawPendingCapital = _getTotalPendingCapitalInUSDC(); + uint256 totalInPoolInUSDC = totalCapitalStakedInUSDC - totalWithdrawPendingCapital; - bool isMCRPass = mcrInUSDC >= ((totalCapitalStakedInUSDCPool - totalWithdrawPendingCapital) * MCR) / CALC_PRECISION; - bool isSCRPass = scrInUSDC >= poolInfo[_pool].SCR; + bool isMLRPass = totalUtilizedAmount <= ((totalInPoolInUSDC - withdrawInUSDC) * MLR) / CALC_PRECISION; - return isMCRPass && isSCRPass; + return isMLRPass; } function _convertTokenToUSDC(address _currency, uint256 _amount) private view returns (uint256) { @@ -475,43 +488,50 @@ contract CapitalAgent is ICapitalAgent, ReentrancyGuardUpgradeable, AccessContro totalCapitalStakedInUSDC + _convertTokenToUSDC(currency, totalCapitalStakedByCurrency[currency]); } - return totalCapitalStakedInUSDC; } - function _checkCoverageByMLR(uint256 _newCoverageAmount) private view returns (bool) { - uint256 totalCapitalStakedInUSDC = _getTotalCapitalStakedInUSDC(); - return totalUtilizedAmount + _newCoverageAmount <= (totalCapitalStakedInUSDC * MLR) / CALC_PRECISION; + function getTotalPendingCapitalInUSDC() public view returns (uint256) { + return _getTotalPendingCapitalInUSDC(); } /** - * @dev set new MCR, can only be called by operator - * @param _MCR new value to update + * @dev returns total value in "pending" state from all pools **/ - function setMCR(uint256 _MCR) external onlyOperator nonReentrant { - MCR = _MCR; - emit LogSetMCR(msg.sender, address(this), _MCR); + function _getTotalPendingCapitalInUSDC() private view returns (uint256) { + uint256 totalPendingCapitalInUSDC; + for (uint256 i = 0; i < poolList.length; i++) { + if (poolInfo[poolList[i]].exist == true) { + totalPendingCapitalInUSDC = + totalPendingCapitalInUSDC + + _convertTokenToUSDC(poolInfo[poolList[i]].currency, poolInfo[poolList[i]].totalWithdrawPendingCapital); + } + } + return totalPendingCapitalInUSDC; + } + + function _checkCoverageByMLR(uint256 _newCoverageAmount) private view returns (bool) { + uint256 totalCapitalStakedInUSDC = _getTotalCapitalStakedInUSDC(); + uint256 totalCapitalPendingInUSDC = _getTotalPendingCapitalInUSDC(); + uint256 scaledMLR = MLR / CALC_PRECISION; + return + totalUtilizedAmount + _newCoverageAmount <= + ((totalCapitalStakedInUSDC - totalCapitalPendingInUSDC) * scaledMLR); } /** * @dev set new MLR, can only be called by operator + * @dev MLR(Maximum Leverage Ratio) is a percentage value that defines the amount of coverage + * we can sell based on the amount of tokens staked in all pools. ie. MLR = 2000000000000000000 means that + * we can sell an amount of coverage(in USD) <= to 2X the amount(in USD) of tokens Staked in all pools * @param _MLR new value to update **/ function setMLR(uint256 _MLR) external onlyOperator nonReentrant { + require(_MLR > 0, "UnoRe: MLR cannot be zero"); MLR = _MLR; emit LogSetMLR(msg.sender, address(this), _MLR); } - /** - * @dev set new SCR of pool, can only be called by operator - * @param _SCR new value to update - * @param _pool address of pool - **/ - function setSCR(uint256 _SCR, address _pool) external onlyOperator nonReentrant { - poolInfo[_pool].SCR = _SCR; - emit LogSetSCR(msg.sender, address(this), _pool, _SCR); - } - /** * @dev set new exchange agent address, can only be called by admin role * @param _exchangeAgent new exchange agent address diff --git a/contracts/Mocks/MockCapitalAgent.sol b/contracts/Mocks/MockCapitalAgent.sol index d4220eb..77758b1 100644 --- a/contracts/Mocks/MockCapitalAgent.sol +++ b/contracts/Mocks/MockCapitalAgent.sol @@ -2,523 +2,523 @@ pragma solidity =0.8.23; -import "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol"; -import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol"; -import "../interfaces/ISalesPolicy.sol"; -import "../interfaces/IExchangeAgent.sol"; -import "../interfaces/ICapitalAgent.sol"; - -/** - * @dev update and manage all pools capital and policy utlized amount, - * whenever user stake and withdraw from the pool and buy policy from salesPolicy - * notifies to capital agent to update pool capital and policy coverage - **/ -contract MockCapitalAgent is ICapitalAgent, ReentrancyGuardUpgradeable, AccessControlUpgradeable { - bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); - - address public exchangeAgent; - address public salesPolicyFactory; - address public usdcToken; - address public operator; - - struct PoolInfo { - uint256 totalCapital; - uint256 SCR; - address currency; - bool exist; - uint256 totalWithdrawPendingCapital; - } - - struct PolicyInfo { - address policy; - uint256 utilizedAmount; - bool exist; - } - - mapping(address => PoolInfo) public poolInfo; - - address[] private currencyList; - mapping(address => bool) public existedCurrencies; - mapping(address => uint256) public totalCapitalStakedByCurrency; - - PolicyInfo public policyInfo; - - uint256 public totalUtilizedAmount; - - uint256 public MCR; - uint256 public MLR; - - uint256 public constant CALC_PRECISION = 1e18; - - mapping(address => bool) public poolWhiteList; - - mapping(address => mapping(uint256 => uint256)) public claimedAmount; - - event LogAddPool(address indexed _ssip, address _currency, uint256 _scr); - event LogRemovePool(address indexed _ssip); - event LogSetPolicy(address indexed _salesPolicy); - event LogRemovePolicy(address indexed _salesPolicy); - event LogUpdatePoolCapital(address indexed _ssip, uint256 _poolCapital, uint256 _totalCapital); - event LogUpdatePolicyCoverage( - address indexed _policy, - uint256 _amount, - uint256 _policyUtilized, - uint256 _totalUtilizedAmount - ); - event LogUpdatePolicyExpired(address indexed _policy, uint256 _policyTokenId); - event LogMarkToClaimPolicy(address indexed _policy, uint256 _policyTokenId); - event LogSetMCR(address indexed _owner, address indexed _capitalAgent, uint256 _MCR); - event LogSetMLR(address indexed _owner, address indexed _capitalAgent, uint256 _MLR); - event LogSetSCR(address indexed _owner, address indexed _capitalAgent, address indexed _pool, uint256 _SCR); - event LogSetExchangeAgent(address indexed _owner, address indexed _capitalAgent, address _exchangeAgent); - event LogSetSalesPolicyFactory(address indexed _factory); - event LogAddPoolWhiteList(address indexed _pool); - event LogRemovePoolWhiteList(address indexed _pool); - event LogSetOperator(address indexed _operator); - event LogSetUSDC(address indexed _usdcToken); - event LogupdatePoolWithdrawPendingCapital(address indexed _ssip, uint256 _poolPendingCapital); - - function initialize( - address _exchangeAgent, - address _USDC_TOKEN, - address _multiSigWallet, - address _operator - ) external initializer { - require(_exchangeAgent != address(0), "UnoRe: zero exchangeAgent address"); - require(_USDC_TOKEN != address(0), "UnoRe: zero USDC address"); - require(_multiSigWallet != address(0), "UnoRe: zero multisigwallet address"); - exchangeAgent = _exchangeAgent; - usdcToken = _USDC_TOKEN; - operator = _operator; - __ReentrancyGuard_init(); - __AccessControl_init(); - _grantRole(ADMIN_ROLE, _multiSigWallet); - _setRoleAdmin(ADMIN_ROLE, ADMIN_ROLE); - } - - modifier onlyPoolWhiteList() { - require(poolWhiteList[msg.sender], "UnoRe: Capital Agent Forbidden"); - _; - } - - modifier onlyOperator() { - require(operator == msg.sender, "UnoRe: Capital Agent Forbidden"); - _; - } - - function getPolicyInfo() external view returns (address, uint256, bool) { - PolicyInfo memory _policy = policyInfo; - return (_policy.policy, _policy.utilizedAmount, _policy.exist); - } - - function getPoolInfo(address _pool) external view returns (uint256, uint256, address, bool, uint256) { - PoolInfo memory _poolInfo = poolInfo[_pool]; - return ( - _poolInfo.totalCapital, - _poolInfo.SCR, - _poolInfo.currency, - _poolInfo.exist, - _poolInfo.totalWithdrawPendingCapital - ); - } - - /** - * @dev set sales policy factory, can only be call by admin role - * @param _factory new sales policy factory address - **/ - function setSalesPolicyFactory(address _factory) external onlyRole(ADMIN_ROLE) nonReentrant { - require(_factory != address(0), "UnoRe: zero factory address"); - salesPolicyFactory = _factory; - emit LogSetSalesPolicyFactory(_factory); - } - - /** - * @dev set operator, can only be call by admin role - * @param _operator new operator address - **/ - function setOperator(address _operator) external onlyRole(ADMIN_ROLE) nonReentrant { - require(_operator != address(0), "UnoRe: zero operator address"); - operator = _operator; - emit LogSetOperator(_operator); - } - - /** - * @dev set usdc token, can only be call by admin role - * @param _usdcToken new usdc token address - **/ - function setUSDCToken(address _usdcToken) external onlyRole(ADMIN_ROLE) nonReentrant { - require(_usdcToken != address(0), "UnoRe: zero usdc address"); - usdcToken = _usdcToken; - emit LogSetUSDC(_usdcToken); - } - - /** - * @dev whitelist pool address, can only be call by admin role - * @param _pool address of pool to whitelist - **/ - function addPoolWhiteList(address _pool) external onlyRole(ADMIN_ROLE) nonReentrant { - require(_pool != address(0), "UnoRe: zero pool address"); - require(!poolWhiteList[_pool], "UnoRe: white list already"); - poolWhiteList[_pool] = true; - emit LogAddPoolWhiteList(_pool); - } - - /** - * @dev remove whitelisted pool, can only be call by admin role - * @param _pool address of pool to remove from whitelist - **/ - function removePoolWhiteList(address _pool) external onlyRole(ADMIN_ROLE) nonReentrant { - require(poolWhiteList[_pool], "UnoRe: no white list"); - poolWhiteList[_pool] = false; - emit LogRemovePoolWhiteList(_pool); - } - - /** - * @dev return total capital in usdc staked in capital agent by pools - **/ - function totalCapitalStaked() public view returns (uint256) { - return _getTotalCapitalStakedInUSDC(); - } - - /** - * @dev add pool into capitalAgent to stake capital, can only be call by whitelisted pools - * @param _ssip address of pool to add - * @param _currency pool lp currency address - * @param _scr pool scr value(minimum capital should maintain in capital agent) - **/ - function addPool(address _ssip, address _currency, uint256 _scr) external override onlyPoolWhiteList { - require(_ssip != address(0), "UnoRe: zero address"); - require(!poolInfo[_ssip].exist, "UnoRe: already exist pool"); - - if (existedCurrencies[_currency] == false) { - existedCurrencies[_currency] = true; - currencyList.push(_currency); - } - poolInfo[_ssip] = PoolInfo({ - totalCapital: 0, - currency: _currency, - SCR: _scr, - exist: true, - totalWithdrawPendingCapital: 0 - }); - - emit LogAddPool(_ssip, _currency, _scr); - } - - /** - * @dev add pool into capitalAgent to stake capital, can only be call by admin role - * @param _ssip address of pool to add - * @param _currency pool lp currency address - * @param _scr pool scr value(minimum capital should maintain in capital agent) - **/ - function addPoolByAdmin(address _ssip, address _currency, uint256 _scr) external onlyRole(ADMIN_ROLE) { - require(_ssip != address(0), "UnoRe: zero address"); - require(!poolInfo[_ssip].exist, "UnoRe: already exist pool"); - - if (existedCurrencies[_currency] == false) { - existedCurrencies[_currency] = true; - currencyList.push(_currency); - } - poolInfo[_ssip] = PoolInfo({ - totalCapital: 0, - currency: _currency, - SCR: _scr, - exist: true, - totalWithdrawPendingCapital: 0 - }); - - emit LogAddPool(_ssip, _currency, _scr); - } - - /** - * @dev remove pool from capitalAgent, can only be call by admin role - * @param _ssip address of pool to remove - **/ - function removePool(address _ssip) external onlyRole(ADMIN_ROLE) nonReentrant { - require(poolInfo[_ssip].exist, "UnoRe: no exit pool"); - if (poolInfo[_ssip].totalCapital > 0) { - address currency = poolInfo[_ssip].currency; - totalCapitalStakedByCurrency[currency] = totalCapitalStakedByCurrency[currency] - poolInfo[_ssip].totalCapital; - } - delete poolInfo[_ssip]; - emit LogRemovePool(_ssip); - } - - function setPoolCapital(address _ssip, uint256 _capital) external onlyRole(ADMIN_ROLE) nonReentrant { - require(poolInfo[_ssip].exist, "UnoRe: no exit pool"); - address currency = poolInfo[_ssip].currency; - totalCapitalStakedByCurrency[currency] = _capital; - poolInfo[_ssip].totalCapital = _capital; - } - - /** - * @dev set sales policy, can only be call by SalesPolicyFactory - * @param _policy address of new SalesPolicy - **/ - function setPolicy(address _policy) external override nonReentrant { - require(!policyInfo.exist, "UnoRe: Policy exists"); - require(salesPolicyFactory == msg.sender, "UnoRe: only salesPolicyFactory can call"); - policyInfo = PolicyInfo({policy: _policy, utilizedAmount: 0, exist: true}); - - emit LogSetPolicy(_policy); - } - - /** - * @dev set sales policy, can only be call by admin role - * @param _policy address of new SalesPolicy - **/ - function setPolicyByAdmin(address _policy) external onlyRole(ADMIN_ROLE) nonReentrant { - require(_policy != address(0), "UnoRe: zero address"); - policyInfo = PolicyInfo({policy: _policy, utilizedAmount: 0, exist: true}); - - emit LogSetPolicy(_policy); - } - - /** - * @dev remove sales policy from capital agent, can only be call by admin role - **/ - function removePolicy() external onlyRole(ADMIN_ROLE) nonReentrant { - require(policyInfo.exist, "UnoRe: no exit pool"); - totalUtilizedAmount = 0; - address _policy = policyInfo.policy; - policyInfo.policy = address(0); - policyInfo.exist = false; - policyInfo.utilizedAmount = 0; - emit LogRemovePolicy(_policy); - } - - /** - * @dev update pool(caller) capital from capital agent, - * decrease capital of pool by _withdrawAmount, if user withdraw from pool - * remaning pool capital and total capital staked from same currency should be greater pool SCR and MCR respectively - * @param _withdrawAmount amount to withdraw - **/ - function SSIPWithdraw(uint256 _withdrawAmount) external override nonReentrant { - require(poolInfo[msg.sender].exist, "UnoRe: no exist ssip"); - require(_checkCapitalByMCRAndSCR(msg.sender, _withdrawAmount), "UnoRe: minimum capital underflow"); - _updatePoolCapital(msg.sender, _withdrawAmount, false); - _updatePoolWithdrawPendingCapital(msg.sender, _withdrawAmount, false); - } - - /** - * @dev update pool(caller) capital from capital agent, - * decrease capital of pool by _withdrawAmount, if user claim policy from pool - * @param _withdrawAmount amount to withdraw - **/ - function SSIPPolicyCaim(uint256 _withdrawAmount, uint256 _policyId, bool _isNotMigrate) external override nonReentrant { - require(poolInfo[msg.sender].exist, "UnoRe: no exist ssip"); - _updatePoolCapital(msg.sender, _withdrawAmount, false); - if (_isNotMigrate) { - _SSIPPolicyClaim(_withdrawAmount, _policyId); - } - } - - function _SSIPPolicyClaim(uint256 _withdrawAmount, uint256 _policyId) internal { - address _salesPolicyAddress = policyInfo.policy; - (uint256 _coverageAmount, , , , ) = ISalesPolicy(_salesPolicyAddress).getPolicyData(_policyId); - uint256 _claimed = claimedAmount[_salesPolicyAddress][_policyId]; - address _poolCurrency = poolInfo[msg.sender].currency; - uint256 usdcTokenAmount = IExchangeAgent(exchangeAgent).getNeededTokenAmount(_poolCurrency, usdcToken, _withdrawAmount); - require(_coverageAmount >= usdcTokenAmount + _claimed, "UnoRe: coverage amount is less"); - claimedAmount[_salesPolicyAddress][_policyId] += usdcTokenAmount; - bool _isFinished = !(_coverageAmount > (usdcTokenAmount + _claimed)); - if (_isFinished) { - // @Audit: DUST amount will prevent marking a policy complete - _markToClaimPolicy(_policyId, _coverageAmount); - } - } - - /** - * @dev update pool(caller) capital from capital agent, - * increase capital of pool by _stakingAmount, if user stake in pool - * @param _stakingAmount amount to deposit - **/ - function SSIPStaking(uint256 _stakingAmount) external override nonReentrant { - require(poolInfo[msg.sender].exist, "UnoRe: no exist ssip"); - _updatePoolCapital(msg.sender, _stakingAmount, true); - } - - function updatePoolWithdrawPendingCapital(address _pool, uint256 _amount, bool isAdd) external nonReentrant { - require(poolInfo[msg.sender].exist, "UnoRe: no exist ssip"); - _updatePoolWithdrawPendingCapital(_pool, _amount, isAdd); - } - - /** - * @dev return if pool can withdraw this amount, - * remaning pool capital and total capital staked from same currency should be greater pool SCR and MCR respectively - * @param _pool address of pool - * @param _withdrawAmount withdraw amount - **/ - function checkCapitalByMCR(address _pool, uint256 _withdrawAmount) external view override returns (bool) { - return _checkCapitalByMCRAndSCR(_pool, _withdrawAmount); - } - - /** - * @dev return if user can buy policy from this coverage amount, - * total utlized amount plus coverage should be less than MLR of total capital staked - * @param _coverageAmount coverage amount - **/ - function checkCoverageByMLR(uint256 _coverageAmount) external view override returns (bool) { - return _checkCoverageByMLR(_coverageAmount); - } - - /** - * @dev update policy coverage if user buy policy from SalesPolicy, only sales policy can call this function - * @param _coverageAmount coverage amount - **/ - function policySale(uint256 _coverageAmount) external override nonReentrant { - require(msg.sender == policyInfo.policy, "UnoRe: only salesPolicy can call"); - require(policyInfo.exist, "UnoRe: no exist policy"); - require(_checkCoverageByMLR(_coverageAmount), "UnoRe: maximum leverage overflow"); - _updatePolicyCoverage(_coverageAmount, true); - } - - /** - * @dev update policy status, if expired update policy coverage and notify to sales policy - * @param _policyId policy id to update status - **/ - function updatePolicyStatus(uint256 _policyId) external override nonReentrant { - require(policyInfo.policy != address(0), "UnoRe: no exist salesPolicy"); - (uint256 _coverageAmount, uint256 _coverageDuration, uint256 _coverStartAt, , ) = ISalesPolicy(policyInfo.policy) - .getPolicyData(_policyId); - bool isExpired = block.timestamp >= _coverageDuration + _coverStartAt; - if (isExpired) { - _updatePolicyCoverage(_coverageAmount, false); - ISalesPolicy(policyInfo.policy).updatePolicyExpired(_policyId); - emit LogUpdatePolicyExpired(policyInfo.policy, _policyId); - } - } - - /** - * @dev update policy status to not exist, can only be called by admin role - * @param _policyId policy id to update status - **/ - function markToClaimPolicy(uint256 _policyId) external onlyRole(ADMIN_ROLE) nonReentrant { - (uint256 _coverageAmount, , , , ) = ISalesPolicy(policyInfo.policy).getPolicyData(_policyId); - _markToClaimPolicy(_policyId, _coverageAmount); - } - - function _markToClaimPolicy(uint256 _policyId, uint256 _coverageAmount) private { - require(policyInfo.policy != address(0), "UnoRe: no exist salesPolicy"); - _updatePolicyCoverage(_coverageAmount, false); - ISalesPolicy(policyInfo.policy).markToClaim(_policyId); - emit LogMarkToClaimPolicy(policyInfo.policy, _policyId); - } - - function _updatePoolCapital(address _pool, uint256 _amount, bool isAdd) private { - if (!isAdd) { - require(poolInfo[_pool].totalCapital >= _amount, "UnoRe: pool capital overflow"); - } - address currency = poolInfo[_pool].currency; - poolInfo[_pool].totalCapital = isAdd ? poolInfo[_pool].totalCapital + _amount : poolInfo[_pool].totalCapital - _amount; - totalCapitalStakedByCurrency[currency] = isAdd - ? totalCapitalStakedByCurrency[currency] + _amount - : totalCapitalStakedByCurrency[currency] - _amount; - emit LogUpdatePoolCapital(_pool, poolInfo[_pool].totalCapital, totalCapitalStakedByCurrency[currency]); - } - - function _updatePoolWithdrawPendingCapital(address _pool, uint256 _amount, bool isAdd) private { - if (!isAdd) { - require(poolInfo[_pool].totalWithdrawPendingCapital >= _amount, "UnoRe: total Capital Pending underflow"); - } - poolInfo[_pool].totalWithdrawPendingCapital = isAdd - ? poolInfo[_pool].totalWithdrawPendingCapital + _amount - : poolInfo[_pool].totalWithdrawPendingCapital - _amount; - emit LogupdatePoolWithdrawPendingCapital(_pool, poolInfo[_pool].totalWithdrawPendingCapital); - } - - function _updatePolicyCoverage(uint256 _amount, bool isAdd) private { - if (!isAdd) { - require(policyInfo.utilizedAmount >= _amount, "UnoRe: policy coverage overflow"); - } - policyInfo.utilizedAmount = isAdd ? policyInfo.utilizedAmount + _amount : policyInfo.utilizedAmount - _amount; - totalUtilizedAmount = isAdd ? totalUtilizedAmount + _amount : totalUtilizedAmount - _amount; - emit LogUpdatePolicyCoverage(policyInfo.policy, _amount, policyInfo.utilizedAmount, totalUtilizedAmount); - } - - function _checkCapitalByMCRAndSCR(address _pool, uint256 _withdrawAmount) private view returns (bool) { - address currency = poolInfo[_pool].currency; - uint256 totalCapitalStakedInUSDCPool; - uint256 mcrInUSDC; - uint256 scrInUSDC; - uint256 totalWithdrawPendingCapital; - - totalWithdrawPendingCapital = _convertTokenToUSDC(currency, poolInfo[_pool].totalWithdrawPendingCapital); - totalCapitalStakedInUSDCPool = _convertTokenToUSDC(currency, totalCapitalStakedByCurrency[currency]); - mcrInUSDC = _convertTokenToUSDC(currency, totalCapitalStakedByCurrency[currency] - _withdrawAmount); - scrInUSDC = _convertTokenToUSDC(currency, poolInfo[_pool].totalCapital - _withdrawAmount); - - bool isMCRPass = mcrInUSDC >= ((totalCapitalStakedInUSDCPool - totalWithdrawPendingCapital) * MCR) / CALC_PRECISION; - bool isSCRPass = scrInUSDC >= poolInfo[_pool].SCR; - - return isMCRPass && isSCRPass; - } - - function _convertTokenToUSDC(address _currency, uint256 _amount) public view returns (uint256) { - uint256 tokenInUSDC; - if (_currency == usdcToken) { - tokenInUSDC = _amount; - } else { - tokenInUSDC = _currency != address(0) - ? IExchangeAgent(exchangeAgent).getNeededTokenAmount(_currency, usdcToken, _amount) - : IExchangeAgent(exchangeAgent).getTokenAmountForETH(usdcToken, _amount); - } - - return tokenInUSDC; - } - - function _getTotalCapitalStakedInUSDC() private view returns (uint256) { - uint256 totalCapitalStakedInUSDC; - for (uint256 i = 0; i < currencyList.length; i++) { - address currency = currencyList[i]; - totalCapitalStakedInUSDC = - totalCapitalStakedInUSDC + - _convertTokenToUSDC(currency, totalCapitalStakedByCurrency[currency]); - } - - return totalCapitalStakedInUSDC; - } - - function _checkCoverageByMLR(uint256 _newCoverageAmount) private view returns (bool) { - uint256 totalCapitalStakedInUSDC = _getTotalCapitalStakedInUSDC(); - return totalUtilizedAmount + _newCoverageAmount <= (totalCapitalStakedInUSDC * MLR) / CALC_PRECISION; - } - - /** - * @dev set new MCR, can only be called by operator - * @param _MCR new value to update - **/ - function setMCR(uint256 _MCR) external onlyOperator nonReentrant { - MCR = _MCR; - emit LogSetMCR(msg.sender, address(this), _MCR); - } - - /** - * @dev set new MLR, can only be called by operator - * @param _MLR new value to update - **/ - function setMLR(uint256 _MLR) external onlyOperator nonReentrant { - MLR = _MLR; - emit LogSetMLR(msg.sender, address(this), _MLR); - } - - /** - * @dev set new SCR of pool, can only be called by operator - * @param _SCR new value to update - * @param _pool address of pool - **/ - function setSCR(uint256 _SCR, address _pool) external onlyOperator nonReentrant { - poolInfo[_pool].SCR = _SCR; - emit LogSetSCR(msg.sender, address(this), _pool, _SCR); - } - - /** - * @dev set new exchange agent address, can only be called by admin role - * @param _exchangeAgent new exchange agent address - **/ - function setExchangeAgent(address _exchangeAgent) external onlyRole(ADMIN_ROLE) nonReentrant { - require(_exchangeAgent != address(0), "UnoRe: zero address"); - exchangeAgent = _exchangeAgent; - emit LogSetExchangeAgent(msg.sender, address(this), _exchangeAgent); - } -} +// import "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol"; +// import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol"; +// import "../interfaces/ISalesPolicy.sol"; +// import "../interfaces/IExchangeAgent.sol"; +// import "../interfaces/ICapitalAgent.sol"; + +// /** +// * @dev update and manage all pools capital and policy utlized amount, +// * whenever user stake and withdraw from the pool and buy policy from salesPolicy +// * notifies to capital agent to update pool capital and policy coverage +// **/ +// contract MockCapitalAgent is ICapitalAgent, ReentrancyGuardUpgradeable, AccessControlUpgradeable { +// bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); + +// address public exchangeAgent; +// address public salesPolicyFactory; +// address public usdcToken; +// address public operator; + +// struct PoolInfo { +// uint256 totalCapital; +// uint256 SCR; +// address currency; +// bool exist; +// uint256 totalWithdrawPendingCapital; +// } + +// struct PolicyInfo { +// address policy; +// uint256 utilizedAmount; +// bool exist; +// } + +// mapping(address => PoolInfo) public poolInfo; + +// address[] private currencyList; +// mapping(address => bool) public existedCurrencies; +// mapping(address => uint256) public totalCapitalStakedByCurrency; + +// PolicyInfo public policyInfo; + +// uint256 public totalUtilizedAmount; + +// uint256 public MCR; +// uint256 public MLR; + +// uint256 public constant CALC_PRECISION = 1e18; + +// mapping(address => bool) public poolWhiteList; + +// mapping(address => mapping(uint256 => uint256)) public claimedAmount; + +// event LogAddPool(address indexed _ssip, address _currency, uint256 _scr); +// event LogRemovePool(address indexed _ssip); +// event LogSetPolicy(address indexed _salesPolicy); +// event LogRemovePolicy(address indexed _salesPolicy); +// event LogUpdatePoolCapital(address indexed _ssip, uint256 _poolCapital, uint256 _totalCapital); +// event LogUpdatePolicyCoverage( +// address indexed _policy, +// uint256 _amount, +// uint256 _policyUtilized, +// uint256 _totalUtilizedAmount +// ); +// event LogUpdatePolicyExpired(address indexed _policy, uint256 _policyTokenId); +// event LogMarkToClaimPolicy(address indexed _policy, uint256 _policyTokenId); +// event LogSetMCR(address indexed _owner, address indexed _capitalAgent, uint256 _MCR); +// event LogSetMLR(address indexed _owner, address indexed _capitalAgent, uint256 _MLR); +// event LogSetSCR(address indexed _owner, address indexed _capitalAgent, address indexed _pool, uint256 _SCR); +// event LogSetExchangeAgent(address indexed _owner, address indexed _capitalAgent, address _exchangeAgent); +// event LogSetSalesPolicyFactory(address indexed _factory); +// event LogAddPoolWhiteList(address indexed _pool); +// event LogRemovePoolWhiteList(address indexed _pool); +// event LogSetOperator(address indexed _operator); +// event LogSetUSDC(address indexed _usdcToken); +// event LogupdatePoolWithdrawPendingCapital(address indexed _ssip, uint256 _poolPendingCapital); + +// function initialize( +// address _exchangeAgent, +// address _USDC_TOKEN, +// address _multiSigWallet, +// address _operator +// ) external initializer { +// require(_exchangeAgent != address(0), "UnoRe: zero exchangeAgent address"); +// require(_USDC_TOKEN != address(0), "UnoRe: zero USDC address"); +// require(_multiSigWallet != address(0), "UnoRe: zero multisigwallet address"); +// exchangeAgent = _exchangeAgent; +// usdcToken = _USDC_TOKEN; +// operator = _operator; +// __ReentrancyGuard_init(); +// __AccessControl_init(); +// _grantRole(ADMIN_ROLE, _multiSigWallet); +// _setRoleAdmin(ADMIN_ROLE, ADMIN_ROLE); +// } + +// modifier onlyPoolWhiteList() { +// require(poolWhiteList[msg.sender], "UnoRe: Capital Agent Forbidden"); +// _; +// } + +// modifier onlyOperator() { +// require(operator == msg.sender, "UnoRe: Capital Agent Forbidden"); +// _; +// } + +// function getPolicyInfo() external view returns (address, uint256, bool) { +// PolicyInfo memory _policy = policyInfo; +// return (_policy.policy, _policy.utilizedAmount, _policy.exist); +// } + +// function getPoolInfo(address _pool) external view returns (uint256, uint256, address, bool, uint256) { +// PoolInfo memory _poolInfo = poolInfo[_pool]; +// return ( +// _poolInfo.totalCapital, +// _poolInfo.SCR, +// _poolInfo.currency, +// _poolInfo.exist, +// _poolInfo.totalWithdrawPendingCapital +// ); +// } + +// /** +// * @dev set sales policy factory, can only be call by admin role +// * @param _factory new sales policy factory address +// **/ +// function setSalesPolicyFactory(address _factory) external onlyRole(ADMIN_ROLE) nonReentrant { +// require(_factory != address(0), "UnoRe: zero factory address"); +// salesPolicyFactory = _factory; +// emit LogSetSalesPolicyFactory(_factory); +// } + +// /** +// * @dev set operator, can only be call by admin role +// * @param _operator new operator address +// **/ +// function setOperator(address _operator) external onlyRole(ADMIN_ROLE) nonReentrant { +// require(_operator != address(0), "UnoRe: zero operator address"); +// operator = _operator; +// emit LogSetOperator(_operator); +// } + +// /** +// * @dev set usdc token, can only be call by admin role +// * @param _usdcToken new usdc token address +// **/ +// function setUSDCToken(address _usdcToken) external onlyRole(ADMIN_ROLE) nonReentrant { +// require(_usdcToken != address(0), "UnoRe: zero usdc address"); +// usdcToken = _usdcToken; +// emit LogSetUSDC(_usdcToken); +// } + +// /** +// * @dev whitelist pool address, can only be call by admin role +// * @param _pool address of pool to whitelist +// **/ +// function addPoolWhiteList(address _pool) external onlyRole(ADMIN_ROLE) nonReentrant { +// require(_pool != address(0), "UnoRe: zero pool address"); +// require(!poolWhiteList[_pool], "UnoRe: white list already"); +// poolWhiteList[_pool] = true; +// emit LogAddPoolWhiteList(_pool); +// } + +// /** +// * @dev remove whitelisted pool, can only be call by admin role +// * @param _pool address of pool to remove from whitelist +// **/ +// function removePoolWhiteList(address _pool) external onlyRole(ADMIN_ROLE) nonReentrant { +// require(poolWhiteList[_pool], "UnoRe: no white list"); +// poolWhiteList[_pool] = false; +// emit LogRemovePoolWhiteList(_pool); +// } + +// /** +// * @dev return total capital in usdc staked in capital agent by pools +// **/ +// function totalCapitalStaked() public view returns (uint256) { +// return _getTotalCapitalStakedInUSDC(); +// } + +// /** +// * @dev add pool into capitalAgent to stake capital, can only be call by whitelisted pools +// * @param _ssip address of pool to add +// * @param _currency pool lp currency address +// * @param _scr pool scr value(minimum capital should maintain in capital agent) +// **/ +// function addPool(address _ssip, address _currency, uint256 _scr) external override onlyPoolWhiteList { +// require(_ssip != address(0), "UnoRe: zero address"); +// require(!poolInfo[_ssip].exist, "UnoRe: already exist pool"); + +// if (existedCurrencies[_currency] == false) { +// existedCurrencies[_currency] = true; +// currencyList.push(_currency); +// } +// poolInfo[_ssip] = PoolInfo({ +// totalCapital: 0, +// currency: _currency, +// SCR: _scr, +// exist: true, +// totalWithdrawPendingCapital: 0 +// }); + +// emit LogAddPool(_ssip, _currency, _scr); +// } + +// /** +// * @dev add pool into capitalAgent to stake capital, can only be call by admin role +// * @param _ssip address of pool to add +// * @param _currency pool lp currency address +// * @param _scr pool scr value(minimum capital should maintain in capital agent) +// **/ +// function addPoolByAdmin(address _ssip, address _currency, uint256 _scr) external onlyRole(ADMIN_ROLE) { +// require(_ssip != address(0), "UnoRe: zero address"); +// require(!poolInfo[_ssip].exist, "UnoRe: already exist pool"); + +// if (existedCurrencies[_currency] == false) { +// existedCurrencies[_currency] = true; +// currencyList.push(_currency); +// } +// poolInfo[_ssip] = PoolInfo({ +// totalCapital: 0, +// currency: _currency, +// SCR: _scr, +// exist: true, +// totalWithdrawPendingCapital: 0 +// }); + +// emit LogAddPool(_ssip, _currency, _scr); +// } + +// /** +// * @dev remove pool from capitalAgent, can only be call by admin role +// * @param _ssip address of pool to remove +// **/ +// function removePool(address _ssip) external onlyRole(ADMIN_ROLE) nonReentrant { +// require(poolInfo[_ssip].exist, "UnoRe: no exit pool"); +// if (poolInfo[_ssip].totalCapital > 0) { +// address currency = poolInfo[_ssip].currency; +// totalCapitalStakedByCurrency[currency] = totalCapitalStakedByCurrency[currency] - poolInfo[_ssip].totalCapital; +// } +// delete poolInfo[_ssip]; +// emit LogRemovePool(_ssip); +// } + +// function setPoolCapital(address _ssip, uint256 _capital) external onlyRole(ADMIN_ROLE) nonReentrant { +// require(poolInfo[_ssip].exist, "UnoRe: no exit pool"); +// address currency = poolInfo[_ssip].currency; +// totalCapitalStakedByCurrency[currency] = _capital; +// poolInfo[_ssip].totalCapital = _capital; +// } + +// /** +// * @dev set sales policy, can only be call by SalesPolicyFactory +// * @param _policy address of new SalesPolicy +// **/ +// function setPolicy(address _policy) external override nonReentrant { +// require(!policyInfo.exist, "UnoRe: Policy exists"); +// require(salesPolicyFactory == msg.sender, "UnoRe: only salesPolicyFactory can call"); +// policyInfo = PolicyInfo({policy: _policy, utilizedAmount: 0, exist: true}); + +// emit LogSetPolicy(_policy); +// } + +// /** +// * @dev set sales policy, can only be call by admin role +// * @param _policy address of new SalesPolicy +// **/ +// function setPolicyByAdmin(address _policy) external onlyRole(ADMIN_ROLE) nonReentrant { +// require(_policy != address(0), "UnoRe: zero address"); +// policyInfo = PolicyInfo({policy: _policy, utilizedAmount: 0, exist: true}); + +// emit LogSetPolicy(_policy); +// } + +// /** +// * @dev remove sales policy from capital agent, can only be call by admin role +// **/ +// function removePolicy() external onlyRole(ADMIN_ROLE) nonReentrant { +// require(policyInfo.exist, "UnoRe: no exit pool"); +// totalUtilizedAmount = 0; +// address _policy = policyInfo.policy; +// policyInfo.policy = address(0); +// policyInfo.exist = false; +// policyInfo.utilizedAmount = 0; +// emit LogRemovePolicy(_policy); +// } + +// /** +// * @dev update pool(caller) capital from capital agent, +// * decrease capital of pool by _withdrawAmount, if user withdraw from pool +// * remaning pool capital and total capital staked from same currency should be greater pool SCR and MCR respectively +// * @param _withdrawAmount amount to withdraw +// **/ +// function SSIPWithdraw(uint256 _withdrawAmount) external override nonReentrant { +// require(poolInfo[msg.sender].exist, "UnoRe: no exist ssip"); +// require(_checkCapitalByMCRAndSCR(msg.sender, _withdrawAmount), "UnoRe: minimum capital underflow"); +// _updatePoolCapital(msg.sender, _withdrawAmount, false); +// _updatePoolWithdrawPendingCapital(msg.sender, _withdrawAmount, false); +// } + +// /** +// * @dev update pool(caller) capital from capital agent, +// * decrease capital of pool by _withdrawAmount, if user claim policy from pool +// * @param _withdrawAmount amount to withdraw +// **/ +// function SSIPPolicyCaim(uint256 _withdrawAmount, uint256 _policyId, bool _isNotMigrate) external override nonReentrant { +// require(poolInfo[msg.sender].exist, "UnoRe: no exist ssip"); +// _updatePoolCapital(msg.sender, _withdrawAmount, false); +// if (_isNotMigrate) { +// _SSIPPolicyClaim(_withdrawAmount, _policyId); +// } +// } + +// function _SSIPPolicyClaim(uint256 _withdrawAmount, uint256 _policyId) internal { +// address _salesPolicyAddress = policyInfo.policy; +// (uint256 _coverageAmount, , , , ) = ISalesPolicy(_salesPolicyAddress).getPolicyData(_policyId); +// uint256 _claimed = claimedAmount[_salesPolicyAddress][_policyId]; +// address _poolCurrency = poolInfo[msg.sender].currency; +// uint256 usdcTokenAmount = IExchangeAgent(exchangeAgent).getNeededTokenAmount(_poolCurrency, usdcToken, _withdrawAmount); +// require(_coverageAmount >= usdcTokenAmount + _claimed, "UnoRe: coverage amount is less"); +// claimedAmount[_salesPolicyAddress][_policyId] += usdcTokenAmount; +// bool _isFinished = !(_coverageAmount > (usdcTokenAmount + _claimed)); +// if (_isFinished) { +// // @Audit: DUST amount will prevent marking a policy complete +// _markToClaimPolicy(_policyId, _coverageAmount); +// } +// } + +// /** +// * @dev update pool(caller) capital from capital agent, +// * increase capital of pool by _stakingAmount, if user stake in pool +// * @param _stakingAmount amount to deposit +// **/ +// function SSIPStaking(uint256 _stakingAmount) external override nonReentrant { +// require(poolInfo[msg.sender].exist, "UnoRe: no exist ssip"); +// _updatePoolCapital(msg.sender, _stakingAmount, true); +// } + +// function updatePoolWithdrawPendingCapital(address _pool, uint256 _amount, bool isAdd) external nonReentrant { +// require(poolInfo[msg.sender].exist, "UnoRe: no exist ssip"); +// _updatePoolWithdrawPendingCapital(_pool, _amount, isAdd); +// } + +// /** +// * @dev return if pool can withdraw this amount, +// * remaning pool capital and total capital staked from same currency should be greater pool SCR and MCR respectively +// * @param _pool address of pool +// * @param _withdrawAmount withdraw amount +// **/ +// function checkCapitalByMCR(address _pool, uint256 _withdrawAmount) external view override returns (bool) { +// return _checkCapitalByMCRAndSCR(_pool, _withdrawAmount); +// } + +// /** +// * @dev return if user can buy policy from this coverage amount, +// * total utlized amount plus coverage should be less than MLR of total capital staked +// * @param _coverageAmount coverage amount +// **/ +// function checkCoverageByMLR(uint256 _coverageAmount) external view override returns (bool) { +// return _checkCoverageByMLR(_coverageAmount); +// } + +// /** +// * @dev update policy coverage if user buy policy from SalesPolicy, only sales policy can call this function +// * @param _coverageAmount coverage amount +// **/ +// function policySale(uint256 _coverageAmount) external override nonReentrant { +// require(msg.sender == policyInfo.policy, "UnoRe: only salesPolicy can call"); +// require(policyInfo.exist, "UnoRe: no exist policy"); +// require(_checkCoverageByMLR(_coverageAmount), "UnoRe: maximum leverage overflow"); +// _updatePolicyCoverage(_coverageAmount, true); +// } + +// /** +// * @dev update policy status, if expired update policy coverage and notify to sales policy +// * @param _policyId policy id to update status +// **/ +// function updatePolicyStatus(uint256 _policyId) external override nonReentrant { +// require(policyInfo.policy != address(0), "UnoRe: no exist salesPolicy"); +// (uint256 _coverageAmount, uint256 _coverageDuration, uint256 _coverStartAt, , ) = ISalesPolicy(policyInfo.policy) +// .getPolicyData(_policyId); +// bool isExpired = block.timestamp >= _coverageDuration + _coverStartAt; +// if (isExpired) { +// _updatePolicyCoverage(_coverageAmount, false); +// ISalesPolicy(policyInfo.policy).updatePolicyExpired(_policyId); +// emit LogUpdatePolicyExpired(policyInfo.policy, _policyId); +// } +// } + +// /** +// * @dev update policy status to not exist, can only be called by admin role +// * @param _policyId policy id to update status +// **/ +// function markToClaimPolicy(uint256 _policyId) external onlyRole(ADMIN_ROLE) nonReentrant { +// (uint256 _coverageAmount, , , , ) = ISalesPolicy(policyInfo.policy).getPolicyData(_policyId); +// _markToClaimPolicy(_policyId, _coverageAmount); +// } + +// function _markToClaimPolicy(uint256 _policyId, uint256 _coverageAmount) private { +// require(policyInfo.policy != address(0), "UnoRe: no exist salesPolicy"); +// _updatePolicyCoverage(_coverageAmount, false); +// ISalesPolicy(policyInfo.policy).markToClaim(_policyId); +// emit LogMarkToClaimPolicy(policyInfo.policy, _policyId); +// } + +// function _updatePoolCapital(address _pool, uint256 _amount, bool isAdd) private { +// if (!isAdd) { +// require(poolInfo[_pool].totalCapital >= _amount, "UnoRe: pool capital overflow"); +// } +// address currency = poolInfo[_pool].currency; +// poolInfo[_pool].totalCapital = isAdd ? poolInfo[_pool].totalCapital + _amount : poolInfo[_pool].totalCapital - _amount; +// totalCapitalStakedByCurrency[currency] = isAdd +// ? totalCapitalStakedByCurrency[currency] + _amount +// : totalCapitalStakedByCurrency[currency] - _amount; +// emit LogUpdatePoolCapital(_pool, poolInfo[_pool].totalCapital, totalCapitalStakedByCurrency[currency]); +// } + +// function _updatePoolWithdrawPendingCapital(address _pool, uint256 _amount, bool isAdd) private { +// if (!isAdd) { +// require(poolInfo[_pool].totalWithdrawPendingCapital >= _amount, "UnoRe: total Capital Pending underflow"); +// } +// poolInfo[_pool].totalWithdrawPendingCapital = isAdd +// ? poolInfo[_pool].totalWithdrawPendingCapital + _amount +// : poolInfo[_pool].totalWithdrawPendingCapital - _amount; +// emit LogupdatePoolWithdrawPendingCapital(_pool, poolInfo[_pool].totalWithdrawPendingCapital); +// } + +// function _updatePolicyCoverage(uint256 _amount, bool isAdd) private { +// if (!isAdd) { +// require(policyInfo.utilizedAmount >= _amount, "UnoRe: policy coverage overflow"); +// } +// policyInfo.utilizedAmount = isAdd ? policyInfo.utilizedAmount + _amount : policyInfo.utilizedAmount - _amount; +// totalUtilizedAmount = isAdd ? totalUtilizedAmount + _amount : totalUtilizedAmount - _amount; +// emit LogUpdatePolicyCoverage(policyInfo.policy, _amount, policyInfo.utilizedAmount, totalUtilizedAmount); +// } + +// function _checkCapitalByMCRAndSCR(address _pool, uint256 _withdrawAmount) private view returns (bool) { +// address currency = poolInfo[_pool].currency; +// uint256 totalCapitalStakedInUSDCPool; +// uint256 mcrInUSDC; +// uint256 scrInUSDC; +// uint256 totalWithdrawPendingCapital; + +// totalWithdrawPendingCapital = _convertTokenToUSDC(currency, poolInfo[_pool].totalWithdrawPendingCapital); +// totalCapitalStakedInUSDCPool = _convertTokenToUSDC(currency, totalCapitalStakedByCurrency[currency]); +// mcrInUSDC = _convertTokenToUSDC(currency, totalCapitalStakedByCurrency[currency] - _withdrawAmount); +// scrInUSDC = _convertTokenToUSDC(currency, poolInfo[_pool].totalCapital - _withdrawAmount); + +// bool isMCRPass = mcrInUSDC >= ((totalCapitalStakedInUSDCPool - totalWithdrawPendingCapital) * MCR) / CALC_PRECISION; +// bool isSCRPass = scrInUSDC >= poolInfo[_pool].SCR; + +// return isMCRPass && isSCRPass; +// } + +// function _convertTokenToUSDC(address _currency, uint256 _amount) public view returns (uint256) { +// uint256 tokenInUSDC; +// if (_currency == usdcToken) { +// tokenInUSDC = _amount; +// } else { +// tokenInUSDC = _currency != address(0) +// ? IExchangeAgent(exchangeAgent).getNeededTokenAmount(_currency, usdcToken, _amount) +// : IExchangeAgent(exchangeAgent).getTokenAmountForETH(usdcToken, _amount); +// } + +// return tokenInUSDC; +// } + +// function _getTotalCapitalStakedInUSDC() private view returns (uint256) { +// uint256 totalCapitalStakedInUSDC; +// for (uint256 i = 0; i < currencyList.length; i++) { +// address currency = currencyList[i]; +// totalCapitalStakedInUSDC = +// totalCapitalStakedInUSDC + +// _convertTokenToUSDC(currency, totalCapitalStakedByCurrency[currency]); +// } + +// return totalCapitalStakedInUSDC; +// } + +// function _checkCoverageByMLR(uint256 _newCoverageAmount) private view returns (bool) { +// uint256 totalCapitalStakedInUSDC = _getTotalCapitalStakedInUSDC(); +// return totalUtilizedAmount + _newCoverageAmount <= (totalCapitalStakedInUSDC * MLR) / CALC_PRECISION; +// } + +// /** +// * @dev set new MCR, can only be called by operator +// * @param _MCR new value to update +// **/ +// function setMCR(uint256 _MCR) external onlyOperator nonReentrant { +// MCR = _MCR; +// emit LogSetMCR(msg.sender, address(this), _MCR); +// } + +// /** +// * @dev set new MLR, can only be called by operator +// * @param _MLR new value to update +// **/ +// function setMLR(uint256 _MLR) external onlyOperator nonReentrant { +// MLR = _MLR; +// emit LogSetMLR(msg.sender, address(this), _MLR); +// } + +// /** +// * @dev set new SCR of pool, can only be called by operator +// * @param _SCR new value to update +// * @param _pool address of pool +// **/ +// function setSCR(uint256 _SCR, address _pool) external onlyOperator nonReentrant { +// poolInfo[_pool].SCR = _SCR; +// emit LogSetSCR(msg.sender, address(this), _pool, _SCR); +// } + +// /** +// * @dev set new exchange agent address, can only be called by admin role +// * @param _exchangeAgent new exchange agent address +// **/ +// function setExchangeAgent(address _exchangeAgent) external onlyRole(ADMIN_ROLE) nonReentrant { +// require(_exchangeAgent != address(0), "UnoRe: zero address"); +// exchangeAgent = _exchangeAgent; +// emit LogSetExchangeAgent(msg.sender, address(this), _exchangeAgent); +// } +// } diff --git a/contracts/Mocks/MockChainLinkAggregator.sol b/contracts/Mocks/MockChainLinkAggregator.sol new file mode 100644 index 0000000..7fea6fe --- /dev/null +++ b/contracts/Mocks/MockChainLinkAggregator.sol @@ -0,0 +1,51 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.23; + +import {AggregatorV3Interface} from "../interfaces/IAggregatorV3.sol"; + +contract MockChainLinkAggregator is AggregatorV3Interface { + int256 private price; + uint8 private decimals_; + + constructor(int256 _initialPrice, uint8 _decimals) { + price = _initialPrice; + decimals_ = _decimals; + } + + function decimals() external view override returns (uint8) { + return decimals_; + } + + function description() external pure override returns (string memory) { + return "Mock Chainlink Aggregator"; + } + + function version() external pure override returns (uint256) { + return 1; + } + + function getRoundData( + uint80 _roundId + ) + external + pure + override + returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound) + { + return (_roundId, 0, 0, 0, 0); + } + + function latestRoundData() + external + view + override + returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound) + { + return (0, price, 0, block.timestamp, 0); + } + + // Function to update the price (for testing purposes) + function updatePrice(int256 _newPrice) external { + price = _newPrice; + } +} diff --git a/contracts/Mocks/OraclePriceFeed.sol b/contracts/Mocks/OraclePriceFeed.sol index 1946f93..37b06dd 100644 --- a/contracts/Mocks/OraclePriceFeed.sol +++ b/contracts/Mocks/OraclePriceFeed.sol @@ -4,13 +4,7 @@ pragma solidity =0.8.23; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import {AggregatorV3Interface} from "../interfaces/IAggregatorV3.sol"; - -interface IERC20Metadata { - /** - * @dev Returns the decimals places of the token. - */ - function decimals() external view returns (uint8); -} +import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; contract PriceOracle is Ownable { using EnumerableSet for EnumerableSet.AddressSet; diff --git a/contracts/SingleSidedInsurancePool.sol b/contracts/SingleSidedInsurancePool.sol index 36762ff..8c25d7a 100644 --- a/contracts/SingleSidedInsurancePool.sol +++ b/contracts/SingleSidedInsurancePool.sol @@ -239,15 +239,14 @@ contract SingleSidedInsurancePool is string calldata _symbol, address _factory, address _currency, - uint256 _rewardMultiplier, - uint256 _SCR + uint256 _rewardMultiplier ) external nonReentrant onlyRole(ADMIN_ROLE) roleLockTimePassed(ADMIN_ROLE) { require(_factory != address(0), "UnoRe: zero factory address"); riskPool = IRiskPoolFactory(_factory).newRiskPool(_name, _symbol, address(this), _currency); poolInfo.lastRewardBlock = block.number; poolInfo.accUnoPerShare = 0; poolInfo.unoMultiplierPerBlock = _rewardMultiplier; - ICapitalAgent(capitalAgent).addPool(address(this), _currency, _SCR); + ICapitalAgent(capitalAgent).addPool(address(this), _currency); emit RiskPoolCreated(address(this), riskPool); } @@ -327,7 +326,7 @@ contract SingleSidedInsurancePool is */ function leaveFromPoolInPending(uint256 _amount) external override whenNotPaused isStartTime nonReentrant { _harvest(msg.sender); - require(ICapitalAgent(capitalAgent).checkCapitalByMCR(address(this), _amount), "UnoRe: minimum capital underflow"); + require(ICapitalAgent(capitalAgent).checkCapitalByMLR(address(this), _amount), "UnoRe: minimum capital underflow"); // Withdraw desired amount from pool uint256 amount = userInfo[msg.sender].amount; uint256 lpPriceUno = IRiskPool(riskPool).lpPriceUno(); diff --git a/contracts/interfaces/ICapitalAgent.sol b/contracts/interfaces/ICapitalAgent.sol index 34a2ace..52125c8 100644 --- a/contracts/interfaces/ICapitalAgent.sol +++ b/contracts/interfaces/ICapitalAgent.sol @@ -2,7 +2,7 @@ pragma solidity =0.8.23; interface ICapitalAgent { - function addPool(address _ssip, address _currency, uint256 _scr) external; + function addPool(address _ssip, address _currency) external; function setPolicy(address _policy) external; @@ -12,7 +12,7 @@ interface ICapitalAgent { function SSIPPolicyCaim(uint256 _withdrawAmount, uint256 _policyId, bool _isMigrate) external; - function checkCapitalByMCR(address _pool, uint256 _withdrawAmount) external view returns (bool); + function checkCapitalByMLR(address _pool, uint256 _withdrawAmount) external view returns (bool); function checkCoverageByMLR(uint256 _coverageAmount) external view returns (bool); @@ -26,7 +26,7 @@ interface ICapitalAgent { function exchangeAgent() external view returns (address); - function getPoolInfo(address _pool) external view returns (uint256, uint256, address, bool, uint256); + function getPoolInfo(address _pool) external view returns (uint256, address, bool, uint256); function updatePoolWithdrawPendingCapital(address _pool, uint256 _amount, bool) external; } diff --git a/contracts/uma/PayoutRequest.sol b/contracts/uma/PayoutRequest.sol index fc44129..a166bc3 100644 --- a/contracts/uma/PayoutRequest.sol +++ b/contracts/uma/PayoutRequest.sol @@ -242,7 +242,7 @@ contract PayoutRequest is PausableUpgradeable { uint256 _claimed = ICapitalAgent(capitalAgent).claimedAmount(salesPolicy, _policyId); (uint256 _coverageAmount, , , bool _exist, bool _expired) = ISalesPolicy(salesPolicy).getPolicyData(_policyId); address _exchangeAgent = ICapitalAgent(capitalAgent).exchangeAgent(); - (, , address _currency, , ) = ICapitalAgent(capitalAgent).getPoolInfo(address(ssip)); + (,address _currency, , ) = ICapitalAgent(capitalAgent).getPoolInfo(address(ssip)); address _usdcToken = IExchangeAgent(_exchangeAgent).usdcToken(); uint256 usdcTokenAmount = IExchangeAgent(_exchangeAgent).getNeededTokenAmount(_currency, _usdcToken, _amount); // @Audit: there might be a chance of amount loss due to precision loss require(usdcTokenAmount + _claimed <= _coverageAmount, "UnoRe: amount exceeds coverage amount"); diff --git a/test/UnoV3/CapitalAgentTest.t.sol b/test/UnoV3/CapitalAgentTest.t.sol new file mode 100644 index 0000000..d292d1e --- /dev/null +++ b/test/UnoV3/CapitalAgentTest.t.sol @@ -0,0 +1,1609 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.23; + +import "lib/forge-std/src/Test.sol"; + +import "../../contracts/Mocks/MockChainLinkAggregator.sol"; +import "../../contracts/factories/RiskPoolFactory.sol"; +import "../../contracts/SingleSidedInsurancePool.sol"; +import "../../contracts/Mocks/OraclePriceFeed.sol"; +import "../../contracts/Mocks/MockUSDC.sol"; +import "../../contracts/Mocks/MockUNO.sol"; +import "../../contracts/ExchangeAgent.sol"; +import "../../contracts/CapitalAgent.sol"; +import "../../contracts/SalesPolicy.sol"; +import "../../contracts/RiskPool.sol"; + +contract CapitalAgentTest is Test { + IERC20 public iERC20; + MockChainLinkAggregator public mockEthUsdAggregator; + SingleSidedInsurancePool public ssip; + CapitalAgent public capitalAgent; + SalesPolicy public salesPolicy; + RiskPoolFactory public riskPoolFactory; + ExchangeAgent public exchangeAgentContract; + PriceOracle public priceOracle; + address public wethAddress; + address public uniswapRouterAddress; + address public uniswapFactoryAddress; + address public oraclePriceFeedAddress; + uint256 public swapDeadline; + MockUNO public testToken; + address public admin; + address public user; + address public operator; + MockUSDC public usdcToken; + address public factory; + address public multiSigWallet; + address public salesPolicyFactory; + address public policyBuyer; + address public premiumPool; + address[] public assets; + address[] public protocols; + uint256[] public coverageAmount; + uint256[] public coverageDuration; + uint256 public policyPriceInUSDC; + uint256 public signedTime; + address public premiumCurrency; + bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); + + event LogAddPool(address indexed, address); + event LogAddPoolToList(address indexed); + event LogRemovePool(address indexed); + event LogSetPolicy(address indexed); + event LogRemovePolicy(address indexed); + event LogUpdatePoolCapital(address indexed, uint256, uint256); + event LogUpdatePolicyCoverage(address indexed, uint256, uint256, uint256); + event LogUpdatePolicyExpired(address indexed, uint256); + event LogMarkToClaimPolicy(address indexed, uint256); + event LogSetMLR(address indexed, address indexed, uint256 _MLR); + event LogSetExchangeAgent(address indexed, address indexed, address); + event LogSetSalesPolicyFactory(address indexed); + event LogAddPoolWhiteList(address indexed); + event LogRemovePoolWhiteList(address indexed); + event LogSetOperator(address indexed); + event LogSetUSDC(address indexed); + event LogupdatePoolWithdrawPendingCapital(address indexed, uint256); + + function setUp() public { + user = address(0x666); + admin = address(this); + operator = address(0x1); + usdcToken = new MockUSDC(); + testToken = new MockUNO(); + multiSigWallet = address(0x4); + salesPolicyFactory = address(0x99); + premiumPool = address(0x894); + factory = address(0x111); + policyBuyer = address(0x1234); + assets = new address[](1); + assets[0] = address(0x2345); + protocols = new address[](1); + protocols[0] = address(0x3456); + coverageAmount = new uint256[](1); + coverageAmount[0] = 1000 * 1e6; // 1000 USDC + coverageDuration = new uint256[](1); + coverageDuration[0] = 30 days; + policyPriceInUSDC = 50 * 1e6; // 50 USDC + signedTime = block.timestamp; + premiumCurrency = address(usdcToken); + + // Deploy mock Chainlink aggregator for ETH/USD + mockEthUsdAggregator = new MockChainLinkAggregator(1 * 1e8, 8); // $2000 per ETH, 8 decimals + + // Deploy PriceOracle + priceOracle = new PriceOracle(multiSigWallet); + + // Set the mock aggregator in PriceOracle + vm.prank(multiSigWallet); + priceOracle.setETHUSDAggregator(address(mockEthUsdAggregator)); + + // Set prices in PriceOracle + vm.startPrank(multiSigWallet); + priceOracle.setAssetEthPrice(address(testToken), 1e18); // 1:1 with ETH + priceOracle.addStableCoin(address(usdcToken)); + vm.stopPrank(); + + // Set up addresses for ExchangeAgent constructor + wethAddress = address(0x4321); // Replace with actual or mock WETH address + uniswapRouterAddress = address(0x5432); // Replace with actual or mock Uniswap Router address + uniswapFactoryAddress = address(0x6543); // Replace with actual or mock Uniswap Factory address + swapDeadline = 1800; // 30 minutes, adjust as needed + + // Deploy ExchangeAgent + exchangeAgentContract = new ExchangeAgent( + address(usdcToken), + wethAddress, + address(priceOracle), + uniswapRouterAddress, + uniswapFactoryAddress, + multiSigWallet, + swapDeadline + ); + + vm.prank(multiSigWallet); + capitalAgent = new CapitalAgent(); + capitalAgent.initialize(address(exchangeAgentContract), address(usdcToken), multiSigWallet, operator); + vm.prank(multiSigWallet); + capitalAgent.setSalesPolicyFactory(salesPolicyFactory); + + salesPolicy = new SalesPolicy( + factory, + address(exchangeAgentContract), + premiumPool, + address(capitalAgent), + address(usdcToken) + ); + + // Deploy SingleSidedInsurancePool + ssip = new SingleSidedInsurancePool(); + ssip.initialize(address(capitalAgent), multiSigWallet); + + // Deploy RiskPoolFactory + riskPoolFactory = new RiskPoolFactory(); + + // Whitelist the SSIP in CapitalAgent + vm.prank(multiSigWallet); + capitalAgent.addPoolWhiteList(address(ssip)); + + vm.startPrank(multiSigWallet); + // Create RiskPool + ssip.createRiskPool( + "Test Risk Pool", + "TRP", + address(riskPoolFactory), + address(testToken), + 1e18 // reward multiplier + ); + uint256 stakingStartTime = block.timestamp + 1 hours; + // Set staking start time to now + ssip.setStakingStartTime(block.timestamp); + vm.stopPrank(); + vm.prank(user); + testToken.mint(2000 ether); + vm.prank(address(user)); + testToken.approve(address(ssip), 2000 ether); + vm.warp(stakingStartTime + 1); + } + + // helper + function generateSignature(uint256 nonce) internal view returns (uint8 v, bytes32 r, bytes32 s) { + bytes32 messageHash = keccak256( + abi.encodePacked( + policyPriceInUSDC, + protocols, + coverageDuration, + coverageAmount, + signedTime, + premiumCurrency, + nonce, + policyBuyer, + block.chainid + ) + ); + bytes32 ethSignedMessageHash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", messageHash)); + return vm.sign(uint256(keccak256(abi.encodePacked("signer_private_key"))), ethSignedMessageHash); + } + + // 1. Initialization + function testInitialize() public { + assertEq(capitalAgent.exchangeAgent(), address(exchangeAgentContract)); + assertEq(capitalAgent.usdcToken(), address(usdcToken)); + assertEq(capitalAgent.operator(), operator); + assertTrue(capitalAgent.hasRole(capitalAgent.ADMIN_ROLE(), multiSigWallet)); + } + + function testInitializeZeroExchangeAgent() public { + CapitalAgent newCapitalAgent = new CapitalAgent(); + vm.expectRevert("UnoRe: zero exchangeAgent address"); + newCapitalAgent.initialize(address(0), address(usdcToken), multiSigWallet, operator); + } + + function testInitializeZeroUSDCToken() public { + CapitalAgent newCapitalAgent = new CapitalAgent(); + vm.expectRevert("UnoRe: zero USDC address"); + newCapitalAgent.initialize(address(exchangeAgentContract), address(0), multiSigWallet, operator); + } + + function testInitializeZeroMultiSigWallet() public { + CapitalAgent newCapitalAgent = new CapitalAgent(); + vm.expectRevert("UnoRe: zero multisigwallet address"); + newCapitalAgent.initialize(address(exchangeAgentContract), address(usdcToken), address(0), operator); + } + + function testAdminRoleGranted() public { + assertTrue(capitalAgent.hasRole(capitalAgent.ADMIN_ROLE(), multiSigWallet)); + } + + function testAdminRoleAdmin() public { + assertEq(capitalAgent.getRoleAdmin(capitalAgent.ADMIN_ROLE()), capitalAgent.ADMIN_ROLE()); + } + + // 2. Access Control + function testOnlyAdminCanAddPool() public { + address pool = address(0x5); + address currency = address(0x6); + + vm.prank(address(0x7)); // Non-admin address + // Use the expected revert for AccessControl + vm.expectRevert(abi.encodeWithSelector(0xe2517d3f, address(0x7), ADMIN_ROLE)); + capitalAgent.addPoolByAdmin(pool, currency); + + // Test with a valid admin account + vm.prank(multiSigWallet); // Admin address + capitalAgent.addPoolByAdmin(pool, currency); + (, , bool exist, ) = capitalAgent.getPoolInfo(pool); + assertTrue(exist); + } + + function testOnlyAdminCanRemovePool() public { + address poolToRemove = address(0x6); + + // Add a pool first + vm.prank(multiSigWallet); + capitalAgent.addPoolByAdmin(poolToRemove, address(usdcToken)); + + // Non-admin should not be able to remove pool + vm.prank(address(0x7)); + vm.expectRevert(abi.encodeWithSelector(0xe2517d3f, address(0x7), ADMIN_ROLE)); + capitalAgent.removePool(poolToRemove); + + // Admin should be able to remove pool + vm.prank(multiSigWallet); + capitalAgent.removePool(poolToRemove); + } + + function testOnlyAdminCanSetPolicy() public { + address newPolicy = address(0x7); + + // Non-admin should not be able to set policy + vm.prank(address(0x7)); + vm.expectRevert(abi.encodeWithSelector(0xe2517d3f, address(0x7), ADMIN_ROLE)); + capitalAgent.setPolicyByAdmin(newPolicy); + + // Admin should be able to set policy + vm.prank(multiSigWallet); + capitalAgent.setPolicyByAdmin(newPolicy); + } + + function testOnlyAdminCanRemovePolicy() public { + address policy = address(0x7); + + // Set a policy first + vm.prank(multiSigWallet); + capitalAgent.setPolicyByAdmin(policy); + + // Non-admin should not be able to remove policy + vm.prank(address(0x7)); + vm.expectRevert(abi.encodeWithSelector(0xe2517d3f, address(0x7), ADMIN_ROLE)); + + capitalAgent.removePolicy(); + + // Admin should be able to remove policy + vm.prank(multiSigWallet); + capitalAgent.removePolicy(); + } + + function testOnlyAdminCanSetExchangeAgent() public { + address newExchangeAgent = address(0x8); + + // Non-admin should not be able to set exchange agent + vm.prank(address(0x7)); + vm.expectRevert(abi.encodeWithSelector(0xe2517d3f, address(0x7), ADMIN_ROLE)); + capitalAgent.setExchangeAgent(newExchangeAgent); + + // Admin should be able to set exchange agent + vm.prank(multiSigWallet); + capitalAgent.setExchangeAgent(newExchangeAgent); + } + + function testOnlyAdminCanSetSalesPolicyFactory() public { + address newSalesPolicyFactory = address(0x9); + + // Non-admin should not be able to set sales policy factory + vm.prank(address(0x7)); + vm.expectRevert(abi.encodeWithSelector(0xe2517d3f, address(0x7), ADMIN_ROLE)); + capitalAgent.setSalesPolicyFactory(newSalesPolicyFactory); + + // Admin should be able to set sales policy factory + vm.prank(multiSigWallet); + capitalAgent.setSalesPolicyFactory(newSalesPolicyFactory); + } + + function testOnlyAdminCanSetOperator() public { + address newOperator = address(0x10); + + // Non-admin should not be able to set operator + vm.prank(address(0x7)); + vm.expectRevert(abi.encodeWithSelector(0xe2517d3f, address(0x7), ADMIN_ROLE)); + capitalAgent.setOperator(newOperator); + + // Admin should be able to set operator + vm.prank(multiSigWallet); + capitalAgent.setOperator(newOperator); + } + + function testOnlyAdminCanSetUSDCToken() public { + address newUSDCToken = address(0x11); + + // Non-admin should not be able to set USDC token + vm.prank(address(0x7)); + vm.expectRevert(abi.encodeWithSelector(0xe2517d3f, address(0x7), ADMIN_ROLE)); + capitalAgent.setUSDCToken(newUSDCToken); + + // Admin should be able to set USDC token + vm.prank(multiSigWallet); + capitalAgent.setUSDCToken(newUSDCToken); + } + + function testOnlyAdminCanAddPoolWhitelist() public { + address poolToWhitelist = address(0x12); + + // Non-admin should not be able to add pool to whitelist + vm.prank(address(0x7)); + vm.expectRevert(abi.encodeWithSelector(0xe2517d3f, address(0x7), ADMIN_ROLE)); + capitalAgent.addPoolWhiteList(poolToWhitelist); + + // Admin should be able to add pool to whitelist + vm.prank(multiSigWallet); + capitalAgent.addPoolWhiteList(poolToWhitelist); + } + + function testOnlyAdminCanRemovePoolWhitelist() public { + address poolToWhitelist = address(0x12); + + // Add pool to whitelist first + vm.prank(multiSigWallet); + capitalAgent.addPoolWhiteList(poolToWhitelist); + + // Non-admin should not be able to remove pool from whitelist + vm.prank(address(0x7)); + vm.expectRevert(abi.encodeWithSelector(0xe2517d3f, address(0x7), ADMIN_ROLE)); + capitalAgent.removePoolWhiteList(poolToWhitelist); + + // Admin should be able to remove pool from whitelist + vm.prank(multiSigWallet); + capitalAgent.removePoolWhiteList(poolToWhitelist); + } + + function testOnlyOperatorCanSetMLR() public { + uint256 newMLR = 1500000000000000000; // 1.5 in 1e18 + + vm.prank(address(0x7)); // Non-operator address + vm.expectRevert("UnoRe: Capital Agent Forbidden"); + capitalAgent.setMLR(newMLR); + + vm.prank(operator); + capitalAgent.setMLR(newMLR); + assertEq(capitalAgent.MLR(), newMLR); + } + + // 3. Pool Management + function testAddPool() public { + address pool = address(0x5); + address currency = address(0x6); + + vm.prank(multiSigWallet); + capitalAgent.addPoolByAdmin(pool, currency); + + (uint256 totalCapital, address poolCurrency, bool exist, ) = capitalAgent.getPoolInfo(pool); + assertEq(totalCapital, 0); + assertEq(poolCurrency, currency); + assertTrue(exist); + } + + function testAddPoolZeroAddress() public { + address currency = address(0x6); + + vm.prank(multiSigWallet); + vm.expectRevert("UnoRe: zero address"); + capitalAgent.addPoolByAdmin(address(0), currency); + } + + function testAddExistingPool() public { + address pool = address(0x5); + address currency = address(0x6); + + vm.startPrank(multiSigWallet); + capitalAgent.addPoolByAdmin(pool, currency); + vm.expectRevert("UnoRe: already exist pool"); + capitalAgent.addPoolByAdmin(pool, currency); + vm.stopPrank(); + } + + function testRemovePool() public { + address pool = address(0x5); + address currency = address(0x6); + + vm.startPrank(multiSigWallet); + capitalAgent.addPoolByAdmin(pool, currency); + capitalAgent.removePool(pool); + vm.stopPrank(); + + (, , bool exist, ) = capitalAgent.getPoolInfo(pool); + assertFalse(exist); + } + + function testRemoveNonExistentPool() public { + address pool = address(0x5); + + vm.prank(multiSigWallet); + vm.expectRevert("UnoRe: no exit pool"); + capitalAgent.removePool(pool); + } + + function testPoolAddedToPoolList() public { + address newPool = address(0x100); + address newCurrency = address(0x101); + + // Add a new pool + vm.prank(multiSigWallet); + capitalAgent.addPoolByAdmin(newPool, newCurrency); + + // Check if the pool is in the poolList + bool poolFound = false; + address[] memory poolList = capitalAgent.getPoolList(); + for (uint i = 0; i < poolList.length; i++) { + if (poolList[i] == newPool) { + poolFound = true; + break; + } + } + + assertTrue(poolFound, "Pool should be added to poolList"); + } + + function testCurrencyAddedToCurrencyList() public { + address newPool = address(0x100); + address newCurrency = address(0x101); + + // Add a new pool with a new currency + vm.prank(multiSigWallet); + capitalAgent.addPoolByAdmin(newPool, newCurrency); + + // Check if the currency is in the currencyList + bool currencyFound = false; + address[] memory currencyList = capitalAgent.getCurrencyList(); + + for (uint i = 0; i < currencyList.length; i++) { + if (currencyList[i] == newCurrency) { + currencyFound = true; + break; + } + } + + assertTrue(currencyFound, "Currency should be added to currencyList"); + + // Add another pool with the same currency + address anotherPool = address(0x102); + vm.prank(multiSigWallet); + capitalAgent.addPoolByAdmin(anotherPool, newCurrency); + + // Check that the currency list length hasn't changed + assertEq(currencyList.length, 2, "Currency list length should not change for existing currency"); + } + + function testSetPoolCapital() public { + address newPool = address(0x100); + address newCurrency = address(0x101); + uint256 capitalAmount = 1000000; // 1 million tokens + + // Add a new pool + vm.prank(multiSigWallet); + capitalAgent.addPoolByAdmin(newPool, newCurrency); + + // Set pool capital + vm.prank(multiSigWallet); + capitalAgent.setPoolCapital(newPool, capitalAmount); + + // Verify the pool capital has been set correctly + (uint256 totalCapital, , , ) = capitalAgent.getPoolInfo(newPool); + assertEq(totalCapital, capitalAmount, "Pool capital should be set correctly"); + + // Verify the total capital staked for the currency has been updated + uint256 totalStaked = capitalAgent.totalCapitalStakedByCurrency(newCurrency); + assertEq(totalStaked, capitalAmount, "Total capital staked for currency should be updated"); + } + + function testSetCapitalNonExistentPool() public { + address nonExistentPool = address(0x200); + uint256 capitalAmount = 1000000; // 1 million tokens + + // Attempt to set capital for a non-existent pool + vm.prank(multiSigWallet); + vm.expectRevert("UnoRe: no exit pool"); + capitalAgent.setPoolCapital(nonExistentPool, capitalAmount); + } + + // 4. Policy Management + function testSetPolicy() public { + address policy = address(0x7); + + vm.prank(multiSigWallet); + capitalAgent.setPolicyByAdmin(policy); + + (address policyAddress, uint256 utilizedAmount, bool exist) = capitalAgent.getPolicyInfo(); + assertEq(policyAddress, policy); + assertEq(utilizedAmount, 0); + assertTrue(exist); + } + + function testUpdatePolicy() public { + address policy1 = address(0x7); + address policy2 = address(0x8); + + vm.startPrank(multiSigWallet); + + // Set the first policy + capitalAgent.setPolicyByAdmin(policy1); + + // Attempt to set a second policy, which should fail + capitalAgent.setPolicyByAdmin(policy2); + + vm.stopPrank(); + + // Verify that the policy is still set to policy1 + (address storedPolicy, , bool exists) = capitalAgent.getPolicyInfo(); + assertEq(storedPolicy, policy2); + assertTrue(exists); + } + + function testRemovePolicy() public { + address policy = address(0x7); + + vm.startPrank(multiSigWallet); + capitalAgent.setPolicyByAdmin(policy); + capitalAgent.removePolicy(); + vm.stopPrank(); + + (address policyAddress, , bool exist) = capitalAgent.getPolicyInfo(); + assertEq(policyAddress, address(0)); + assertFalse(exist); + } + + function testRemoveNonExistentPolicy() public { + // Ensure no policy exists initially + (, , bool exists) = capitalAgent.getPolicyInfo(); + assertFalse(exists, "Policy should not exist initially"); + + // Attempt to remove a non-existent policy + vm.prank(multiSigWallet); + vm.expectRevert("UnoRe: non existing policy on Capital Agent"); + capitalAgent.removePolicy(); + + // Verify that the state hasn't changed + (, , exists) = capitalAgent.getPolicyInfo(); + assertFalse(exists, "Policy should still not exist after failed removal"); + } + + function testPolicyInfoUpdated() public { + address testPolicy = address(0x123); + + // Check initial state + (address initialPolicyAddress, uint256 initialUtilizedAmount, bool initialExists) = capitalAgent.getPolicyInfo(); + assertEq(initialPolicyAddress, address(0), "Initial policy address should be zero"); + assertEq(initialUtilizedAmount, 0, "Initial utilized amount should be zero"); + assertFalse(initialExists, "Policy should not exist initially"); + + // Set the policy + vm.prank(multiSigWallet); + capitalAgent.setPolicyByAdmin(testPolicy); + + // Check updated state + (address updatedPolicyAddress, uint256 updatedUtilizedAmount, bool updatedExists) = capitalAgent.getPolicyInfo(); + assertEq(updatedPolicyAddress, testPolicy, "Policy address should be updated"); + assertEq(updatedUtilizedAmount, 0, "Utilized amount should still be zero"); + assertTrue(updatedExists, "Policy should now exist"); + } + + function testSSIPWithdraw() public { + uint256 stakingAmount = 2000 ether; + + vm.prank(user); + testToken.mint(stakingAmount); + + vm.prank(user); + testToken.approve(address(ssip), stakingAmount); + + vm.prank(user); + ssip.enterInPool(stakingAmount); + + uint256 afterStakeUserBalance = testToken.balanceOf(user); + + vm.warp(block.timestamp + 1 days); + vm.roll(block.number + 1 * 7200); // Assuming ~7200 blocks per day + + // Perform withdrawal + vm.startPrank(user); + ssip.leaveFromPoolInPending(stakingAmount / 4); + + // Skip 11 days and mint the blocks + vm.warp(block.timestamp + 11 days); + vm.roll(block.number + 11 * 7200); // Assuming ~7200 blocks per day + + ssip.leaveFromPending(stakingAmount / 4); + vm.stopPrank(); + + // Get final balances + uint256 finalUserBalance = testToken.balanceOf(user); + + // Assert + assertApproxEqAbs( + finalUserBalance, + afterStakeUserBalance + (stakingAmount / 4), + 1e18, + "User balance should increase by withdraw amount" + ); + + // Check capital agent state + uint256 totalPending = capitalAgent.getTotalPendingCapitalInUSDC(); + + assertEq(totalPending, 0, "Total pending should be zero after withdrawal"); + } + + function testSSIPWithdrawExceedingCapital() public { + uint256 stakingAmount = 1000 ether; + uint256 excessiveWithdrawAmount = 1500 ether; + + // Mint and approve tokens for the user + vm.startPrank(user); + testToken.mint(stakingAmount); + testToken.approve(address(ssip), stakingAmount); + + // User stakes tokens + ssip.enterInPool(stakingAmount); + vm.stopPrank(); + + // Advance time + vm.warp(block.timestamp + 1 days); + vm.roll(block.number + 1 * 7200); + + // Attempt to withdraw more than staked + vm.prank(user); + vm.expectRevert(); //TODO add MLR error handler + ssip.leaveFromPoolInPending(excessiveWithdrawAmount); + + // Verify that the total pending capital in USDC is still zero + uint256 totalPending = capitalAgent.getTotalPendingCapitalInUSDC(); + assertEq(totalPending, 0, "Total pending should be zero after failed withdrawal attempt"); + // Verify that the user's balance in the contract remains the same + uint256 userLPBalance = RiskPool(payable(ssip.riskPool())).balanceOf(user); + assertEq(userLPBalance, stakingAmount, "SSIP contract balance should remain unchanged"); + } + + function testSSIPWithdrawViolatingMLR() public { + uint256 stakingAmount = 1000 ether; + uint256 withdrawAmount = 8000 ether; + uint256 mlr = 0.3 ether; // 30% MLR + + // Set MLR + vm.prank(operator); + capitalAgent.setMLR(mlr); + + // Mint and approve tokens for the user + vm.startPrank(user); + testToken.mint(stakingAmount); + testToken.approve(address(ssip), stakingAmount); + + // User stakes tokens + ssip.enterInPool(stakingAmount); + vm.stopPrank(); + + // Advance time + vm.warp(block.timestamp + 1 days); + vm.roll(block.number + 1 * 7200); + + // Attempt to withdraw an amount that would violate MLR + vm.prank(user); + vm.expectRevert(); + ssip.leaveFromPoolInPending(withdrawAmount); + + // Verify that the staked amount remains unchanged + uint256 userLPBalance = RiskPool(payable(ssip.riskPool())).balanceOf(user); + assertEq(userLPBalance, stakingAmount, "Staked amount should remain unchanged"); + + // Verify that the total pending capital in USDC is still zero + uint256 totalPending = capitalAgent.getTotalPendingCapitalInUSDC(); + assertEq(totalPending, 0, "Total pending should be zero after failed withdrawal attempt"); + } + + function testUpdatePoolWithdrawPendingCapitalAdd() public { + address testPool = address(ssip); + uint256 initialStakingAmount = 1000 ether; + uint256 pendingAmount = 100 ether; + + // Setup: Add pool and set initial capital + vm.startPrank(multiSigWallet); + capitalAgent.setPoolCapital(testPool, initialStakingAmount); + vm.stopPrank(); + + // Get initial pool info + (uint256 initialTotalCapital, , , uint256 initialPendingCapital) = capitalAgent.getPoolInfo(testPool); + + // Simulate user staking + vm.startPrank(user); + testToken.mint(initialStakingAmount); + testToken.approve(address(ssip), initialStakingAmount); + ssip.enterInPool(initialStakingAmount); + vm.stopPrank(); + + // Advance time + vm.warp(block.timestamp + 1 days); + vm.roll(block.number + 1 * 7200); // Assuming ~7200 blocks per day + + // User requests to leave from pool (which should update pending capital) + vm.prank(user); + ssip.leaveFromPoolInPending(pendingAmount); + + // Advance time + vm.warp(block.timestamp + 1 days); + vm.roll(block.number + 1 * 7200); // Assuming ~7200 blocks per day + + // Get updated pool info + (, , , uint256 updatedPendingCapital) = capitalAgent.getPoolInfo(testPool); + + // Assertions + assertEq( + updatedPendingCapital, + initialPendingCapital + pendingAmount, + "Pending capital should increase by pendingAmount" + ); + } + + function testUpdatePoolWithdrawPendingCapitalSubtract() public { + address testPool = address(ssip); + uint256 initialStakingAmount = 1000 ether; + uint256 pendingAmount = 100 ether; + + // Setup: Add pool and set initial capital + vm.startPrank(multiSigWallet); + capitalAgent.setPoolCapital(testPool, initialStakingAmount); + vm.stopPrank(); + + // Simulate user staking + vm.startPrank(user); + testToken.mint(initialStakingAmount); + testToken.approve(address(ssip), initialStakingAmount); + ssip.enterInPool(initialStakingAmount); + vm.stopPrank(); + + // Advance time + vm.warp(block.timestamp + 1 days); + vm.roll(block.number + 1 * 7200); // Assuming ~7200 blocks per day + + // User requests to leave from pool (which should update pending capital) + vm.prank(user); + ssip.leaveFromPoolInPending(pendingAmount); + + // Get pending capital after requesting withdrawal + (, , , uint256 pendingCapitalAfterRequest) = capitalAgent.getPoolInfo(testPool); + + // Advance time to allow for withdrawal completion + vm.warp(block.timestamp + 11 days); + vm.roll(block.number + 11 * 7200); // Assuming ~7200 blocks per day + + // User completes the withdrawal + vm.prank(user); + ssip.leaveFromPending(pendingAmount); + + // Get pending capital after completing withdrawal + (, , , uint256 pendingCapitalAfterWithdrawal) = capitalAgent.getPoolInfo(testPool); + + // Assertions + assertEq( + pendingCapitalAfterWithdrawal, + pendingCapitalAfterRequest - pendingAmount, + "Pending capital should decrease by pendingAmount after withdrawal" + ); + + assertEq(pendingCapitalAfterWithdrawal, 0, "Pending capital should be zero after completing withdrawal"); + } + + function testUpdateWithdrawPendingCapitalNonExistentPool() public { + address nonExistentPool = address(0x123); + uint256 pendingAmount = 1000 * 1e6; // 1,000 USDC + + vm.expectRevert("UnoRe: no exist ssip"); + capitalAgent.updatePoolWithdrawPendingCapital(nonExistentPool, pendingAmount, true); + } + + function testCheckCapitalByMLRPass() public { + address pool = address(0x5); + address currency = address(usdcToken); + uint256 initialCapital = 1000000 * 1e6; // 1,000,000 USDC + uint256 utilizedAmount = 500000 * 1e6; // 500,000 USDC + uint256 mlr = 800000000000000000; // 0.8 in 1e18 format (80% MLR) + + // Setup: Add pool, set initial capital, and set MLR + vm.startPrank(multiSigWallet); + capitalAgent.addPoolByAdmin(pool, currency); + capitalAgent.setPoolCapital(pool, initialCapital); + vm.stopPrank(); + + vm.prank(operator); + capitalAgent.setMLR(mlr); + + // Setup: Set policy + address policyAddress = address(0x456); + vm.prank(multiSigWallet); + capitalAgent.setPolicyByAdmin(policyAddress); + + // Calculate maximum allowed utilized amount + uint256 maxAllowedUtilized = (initialCapital * mlr) / 1e18; + assertTrue(utilizedAmount <= maxAllowedUtilized, "Utilized amount should be within MLR limit"); + + // Test with utilized amount at the MLR limit + uint256 utilizedAtLimit = maxAllowedUtilized; + + bool result = capitalAgent.checkCapitalByMLR(pool, utilizedAtLimit); + assertTrue(result, "Capital check should pass when utilized amount is at MLR limit"); + } + + function testCheckCapitalByMLRFail() public { + address pool = address(0x5); + address currency = address(usdcToken); + uint256 initialCapital = 1000000 * 1e6; // 1,000,000 USDC + uint256 mlr = 800000000000000000; // 0.8 in 1e18 format (80% MLR) + + // Setup: Add pool, set initial capital, and set MLR + vm.startPrank(multiSigWallet); + capitalAgent.addPoolByAdmin(pool, currency); + capitalAgent.setPoolCapital(pool, initialCapital); + vm.stopPrank(); + + vm.prank(operator); + capitalAgent.setMLR(mlr); + + // Setup: Set policy + address policyAddress = address(0x456); + vm.prank(multiSigWallet); + capitalAgent.setPolicyByAdmin(policyAddress); + + // Calculate maximum allowed utilized amount + uint256 maxAllowedUtilized = (initialCapital * mlr) / 1e18; + + // Set utilized amount slightly above the MLR limit + uint256 excessiveUtilizedAmount = maxAllowedUtilized + 1e18; // 1 USDC above the limit + + vm.expectRevert(); + capitalAgent.checkCapitalByMLR(pool, excessiveUtilizedAmount); + + // Test with utilized amount slightly below the MLR limit (should pass) + uint256 belowLimitAmount = maxAllowedUtilized - 1 * 1e6; // 1 USDC below the limit + + bool result = capitalAgent.checkCapitalByMLR(pool, belowLimitAmount); + assertTrue(result, "Capital check should pass when utilized amount is below MLR limit"); + } + + function testCheckCoverageByMLRWorksAsExpected() public { + uint256 initialStakingAmount = 1000 ether; // Adjust based on token decimals + uint256 coverageAmountTest = 1500 ether; + uint256 mlr = 2 ether; // 200% + // Set MLR + vm.prank(operator); + capitalAgent.setMLR(mlr); + + // Simulate staking + vm.prank(user); + ssip.enterInPool(initialStakingAmount); + + // Get total capital staked and pending + uint256 totalStaked = capitalAgent.totalCapitalStaked(); + uint256 totalPending = capitalAgent.getTotalPendingCapitalInUSDC(); + + // Ensure staked amount is greater than pending amount + assertGt(totalStaked, totalPending, "Staked amount should be greater than pending amount"); + + // Check if coverage is within MLR limits + bool canCover = capitalAgent.checkCoverageByMLR(coverageAmountTest); + + // Assert + assertTrue(canCover, "Should be able to cover this amount"); + + bool cannotCover = capitalAgent.checkCoverageByMLR(coverageAmountTest * 3); + + // Assert + assertFalse(cannotCover, "Should not be able to cover this amount"); + } + + // 8. Calculations and Conversions + function testTotalCapitalStakedCalculation() public { + // Deploy two new SSIPs + SingleSidedInsurancePool ssip1 = new SingleSidedInsurancePool(); + SingleSidedInsurancePool ssip2 = new SingleSidedInsurancePool(); + + ssip1.initialize(address(capitalAgent), multiSigWallet); + ssip2.initialize(address(capitalAgent), multiSigWallet); + // Whitelist the SSIP in CapitalAgent + vm.prank(multiSigWallet); + capitalAgent.addPoolWhiteList(address(ssip1)); // Whitelist the SSIP in CapitalAgent + vm.prank(multiSigWallet); + capitalAgent.addPoolWhiteList(address(ssip2)); + + // Create RiskPools for each SSIP + vm.prank(multiSigWallet); + ssip1.createRiskPool( + "Test Risk Pool 1", + "TRP1", + address(riskPoolFactory), + address(testToken), + 1e18 // reward multiplier + ); + vm.prank(multiSigWallet); + ssip2.createRiskPool( + "Test Risk Pool 2", + "TRP2", + address(riskPoolFactory), + address(usdcToken), + 1e18 // reward multiplier + ); + + // Setup staking amounts + uint256 amount1 = 1000 ether; + uint256 amount2 = 2000 * 10 ** 6; // Assuming USDC has 6 decimals + + // Simulate staking in both pools + vm.startPrank(user); + testToken.mint(amount1); + testToken.approve(address(ssip1), amount1); + ssip1.enterInPool(amount1); + + usdcToken.faucetToken(amount2); + usdcToken.approve(address(ssip2), amount2); + ssip2.enterInPool(amount2); + vm.stopPrank(); + + // Set pool capitals in CapitalAgent + vm.startPrank(multiSigWallet); + capitalAgent.setPoolCapital(address(ssip1), amount1); + capitalAgent.setPoolCapital(address(ssip2), amount2); + vm.stopPrank(); + + // Calculate expected total staked in USDC + uint256 amount1InUSDC = exchangeAgentContract.getTokenAmountForUSDC(address(testToken), amount1); + uint256 amount2InUSDC = amount2; // USDC amount is already in USDC + uint256 expectedTotalStaked = amount1InUSDC + amount2InUSDC; + + // Get actual total staked from CapitalAgent + uint256 actualTotalStaked = capitalAgent.totalCapitalStaked(); + + // Assert + assertEq(actualTotalStaked, expectedTotalStaked, "Total capital staked calculation is incorrect"); + + // Test adding more capital to an existing pool + uint256 additionalAmount = 500 ether; + vm.startPrank(user); + testToken.mint(additionalAmount); + testToken.approve(address(ssip1), additionalAmount); + ssip1.enterInPool(additionalAmount); + vm.stopPrank(); + + vm.prank(multiSigWallet); + capitalAgent.setPoolCapital(address(ssip1), amount1 + additionalAmount); + + // Recalculate expected total staked + amount1InUSDC = exchangeAgentContract.getTokenAmountForUSDC(address(testToken), amount1 + additionalAmount); + expectedTotalStaked = amount1InUSDC + amount2InUSDC; + + // Get updated actual total staked + actualTotalStaked = capitalAgent.totalCapitalStaked(); + + // Assert again + assertEq(actualTotalStaked, expectedTotalStaked, "Total capital staked calculation is incorrect after adding capital"); + + // Test removing a pool + vm.prank(multiSigWallet); + capitalAgent.removePool(address(ssip2)); + + // Recalculate expected total staked (only ssip1 should remain) + expectedTotalStaked = amount1InUSDC; + + // Get updated actual total staked + actualTotalStaked = capitalAgent.totalCapitalStaked(); + + // Assert one more time + assertEq(actualTotalStaked, expectedTotalStaked, "Total capital staked calculation is incorrect after removing a pool"); + } + + function testTokenToUSDCConversion() public { + MockUNO newToken = new MockUNO(); + MockUNO anotherToken = new MockUNO(); + + vm.startPrank(multiSigWallet); + priceOracle.setAssetEthPrice(address(newToken), 0.5 ether); + priceOracle.setAssetEthPrice(address(anotherToken), 0.25 ether); + vm.stopPrank(); + + mockEthUsdAggregator.updatePrice(2000 * 1e8); + + // Test NTK to USDC conversions + uint256[3] memory ntkAmounts = [uint256(1 ether), uint256(1000 ether), uint256(0.001 ether)]; + uint256[3] memory expectedUsdcAmounts = [uint256(1000000000000000), uint256(1000000000000000000), uint256(1000000000000)]; + + for (uint i = 0; i < 3; i++) { + uint256 actualUsdcAmount = exchangeAgentContract.getTokenAmountForUSDC(address(newToken), ntkAmounts[i]); + assertEq(actualUsdcAmount, expectedUsdcAmounts[i], "Incorrect USDC amount for NTK conversion"); + } + + // Test USDC to NTK conversion + uint256 usdcAmount = 1000000000000000; // 0.001 USDC (adjusted based on the conversion rate we observed) + uint256 expectedNtkAmount = 1000000000000; + uint256 actualNtkAmount = exchangeAgentContract.getNeededTokenAmount(address(usdcToken), address(newToken), usdcAmount); + assertEq(actualNtkAmount, expectedNtkAmount, "Incorrect NTK amount for USDC"); + + // Test conversion between non-stable tokens + uint256 ntkToConvert = 1 ether; + uint256 expectedAtkAmount = 2 ether; + uint256 actualAtkAmount = exchangeAgentContract.getNeededTokenAmount( + address(newToken), + address(anotherToken), + ntkToConvert + ); + assertEq(actualAtkAmount, expectedAtkAmount, "Incorrect ATK amount for 1 NTK"); + } + + function testTotalPendingCapitalCalculation() public { + // Deploy two new SSIPs + SingleSidedInsurancePool ssip1 = new SingleSidedInsurancePool(); + SingleSidedInsurancePool ssip2 = new SingleSidedInsurancePool(); + + ssip1.initialize(address(capitalAgent), multiSigWallet); + ssip2.initialize(address(capitalAgent), multiSigWallet); + + // Whitelist the SSIPs in CapitalAgent + vm.startPrank(multiSigWallet); + capitalAgent.addPoolWhiteList(address(ssip1)); + capitalAgent.addPoolWhiteList(address(ssip2)); + vm.stopPrank(); + + // Create RiskPools for each SSIP + vm.startPrank(multiSigWallet); + ssip1.createRiskPool( + "Test Risk Pool 1", + "TRP1", + address(riskPoolFactory), + address(testToken), + 1e18 // reward multiplier + ); + ssip2.createRiskPool( + "Test Risk Pool 2", + "TRP2", + address(riskPoolFactory), + address(usdcToken), + 1e18 // reward multiplier + ); + vm.stopPrank(); + + // Setup staking amounts + uint256 amount1 = 1000 ether; + uint256 amount2 = 2000 * 10 ** 6; // Assuming USDC has 6 decimals + + // Simulate staking in both pools + vm.startPrank(user); + testToken.mint(amount1); + testToken.approve(address(ssip1), amount1); + ssip1.enterInPool(amount1); + + usdcToken.faucetToken(amount2); + usdcToken.approve(address(ssip2), amount2); + ssip2.enterInPool(amount2); + vm.stopPrank(); + + // Set pool capitals in CapitalAgent + vm.startPrank(multiSigWallet); + capitalAgent.setPoolCapital(address(ssip1), amount1); + capitalAgent.setPoolCapital(address(ssip2), amount2); + vm.stopPrank(); + + // Advance time + vm.warp(block.timestamp + 1 days); + vm.roll(block.number + 1 * 7200); // Assuming ~7200 blocks per day + + // Request withdrawals from both pools + uint256 pendingAmount1 = 300 ether; + uint256 pendingAmount2 = 500 * 10 ** 6; + + vm.prank(user); + ssip1.leaveFromPoolInPending(pendingAmount1); + + vm.prank(user); + ssip2.leaveFromPoolInPending(pendingAmount2); + + // Calculate expected total pending capital in USDC + uint256 pendingAmount1InUSDC = exchangeAgentContract.getTokenAmountForUSDC(address(testToken), pendingAmount1); + uint256 pendingAmount2InUSDC = pendingAmount2; // USDC amount is already in USDC + uint256 expectedTotalPending = pendingAmount1InUSDC + pendingAmount2InUSDC; + + // Get actual total pending capital from CapitalAgent + uint256 actualTotalPending = capitalAgent.getTotalPendingCapitalInUSDC(); + + // Assert + assertEq(actualTotalPending, expectedTotalPending, "Total pending capital calculation is incorrect"); + + // Test completing withdrawal from one pool + vm.warp(block.timestamp + 11 days); + vm.roll(block.number + 11 * 7200); + + vm.prank(user); + ssip1.leaveFromPending(pendingAmount1); + + // Recalculate expected total pending + expectedTotalPending = pendingAmount2InUSDC; + + // Get updated actual total pending + actualTotalPending = capitalAgent.getTotalPendingCapitalInUSDC(); + + // Assert again + assertEq( + actualTotalPending, + expectedTotalPending, + "Total pending capital calculation is incorrect after completing withdrawal" + ); + + // Test removing a pool with pending withdrawals + vm.prank(multiSigWallet); + capitalAgent.removePool(address(ssip2)); + + // Expect total pending to be zero after removing all pools + expectedTotalPending = 0; + + // Get updated actual total pending + actualTotalPending = capitalAgent.getTotalPendingCapitalInUSDC(); + + // Assert one more time + assertEq(actualTotalPending, expectedTotalPending, "Total pending capital should be zero after removing all pools"); + } + + // 9. Event Emissions + function testLogAddPoolEvent() public { + address pool = address(0x5); + address currency = address(0x6); + + vm.prank(multiSigWallet); + vm.recordLogs(); + capitalAgent.addPoolByAdmin(pool, currency); + + Vm.Log[] memory entries = vm.getRecordedLogs(); + assertEq(entries.length, 1); + assertEq(entries[0].topics[0], keccak256("LogAddPool(address,address)")); + assertEq(entries[0].topics[1], bytes32(uint256(uint160(pool)))); + assertEq(abi.decode(entries[0].data, (address)), currency); + } + + function testLogRemovePoolEvent() public { + address pool = address(0x5); + address currency = address(0x6); + + vm.startPrank(multiSigWallet); + capitalAgent.addPoolByAdmin(pool, currency); + vm.expectEmit(true, false, false, true); + emit LogRemovePool(pool); + capitalAgent.removePool(pool); + vm.stopPrank(); + } + + function testLogSetPolicyEvent() public { + address policy = address(0x7); + + vm.prank(multiSigWallet); + vm.expectEmit(true, false, false, false); + emit LogSetPolicy(policy); + capitalAgent.setPolicyByAdmin(policy); + } + + function testLogRemovePolicyEvent() public { + address policy = address(0x7); + + vm.prank(salesPolicyFactory); + capitalAgent.setPolicy(policy); + + vm.prank(multiSigWallet); + // Prepare to check for event emission + vm.expectEmit(true, true, true, true); + emit LogRemovePolicy(policy); + // Action: Remove the policy + capitalAgent.removePolicy(); + } + + function testLogUpdatePoolCapitalEvent() public { + address pool = address(0x5); + address currency = address(0x6); + uint256 initialStakingAmount = 100 ether; + + vm.prank(multiSigWallet); + capitalAgent.addPoolByAdmin(pool, currency); + + vm.expectEmit(true, true, true, true); + emit LogUpdatePoolCapital(pool, initialStakingAmount, initialStakingAmount); + // Action: Simulate staking + vm.prank(pool); + capitalAgent.SSIPStaking(initialStakingAmount); + + (uint256 poolCapital, address poolCurrency, bool exists, ) = capitalAgent.getPoolInfo(pool); + assertEq(poolCapital, initialStakingAmount, "Pool capital not updated correctly"); + assertEq(currency, poolCurrency, "Pool currency mismatch"); + assertTrue(exists, "Pool should exist"); + + uint256 totalCapitalStaked = capitalAgent.totalCapitalStakedByCurrency(currency); + assertEq(totalCapitalStaked, initialStakingAmount, "Total capital staked not updated correctly"); + } + + function testLogSetMLREvent() public { + uint256 newMLR = 2 * 1e18; // 200% + + vm.expectEmit(true, true, true, true); + emit LogSetMLR(operator, address(capitalAgent), newMLR); + + vm.prank(operator); + capitalAgent.setMLR(newMLR); + assertEq(capitalAgent.MLR(), newMLR, "MLR not updated correctly"); + } + + function testLogSetExchangeAgentEvent() public { + address newExchangeAgent = address(0x123); + + vm.expectEmit(true, true, true, true); + emit LogSetExchangeAgent(multiSigWallet, address(capitalAgent), newExchangeAgent); + + vm.prank(multiSigWallet); + capitalAgent.setExchangeAgent(newExchangeAgent); + + assertEq(capitalAgent.exchangeAgent(), newExchangeAgent, "Exchange agent not updated correctly"); + } + + function testLogSetSalesPolicyFactoryEvent() public { + address newSalesPolicyFactory = address(0x123); + + vm.expectEmit(true, true, true, true); + emit LogSetSalesPolicyFactory(newSalesPolicyFactory); + + vm.prank(multiSigWallet); + capitalAgent.setSalesPolicyFactory(newSalesPolicyFactory); + + assertEq(capitalAgent.salesPolicyFactory(), newSalesPolicyFactory); + } + + function testLogAddPoolWhiteListEvent() public { + address poolToWhitelist = address(0x123); + + vm.expectEmit(true, true, true, true); + emit LogAddPoolWhiteList(poolToWhitelist); + + vm.prank(multiSigWallet); + capitalAgent.addPoolWhiteList(poolToWhitelist); + + assertTrue(capitalAgent.poolWhiteList(poolToWhitelist)); + } + + function testLogRemovePoolWhiteListEvent() public { + address poolToRemove = address(0x123); + + vm.prank(multiSigWallet); + capitalAgent.addPoolWhiteList(poolToRemove); + + vm.expectEmit(true, true, true, true); + emit LogRemovePoolWhiteList(poolToRemove); + + vm.prank(multiSigWallet); + capitalAgent.removePoolWhiteList(poolToRemove); + + assertFalse(capitalAgent.poolWhiteList(poolToRemove)); + } + + function testLogSetOperatorEvent() public { + address newOperator = address(0x456); + + vm.expectEmit(true, true, true, true); + emit LogSetOperator(newOperator); + + vm.prank(multiSigWallet); + capitalAgent.setOperator(newOperator); + + assertEq(capitalAgent.operator(), newOperator); + } + + function testLogSetUSDCEvent() public { + address newUSDCToken = address(0x789); + + vm.expectEmit(true, true, true, true); + emit LogSetUSDC(newUSDCToken); + + vm.prank(multiSigWallet); + capitalAgent.setUSDCToken(newUSDCToken); + + assertEq(capitalAgent.usdcToken(), newUSDCToken); + } + + function testLogUpdatePoolWithdrawPendingCapitalEvent() public { + address testPool = address(0xABC); + address testCurrency = address(0xDEF); + uint256 pendingAmount = 100 ether; + + vm.prank(multiSigWallet); + capitalAgent.addPoolByAdmin(testPool, testCurrency); + + vm.expectEmit(true, true, true, true); + emit LogupdatePoolWithdrawPendingCapital(testPool, pendingAmount); + + vm.prank(testPool); + capitalAgent.updatePoolWithdrawPendingCapital(testPool, pendingAmount, true); + + (, , , uint256 totalWithdrawPendingCapital) = capitalAgent.getPoolInfo(testPool); + assertEq(totalWithdrawPendingCapital, pendingAmount); + } + + // 10. Edge Cases and Boundary Testing + function testMaxUint256Values() public { + uint256 maxUint = type(uint256).max; + + // Test setting max MLR + vm.prank(operator); + capitalAgent.setMLR(maxUint); + assertEq(capitalAgent.MLR(), maxUint, "MLR should be set to max uint256"); + + // Test adding a pool with max capital + address mockPool = address(new SingleSidedInsurancePool()); + vm.prank(multiSigWallet); + capitalAgent.addPoolWhiteList(mockPool); + + vm.prank(mockPool); + capitalAgent.addPool(mockPool, address(testToken)); + + vm.prank(multiSigWallet); + capitalAgent.setPoolCapital(mockPool, maxUint); + + (uint256 poolCapital, , , ) = capitalAgent.getPoolInfo(mockPool); + assertEq(poolCapital, maxUint, "Pool capital should be set to max uint256"); + + // Test policy coverage with max value + address testPolicy = address( + salesPolicy = new SalesPolicy( + factory, + address(exchangeAgentContract), + premiumPool, + address(capitalAgent), + address(usdcToken) + ) + ); + vm.prank(multiSigWallet); + capitalAgent.setPolicyByAdmin(testPolicy); + + vm.prank(testPolicy); + vm.expectRevert(); + capitalAgent.policySale(maxUint); + + // Test max pending withdrawal + vm.prank(mockPool); + capitalAgent.updatePoolWithdrawPendingCapital(mockPool, maxUint, true); + + // Verify that the pending withdrawal was set to max + (, , , uint256 pendingWithdrawal) = capitalAgent.getPoolInfo(mockPool); + assertEq(pendingWithdrawal, maxUint, "Pending withdrawal should be set to max uint256"); + + // Test max staking amount + vm.prank(mockPool); + vm.expectRevert(); + capitalAgent.SSIPStaking(maxUint); + + // Test max withdrawal amount + vm.prank(mockPool); + vm.expectRevert(); + capitalAgent.SSIPWithdraw(maxUint); + } + + function testMinValues() public { + address user7 = address(0x56526); + + // Setup: Deploy a new SSIP with minimum stake + SingleSidedInsurancePool minSsip = new SingleSidedInsurancePool(); + minSsip.initialize(address(capitalAgent), multiSigWallet); + + // Whitelist the new SSIP + vm.prank(multiSigWallet); + capitalAgent.addPoolWhiteList(address(minSsip)); + + // Create RiskPool with minimum values + vm.prank(multiSigWallet); + minSsip.createRiskPool( + "Min Risk Pool", + "MRP", + address(riskPoolFactory), + address(testToken), + 1 // Minimum reward multiplier + ); + + // Stake minimum amount (1 wei) + uint256 minStake = 1; + vm.startPrank(user7); + testToken.mint(minStake); + testToken.approve(address(minSsip), minStake); + minSsip.enterInPool(minStake); + vm.stopPrank(); + + // Set minimum pool capital + vm.prank(multiSigWallet); + capitalAgent.setPoolCapital(address(minSsip), minStake); + + // Set minimum MLR (1 wei) + uint256 minMlr = 1; + vm.prank(operator); + capitalAgent.setMLR(minMlr); + + // Set policy + vm.prank(multiSigWallet); + capitalAgent.setPolicyByAdmin(address(salesPolicy)); + + // Stake more so withdrawl works + uint256 moreStake = 1500 ether; + vm.startPrank(user7); + testToken.mint(moreStake); + testToken.approve(address(minSsip), moreStake); + minSsip.enterInPool(moreStake); + vm.stopPrank(); + + // Test minimum withdrawal + vm.prank(user7); + minSsip.leaveFromPoolInPending(1); + + // Advance time to allow withdrawal + vm.warp(block.timestamp + 11 days); + vm.roll(block.number + 11 * 7200); + + vm.prank(user7); + minSsip.leaveFromPending(1); + + // Verify pool info after withdrawal + (, , , uint256 pendingCapital) = capitalAgent.getPoolInfo(address(minSsip)); + assertEq(pendingCapital, 0, "Pending capital should be 0 after withdrawal"); + + // Test removing pool with minimum values + vm.prank(multiSigWallet); + capitalAgent.removePool(address(minSsip)); + + // Verify pool no longer exists + (, , bool poolExists, ) = capitalAgent.getPoolInfo(address(minSsip)); + assertFalse(poolExists, "Pool should no longer exist"); + } + + function testZeroValueOnMLR() public { + uint256 invalidMLR = 0; + + vm.expectRevert("UnoRe: MLR cannot be zero"); + + vm.prank(operator); + capitalAgent.setMLR(invalidMLR); + } + + // 11. Integration Tests + function testExchangeAgentInteraction() public { + // Setup: Create a new token pair for testing + MockUNO newToken = new MockUNO(); + + // Set up mock price data + uint256 newTokenPrice = 2 ether; // 1 NTK = 2 USDC + vm.prank(multiSigWallet); + priceOracle.setAssetEthPrice(address(newToken), newTokenPrice); + + // Test getNeededTokenAmount function + uint256 usdcAmount = 100 ether; + uint256 expectedNewTokenAmount = 50 ether; // 100 USDC / 2 USDC per NTK = 50 NTK + + uint256 actualNewTokenAmount = exchangeAgentContract.getNeededTokenAmount( + address(testToken), + address(newToken), + usdcAmount + ); + + assertEq(actualNewTokenAmount, expectedNewTokenAmount, "Incorrect token conversion amount"); + + // Test edge cases + vm.expectRevert("PO: Prices of both tokens should be set"); + exchangeAgentContract.getNeededTokenAmount(address(testToken), address(0x1234), usdcAmount); + + uint256 zeroAmount = exchangeAgentContract.getNeededTokenAmount(address(testToken), address(newToken), 0); + assertEq(zeroAmount, 0); + + // Test with very large amounts + uint256 largeAmount = 100000 ether; + + uint256 convertedLargeAmount = exchangeAgentContract.getNeededTokenAmount( + address(testToken), + address(newToken), + largeAmount + ); + assertLt(convertedLargeAmount, largeAmount, "Large amount conversion failed"); + } + + function testSSIPInteraction() public { + uint256 initialStake = 1000 ether; + uint256 additionalStake = 500 ether; + uint256 unstakeAmount = 200 ether; + + // Setup: Mint tokens for the user + vm.startPrank(user); + testToken.mint(initialStake + additionalStake); + testToken.approve(address(ssip), initialStake + additionalStake); + vm.stopPrank(); + + // Test 1: Initial staking + vm.prank(user); + ssip.enterInPool(initialStake); + + // Verify pool capital update in CapitalAgent + (uint256 poolCapital, , , ) = capitalAgent.getPoolInfo(address(ssip)); + assertEq(poolCapital, initialStake, "Pool capital should match initial stake"); + + // Test 2: Additional staking + vm.prank(user); + ssip.enterInPool(additionalStake); + + // Verify pool capital update after additional stake + (poolCapital, , , ) = capitalAgent.getPoolInfo(address(ssip)); + assertEq(poolCapital, initialStake + additionalStake, "Pool capital should match total staked amount"); + + // Test 3: Unstaking (pending withdrawal) + vm.prank(user); + ssip.leaveFromPoolInPending(unstakeAmount); + + // Verify pending withdrawal in CapitalAgent + uint256 pendingWithdrawal = capitalAgent.getTotalPendingCapitalInUSDC(); + assertEq(pendingWithdrawal, unstakeAmount, "Pending withdrawal should match unstake amount"); + + // Test 4: Completing withdrawal after waiting period + // Simulate time passing + vm.warp(block.timestamp + 10 days); + vm.roll(block.number + (7200 * 10)); // Assuming 7200 blocks per day + + vm.prank(user); + ssip.leaveFromPending(unstakeAmount); + + // Verify pool capital and pending withdrawal updates + (poolCapital, , , ) = capitalAgent.getPoolInfo(address(ssip)); + assertEq(poolCapital, initialStake + additionalStake - unstakeAmount, "Pool capital should be reduced after withdrawal"); + + pendingWithdrawal = capitalAgent.getTotalPendingCapitalInUSDC(); + assertEq(pendingWithdrawal, 0, "Pending withdrawal should be zero after completing withdrawal"); + + // Test 5: Attempt to unstake more than staked amount + uint256 excessiveUnstake = initialStake + additionalStake; + vm.prank(user); + vm.expectRevert(); // The exact error message might vary + ssip.leaveFromPoolInPending(excessiveUnstake); + + // Test 6: Verify SSIP balance matches CapitalAgent's record + uint256 ssipBalance = testToken.balanceOf(ssip.riskPool()); + (poolCapital, , , ) = capitalAgent.getPoolInfo(address(ssip)); + assertEq(ssipBalance, poolCapital, "SSIP balance should match CapitalAgent's pool capital record"); + + // Test 7: Update pool capital directly (admin function) + uint256 newCapital = 2000 ether; + vm.prank(multiSigWallet); + capitalAgent.setPoolCapital(address(ssip), newCapital); + + (poolCapital, , , ) = capitalAgent.getPoolInfo(address(ssip)); + assertEq(poolCapital, newCapital, "Pool capital should match new capital set by admin"); + + // Test 8: Verify total capital staked across all pools + uint256 totalCapital = capitalAgent.totalCapitalStaked(); + assertEq(totalCapital, newCapital, "Total capital staked should match the new capital of the single pool"); + } + + // 12. Upgradeability + function testUpgradeContract() public { + // TODO: Verify contract can be upgraded without loss of state + } + + function testAddNewFunctionInUpgrade() public { + // TODO: Verify new functions can be added in upgraded version + } + + // 13. Gas Optimization + function testGasUsage() public { + // TODO: Measure gas usage for all external functions + } + + // 14. Reentrancy Protection + function testReentrancyProtection() public { + // TODO: Verify nonReentrant modifier prevents reentrancy attacks on vulnerable functions + } +} diff --git a/test/UnoV3/PremiumPoolAndSalesPolicyTest.t.sol b/test/UnoV3/PremiumPoolAndSalesPolicyTest.t.sol new file mode 100644 index 0000000..24352b8 --- /dev/null +++ b/test/UnoV3/PremiumPoolAndSalesPolicyTest.t.sol @@ -0,0 +1,1357 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.23; + +import "lib/forge-std/src/Test.sol"; +import "../../contracts/PremiumPool.sol"; +import "../../contracts/SalesPolicy.sol"; +import "../../contracts/CapitalAgent.sol"; +import "../../contracts/Mocks/MockUNO.sol"; +import "../../contracts/ExchangeAgent.sol"; +import "../../contracts/Mocks/MockUSDC.sol"; +import "../../contracts/Mocks/OraclePriceFeed.sol"; +import "../../contracts/interfaces/ICapitalAgent.sol"; +import "../../contracts/SingleSidedInsurancePool.sol"; +import "../../contracts/interfaces/IExchangeAgent.sol"; +import "../../contracts/factories/RiskPoolFactory.sol"; +import "../../contracts/factories/SalesPolicyFactory.sol"; +import "../../contracts/Mocks/MockChainLinkAggregator.sol"; +import "../../contracts/interfaces/ISalesPolicyFactory.sol"; + +contract PremiumPoolAndSalesPolicyTest is Test { + MockUNO public unoToken; + MockUSDC public usdcToken; + PriceOracle public priceOracle; + SalesPolicy public salesPolicy; + PremiumPool public premiumPool; + CapitalAgent public capitalAgent; + SalesPolicyFactory public factory; + SingleSidedInsurancePool public ssip; + RiskPoolFactory public riskPoolFactory; + MockUniswapPair public mockUniswapPair; + ExchangeAgent public exchangeAgentContract; + MockUniswapFactory public mockUniswapFactory; + MockUniswapRouter public uniswapRouterAddress; + MockChainLinkAggregator public mockEthUsdAggregator; + + address public operator; + address public governance; + address public wethAddress; + uint256 public swapDeadline; + address public exchangeAgent; + address public multiSigWallet; + address public uniswapFactoryAddress; + address public oraclePriceFeedAddress; + bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); + + struct PolicyParams { + address[] assets; + address[] protocols; + uint256[] coverageAmounts; + uint256[] coverageDurations; + uint256 policyPriceInUSDC; + uint256 signedTime; + address premiumCurrency; + } + + event LogSetProtocolURIInPolicy(address indexed , string ); + event LogSetBuyPolicyMaxDeadlineInPolicy(uint256, address indexed); + event LogSetExchangeAgentInPolicy(address indexed, address indexed); + + event KillPool(address indexed , bool ); + event LogAddWhiteList(address indexed , address indexed ); + event LogRemoveCurrency(address indexed , address indexed ); + event LogRemoveWhiteList(address indexed , address indexed ); + event LogMaxApproveCurrency(address indexed , address indexed , address indexed ); + event LogMaxDestroyCurrencyAllowance(address indexed , address indexed , address indexed ); + + function setUp() public { + multiSigWallet = address(0x1); + governance = address(0x2); + operator = address(0x4); + + usdcToken = new MockUSDC(); + unoToken = new MockUNO(); + /////////// ORACLE CONFIGURATION /////////// + mockEthUsdAggregator = new MockChainLinkAggregator(1 * 1e8, 8); // $2000 per ETH, 8 decimals + priceOracle = new PriceOracle(multiSigWallet); + + vm.prank(multiSigWallet); + priceOracle.setETHUSDAggregator(address(mockEthUsdAggregator)); + + vm.startPrank(multiSigWallet); + priceOracle.setAssetEthPrice(address(unoToken), 1e18); // 1:1 with ETH + priceOracle.addStableCoin(address(usdcToken)); + vm.stopPrank(); + /////////// END OF ORACLE CONFIGURATION /////////// + + /////////// START OF EXCHANGE AGENT CONFIGURATION /////////// + + wethAddress = address(0x4321); + MockUniswapRouter uniswapRouterAddress = new MockUniswapRouter(); + swapDeadline = 1800; // 30 minutes, adjust as needed + + // Deploy mock Uniswap contracts + mockUniswapFactory = new MockUniswapFactory(); + mockUniswapPair = new MockUniswapPair(address(usdcToken), address(unoToken)); + + // Configure the mock factory to return our mock pair + mockUniswapFactory.setPair(address(usdcToken), address(unoToken), address(mockUniswapPair)); + + exchangeAgentContract = new ExchangeAgent( + address(usdcToken), + wethAddress, + address(priceOracle), + address(uniswapRouterAddress), + address(mockUniswapFactory), + multiSigWallet, + swapDeadline + ); + + exchangeAgent = address(exchangeAgentContract); + + // Add liquidity to the mock pair + vm.startPrank(address(mockUniswapPair)); + usdcToken.faucetToken(1000000 ether); + unoToken.mint(1000000 ether); + mockUniswapPair.sync(); + vm.stopPrank(); + /////////// END OF EXCHANGE AGENT CONFIGURATION /////////// + + /////////// CAPITAL AGENT CONFIGURATION /////////// + vm.startPrank(multiSigWallet); + capitalAgent = new CapitalAgent(); + capitalAgent.initialize(exchangeAgent, address(usdcToken), multiSigWallet, operator); + + ssip = new SingleSidedInsurancePool(); + ssip.initialize(address(capitalAgent), multiSigWallet); + + riskPoolFactory = new RiskPoolFactory(); + + capitalAgent.addPoolWhiteList(address(ssip)); + + ssip.createRiskPool( + "Test Risk Pool", + "TRP", + address(riskPoolFactory), + address(unoToken), + 1e18 // reward multiplier + ); + + uint256 stakingStartTime = block.timestamp + 1 hours; + ssip.setStakingStartTime(block.timestamp); + vm.warp(stakingStartTime); + vm.stopPrank(); + /////////// END OF CAPITAL AGENT CONFIGURATION /////////// + + /////////// PREMIUM POOL CONFIGURATION /////////// + vm.prank(multiSigWallet); + premiumPool = new PremiumPool( + exchangeAgent, + address(unoToken), + address(usdcToken), + multiSigWallet, + governance + ); + + vm.prank(multiSigWallet); + premiumPool.addCurrency(address(usdcToken)); + + bytes32 PAUSER_ROLE = 0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775; + vm.prank(multiSigWallet); + premiumPool.grantRole(PAUSER_ROLE, governance); + + vm.prank(multiSigWallet); + factory = new SalesPolicyFactory( + address(usdcToken), + address(exchangeAgent), + address(premiumPool), + address(capitalAgent), + multiSigWallet + ); + /////////// END OF PREMIUM POOL CONFIGURATION /////////// + + /////////// SalesPolicy CONFIGURATION /////////// + salesPolicy = new SalesPolicy( + address(factory), + exchangeAgent, + address(premiumPool), + address(capitalAgent), + address(usdcToken) + ); + + vm.prank(multiSigWallet); + capitalAgent.setSalesPolicyFactory(address(factory)); + + vm.prank(address(factory)); + capitalAgent.setPolicy(address(salesPolicy)); + + vm.startPrank(multiSigWallet); + premiumPool.addWhiteList(address(salesPolicy)); + vm.stopPrank(); + /////////// END OF SALES POLICY CONFIGURATION /////////// + } + + // PremiumPool Tests + function testPausePool() public { + uint256 initialAmount = 1000 ether; + uint256 additionalAmount = 500 ether; + uint256 withdrawAmount = 200 ether; + address user = address(0x1234); + + vm.prank(multiSigWallet); + premiumPool.addWhiteList(address(user)); + + vm.startPrank(user); + //mints and approves token spending + usdcToken.faucetToken(initialAmount + additionalAmount); + usdcToken.approve(address(premiumPool), initialAmount + additionalAmount); + // User deposits initial amount + premiumPool.collectPremium(address(usdcToken),initialAmount); + vm.stopPrank(); + + // Check initial state + assertFalse(premiumPool.paused(), "Pool should not be paused initially"); + + // Try to pause the pool as a non-admin (should fail) + vm.prank(user); + vm.expectRevert(abi.encodeWithSelector(0xe2517d3f, address(user), ADMIN_ROLE)); //OpenZeppelin is using AccessControl for error handling + premiumPool.pausePool(); + + // Pause the pool as ADMIN + vm.prank(multiSigWallet); + premiumPool.pausePool(); + assertTrue(premiumPool.paused(), "Pool should be paused"); + + // Try to deposit while paused (should fail) + vm.expectRevert(abi.encodeWithSelector(0xd93c0665)); //OpenZeppelin is using AccessControl for error handling + vm.prank(user); + premiumPool.collectPremium(address(usdcToken),additionalAmount); + + // Try to withdraw while paused (should fail) + vm.prank(governance); + vm.expectRevert(abi.encodeWithSelector(0xd93c0665)); //OpenZeppelin is using AccessControl for error handling + premiumPool.withdrawPremium(address(usdcToken),msg.sender,withdrawAmount); + + // Unpause the pool as ADMIN + vm.prank(multiSigWallet); + premiumPool.unpausePool(); + + // Check if the pool is unpaused + assertFalse(premiumPool.paused(), "Pool should be unpaused"); + + // Deposit additional amount (should succeed now) + vm.prank(user); + premiumPool.collectPremium(address(usdcToken),additionalAmount); + + // Withdraw some amount (should succeed now) + vm.prank(governance); + premiumPool.withdrawPremium(address(usdcToken),msg.sender,withdrawAmount); + + // Verify final balances + uint256 expectedBalance = initialAmount + additionalAmount - withdrawAmount; + assertEq(usdcToken.balanceOf(address(premiumPool)), expectedBalance, "Final pool balance incorrect"); + } + + function testKillPool() public { + uint256 initialAmount = 1000 ether; + address user = address(0x1234); + + // Setup: Add user to whitelist and let them deposit some funds + vm.prank(multiSigWallet); + premiumPool.addWhiteList(user); + + vm.startPrank(user); + usdcToken.faucetToken(initialAmount); + usdcToken.approve(address(premiumPool), initialAmount); + premiumPool.collectPremium(address(usdcToken), initialAmount); + vm.stopPrank(); + + // Verify initial state + assertFalse(premiumPool.killed(), "Pool should not be killed initially"); + + // Try to kill the pool as a non-admin (should fail) + vm.prank(user); + vm.expectRevert(abi.encodeWithSelector(0xe2517d3f, address(user), ADMIN_ROLE)); + premiumPool.killPool(); + + // Kill the pool as admin + vm.prank(multiSigWallet); + premiumPool.killPool(); + + // Verify the pool is killed + assertTrue(premiumPool.killed(), "Pool should be killed"); + + // Try to deposit while killed (should succeed, as the contract doesn't prevent this) + vm.startPrank(user); + usdcToken.faucetToken(initialAmount); + usdcToken.approve(address(premiumPool), initialAmount); + premiumPool.collectPremium(address(usdcToken), initialAmount); + vm.stopPrank(); + + // Verify the deposit was successful + assertEq(usdcToken.balanceOf(address(premiumPool)), initialAmount * 2, "Deposit should succeed even when pool is killed"); + + // Try to withdraw while killed (should fail) + vm.prank(governance); + vm.expectRevert("UnoRe: pool is killed"); + premiumPool.withdrawPremium(address(usdcToken), governance, initialAmount); + + // Verify that pausing/unpausing has no effect when killed + vm.prank(multiSigWallet); + premiumPool.pausePool(); + + vm.prank(multiSigWallet); + premiumPool.unpausePool(); + } + + function testRevivePool() public { + address user = address(0x1234); + // First, kill the pool + vm.prank(multiSigWallet); + premiumPool.killPool(); + + assertTrue(premiumPool.killed(), "Pool should be killed"); + + // Try to revive the pool as a non-admin (should fail) + vm.prank(user); + vm.expectRevert(abi.encodeWithSelector(0xe2517d3f, address(user), ADMIN_ROLE)); + premiumPool.revivePool(); + + // Revive the pool as admin + vm.prank(multiSigWallet); + premiumPool.revivePool(); + + // Verify the pool is revived + assertFalse(premiumPool.killed(), "Pool should be revived"); + + // Verify that normal operations can resume + uint256 depositAmount = 1000 ether; + + vm.prank(multiSigWallet); + premiumPool.addWhiteList(user); + + vm.startPrank(user); + usdcToken.faucetToken(depositAmount); + usdcToken.approve(address(premiumPool), depositAmount); + premiumPool.collectPremium(address(usdcToken), depositAmount); + vm.stopPrank(); + + // Verify the deposit was successful + assertEq(usdcToken.balanceOf(address(premiumPool)), depositAmount, "Deposit should be successful after revival"); + + // Verify that pausing/unpausing works again + vm.prank(multiSigWallet); + premiumPool.pausePool(); + assertTrue(premiumPool.paused(), "Pool should be pausable after revival"); + + vm.prank(multiSigWallet); + premiumPool.unpausePool(); + assertFalse(premiumPool.paused(), "Pool should be unpausable after revival"); + } + + function testCollectPremiumInETH() public { + uint256 premiumAmount = 1 ether; + address user = address(0x1234); + + // Setup: Add user to whitelist + vm.prank(multiSigWallet); + premiumPool.addWhiteList(user); + + // Record initial balances + uint256 initialPoolBalance = address(premiumPool).balance; + uint256 initialUserBalance = user.balance; + + // User collects premium in ETH + vm.deal(user, premiumAmount); + vm.prank(user); + premiumPool.collectPremiumInETH{value: premiumAmount}(); + + // Verify balances after collection + assertEq(address(premiumPool).balance, initialPoolBalance + premiumAmount, "Pool balance should increase by premium amount"); + assertEq(user.balance, initialUserBalance, "User balance should be zero after sending ETH"); + + // Try to collect with insufficient ETH (should fail) + vm.prank(user); + vm.expectRevert(); + premiumPool.collectPremiumInETH{value: 0.5 ether}(); + + // Try to collect as non-whitelisted user (should fail) + address nonWhitelistedUser = address(0x5678); + vm.deal(nonWhitelistedUser, premiumAmount); + vm.prank(nonWhitelistedUser); + vm.expectRevert("UnoRe: not white list address"); + premiumPool.collectPremiumInETH{value: premiumAmount}(); + } + + function testCollectPremium() public { + uint256 premiumAmount = 1 ether; + address user = address(0x1234); + + // Setup: Add user to whitelist + vm.prank(multiSigWallet); + premiumPool.addWhiteList(user); + // Mint tokens to the user + vm.prank(user); + usdcToken.faucetToken(premiumAmount); + + // Record initial balances + uint256 initialPoolBalance = usdcToken.balanceOf(address(premiumPool)); + uint256 initialUserBalance = usdcToken.balanceOf(user); + + // Approve and collect premium + vm.startPrank(user); + usdcToken.approve(address(premiumPool), premiumAmount); + premiumPool.collectPremium(address(usdcToken), premiumAmount); + vm.stopPrank(); + + // Verify balances after collection + assertEq(usdcToken.balanceOf(address(premiumPool)), initialPoolBalance + premiumAmount, "Pool balance should increase by premium amount"); + assertEq(usdcToken.balanceOf(user), initialUserBalance - premiumAmount, "User balance should decrease by premium amount"); + + + // Try to collect with insufficient balance (should fail) + vm.prank(user); + vm.expectRevert("UnoRe: premium balance overflow"); + premiumPool.collectPremium(address(usdcToken), premiumAmount); + + // Try to collect as non-whitelisted user (should fail) + address nonWhitelistedUser = address(0x5678); + vm.prank(nonWhitelistedUser); + usdcToken.faucetToken( premiumAmount); + vm.startPrank(nonWhitelistedUser); + usdcToken.approve(address(premiumPool), premiumAmount); + vm.expectRevert("UnoRe: not white list address"); + premiumPool.collectPremium(address(usdcToken), premiumAmount); + vm.stopPrank(); + + // Try to collect with non-allowed currency (should fail) + MockUNO nonAllowedToken = new MockUNO(); + vm.startPrank(user); + nonAllowedToken.mint(premiumAmount); + nonAllowedToken.approve(address(premiumPool), premiumAmount); + vm.expectRevert("UnoRe: not allowed currency"); + premiumPool.collectPremium(address(nonAllowedToken), premiumAmount); + vm.stopPrank(); + } + + function testDepositToSyntheticSSRPRewarder() public { + // TODO: VERIFY IF THIS IS NECESSARY Implement test for depositToSyntheticSSRPRewarder function + } + + function testDepositToSyntheticSSIPRewarder() public { + // TODO: VERIFY IF THIS IS NECESSARY Implement test for depositToSyntheticSSIPRewarder function + } + + function testBuyBackAndBurn() public { + address user = address(0x1234); + uint256 initialDeposit = 1000 ether; + address burnAddress = address(0x000000000000000000000000000000000000dEaD); + // Setup: Add user to whitelist and let them deposit some funds + vm.prank(multiSigWallet); + premiumPool.addWhiteList(user); + + vm.startPrank(user); + usdcToken.faucetToken(initialDeposit); + usdcToken.approve(address(premiumPool), initialDeposit); + premiumPool.collectPremium(address(usdcToken), initialDeposit); + vm.stopPrank(); + + // Get the correct Uniswap router address from the ExchangeAgent + address correctUniswapRouterAddress = exchangeAgentContract.UNISWAP_ROUTER_V3(); + + // Ensure MockUniswapRouter has enough UNO tokens for the swap + vm.startPrank(address(correctUniswapRouterAddress)); + unoToken.mint(1000000 ether); + vm.stopPrank(); + + // Add PremiumPool to ExchangeAgent's whitelist + vm.prank(multiSigWallet); + exchangeAgentContract.addWhiteList(address(premiumPool)); + + // Ensure ExchangeAgent has enough tokens for the swap + vm.startPrank(address(exchangeAgent)); + usdcToken.faucetToken(1000000 ether); + unoToken.mint(1000000 ether); + + // Approve the correct Uniswap router to spend tokens + usdcToken.approve(correctUniswapRouterAddress, type(uint256).max); + unoToken.approve(correctUniswapRouterAddress, type(uint256).max); + vm.stopPrank(); + + uint256 initialPoolUSDCBalance = usdcToken.balanceOf(address(premiumPool)); + uint256 initialPoolUNOBalance = unoToken.balanceOf(address(premiumPool)); + uint256 initialUNOTotalSupply = unoToken.balanceOf(address(burnAddress)); + + // Ensure the test contract has enough USDC for the conversion + usdcToken.faucetToken(1000000 ether); + + // Approve ExchangeAgent to spend USDC + usdcToken.approve(address(exchangeAgentContract), type(uint256).max); + + // Test conversion + uint256 testConvertAmount = 1000 ether; + uint256 convertedUNO = exchangeAgentContract.convertForToken(address(usdcToken), address(unoToken), testConvertAmount); + console.log("Test conversion: 1000 USDC to UNO:", convertedUNO); + + vm.prank(governance); + premiumPool.buyBackAndBurn(); + + uint256 finalPoolUSDCBalance = usdcToken.balanceOf(address(premiumPool)); + uint256 finalPoolUNOBalance = unoToken.balanceOf(address(premiumPool)); + uint256 finalUNOTotalSupply = unoToken.balanceOf(address(burnAddress)); + + assertLt( + finalPoolUSDCBalance, + initialPoolUSDCBalance, + "Pool USDC balance should decrease" + ); + assertEq( + finalPoolUNOBalance, + initialPoolUNOBalance, + "Pool UNO balance should remain the same" + ); + assertEq( + finalUNOTotalSupply, + initialUNOTotalSupply + finalUNOTotalSupply - initialPoolUNOBalance, + "UNO total supply should decrease" + ); + + // Test 2: Attempt to buy back as non-governance address + vm.prank(user); + vm.expectRevert(); + premiumPool.buyBackAndBurn(); + } + + function testWithdrawPremium() public { + address user = address(0x1234); + address governance = address(0x5678); + uint256 initialDeposit = 1000 ether; + uint256 withdrawAmount = 500 ether; + + // Setup: Add user to whitelist and let them deposit some funds + vm.prank(multiSigWallet); + premiumPool.addWhiteList(user); + + vm.startPrank(user); + usdcToken.faucetToken(initialDeposit); + usdcToken.approve(address(premiumPool), initialDeposit); + premiumPool.collectPremium(address(usdcToken), initialDeposit); + vm.stopPrank(); + + // Grant GOVERNANCE_ROLE to the governance address + bytes32 GOVERNANCE_ROLE = keccak256("GOVERNANCE_ROLE"); + vm.prank(multiSigWallet); + premiumPool.grantRole(GOVERNANCE_ROLE, governance); + + // Record initial balances + uint256 initialPoolBalance = usdcToken.balanceOf(address(premiumPool)); + uint256 initialGovernanceBalance = usdcToken.balanceOf(governance); + + // Test 1: Successful withdrawal + vm.prank(governance); + premiumPool.withdrawPremium(address(usdcToken), governance, withdrawAmount); + + assertEq( + usdcToken.balanceOf(address(premiumPool)), + initialPoolBalance - withdrawAmount, + "Pool balance should decrease by withdrawal amount" + ); + assertEq( + usdcToken.balanceOf(governance), + initialGovernanceBalance + withdrawAmount, + "Governance balance should increase by withdrawal amount" + ); + + // Test 2: Attempt to withdraw more than available + vm.prank(governance); + vm.expectRevert("UnoRe: Insufficient Premium"); + premiumPool.withdrawPremium(address(usdcToken), governance, initialDeposit); + + // Test 3: Attempt to withdraw as non-governance address + vm.prank(user); + vm.expectRevert(); + premiumPool.withdrawPremium(address(usdcToken), user, withdrawAmount); + + // Test 4: Attempt to withdraw non-allowed currency + MockUNO nonAllowedToken = new MockUNO(); + vm.prank(governance); + vm.expectRevert("UnoRe: Insufficient Premium"); + premiumPool.withdrawPremium(address(nonAllowedToken), governance, withdrawAmount); + + // Test 5: Withdraw to a different address + address recipient = address(0x9ABC); + uint256 initialRecipientBalance = usdcToken.balanceOf(recipient); + + vm.prank(governance); + premiumPool.withdrawPremium(address(usdcToken), recipient, withdrawAmount); + + assertEq( + usdcToken.balanceOf(recipient), + initialRecipientBalance + withdrawAmount, + "Recipient balance should increase by withdrawal amount" + ); + + // Test 6: Withdraw when pool is paused (should fail) + vm.prank(multiSigWallet); + premiumPool.pausePool(); + + vm.prank(governance); + vm.expectRevert(); + premiumPool.withdrawPremium(address(usdcToken), governance, withdrawAmount); + + // Unpause the pool + vm.prank(multiSigWallet); + premiumPool.unpausePool(); + + // Test 7: Withdraw when pool is killed (should fail) + vm.prank(multiSigWallet); + premiumPool.killPool(); + + vm.prank(governance); + vm.expectRevert("UnoRe: pool is killed"); + premiumPool.withdrawPremium(address(usdcToken), governance, withdrawAmount); + } + + function testAddCurrency() public { + MockUNO newCurrency = new MockUNO(); + + vm.prank(multiSigWallet); + premiumPool.addCurrency(address(newCurrency)); + + assertEq(premiumPool.availableCurrencies(address(newCurrency)),true); + + vm.prank(address(0x5678)); + vm.expectRevert(abi.encodeWithSelector(0xe2517d3f, address(0x5678), ADMIN_ROLE)); //OpenZeppelin is using AccessControl for error handling + premiumPool.addCurrency(address(newCurrency)); + } + + function testRemoveCurrency() public { + address currencyToRemove = address(usdcToken); + + vm.expectEmit(true, true, true, true); + emit LogRemoveCurrency(address(premiumPool), currencyToRemove); + + vm.prank(multiSigWallet); + premiumPool.removeCurrency(currencyToRemove); + + vm.prank(address(0x5678)); + vm.expectRevert(abi.encodeWithSelector(0xe2517d3f, address(0x5678), ADMIN_ROLE)); //OpenZeppelin is using AccessControl for error handling + premiumPool.removeCurrency(currencyToRemove); + } + + function testMaxApproveCurrency() public { + address currencyToApprove = address(usdcToken); + address spender = address(0x1234); + + vm.expectEmit(true, true, true, true); + emit LogMaxApproveCurrency(address(premiumPool), currencyToApprove, spender); + + vm.prank(multiSigWallet); + premiumPool.maxApproveCurrency(currencyToApprove, spender); + + assertEq(IERC20(currencyToApprove).allowance(address(premiumPool), spender), type(uint256).max, "Allowance should be set to max"); + + vm.prank(address(0x5678)); + vm.expectRevert(abi.encodeWithSelector(0xe2517d3f, address(0x5678), ADMIN_ROLE)); //OpenZeppelin is using AccessControl for error handling + premiumPool.maxApproveCurrency(currencyToApprove, spender); + } + + function testDestroyCurrencyAllowance() public { + address currencyToDestroy = address(usdcToken); + address spender = address(0x1234); + + // First, set max allowance + vm.prank(multiSigWallet); + premiumPool.maxApproveCurrency(currencyToDestroy, spender); + + vm.expectEmit(true, true, true, true); + emit LogMaxDestroyCurrencyAllowance(address(premiumPool), currencyToDestroy, spender); + + vm.prank(multiSigWallet); + premiumPool.destroyCurrencyAllowance(currencyToDestroy, spender); + + assertEq(IERC20(currencyToDestroy).allowance(address(premiumPool), spender), 0, "Allowance should be destroyed"); + + vm.prank(address(0x5678)); + vm.expectRevert(abi.encodeWithSelector(0xe2517d3f, address(0x5678), ADMIN_ROLE)); //OpenZeppelin is using AccessControl for error handling + premiumPool.destroyCurrencyAllowance(currencyToDestroy, spender); + } + + function testAddWhiteList() public { + address newWhitelistedAddress = address(0x1234); + + vm.expectEmit(true, true, true, true); + emit LogAddWhiteList(address(premiumPool), newWhitelistedAddress); + + vm.prank(multiSigWallet); + premiumPool.addWhiteList(newWhitelistedAddress); + + assertEq(premiumPool.whiteList(newWhitelistedAddress),true); + + vm.prank(address(0x5678)); + vm.expectRevert(abi.encodeWithSelector(0xe2517d3f, address(0x5678), ADMIN_ROLE)); //OpenZeppelin is using AccessControl for error handling + premiumPool.addWhiteList(newWhitelistedAddress); + } + + function testRemoveWhiteList() public { + address addressToRemove = address(0x1234); + + // First, add the address to whitelist + vm.prank(multiSigWallet); + premiumPool.addWhiteList(addressToRemove); + + vm.expectEmit(true, true, true, true); + emit LogRemoveWhiteList(address(premiumPool), addressToRemove); + + vm.prank(multiSigWallet); + premiumPool.removeWhiteList(addressToRemove); + + assertEq(premiumPool.whiteList(addressToRemove),false); + + vm.prank(address(0x5678)); + vm.expectRevert(abi.encodeWithSelector(0xe2517d3f, address(0x5678), ADMIN_ROLE)); //OpenZeppelin is using AccessControl for error handling + premiumPool.removeWhiteList(addressToRemove); + } + + function testGrantRole() public { + bytes32 role = keccak256("ADMIN_ROLE"); + address account = address(0x1234); + + vm.prank(multiSigWallet); + premiumPool.grantRole(role, account); + + assertTrue(premiumPool.hasRole(role, account), "Account should have the role"); + + vm.prank(address(0x5678)); + vm.expectRevert(abi.encodeWithSelector(0xe2517d3f, address(0x5678), ADMIN_ROLE)); //OpenZeppelin is using AccessControl for error handling + premiumPool.grantRole(role, account); + } + + // SalesPolicy Tests + + function testKillPoolSalesPolicy() public { + // Ensure the pool is not paused initially + assertFalse(salesPolicy.paused(), "Pool should not be paused initially"); + + // Try to kill the pool as a non-factory address (should fail) + vm.prank(address(0x1234)); + vm.expectRevert("UnoRe: SalesPolicy Forbidden"); + salesPolicy.killPool(); + + // Kill the pool as the factory + vm.prank(address(salesPolicy.factory())); + salesPolicy.killPool(); + + // Verify the pool is paused (killed) + assertTrue(salesPolicy.paused(), "Pool should be paused (killed)"); + + // Try to perform operations that should be restricted when the pool is killed + + // For example, try to buy a policy (this should fail when the pool is killed) + address buyer = address(0x5678); + address[] memory assets = new address[](1); + assets[0] = address(0x1111); + address[] memory protocols = new address[](1); + protocols[0] = address(0x2222); + uint256[] memory coverageAmounts = new uint256[](1); + coverageAmounts[0] = 10 ether; + uint256[] memory coverageDurations = new uint256[](1); + coverageDurations[0] = 30 days; + uint256 policyPriceInUSDC = 1 ether; + uint256 signedTime = block.timestamp; + address premiumCurrency = address(0); // ETH + bytes32 r = 0x0; + bytes32 s = 0x0; + uint8 v = 27; + uint256 nonce = 0; + + vm.deal(buyer, 2 ether); + + vm.prank(buyer); + vm.expectRevert(abi.encodeWithSelector(0xd93c0665)); + salesPolicy.buyPolicy{value: 1 ether}( + assets, + protocols, + coverageAmounts, + coverageDurations, + policyPriceInUSDC, + signedTime, + premiumCurrency, + r, + s, + v, + nonce + ); + + // Try to revive the pool as a non-factory address (should fail) + vm.prank(address(0x1234)); + vm.expectRevert("UnoRe: SalesPolicy Forbidden"); + salesPolicy.revivePool(); + + // Revive the pool as the factory + vm.prank(address(salesPolicy.factory())); + salesPolicy.revivePool(); + + // Verify the pool is not paused (revived) + assertFalse(salesPolicy.paused(), "Pool should not be paused (revived)"); + + // Verify that operations can be performed again after revival + // Note: This will fail unless we properly set up the signer and other required conditions + // For the purpose of this test, we'll just check that it doesn't revert due to being paused + vm.prank(buyer); + vm.expectRevert(); // Expect a revert, but not due to being paused + salesPolicy.buyPolicy{value: 1 ether}( + assets, + protocols, + coverageAmounts, + coverageDurations, + policyPriceInUSDC, + signedTime, + premiumCurrency, + r, + s, + v, + nonce + ); + } + + // LEAVE ALL LOGS FOR FUTURE DEBUGGING!!!! THIS IS A COMPLEX TEST THAT INTERACTS WITH + // MOST OF THE REPOSITORY CONTRACTS. MAKE SURE THAT IT IS ALWAYS PASSING + function testBuyPolicy() public { + address buyer = address(0x1234); + uint256 ethAmount = 1 ether; + + // Print initial balances + console.log("Initial SalesPolicy balance:", address(salesPolicy).balance); + console.log("Initial PremiumPool balance:", address(premiumPool).balance); + console.log("Initial Buyer balance:", buyer.balance); + address factoryAddress = salesPolicy.factory(); + console.log("Factory address in SalesPolicy:", factoryAddress); + + // Buy policy using the new helper function + uint256 policyId = buyPolicy(buyer, ethAmount); + + // Print final balances + console.log("Final SalesPolicy balance:", address(salesPolicy).balance); + console.log("Final PremiumPool balance:", address(premiumPool).balance); + console.log("Final Buyer balance:", buyer.balance); + + // Verify policy data + verifyPolicyData(setupPolicyParams()); + + // Verify token transfer + assertEq(address(premiumPool).balance, ethAmount, "PremiumPool should have received the ETH"); + assertEq(address(salesPolicy).balance, 0, "SalesPolicy should have 0 ETH balance"); + } + + function buyPolicy(address buyer, uint256 ethAmount) internal returns (uint256 policyId) { + + vm.prank(buyer); + unoToken.mint(2000 ether); + vm.prank(buyer); + unoToken.approve(address(ssip), 2000 ether); + + // Set MLR + vm.prank(operator); + capitalAgent.setMLR(ethAmount * 2); + + // Simulate staking + vm.prank(buyer); + ssip.enterInPool(ethAmount); + + PolicyParams memory params = setupPolicyParams(); + + // Mock the exchange rate + mockExchangeRate(params.policyPriceInUSDC, ethAmount); + + // Setup buyer + vm.deal(buyer, ethAmount); + + // Generate a valid signature + (uint8 v, bytes32 r, bytes32 s) = generateSignature(params, buyer); + + // Set the signer + setSigner(); + + // Whitelist the buyer and the SalesPolicy contract + vm.startPrank(multiSigWallet); + premiumPool.addWhiteList(buyer); + vm.stopPrank(); + + // Buy policy + vm.prank(buyer); + try salesPolicy.buyPolicy{value: ethAmount}( + params.assets, + params.protocols, + params.coverageAmounts, + params.coverageDurations, + params.policyPriceInUSDC, + params.signedTime, + params.premiumCurrency, + r, + s, + v, + 0 // nonce + ) { + console.log("Policy bought successfully"); + } catch Error(string memory reason) { + console.log("buyPolicy failed with Error:", reason); + revert(reason); + } catch (bytes memory lowLevelData) { + console.log("buyPolicy failed with low-level error:", vm.toString(lowLevelData)); + revert("Low-level error"); + } + + policyId = salesPolicy.allPoliciesLength() - 1; + return policyId; +} + + function setupPolicyParams() private view returns (PolicyParams memory) { + address[] memory assets = new address[](1); + assets[0] = address(0x5678); + address[] memory protocols = new address[](1); + protocols[0] = address(0x9ABC); + uint256[] memory coverageAmounts = new uint256[](1); + coverageAmounts[0] = 10000 * 1e6; // 10,000 USDC coverage + uint256[] memory coverageDurations = new uint256[](1); + coverageDurations[0] = 30 days; + + return PolicyParams({ + assets: assets, + protocols: protocols, + coverageAmounts: coverageAmounts, + coverageDurations: coverageDurations, + policyPriceInUSDC: 1000 * 1e6, // 1000 USDC + signedTime: block.timestamp, + premiumCurrency: address(0) // ETH + }); + } + + function mockExchangeRate(uint256 policyPriceInUSDC, uint256 ethAmount) private { + vm.mockCall( + address(exchangeAgent), + abi.encodeWithSelector(IExchangeAgent.getETHAmountForUSDC.selector, policyPriceInUSDC), + abi.encode(ethAmount) + ); + } + + function generateSignature(PolicyParams memory params, address buyer) private view returns (uint8, bytes32, bytes32) { + bytes32 messageHash = keccak256(abi.encodePacked( + params.policyPriceInUSDC, params.protocols, params.coverageDurations, params.coverageAmounts, + params.signedTime, params.premiumCurrency, uint256(0), buyer, block.chainid + )); + bytes32 ethSignedMessageHash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", messageHash)); + return vm.sign(uint256(1), ethSignedMessageHash); + } + + function setSigner() private { + vm.prank(address(salesPolicy.factory())); + salesPolicy.setSigner(vm.addr(1)); + } + + function verifyPolicyData(PolicyParams memory params) private { + (uint256 coverageAmount, uint256 coverageDuration, uint256 coverStartAt, bool exist, bool expired) = salesPolicy.getPolicyData(0); + assertEq(coverageAmount, params.coverageAmounts[0], "Coverage amount mismatch"); + assertEq(coverageDuration, params.coverageDurations[0], "Coverage duration mismatch"); + assertEq(coverStartAt, block.timestamp, "Cover start time mismatch"); + assertTrue(exist, "Policy should exist"); + assertFalse(expired, "Policy should not be expired"); + } + + function testApprovePremium() public { + address premiumCurrency = address(0x1234); // Mock ERC20 token address + + // Setup mock ERC20 token + MockUNO mockToken = new MockUNO(); + + // Expect approval event + vm.expectCall( + address(mockToken), + abi.encodeWithSelector(IERC20.approve.selector, address(salesPolicy.premiumPool()), type(uint256).max) + ); + + + // Call approvePremium + vm.prank(address(salesPolicy.factory())); + salesPolicy.approvePremium(address(mockToken)); + + // Verify approval + assertEq( + mockToken.allowance(address(salesPolicy), address(salesPolicy.premiumPool())), + type(uint256).max, + "Allowance should be set to max" + ); + } + + + function testSetProtocolURI() public { + string memory newURI = "https://new.protocol.uri"; + // Expect the event to be emitted + vm.expectEmit(true, true, true, true); + emit LogSetProtocolURIInPolicy(address(salesPolicy), newURI); + + vm.prank(address(factory)); + salesPolicy.setProtocolURI(newURI); + + vm.prank(address(0x1234)); + vm.expectRevert("UnoRe: SalesPolicy Forbidden"); + salesPolicy.setProtocolURI(newURI); + } + + function testSetPremiumPool() public { + address newPremiumPool = address(0x1234); + + vm.prank(address(factory)); + salesPolicy.setPremiumPool(newPremiumPool); + + assertEq(address(salesPolicy.premiumPool()), newPremiumPool, "Premium pool should be updated"); + + vm.prank(address(0x5678)); + vm.expectRevert("UnoRe: SalesPolicy Forbidden"); + salesPolicy.setPremiumPool(newPremiumPool); + } + + function testSetExchangeAgent() public { + address newExchangeAgent = address(0x2345); + + // Expect the event to be emitted + vm.expectEmit(true, true, true, true); + emit LogSetExchangeAgentInPolicy(newExchangeAgent,address(salesPolicy)); + + vm.prank(address(factory)); + salesPolicy.setExchangeAgent(newExchangeAgent); + + vm.prank(address(0x6789)); + vm.expectRevert("UnoRe: SalesPolicy Forbidden"); + salesPolicy.setExchangeAgent(newExchangeAgent); + } + + function testSetSigner() public { + address newSigner = address(0x3456); + + vm.prank(address(factory)); + salesPolicy.setSigner(newSigner); + + assertEq(salesPolicy.signer(), newSigner, "Signer should be updated"); + + vm.prank(address(0x7890)); + vm.expectRevert("UnoRe: SalesPolicy Forbidden"); + salesPolicy.setSigner(newSigner); + } + + function testSetCapitalAgent() public { + address newCapitalAgent = address(0x4567); + + vm.prank(address(factory)); + salesPolicy.setCapitalAgent(newCapitalAgent); + + assertEq(address(salesPolicy.capitalAgent()), newCapitalAgent, "Capital agent should be updated"); + + vm.prank(address(0x8901)); + vm.expectRevert("UnoRe: SalesPolicy Forbidden"); + salesPolicy.setCapitalAgent(newCapitalAgent); + } + + function testSetBuyPolicyMaxDeadline() public { + uint256 newDeadline = 7 days; + // Expect the event to be emitted + vm.expectEmit(true, true, true, true); + emit LogSetBuyPolicyMaxDeadlineInPolicy(newDeadline, address(salesPolicy)); + + vm.prank(address(factory)); + salesPolicy.setBuyPolicyMaxDeadline(newDeadline); + + vm.prank(address(0x9012)); + vm.expectRevert("UnoRe: SalesPolicy Forbidden"); + salesPolicy.setBuyPolicyMaxDeadline(newDeadline); + } + + function testMarkToClaim() public { + address buyer = address(0x1234); + uint256 ethAmount = 1 ether; + + // Buy policy using the new helper function + uint256 policyId = buyPolicy(buyer, ethAmount); + + // Mark the policy to claim + vm.prank(address(multiSigWallet)); + capitalAgent.markToClaimPolicy(policyId); + + // Get the policy data + (,,, bool exists, bool isExpired) = salesPolicy.getPolicyData(policyId); + + // Assert + assertFalse(exists, "Policy should be marked as claimed"); + assertFalse(isExpired, "Policy should not be marked as expired"); + } + + function testUpdatePolicyExpired() public { + address buyer = address(0x1234); + uint256 ethAmount = 1 ether; + + // Buy a policy + uint256 policyId = buyPolicy(buyer, ethAmount); + + // Get initial policy data + (, uint256 policyStartTime, uint256 policyEndTime, bool initialExists, bool initialIsExpired) = salesPolicy.getPolicyData(policyId); + + // Assert initial state + assertTrue(initialExists, "Policy should exist initially"); + assertFalse(initialIsExpired, "Policy should not be expired initially"); + + console.log("Policy start time:", policyStartTime); + console.log("Policy end time:", policyEndTime); + + // Fast forward time to after policy expiration + vm.warp(policyEndTime + 1); + + // Update policy expired status with the correct authorized address + vm.prank(address(capitalAgent)); + salesPolicy.updatePolicyExpired(policyId); + + // Try to get policy data after expiration + (, , , , bool expired ) = salesPolicy.getPolicyData(policyId); + assertTrue(expired, "Policy should be expired"); + + // Try to claim an expired policy (should revert due to non-existent token) + vm.prank(address(capitalAgent)); + vm.expectRevert("UnoRe: policy expired"); + salesPolicy.markToClaim(policyId); + + // Verify that the token no longer exists + vm.expectRevert(); + salesPolicy.ownerOf(policyId); + } + + function testAllPoliciesLength() public { + address buyer1 = address(0x1234); + address buyer2 = address(0x5678); + address buyer3 = address(0x9ABC); + uint256 ethAmount = 1 ether; + + // Check initial length + uint256 initialLength = salesPolicy.allPoliciesLength(); + assertEq(initialLength, 0, "Initial policies length should be 0"); + + // Buy first policy + uint256 policyId1 = buyPolicy(buyer1, ethAmount); + uint256 lengthAfterFirst = salesPolicy.allPoliciesLength(); + assertEq(lengthAfterFirst, 1, "Policies length should be 1 after first purchase"); + + // Buy second policy + uint256 policyId2 = buyPolicy(buyer2, ethAmount); + uint256 lengthAfterSecond = salesPolicy.allPoliciesLength(); + assertEq(lengthAfterSecond, 2, "Policies length should be 2 after second purchase"); + + // Buy third policy + uint256 policyId3 = buyPolicy(buyer3, ethAmount); + uint256 lengthAfterThird = salesPolicy.allPoliciesLength(); + assertEq(lengthAfterThird, 3, "Policies length should be 3 after third purchase"); + + // Get policy parameters + PolicyParams memory params = setupPolicyParams(); + + // Expire a policy + vm.warp(block.timestamp + params.coverageDurations[0] + 1); + vm.prank(address(capitalAgent)); + salesPolicy.updatePolicyExpired(policyId2); + + // Check length after expiring a policy + uint256 lengthAfterExpiration = salesPolicy.allPoliciesLength(); + assertEq(lengthAfterExpiration, 3, "Policies length should still be 3 after expiration"); + + // Try to claim a policy + vm.prank(address(capitalAgent)); + salesPolicy.markToClaim(policyId1); + + // Check length after claiming a policy + uint256 lengthAfterClaim = salesPolicy.allPoliciesLength(); + assertEq(lengthAfterClaim, 3, "Policies length should still be 3 after claiming"); + + console.log("testAllPoliciesLength passed successfully"); + } + + function testGetPolicyData() public { + address buyer = address(0x1234); + uint256 ethAmount = 1 ether; + + // Buy a policy + uint256 policyId = buyPolicy(buyer, ethAmount); + + // Get policy data + ( + uint256 coverageAmount, + uint256 duration, + uint256 startTime, + bool exists, + bool isExpired + ) = salesPolicy.getPolicyData(policyId); + + // Get the policy parameters used in buyPolicy + PolicyParams memory params = setupPolicyParams(); + + // Assert policy data + assertEq(coverageAmount, params.coverageAmounts[0], "Coverage amount should match"); + assertEq(duration, params.coverageDurations[0], "Duration should match"); + assertTrue(startTime > 0, "Start time should be set"); + assertTrue(exists, "Policy should exist"); + assertFalse(isExpired, "Policy should not be expired initially"); + + // Calculate and check end time + uint256 expectedEndTime = startTime + duration; + assertTrue(expectedEndTime > block.timestamp, "End time should be in the future"); + + // Try to get data for a non-existent policy + uint256 nonExistentPolicyId = 9999; + salesPolicy.getPolicyData(nonExistentPolicyId); + + // Fast forward to just before policy expiration + vm.warp(expectedEndTime - 1); + (, , , exists, isExpired) = salesPolicy.getPolicyData(policyId); + assertTrue(exists, "Policy should still exist before expiration"); + assertFalse(isExpired, "Policy should not be expired before end time"); + + // Fast forward to after policy expiration + vm.warp(expectedEndTime + 1); + vm.prank(address(capitalAgent)); + salesPolicy.updatePolicyExpired(policyId); + } + + function testSSIPPolicyClaim() public { + // Setup: Create a policy and add some funds to the SSIP + address policyholder = address(0x1234); + uint256 ethAmount = 1 ether; + bool expired; + + // Mint UNO tokens for the policyholder (for staking) + vm.prank(policyholder); + unoToken.mint(2000 ether); + + // Create a policy + uint256 policyId = buyPolicy(policyholder, ethAmount); + (uint256 coverageAmount,,,bool exists,) = salesPolicy.getPolicyData(policyId); + uint256 claimAmount = coverageAmount / 2; + + // Add funds to SSIP + vm.startPrank(multiSigWallet); + unoToken.mint(10000 ether); + unoToken.approve(address(ssip), 10000 ether); + ssip.enterInPool(10000 ether); + vm.stopPrank(); + + // Fast forward to make the policy active + vm.warp(block.timestamp + 1 days); + + // Prepare for the claim + vm.prank(multiSigWallet); + capitalAgent.markToClaimPolicy(policyId); + + // Execute the claim + vm.prank(address(ssip)); + capitalAgent.SSIPPolicyCaim(claimAmount,policyId,true); + + // Verify policy status + (,,,exists,expired) = salesPolicy.getPolicyData(policyId); + assertFalse(exists, "Policy should no longer exist after claim"); + assertFalse(expired, "Policy should not be marked as expired"); + + // Try to claim again (should fail) + vm.expectRevert("UnoRe: no exist ssip"); + vm.prank(multiSigWallet); + capitalAgent.SSIPPolicyCaim(claimAmount,policyId,true); + } + + function testSSIPPolicyClaimExceedingCoverage() public { + // Setup: Create a policy and add some funds to the SSIP + address policyholder = address(0x1234); + uint256 ethAmount = 1 ether; + bool expired; + + // Mint UNO tokens for the policyholder (for staking) + vm.prank(policyholder); + unoToken.mint(2000 ether); + + // Create a policy + uint256 policyId = buyPolicy(policyholder, ethAmount); + (uint256 coverageAmount,,,bool exists,) = salesPolicy.getPolicyData(policyId); + uint256 excessiveClaimAmount = coverageAmount + 1 ether; // Claim amount exceeding coverage + + // Add funds to SSIP + vm.startPrank(multiSigWallet); + unoToken.mint(10000 ether); + unoToken.approve(address(ssip), 10000 ether); + ssip.enterInPool(10000 ether); + vm.stopPrank(); + + // Fast forward to make the policy active + vm.warp(block.timestamp + 1 days); + + // Prepare for the claim + vm.prank(multiSigWallet); + capitalAgent.markToClaimPolicy(policyId); + + // Attempt to execute the claim with excessive amount (should fail) + vm.prank(address(ssip)); + vm.expectRevert("UnoRe: coverage amount is less"); + capitalAgent.SSIPPolicyCaim(excessiveClaimAmount, policyId, true); + } +} + +contract MockUniswapRouter { + using SafeERC20 for IERC20; + + function exactInputSingle(ISwapRouter.ExactInputSingleParams calldata params) external returns (uint256 amountOut) { + // Transfer tokenIn from msg.sender to this contract + IERC20(params.tokenIn).safeTransferFrom(msg.sender, address(this), params.amountIn); + + // Transfer tokenOut to the recipient + IERC20(params.tokenOut).safeTransfer(params.recipient, params.amountOutMinimum); + + return params.amountOutMinimum; + } + + // Function to allow the contract to receive ERC20 tokens + function rescueTokens(address token, address to, uint256 amount) external { + IERC20(token).safeTransfer(to, amount); + } + + // Function to allow the contract to receive ETH + receive() external payable {} + +} + +contract MockUniswapFactory { + mapping(address => mapping(address => address)) public getPair; + + function setPair(address tokenA, address tokenB, address pair) external { + getPair[tokenA][tokenB] = pair; + getPair[tokenB][tokenA] = pair; + } +} + +contract MockUniswapPair { + address public token0; + address public token1; + uint112 private reserve0; + uint112 private reserve1; + + constructor(address _token0, address _token1) { + token0 = _token0; + token1 = _token1; + } + + function getReserves() external view returns (uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast) { + return (reserve0, reserve1, uint32(block.timestamp)); + } + + function sync() public { + reserve0 = uint112(IERC20(token0).balanceOf(address(this))); + reserve1 = uint112(IERC20(token1).balanceOf(address(this))); + } + + function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external { + if (amount0Out > 0) IERC20(token0).transfer(to, amount0Out); + if (amount1Out > 0) IERC20(token1).transfer(to, amount1Out); + sync(); + } +} \ No newline at end of file diff --git a/test/foundry/NewMCR.t.sol b/test/foundry/NewMCR.t.sol index 8e407f7..7b6ae76 100644 --- a/test/foundry/NewMCR.t.sol +++ b/test/foundry/NewMCR.t.sol @@ -1,350 +1,350 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity =0.8.23; -import "../../contracts/Mocks/MockUNO.sol"; -import "../../contracts/Mocks/USDCRollux.sol"; -import "../../contracts/Mocks/SupraPriceOracle.sol"; -import "../../contracts/SingleSidedInsurancePool.sol"; -import "../../contracts/CapitalAgent.sol"; -import "../../contracts/ExchangeAgent.sol"; -import "../../contracts/uma/PayoutRequest.sol"; -import "../../contracts/factories/SalesPolicyFactory.sol"; -import "../../contracts/interfaces/ICapitalAgent.sol"; -import "../../contracts/SalesPolicy.sol"; - -import "lib/forge-std/src/Vm.sol"; -import "forge-std/console.sol"; - -import "lib/forge-std/src/Test.sol"; -import "../../src/TransparentProxy.sol"; - -contract NewMCR is Test { - MockUNO uno; - USDCmock usdc; - SupraPriceOracle priceFeed; - SingleSidedInsurancePool pool; - CapitalAgent capitalAgent; - TransparentProxy capitalAgentProxy; - CapitalAgent proxycapital; - ExchangeAgent exchange; - PayoutRequest payout; - SalesPolicyFactory salesFactory; - SalesPolicy salesPolicy; - - address user = address(1); - address user2 = address(2); - address user3 = address(3); - address user4 = address(4); - address user5 = address(5); - address user6 = address(6); - address user7 = address(7); - address user8 = address(8); - address user9 = address(9); - address admin = address(this); - address constant USDC = 0x368433CaC2A0B8D76E64681a9835502a1f2A8A30; - address constant UNO = 0x570baA32dB74279a50491E88D712C957F4C9E409; - address constant PRICE = 0x9A2F48a2F66Ef86A6664Bb6FbC49a7407d6E33B5; - address constant USDCPOOL = 0x2c89687036445089c962F4621B1F03571BBa798e; - address constant SALES_FACTORY = 0xD86D9be9143Dc514340C73502f2B77d93d0B11f4; - uint256 constant MCR = 10000000; - uint256 constant MLR = 1000000; - address constant PREMIUM_POOL = 0xc94002a997d4e4E90D423778170588f695c5f242; - address constant PAYOUT = 0x1024a3a9D000aD3cd6Ac88490F86aD9FEAef7DCA; - address constant EXCHANGE_AGENT_ADDRESS = 0x826404CB1924e8b2773250c9d15503E5CDe7eE20; - address constant SALES = 0x5B170693E096D8602f970757068859b9A117fA6D; - address constant MintAddress = 0x3ad22Ae2dE3dCF105E8DaA12acDd15bD47596863; - - function setUp() public { - string memory CHAIN_URL = vm.envString("ROLLUXMAIN_URL"); - - vm.createSelectFork(CHAIN_URL); - priceFeed = SupraPriceOracle(PRICE); - - vm.createSelectFork(CHAIN_URL); - salesPolicy = SalesPolicy(payable(SALES)); - - vm.createSelectFork(CHAIN_URL); - salesFactory = SalesPolicyFactory(SALES_FACTORY); - - vm.createSelectFork(CHAIN_URL); - pool = SingleSidedInsurancePool(USDCPOOL); - - vm.createSelectFork(CHAIN_URL); - usdc = USDCmock(USDC); - - vm.createSelectFork(CHAIN_URL); - exchange = ExchangeAgent(payable(EXCHANGE_AGENT_ADDRESS)); - - vm.createSelectFork(CHAIN_URL); - payout = PayoutRequest((PAYOUT)); - - capitalAgent = new CapitalAgent(); - capitalAgentProxy = new TransparentProxy(address(capitalAgent), address(this), ""); - proxycapital = CapitalAgent(address(capitalAgentProxy)); - proxycapital.initialize(address(exchange), USDC, address(this), address(this)); - proxycapital.setMCR(MCR); - proxycapital.setMLR(MLR); - proxycapital.setSalesPolicyFactory(SALES_FACTORY); - vm.prank(0x3ad22Ae2dE3dCF105E8DaA12acDd15bD47596863); - payout.setCapitalAgent(ICapitalAgent(address(proxycapital))); - - vm.prank(0x3ad22Ae2dE3dCF105E8DaA12acDd15bD47596863); - salesFactory.setCapitalAgentInPolicy(address(proxycapital)); - - vm.prank(0x3ad22Ae2dE3dCF105E8DaA12acDd15bD47596863); - pool.setCapitalAgent(address(proxycapital)); - proxycapital.addPoolByAdmin(USDCPOOL, USDC, 1000000); - } - - function setupUsersAndStakes(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) internal { - vm.assume(amount > 0 && amount < 5000000000000); - vm.assume(amount2 > 0 && amount2 < 5000000000000); - vm.assume(amount3 > 0 && amount3 < 5000000000000); - vm.assume(amount4 > 0 && amount4 < 5000000000000); - - // Mint - vm.prank(MintAddress); - usdc.mint(address(user), 5000000000000); - vm.prank(MintAddress); - usdc.mint(address(user2), amount); - vm.prank(MintAddress); - usdc.mint(address(user3), amount2); - vm.prank(MintAddress); - usdc.mint(address(user4), amount); - vm.prank(MintAddress); - usdc.mint(address(user5), amount2); - vm.prank(MintAddress); - usdc.mint(address(user6), amount4); - vm.prank(MintAddress); - usdc.mint(address(user7), amount); - vm.prank(MintAddress); - usdc.mint(address(user8), amount3); - vm.prank(MintAddress); - usdc.mint(address(user9), 10000000000000); - // Approve - vm.prank(address(user)); - usdc.approve(address(pool), 5000000000000); - vm.prank(address(user2)); - usdc.approve(address(pool), amount); - vm.prank(address(user3)); - usdc.approve(address(pool), amount2); - vm.prank(address(user4)); - usdc.approve(address(pool), amount); - vm.prank(address(user5)); - usdc.approve(address(pool), amount2); - vm.prank(address(user6)); - usdc.approve(address(pool), amount4); - vm.prank(address(user7)); - usdc.approve(address(pool), amount); - vm.prank(address(user8)); - usdc.approve(address(pool), amount3); - vm.prank(address(user9)); - usdc.approve(address(pool), 10000000000000); - - // Enter in pool - vm.prank(address(user)); - pool.enterInPool(500000000000); - vm.prank(address(user2)); - pool.enterInPool(amount); - vm.prank(address(user3)); - pool.enterInPool(amount2); - vm.prank(address(user4)); - pool.enterInPool(amount); - vm.prank(address(user5)); - pool.enterInPool(amount2); - vm.prank(address(user6)); - pool.enterInPool(amount4); - vm.prank(address(user7)); - pool.enterInPool(amount); - vm.prank(address(user8)); - pool.enterInPool(amount3); - vm.prank(address(user9)); - pool.enterInPool(10000000000000); - } - - function setupStartWithdrawal(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) internal { - vm.prank(address(user2)); - pool.leaveFromPoolInPending(amount); - vm.prank(address(user3)); - pool.leaveFromPoolInPending(amount2); - vm.prank(address(user4)); - pool.leaveFromPoolInPending(amount); - vm.prank(address(user5)); - pool.leaveFromPoolInPending(amount2); - vm.prank(address(user6)); - pool.leaveFromPoolInPending(amount4); - vm.prank(address(user7)); - pool.leaveFromPoolInPending(amount); - vm.prank(address(user8)); - pool.leaveFromPoolInPending(amount3); - vm.prank(address(user9)); - pool.leaveFromPoolInPending(10000000000000); - } - - function setupFinishWithdrawal(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) internal { - vm.prank(address(user2)); - pool.leaveFromPending(amount); - vm.prank(address(user3)); - pool.leaveFromPending(amount2); - vm.prank(address(user4)); - pool.leaveFromPending(amount); - vm.prank(address(user5)); - pool.leaveFromPending(amount2); - vm.prank(address(user6)); - pool.leaveFromPending(amount4); - vm.prank(address(user7)); - pool.leaveFromPending(amount); - vm.prank(address(user8)); - pool.leaveFromPending(amount3); - vm.prank(address(user9)); - pool.leaveFromPending(10000000000000); - } - - function test_stake(uint256 amount) public { - vm.assume(amount < 10000000000); - vm.assume(0 < amount); - vm.prank(0x3ad22Ae2dE3dCF105E8DaA12acDd15bD47596863); - usdc.mint(address(user), amount); - address riskPool = pool.riskPool(); - uint256 balanceBefore = usdc.balanceOf(riskPool); - assertEq(usdc.balanceOf(user), amount); - vm.prank(address(user)); - usdc.approve(address(pool), amount); - vm.prank(address(user)); - pool.enterInPool(amount); - - assertEq(usdc.balanceOf(address(riskPool)), (balanceBefore + amount)); - } - - function test_stakeWithdrawal(uint256 amount) public { - vm.assume(amount < 10000000000); - vm.assume(amount > 0); - vm.prank(0x3ad22Ae2dE3dCF105E8DaA12acDd15bD47596863); - usdc.mint(address(user), 10000000000); - assertEq(usdc.balanceOf(user), 10000000000); - vm.prank(address(user)); - usdc.approve(address(pool), 10000000000); - vm.prank(address(user)); - pool.enterInPool(10000000000); - assertEq(proxycapital.totalCapitalStaked(), 10000000000); - vm.prank(address(user)); - pool.leaveFromPoolInPending(amount); - skip(300); - vm.prank(address(user)); - pool.leaveFromPending(amount); - assertEq(usdc.balanceOf(user), amount); - assertEq(proxycapital.totalCapitalStaked(), (10000000000 - amount)); - } - - function test_initialSetupAndStaking(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) public { - setupUsersAndStakes(amount, amount2, amount3, amount4); - - uint256 expectedStake = 500000000000 + (3 * amount) + (2 * amount2) + amount3 + amount4 + 10000000000000; - assertEq(proxycapital.totalCapitalStaked(), expectedStake); - } - - function test_withdrawalProcess(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) public { - test_initialSetupAndStaking(amount, amount2, amount3, amount4); - - vm.prank(address(user2)); - pool.leaveFromPoolInPending(amount); - vm.prank(address(user3)); - pool.leaveFromPoolInPending(amount2); - vm.prank(address(user4)); - pool.leaveFromPoolInPending(amount); - - skip(300); - vm.prank(address(user2)); - pool.leaveFromPending(amount); - vm.prank(address(user3)); - pool.leaveFromPending(amount2); - vm.prank(address(user4)); - pool.leaveFromPending(amount); - - vm.prank(address(user)); - vm.expectRevert(); - pool.leaveFromPoolInPending(5000000000000); - - vm.prank(address(user)); - pool.leaveFromPoolInPending(50000000); - } - - function test_cantWithdrawAmountBelowMCR(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) public { - setupUsersAndStakes(amount, amount2, amount3, amount4); - - uint256 stakedAfter = proxycapital.totalCapitalStaked(); - - proxycapital.setMCR(stakedAfter / 2); - - vm.prank(MintAddress); - usdc.mint(address(user), 5000000000000); - vm.prank(address(user)); - usdc.approve(address(pool), 5000000000000); - vm.prank(address(user)); - pool.enterInPool(500000000000); - - uint256 totalUserStaked = (2 * 500000000000); - - //Here user will withdrawal all of his money and should not fail by the MCR - vm.prank(address(user)); - pool.leaveFromPoolInPending(totalUserStaked); - skip(3000); - vm.prank(address(user)); - pool.leaveFromPending(totalUserStaked); - - //here user stake all his money again - vm.prank(address(user)); - usdc.approve(address(pool), totalUserStaked); - vm.prank(address(user)); - pool.enterInPool(totalUserStaked); - - proxycapital.totalCapitalStaked(); - proxycapital.MCR(); - - //Here other users will withdrawal all of their money - setupStartWithdrawal(amount, amount2, amount3, amount4); - skip(3000); - setupFinishWithdrawal(amount, amount2, amount3, amount4); - proxycapital.totalCapitalStaked(); - - //Here user will withdrawal all of his money and it should fail by the MCR - vm.prank(address(user)); - vm.expectRevert(); - pool.leaveFromPoolInPending(totalUserStaked); - } - - function test_shouldNotFailWithdrawalCompletion(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) public { - setupUsersAndStakes(amount, amount2, amount3, amount4); - - uint256 stakedAfter = proxycapital.totalCapitalStaked(); - - proxycapital.setMCR(stakedAfter / 2); - - vm.prank(MintAddress); - usdc.mint(address(user), 5000000000000); - vm.prank(address(user)); - usdc.approve(address(pool), 5000000000000); - vm.prank(address(user)); - pool.enterInPool(500000000000); - - uint256 totalUserStaked = (2 * 500000000000); - - proxycapital.totalCapitalStaked(); - proxycapital.MCR(); - - //Here other users will start to withdrawal all of their money, but won't finish withdrawing yet +// import "../../contracts/Mocks/MockUNO.sol"; +// import "../../contracts/Mocks/USDCRollux.sol"; +// import "../../contracts/Mocks/SupraPriceOracle.sol"; +// import "../../contracts/SingleSidedInsurancePool.sol"; +// import "../../contracts/CapitalAgent.sol"; +// import "../../contracts/ExchangeAgent.sol"; +// import "../../contracts/uma/PayoutRequest.sol"; +// import "../../contracts/factories/SalesPolicyFactory.sol"; +// import "../../contracts/interfaces/ICapitalAgent.sol"; +// import "../../contracts/SalesPolicy.sol"; + +// import "lib/forge-std/src/Vm.sol"; +// import "forge-std/console.sol"; + +// import "lib/forge-std/src/Test.sol"; +// import "../../src/TransparentProxy.sol"; + +// contract NewMCR is Test { +// MockUNO uno; +// USDCmock usdc; +// SupraPriceOracle priceFeed; +// SingleSidedInsurancePool pool; +// CapitalAgent capitalAgent; +// TransparentProxy capitalAgentProxy; +// CapitalAgent proxycapital; +// ExchangeAgent exchange; +// PayoutRequest payout; +// SalesPolicyFactory salesFactory; +// SalesPolicy salesPolicy; + +// address user = address(1); +// address user2 = address(2); +// address user3 = address(3); +// address user4 = address(4); +// address user5 = address(5); +// address user6 = address(6); +// address user7 = address(7); +// address user8 = address(8); +// address user9 = address(9); +// address admin = address(this); +// address constant USDC = 0x368433CaC2A0B8D76E64681a9835502a1f2A8A30; +// address constant UNO = 0x570baA32dB74279a50491E88D712C957F4C9E409; +// address constant PRICE = 0x9A2F48a2F66Ef86A6664Bb6FbC49a7407d6E33B5; +// address constant USDCPOOL = 0x2c89687036445089c962F4621B1F03571BBa798e; +// address constant SALES_FACTORY = 0xD86D9be9143Dc514340C73502f2B77d93d0B11f4; +// uint256 constant MCR = 10000000; +// uint256 constant MLR = 1000000; +// address constant PREMIUM_POOL = 0xc94002a997d4e4E90D423778170588f695c5f242; +// address constant PAYOUT = 0x1024a3a9D000aD3cd6Ac88490F86aD9FEAef7DCA; +// address constant EXCHANGE_AGENT_ADDRESS = 0x826404CB1924e8b2773250c9d15503E5CDe7eE20; +// address constant SALES = 0x5B170693E096D8602f970757068859b9A117fA6D; +// address constant MintAddress = 0x3ad22Ae2dE3dCF105E8DaA12acDd15bD47596863; + +// function setUp() public { +// string memory CHAIN_URL = vm.envString("ROLLUXMAIN_URL"); + +// vm.createSelectFork(CHAIN_URL); +// priceFeed = SupraPriceOracle(PRICE); + +// vm.createSelectFork(CHAIN_URL); +// salesPolicy = SalesPolicy(payable(SALES)); + +// vm.createSelectFork(CHAIN_URL); +// salesFactory = SalesPolicyFactory(SALES_FACTORY); + +// vm.createSelectFork(CHAIN_URL); +// pool = SingleSidedInsurancePool(USDCPOOL); + +// vm.createSelectFork(CHAIN_URL); +// usdc = USDCmock(USDC); + +// vm.createSelectFork(CHAIN_URL); +// exchange = ExchangeAgent(payable(EXCHANGE_AGENT_ADDRESS)); + +// vm.createSelectFork(CHAIN_URL); +// payout = PayoutRequest((PAYOUT)); + +// capitalAgent = new CapitalAgent(); +// capitalAgentProxy = new TransparentProxy(address(capitalAgent), address(this), ""); +// proxycapital = CapitalAgent(address(capitalAgentProxy)); +// proxycapital.initialize(address(exchange), USDC, address(this), address(this)); +// proxycapital.setMCR(MCR); +// proxycapital.setMLR(MLR); +// proxycapital.setSalesPolicyFactory(SALES_FACTORY); +// vm.prank(0x3ad22Ae2dE3dCF105E8DaA12acDd15bD47596863); +// payout.setCapitalAgent(ICapitalAgent(address(proxycapital))); + +// vm.prank(0x3ad22Ae2dE3dCF105E8DaA12acDd15bD47596863); +// salesFactory.setCapitalAgentInPolicy(address(proxycapital)); + +// vm.prank(0x3ad22Ae2dE3dCF105E8DaA12acDd15bD47596863); +// pool.setCapitalAgent(address(proxycapital)); +// proxycapital.addPoolByAdmin(USDCPOOL, USDC, 1000000); +// } + +// function setupUsersAndStakes(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) internal { +// vm.assume(amount > 0 && amount < 5000000000000); +// vm.assume(amount2 > 0 && amount2 < 5000000000000); +// vm.assume(amount3 > 0 && amount3 < 5000000000000); +// vm.assume(amount4 > 0 && amount4 < 5000000000000); + +// // Mint +// vm.prank(MintAddress); +// usdc.mint(address(user), 5000000000000); +// vm.prank(MintAddress); +// usdc.mint(address(user2), amount); +// vm.prank(MintAddress); +// usdc.mint(address(user3), amount2); +// vm.prank(MintAddress); +// usdc.mint(address(user4), amount); +// vm.prank(MintAddress); +// usdc.mint(address(user5), amount2); +// vm.prank(MintAddress); +// usdc.mint(address(user6), amount4); +// vm.prank(MintAddress); +// usdc.mint(address(user7), amount); +// vm.prank(MintAddress); +// usdc.mint(address(user8), amount3); +// vm.prank(MintAddress); +// usdc.mint(address(user9), 10000000000000); +// // Approve +// vm.prank(address(user)); +// usdc.approve(address(pool), 5000000000000); +// vm.prank(address(user2)); +// usdc.approve(address(pool), amount); +// vm.prank(address(user3)); +// usdc.approve(address(pool), amount2); +// vm.prank(address(user4)); +// usdc.approve(address(pool), amount); +// vm.prank(address(user5)); +// usdc.approve(address(pool), amount2); +// vm.prank(address(user6)); +// usdc.approve(address(pool), amount4); +// vm.prank(address(user7)); +// usdc.approve(address(pool), amount); +// vm.prank(address(user8)); +// usdc.approve(address(pool), amount3); +// vm.prank(address(user9)); +// usdc.approve(address(pool), 10000000000000); + +// // Enter in pool +// vm.prank(address(user)); +// pool.enterInPool(500000000000); +// vm.prank(address(user2)); +// pool.enterInPool(amount); +// vm.prank(address(user3)); +// pool.enterInPool(amount2); +// vm.prank(address(user4)); +// pool.enterInPool(amount); +// vm.prank(address(user5)); +// pool.enterInPool(amount2); +// vm.prank(address(user6)); +// pool.enterInPool(amount4); +// vm.prank(address(user7)); +// pool.enterInPool(amount); +// vm.prank(address(user8)); +// pool.enterInPool(amount3); +// vm.prank(address(user9)); +// pool.enterInPool(10000000000000); +// } + +// function setupStartWithdrawal(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) internal { +// vm.prank(address(user2)); +// pool.leaveFromPoolInPending(amount); +// vm.prank(address(user3)); +// pool.leaveFromPoolInPending(amount2); +// vm.prank(address(user4)); +// pool.leaveFromPoolInPending(amount); +// vm.prank(address(user5)); +// pool.leaveFromPoolInPending(amount2); +// vm.prank(address(user6)); +// pool.leaveFromPoolInPending(amount4); +// vm.prank(address(user7)); +// pool.leaveFromPoolInPending(amount); +// vm.prank(address(user8)); +// pool.leaveFromPoolInPending(amount3); +// vm.prank(address(user9)); +// pool.leaveFromPoolInPending(10000000000000); +// } + +// function setupFinishWithdrawal(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) internal { +// vm.prank(address(user2)); +// pool.leaveFromPending(amount); +// vm.prank(address(user3)); +// pool.leaveFromPending(amount2); +// vm.prank(address(user4)); +// pool.leaveFromPending(amount); +// vm.prank(address(user5)); +// pool.leaveFromPending(amount2); +// vm.prank(address(user6)); +// pool.leaveFromPending(amount4); +// vm.prank(address(user7)); +// pool.leaveFromPending(amount); +// vm.prank(address(user8)); +// pool.leaveFromPending(amount3); +// vm.prank(address(user9)); +// pool.leaveFromPending(10000000000000); +// } + +// function test_stake(uint256 amount) public { +// vm.assume(amount < 10000000000); +// vm.assume(0 < amount); +// vm.prank(0x3ad22Ae2dE3dCF105E8DaA12acDd15bD47596863); +// usdc.mint(address(user), amount); +// address riskPool = pool.riskPool(); +// uint256 balanceBefore = usdc.balanceOf(riskPool); +// assertEq(usdc.balanceOf(user), amount); +// vm.prank(address(user)); +// usdc.approve(address(pool), amount); +// vm.prank(address(user)); +// pool.enterInPool(amount); + +// assertEq(usdc.balanceOf(address(riskPool)), (balanceBefore + amount)); +// } + +// function test_stakeWithdrawal(uint256 amount) public { +// vm.assume(amount < 10000000000); +// vm.assume(amount > 0); +// vm.prank(0x3ad22Ae2dE3dCF105E8DaA12acDd15bD47596863); +// usdc.mint(address(user), 10000000000); +// assertEq(usdc.balanceOf(user), 10000000000); +// vm.prank(address(user)); +// usdc.approve(address(pool), 10000000000); +// vm.prank(address(user)); +// pool.enterInPool(10000000000); +// assertEq(proxycapital.totalCapitalStaked(), 10000000000); +// vm.prank(address(user)); +// pool.leaveFromPoolInPending(amount); +// skip(300); +// vm.prank(address(user)); +// pool.leaveFromPending(amount); +// assertEq(usdc.balanceOf(user), amount); +// assertEq(proxycapital.totalCapitalStaked(), (10000000000 - amount)); +// } + +// function test_initialSetupAndStaking(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) public { +// setupUsersAndStakes(amount, amount2, amount3, amount4); + +// uint256 expectedStake = 500000000000 + (3 * amount) + (2 * amount2) + amount3 + amount4 + 10000000000000; +// assertEq(proxycapital.totalCapitalStaked(), expectedStake); +// } + +// function test_withdrawalProcess(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) public { +// test_initialSetupAndStaking(amount, amount2, amount3, amount4); + +// vm.prank(address(user2)); +// pool.leaveFromPoolInPending(amount); +// vm.prank(address(user3)); +// pool.leaveFromPoolInPending(amount2); +// vm.prank(address(user4)); +// pool.leaveFromPoolInPending(amount); + +// skip(300); +// vm.prank(address(user2)); +// pool.leaveFromPending(amount); +// vm.prank(address(user3)); +// pool.leaveFromPending(amount2); +// vm.prank(address(user4)); +// pool.leaveFromPending(amount); + +// vm.prank(address(user)); +// vm.expectRevert(); +// pool.leaveFromPoolInPending(5000000000000); + +// vm.prank(address(user)); +// pool.leaveFromPoolInPending(50000000); +// } + +// function test_cantWithdrawAmountBelowMCR(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) public { +// setupUsersAndStakes(amount, amount2, amount3, amount4); + +// uint256 stakedAfter = proxycapital.totalCapitalStaked(); + +// proxycapital.setMCR(stakedAfter / 2); + +// vm.prank(MintAddress); +// usdc.mint(address(user), 5000000000000); +// vm.prank(address(user)); +// usdc.approve(address(pool), 5000000000000); +// vm.prank(address(user)); +// pool.enterInPool(500000000000); + +// uint256 totalUserStaked = (2 * 500000000000); + +// //Here user will withdrawal all of his money and should not fail by the MCR +// vm.prank(address(user)); +// pool.leaveFromPoolInPending(totalUserStaked); +// skip(3000); +// vm.prank(address(user)); +// pool.leaveFromPending(totalUserStaked); + +// //here user stake all his money again +// vm.prank(address(user)); +// usdc.approve(address(pool), totalUserStaked); +// vm.prank(address(user)); +// pool.enterInPool(totalUserStaked); + +// proxycapital.totalCapitalStaked(); +// proxycapital.MCR(); + +// //Here other users will withdrawal all of their money +// setupStartWithdrawal(amount, amount2, amount3, amount4); +// skip(3000); +// setupFinishWithdrawal(amount, amount2, amount3, amount4); +// proxycapital.totalCapitalStaked(); + +// //Here user will withdrawal all of his money and it should fail by the MCR +// vm.prank(address(user)); +// vm.expectRevert(); +// pool.leaveFromPoolInPending(totalUserStaked); +// } + +// function test_shouldNotFailWithdrawalCompletion(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) public { +// setupUsersAndStakes(amount, amount2, amount3, amount4); + +// uint256 stakedAfter = proxycapital.totalCapitalStaked(); + +// proxycapital.setMCR(stakedAfter / 2); + +// vm.prank(MintAddress); +// usdc.mint(address(user), 5000000000000); +// vm.prank(address(user)); +// usdc.approve(address(pool), 5000000000000); +// vm.prank(address(user)); +// pool.enterInPool(500000000000); + +// uint256 totalUserStaked = (2 * 500000000000); + +// proxycapital.totalCapitalStaked(); +// proxycapital.MCR(); + +// //Here other users will start to withdrawal all of their money, but won't finish withdrawing yet - setupStartWithdrawal(amount, amount2, amount3, amount4); - skip(3000); - - vm.prank(address(user)); - //this call should fail by the MCR as other users withdrew, but it doesn't - pool.leaveFromPoolInPending(totalUserStaked); - skip(3000); +// setupStartWithdrawal(amount, amount2, amount3, amount4); +// skip(3000); + +// vm.prank(address(user)); +// //this call should fail by the MCR as other users withdrew, but it doesn't +// pool.leaveFromPoolInPending(totalUserStaked); +// skip(3000); - vm.prank(address(user)); - pool.leaveFromPending(totalUserStaked); - - setupFinishWithdrawal(amount, amount2, amount3, amount4); - } -} +// vm.prank(address(user)); +// pool.leaveFromPending(totalUserStaked); + +// setupFinishWithdrawal(amount, amount2, amount3, amount4); +// } +// } diff --git a/test/foundry/NewMCRRollux.t.sol b/test/foundry/NewMCRRollux.t.sol index 90d87c8..977482d 100644 --- a/test/foundry/NewMCRRollux.t.sol +++ b/test/foundry/NewMCRRollux.t.sol @@ -1,372 +1,372 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity =0.8.23; -import "../../contracts/Mocks/MockUNO.sol"; -import "../../contracts/Mocks/USDCRollux.sol"; -import "../../contracts/Mocks/SupraPriceOracle.sol"; -import "../../contracts/SingleSidedInsurancePool.sol"; -import "../../contracts/Mocks/MockCapitalAgent.sol"; -import "../../contracts/ExchangeAgent.sol"; -import "../../contracts/uma/PayoutRequest.sol"; -import "../../contracts/factories/SalesPolicyFactory.sol"; -import "../../contracts/interfaces/ICapitalAgent.sol"; -import "../../contracts/SalesPolicy.sol"; - -import "lib/forge-std/src/Vm.sol"; -import "forge-std/console.sol"; - -import "lib/forge-std/src/Test.sol"; -import "../../src/TransparentProxy.sol"; - -contract NewMCRRollux is Test { - MockUNO uno; - USDCmock sys; - SupraPriceOracle priceFeed; - SingleSidedInsurancePool pool; - MockCapitalAgent capitalAgent; - TransparentProxy capitalAgentProxy; - MockCapitalAgent proxycapital; - ExchangeAgent exchange; - PayoutRequest payout; - SalesPolicyFactory salesFactory; - SalesPolicy salesPolicy; - - address user = address(1); - address user2 = address(2); - address user3 = address(3); - address user4 = address(4); - address user5 = address(5); - address user6 = address(6); - address user7 = address(7); - address user8 = address(8); - address user9 = address(9); - address admin = address(this); - address constant WSYS = 0x4200000000000000000000000000000000000006; - address constant USDC = 0x368433CaC2A0B8D76E64681a9835502a1f2A8A30; - address constant UNO = 0x570baA32dB74279a50491E88D712C957F4C9E409; - address constant PRICE = 0x14eF9C6cD5A8C78af407cEcCA3E4668e466F2B18; - address constant WSYSPOOL = 0x3B61743180857c9D898c336b1604f4742887aa74; - address constant SALES_FACTORY = 0xD86D9be9143Dc514340C73502f2B77d93d0B11f4; - uint256 constant MCR = 10000000; - uint256 constant MLR = 1000000; - address constant PREMIUM_POOL = 0xc94002a997d4e4E90D423778170588f695c5f242; - address constant PAYOUT = 0xCaB9faf23a9803352f3f61Bc23782A9eb4a90fcC; - address constant EXCHANGE_AGENT_ADDRESS = 0x83f618d714B9464C8e63F1d95592BaAa2d51a54E; - address constant SALES = 0x5B170693E096D8602f970757068859b9A117fA6D; - address constant MintAddress = 0x3ad22Ae2dE3dCF105E8DaA12acDd15bD47596863; - address constant SysMillionaire = 0x3F0e40bC7e9cb5f46E906dAEd18651Fb6212Aa8E; - address constant Multisig = 0x15E18e012cb6635b228e0DF0b6FC72627C8b2429; - - function setUp() public { - string memory CHAIN_URL = vm.envString("ROLLUXMAIN_URL"); - - vm.createSelectFork(CHAIN_URL); - priceFeed = SupraPriceOracle(PRICE); - - vm.createSelectFork(CHAIN_URL); - salesPolicy = SalesPolicy(payable(SALES)); - - vm.createSelectFork(CHAIN_URL); - salesFactory = SalesPolicyFactory(SALES_FACTORY); - - vm.createSelectFork(CHAIN_URL); - pool = SingleSidedInsurancePool(WSYSPOOL); - - vm.createSelectFork(CHAIN_URL); - sys = USDCmock(WSYS); - - vm.createSelectFork(CHAIN_URL); - exchange = ExchangeAgent(payable(EXCHANGE_AGENT_ADDRESS)); - - vm.createSelectFork(CHAIN_URL); - payout = PayoutRequest((PAYOUT)); - - capitalAgent = new MockCapitalAgent(); - capitalAgentProxy = new TransparentProxy(address(capitalAgent), address(this), ""); - proxycapital = MockCapitalAgent(address(capitalAgentProxy)); - proxycapital.initialize(address(exchange), USDC, address(this), address(this)); - proxycapital.setMCR(MCR); - proxycapital.setMLR(MLR); - proxycapital.setSalesPolicyFactory(SALES_FACTORY); - vm.prank(0x100c50947580d9158B7C26f79401404208CFbE62); - payout.setCapitalAgent(ICapitalAgent(address(proxycapital))); - - vm.prank(Multisig); - salesFactory.setCapitalAgentInPolicy(address(proxycapital)); - - vm.prank(Multisig); - pool.setCapitalAgent(address(proxycapital)); - proxycapital.addPoolByAdmin(address(pool), WSYS, 1000000); - } - - function setupUsersAndStakes(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) internal { - vm.assume(amount > 0 && amount < 4000000000000000000000); //4k wsys - vm.assume(amount2 > 0 && amount2 < 4000000000000000000000); - vm.assume(amount3 > 0 && amount3 < 4000000000000000000000); - vm.assume(amount4 > 0 && amount4 < 4000000000000000000000); - - // Mint - vm.prank(SysMillionaire); - sys.transfer(address(user), 5000000000000000000000); //5k wsys - vm.prank(SysMillionaire); - sys.transfer(address(user2), amount); - vm.prank(SysMillionaire); - sys.transfer(address(user3), amount2); - vm.prank(SysMillionaire); - sys.transfer(address(user4), amount); - vm.prank(SysMillionaire); - sys.transfer(address(user5), amount2); - vm.prank(SysMillionaire); - sys.transfer(address(user6), amount4); - vm.prank(SysMillionaire); - sys.transfer(address(user7), amount); - vm.prank(SysMillionaire); - sys.transfer(address(user8), amount3); - vm.prank(SysMillionaire); - sys.transfer(address(user9), 10000000000000000000000); //10k wsys - // Approve - vm.prank(address(user)); - sys.approve(address(pool), 5000000000000000000000); - vm.prank(address(user2)); - sys.approve(address(pool), amount); - vm.prank(address(user3)); - sys.approve(address(pool), amount2); - vm.prank(address(user4)); - sys.approve(address(pool), amount); - vm.prank(address(user5)); - sys.approve(address(pool), amount2); - vm.prank(address(user6)); - sys.approve(address(pool), amount4); - vm.prank(address(user7)); - sys.approve(address(pool), amount); - vm.prank(address(user8)); - sys.approve(address(pool), amount3); - vm.prank(address(user9)); - sys.approve(address(pool), 10000000000000000000000); - - // Enter in pool - vm.prank(address(user)); - pool.enterInPool(5000000000000000000000); - vm.prank(address(user2)); - pool.enterInPool(amount); - vm.prank(address(user3)); - pool.enterInPool(amount2); - vm.prank(address(user4)); - pool.enterInPool(amount); - vm.prank(address(user5)); - pool.enterInPool(amount2); - vm.prank(address(user6)); - pool.enterInPool(amount4); - vm.prank(address(user7)); - pool.enterInPool(amount); - vm.prank(address(user8)); - pool.enterInPool(amount3); - vm.prank(address(user9)); - pool.enterInPool(10000000000000000000000); - } - - function setupStartWithdrawal(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) internal { - vm.prank(address(user2)); - pool.leaveFromPoolInPending(amount); - vm.prank(address(user3)); - pool.leaveFromPoolInPending(amount2); - vm.prank(address(user4)); - pool.leaveFromPoolInPending(amount); - vm.prank(address(user5)); - pool.leaveFromPoolInPending(amount2); - vm.prank(address(user6)); - pool.leaveFromPoolInPending(amount4); - vm.prank(address(user7)); - pool.leaveFromPoolInPending(amount); - vm.prank(address(user8)); - pool.leaveFromPoolInPending(amount3); - vm.prank(address(user9)); - pool.leaveFromPoolInPending(10000000000000000000000); - } - - function setupFinishWithdrawal(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) internal { - vm.prank(address(user2)); - pool.leaveFromPending(amount); - vm.prank(address(user3)); - pool.leaveFromPending(amount2); - vm.prank(address(user4)); - pool.leaveFromPending(amount); - vm.prank(address(user5)); - pool.leaveFromPending(amount2); - vm.prank(address(user6)); - pool.leaveFromPending(amount4); - vm.prank(address(user7)); - pool.leaveFromPending(amount); - vm.prank(address(user8)); - pool.leaveFromPending(amount3); - vm.prank(address(user9)); - pool.leaveFromPending(10000000000000000000000); - } - - function test_stake(uint256 amount) public { - vm.assume(0 < amount); - vm.assume(amount < 10000000000000000000000); - vm.prank(SysMillionaire); - sys.transfer(address(user), amount); - address riskPool = pool.riskPool(); - uint256 balanceBefore = sys.balanceOf(riskPool); - assertEq(sys.balanceOf(user), amount); - vm.prank(address(user)); - sys.approve(address(pool), amount); - vm.prank(address(user)); - pool.enterInPool(amount); - - assertEq(sys.balanceOf(address(riskPool)), (balanceBefore + amount)); - } - - function test_stakeWithdrawal(uint256 amount) public { - vm.assume(amount < 50000000000000000000000); - vm.assume(amount > 10000000000000000000000); - - vm.prank(SysMillionaire); - sys.transfer(address(user), amount); - assertEq(sys.balanceOf(user), amount); - - vm.prank(address(user)); - sys.approve(address(pool), amount); - - vm.prank(address(user)); - pool.enterInPool(amount); - - uint256 expectedValueBefore = proxycapital._convertTokenToUSDC(address(sys), amount); - assertEq(proxycapital.totalCapitalStaked(), expectedValueBefore); - - vm.prank(address(user)); - vm.expectRevert(); //should revert by the mcr, as he's the only one staked - pool.leaveFromPoolInPending(amount); - - vm.prank(address(user)); - pool.leaveFromPoolInPending(amount / 48); - - skip(950400); //11 days - - vm.prank(address(user)); - pool.leaveFromPending(amount / 48); - - assertEq(sys.balanceOf(user), (amount / 48)); - - uint256 expectedValue = proxycapital._convertTokenToUSDC(address(sys), amount - (amount / 48)); - - assertEq(proxycapital.totalCapitalStaked(), expectedValue); - } - - function test_initialSetupAndStaking(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) public { - setupUsersAndStakes(amount, amount2, amount3, amount4); - - uint256 calcExpectedStake = 5000000000000000000000 + - (3 * amount) + - (2 * amount2) + - amount3 + - amount4 + - 10000000000000000000000; - - uint256 expectedStake = proxycapital._convertTokenToUSDC(address(sys), calcExpectedStake); - - assertEq(proxycapital.totalCapitalStaked(), expectedStake); - } - - function test_withdrawalProcess(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) public { - test_initialSetupAndStaking(amount, amount2, amount3, amount4); - - vm.prank(address(user2)); - pool.leaveFromPoolInPending(amount); - vm.prank(address(user3)); - pool.leaveFromPoolInPending(amount2); - vm.prank(address(user4)); - pool.leaveFromPoolInPending(amount); - - skip(950400); //11 days - vm.prank(address(user2)); - pool.leaveFromPending(amount); - vm.prank(address(user3)); - pool.leaveFromPending(amount2); - vm.prank(address(user4)); - pool.leaveFromPending(amount); - - vm.prank(address(user)); - vm.expectRevert(); - pool.leaveFromPoolInPending(50000000000000000000000); - - vm.prank(address(user)); - pool.leaveFromPoolInPending(5000000000000000000000); - } - - function test_cantWithdrawAmountBelowMCR(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) public { - setupUsersAndStakes(amount, amount2, amount3, amount4); - - uint256 stakedAfter = proxycapital.totalCapitalStaked(); - proxycapital.setMCR(stakedAfter / 2); - - vm.prank(SysMillionaire); - sys.transfer(address(user), 5000000000000); - vm.prank(address(user)); - sys.approve(address(pool), 5000000000000); - vm.prank(address(user)); - pool.enterInPool(500000000000); +// import "../../contracts/Mocks/MockUNO.sol"; +// import "../../contracts/Mocks/USDCRollux.sol"; +// import "../../contracts/Mocks/SupraPriceOracle.sol"; +// import "../../contracts/SingleSidedInsurancePool.sol"; +// import "../../contracts/Mocks/MockCapitalAgent.sol"; +// import "../../contracts/ExchangeAgent.sol"; +// import "../../contracts/uma/PayoutRequest.sol"; +// import "../../contracts/factories/SalesPolicyFactory.sol"; +// import "../../contracts/interfaces/ICapitalAgent.sol"; +// import "../../contracts/SalesPolicy.sol"; + +// import "lib/forge-std/src/Vm.sol"; +// import "forge-std/console.sol"; + +// import "lib/forge-std/src/Test.sol"; +// import "../../src/TransparentProxy.sol"; + +// contract NewMCRRollux is Test { +// MockUNO uno; +// USDCmock sys; +// SupraPriceOracle priceFeed; +// SingleSidedInsurancePool pool; +// MockCapitalAgent capitalAgent; +// TransparentProxy capitalAgentProxy; +// MockCapitalAgent proxycapital; +// ExchangeAgent exchange; +// PayoutRequest payout; +// SalesPolicyFactory salesFactory; +// SalesPolicy salesPolicy; + +// address user = address(1); +// address user2 = address(2); +// address user3 = address(3); +// address user4 = address(4); +// address user5 = address(5); +// address user6 = address(6); +// address user7 = address(7); +// address user8 = address(8); +// address user9 = address(9); +// address admin = address(this); +// address constant WSYS = 0x4200000000000000000000000000000000000006; +// address constant USDC = 0x368433CaC2A0B8D76E64681a9835502a1f2A8A30; +// address constant UNO = 0x570baA32dB74279a50491E88D712C957F4C9E409; +// address constant PRICE = 0x14eF9C6cD5A8C78af407cEcCA3E4668e466F2B18; +// address constant WSYSPOOL = 0x3B61743180857c9D898c336b1604f4742887aa74; +// address constant SALES_FACTORY = 0xD86D9be9143Dc514340C73502f2B77d93d0B11f4; +// uint256 constant MCR = 10000000; +// uint256 constant MLR = 1000000; +// address constant PREMIUM_POOL = 0xc94002a997d4e4E90D423778170588f695c5f242; +// address constant PAYOUT = 0xCaB9faf23a9803352f3f61Bc23782A9eb4a90fcC; +// address constant EXCHANGE_AGENT_ADDRESS = 0x83f618d714B9464C8e63F1d95592BaAa2d51a54E; +// address constant SALES = 0x5B170693E096D8602f970757068859b9A117fA6D; +// address constant MintAddress = 0x3ad22Ae2dE3dCF105E8DaA12acDd15bD47596863; +// address constant SysMillionaire = 0x3F0e40bC7e9cb5f46E906dAEd18651Fb6212Aa8E; +// address constant Multisig = 0x15E18e012cb6635b228e0DF0b6FC72627C8b2429; + +// function setUp() public { +// string memory CHAIN_URL = vm.envString("ROLLUXMAIN_URL"); + +// vm.createSelectFork(CHAIN_URL); +// priceFeed = SupraPriceOracle(PRICE); + +// vm.createSelectFork(CHAIN_URL); +// salesPolicy = SalesPolicy(payable(SALES)); + +// vm.createSelectFork(CHAIN_URL); +// salesFactory = SalesPolicyFactory(SALES_FACTORY); + +// vm.createSelectFork(CHAIN_URL); +// pool = SingleSidedInsurancePool(WSYSPOOL); + +// vm.createSelectFork(CHAIN_URL); +// sys = USDCmock(WSYS); + +// vm.createSelectFork(CHAIN_URL); +// exchange = ExchangeAgent(payable(EXCHANGE_AGENT_ADDRESS)); + +// vm.createSelectFork(CHAIN_URL); +// payout = PayoutRequest((PAYOUT)); + +// capitalAgent = new MockCapitalAgent(); +// capitalAgentProxy = new TransparentProxy(address(capitalAgent), address(this), ""); +// proxycapital = MockCapitalAgent(address(capitalAgentProxy)); +// proxycapital.initialize(address(exchange), USDC, address(this), address(this)); +// proxycapital.setMCR(MCR); +// proxycapital.setMLR(MLR); +// proxycapital.setSalesPolicyFactory(SALES_FACTORY); +// vm.prank(0x100c50947580d9158B7C26f79401404208CFbE62); +// payout.setCapitalAgent(ICapitalAgent(address(proxycapital))); + +// vm.prank(Multisig); +// salesFactory.setCapitalAgentInPolicy(address(proxycapital)); + +// vm.prank(Multisig); +// pool.setCapitalAgent(address(proxycapital)); +// proxycapital.addPoolByAdmin(address(pool), WSYS, 1000000); +// } + +// function setupUsersAndStakes(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) internal { +// vm.assume(amount > 0 && amount < 4000000000000000000000); //4k wsys +// vm.assume(amount2 > 0 && amount2 < 4000000000000000000000); +// vm.assume(amount3 > 0 && amount3 < 4000000000000000000000); +// vm.assume(amount4 > 0 && amount4 < 4000000000000000000000); + +// // Mint +// vm.prank(SysMillionaire); +// sys.transfer(address(user), 5000000000000000000000); //5k wsys +// vm.prank(SysMillionaire); +// sys.transfer(address(user2), amount); +// vm.prank(SysMillionaire); +// sys.transfer(address(user3), amount2); +// vm.prank(SysMillionaire); +// sys.transfer(address(user4), amount); +// vm.prank(SysMillionaire); +// sys.transfer(address(user5), amount2); +// vm.prank(SysMillionaire); +// sys.transfer(address(user6), amount4); +// vm.prank(SysMillionaire); +// sys.transfer(address(user7), amount); +// vm.prank(SysMillionaire); +// sys.transfer(address(user8), amount3); +// vm.prank(SysMillionaire); +// sys.transfer(address(user9), 10000000000000000000000); //10k wsys +// // Approve +// vm.prank(address(user)); +// sys.approve(address(pool), 5000000000000000000000); +// vm.prank(address(user2)); +// sys.approve(address(pool), amount); +// vm.prank(address(user3)); +// sys.approve(address(pool), amount2); +// vm.prank(address(user4)); +// sys.approve(address(pool), amount); +// vm.prank(address(user5)); +// sys.approve(address(pool), amount2); +// vm.prank(address(user6)); +// sys.approve(address(pool), amount4); +// vm.prank(address(user7)); +// sys.approve(address(pool), amount); +// vm.prank(address(user8)); +// sys.approve(address(pool), amount3); +// vm.prank(address(user9)); +// sys.approve(address(pool), 10000000000000000000000); + +// // Enter in pool +// vm.prank(address(user)); +// pool.enterInPool(5000000000000000000000); +// vm.prank(address(user2)); +// pool.enterInPool(amount); +// vm.prank(address(user3)); +// pool.enterInPool(amount2); +// vm.prank(address(user4)); +// pool.enterInPool(amount); +// vm.prank(address(user5)); +// pool.enterInPool(amount2); +// vm.prank(address(user6)); +// pool.enterInPool(amount4); +// vm.prank(address(user7)); +// pool.enterInPool(amount); +// vm.prank(address(user8)); +// pool.enterInPool(amount3); +// vm.prank(address(user9)); +// pool.enterInPool(10000000000000000000000); +// } + +// function setupStartWithdrawal(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) internal { +// vm.prank(address(user2)); +// pool.leaveFromPoolInPending(amount); +// vm.prank(address(user3)); +// pool.leaveFromPoolInPending(amount2); +// vm.prank(address(user4)); +// pool.leaveFromPoolInPending(amount); +// vm.prank(address(user5)); +// pool.leaveFromPoolInPending(amount2); +// vm.prank(address(user6)); +// pool.leaveFromPoolInPending(amount4); +// vm.prank(address(user7)); +// pool.leaveFromPoolInPending(amount); +// vm.prank(address(user8)); +// pool.leaveFromPoolInPending(amount3); +// vm.prank(address(user9)); +// pool.leaveFromPoolInPending(10000000000000000000000); +// } + +// function setupFinishWithdrawal(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) internal { +// vm.prank(address(user2)); +// pool.leaveFromPending(amount); +// vm.prank(address(user3)); +// pool.leaveFromPending(amount2); +// vm.prank(address(user4)); +// pool.leaveFromPending(amount); +// vm.prank(address(user5)); +// pool.leaveFromPending(amount2); +// vm.prank(address(user6)); +// pool.leaveFromPending(amount4); +// vm.prank(address(user7)); +// pool.leaveFromPending(amount); +// vm.prank(address(user8)); +// pool.leaveFromPending(amount3); +// vm.prank(address(user9)); +// pool.leaveFromPending(10000000000000000000000); +// } + +// function test_stake(uint256 amount) public { +// vm.assume(0 < amount); +// vm.assume(amount < 10000000000000000000000); +// vm.prank(SysMillionaire); +// sys.transfer(address(user), amount); +// address riskPool = pool.riskPool(); +// uint256 balanceBefore = sys.balanceOf(riskPool); +// assertEq(sys.balanceOf(user), amount); +// vm.prank(address(user)); +// sys.approve(address(pool), amount); +// vm.prank(address(user)); +// pool.enterInPool(amount); + +// assertEq(sys.balanceOf(address(riskPool)), (balanceBefore + amount)); +// } + +// function test_stakeWithdrawal(uint256 amount) public { +// vm.assume(amount < 50000000000000000000000); +// vm.assume(amount > 10000000000000000000000); + +// vm.prank(SysMillionaire); +// sys.transfer(address(user), amount); +// assertEq(sys.balanceOf(user), amount); + +// vm.prank(address(user)); +// sys.approve(address(pool), amount); + +// vm.prank(address(user)); +// pool.enterInPool(amount); + +// uint256 expectedValueBefore = proxycapital._convertTokenToUSDC(address(sys), amount); +// assertEq(proxycapital.totalCapitalStaked(), expectedValueBefore); + +// vm.prank(address(user)); +// vm.expectRevert(); //should revert by the mcr, as he's the only one staked +// pool.leaveFromPoolInPending(amount); + +// vm.prank(address(user)); +// pool.leaveFromPoolInPending(amount / 48); + +// skip(950400); //11 days + +// vm.prank(address(user)); +// pool.leaveFromPending(amount / 48); + +// assertEq(sys.balanceOf(user), (amount / 48)); + +// uint256 expectedValue = proxycapital._convertTokenToUSDC(address(sys), amount - (amount / 48)); + +// assertEq(proxycapital.totalCapitalStaked(), expectedValue); +// } + +// function test_initialSetupAndStaking(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) public { +// setupUsersAndStakes(amount, amount2, amount3, amount4); + +// uint256 calcExpectedStake = 5000000000000000000000 + +// (3 * amount) + +// (2 * amount2) + +// amount3 + +// amount4 + +// 10000000000000000000000; + +// uint256 expectedStake = proxycapital._convertTokenToUSDC(address(sys), calcExpectedStake); + +// assertEq(proxycapital.totalCapitalStaked(), expectedStake); +// } + +// function test_withdrawalProcess(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) public { +// test_initialSetupAndStaking(amount, amount2, amount3, amount4); + +// vm.prank(address(user2)); +// pool.leaveFromPoolInPending(amount); +// vm.prank(address(user3)); +// pool.leaveFromPoolInPending(amount2); +// vm.prank(address(user4)); +// pool.leaveFromPoolInPending(amount); + +// skip(950400); //11 days +// vm.prank(address(user2)); +// pool.leaveFromPending(amount); +// vm.prank(address(user3)); +// pool.leaveFromPending(amount2); +// vm.prank(address(user4)); +// pool.leaveFromPending(amount); + +// vm.prank(address(user)); +// vm.expectRevert(); +// pool.leaveFromPoolInPending(50000000000000000000000); + +// vm.prank(address(user)); +// pool.leaveFromPoolInPending(5000000000000000000000); +// } + +// function test_cantWithdrawAmountBelowMCR(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) public { +// setupUsersAndStakes(amount, amount2, amount3, amount4); + +// uint256 stakedAfter = proxycapital.totalCapitalStaked(); +// proxycapital.setMCR(stakedAfter / 2); + +// vm.prank(SysMillionaire); +// sys.transfer(address(user), 5000000000000); +// vm.prank(address(user)); +// sys.approve(address(pool), 5000000000000); +// vm.prank(address(user)); +// pool.enterInPool(500000000000); - uint256 totalUserStaked = (500000000000 + 5000000000000000000000); +// uint256 totalUserStaked = (500000000000 + 5000000000000000000000); - //Here user will withdrawal all of his money and should not fail by the MCR - vm.prank(address(user)); - pool.leaveFromPoolInPending(500000000000); - skip(950400); //11 days - vm.prank(address(user)); - pool.leaveFromPending(500000000000); +// //Here user will withdrawal all of his money and should not fail by the MCR +// vm.prank(address(user)); +// pool.leaveFromPoolInPending(500000000000); +// skip(950400); //11 days +// vm.prank(address(user)); +// pool.leaveFromPending(500000000000); - proxycapital.totalCapitalStaked(); - proxycapital.MCR(); +// proxycapital.totalCapitalStaked(); +// proxycapital.MCR(); - //Here other users will withdrawal all of their money - setupStartWithdrawal(amount, amount2, amount3, amount4); - skip(950400); //11 days - setupFinishWithdrawal(amount, amount2, amount3, amount4); +// //Here other users will withdrawal all of their money +// setupStartWithdrawal(amount, amount2, amount3, amount4); +// skip(950400); //11 days +// setupFinishWithdrawal(amount, amount2, amount3, amount4); - proxycapital.totalCapitalStaked(); - proxycapital.getPoolInfo(address(pool)); - proxycapital.MCR(); +// proxycapital.totalCapitalStaked(); +// proxycapital.getPoolInfo(address(pool)); +// proxycapital.MCR(); - //Here user will withdrawal all of his money and it should fail by the MCR - vm.prank(address(user)); - vm.expectRevert(); - pool.leaveFromPoolInPending((totalUserStaked - 500000000000)); - } +// //Here user will withdrawal all of his money and it should fail by the MCR +// vm.prank(address(user)); +// vm.expectRevert(); +// pool.leaveFromPoolInPending((totalUserStaked - 500000000000)); +// } - function test_shouldNotFailWithdrawalCompletion(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) public { - setupUsersAndStakes(amount, amount2, amount3, amount4); +// function test_shouldNotFailWithdrawalCompletion(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) public { +// setupUsersAndStakes(amount, amount2, amount3, amount4); - uint256 stakedAfter = proxycapital.totalCapitalStaked(); - proxycapital.setMCR(stakedAfter / 2); +// uint256 stakedAfter = proxycapital.totalCapitalStaked(); +// proxycapital.setMCR(stakedAfter / 2); - vm.prank(SysMillionaire); - sys.transfer(address(user), 5000000000000); - vm.prank(address(user)); - sys.approve(address(pool), 5000000000000); - vm.prank(address(user)); - pool.enterInPool(500000000000); - - uint256 totalUserStaked = (500000000000 + 5000000000000000000000); - - proxycapital.totalCapitalStaked(); - proxycapital.totalCapitalStakedByCurrency(WSYS); - proxycapital.MCR(); - - //Here other users will start to withdrawal all of their money, but won't finish withdrawing yet - - setupStartWithdrawal(amount, amount2, amount3, amount4); - skip(950400); //11 days - - vm.prank(address(user)); - //this call should fail by the MCR as other users withdrew, but it doesn't - pool.leaveFromPoolInPending(totalUserStaked / 48); - skip(950400); //11 days - - vm.prank(address(user)); - pool.leaveFromPending(totalUserStaked / 48); - setupFinishWithdrawal(amount, amount2, amount3, amount4); - } -} +// vm.prank(SysMillionaire); +// sys.transfer(address(user), 5000000000000); +// vm.prank(address(user)); +// sys.approve(address(pool), 5000000000000); +// vm.prank(address(user)); +// pool.enterInPool(500000000000); + +// uint256 totalUserStaked = (500000000000 + 5000000000000000000000); + +// proxycapital.totalCapitalStaked(); +// proxycapital.totalCapitalStakedByCurrency(WSYS); +// proxycapital.MCR(); + +// //Here other users will start to withdrawal all of their money, but won't finish withdrawing yet + +// setupStartWithdrawal(amount, amount2, amount3, amount4); +// skip(950400); //11 days + +// vm.prank(address(user)); +// //this call should fail by the MCR as other users withdrew, but it doesn't +// pool.leaveFromPoolInPending(totalUserStaked / 48); +// skip(950400); //11 days + +// vm.prank(address(user)); +// pool.leaveFromPending(totalUserStaked / 48); +// setupFinishWithdrawal(amount, amount2, amount3, amount4); +// } +// } diff --git a/test/foundry/rollux/NewMCRRollux.t.sol b/test/foundry/rollux/NewMCRRollux.t.sol index 310c7be..55996fc 100644 --- a/test/foundry/rollux/NewMCRRollux.t.sol +++ b/test/foundry/rollux/NewMCRRollux.t.sol @@ -1,351 +1,351 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity =0.8.23; -import "../../../contracts/Mocks/MockUNO.sol"; -import "../../../contracts/Mocks/USDCRollux.sol"; -import "../../../contracts/Mocks/SupraPriceOracle.sol"; -import "../../../contracts/SingleSidedInsurancePool.sol"; -import "../../../contracts/CapitalAgent.sol"; -import "../../../contracts/ExchangeAgent.sol"; -import "../../../contracts/uma/PayoutRequest.sol"; -import "../../../contracts/factories/SalesPolicyFactory.sol"; -import "../../../contracts/interfaces/ICapitalAgent.sol"; -import "../../../contracts/SalesPolicy.sol"; - -import "lib/forge-std/src/Vm.sol"; -import "forge-std/console.sol"; - -import "lib/forge-std/src/Test.sol"; -import "../../../src/TransparentProxy.sol"; - -contract NewMCRRollux is Test { - MockUNO uno; - USDCmock usdc; - SupraPriceOracle priceFeed; - SingleSidedInsurancePool pool; - CapitalAgent capitalAgent; - TransparentProxy capitalAgentProxy; - CapitalAgent proxycapital; - ExchangeAgent exchange; - PayoutRequest payout; - SalesPolicyFactory salesFactory; - SalesPolicy salesPolicy; - - address user = address(1); - address user2 = address(2); - address user3 = address(3); - address user4 = address(4); - address user5 = address(5); - address user6 = address(6); - address user7 = address(7); - address user8 = address(8); - address user9 = address(9); - address admin = address(this); - address constant USDC = 0x368433CaC2A0B8D76E64681a9835502a1f2A8A30; - address constant UNO = 0x570baA32dB74279a50491E88D712C957F4C9E409; - address constant PRICE = 0x9A2F48a2F66Ef86A6664Bb6FbC49a7407d6E33B5; - address constant USDCPOOL = 0x2c89687036445089c962F4621B1F03571BBa798e; - address constant SALES_FACTORY = 0xD86D9be9143Dc514340C73502f2B77d93d0B11f4; - uint256 constant MCR = 10000000; - uint256 constant MLR = 1000000; - address constant PREMIUM_POOL = 0xc94002a997d4e4E90D423778170588f695c5f242; - address constant PAYOUT = 0x1024a3a9D000aD3cd6Ac88490F86aD9FEAef7DCA; - address constant EXCHANGE_AGENT_ADDRESS = 0x826404CB1924e8b2773250c9d15503E5CDe7eE20; - address constant SALES = 0x5B170693E096D8602f970757068859b9A117fA6D; - // address constant MintAddress = 0x3ad22Ae2dE3dCF105E8DaA12acDd15bD47596863; - address constant USDCMillionaire = 0x3F0e40bC7e9cb5f46E906dAEd18651Fb6212Aa8E; - address constant MULTISIG = 0x100c50947580d9158B7C26f79401404208CFbE62; - function setUp() public { - string memory CHAIN_URL = vm.envString("ROLLUXMAIN_URL"); - - vm.createSelectFork(CHAIN_URL); - priceFeed = SupraPriceOracle(PRICE); - - vm.createSelectFork(CHAIN_URL); - salesPolicy = SalesPolicy(payable(SALES)); - - vm.createSelectFork(CHAIN_URL); - salesFactory = SalesPolicyFactory(SALES_FACTORY); - - vm.createSelectFork(CHAIN_URL); - pool = SingleSidedInsurancePool(USDCPOOL); - - vm.createSelectFork(CHAIN_URL); - usdc = USDCmock(USDC); - - vm.createSelectFork(CHAIN_URL); - exchange = ExchangeAgent(payable(EXCHANGE_AGENT_ADDRESS)); - - vm.createSelectFork(CHAIN_URL); - payout = PayoutRequest((PAYOUT)); - - capitalAgent = new CapitalAgent(); - capitalAgentProxy = new TransparentProxy(address(capitalAgent), address(this), ""); - proxycapital = CapitalAgent(address(capitalAgentProxy)); - proxycapital.initialize(address(exchange), USDC, address(this), address(this)); - proxycapital.setMCR(MCR); - proxycapital.setMLR(MLR); - proxycapital.setSalesPolicyFactory(SALES_FACTORY); - vm.prank(MULTISIG); - payout.setCapitalAgent(ICapitalAgent(address(proxycapital))); - - vm.prank(0x15E18e012cb6635b228e0DF0b6FC72627C8b2429); - salesFactory.setCapitalAgentInPolicy(address(proxycapital)); - - vm.prank(0x15E18e012cb6635b228e0DF0b6FC72627C8b2429); - pool.setCapitalAgent(address(proxycapital)); - proxycapital.addPoolByAdmin(USDCPOOL, USDC, 1000000); - } - - function setupUsersAndStakes(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) internal { - vm.assume(amount > 0 && amount < 500000000); - vm.assume(amount2 > 0 && amount2 < 500000000); - vm.assume(amount3 > 0 && amount3 < 500000000); - vm.assume(amount4 > 0 && amount4 < 500000000); - - // Mint - vm.prank(USDCMillionaire); - usdc.transfer(address(user), 500000000); - vm.prank(USDCMillionaire); - usdc.transfer(address(user2), amount); - vm.prank(USDCMillionaire); - usdc.transfer(address(user3), amount2); - vm.prank(USDCMillionaire); - usdc.transfer(address(user4), amount); - vm.prank(USDCMillionaire); - usdc.transfer(address(user5), amount2); - vm.prank(USDCMillionaire); - usdc.transfer(address(user6), amount4); - vm.prank(USDCMillionaire); - usdc.transfer(address(user7), amount); - vm.prank(USDCMillionaire); - usdc.transfer(address(user8), amount3); - vm.prank(USDCMillionaire); - usdc.transfer(address(user9), 10000000); - // Approve - vm.prank(address(user)); - usdc.approve(address(pool), 500000000); - vm.prank(address(user2)); - usdc.approve(address(pool), amount); - vm.prank(address(user3)); - usdc.approve(address(pool), amount2); - vm.prank(address(user4)); - usdc.approve(address(pool), amount); - vm.prank(address(user5)); - usdc.approve(address(pool), amount2); - vm.prank(address(user6)); - usdc.approve(address(pool), amount4); - vm.prank(address(user7)); - usdc.approve(address(pool), amount); - vm.prank(address(user8)); - usdc.approve(address(pool), amount3); - vm.prank(address(user9)); - usdc.approve(address(pool), 10000000); - - // Enter in pool - vm.prank(address(user)); - pool.enterInPool(500000000); - vm.prank(address(user2)); - pool.enterInPool(amount); - vm.prank(address(user3)); - pool.enterInPool(amount2); - vm.prank(address(user4)); - pool.enterInPool(amount); - vm.prank(address(user5)); - pool.enterInPool(amount2); - vm.prank(address(user6)); - pool.enterInPool(amount4); - vm.prank(address(user7)); - pool.enterInPool(amount); - vm.prank(address(user8)); - pool.enterInPool(amount3); - vm.prank(address(user9)); - pool.enterInPool(10000000); - } - - function setupStartWithdrawal(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) internal { - vm.prank(address(user2)); - pool.leaveFromPoolInPending(amount); - vm.prank(address(user3)); - pool.leaveFromPoolInPending(amount2); - vm.prank(address(user4)); - pool.leaveFromPoolInPending(amount); - vm.prank(address(user5)); - pool.leaveFromPoolInPending(amount2); - vm.prank(address(user6)); - pool.leaveFromPoolInPending(amount4); - vm.prank(address(user7)); - pool.leaveFromPoolInPending(amount); - vm.prank(address(user8)); - pool.leaveFromPoolInPending(amount3); - vm.prank(address(user9)); - pool.leaveFromPoolInPending(10000000); - } - - function setupFinishWithdrawal(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) internal { - vm.prank(address(user2)); - pool.leaveFromPending(amount); - vm.prank(address(user3)); - pool.leaveFromPending(amount2); - vm.prank(address(user4)); - pool.leaveFromPending(amount); - vm.prank(address(user5)); - pool.leaveFromPending(amount2); - vm.prank(address(user6)); - pool.leaveFromPending(amount4); - vm.prank(address(user7)); - pool.leaveFromPending(amount); - vm.prank(address(user8)); - pool.leaveFromPending(amount3); - vm.prank(address(user9)); - pool.leaveFromPending(10000000); - } - - function test_stake(uint256 amount) public { - vm.assume(amount < 10000000); - vm.assume(0 < amount); - vm.prank(USDCMillionaire); - usdc.transfer(address(user), amount); - address riskPool = pool.riskPool(); - uint256 balanceBefore = usdc.balanceOf(riskPool); - assertEq(usdc.balanceOf(user), amount); - vm.prank(address(user)); - usdc.approve(address(pool), amount); - vm.prank(address(user)); - pool.enterInPool(amount); - - assertEq(usdc.balanceOf(address(riskPool)), (balanceBefore + amount)); - } - - function test_stakeWithdrawal(uint256 amount) public { - vm.assume(amount < 10000000000); - vm.assume(amount > 0); - vm.prank(USDCMillionaire); - usdc.transfer(address(user), 10000000000); - assertEq(usdc.balanceOf(user), 10000000000); - vm.prank(address(user)); - usdc.approve(address(pool), 10000000000); - vm.prank(address(user)); - pool.enterInPool(10000000000); - assertEq(proxycapital.totalCapitalStaked(), 10000000000); - vm.prank(address(user)); - pool.leaveFromPoolInPending(amount); - skip(900000); - vm.prank(address(user)); - pool.leaveFromPending(amount); - assertEq(usdc.balanceOf(user), amount); - assertEq(proxycapital.totalCapitalStaked(), (10000000000 - amount)); - } - - function test_initialSetupAndStaking(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) public { - setupUsersAndStakes(amount, amount2, amount3, amount4); - - uint256 expectedStake = 500000000 + (3 * amount) + (2 * amount2) + amount3 + amount4 + 10000000; - assertEq(proxycapital.totalCapitalStaked(), expectedStake); - } - - function test_withdrawalProcess(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) public { - test_initialSetupAndStaking(amount, amount2, amount3, amount4); - - vm.prank(address(user2)); - pool.leaveFromPoolInPending(amount); - vm.prank(address(user3)); - pool.leaveFromPoolInPending(amount2); - vm.prank(address(user4)); - pool.leaveFromPoolInPending(amount); - - skip(900000); - vm.prank(address(user2)); - pool.leaveFromPending(amount); - vm.prank(address(user3)); - pool.leaveFromPending(amount2); - vm.prank(address(user4)); - pool.leaveFromPending(amount); - - vm.prank(address(user)); - vm.expectRevert(); - pool.leaveFromPoolInPending(5000000000); - - vm.prank(address(user)); - pool.leaveFromPoolInPending(50000000); - } - - function test_cantWithdrawAmountBelowMCR(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) public { - setupUsersAndStakes(amount, amount2, amount3, amount4); - - uint256 stakedAfter = proxycapital.totalCapitalStaked(); - - proxycapital.setMCR(stakedAfter / 2); - - vm.prank(USDCMillionaire); - usdc.transfer(address(user), 500000000); - vm.prank(address(user)); - usdc.approve(address(pool), 500000000); - vm.prank(address(user)); - pool.enterInPool(500000000); - - uint256 totalUserStaked = (2 * 500000000); - - //Here user will withdrawal all of his money and should not fail by the MCR - vm.prank(address(user)); - pool.leaveFromPoolInPending(totalUserStaked); - skip(900000); - vm.prank(address(user)); - pool.leaveFromPending(totalUserStaked); - - //here user stake all his money again - vm.prank(address(user)); - usdc.approve(address(pool), totalUserStaked); - vm.prank(address(user)); - pool.enterInPool(totalUserStaked); - - proxycapital.totalCapitalStaked(); - proxycapital.MCR(); - - //Here other users will withdrawal all of their money - setupStartWithdrawal(amount, amount2, amount3, amount4); - skip(900000); - setupFinishWithdrawal(amount, amount2, amount3, amount4); - proxycapital.totalCapitalStaked(); - - //Here user will withdrawal all of his money and it should fail by the MCR - vm.prank(address(user)); - vm.expectRevert(); - pool.leaveFromPoolInPending(totalUserStaked); - } - - function test_shouldNotFailWithdrawalCompletion(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) public { - setupUsersAndStakes(amount, amount2, amount3, amount4); - - uint256 stakedAfter = proxycapital.totalCapitalStaked(); - - proxycapital.setMCR(stakedAfter / 2); - - vm.prank(USDCMillionaire); - usdc.transfer(address(user), 500000000); - vm.prank(address(user)); - usdc.approve(address(pool), 500000000); - vm.prank(address(user)); - pool.enterInPool(500000000); - - uint256 totalUserStaked = (2 * 500000000); - - proxycapital.totalCapitalStaked(); - proxycapital.MCR(); - - //Here other users will start to withdrawal all of their money, but won't finish withdrawing yet +// import "../../../contracts/Mocks/MockUNO.sol"; +// import "../../../contracts/Mocks/USDCRollux.sol"; +// import "../../../contracts/Mocks/SupraPriceOracle.sol"; +// import "../../../contracts/SingleSidedInsurancePool.sol"; +// import "../../../contracts/CapitalAgent.sol"; +// import "../../../contracts/ExchangeAgent.sol"; +// import "../../../contracts/uma/PayoutRequest.sol"; +// import "../../../contracts/factories/SalesPolicyFactory.sol"; +// import "../../../contracts/interfaces/ICapitalAgent.sol"; +// import "../../../contracts/SalesPolicy.sol"; + +// import "lib/forge-std/src/Vm.sol"; +// import "forge-std/console.sol"; + +// import "lib/forge-std/src/Test.sol"; +// import "../../../src/TransparentProxy.sol"; + +// contract NewMCRRollux is Test { +// MockUNO uno; +// USDCmock usdc; +// SupraPriceOracle priceFeed; +// SingleSidedInsurancePool pool; +// CapitalAgent capitalAgent; +// TransparentProxy capitalAgentProxy; +// CapitalAgent proxycapital; +// ExchangeAgent exchange; +// PayoutRequest payout; +// SalesPolicyFactory salesFactory; +// SalesPolicy salesPolicy; + +// address user = address(1); +// address user2 = address(2); +// address user3 = address(3); +// address user4 = address(4); +// address user5 = address(5); +// address user6 = address(6); +// address user7 = address(7); +// address user8 = address(8); +// address user9 = address(9); +// address admin = address(this); +// address constant USDC = 0x368433CaC2A0B8D76E64681a9835502a1f2A8A30; +// address constant UNO = 0x570baA32dB74279a50491E88D712C957F4C9E409; +// address constant PRICE = 0x9A2F48a2F66Ef86A6664Bb6FbC49a7407d6E33B5; +// address constant USDCPOOL = 0x2c89687036445089c962F4621B1F03571BBa798e; +// address constant SALES_FACTORY = 0xD86D9be9143Dc514340C73502f2B77d93d0B11f4; +// uint256 constant MCR = 10000000; +// uint256 constant MLR = 1000000; +// address constant PREMIUM_POOL = 0xc94002a997d4e4E90D423778170588f695c5f242; +// address constant PAYOUT = 0x1024a3a9D000aD3cd6Ac88490F86aD9FEAef7DCA; +// address constant EXCHANGE_AGENT_ADDRESS = 0x826404CB1924e8b2773250c9d15503E5CDe7eE20; +// address constant SALES = 0x5B170693E096D8602f970757068859b9A117fA6D; +// // address constant MintAddress = 0x3ad22Ae2dE3dCF105E8DaA12acDd15bD47596863; +// address constant USDCMillionaire = 0x3F0e40bC7e9cb5f46E906dAEd18651Fb6212Aa8E; +// address constant MULTISIG = 0x100c50947580d9158B7C26f79401404208CFbE62; +// function setUp() public { +// string memory CHAIN_URL = vm.envString("ROLLUXMAIN_URL"); + +// vm.createSelectFork(CHAIN_URL); +// priceFeed = SupraPriceOracle(PRICE); + +// vm.createSelectFork(CHAIN_URL); +// salesPolicy = SalesPolicy(payable(SALES)); + +// vm.createSelectFork(CHAIN_URL); +// salesFactory = SalesPolicyFactory(SALES_FACTORY); + +// vm.createSelectFork(CHAIN_URL); +// pool = SingleSidedInsurancePool(USDCPOOL); + +// vm.createSelectFork(CHAIN_URL); +// usdc = USDCmock(USDC); + +// vm.createSelectFork(CHAIN_URL); +// exchange = ExchangeAgent(payable(EXCHANGE_AGENT_ADDRESS)); + +// vm.createSelectFork(CHAIN_URL); +// payout = PayoutRequest((PAYOUT)); + +// capitalAgent = new CapitalAgent(); +// capitalAgentProxy = new TransparentProxy(address(capitalAgent), address(this), ""); +// proxycapital = CapitalAgent(address(capitalAgentProxy)); +// proxycapital.initialize(address(exchange), USDC, address(this), address(this)); +// proxycapital.setMCR(MCR); +// proxycapital.setMLR(MLR); +// proxycapital.setSalesPolicyFactory(SALES_FACTORY); +// vm.prank(MULTISIG); +// payout.setCapitalAgent(ICapitalAgent(address(proxycapital))); + +// vm.prank(0x15E18e012cb6635b228e0DF0b6FC72627C8b2429); +// salesFactory.setCapitalAgentInPolicy(address(proxycapital)); + +// vm.prank(0x15E18e012cb6635b228e0DF0b6FC72627C8b2429); +// pool.setCapitalAgent(address(proxycapital)); +// proxycapital.addPoolByAdmin(USDCPOOL, USDC, 1000000); +// } + +// function setupUsersAndStakes(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) internal { +// vm.assume(amount > 0 && amount < 500000000); +// vm.assume(amount2 > 0 && amount2 < 500000000); +// vm.assume(amount3 > 0 && amount3 < 500000000); +// vm.assume(amount4 > 0 && amount4 < 500000000); + +// // Mint +// vm.prank(USDCMillionaire); +// usdc.transfer(address(user), 500000000); +// vm.prank(USDCMillionaire); +// usdc.transfer(address(user2), amount); +// vm.prank(USDCMillionaire); +// usdc.transfer(address(user3), amount2); +// vm.prank(USDCMillionaire); +// usdc.transfer(address(user4), amount); +// vm.prank(USDCMillionaire); +// usdc.transfer(address(user5), amount2); +// vm.prank(USDCMillionaire); +// usdc.transfer(address(user6), amount4); +// vm.prank(USDCMillionaire); +// usdc.transfer(address(user7), amount); +// vm.prank(USDCMillionaire); +// usdc.transfer(address(user8), amount3); +// vm.prank(USDCMillionaire); +// usdc.transfer(address(user9), 10000000); +// // Approve +// vm.prank(address(user)); +// usdc.approve(address(pool), 500000000); +// vm.prank(address(user2)); +// usdc.approve(address(pool), amount); +// vm.prank(address(user3)); +// usdc.approve(address(pool), amount2); +// vm.prank(address(user4)); +// usdc.approve(address(pool), amount); +// vm.prank(address(user5)); +// usdc.approve(address(pool), amount2); +// vm.prank(address(user6)); +// usdc.approve(address(pool), amount4); +// vm.prank(address(user7)); +// usdc.approve(address(pool), amount); +// vm.prank(address(user8)); +// usdc.approve(address(pool), amount3); +// vm.prank(address(user9)); +// usdc.approve(address(pool), 10000000); + +// // Enter in pool +// vm.prank(address(user)); +// pool.enterInPool(500000000); +// vm.prank(address(user2)); +// pool.enterInPool(amount); +// vm.prank(address(user3)); +// pool.enterInPool(amount2); +// vm.prank(address(user4)); +// pool.enterInPool(amount); +// vm.prank(address(user5)); +// pool.enterInPool(amount2); +// vm.prank(address(user6)); +// pool.enterInPool(amount4); +// vm.prank(address(user7)); +// pool.enterInPool(amount); +// vm.prank(address(user8)); +// pool.enterInPool(amount3); +// vm.prank(address(user9)); +// pool.enterInPool(10000000); +// } + +// function setupStartWithdrawal(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) internal { +// vm.prank(address(user2)); +// pool.leaveFromPoolInPending(amount); +// vm.prank(address(user3)); +// pool.leaveFromPoolInPending(amount2); +// vm.prank(address(user4)); +// pool.leaveFromPoolInPending(amount); +// vm.prank(address(user5)); +// pool.leaveFromPoolInPending(amount2); +// vm.prank(address(user6)); +// pool.leaveFromPoolInPending(amount4); +// vm.prank(address(user7)); +// pool.leaveFromPoolInPending(amount); +// vm.prank(address(user8)); +// pool.leaveFromPoolInPending(amount3); +// vm.prank(address(user9)); +// pool.leaveFromPoolInPending(10000000); +// } + +// function setupFinishWithdrawal(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) internal { +// vm.prank(address(user2)); +// pool.leaveFromPending(amount); +// vm.prank(address(user3)); +// pool.leaveFromPending(amount2); +// vm.prank(address(user4)); +// pool.leaveFromPending(amount); +// vm.prank(address(user5)); +// pool.leaveFromPending(amount2); +// vm.prank(address(user6)); +// pool.leaveFromPending(amount4); +// vm.prank(address(user7)); +// pool.leaveFromPending(amount); +// vm.prank(address(user8)); +// pool.leaveFromPending(amount3); +// vm.prank(address(user9)); +// pool.leaveFromPending(10000000); +// } + +// function test_stake(uint256 amount) public { +// vm.assume(amount < 10000000); +// vm.assume(0 < amount); +// vm.prank(USDCMillionaire); +// usdc.transfer(address(user), amount); +// address riskPool = pool.riskPool(); +// uint256 balanceBefore = usdc.balanceOf(riskPool); +// assertEq(usdc.balanceOf(user), amount); +// vm.prank(address(user)); +// usdc.approve(address(pool), amount); +// vm.prank(address(user)); +// pool.enterInPool(amount); + +// assertEq(usdc.balanceOf(address(riskPool)), (balanceBefore + amount)); +// } + +// function test_stakeWithdrawal(uint256 amount) public { +// vm.assume(amount < 10000000000); +// vm.assume(amount > 0); +// vm.prank(USDCMillionaire); +// usdc.transfer(address(user), 10000000000); +// assertEq(usdc.balanceOf(user), 10000000000); +// vm.prank(address(user)); +// usdc.approve(address(pool), 10000000000); +// vm.prank(address(user)); +// pool.enterInPool(10000000000); +// assertEq(proxycapital.totalCapitalStaked(), 10000000000); +// vm.prank(address(user)); +// pool.leaveFromPoolInPending(amount); +// skip(900000); +// vm.prank(address(user)); +// pool.leaveFromPending(amount); +// assertEq(usdc.balanceOf(user), amount); +// assertEq(proxycapital.totalCapitalStaked(), (10000000000 - amount)); +// } + +// function test_initialSetupAndStaking(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) public { +// setupUsersAndStakes(amount, amount2, amount3, amount4); + +// uint256 expectedStake = 500000000 + (3 * amount) + (2 * amount2) + amount3 + amount4 + 10000000; +// assertEq(proxycapital.totalCapitalStaked(), expectedStake); +// } + +// function test_withdrawalProcess(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) public { +// test_initialSetupAndStaking(amount, amount2, amount3, amount4); + +// vm.prank(address(user2)); +// pool.leaveFromPoolInPending(amount); +// vm.prank(address(user3)); +// pool.leaveFromPoolInPending(amount2); +// vm.prank(address(user4)); +// pool.leaveFromPoolInPending(amount); + +// skip(900000); +// vm.prank(address(user2)); +// pool.leaveFromPending(amount); +// vm.prank(address(user3)); +// pool.leaveFromPending(amount2); +// vm.prank(address(user4)); +// pool.leaveFromPending(amount); + +// vm.prank(address(user)); +// vm.expectRevert(); +// pool.leaveFromPoolInPending(5000000000); + +// vm.prank(address(user)); +// pool.leaveFromPoolInPending(50000000); +// } + +// function test_cantWithdrawAmountBelowMCR(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) public { +// setupUsersAndStakes(amount, amount2, amount3, amount4); + +// uint256 stakedAfter = proxycapital.totalCapitalStaked(); + +// proxycapital.setMCR(stakedAfter / 2); + +// vm.prank(USDCMillionaire); +// usdc.transfer(address(user), 500000000); +// vm.prank(address(user)); +// usdc.approve(address(pool), 500000000); +// vm.prank(address(user)); +// pool.enterInPool(500000000); + +// uint256 totalUserStaked = (2 * 500000000); + +// //Here user will withdrawal all of his money and should not fail by the MCR +// vm.prank(address(user)); +// pool.leaveFromPoolInPending(totalUserStaked); +// skip(900000); +// vm.prank(address(user)); +// pool.leaveFromPending(totalUserStaked); + +// //here user stake all his money again +// vm.prank(address(user)); +// usdc.approve(address(pool), totalUserStaked); +// vm.prank(address(user)); +// pool.enterInPool(totalUserStaked); + +// proxycapital.totalCapitalStaked(); +// proxycapital.MCR(); + +// //Here other users will withdrawal all of their money +// setupStartWithdrawal(amount, amount2, amount3, amount4); +// skip(900000); +// setupFinishWithdrawal(amount, amount2, amount3, amount4); +// proxycapital.totalCapitalStaked(); + +// //Here user will withdrawal all of his money and it should fail by the MCR +// vm.prank(address(user)); +// vm.expectRevert(); +// pool.leaveFromPoolInPending(totalUserStaked); +// } + +// function test_shouldNotFailWithdrawalCompletion(uint256 amount, uint256 amount2, uint256 amount3, uint256 amount4) public { +// setupUsersAndStakes(amount, amount2, amount3, amount4); + +// uint256 stakedAfter = proxycapital.totalCapitalStaked(); + +// proxycapital.setMCR(stakedAfter / 2); + +// vm.prank(USDCMillionaire); +// usdc.transfer(address(user), 500000000); +// vm.prank(address(user)); +// usdc.approve(address(pool), 500000000); +// vm.prank(address(user)); +// pool.enterInPool(500000000); + +// uint256 totalUserStaked = (2 * 500000000); + +// proxycapital.totalCapitalStaked(); +// proxycapital.MCR(); + +// //Here other users will start to withdrawal all of their money, but won't finish withdrawing yet - setupStartWithdrawal(amount, amount2, amount3, amount4); - skip(900000); - - vm.prank(address(user)); - //this call should fail by the MCR as other users withdrew, but it doesn't - pool.leaveFromPoolInPending(totalUserStaked); - skip(900000); +// setupStartWithdrawal(amount, amount2, amount3, amount4); +// skip(900000); + +// vm.prank(address(user)); +// //this call should fail by the MCR as other users withdrew, but it doesn't +// pool.leaveFromPoolInPending(totalUserStaked); +// skip(900000); - vm.prank(address(user)); - pool.leaveFromPending(totalUserStaked); - - setupFinishWithdrawal(amount, amount2, amount3, amount4); - } -} +// vm.prank(address(user)); +// pool.leaveFromPending(totalUserStaked); + +// setupFinishWithdrawal(amount, amount2, amount3, amount4); +// } +// } diff --git a/yarn.lock b/yarn.lock index f560ce6..edbd6b9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -61,7 +61,7 @@ resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz" integrity sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw== -"@babel/core@^7.0.0", "@babel/core@^7.12.13": +"@babel/core@^7.12.13": version "7.23.7" resolved "https://registry.npmjs.org/@babel/core/-/core-7.23.7.tgz" integrity sha512-+UpDgowcmqe36d4NwqvKsyPMlOLNGMsfMmQ5WGCu+siCe3t3dfe9njrzGfdN4qq+bcNUt0+Vw6haRxBOycs4dw== @@ -354,21 +354,6 @@ ethereum-cryptography "^2.0.0" micro-ftch "^0.3.1" -"@ethersproject/abi@^5.1.2", "@ethersproject/abi@^5.5.0", "@ethersproject/abi@^5.7.0", "@ethersproject/abi@5.7.0": - version "5.7.0" - resolved "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.7.0.tgz" - integrity sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA== - dependencies: - "@ethersproject/address" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/constants" "^5.7.0" - "@ethersproject/hash" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - "@ethersproject/abi@5.0.0-beta.153": version "5.0.0-beta.153" resolved "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.0-beta.153.tgz" @@ -384,18 +369,22 @@ "@ethersproject/properties" ">=5.0.0-beta.131" "@ethersproject/strings" ">=5.0.0-beta.130" -"@ethersproject/abstract-provider@^5.0.8": - version "5.0.8" +"@ethersproject/abi@5.7.0", "@ethersproject/abi@^5.1.2", "@ethersproject/abi@^5.5.0", "@ethersproject/abi@^5.7.0": + version "5.7.0" + resolved "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.7.0.tgz" + integrity sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA== dependencies: - "@ethersproject/bignumber" "^5.0.13" - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/logger" "^5.0.8" - "@ethersproject/networks" "^5.0.7" - "@ethersproject/properties" "^5.0.7" - "@ethersproject/transactions" "^5.0.9" - "@ethersproject/web" "^5.0.12" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" -"@ethersproject/abstract-provider@^5.7.0", "@ethersproject/abstract-provider@5.7.0": +"@ethersproject/abstract-provider@5.7.0", "@ethersproject/abstract-provider@^5.7.0": version "5.7.0" resolved "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz" integrity sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw== @@ -408,16 +397,7 @@ "@ethersproject/transactions" "^5.7.0" "@ethersproject/web" "^5.7.0" -"@ethersproject/abstract-signer@^5.0.10": - version "5.0.10" - dependencies: - "@ethersproject/abstract-provider" "^5.0.8" - "@ethersproject/bignumber" "^5.0.13" - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/logger" "^5.0.8" - "@ethersproject/properties" "^5.0.7" - -"@ethersproject/abstract-signer@^5.7.0", "@ethersproject/abstract-signer@5.7.0": +"@ethersproject/abstract-signer@5.7.0", "@ethersproject/abstract-signer@^5.7.0": version "5.7.0" resolved "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz" integrity sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ== @@ -428,7 +408,7 @@ "@ethersproject/logger" "^5.7.0" "@ethersproject/properties" "^5.7.0" -"@ethersproject/address@^5.0.2", "@ethersproject/address@^5.7.0", "@ethersproject/address@5.7.0": +"@ethersproject/address@5.7.0", "@ethersproject/address@>=5.0.0-beta.128", "@ethersproject/address@^5.0.2", "@ethersproject/address@^5.7.0": version "5.7.0" resolved "https://registry.npmjs.org/@ethersproject/address/-/address-5.7.0.tgz" integrity sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA== @@ -439,28 +419,14 @@ "@ethersproject/logger" "^5.7.0" "@ethersproject/rlp" "^5.7.0" -"@ethersproject/address@^5.0.9", "@ethersproject/address@>=5.0.0-beta.128": - version "5.0.9" - dependencies: - "@ethersproject/bignumber" "^5.0.13" - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/keccak256" "^5.0.7" - "@ethersproject/logger" "^5.0.8" - "@ethersproject/rlp" "^5.0.7" - -"@ethersproject/base64@^5.0.7": - version "5.0.7" - dependencies: - "@ethersproject/bytes" "^5.0.9" - -"@ethersproject/base64@^5.7.0", "@ethersproject/base64@5.7.0": +"@ethersproject/base64@5.7.0", "@ethersproject/base64@^5.7.0": version "5.7.0" resolved "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.7.0.tgz" integrity sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ== dependencies: "@ethersproject/bytes" "^5.7.0" -"@ethersproject/basex@^5.7.0", "@ethersproject/basex@5.7.0": +"@ethersproject/basex@5.7.0", "@ethersproject/basex@^5.7.0": version "5.7.0" resolved "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.7.0.tgz" integrity sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw== @@ -468,14 +434,7 @@ "@ethersproject/bytes" "^5.7.0" "@ethersproject/properties" "^5.7.0" -"@ethersproject/bignumber@^5.0.13", "@ethersproject/bignumber@>=5.0.0-beta.130": - version "5.0.13" - dependencies: - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/logger" "^5.0.8" - bn.js "^4.4.0" - -"@ethersproject/bignumber@^5.7.0", "@ethersproject/bignumber@5.7.0": +"@ethersproject/bignumber@5.7.0", "@ethersproject/bignumber@>=5.0.0-beta.130", "@ethersproject/bignumber@^5.7.0": version "5.7.0" resolved "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.7.0.tgz" integrity sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw== @@ -484,31 +443,21 @@ "@ethersproject/logger" "^5.7.0" bn.js "^5.2.1" -"@ethersproject/bytes@^5.0.9", "@ethersproject/bytes@>=5.0.0-beta.129": - version "5.0.9" - dependencies: - "@ethersproject/logger" "^5.0.8" - -"@ethersproject/bytes@^5.7.0", "@ethersproject/bytes@5.7.0": +"@ethersproject/bytes@5.7.0", "@ethersproject/bytes@>=5.0.0-beta.129", "@ethersproject/bytes@^5.7.0": version "5.7.0" resolved "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.7.0.tgz" integrity sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A== dependencies: "@ethersproject/logger" "^5.7.0" -"@ethersproject/constants@^5.0.8", "@ethersproject/constants@>=5.0.0-beta.128": - version "5.0.8" - dependencies: - "@ethersproject/bignumber" "^5.0.13" - -"@ethersproject/constants@^5.7.0", "@ethersproject/constants@5.7.0": +"@ethersproject/constants@5.7.0", "@ethersproject/constants@>=5.0.0-beta.128", "@ethersproject/constants@^5.7.0": version "5.7.0" resolved "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.7.0.tgz" integrity sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA== dependencies: "@ethersproject/bignumber" "^5.7.0" -"@ethersproject/contracts@^5.7.0", "@ethersproject/contracts@5.7.0": +"@ethersproject/contracts@5.7.0", "@ethersproject/contracts@^5.7.0": version "5.7.0" resolved "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.7.0.tgz" integrity sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg== @@ -524,7 +473,7 @@ "@ethersproject/properties" "^5.7.0" "@ethersproject/transactions" "^5.7.0" -"@ethersproject/hash@^5.7.0", "@ethersproject/hash@5.7.0": +"@ethersproject/hash@5.7.0", "@ethersproject/hash@>=5.0.0-beta.128", "@ethersproject/hash@^5.7.0": version "5.7.0" resolved "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.7.0.tgz" integrity sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g== @@ -539,19 +488,7 @@ "@ethersproject/properties" "^5.7.0" "@ethersproject/strings" "^5.7.0" -"@ethersproject/hash@>=5.0.0-beta.128": - version "5.0.10" - dependencies: - "@ethersproject/abstract-signer" "^5.0.10" - "@ethersproject/address" "^5.0.9" - "@ethersproject/bignumber" "^5.0.13" - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/keccak256" "^5.0.7" - "@ethersproject/logger" "^5.0.8" - "@ethersproject/properties" "^5.0.7" - "@ethersproject/strings" "^5.0.8" - -"@ethersproject/hdnode@^5.7.0", "@ethersproject/hdnode@5.7.0": +"@ethersproject/hdnode@5.7.0", "@ethersproject/hdnode@^5.7.0": version "5.7.0" resolved "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.7.0.tgz" integrity sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg== @@ -569,7 +506,7 @@ "@ethersproject/transactions" "^5.7.0" "@ethersproject/wordlists" "^5.7.0" -"@ethersproject/json-wallets@^5.7.0", "@ethersproject/json-wallets@5.7.0": +"@ethersproject/json-wallets@5.7.0", "@ethersproject/json-wallets@^5.7.0": version "5.7.0" resolved "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz" integrity sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g== @@ -588,13 +525,7 @@ aes-js "3.0.0" scrypt-js "3.0.1" -"@ethersproject/keccak256@^5.0.7", "@ethersproject/keccak256@>=5.0.0-beta.127": - version "5.0.7" - dependencies: - "@ethersproject/bytes" "^5.0.9" - js-sha3 "0.5.7" - -"@ethersproject/keccak256@^5.7.0", "@ethersproject/keccak256@5.7.0": +"@ethersproject/keccak256@5.7.0", "@ethersproject/keccak256@>=5.0.0-beta.127", "@ethersproject/keccak256@^5.7.0": version "5.7.0" resolved "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.7.0.tgz" integrity sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg== @@ -602,27 +533,19 @@ "@ethersproject/bytes" "^5.7.0" js-sha3 "0.8.0" -"@ethersproject/logger@^5.0.8", "@ethersproject/logger@>=5.0.0-beta.129": - version "5.0.8" - -"@ethersproject/logger@^5.7.0", "@ethersproject/logger@5.7.0": +"@ethersproject/logger@5.7.0", "@ethersproject/logger@>=5.0.0-beta.129", "@ethersproject/logger@^5.7.0": version "5.7.0" resolved "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.7.0.tgz" integrity sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig== -"@ethersproject/networks@^5.0.7": - version "5.0.7" - dependencies: - "@ethersproject/logger" "^5.0.8" - -"@ethersproject/networks@^5.7.0", "@ethersproject/networks@5.7.1": +"@ethersproject/networks@5.7.1", "@ethersproject/networks@^5.7.0": version "5.7.1" resolved "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.7.1.tgz" integrity sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ== dependencies: "@ethersproject/logger" "^5.7.0" -"@ethersproject/pbkdf2@^5.7.0", "@ethersproject/pbkdf2@5.7.0": +"@ethersproject/pbkdf2@5.7.0", "@ethersproject/pbkdf2@^5.7.0": version "5.7.0" resolved "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz" integrity sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw== @@ -630,19 +553,14 @@ "@ethersproject/bytes" "^5.7.0" "@ethersproject/sha2" "^5.7.0" -"@ethersproject/properties@^5.0.7", "@ethersproject/properties@>=5.0.0-beta.131": - version "5.0.7" - dependencies: - "@ethersproject/logger" "^5.0.8" - -"@ethersproject/properties@^5.7.0", "@ethersproject/properties@5.7.0": +"@ethersproject/properties@5.7.0", "@ethersproject/properties@>=5.0.0-beta.131", "@ethersproject/properties@^5.7.0": version "5.7.0" resolved "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.7.0.tgz" integrity sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw== dependencies: "@ethersproject/logger" "^5.7.0" -"@ethersproject/providers@^5.7.2", "@ethersproject/providers@5.7.2": +"@ethersproject/providers@5.7.2", "@ethersproject/providers@^5.7.2": version "5.7.2" resolved "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.7.2.tgz" integrity sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg== @@ -668,7 +586,7 @@ bech32 "1.1.4" ws "7.4.6" -"@ethersproject/random@^5.7.0", "@ethersproject/random@5.7.0": +"@ethersproject/random@5.7.0", "@ethersproject/random@^5.7.0": version "5.7.0" resolved "https://registry.npmjs.org/@ethersproject/random/-/random-5.7.0.tgz" integrity sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ== @@ -676,13 +594,7 @@ "@ethersproject/bytes" "^5.7.0" "@ethersproject/logger" "^5.7.0" -"@ethersproject/rlp@^5.0.7": - version "5.0.7" - dependencies: - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/logger" "^5.0.8" - -"@ethersproject/rlp@^5.7.0", "@ethersproject/rlp@5.7.0": +"@ethersproject/rlp@5.7.0", "@ethersproject/rlp@^5.7.0": version "5.7.0" resolved "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.7.0.tgz" integrity sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w== @@ -690,7 +602,7 @@ "@ethersproject/bytes" "^5.7.0" "@ethersproject/logger" "^5.7.0" -"@ethersproject/sha2@^5.7.0", "@ethersproject/sha2@5.7.0": +"@ethersproject/sha2@5.7.0", "@ethersproject/sha2@^5.7.0": version "5.7.0" resolved "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.7.0.tgz" integrity sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw== @@ -699,15 +611,7 @@ "@ethersproject/logger" "^5.7.0" hash.js "1.1.7" -"@ethersproject/signing-key@^5.0.8": - version "5.0.8" - dependencies: - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/logger" "^5.0.8" - "@ethersproject/properties" "^5.0.7" - elliptic "6.5.3" - -"@ethersproject/signing-key@^5.7.0", "@ethersproject/signing-key@5.7.0": +"@ethersproject/signing-key@5.7.0", "@ethersproject/signing-key@^5.7.0": version "5.7.0" resolved "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.7.0.tgz" integrity sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q== @@ -719,7 +623,7 @@ elliptic "6.5.4" hash.js "1.1.7" -"@ethersproject/solidity@^5.7.0", "@ethersproject/solidity@5.7.0": +"@ethersproject/solidity@5.7.0", "@ethersproject/solidity@^5.0.9", "@ethersproject/solidity@^5.7.0": version "5.7.0" resolved "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.7.0.tgz" integrity sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA== @@ -731,14 +635,7 @@ "@ethersproject/sha2" "^5.7.0" "@ethersproject/strings" "^5.7.0" -"@ethersproject/strings@^5.0.8", "@ethersproject/strings@>=5.0.0-beta.130": - version "5.0.8" - dependencies: - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/constants" "^5.0.8" - "@ethersproject/logger" "^5.0.8" - -"@ethersproject/strings@^5.7.0", "@ethersproject/strings@5.7.0": +"@ethersproject/strings@5.7.0", "@ethersproject/strings@>=5.0.0-beta.130", "@ethersproject/strings@^5.7.0": version "5.7.0" resolved "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.7.0.tgz" integrity sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg== @@ -747,20 +644,7 @@ "@ethersproject/constants" "^5.7.0" "@ethersproject/logger" "^5.7.0" -"@ethersproject/transactions@^5.0.0-beta.135", "@ethersproject/transactions@^5.0.9": - version "5.0.9" - dependencies: - "@ethersproject/address" "^5.0.9" - "@ethersproject/bignumber" "^5.0.13" - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/constants" "^5.0.8" - "@ethersproject/keccak256" "^5.0.7" - "@ethersproject/logger" "^5.0.8" - "@ethersproject/properties" "^5.0.7" - "@ethersproject/rlp" "^5.0.7" - "@ethersproject/signing-key" "^5.0.8" - -"@ethersproject/transactions@^5.7.0", "@ethersproject/transactions@5.7.0": +"@ethersproject/transactions@5.7.0", "@ethersproject/transactions@^5.0.0-beta.135", "@ethersproject/transactions@^5.7.0": version "5.7.0" resolved "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.7.0.tgz" integrity sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ== @@ -784,7 +668,7 @@ "@ethersproject/constants" "^5.7.0" "@ethersproject/logger" "^5.7.0" -"@ethersproject/wallet@^5.7.0", "@ethersproject/wallet@5.7.0": +"@ethersproject/wallet@5.7.0", "@ethersproject/wallet@^5.7.0": version "5.7.0" resolved "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.7.0.tgz" integrity sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA== @@ -805,16 +689,7 @@ "@ethersproject/transactions" "^5.7.0" "@ethersproject/wordlists" "^5.7.0" -"@ethersproject/web@^5.0.12": - version "5.0.12" - dependencies: - "@ethersproject/base64" "^5.0.7" - "@ethersproject/bytes" "^5.0.9" - "@ethersproject/logger" "^5.0.8" - "@ethersproject/properties" "^5.0.7" - "@ethersproject/strings" "^5.0.8" - -"@ethersproject/web@^5.7.0", "@ethersproject/web@5.7.1": +"@ethersproject/web@5.7.1", "@ethersproject/web@^5.7.0": version "5.7.1" resolved "https://registry.npmjs.org/@ethersproject/web/-/web-5.7.1.tgz" integrity sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w== @@ -825,7 +700,7 @@ "@ethersproject/properties" "^5.7.0" "@ethersproject/strings" "^5.7.0" -"@ethersproject/wordlists@^5.7.0", "@ethersproject/wordlists@5.7.0": +"@ethersproject/wordlists@5.7.0", "@ethersproject/wordlists@^5.7.0": version "5.7.0" resolved "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.7.0.tgz" integrity sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA== @@ -873,6 +748,20 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" +"@ljharb/resumer@~0.0.1": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@ljharb/resumer/-/resumer-0.0.1.tgz#8a940a9192dd31f6a1df17564bbd26dc6ad3e68d" + integrity sha512-skQiAOrCfO7vRTq53cxznMpks7wS1va95UCidALlOVWqvBAzwPVErwizDwoMqNVMEn1mDq0utxZd02eIrvF1lw== + dependencies: + "@ljharb/through" "^2.3.9" + +"@ljharb/through@^2.3.9", "@ljharb/through@~2.3.9": + version "2.3.13" + resolved "https://registry.yarnpkg.com/@ljharb/through/-/through-2.3.13.tgz#b7e4766e0b65aa82e529be945ab078de79874edc" + integrity sha512-/gKJun8NNiWGZJkGzI/Ragc53cOdcLNdzjLaIa+GEjguQs0ulsurx8WN0jijdK9yPqDvziX995sMRLyLt1uZMQ== + dependencies: + call-bind "^1.0.7" + "@metamask/abi-utils@^2.0.4": version "2.0.4" resolved "https://registry.npmjs.org/@metamask/abi-utils/-/abi-utils-2.0.4.tgz" @@ -924,106 +813,87 @@ semver "^7.5.4" uuid "^9.0.1" -"@noble/curves@~1.1.0": - version "1.1.0" - resolved "https://registry.npmjs.org/@noble/curves/-/curves-1.1.0.tgz" - integrity sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA== +"@noble/curves@1.2.0": + version "1.2.0" + resolved "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz" + integrity sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw== dependencies: - "@noble/hashes" "1.3.1" + "@noble/hashes" "1.3.2" -"@noble/curves@~1.4.0", "@noble/curves@1.4.2": +"@noble/curves@1.4.2", "@noble/curves@~1.4.0": version "1.4.2" resolved "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz" integrity sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw== dependencies: "@noble/hashes" "1.4.0" -"@noble/curves@1.1.0": - version "1.1.0" - resolved "https://registry.npmjs.org/@noble/curves/-/curves-1.1.0.tgz" - integrity sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA== - dependencies: - "@noble/hashes" "1.3.1" - -"@noble/curves@1.2.0": +"@noble/hashes@1.2.0", "@noble/hashes@~1.2.0": version "1.2.0" - resolved "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz" - integrity sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw== - dependencies: - "@noble/hashes" "1.3.2" + resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz" + integrity sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ== -"@noble/hashes@^1.3.1", "@noble/hashes@~1.3.0", "@noble/hashes@1.3.2": +"@noble/hashes@1.3.2", "@noble/hashes@^1.3.1": version "1.3.2" resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz" integrity sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ== -"@noble/hashes@~1.2.0", "@noble/hashes@1.2.0": - version "1.2.0" - resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz" - integrity sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ== - -"@noble/hashes@~1.3.1", "@noble/hashes@1.3.1": - version "1.3.1" - resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz" - integrity sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA== - -"@noble/hashes@~1.4.0", "@noble/hashes@1.4.0": +"@noble/hashes@1.4.0", "@noble/hashes@~1.4.0": version "1.4.0" resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz" integrity sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg== -"@noble/secp256k1@~1.7.0", "@noble/secp256k1@1.7.1": +"@noble/secp256k1@1.7.1", "@noble/secp256k1@~1.7.0": version "1.7.1" resolved "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-1.7.1.tgz" integrity sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw== -"@nomicfoundation/edr-darwin-arm64@0.4.1": - version "0.4.1" - resolved "https://registry.npmjs.org/@nomicfoundation/edr-darwin-arm64/-/edr-darwin-arm64-0.4.1.tgz" - integrity sha512-XuiUUnWAVNw7JYv7nRqDWfpBm21HOxCRBQ8lQnRnmiets9Ss2X5Ul9mvBheIPh/D0wBzwJ8TRtsSrorpwE79cA== +"@nomicfoundation/edr-darwin-arm64@0.6.3": + version "0.6.3" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-darwin-arm64/-/edr-darwin-arm64-0.6.3.tgz#7f94f80f25bbf8f15421aca0626b1e243c5b6fba" + integrity sha512-hqtI7tYDqKG5PDmZ//Z65EH5cgH8VL/SAAu50rpHP7WAVfJWkOCcYbecywwF6nhHdonJbRTDGAeG1/+VOy6zew== -"@nomicfoundation/edr-darwin-x64@0.4.1": - version "0.4.1" - resolved "https://registry.npmjs.org/@nomicfoundation/edr-darwin-x64/-/edr-darwin-x64-0.4.1.tgz" - integrity sha512-N1MfJqEX5ixaXlyyrHnaYxzwIT27Nc/jUgLI7ts4/9kRvPTvyZRYmXS1ciKhmUFr/WvFckTCix2RJbZoGGtX7g== +"@nomicfoundation/edr-darwin-x64@0.6.3": + version "0.6.3" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-darwin-x64/-/edr-darwin-x64-0.6.3.tgz#57cbbe09c70480e7eb79273ba5a497327d72347b" + integrity sha512-4fGi79/lyOlRUORhCYsYb3sWqRHuHT7qqzyZfZuNOn8llaxmT1k36xNmvpyg37R8SzjnhT/DzoukSJrs23Ip9Q== -"@nomicfoundation/edr-linux-arm64-gnu@0.4.1": - version "0.4.1" - resolved "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-gnu/-/edr-linux-arm64-gnu-0.4.1.tgz" - integrity sha512-bSPOfmcFjJwDgWOV5kgZHeqg2OWu1cINrHSGjig0aVHehjcoX4Sgayrj6fyAxcOV5NQKA6WcyTFll6NrCxzWRA== +"@nomicfoundation/edr-linux-arm64-gnu@0.6.3": + version "0.6.3" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-arm64-gnu/-/edr-linux-arm64-gnu-0.6.3.tgz#122f5ec8b00297e9ed0111405c8779a3c3ba26f3" + integrity sha512-yFFTvGFMhfAvQ1Z2itUh1jpoUA+mVROyVELcaxjIq8fyg602lQmbS+NXkhQ+oaeDgJ+06mSENrHBg4fcfRf9cw== -"@nomicfoundation/edr-linux-arm64-musl@0.4.1": - version "0.4.1" - resolved "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-musl/-/edr-linux-arm64-musl-0.4.1.tgz" - integrity sha512-F/+DgOdeBFQDrk+SX4aFffJFBgJfd75ZtE2mjcWNAh/qWiS7NfUxdQX/5OvNo/H6EY4a+3bZH6Bgzqg4mEWvMw== +"@nomicfoundation/edr-linux-arm64-musl@0.6.3": + version "0.6.3" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-arm64-musl/-/edr-linux-arm64-musl-0.6.3.tgz#2b0371371540373b10521ead4ffa70a2d9e6ac8e" + integrity sha512-pOKmd0Fa3a6BHg5qbjbl/jMRELVi9oazbfiuU7Bvgn/dpTK+ID3jwT0SXiuC2zxjmPByWgXL6G9XRf5BPAM2rQ== -"@nomicfoundation/edr-linux-x64-gnu@0.4.1": - version "0.4.1" - resolved "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-gnu/-/edr-linux-x64-gnu-0.4.1.tgz" - integrity sha512-POHhTWczIXCPhzKtY0Vt/l+VCqqCx5gNR5ErwSrNnLz/arfQobZFAU+nc61BX3Jch82TW8b3AbfGI73Kh7gO0w== +"@nomicfoundation/edr-linux-x64-gnu@0.6.3": + version "0.6.3" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-x64-gnu/-/edr-linux-x64-gnu-0.6.3.tgz#63849575eddbcd7a5da581d401fba6f5f9347644" + integrity sha512-3AUferhkLIXtLV63w5GjpHttzdxZ36i656XMy+pkBZbbiqnzIVeKWg6DJv1A94fQY16gB4gqj9CLq4CWvbNN6w== -"@nomicfoundation/edr-linux-x64-musl@0.4.1": - version "0.4.1" - resolved "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-musl/-/edr-linux-x64-musl-0.4.1.tgz" - integrity sha512-uu8oNp4Ozg3H1x1We0FF+rwXfFiAvsOm5GQ+OBx9YYOXnfDPWqguQfGIkhrti9GD0iYhfQ/WOG5wvp0IzzgGSg== +"@nomicfoundation/edr-linux-x64-musl@0.6.3": + version "0.6.3" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-x64-musl/-/edr-linux-x64-musl-0.6.3.tgz#3b5e6462f47b40cde81bafc6da003c58b2eb9839" + integrity sha512-fr6bD872WIBXe9YnTDi0CzYepMcYRgSnkVqn0yK4wRnIvKrloWhxXNVY45GVIl51aNZguBnvoA4WEt6HIazs3A== -"@nomicfoundation/edr-win32-x64-msvc@0.4.1": - version "0.4.1" - resolved "https://registry.npmjs.org/@nomicfoundation/edr-win32-x64-msvc/-/edr-win32-x64-msvc-0.4.1.tgz" - integrity sha512-PaZHFw455z89ZiKYNTnKu+/TiVZVRI+mRJsbRTe2N0VlYfUBS1o2gdXBM12oP1t198HR7xQwEPPAslTFxGBqHA== +"@nomicfoundation/edr-win32-x64-msvc@0.6.3": + version "0.6.3" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-win32-x64-msvc/-/edr-win32-x64-msvc-0.6.3.tgz#45be7ba94b950e78e862cb3af0c320e070e0e452" + integrity sha512-sn34MvN1ajw2Oq1+Drpxej78Z0HfIzI4p4WlolupAV9dOZKzp2JAIQeLVfZpjIFbF3zuyxLPP4dUBrQoFPEqhA== -"@nomicfoundation/edr@^0.4.1": - version "0.4.1" - resolved "https://registry.npmjs.org/@nomicfoundation/edr/-/edr-0.4.1.tgz" - integrity sha512-NgrMo2rI9r28uidumvd+K2/AJLdxtXsUlJr3hj/pM6S1FCd/HiWaLeLa/cjCVPcE2u1rYAa3W6UFxLCB7S5Dhw== +"@nomicfoundation/edr@^0.6.3": + version "0.6.3" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr/-/edr-0.6.3.tgz#47f1b217ce5eb09aef419d76a8488bb77cd88b94" + integrity sha512-hThe5ORR75WFYTXKL0K2AyLDxkTMrG+VQ1yL9BhQYsuh3OIH+3yNDxMz2LjfvrpOrMmJ4kk5NKdFewpqDojjXQ== dependencies: - "@nomicfoundation/edr-darwin-arm64" "0.4.1" - "@nomicfoundation/edr-darwin-x64" "0.4.1" - "@nomicfoundation/edr-linux-arm64-gnu" "0.4.1" - "@nomicfoundation/edr-linux-arm64-musl" "0.4.1" - "@nomicfoundation/edr-linux-x64-gnu" "0.4.1" - "@nomicfoundation/edr-linux-x64-musl" "0.4.1" - "@nomicfoundation/edr-win32-x64-msvc" "0.4.1" + "@nomicfoundation/edr-darwin-arm64" "0.6.3" + "@nomicfoundation/edr-darwin-x64" "0.6.3" + "@nomicfoundation/edr-linux-arm64-gnu" "0.6.3" + "@nomicfoundation/edr-linux-arm64-musl" "0.6.3" + "@nomicfoundation/edr-linux-x64-gnu" "0.6.3" + "@nomicfoundation/edr-linux-x64-musl" "0.6.3" + "@nomicfoundation/edr-win32-x64-msvc" "0.6.3" "@nomicfoundation/ethereumjs-common@4.0.4": version "4.0.4" @@ -1065,7 +935,7 @@ deep-eql "^4.0.1" ordinal "^1.0.3" -"@nomicfoundation/hardhat-ethers@^3.0.0", "@nomicfoundation/hardhat-ethers@^3.0.2", "@nomicfoundation/hardhat-ethers@^3.0.5": +"@nomicfoundation/hardhat-ethers@^3.0.5": version "3.0.5" resolved "https://registry.npmjs.org/@nomicfoundation/hardhat-ethers/-/hardhat-ethers-3.0.5.tgz" integrity sha512-RNFe8OtbZK6Ila9kIlHp0+S80/0Bu/3p41HUpaRIoHLm6X3WekTd83vob3rE54Duufu1edCiBDxspBzi2rxHHw== @@ -1087,7 +957,7 @@ dependencies: ethereumjs-util "^7.1.4" -"@nomicfoundation/hardhat-verify@^2.0.0", "@nomicfoundation/hardhat-verify@^2.0.2": +"@nomicfoundation/hardhat-verify@^2.0.2": version "2.0.3" resolved "https://registry.npmjs.org/@nomicfoundation/hardhat-verify/-/hardhat-verify-2.0.3.tgz" integrity sha512-ESbRu9by53wu6VvgwtMtm108RSmuNsVqXtzg061D+/4R7jaWh/Wl/8ve+p6SdDX7vA1Z3L02hDO1Q3BY4luLXQ== @@ -1102,6 +972,91 @@ table "^6.8.0" undici "^5.14.0" +"@nomicfoundation/slang-darwin-arm64@0.17.0": + version "0.17.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/slang-darwin-arm64/-/slang-darwin-arm64-0.17.0.tgz#8cded3c24322624e3b6618760caba8e840bd1c1d" + integrity sha512-O0q94EUtoWy9A5kOTOa9/khtxXDYnLqmuda9pQELurSiwbQEVCPQL8kb34VbOW+ifdre66JM/05Xw9JWhIZ9sA== + +"@nomicfoundation/slang-darwin-x64@0.17.0": + version "0.17.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/slang-darwin-x64/-/slang-darwin-x64-0.17.0.tgz#6ebeb33a2ced89fc6023f6cda4af96403486038a" + integrity sha512-IaDbHzvT08sBK2HyGzonWhq1uu8IxdjmTqAWHr25Oh/PYnamdi8u4qchZXXYKz/DHLoYN3vIpBXoqLQIomhD/g== + +"@nomicfoundation/slang-linux-arm64-gnu@0.17.0": + version "0.17.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/slang-linux-arm64-gnu/-/slang-linux-arm64-gnu-0.17.0.tgz#41c7e57a9b1a3aee6911f0cab22e683c149fb470" + integrity sha512-Lj4anvOsQZxs1SycG8VyT2Rl2oqIhyLSUCgGepTt3CiJ/bM+8r8bLJIgh8vKkki4BWz49YsYIgaJB2IPv8FFTw== + +"@nomicfoundation/slang-linux-arm64-musl@0.17.0": + version "0.17.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/slang-linux-arm64-musl/-/slang-linux-arm64-musl-0.17.0.tgz#9c4b51689274ae75c2c8a4cddd2e1cc0a79c191d" + integrity sha512-/xkTCa9d5SIWUBQE3BmLqDFfJRr4yUBwbl4ynPiGUpRXrD69cs6pWKkwjwz/FdBpXqVo36I+zY95qzoTj/YhOA== + +"@nomicfoundation/slang-linux-x64-gnu@0.17.0": + version "0.17.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/slang-linux-x64-gnu/-/slang-linux-x64-gnu-0.17.0.tgz#c3a3b6a7b775fc617832958d10e6664bf86d39d0" + integrity sha512-oe5IO5vntOqYvTd67deCHPIWuSuWm6aYtT2/0Kqz2/VLtGz4ClEulBSRwfnNzBVtw2nksWipE1w8BzhImI7Syg== + +"@nomicfoundation/slang-linux-x64-musl@0.17.0": + version "0.17.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/slang-linux-x64-musl/-/slang-linux-x64-musl-0.17.0.tgz#725118ff99a7217b9f1d1bd84411d9442084077d" + integrity sha512-PpYCI5K/kgLAMXaPY0V4VST5gCDprEOh7z/47tbI8kJQumI5odjsj/Cs8MpTo7/uRH6flKYbVNgUzcocWVYrAQ== + +"@nomicfoundation/slang-win32-arm64-msvc@0.17.0": + version "0.17.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/slang-win32-arm64-msvc/-/slang-win32-arm64-msvc-0.17.0.tgz#9c8bc4ccf21eaaac0cfcb6d3954ede4e2dea4c02" + integrity sha512-u/Mkf7OjokdBilP7QOJj6QYJU4/mjkbKnTX21wLyCIzeVWS7yafRPYpBycKIBj2pRRZ6ceAY5EqRpb0aiCq+0Q== + +"@nomicfoundation/slang-win32-ia32-msvc@0.17.0": + version "0.17.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/slang-win32-ia32-msvc/-/slang-win32-ia32-msvc-0.17.0.tgz#3fc5d00a3f8c1d85a5e94146af78a5526a4f3d27" + integrity sha512-XJBVQfNnZQUv0tP2JSJ573S+pmgrLWgqSZOGaMllnB/TL1gRci4Z7dYRJUF2s82GlRJE+FHSI2Ro6JISKmlXCg== + +"@nomicfoundation/slang-win32-x64-msvc@0.17.0": + version "0.17.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/slang-win32-x64-msvc/-/slang-win32-x64-msvc-0.17.0.tgz#f6a5e3250fa07cbda49151edeb80f09090e5b71a" + integrity sha512-zPGsAeiTfqfPNYHD8BfrahQmYzA78ZraoHKTGraq/1xwJwzBK4bu/NtvVA4pJjBV+B4L6DCxVhSbpn40q26JQA== + +"@nomicfoundation/slang@^0.17.0": + version "0.17.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/slang/-/slang-0.17.0.tgz#d9c25cd711ebf3490c9d0c99e9b4ca2481341a6b" + integrity sha512-1GlkGRcGpVnjFw9Z1vvDKOKo2mzparFt7qrl2pDxWp+jrVtlvej98yCMX52pVyrYE7ZeOSZFnx/DtsSgoukStQ== + dependencies: + "@nomicfoundation/slang-darwin-arm64" "0.17.0" + "@nomicfoundation/slang-darwin-x64" "0.17.0" + "@nomicfoundation/slang-linux-arm64-gnu" "0.17.0" + "@nomicfoundation/slang-linux-arm64-musl" "0.17.0" + "@nomicfoundation/slang-linux-x64-gnu" "0.17.0" + "@nomicfoundation/slang-linux-x64-musl" "0.17.0" + "@nomicfoundation/slang-win32-arm64-msvc" "0.17.0" + "@nomicfoundation/slang-win32-ia32-msvc" "0.17.0" + "@nomicfoundation/slang-win32-x64-msvc" "0.17.0" + +"@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-darwin-arm64/-/solidity-analyzer-darwin-arm64-0.1.1.tgz#4c858096b1c17fe58a474fe81b46815f93645c15" + integrity sha512-KcTodaQw8ivDZyF+D76FokN/HdpgGpfjc/gFCImdLUyqB6eSWVaZPazMbeAjmfhx3R0zm/NYVzxwAokFKgrc0w== + +"@nomicfoundation/solidity-analyzer-darwin-x64@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-darwin-x64/-/solidity-analyzer-darwin-x64-0.1.1.tgz#6e25ccdf6e2d22389c35553b64fe6f3fdaec432c" + integrity sha512-XhQG4BaJE6cIbjAVtzGOGbK3sn1BO9W29uhk9J8y8fZF1DYz0Doj8QDMfpMu+A6TjPDs61lbsmeYodIDnfveSA== + +"@nomicfoundation/solidity-analyzer-freebsd-x64@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-freebsd-x64/-/solidity-analyzer-freebsd-x64-0.1.1.tgz#0a224ea50317139caeebcdedd435c28a039d169c" + integrity sha512-GHF1VKRdHW3G8CndkwdaeLkVBi5A9u2jwtlS7SLhBc8b5U/GcoL39Q+1CSO3hYqePNP+eV5YI7Zgm0ea6kMHoA== + +"@nomicfoundation/solidity-analyzer-linux-arm64-gnu@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-arm64-gnu/-/solidity-analyzer-linux-arm64-gnu-0.1.1.tgz#dfa085d9ffab9efb2e7b383aed3f557f7687ac2b" + integrity sha512-g4Cv2fO37ZsUENQ2vwPnZc2zRenHyAxHcyBjKcjaSmmkKrFr64yvzeNO8S3GBFCo90rfochLs99wFVGT/0owpg== + +"@nomicfoundation/solidity-analyzer-linux-arm64-musl@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-arm64-musl/-/solidity-analyzer-linux-arm64-musl-0.1.1.tgz#c9e06b5d513dd3ab02a7ac069c160051675889a4" + integrity sha512-WJ3CE5Oek25OGE3WwzK7oaopY8xMw9Lhb0mlYuJl/maZVo+WtP36XoQTb7bW/i8aAdHW5Z+BqrHMux23pvxG3w== + "@nomicfoundation/solidity-analyzer-linux-x64-gnu@0.1.1": version "0.1.1" resolved "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-x64-gnu/-/solidity-analyzer-linux-x64-gnu-0.1.1.tgz" @@ -1112,6 +1067,21 @@ resolved "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-x64-musl/-/solidity-analyzer-linux-x64-musl-0.1.1.tgz" integrity sha512-KdYMkJOq0SYPQMmErv/63CwGwMm5XHenEna9X9aB8mQmhDBrYrlAOSsIPgFCUSL0hjxE3xHP65/EPXR/InD2+w== +"@nomicfoundation/solidity-analyzer-win32-arm64-msvc@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-win32-arm64-msvc/-/solidity-analyzer-win32-arm64-msvc-0.1.1.tgz#e2867af7264ebbcc3131ef837878955dd6a3676f" + integrity sha512-VFZASBfl4qiBYwW5xeY20exWhmv6ww9sWu/krWSesv3q5hA0o1JuzmPHR4LPN6SUZj5vcqci0O6JOL8BPw+APg== + +"@nomicfoundation/solidity-analyzer-win32-ia32-msvc@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-win32-ia32-msvc/-/solidity-analyzer-win32-ia32-msvc-0.1.1.tgz#0685f78608dd516c8cdfb4896ed451317e559585" + integrity sha512-JnFkYuyCSA70j6Si6cS1A9Gh1aHTEb8kOTBApp/c7NRTFGNMH8eaInKlyuuiIbvYFhlXW4LicqyYuWNNq9hkpQ== + +"@nomicfoundation/solidity-analyzer-win32-x64-msvc@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-win32-x64-msvc/-/solidity-analyzer-win32-x64-msvc-0.1.1.tgz#c9a44f7108646f083b82e851486e0f6aeb785836" + integrity sha512-HrVJr6+WjIXGnw3Q9u6KQcbZCtk0caVWhCdFADySvRyUxJ8PnzlaP+MhwNE8oyT8OZ6ejHBRrrgjSqDCFXGirw== + "@nomicfoundation/solidity-analyzer@^0.1.0": version "0.1.1" resolved "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer/-/solidity-analyzer-0.1.1.tgz" @@ -1128,11 +1098,6 @@ "@nomicfoundation/solidity-analyzer-win32-ia32-msvc" "0.1.1" "@nomicfoundation/solidity-analyzer-win32-x64-msvc" "0.1.1" -"@nomiclabs/hardhat-ethers@^2.0.0": - version "2.2.3" - resolved "https://registry.npmjs.org/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.2.3.tgz" - integrity sha512-YhzPdzb612X591FOe68q+qXVXGG2ANZRvDo0RRUtimev85rCrAlv/TLMEZw5c+kq9AbzocLTVX/h2jVIFPL9Xg== - "@nomiclabs/hardhat-waffle@^2.0.6": version "2.0.6" resolved "https://registry.npmjs.org/@nomiclabs/hardhat-waffle/-/hardhat-waffle-2.0.6.tgz" @@ -1143,62 +1108,88 @@ resolved "https://registry.npmjs.org/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-5.0.1.tgz" integrity sha512-MvaLoPnVcoZr/qqZP+4cl9piuR4gg0iIGgxVSZ/AL1iId3M6IdEHzz9Naw5Lirl4KKBI6ciTVnX07yL4dOMIJg== -"@openzeppelin/contracts@^5.0.0", "@openzeppelin/contracts@5.0.1": +"@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@3.4.2-solc-0.7": + version "3.4.2-solc-0.7" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-3.4.2-solc-0.7.tgz#38f4dbab672631034076ccdf2f3201fab1726635" + integrity sha512-W6QmqgkADuFcTLzHL8vVoNBtkwjvQRpYIAom7KiUNoLKghyx3FgH0GBjt8NRvigV1ZmMOBllvE1By1C+bi8WpA== + +"@openzeppelin/contracts@^5.0.0": version "5.0.1" resolved "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-5.0.1.tgz" integrity sha512-yQJaT5HDp9hYOOp4jTYxMsR02gdFZFXhewX5HW9Jo4fsqSVqqyIO/xTHdWDaKX5a3pv1txmf076Lziz+sO7L1w== -"@openzeppelin/defender-sdk-base-client@^1.10.0", "@openzeppelin/defender-sdk-base-client@^1.13.4": - version "1.13.4" - resolved "https://registry.npmjs.org/@openzeppelin/defender-sdk-base-client/-/defender-sdk-base-client-1.13.4.tgz" - integrity sha512-fZjDxdL5WBt6kjKN8j6WlfIsggZKv37W1KoRkT0XwYv7Jslmr22i2qUs8ZreAzATD3ESYQs7YlO7ge0ElqdOKg== +"@openzeppelin/defender-admin-client@^1.52.0": + version "1.54.6" + resolved "https://registry.yarnpkg.com/@openzeppelin/defender-admin-client/-/defender-admin-client-1.54.6.tgz#935374ff54f087048c127e4852f8aefe5b2ac894" + integrity sha512-P4lxJDySrekWNuPa7FeyW/UmuxnuIXIAGYr5gZnmnMHRsYNaw+XfgkiCDfoGtjEyJbXYxXttYF6iAZhWQPdf1g== dependencies: - amazon-cognito-identity-js "^6.3.6" + "@openzeppelin/defender-base-client" "1.54.6" + axios "^1.4.0" + ethers "^5.7.2" + lodash "^4.17.19" + node-fetch "^2.6.0" + +"@openzeppelin/defender-base-client@1.54.6", "@openzeppelin/defender-base-client@^1.52.0": + version "1.54.6" + resolved "https://registry.yarnpkg.com/@openzeppelin/defender-base-client/-/defender-base-client-1.54.6.tgz#b65a90dba49375ac1439d638832382344067a0b9" + integrity sha512-PTef+rMxkM5VQ7sLwLKSjp2DBakYQd661ZJiSRywx+q/nIpm3B/HYGcz5wPZCA5O/QcEP6TatXXDoeMwimbcnw== + dependencies: + amazon-cognito-identity-js "^6.0.1" async-retry "^1.3.3" + axios "^1.4.0" + lodash "^4.17.19" + node-fetch "^2.6.0" -"@openzeppelin/defender-sdk-deploy-client@^1.10.0": - version "1.13.4" - resolved "https://registry.npmjs.org/@openzeppelin/defender-sdk-deploy-client/-/defender-sdk-deploy-client-1.13.4.tgz" - integrity sha512-1SbdImpjCYmjpDgK7Bff4vak29r/aECabVuQi5TB+7TdbOuRdVxDHu7vFhEpt3yrcPKW1joaNiUNDEc/noUsNQ== +"@openzeppelin/defender-sdk-base-client@^1.15.0", "@openzeppelin/defender-sdk-base-client@^1.8.0": + version "1.15.0" + resolved "https://registry.yarnpkg.com/@openzeppelin/defender-sdk-base-client/-/defender-sdk-base-client-1.15.0.tgz#5c6af6929c399dd7ef9ca1eb4ca042ae7e772367" + integrity sha512-nuf/xegMIuKCO0hMrxI1KQKTzQw1iCl/9kew2nJM9MrFIohhfEXItc5rbJRoV/jehmK/Jhi9ATF9OHH09StEsQ== dependencies: - "@openzeppelin/defender-sdk-base-client" "^1.13.4" - axios "^1.6.8" - lodash "^4.17.21" + amazon-cognito-identity-js "^6.3.6" + async-retry "^1.3.3" -"@openzeppelin/defender-sdk-network-client@^1.10.0": - version "1.13.4" - resolved "https://registry.npmjs.org/@openzeppelin/defender-sdk-network-client/-/defender-sdk-network-client-1.13.4.tgz" - integrity sha512-m76WQzqFET4jtFgA74V6Ui4czRoTvBy7leS+BbsIxoKX+NGODhs78y5zq7jSxsLu3c2iY69rujRkzj0Z+sCiiQ== +"@openzeppelin/defender-sdk-deploy-client@^1.8.0": + version "1.15.0" + resolved "https://registry.yarnpkg.com/@openzeppelin/defender-sdk-deploy-client/-/defender-sdk-deploy-client-1.15.0.tgz#affbeb93bf633ab9914ae7ca6326ff9dcdbbb670" + integrity sha512-2ODMN4j5pPYWyIOvA/zRQmJ0tJyqi6NV3S/PyvufBXa3oj/MDnVO5bMGSQFH0M2VE3bg+i/rcUb0hdbX9Rtm5Q== dependencies: - "@openzeppelin/defender-sdk-base-client" "^1.13.4" - axios "^1.6.8" + "@openzeppelin/defender-sdk-base-client" "^1.15.0" + axios "^1.7.2" lodash "^4.17.21" -"@openzeppelin/hardhat-upgrades@^3.2.0": - version "3.2.0" - resolved "https://registry.npmjs.org/@openzeppelin/hardhat-upgrades/-/hardhat-upgrades-3.2.0.tgz" - integrity sha512-xybXIHQIZK2a1HH7ukMToRbIcU9LHfL49gtB0KYptY6f/r9lqrFOupN8aOBueRZW4Ymhc6HGL9bvj7u7t5lDdQ== - dependencies: - "@openzeppelin/defender-sdk-base-client" "^1.10.0" - "@openzeppelin/defender-sdk-deploy-client" "^1.10.0" - "@openzeppelin/defender-sdk-network-client" "^1.10.0" - "@openzeppelin/upgrades-core" "^1.32.0" +"@openzeppelin/hardhat-upgrades@^2.5.0": + version "2.5.1" + resolved "https://registry.yarnpkg.com/@openzeppelin/hardhat-upgrades/-/hardhat-upgrades-2.5.1.tgz#cc7db363807751a02ea1b1fa2f25d34c03384234" + integrity sha512-wRwq9f2PqlfIdNGFApsqRpqptqy98exSFp8SESb6Brgw4L07sExySInNJhscM/tWVSnR1Qnuws9Ck6Fs5zIxvg== + dependencies: + "@openzeppelin/defender-admin-client" "^1.52.0" + "@openzeppelin/defender-base-client" "^1.52.0" + "@openzeppelin/defender-sdk-base-client" "^1.8.0" + "@openzeppelin/defender-sdk-deploy-client" "^1.8.0" + "@openzeppelin/upgrades-core" "^1.31.2" chalk "^4.1.0" debug "^4.1.1" ethereumjs-util "^7.1.5" proper-lockfile "^4.1.1" - undici "^6.11.1" + undici "^5.14.0" -"@openzeppelin/upgrades-core@^1.32.0": - version "1.32.2" - resolved "https://registry.npmjs.org/@openzeppelin/upgrades-core/-/upgrades-core-1.32.2.tgz" - integrity sha512-EkXriOHZfn6u00Tbq0zUuhHDeTQB9WyAZKZo3UeYdqULb7E3vqxZgxgXmWJwEzAb6E77DvprzQ4gwCAjMV/S4Q== +"@openzeppelin/upgrades-core@^1.31.2": + version "1.40.0" + resolved "https://registry.yarnpkg.com/@openzeppelin/upgrades-core/-/upgrades-core-1.40.0.tgz#f01647afb99b46356b3e7b98e3b2c7f864d85add" + integrity sha512-4bPSXdEqHsNRL5T1ybPLneWGYjzGl6XWGWkv7aUoFFgz8mOdarstRBX1Wi4XJFw6IeHPUI7mMSQr2jdz8Y2ypQ== dependencies: + "@nomicfoundation/slang" "^0.17.0" cbor "^9.0.0" chalk "^4.1.0" compare-versions "^6.0.0" debug "^4.1.1" ethereumjs-util "^7.0.3" + minimatch "^9.0.5" minimist "^1.2.7" proper-lockfile "^4.1.1" solidity-ast "^0.4.51" @@ -1254,15 +1245,6 @@ "@noble/secp256k1" "~1.7.0" "@scure/base" "~1.1.0" -"@scure/bip32@1.3.1": - version "1.3.1" - resolved "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.1.tgz" - integrity sha512-osvveYtyzdEVbt3OfwwXFr4P2iVBL5u1Q3q4ONBfDY/UpOuXmOlbgwc1xECEboY8wIays8Yt6onaWMUdUbfl0A== - dependencies: - "@noble/curves" "~1.1.0" - "@noble/hashes" "~1.3.1" - "@scure/base" "~1.1.0" - "@scure/bip32@1.4.0": version "1.4.0" resolved "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz" @@ -1280,14 +1262,6 @@ "@noble/hashes" "~1.2.0" "@scure/base" "~1.1.0" -"@scure/bip39@1.2.1": - version "1.2.1" - resolved "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.1.tgz" - integrity sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg== - dependencies: - "@noble/hashes" "~1.3.0" - "@scure/base" "~1.1.0" - "@scure/bip39@1.3.0": version "1.3.0" resolved "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz" @@ -1369,6 +1343,11 @@ resolved "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz" integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== +"@sindresorhus/is@^4.0.0": + version "4.6.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.6.0.tgz#3c7c9c46e678feefe7a2e5bb609d3dbd665ffb3f" + integrity sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw== + "@smithy/types@^3.3.0": version "3.3.0" resolved "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz" @@ -1395,6 +1374,13 @@ dependencies: defer-to-connect "^1.0.1" +"@szmarczak/http-timer@^4.0.5": + version "4.0.6" + resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.6.tgz#b4a914bb62e7c272d4e5989fe4440f812ab1d807" + integrity sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w== + dependencies: + defer-to-connect "^2.0.0" + "@typechain/ethers-v5@^2.0.0": version "2.0.0" resolved "https://registry.npmjs.org/@typechain/ethers-v5/-/ethers-v5-2.0.0.tgz" @@ -1416,6 +1402,16 @@ dependencies: "@types/node" "*" +"@types/cacheable-request@^6.0.1": + version "6.0.3" + resolved "https://registry.yarnpkg.com/@types/cacheable-request/-/cacheable-request-6.0.3.tgz#a430b3260466ca7b5ca5bfd735693b36e7a9d183" + integrity sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw== + dependencies: + "@types/http-cache-semantics" "*" + "@types/keyv" "^3.1.4" + "@types/node" "*" + "@types/responselike" "^1.0.0" + "@types/chai-as-promised@^7.1.3": version "7.1.8" resolved "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.8.tgz" @@ -1449,6 +1445,18 @@ dependencies: "@types/node" "*" +"@types/http-cache-semantics@*": + version "4.0.4" + resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz#b979ebad3919799c979b17c72621c0bc0a31c6c4" + integrity sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA== + +"@types/keyv@^3.1.4": + version "3.1.4" + resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.4.tgz#3ccdb1c6751b0c7e52300bcdacd5bcbf8faa75b6" + integrity sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg== + dependencies: + "@types/node" "*" + "@types/lru-cache@^5.1.0": version "5.1.1" resolved "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.1.tgz" @@ -1481,24 +1489,28 @@ dependencies: undici-types "~5.26.4" +"@types/node@22.7.5": + version "22.7.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.7.5.tgz#cfde981727a7ab3611a481510b473ae54442b92b" + integrity sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ== + dependencies: + undici-types "~6.19.2" + "@types/node@^10.0.3": version "10.17.60" resolved "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz" integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw== "@types/node@^12.12.6": - version "12.19.12" + 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/node@^8.0.0": version "8.10.66" resolved "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz" integrity sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw== -"@types/node@18.15.13": - version "18.15.13" - resolved "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz" - integrity sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q== - "@types/pbkdf2@^3.0.0": version "3.1.2" resolved "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.2.tgz" @@ -1523,6 +1535,13 @@ dependencies: "@types/node" "*" +"@types/responselike@^1.0.0": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@types/responselike/-/responselike-1.0.3.tgz#cc29706f0a397cfe6df89debfe4bf5cea159db50" + integrity sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw== + dependencies: + "@types/node" "*" + "@types/secp256k1@^4.0.1": version "4.0.6" resolved "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.6.tgz" @@ -1530,49 +1549,107 @@ dependencies: "@types/node" "*" -"@types/sinon-chai@^3.2.3": - version "3.2.12" - resolved "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-3.2.12.tgz" - integrity sha512-9y0Gflk3b0+NhQZ/oxGtaAJDvRywCa5sIyaVnounqLvmf93yBF4EgIRspePtkMs3Tr844nCclYMlcCNmLCvjuQ== - dependencies: - "@types/chai" "*" - "@types/sinon" "*" - -"@types/sinon@*": - version "17.0.3" - resolved "https://registry.npmjs.org/@types/sinon/-/sinon-17.0.3.tgz" - integrity sha512-j3uovdn8ewky9kRBG19bOwaZbexJu/XjtkHyjvUgt4xfPFz18dcORIMqnYh66Fx3Powhcr85NT5+er3+oViapw== - dependencies: - "@types/sinonjs__fake-timers" "*" - -"@types/sinonjs__fake-timers@*": - version "8.1.5" - resolved "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.5.tgz" - integrity sha512-mQkU2jY8jJEF7YHjHvsQO8+3ughTL1mcnn96igfhONmR+fUPSKIkefQYpSe8bsly2Ep7oQbn/6VG5/9/0qcArQ== - "@uniswap/lib@^4.0.1-alpha": version "4.0.1-alpha" resolved "https://registry.npmjs.org/@uniswap/lib/-/lib-4.0.1-alpha.tgz" integrity sha512-f6UIliwBbRsgVLxIaBANF6w09tYqc6Y/qXdsrbEmXHyFA7ILiKrIwRFXe1yOg8M3cksgVsO9N7yuL2DdCGQKBA== +"@uniswap/sdk-core@^5.8.1": + version "5.8.3" + resolved "https://registry.yarnpkg.com/@uniswap/sdk-core/-/sdk-core-5.8.3.tgz#583abe7280448a65226fc56ec78585051f3aefc9" + integrity sha512-TqemD6YrIt1U7fY4t6y/OYdRnqWv3QB4DSN15INh+uQXNoBBE/8zWmdYBB6/7yTES47NkalpSnbokNTyNNqrTA== + dependencies: + "@ethersproject/address" "^5.0.2" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "5.7.0" + "@ethersproject/strings" "5.7.0" + big.js "^5.2.2" + decimal.js-light "^2.5.0" + jsbi "^3.1.4" + tiny-invariant "^1.1.0" + toformat "^2.0.0" + +"@uniswap/swap-router-contracts@^1.3.0": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@uniswap/swap-router-contracts/-/swap-router-contracts-1.3.1.tgz#0ebbb93eb578625618ed9489872de381f9c66fb4" + integrity sha512-mh/YNbwKb7Mut96VuEtL+Z5bRe0xVIbjjiryn+iMMrK2sFKhR4duk/86mEz0UO5gSx4pQIw9G5276P5heY/7Rg== + dependencies: + "@openzeppelin/contracts" "3.4.2-solc-0.7" + "@uniswap/v2-core" "^1.0.1" + "@uniswap/v3-core" "^1.0.0" + "@uniswap/v3-periphery" "^1.4.4" + dotenv "^14.2.0" + hardhat-watcher "^2.1.1" + "@uniswap/v2-core@^1.0.1": version "1.0.1" resolved "https://registry.npmjs.org/@uniswap/v2-core/-/v2-core-1.0.1.tgz" integrity sha512-MtybtkUPSyysqLY2U210NBDeCHX+ltHt3oADGdjqoThZaFRDKwM6k1Nb3F0A3hk5hwuQvytFWhrWHOEq6nVJ8Q== +"@uniswap/v3-core@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@^1.0.0", "@uniswap/v3-core@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@uniswap/v3-core/-/v3-core-1.0.1.tgz#b6d2bdc6ba3c3fbd610bdc502395d86cd35264a0" + integrity sha512-7pVk4hEm00j9tc71Y9+ssYpO6ytkeI0y7WE9P6UcmNzhxPePwyAxImuhVsTqWK9YFvzgtvzJHi64pBl4jUzKMQ== + +"@uniswap/v3-periphery@^1.0.1", "@uniswap/v3-periphery@^1.1.1", "@uniswap/v3-periphery@^1.4.4": + version "1.4.4" + resolved "https://registry.yarnpkg.com/@uniswap/v3-periphery/-/v3-periphery-1.4.4.tgz#d2756c23b69718173c5874f37fd4ad57d2f021b7" + integrity sha512-S4+m+wh8HbWSO3DKk4LwUCPZJTpCugIsHrWR86m/OrUyvSqGDTXKFfc2sMuGXCZrD1ZqO3rhQsKgdWg3Hbb2Kw== + dependencies: + "@openzeppelin/contracts" "3.4.2-solc-0.7" + "@uniswap/lib" "^4.0.1-alpha" + "@uniswap/v2-core" "^1.0.1" + "@uniswap/v3-core" "^1.0.0" + base64-sol "1.0.1" + +"@uniswap/v3-sdk@^3.11.0": + version "3.18.1" + resolved "https://registry.yarnpkg.com/@uniswap/v3-sdk/-/v3-sdk-3.18.1.tgz#cb714b252336ba662a3298c0525f6668101b0fef" + integrity sha512-TGrKLToSWwfx6VV2d7fh4kwQMlgspXTLE49ep5zfYODVVqV6WhrRdbteHb3e0bjdjxGSj0gzoLmhsjmoJTE1/g== + dependencies: + "@ethersproject/abi" "^5.5.0" + "@ethersproject/solidity" "^5.0.9" + "@uniswap/sdk-core" "^5.8.1" + "@uniswap/swap-router-contracts" "^1.3.0" + "@uniswap/v3-periphery" "^1.1.1" + "@uniswap/v3-staker" "1.0.0" + tiny-invariant "^1.1.0" + tiny-warning "^1.0.3" + +"@uniswap/v3-staker@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@uniswap/v3-staker/-/v3-staker-1.0.0.tgz#9a6915ec980852479dfc903f50baf822ff8fa66e" + integrity sha512-JV0Qc46Px5alvg6YWd+UIaGH9lDuYG/Js7ngxPit1SPaIP30AlVer1UYB7BRYeUVVxE+byUyIeN5jeQ7LLDjIw== + dependencies: + "@openzeppelin/contracts" "3.4.1-solc-0.7-2" + "@uniswap/v3-core" "1.0.0" + "@uniswap/v3-periphery" "^1.0.1" + "@yarnpkg/lockfile@^1.1.0": version "1.1.0" resolved "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz" integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== -abstract-leveldown@^2.4.1: +abstract-leveldown@3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-3.0.0.tgz" + integrity sha512-KUWx9UWGQD12zsmLNj64/pndaz4iJh/Pj7nopgkfDG6RlCcbMZvT6+9l7dchK4idog2Is8VdC/PvNbFuFmalIQ== + dependencies: + xtend "~4.0.0" + +abstract-leveldown@^2.4.1, abstract-leveldown@~2.7.1: version "2.7.2" resolved "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz" integrity sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w== dependencies: xtend "~4.0.0" -abstract-leveldown@^5.0.0: +abstract-leveldown@^5.0.0, abstract-leveldown@~5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-5.0.0.tgz" integrity sha512-5mU5P1gXtsMIXg65/rsYGsi93+MlogXZ9FA8JnwKurHQg64bfXwGYVdVdijNTVNOlAsuIiOwHdvFFD5JqCJQ7A== @@ -1586,43 +1663,19 @@ abstract-leveldown@~2.6.0: dependencies: xtend "~4.0.0" -abstract-leveldown@~2.7.1: - version "2.7.2" - resolved "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz" - integrity sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w== - dependencies: - xtend "~4.0.0" - -abstract-leveldown@~5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-5.0.0.tgz" - integrity sha512-5mU5P1gXtsMIXg65/rsYGsi93+MlogXZ9FA8JnwKurHQg64bfXwGYVdVdijNTVNOlAsuIiOwHdvFFD5JqCJQ7A== - dependencies: - xtend "~4.0.0" - -abstract-leveldown@3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-3.0.0.tgz" - integrity sha512-KUWx9UWGQD12zsmLNj64/pndaz4iJh/Pj7nopgkfDG6RlCcbMZvT6+9l7dchK4idog2Is8VdC/PvNbFuFmalIQ== - dependencies: - xtend "~4.0.0" - -accepts@~1.3.7: - version "1.3.7" +accepts@~1.3.8: + version "1.3.8" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" + integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== dependencies: - mime-types "~2.1.24" - negotiator "0.6.2" + mime-types "~2.1.34" + negotiator "0.6.3" adm-zip@^0.4.16: version "0.4.16" resolved "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.16.tgz" integrity sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg== -aes-js@^3.1.1: - version "3.1.2" - resolved "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz" - integrity sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ== - aes-js@3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz" @@ -1633,6 +1686,11 @@ aes-js@4.0.0-beta.5: resolved "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz" integrity sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q== +aes-js@^3.1.1: + version "3.1.2" + resolved "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz" + integrity sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ== + agent-base@6: version "6.0.2" resolved "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz" @@ -1668,7 +1726,7 @@ ajv@^8.0.1: require-from-string "^2.0.2" uri-js "^4.2.2" -amazon-cognito-identity-js@^6.3.6: +amazon-cognito-identity-js@^6.0.1, amazon-cognito-identity-js@^6.3.6: version "6.3.12" resolved "https://registry.npmjs.org/amazon-cognito-identity-js/-/amazon-cognito-identity-js-6.3.12.tgz" integrity sha512-s7NKDZgx336cp+oDeUtB2ZzT8jWJp/v2LWuYl+LQtMEODe22RF1IJ4nRiDATp+rp1pTffCZcm44Quw4jx2bqNg== @@ -1686,16 +1744,16 @@ ansi-align@^3.0.0: dependencies: string-width "^4.1.0" -ansi-colors@^4.1.1: - version "4.1.3" - resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz" - integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== - ansi-colors@4.1.1: version "4.1.1" resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz" integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== +ansi-colors@^4.1.1: + version "4.1.3" + resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz" + integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== + ansi-escapes@^4.3.0: version "4.3.2" resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz" @@ -1730,14 +1788,7 @@ ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -ansi-styles@^4.0.0: - version "4.3.0" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -ansi-styles@^4.1.0: +ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.3.0" resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== @@ -1777,14 +1828,7 @@ arr-union@^3.1.0: resolved "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz" integrity sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q== -array-back@^1.0.3: - version "1.0.4" - resolved "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz" - integrity sha512-1WxbZvrmyhkNoeYcizokbmh5oiOCIfyvGtcqbK3Ls1v1fKcquzxnQSceOx6tzq7jmai2kFLWIpGND2cLhH6TPw== - dependencies: - typical "^2.6.0" - -array-back@^1.0.4: +array-back@^1.0.3, array-back@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz" integrity sha512-1WxbZvrmyhkNoeYcizokbmh5oiOCIfyvGtcqbK3Ls1v1fKcquzxnQSceOx6tzq7jmai2kFLWIpGND2cLhH6TPw== @@ -1806,6 +1850,14 @@ array-buffer-byte-length@^1.0.0: call-bind "^1.0.2" is-array-buffer "^3.0.1" +array-buffer-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz#1e5583ec16763540a27ae52eed99ff899223568f" + integrity sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg== + dependencies: + call-bind "^1.0.5" + is-array-buffer "^3.0.4" + array-flatten@1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz" @@ -1832,6 +1884,19 @@ array.prototype.findlast@^1.2.2: es-shim-unscopables "^1.0.0" get-intrinsic "^1.2.1" +array.prototype.reduce@^1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/array.prototype.reduce/-/array.prototype.reduce-1.0.7.tgz#6aadc2f995af29cb887eb866d981dc85ab6f7dc7" + integrity sha512-mzmiUCVwtiD4lgxYP8g7IYy8El8p2CSMePvIbTS7gchKir/L1fgJrk0yDKmAX6mnRQFKNADYIk8nNlTris5H1Q== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-array-method-boxes-properly "^1.0.0" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + is-string "^1.0.7" + arraybuffer.prototype.slice@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz" @@ -1845,11 +1910,34 @@ arraybuffer.prototype.slice@^1.0.2: is-array-buffer "^3.0.2" is-shared-array-buffer "^1.0.2" +arraybuffer.prototype.slice@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz#097972f4255e41bc3425e37dc3f6421cf9aefde6" + integrity sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A== + dependencies: + array-buffer-byte-length "^1.0.1" + call-bind "^1.0.5" + define-properties "^1.2.1" + es-abstract "^1.22.3" + es-errors "^1.2.1" + get-intrinsic "^1.2.3" + is-array-buffer "^3.0.4" + is-shared-array-buffer "^1.0.2" + asap@~2.0.6: version "2.0.6" resolved "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz" integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA== +asn1.js@^4.10.1: + version "4.10.1" + resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" + integrity sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw== + dependencies: + bn.js "^4.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + asn1.js@^5.2.0: version "5.4.1" resolved "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz" @@ -1867,7 +1955,7 @@ asn1@~0.2.3: dependencies: safer-buffer "~2.1.0" -assert-plus@^1.0.0, assert-plus@1.0.0: +assert-plus@1.0.0, assert-plus@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz" integrity sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw== @@ -1906,18 +1994,18 @@ async-retry@^1.3.3: dependencies: retry "0.13.1" -async@^1.4.2: - version "1.5.2" - resolved "https://registry.npmjs.org/async/-/async-1.5.2.tgz" - 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, async@2.6.2: +async@2.6.2, async@^2.0.1, async@^2.1.2, async@^2.4.0, async@^2.5.0, async@^2.6.1: version "2.6.2" resolved "https://registry.npmjs.org/async/-/async-2.6.2.tgz" integrity sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg== dependencies: lodash "^4.17.11" +async@^1.4.2: + version "1.5.2" + resolved "https://registry.npmjs.org/async/-/async-1.5.2.tgz" + integrity sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w== + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" @@ -1938,6 +2026,13 @@ available-typed-arrays@^1.0.5: resolved "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz" integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== +available-typed-arrays@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz#a5cc375d6a03c2efc87a553f3e0b1522def14846" + integrity sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ== + dependencies: + possible-typed-array-names "^1.0.0" + aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz" @@ -1955,7 +2050,16 @@ axios@^0.21.1: dependencies: follow-redirects "^1.14.0" -axios@^1.5.1, axios@^1.6.8: +axios@^1.4.0, axios@^1.7.2: + version "1.7.7" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.7.tgz#2f554296f9892a72ac8d8e4c5b79c14a91d0a47f" + integrity sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q== + dependencies: + follow-redirects "^1.15.6" + form-data "^4.0.0" + proxy-from-env "^1.1.0" + +axios@^1.5.1: version "1.7.2" resolved "https://registry.npmjs.org/axios/-/axios-1.7.2.tgz" integrity sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw== @@ -2503,10 +2607,22 @@ base-x@^3.0.2: safe-buffer "^5.0.1" base-x@^3.0.8: - version "3.0.8" + version "3.0.10" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.10.tgz#62de58653f8762b5d6f8d9fe30fa75f7b2585a75" + integrity sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ== dependencies: safe-buffer "^5.0.1" +base64-js@^1.0.2, base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz" + 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.npmjs.org/base/-/base-0.11.2.tgz" @@ -2520,16 +2636,6 @@ base@^0.11.1: mixin-deep "^1.2.0" pascalcase "^0.1.1" -base64-js@^1.0.2: - version "1.5.1" - resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz" - integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== - -base64-js@^1.3.1: - version "1.5.1" - resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz" - integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== - bcrypt-pbkdf@^1.0.0: version "1.0.2" resolved "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz" @@ -2542,8 +2648,15 @@ bech32@1.1.4: resolved "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz" integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== -bignumber.js@^9.0.0: - version "9.0.1" +big.js@^5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" + integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== + +bignumber.js@^9.0.0, bignumber.js@^9.1.2: + version "9.1.2" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.2.tgz#b7c4242259c008903b13707983b5f4bbd31eda0c" + integrity sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug== binary-extensions@^2.0.0: version "2.2.0" @@ -2566,58 +2679,43 @@ blakejs@^1.1.0: resolved "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz" integrity sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ== -bluebird@^3.5.0: - version "3.7.2" - resolved "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz" - integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== - -bluebird@^3.5.2: +bluebird@^3.5.0, bluebird@^3.5.2: version "3.7.2" resolved "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.10.0, bn.js@^4.11.1, bn.js@^4.11.6, bn.js@^4.4.0, bn.js@^4.8.0: - version "4.11.9" - -bn.js@^4.11.0, bn.js@^4.11.8: - version "4.12.0" - resolved "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz" - integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== +bn.js@4.11.6: + version "4.11.6" + resolved "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz" + integrity sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA== -bn.js@^4.11.9: +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.npmjs.org/bn.js/-/bn.js-4.12.0.tgz" integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== -bn.js@^5.0.0: - version "5.1.3" - -bn.js@^5.1.1: - version "5.1.3" - -bn.js@^5.1.2, bn.js@^5.2.0, bn.js@^5.2.1: +bn.js@^5.0.0, bn.js@^5.1.2, bn.js@^5.2.0, bn.js@^5.2.1: version "5.2.1" resolved "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz" integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== -bn.js@4.11.6: - version "4.11.6" - resolved "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz" - integrity sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA== - -body-parser@^1.16.0, body-parser@1.19.0: - version "1.19.0" +body-parser@1.20.3, body-parser@^1.16.0: + version "1.20.3" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.3.tgz#1953431221c6fb5cd63c4b36d53fab0928e548c6" + integrity sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g== dependencies: - bytes "3.1.0" - content-type "~1.0.4" + bytes "3.1.2" + content-type "~1.0.5" debug "2.6.9" - depd "~1.1.2" - http-errors "1.7.2" + 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.7.0" - raw-body "2.4.0" - type-is "~1.6.17" + on-finished "2.4.1" + qs "6.13.0" + raw-body "2.5.2" + type-is "~1.6.18" + unpipe "1.0.0" boxen@^5.1.2: version "5.1.2" @@ -2671,12 +2769,7 @@ braces@^3.0.2, braces@~3.0.2: dependencies: fill-range "^7.0.1" -brorand@^1.0.1: - version "1.1.0" - resolved "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz" - integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== - -brorand@^1.1.0: +brorand@^1.0.1, brorand@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz" integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== @@ -2717,7 +2810,7 @@ browserify-des@^1.0.0: inherits "^2.0.1" safe-buffer "^5.1.2" -browserify-rsa@^4.0.0, browserify-rsa@^4.0.1: +browserify-rsa@^4.0.0: version "4.1.0" resolved "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz" integrity sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog== @@ -2725,18 +2818,30 @@ browserify-rsa@^4.0.0, browserify-rsa@^4.0.1: bn.js "^5.0.0" randombytes "^2.0.1" +browserify-rsa@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.1.1.tgz#06e530907fe2949dc21fc3c2e2302e10b1437238" + integrity sha512-YBjSAiTqM04ZVei6sXighu679a3SqWORA3qZTEqZImnlkDIFtKc6pNutpjyZ8RJTjQtuYfeetkxM11GwoYXMIQ== + dependencies: + bn.js "^5.2.1" + randombytes "^2.1.0" + safe-buffer "^5.2.1" + browserify-sign@^4.0.0: - version "4.2.1" + version "4.2.3" + resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.2.3.tgz#7afe4c01ec7ee59a89a558a4b75bd85ae62d4208" + integrity sha512-JWCZW6SKhfhjJxO8Tyiiy+XYB7cqd2S5/+WeYHsKdNKFlCBhKbblba1A/HN/90YwtxKc8tCErjffZl++UNmGiw== dependencies: - bn.js "^5.1.1" - browserify-rsa "^4.0.1" + bn.js "^5.2.1" + browserify-rsa "^4.1.0" create-hash "^1.2.0" create-hmac "^1.1.7" - elliptic "^6.5.3" + elliptic "^6.5.5" + hash-base "~3.0" inherits "^2.0.4" - parse-asn1 "^5.1.5" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" + parse-asn1 "^5.1.7" + readable-stream "^2.3.8" + safe-buffer "^5.2.1" browserslist@^3.2.6: version "3.2.8" @@ -2746,7 +2851,7 @@ browserslist@^3.2.6: caniuse-lite "^1.0.30000844" electron-to-chromium "^1.3.47" -browserslist@^4.22.2, "browserslist@>= 4.21.0": +browserslist@^4.22.2: version "4.22.2" resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.22.2.tgz" integrity sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A== @@ -2794,14 +2899,6 @@ buffer-xor@^2.0.1: dependencies: safe-buffer "^5.1.1" -buffer@^5.0.5, buffer@^5.2.1, buffer@^5.5.0, buffer@^5.6.0: - version "5.7.1" - resolved "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz" - integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.1.13" - buffer@4.9.2: version "4.9.2" resolved "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz" @@ -2811,13 +2908,20 @@ buffer@4.9.2: ieee754 "^1.1.4" isarray "^1.0.0" -bufferutil@^4.0.1: - version "4.0.3" +buffer@^5.0.5, buffer@^5.2.1, buffer@^5.5.0, buffer@^5.6.0: + version "5.7.1" + resolved "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== dependencies: - node-gyp-build "^4.2.0" + base64-js "^1.3.1" + ieee754 "^1.1.13" -bytes@3.1.0: - version "3.1.0" +bufferutil@^4.0.1: + version "4.0.8" + resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.8.tgz#1de6a71092d65d7766c4d8a522b261a6e787e8ea" + integrity sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw== + dependencies: + node-gyp-build "^4.3.0" bytes@3.1.2: version "3.1.2" @@ -2854,6 +2958,11 @@ cache-base@^1.0.1: union-value "^1.0.0" unset-value "^1.0.0" +cacheable-lookup@^5.0.3: + version "5.0.4" + resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz#5a6b865b2c44357be3d5ebc2a467b032719a7005" + integrity sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA== + cacheable-request@^6.0.0: version "6.1.0" resolved "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz" @@ -2867,6 +2976,19 @@ cacheable-request@^6.0.0: normalize-url "^4.1.0" responselike "^1.0.2" +cacheable-request@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-7.0.4.tgz#7a33ebf08613178b403635be7b899d3e69bbe817" + integrity sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg== + dependencies: + clone-response "^1.0.2" + get-stream "^5.1.0" + http-cache-semantics "^4.0.0" + keyv "^4.0.0" + lowercase-keys "^2.0.0" + normalize-url "^6.0.1" + responselike "^2.0.0" + cachedown@1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/cachedown/-/cachedown-1.0.0.tgz" @@ -2884,6 +3006,17 @@ call-bind@^1.0.0, call-bind@^1.0.2, call-bind@^1.0.4, call-bind@^1.0.5: get-intrinsic "^1.2.1" set-function-length "^1.1.1" +call-bind@^1.0.6, call-bind@^1.0.7, call-bind@~1.0.2: + version "1.0.7" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" + integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + set-function-length "^1.2.1" + camelcase@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz" @@ -2895,7 +3028,9 @@ camelcase@^6.0.0, camelcase@^6.2.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30000844: - version "1.0.30001174" + version "1.0.30001668" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001668.tgz#98e214455329f54bf7a4d70b49c9794f0fbedbed" + integrity sha512-nWLrdxqCdblixUO+27JtGJJE/txpJlyUy5YN1u53wLZkP0emYCo5zgS6QYft7VUYR42LGgi/S5hdLZTrnyIddw== caniuse-lite@^1.0.30001565: version "1.0.30001576" @@ -2937,7 +3072,7 @@ chai-eventemitter2@^0.2.1: lodash.groupby "^4.6.0" lodash.ismatch "^4.4.0" -chai@^4.2.0, chai@^4.3.8, "chai@>= 2.1.2 < 5": +chai@^4.3.8: version "4.4.0" resolved "https://registry.npmjs.org/chai/-/chai-4.4.0.tgz" integrity sha512-x9cHNq1uvkCdU+5xTkNh5WtgD4e4yDFCsp9jVc7N7qVeKeftv3gO/ZrviX5d+3ZfxdYnZXZYujjRInu1RogU6A== @@ -2970,23 +3105,7 @@ chalk@^2.4.1, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.0.0: - version "4.1.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -chalk@^4.1.0: - version "4.1.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -chalk@^4.1.2: +chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2: version "4.1.2" resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -3013,7 +3132,7 @@ checkpoint-store@^1.1.0: dependencies: functional-red-black-tree "^1.0.1" -chokidar@^3.4.0, chokidar@^3.5.2, chokidar@3.5.3: +chokidar@3.5.3, chokidar@^3.5.2: version "3.5.3" resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz" integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== @@ -3028,8 +3147,32 @@ chokidar@^3.4.0, chokidar@^3.5.2, chokidar@3.5.3: optionalDependencies: fsevents "~2.3.2" -chownr@^1.1.1: +chokidar@^3.5.3: + version "3.6.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" + integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + +chokidar@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-4.0.1.tgz#4a6dff66798fb0f72a94f616abbd7e1a19f31d41" + integrity sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA== + dependencies: + readdirp "^4.0.1" + +chownr@^1.1.4: version "1.1.4" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" + integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== ci-info@^2.0.0: version "2.0.0" @@ -3118,11 +3261,13 @@ cliui@^7.0.2: wrap-ansi "^7.0.0" clone-response@^1.0.2: - version "1.0.2" + 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.0.0, clone@2.1.2: +clone@2.1.2, clone@^2.0.0: version "2.1.2" resolved "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz" integrity sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w== @@ -3154,17 +3299,17 @@ color-convert@^2.0.1: dependencies: color-name "~1.1.4" -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - color-name@1.1.3: version "1.1.3" resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== -colors@^1.1.2, colors@1.4.0: +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +colors@1.4.0, colors@^1.1.2: version "1.4.0" resolved "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== @@ -3190,40 +3335,32 @@ command-line-args@^4.0.7: find-replace "^1.0.3" typical "^2.6.1" -commander@^8.1.0: - version "8.3.0" - resolved "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz" - integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== - commander@3.0.2: version "3.0.2" resolved "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz" integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== +commander@^8.1.0: + version "8.3.0" + resolved "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz" + integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== + compare-versions@^6.0.0: version "6.1.0" resolved "https://registry.npmjs.org/compare-versions/-/compare-versions-6.1.0.tgz" integrity sha512-LNZQXhqUvqUTotpZ00qLSaify3b4VFD588aRr8MKFw4CMUr98ytzCW5wDH5qx/DEY5kCDXcbcRuCqL0szEf2tg== component-emitter@^1.2.1: - version "1.3.0" + version "1.3.1" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.1.tgz#ef1d5796f7d93f135ee6fb684340b26403c97d17" + integrity sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ== concat-map@0.0.1: version "0.0.1" resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== -concat-stream@^1.5.1: - version "1.6.2" - resolved "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz" - integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - -concat-stream@^1.6.0, concat-stream@^1.6.2: +concat-stream@^1.5.1, concat-stream@^1.6.0, concat-stream@^1.6.2: version "1.6.2" resolved "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz" integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== @@ -3233,10 +3370,12 @@ concat-stream@^1.6.0, concat-stream@^1.6.2: readable-stream "^2.2.2" typedarray "^0.0.6" -content-disposition@0.5.3: - version "0.5.3" +content-disposition@0.5.4: + version "0.5.4" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" + integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== dependencies: - safe-buffer "5.1.2" + safe-buffer "5.2.1" content-hash@^2.5.2: version "2.5.2" @@ -3247,13 +3386,15 @@ content-hash@^2.5.2: multicodec "^0.5.5" multihashes "^0.4.15" -content-type@~1.0.4: - version "1.0.4" +content-type@~1.0.4, content-type@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" + integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== convert-source-map@^1.5.1: - version "1.7.0" - dependencies: - safe-buffer "~5.1.1" + version "1.9.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" + integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== convert-source-map@^2.0.0: version "2.0.0" @@ -3265,16 +3406,20 @@ cookie-signature@1.0.6: resolved "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz" integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== +cookie@0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.7.1.tgz#2f73c42142d5d5cf71310a74fc4ae61670e5dbc9" + integrity sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w== + cookie@^0.4.1: version "0.4.2" resolved "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz" integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== -cookie@0.4.0: - version "0.4.0" - cookiejar@^2.1.1: - version "2.1.2" + version "2.1.4" + resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.4.tgz#ee669c1fea2cf42dc31585469d193fef0d65771b" + integrity sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw== copy-descriptor@^0.1.0: version "0.1.1" @@ -3282,14 +3427,16 @@ copy-descriptor@^0.1.0: integrity sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw== core-js-pure@^3.0.1: - version "3.8.2" + version "3.38.1" + resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.38.1.tgz#e8534062a54b7221344884ba9b52474be495ada3" + integrity sha512-BY8Etc1FZqdw1glX0XNOq2FDwfrg/VGqoZOZCdaL+UmdaqDwQwYXkMJT4t6In+zfEfOJDcM9T0KdbBeJg8KKCQ== core-js@^2.4.0, core-js@^2.5.0: version "2.6.12" resolved "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz" integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== -core-util-is@~1.0.0, core-util-is@1.0.2: +core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ== @@ -3339,10 +3486,12 @@ create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: sha.js "^2.4.8" cross-fetch@^2.1.0, cross-fetch@^2.1.1: - version "2.2.3" + 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.1.2" - whatwg-fetch "2.0.4" + node-fetch "^2.6.7" + whatwg-fetch "^2.0.4" cross-fetch@^3.1.4: version "3.1.8" @@ -3384,7 +3533,7 @@ crypto-browserify@3.12.0: randombytes "^2.0.0" randomfill "^1.0.3" -d@^1.0.1, d@1: +d@1, d@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/d/-/d-1.0.1.tgz" integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== @@ -3392,6 +3541,14 @@ d@^1.0.1, d@1: es5-ext "^0.10.50" type "^1.0.1" +d@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.2.tgz#2aefd554b81981e7dccf72d6842ae725cb17e5de" + integrity sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw== + dependencies: + es5-ext "^0.10.64" + type "^2.7.2" + dashdash@^1.12.0: version "1.14.1" resolved "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz" @@ -3399,59 +3556,58 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" -debug@^2.2.0: - version "2.6.9" - resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== +data-view-buffer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/data-view-buffer/-/data-view-buffer-1.0.1.tgz#8ea6326efec17a2e42620696e671d7d5a8bc66b2" + integrity sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA== dependencies: - ms "2.0.0" + call-bind "^1.0.6" + es-errors "^1.3.0" + is-data-view "^1.0.1" -debug@^2.3.3: - version "2.6.9" - resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== +data-view-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz#90721ca95ff280677eb793749fce1011347669e2" + integrity sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ== dependencies: - ms "2.0.0" + call-bind "^1.0.7" + es-errors "^1.3.0" + is-data-view "^1.0.1" -debug@^2.6.8: - version "2.6.9" - resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== +data-view-byte-offset@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz#5e0bbfb4828ed2d1b9b400cd8a7d119bca0ff18a" + integrity sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA== dependencies: - ms "2.0.0" + call-bind "^1.0.6" + es-errors "^1.3.0" + is-data-view "^1.0.1" -debug@^2.6.9: +debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: version "2.6.9" resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== dependencies: ms "2.0.0" -debug@^3.1.0: - version "3.2.7" - resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz" - integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== +debug@3.2.6: + version "3.2.6" + resolved "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz" + integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== dependencies: ms "^2.1.1" -debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@4, debug@4.3.4: +debug@4, debug@4.3.4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: version "4.3.4" resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== dependencies: ms "2.1.2" -debug@2.6.9: - version "2.6.9" - resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@3.2.6: - version "3.2.6" - resolved "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== +debug@^3.1.0: + version "3.2.7" + resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== dependencies: ms "^2.1.1" @@ -3465,16 +3621,30 @@ decamelize@^4.0.0: resolved "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz" integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== +decimal.js-light@^2.5.0: + version "2.5.1" + resolved "https://registry.yarnpkg.com/decimal.js-light/-/decimal.js-light-2.5.1.tgz#134fd32508f19e208f4fb2f8dac0d2626a867934" + integrity sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg== + decode-uri-component@^0.2.0: - version "0.2.0" + version "0.2.2" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" + integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ== -decompress-response@^3.2.0, decompress-response@^3.3.0: +decompress-response@^3.3.0: version "3.3.0" resolved "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz" integrity sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA== dependencies: mimic-response "^1.0.0" +decompress-response@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" + integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ== + dependencies: + mimic-response "^3.1.0" + deep-eql@^4.0.1, deep-eql@^4.1.3: version "4.1.3" resolved "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz" @@ -3507,20 +3677,27 @@ deep-equal@^2.0.5: which-typed-array "^1.1.13" deep-equal@~1.1.1: - version "1.1.1" + version "1.1.2" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.1.2.tgz#78a561b7830eef3134c7f6f3a3d6af272a678761" + integrity sha512-5tdhKF6DbU7iIzrIOa1AOUt39ZRm13cmL1cGEh//aqR8x9+tNfbywRf0n5FD/18OKMdo7DNEtrX2t22ZAkI+eg== dependencies: - is-arguments "^1.0.4" - is-date-object "^1.0.1" - is-regex "^1.0.4" - object-is "^1.0.1" + is-arguments "^1.1.1" + is-date-object "^1.0.5" + is-regex "^1.1.4" + object-is "^1.1.5" object-keys "^1.1.1" - regexp.prototype.flags "^1.2.0" + regexp.prototype.flags "^1.5.1" defer-to-connect@^1.0.1: version "1.1.3" resolved "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz" integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== +defer-to-connect@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.1.tgz#8016bdb4143e4632b77a3449c6236277de520587" + integrity sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg== + deferred-leveldown@~1.2.1: version "1.2.2" resolved "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz" @@ -3545,6 +3722,15 @@ define-data-property@^1.0.1, define-data-property@^1.1.1: gopd "^1.0.1" has-property-descriptors "^1.0.0" +define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + define-properties@^1.1.3, define-properties@^1.2.0, define-properties@^1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz" @@ -3576,30 +3762,33 @@ define-property@^2.0.2: is-descriptor "^1.0.2" isobject "^3.0.1" -defined@~1.0.0: - version "1.0.0" +defined@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.1.tgz#c0b9db27bfaffd95d6f61399419b893df0f91ebf" + integrity sha512-hsBd2qSVCRE+5PmNdHt1uzyrFu5d3RwmFDKzyNZMFq/EwDNJF7Ee5+D5oEKF0hU6LhtoUF1macFvOe4AskQC1Q== delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== -depd@~1.1.2: - version "1.1.2" - depd@2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz" integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== des.js@^1.0.0: - version "1.0.1" + version "1.1.0" + resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.1.0.tgz#1d37f5766f3bbff4ee9638e871a8768c173b81da" + integrity sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg== dependencies: inherits "^2.0.1" minimalistic-assert "^1.0.0" -destroy@~1.0.4: - version "1.0.4" +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" @@ -3632,6 +3821,11 @@ dotenv@^10.0.0: resolved "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz" integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q== +dotenv@^14.2.0: + version "14.3.2" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-14.3.2.tgz#7c30b3a5f777c79a3429cb2db358eef6751e8369" + integrity sha512-vwEppIphpFdvaMCaHfCEv9IgwcxMljMw2TnAQBB4VWPvzXQLTb82jwmdOKzlEVUL3gNFT4l4TPKO+Bn+sqcrVQ== + dotignore@~0.1.2: version "0.1.2" resolved "https://registry.npmjs.org/dotignore/-/dotignore-0.1.2.tgz" @@ -3640,7 +3834,9 @@ dotignore@~0.1.2: minimatch "^3.0.4" duplexer3@^0.1.4: - version "0.1.4" + 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" @@ -3656,25 +3852,16 @@ ee-first@1.1.1: integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== electron-to-chromium@^1.3.47: - version "1.3.636" + version "1.5.38" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.38.tgz#c6a14e1506717c5a46d439580d7424d8d5860180" + integrity sha512-VbeVexmZ1IFh+5EfrYz1I0HTzHVIlJa112UEWhciPyeOcKJGeTv6N8WnG4wsQB81DGCaVEGhpSb6o6a8WYFXXg== electron-to-chromium@^1.4.601: version "1.4.628" resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.628.tgz" integrity sha512-2k7t5PHvLsufpP6Zwk0nof62yLOsCf032wZx7/q0mv8gwlXjhcxI3lz6f0jBr0GrnWKcm3burXzI3t5IrcdUxw== -elliptic@^6.4.0, elliptic@^6.5.3, elliptic@6.5.3: - version "6.5.3" - dependencies: - bn.js "^4.4.0" - brorand "^1.0.1" - hash.js "^1.0.0" - hmac-drbg "^1.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.0" - -elliptic@^6.5.2, elliptic@^6.5.4, elliptic@6.5.4: +elliptic@6.5.4, elliptic@^6.5.2, elliptic@^6.5.4: version "6.5.4" resolved "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz" integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== @@ -3687,6 +3874,19 @@ elliptic@^6.5.2, elliptic@^6.5.4, elliptic@6.5.4: minimalistic-assert "^1.0.1" minimalistic-crypto-utils "^1.0.1" +elliptic@^6.4.0, elliptic@^6.5.3, elliptic@^6.5.5: + version "6.5.7" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.7.tgz#8ec4da2cb2939926a1b9a73619d768207e647c8b" + integrity sha512-ESVCtTwiA+XhY3wyh24QqRGBoP3rEdDUl3EDUUo9tft074fi19IrdpH7hLCMMP3CIj7jb3W96rn8lt/BqIlt5Q== + dependencies: + bn.js "^4.11.9" + brorand "^1.1.0" + hash.js "^1.0.0" + hmac-drbg "^1.0.1" + inherits "^2.0.4" + minimalistic-assert "^1.0.1" + minimalistic-crypto-utils "^1.0.1" + emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" @@ -3702,7 +3902,12 @@ encodeurl@~1.0.2: resolved "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz" integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== -encoding-down@~5.0.0, encoding-down@5.0.4: +encodeurl@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-2.0.0.tgz#7b8ea898077d7e409d3ac45474ea38eaf0857a58" + integrity sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg== + +encoding-down@5.0.4, encoding-down@~5.0.0: version "5.0.4" resolved "https://registry.npmjs.org/encoding-down/-/encoding-down-5.0.4.tgz" integrity sha512-8CIZLDcSKxgzT+zX8ZVfgNbu8Md2wq/iqa1Y7zyVR18QBEAc0Nmzuvj/N5ykSKpfGzjM8qxbaFntLPwnVoUhZw== @@ -3754,37 +3959,6 @@ error-ex@^1.2.0: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.17.0-next.1: - version "1.17.7" - dependencies: - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" - is-callable "^1.2.2" - is-regex "^1.1.1" - object-inspect "^1.8.0" - object-keys "^1.1.1" - object.assign "^4.1.1" - string.prototype.trimend "^1.0.1" - string.prototype.trimstart "^1.0.1" - -es-abstract@^1.18.0-next.1: - version "1.18.0-next.1" - dependencies: - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" - is-callable "^1.2.2" - is-negative-zero "^2.0.0" - is-regex "^1.1.1" - object-inspect "^1.8.0" - object-keys "^1.1.1" - object.assign "^4.1.1" - string.prototype.trimend "^1.0.1" - string.prototype.trimstart "^1.0.1" - es-abstract@^1.22.1: version "1.22.3" resolved "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz" @@ -3830,6 +4004,75 @@ es-abstract@^1.22.1: unbox-primitive "^1.0.2" which-typed-array "^1.1.13" +es-abstract@^1.22.3, es-abstract@^1.23.0, es-abstract@^1.23.2: + version "1.23.3" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.23.3.tgz#8f0c5a35cd215312573c5a27c87dfd6c881a0aa0" + integrity sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A== + dependencies: + array-buffer-byte-length "^1.0.1" + arraybuffer.prototype.slice "^1.0.3" + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" + data-view-buffer "^1.0.1" + data-view-byte-length "^1.0.1" + data-view-byte-offset "^1.0.0" + es-define-property "^1.0.0" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + es-set-tostringtag "^2.0.3" + es-to-primitive "^1.2.1" + function.prototype.name "^1.1.6" + get-intrinsic "^1.2.4" + get-symbol-description "^1.0.2" + globalthis "^1.0.3" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + has-proto "^1.0.3" + has-symbols "^1.0.3" + hasown "^2.0.2" + internal-slot "^1.0.7" + is-array-buffer "^3.0.4" + is-callable "^1.2.7" + is-data-view "^1.0.1" + is-negative-zero "^2.0.3" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.3" + is-string "^1.0.7" + is-typed-array "^1.1.13" + is-weakref "^1.0.2" + object-inspect "^1.13.1" + object-keys "^1.1.1" + object.assign "^4.1.5" + regexp.prototype.flags "^1.5.2" + safe-array-concat "^1.1.2" + safe-regex-test "^1.0.3" + string.prototype.trim "^1.2.9" + string.prototype.trimend "^1.0.8" + string.prototype.trimstart "^1.0.8" + typed-array-buffer "^1.0.2" + typed-array-byte-length "^1.0.1" + typed-array-byte-offset "^1.0.2" + typed-array-length "^1.0.6" + unbox-primitive "^1.0.2" + which-typed-array "^1.1.15" + +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-define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" + integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== + dependencies: + get-intrinsic "^1.2.4" + +es-errors@^1.2.1, es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + es-get-iterator@^1.1.3: version "1.1.3" resolved "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz" @@ -3845,6 +4088,13 @@ es-get-iterator@^1.1.3: isarray "^2.0.5" stop-iteration-iterator "^1.0.0" +es-object-atoms@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.0.0.tgz#ddb55cd47ac2e240701260bc2a8e31ecb643d941" + integrity sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw== + dependencies: + es-errors "^1.3.0" + es-set-tostringtag@^2.0.1: version "2.0.2" resolved "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz" @@ -3854,6 +4104,15 @@ es-set-tostringtag@^2.0.1: has-tostringtag "^1.0.0" hasown "^2.0.0" +es-set-tostringtag@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz#8bb60f0a440c2e4281962428438d58545af39777" + integrity sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ== + dependencies: + get-intrinsic "^1.2.4" + has-tostringtag "^1.0.2" + hasown "^2.0.1" + es-shim-unscopables@^1.0.0: version "1.0.2" resolved "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz" @@ -3870,21 +4129,26 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -es5-ext@^0.10.35, es5-ext@^0.10.50: - version "0.10.53" +es5-ext@^0.10.35, es5-ext@^0.10.50, es5-ext@^0.10.62, es5-ext@^0.10.64, es5-ext@~0.10.14: + version "0.10.64" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.64.tgz#12e4ffb48f1ba2ea777f1fcdd1918ef73ea21714" + integrity sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg== dependencies: - es6-iterator "~2.0.3" - es6-symbol "~3.1.3" - next-tick "~1.0.0" + es6-iterator "^2.0.3" + es6-symbol "^3.1.3" + esniff "^2.0.1" + next-tick "^1.1.0" -es6-iterator@~2.0.3: +es6-iterator@^2.0.3: version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + integrity sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g== dependencies: d "1" es5-ext "^0.10.35" es6-symbol "^3.1.1" -es6-symbol@^3.1.1, es6-symbol@~3.1.3: +es6-symbol@^3.1.1: version "3.1.3" resolved "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz" integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== @@ -3892,6 +4156,14 @@ es6-symbol@^3.1.1, es6-symbol@~3.1.3: d "^1.0.1" ext "^1.1.2" +es6-symbol@^3.1.3: + version "3.1.4" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.4.tgz#f4e7d28013770b4208ecbf3e0bf14d3bcb557b8c" + integrity sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg== + dependencies: + d "^1.0.2" + ext "^1.7.0" + escalade@^3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz" @@ -3902,15 +4174,25 @@ escape-html@~1.0.3: resolved "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz" integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== +escape-string-regexp@4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== -escape-string-regexp@4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== +esniff@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/esniff/-/esniff-2.0.1.tgz#a4d4b43a5c71c7ec51c51098c1d8a29081f9b308" + integrity sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg== + dependencies: + d "^1.0.1" + es5-ext "^0.10.62" + event-emitter "^0.3.5" + type "^2.7.2" esutils@^2.0.2: version "2.0.3" @@ -3935,15 +4217,7 @@ eth-block-tracker@^3.0.0: pify "^2.3.0" tape "^4.6.3" -eth-ens-namehash@^2.0.8: - version "2.0.8" - resolved "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz" - integrity sha512-VWEI1+KJfz4Km//dadyvBBoBeSQ0MHTXPvr8UIXiLW6IanxvAV+DmlZAijZwAyggqGUfwQBeHf7tc9wzc1piSw== - dependencies: - idna-uts46-hx "^2.3.1" - js-sha3 "^0.5.7" - -eth-ens-namehash@2.0.8: +eth-ens-namehash@2.0.8, eth-ens-namehash@^2.0.8: version "2.0.8" resolved "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz" integrity sha512-VWEI1+KJfz4Km//dadyvBBoBeSQ0MHTXPvr8UIXiLW6IanxvAV+DmlZAijZwAyggqGUfwQBeHf7tc9wzc1piSw== @@ -3999,6 +4273,15 @@ eth-json-rpc-middleware@^1.5.0: promise-to-callback "^1.0.0" tape "^4.6.3" +eth-lib@0.2.8: + version "0.2.8" + resolved "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz" + integrity sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw== + dependencies: + bn.js "^4.11.6" + elliptic "^6.4.0" + xhr-request-promise "^0.1.2" + eth-lib@^0.1.26: version "0.1.29" resolved "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.29.tgz" @@ -4011,15 +4294,6 @@ eth-lib@^0.1.26: ws "^3.0.0" xhr-request-promise "^0.1.2" -eth-lib@0.2.8: - version "0.2.8" - resolved "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz" - integrity sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw== - dependencies: - bn.js "^4.11.6" - elliptic "^6.4.0" - xhr-request-promise "^0.1.2" - eth-query@^2.0.2, eth-query@^2.1.0, eth-query@^2.1.2: version "2.1.2" resolved "https://registry.npmjs.org/eth-query/-/eth-query-2.1.2.tgz" @@ -4028,6 +4302,18 @@ eth-query@^2.0.2, eth-query@^2.1.0, eth-query@^2.1.2: json-rpc-random-id "^1.0.0" xtend "^4.0.1" +eth-sig-util@3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-3.0.0.tgz" + integrity sha512-4eFkMOhpGbTxBQ3AMzVf0haUX2uTur7DpWiHzWyTURa28BVJJtOkcb9Ok5TV0YvEPG61DODPW7ZUATbJTslioQ== + dependencies: + buffer "^5.2.1" + elliptic "^6.4.0" + ethereumjs-abi "0.6.5" + ethereumjs-util "^5.1.1" + tweetnacl "^1.0.0" + tweetnacl-util "^0.15.0" + eth-sig-util@^1.4.2: version "1.4.2" resolved "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-1.4.2.tgz" @@ -4046,18 +4332,6 @@ eth-sig-util@^3.0.1: tweetnacl "^1.0.3" tweetnacl-util "^0.15.0" -eth-sig-util@3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-3.0.0.tgz" - integrity sha512-4eFkMOhpGbTxBQ3AMzVf0haUX2uTur7DpWiHzWyTURa28BVJJtOkcb9Ok5TV0YvEPG61DODPW7ZUATbJTslioQ== - dependencies: - buffer "^5.2.1" - elliptic "^6.4.0" - ethereumjs-abi "0.6.5" - ethereumjs-util "^5.1.1" - tweetnacl "^1.0.0" - tweetnacl-util "^0.15.0" - eth-tx-summary@^3.1.2: version "3.2.4" resolved "https://registry.npmjs.org/eth-tx-summary/-/eth-tx-summary-3.2.4.tgz" @@ -4091,17 +4365,17 @@ ethereum-bloom-filters@^1.0.6: dependencies: js-sha3 "^0.8.0" -ethereum-common@^0.0.18: - version "0.0.18" - resolved "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.0.18.tgz" - integrity sha512-EoltVQTRNg2Uy4o84qpa2aXymXDJhxm7eos/ACOg0DG4baAbMjhbdAEsx9GeE8sC3XCxnYvrrzZDH8D8MtA2iQ== - ethereum-common@0.2.0: version "0.2.0" resolved "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.2.0.tgz" integrity sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA== -ethereum-cryptography@^0.1.3, ethereum-cryptography@0.1.3: +ethereum-common@^0.0.18: + version "0.0.18" + resolved "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.0.18.tgz" + integrity sha512-EoltVQTRNg2Uy4o84qpa2aXymXDJhxm7eos/ACOg0DG4baAbMjhbdAEsx9GeE8sC3XCxnYvrrzZDH8D8MtA2iQ== + +ethereum-cryptography@0.1.3, ethereum-cryptography@^0.1.3: version "0.1.3" resolved "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz" integrity sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ== @@ -4132,17 +4406,7 @@ ethereum-cryptography@^1.0.3: "@scure/bip32" "1.1.5" "@scure/bip39" "1.1.1" -ethereum-cryptography@^2.0.0: - version "2.2.1" - resolved "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz" - integrity sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg== - dependencies: - "@noble/curves" "1.4.2" - "@noble/hashes" "1.4.0" - "@scure/bip32" "1.4.0" - "@scure/bip39" "1.3.0" - -ethereum-cryptography@^2.1.2: +ethereum-cryptography@^2.0.0, ethereum-cryptography@^2.1.2: version "2.2.1" resolved "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz" integrity sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg== @@ -4159,7 +4423,7 @@ ethereum-tx-decoder@^3.0.0: dependencies: ethers "^4.0.37" -ethereum-waffle@*, ethereum-waffle@^3.4.0: +ethereum-waffle@^3.4.0: version "3.4.4" resolved "https://registry.npmjs.org/ethereum-waffle/-/ethereum-waffle-3.4.4.tgz" integrity sha512-PA9+jCjw4WC3Oc5ocSMBj5sXvueWQeAbvCA+hUlb6oFgwwKyq5ka3bWQ7QZcjzIX+TdFkxP4IbFmoY2D8Dkj9Q== @@ -4170,13 +4434,6 @@ ethereum-waffle@*, ethereum-waffle@^3.4.0: "@ethereum-waffle/provider" "^3.4.4" ethers "^5.0.1" -ethereumjs-abi@^0.6.8, ethereumjs-abi@0.6.8, "ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git": - version "0.6.8" - resolved "git+ssh://git@github.com/ethereumjs/ethereumjs-abi.git#ee3994657fa7a427238e6ba92a84d0b529bbcde0" - dependencies: - bn.js "^4.11.8" - ethereumjs-util "^6.0.0" - ethereumjs-abi@0.6.5: version "0.6.5" resolved "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.5.tgz" @@ -4185,16 +4442,14 @@ ethereumjs-abi@0.6.5: bn.js "^4.10.0" ethereumjs-util "^4.3.0" -ethereumjs-account@^2.0.3: - version "2.0.5" - resolved "https://registry.npmjs.org/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz" - integrity sha512-bgDojnXGjhMwo6eXQC0bY6UK2liSFUSMwwylOmQvZbSl/D7NXQ3+vrGO46ZeOgjGfxXmgIeVNDIiHw7fNZM4VA== +ethereumjs-abi@0.6.8, ethereumjs-abi@^0.6.8, "ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git": + version "0.6.8" + resolved "git+ssh://git@github.com/ethereumjs/ethereumjs-abi.git#ee3994657fa7a427238e6ba92a84d0b529bbcde0" dependencies: - ethereumjs-util "^5.0.0" - rlp "^2.0.0" - safe-buffer "^5.1.1" + bn.js "^4.11.8" + ethereumjs-util "^6.0.0" -ethereumjs-account@^3.0.0, ethereumjs-account@3.0.0: +ethereumjs-account@3.0.0, ethereumjs-account@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/ethereumjs-account/-/ethereumjs-account-3.0.0.tgz" integrity sha512-WP6BdscjiiPkQfF9PVfMcwx/rDvfZTjFKY0Uwc09zSQr9JfIVH87dYIJu0gNhBhpmovV4yq295fdllS925fnBA== @@ -4203,40 +4458,16 @@ ethereumjs-account@^3.0.0, ethereumjs-account@3.0.0: rlp "^2.2.1" safe-buffer "^5.1.1" -ethereumjs-block@^1.2.2: - version "1.7.1" - resolved "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-1.7.1.tgz" - integrity sha512-B+sSdtqm78fmKkBq78/QLKJbu/4Ts4P2KFISdgcuZUPDm9x+N7qgBPIIFUGbaakQh8bzuquiRVbdmvPKqbILRg== - dependencies: - async "^2.0.1" - ethereum-common "0.2.0" - ethereumjs-tx "^1.2.2" - ethereumjs-util "^5.0.0" - merkle-patricia-tree "^2.1.2" - -ethereumjs-block@^1.4.1: - version "1.7.1" - resolved "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-1.7.1.tgz" - integrity sha512-B+sSdtqm78fmKkBq78/QLKJbu/4Ts4P2KFISdgcuZUPDm9x+N7qgBPIIFUGbaakQh8bzuquiRVbdmvPKqbILRg== - dependencies: - async "^2.0.1" - ethereum-common "0.2.0" - ethereumjs-tx "^1.2.2" - ethereumjs-util "^5.0.0" - merkle-patricia-tree "^2.1.2" - -ethereumjs-block@^1.6.0: - version "1.7.1" - resolved "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-1.7.1.tgz" - integrity sha512-B+sSdtqm78fmKkBq78/QLKJbu/4Ts4P2KFISdgcuZUPDm9x+N7qgBPIIFUGbaakQh8bzuquiRVbdmvPKqbILRg== +ethereumjs-account@^2.0.3: + version "2.0.5" + resolved "https://registry.npmjs.org/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz" + integrity sha512-bgDojnXGjhMwo6eXQC0bY6UK2liSFUSMwwylOmQvZbSl/D7NXQ3+vrGO46ZeOgjGfxXmgIeVNDIiHw7fNZM4VA== dependencies: - async "^2.0.1" - ethereum-common "0.2.0" - ethereumjs-tx "^1.2.2" ethereumjs-util "^5.0.0" - merkle-patricia-tree "^2.1.2" + rlp "^2.0.0" + safe-buffer "^5.1.1" -ethereumjs-block@^2.2.2, ethereumjs-block@~2.2.2, ethereumjs-block@2.2.2: +ethereumjs-block@2.2.2, ethereumjs-block@^2.2.2, ethereumjs-block@~2.2.0, ethereumjs-block@~2.2.2: version "2.2.2" resolved "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-2.2.2.tgz" integrity sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg== @@ -4247,14 +4478,14 @@ ethereumjs-block@^2.2.2, ethereumjs-block@~2.2.2, ethereumjs-block@2.2.2: ethereumjs-util "^5.0.0" merkle-patricia-tree "^2.1.2" -ethereumjs-block@~2.2.0: - version "2.2.2" - resolved "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-2.2.2.tgz" - integrity sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg== +ethereumjs-block@^1.2.2, ethereumjs-block@^1.4.1, ethereumjs-block@^1.6.0: + version "1.7.1" + resolved "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-1.7.1.tgz" + integrity sha512-B+sSdtqm78fmKkBq78/QLKJbu/4Ts4P2KFISdgcuZUPDm9x+N7qgBPIIFUGbaakQh8bzuquiRVbdmvPKqbILRg== dependencies: async "^2.0.1" - ethereumjs-common "^1.5.0" - ethereumjs-tx "^2.1.1" + ethereum-common "0.2.0" + ethereumjs-tx "^1.2.2" ethereumjs-util "^5.0.0" merkle-patricia-tree "^2.1.2" @@ -4274,11 +4505,19 @@ ethereumjs-blockchain@^4.0.3: rlp "^2.2.2" semaphore "^1.1.0" -ethereumjs-common@^1.1.0, ethereumjs-common@^1.3.2, ethereumjs-common@^1.5.0, ethereumjs-common@1.5.0: +ethereumjs-common@1.5.0, ethereumjs-common@^1.1.0, ethereumjs-common@^1.3.2, ethereumjs-common@^1.5.0: version "1.5.0" resolved "https://registry.npmjs.org/ethereumjs-common/-/ethereumjs-common-1.5.0.tgz" integrity sha512-SZOjgK1356hIY7MRj3/ma5qtfr/4B5BL+G4rP/XSMYr2z1H5el4RX5GReYCKmQmYI/nSBmRnwrZ17IfHuG0viQ== +ethereumjs-tx@2.1.2, ethereumjs-tx@^2.1.1, ethereumjs-tx@^2.1.2: + version "2.1.2" + resolved "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz" + integrity sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw== + dependencies: + ethereumjs-common "^1.5.0" + ethereumjs-util "^6.0.0" + ethereumjs-tx@^1.1.1, ethereumjs-tx@^1.2.0, ethereumjs-tx@^1.2.2, ethereumjs-tx@^1.3.3: version "1.3.7" resolved "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz" @@ -4287,13 +4526,18 @@ ethereumjs-tx@^1.1.1, ethereumjs-tx@^1.2.0, ethereumjs-tx@^1.2.2, ethereumjs-tx@ ethereum-common "^0.0.18" ethereumjs-util "^5.0.0" -ethereumjs-tx@^2.1.1, ethereumjs-tx@^2.1.2, ethereumjs-tx@2.1.2: - version "2.1.2" - resolved "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz" - integrity sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw== +ethereumjs-util@6.2.1, ethereumjs-util@^6.0.0, ethereumjs-util@^6.1.0, ethereumjs-util@^6.2.0, ethereumjs-util@^6.2.1: + version "6.2.1" + resolved "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz" + integrity sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw== dependencies: - ethereumjs-common "^1.5.0" - ethereumjs-util "^6.0.0" + "@types/bn.js" "^4.11.3" + bn.js "^4.11.0" + create-hash "^1.1.2" + elliptic "^6.5.2" + ethereum-cryptography "^0.1.3" + ethjs-util "0.1.6" + rlp "^2.2.3" ethereumjs-util@^4.3.0: version "4.5.1" @@ -4306,7 +4550,7 @@ ethereumjs-util@^4.3.0: ethereum-cryptography "^0.1.3" rlp "^2.0.0" -ethereumjs-util@^5.0.0, ethereumjs-util@^5.0.1, ethereumjs-util@^5.1.1, ethereumjs-util@^5.1.2, ethereumjs-util@^5.1.3, ethereumjs-util@^5.1.5: +ethereumjs-util@^5.0.0, ethereumjs-util@^5.0.1, ethereumjs-util@^5.1.1, ethereumjs-util@^5.1.2, ethereumjs-util@^5.1.3, ethereumjs-util@^5.1.5, ethereumjs-util@^5.2.0: version "5.2.1" resolved "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz" integrity sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ== @@ -4319,56 +4563,7 @@ 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@^5.2.0: - version "5.2.1" - resolved "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz" - integrity sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ== - dependencies: - bn.js "^4.11.0" - create-hash "^1.1.2" - elliptic "^6.5.2" - ethereum-cryptography "^0.1.3" - ethjs-util "^0.1.3" - rlp "^2.0.0" - safe-buffer "^5.1.1" - -ethereumjs-util@^6.0.0, ethereumjs-util@^6.1.0, ethereumjs-util@^6.2.0, ethereumjs-util@6.2.1: - version "6.2.1" - resolved "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz" - integrity sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw== - dependencies: - "@types/bn.js" "^4.11.3" - bn.js "^4.11.0" - create-hash "^1.1.2" - elliptic "^6.5.2" - ethereum-cryptography "^0.1.3" - ethjs-util "0.1.6" - rlp "^2.2.3" - -ethereumjs-util@^6.2.1: - version "6.2.1" - resolved "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz" - integrity sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw== - dependencies: - "@types/bn.js" "^4.11.3" - bn.js "^4.11.0" - create-hash "^1.1.2" - elliptic "^6.5.2" - ethereum-cryptography "^0.1.3" - ethjs-util "0.1.6" - rlp "^2.2.3" - -ethereumjs-util@^7.0.2: - version "7.0.7" - dependencies: - "@types/bn.js" "^4.11.3" - bn.js "^5.1.2" - create-hash "^1.1.2" - ethereum-cryptography "^0.1.3" - ethjs-util "0.1.6" - rlp "^2.2.4" - -ethereumjs-util@^7.0.3, ethereumjs-util@^7.1.4, ethereumjs-util@^7.1.5: +ethereumjs-util@^7.0.2, ethereumjs-util@^7.0.3, ethereumjs-util@^7.1.4, ethereumjs-util@^7.1.5: version "7.1.5" resolved "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz" integrity sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg== @@ -4379,41 +4574,28 @@ ethereumjs-util@^7.0.3, ethereumjs-util@^7.1.4, ethereumjs-util@^7.1.5: ethereum-cryptography "^0.1.3" rlp "^2.2.4" -ethereumjs-vm@^2.1.0: - version "2.6.0" - resolved "https://registry.npmjs.org/ethereumjs-vm/-/ethereumjs-vm-2.6.0.tgz" - integrity sha512-r/XIUik/ynGbxS3y+mvGnbOKnuLo40V5Mj1J25+HEO63aWYREIqvWeRO/hnROlMBE5WoniQmPmhiaN0ctiHaXw== - dependencies: - async "^2.1.2" - async-eventemitter "^0.2.2" - ethereumjs-account "^2.0.3" - ethereumjs-block "~2.2.0" - ethereumjs-common "^1.1.0" - ethereumjs-util "^6.0.0" - fake-merkle-patricia-tree "^1.0.1" - functional-red-black-tree "^1.0.1" - merkle-patricia-tree "^2.3.2" - rustbn.js "~0.2.0" - safe-buffer "^5.1.1" - -ethereumjs-vm@^2.3.4: - version "2.6.0" - resolved "https://registry.npmjs.org/ethereumjs-vm/-/ethereumjs-vm-2.6.0.tgz" - integrity sha512-r/XIUik/ynGbxS3y+mvGnbOKnuLo40V5Mj1J25+HEO63aWYREIqvWeRO/hnROlMBE5WoniQmPmhiaN0ctiHaXw== +ethereumjs-vm@4.2.0: + version "4.2.0" + resolved "https://registry.npmjs.org/ethereumjs-vm/-/ethereumjs-vm-4.2.0.tgz" + integrity sha512-X6qqZbsY33p5FTuZqCnQ4+lo957iUJMM6Mpa6bL4UW0dxM6WmDSHuI4j/zOp1E2TDKImBGCJA9QPfc08PaNubA== dependencies: async "^2.1.2" async-eventemitter "^0.2.2" - ethereumjs-account "^2.0.3" - ethereumjs-block "~2.2.0" - ethereumjs-common "^1.1.0" - ethereumjs-util "^6.0.0" + core-js-pure "^3.0.1" + ethereumjs-account "^3.0.0" + ethereumjs-block "^2.2.2" + ethereumjs-blockchain "^4.0.3" + ethereumjs-common "^1.5.0" + ethereumjs-tx "^2.1.2" + ethereumjs-util "^6.2.0" fake-merkle-patricia-tree "^1.0.1" functional-red-black-tree "^1.0.1" merkle-patricia-tree "^2.3.2" rustbn.js "~0.2.0" safe-buffer "^5.1.1" + util.promisify "^1.0.0" -ethereumjs-vm@^2.6.0: +ethereumjs-vm@^2.1.0, ethereumjs-vm@^2.3.4, ethereumjs-vm@^2.6.0: version "2.6.0" resolved "https://registry.npmjs.org/ethereumjs-vm/-/ethereumjs-vm-2.6.0.tgz" integrity sha512-r/XIUik/ynGbxS3y+mvGnbOKnuLo40V5Mj1J25+HEO63aWYREIqvWeRO/hnROlMBE5WoniQmPmhiaN0ctiHaXw== @@ -4430,27 +4612,6 @@ ethereumjs-vm@^2.6.0: rustbn.js "~0.2.0" safe-buffer "^5.1.1" -ethereumjs-vm@4.2.0: - version "4.2.0" - resolved "https://registry.npmjs.org/ethereumjs-vm/-/ethereumjs-vm-4.2.0.tgz" - integrity sha512-X6qqZbsY33p5FTuZqCnQ4+lo957iUJMM6Mpa6bL4UW0dxM6WmDSHuI4j/zOp1E2TDKImBGCJA9QPfc08PaNubA== - dependencies: - async "^2.1.2" - async-eventemitter "^0.2.2" - core-js-pure "^3.0.1" - ethereumjs-account "^3.0.0" - ethereumjs-block "^2.2.2" - ethereumjs-blockchain "^4.0.3" - ethereumjs-common "^1.5.0" - ethereumjs-tx "^2.1.2" - ethereumjs-util "^6.2.0" - fake-merkle-patricia-tree "^1.0.1" - functional-red-black-tree "^1.0.1" - merkle-patricia-tree "^2.3.2" - rustbn.js "~0.2.0" - safe-buffer "^5.1.1" - util.promisify "^1.0.0" - ethereumjs-wallet@0.6.5: version "0.6.5" resolved "https://registry.npmjs.org/ethereumjs-wallet/-/ethereumjs-wallet-0.6.5.tgz" @@ -4459,186 +4620,29 @@ ethereumjs-wallet@0.6.5: aes-js "^3.1.1" bs58check "^2.1.2" ethereum-cryptography "^0.1.3" - ethereumjs-util "^6.0.0" - randombytes "^2.0.6" - safe-buffer "^5.1.2" - scryptsy "^1.2.1" - utf8 "^3.0.0" - uuid "^3.3.2" - -ethers@^4.0.37: - version "4.0.49" - resolved "https://registry.npmjs.org/ethers/-/ethers-4.0.49.tgz" - integrity sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg== - dependencies: - aes-js "3.0.0" - bn.js "^4.11.9" - elliptic "6.5.4" - hash.js "1.1.3" - js-sha3 "0.5.7" - scrypt-js "2.0.4" - setimmediate "1.0.4" - uuid "2.0.1" - xmlhttprequest "1.8.0" - -ethers@^5.0.0, ethers@^6.1.0, ethers@^6.13.1, ethers@^6.6.0: - version "6.13.1" - resolved "https://registry.npmjs.org/ethers/-/ethers-6.13.1.tgz" - integrity sha512-hdJ2HOxg/xx97Lm9HdCWk949BfYqYWpyw4//78SiwOLgASyfrNszfMUNB2joKjvGUdwhHfaiMMFFwacVVoLR9A== - dependencies: - "@adraffy/ens-normalize" "1.10.1" - "@noble/curves" "1.2.0" - "@noble/hashes" "1.3.2" - "@types/node" "18.15.13" - aes-js "4.0.0-beta.5" - tslib "2.4.0" - ws "8.17.1" - -ethers@^5.0.1: - version "5.7.2" - resolved "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz" - integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== - dependencies: - "@ethersproject/abi" "5.7.0" - "@ethersproject/abstract-provider" "5.7.0" - "@ethersproject/abstract-signer" "5.7.0" - "@ethersproject/address" "5.7.0" - "@ethersproject/base64" "5.7.0" - "@ethersproject/basex" "5.7.0" - "@ethersproject/bignumber" "5.7.0" - "@ethersproject/bytes" "5.7.0" - "@ethersproject/constants" "5.7.0" - "@ethersproject/contracts" "5.7.0" - "@ethersproject/hash" "5.7.0" - "@ethersproject/hdnode" "5.7.0" - "@ethersproject/json-wallets" "5.7.0" - "@ethersproject/keccak256" "5.7.0" - "@ethersproject/logger" "5.7.0" - "@ethersproject/networks" "5.7.1" - "@ethersproject/pbkdf2" "5.7.0" - "@ethersproject/properties" "5.7.0" - "@ethersproject/providers" "5.7.2" - "@ethersproject/random" "5.7.0" - "@ethersproject/rlp" "5.7.0" - "@ethersproject/sha2" "5.7.0" - "@ethersproject/signing-key" "5.7.0" - "@ethersproject/solidity" "5.7.0" - "@ethersproject/strings" "5.7.0" - "@ethersproject/transactions" "5.7.0" - "@ethersproject/units" "5.7.0" - "@ethersproject/wallet" "5.7.0" - "@ethersproject/web" "5.7.1" - "@ethersproject/wordlists" "5.7.0" - -ethers@^5.0.2: - version "5.7.2" - resolved "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz" - integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== - dependencies: - "@ethersproject/abi" "5.7.0" - "@ethersproject/abstract-provider" "5.7.0" - "@ethersproject/abstract-signer" "5.7.0" - "@ethersproject/address" "5.7.0" - "@ethersproject/base64" "5.7.0" - "@ethersproject/basex" "5.7.0" - "@ethersproject/bignumber" "5.7.0" - "@ethersproject/bytes" "5.7.0" - "@ethersproject/constants" "5.7.0" - "@ethersproject/contracts" "5.7.0" - "@ethersproject/hash" "5.7.0" - "@ethersproject/hdnode" "5.7.0" - "@ethersproject/json-wallets" "5.7.0" - "@ethersproject/keccak256" "5.7.0" - "@ethersproject/logger" "5.7.0" - "@ethersproject/networks" "5.7.1" - "@ethersproject/pbkdf2" "5.7.0" - "@ethersproject/properties" "5.7.0" - "@ethersproject/providers" "5.7.2" - "@ethersproject/random" "5.7.0" - "@ethersproject/rlp" "5.7.0" - "@ethersproject/sha2" "5.7.0" - "@ethersproject/signing-key" "5.7.0" - "@ethersproject/solidity" "5.7.0" - "@ethersproject/strings" "5.7.0" - "@ethersproject/transactions" "5.7.0" - "@ethersproject/units" "5.7.0" - "@ethersproject/wallet" "5.7.0" - "@ethersproject/web" "5.7.1" - "@ethersproject/wordlists" "5.7.0" - -ethers@^5.0.24: - version "5.7.2" - resolved "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz" - integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== - dependencies: - "@ethersproject/abi" "5.7.0" - "@ethersproject/abstract-provider" "5.7.0" - "@ethersproject/abstract-signer" "5.7.0" - "@ethersproject/address" "5.7.0" - "@ethersproject/base64" "5.7.0" - "@ethersproject/basex" "5.7.0" - "@ethersproject/bignumber" "5.7.0" - "@ethersproject/bytes" "5.7.0" - "@ethersproject/constants" "5.7.0" - "@ethersproject/contracts" "5.7.0" - "@ethersproject/hash" "5.7.0" - "@ethersproject/hdnode" "5.7.0" - "@ethersproject/json-wallets" "5.7.0" - "@ethersproject/keccak256" "5.7.0" - "@ethersproject/logger" "5.7.0" - "@ethersproject/networks" "5.7.1" - "@ethersproject/pbkdf2" "5.7.0" - "@ethersproject/properties" "5.7.0" - "@ethersproject/providers" "5.7.2" - "@ethersproject/random" "5.7.0" - "@ethersproject/rlp" "5.7.0" - "@ethersproject/sha2" "5.7.0" - "@ethersproject/signing-key" "5.7.0" - "@ethersproject/solidity" "5.7.0" - "@ethersproject/strings" "5.7.0" - "@ethersproject/transactions" "5.7.0" - "@ethersproject/units" "5.7.0" - "@ethersproject/wallet" "5.7.0" - "@ethersproject/web" "5.7.1" - "@ethersproject/wordlists" "5.7.0" + ethereumjs-util "^6.0.0" + randombytes "^2.0.6" + safe-buffer "^5.1.2" + scryptsy "^1.2.1" + utf8 "^3.0.0" + uuid "^3.3.2" -ethers@^5.5.2: - version "5.7.2" - resolved "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz" - integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== +ethers@^4.0.37: + version "4.0.49" + resolved "https://registry.npmjs.org/ethers/-/ethers-4.0.49.tgz" + integrity sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg== dependencies: - "@ethersproject/abi" "5.7.0" - "@ethersproject/abstract-provider" "5.7.0" - "@ethersproject/abstract-signer" "5.7.0" - "@ethersproject/address" "5.7.0" - "@ethersproject/base64" "5.7.0" - "@ethersproject/basex" "5.7.0" - "@ethersproject/bignumber" "5.7.0" - "@ethersproject/bytes" "5.7.0" - "@ethersproject/constants" "5.7.0" - "@ethersproject/contracts" "5.7.0" - "@ethersproject/hash" "5.7.0" - "@ethersproject/hdnode" "5.7.0" - "@ethersproject/json-wallets" "5.7.0" - "@ethersproject/keccak256" "5.7.0" - "@ethersproject/logger" "5.7.0" - "@ethersproject/networks" "5.7.1" - "@ethersproject/pbkdf2" "5.7.0" - "@ethersproject/properties" "5.7.0" - "@ethersproject/providers" "5.7.2" - "@ethersproject/random" "5.7.0" - "@ethersproject/rlp" "5.7.0" - "@ethersproject/sha2" "5.7.0" - "@ethersproject/signing-key" "5.7.0" - "@ethersproject/solidity" "5.7.0" - "@ethersproject/strings" "5.7.0" - "@ethersproject/transactions" "5.7.0" - "@ethersproject/units" "5.7.0" - "@ethersproject/wallet" "5.7.0" - "@ethersproject/web" "5.7.1" - "@ethersproject/wordlists" "5.7.0" + aes-js "3.0.0" + bn.js "^4.11.9" + elliptic "6.5.4" + hash.js "1.1.3" + js-sha3 "0.5.7" + scrypt-js "2.0.4" + setimmediate "1.0.4" + uuid "2.0.1" + xmlhttprequest "1.8.0" -ethers@^5.7.0: +ethers@^5.0.1, ethers@^5.0.2, ethers@^5.0.24, ethers@^5.5.2, ethers@^5.7.0, ethers@^5.7.2, ethers@~5.7.0: version "5.7.2" resolved "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz" integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== @@ -4674,41 +4678,18 @@ ethers@^5.7.0: "@ethersproject/web" "5.7.1" "@ethersproject/wordlists" "5.7.0" -ethers@^5.7.2: - version "5.7.2" - resolved "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz" - integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== +ethers@^6.9.0: + version "6.13.4" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.13.4.tgz#bd3e1c3dc1e7dc8ce10f9ffb4ee40967a651b53c" + integrity sha512-21YtnZVg4/zKkCQPjrDj38B1r4nQvTZLopUGMLQ1ePU2zV/joCfDC3t3iKQjWRzjjjbzR+mdAIoikeBRNkdllA== dependencies: - "@ethersproject/abi" "5.7.0" - "@ethersproject/abstract-provider" "5.7.0" - "@ethersproject/abstract-signer" "5.7.0" - "@ethersproject/address" "5.7.0" - "@ethersproject/base64" "5.7.0" - "@ethersproject/basex" "5.7.0" - "@ethersproject/bignumber" "5.7.0" - "@ethersproject/bytes" "5.7.0" - "@ethersproject/constants" "5.7.0" - "@ethersproject/contracts" "5.7.0" - "@ethersproject/hash" "5.7.0" - "@ethersproject/hdnode" "5.7.0" - "@ethersproject/json-wallets" "5.7.0" - "@ethersproject/keccak256" "5.7.0" - "@ethersproject/logger" "5.7.0" - "@ethersproject/networks" "5.7.1" - "@ethersproject/pbkdf2" "5.7.0" - "@ethersproject/properties" "5.7.0" - "@ethersproject/providers" "5.7.2" - "@ethersproject/random" "5.7.0" - "@ethersproject/rlp" "5.7.0" - "@ethersproject/sha2" "5.7.0" - "@ethersproject/signing-key" "5.7.0" - "@ethersproject/solidity" "5.7.0" - "@ethersproject/strings" "5.7.0" - "@ethersproject/transactions" "5.7.0" - "@ethersproject/units" "5.7.0" - "@ethersproject/wallet" "5.7.0" - "@ethersproject/web" "5.7.1" - "@ethersproject/wordlists" "5.7.0" + "@adraffy/ens-normalize" "1.10.1" + "@noble/curves" "1.2.0" + "@noble/hashes" "1.3.2" + "@types/node" "22.7.5" + aes-js "4.0.0-beta.5" + tslib "2.7.0" + ws "8.17.1" ethjs-unit@0.1.6: version "0.1.6" @@ -4718,7 +4699,7 @@ ethjs-unit@0.1.6: bn.js "4.11.6" number-to-bn "1.7.0" -ethjs-util@^0.1.3, ethjs-util@^0.1.6, ethjs-util@0.1.6: +ethjs-util@0.1.6, ethjs-util@^0.1.3, ethjs-util@^0.1.6: version "0.1.6" resolved "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz" integrity sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w== @@ -4726,6 +4707,14 @@ ethjs-util@^0.1.3, ethjs-util@^0.1.6, ethjs-util@0.1.6: is-hex-prefixed "1.0.0" strip-hex-prefix "1.0.0" +event-emitter@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" + integrity sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA== + dependencies: + d "1" + es5-ext "~0.10.14" + eventemitter3@4.0.4: version "4.0.4" resolved "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz" @@ -4758,43 +4747,48 @@ expand-brackets@^2.1.4: to-regex "^3.0.1" express@^4.14.0: - version "4.17.1" + version "4.21.1" + resolved "https://registry.yarnpkg.com/express/-/express-4.21.1.tgz#9dae5dda832f16b4eec941a4e44aa89ec481b281" + integrity sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ== dependencies: - accepts "~1.3.7" + accepts "~1.3.8" array-flatten "1.1.1" - body-parser "1.19.0" - content-disposition "0.5.3" + body-parser "1.20.3" + content-disposition "0.5.4" content-type "~1.0.4" - cookie "0.4.0" + cookie "0.7.1" cookie-signature "1.0.6" debug "2.6.9" - depd "~1.1.2" - encodeurl "~1.0.2" + depd "2.0.0" + encodeurl "~2.0.0" escape-html "~1.0.3" etag "~1.8.1" - finalhandler "~1.1.2" + finalhandler "1.3.1" fresh "0.5.2" - merge-descriptors "1.0.1" + http-errors "2.0.0" + merge-descriptors "1.0.3" 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.5" - qs "6.7.0" + path-to-regexp "0.1.10" + proxy-addr "~2.0.7" + qs "6.13.0" range-parser "~1.2.1" - safe-buffer "5.1.2" - send "0.17.1" - serve-static "1.14.1" - setprototypeof "1.1.1" - statuses "~1.5.0" + safe-buffer "5.2.1" + send "0.19.0" + serve-static "1.16.2" + setprototypeof "1.2.0" + statuses "2.0.1" type-is "~1.6.18" utils-merge "1.0.1" vary "~1.1.2" -ext@^1.1.2: - version "1.4.0" +ext@^1.1.2, ext@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f" + integrity sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw== dependencies: - type "^2.0.0" + type "^2.7.2" extend-shallow@^2.0.1: version "2.0.1" @@ -4830,7 +4824,7 @@ extglob@^2.0.4: snapdragon "^0.8.1" to-regex "^3.0.1" -extsprintf@^1.2.0, extsprintf@1.3.0: +extsprintf@1.3.0, extsprintf@^1.2.0: version "1.3.0" resolved "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz" integrity sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g== @@ -4881,15 +4875,17 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -finalhandler@~1.1.2: - version "1.1.2" +finalhandler@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.3.1.tgz#0c575f1d1d324ddd1da35ad7ece3df7d19088019" + integrity sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ== dependencies: debug "2.6.9" - encodeurl "~1.0.2" + encodeurl "~2.0.0" 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: @@ -4900,6 +4896,14 @@ find-replace@^1.0.3: array-back "^1.0.4" test-value "^2.1.0" +find-up@5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + find-up@^1.0.0: version "1.1.2" resolved "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz" @@ -4915,14 +4919,6 @@ find-up@^2.1.0: dependencies: locate-path "^2.0.0" -find-up@5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - find-yarn-workspace-root@^1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-1.2.1.tgz" @@ -5004,10 +5000,12 @@ form-data@~2.3.2: combined-stream "^1.0.6" mime-types "^2.1.12" -forwarded@~0.1.2: - version "0.1.2" +forwarded@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" + integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== -fp-ts@^1.0.0, fp-ts@1.19.3: +fp-ts@1.19.3, fp-ts@^1.0.0: version "1.19.3" resolved "https://registry.npmjs.org/fp-ts/-/fp-ts-1.19.3.tgz" integrity sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg== @@ -5044,16 +5042,7 @@ fs-extra@^10.0.0: jsonfile "^6.0.1" universalify "^2.0.0" -fs-extra@^4.0.2: - version "4.0.3" - resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz" - integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - -fs-extra@^4.0.3: +fs-extra@^4.0.2, fs-extra@^4.0.3: version "4.0.3" resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz" integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg== @@ -5081,8 +5070,10 @@ fs-extra@^9.0.0: jsonfile "^6.0.1" universalify "^2.0.0" -fs-minipass@^1.2.5: +fs-minipass@^1.2.7: version "1.2.7" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" + integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== dependencies: minipass "^2.6.0" @@ -5096,8 +5087,10 @@ fs.realpath@^1.0.0: resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -function-bind@^1.1.1, function-bind@~1.1.1: - version "1.1.1" +fsevents@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== function-bind@^1.1.2: version "1.1.2" @@ -5191,14 +5184,22 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@ has-symbols "^1.0.3" hasown "^2.0.0" +get-intrinsic@^1.2.3, get-intrinsic@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" + integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + has-proto "^1.0.1" + has-symbols "^1.0.3" + hasown "^2.0.0" + get-port@^3.1.0: version "3.2.0" resolved "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz" integrity sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg== -get-stream@^3.0.0: - version "3.0.0" - get-stream@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz" @@ -5221,6 +5222,15 @@ get-symbol-description@^1.0.0: call-bind "^1.0.2" get-intrinsic "^1.1.1" +get-symbol-description@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.2.tgz#533744d5aa20aca4e079c8e5daf7fd44202821f5" + integrity sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg== + dependencies: + call-bind "^1.0.5" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz" @@ -5240,7 +5250,7 @@ glob-parent@~5.1.2: dependencies: is-glob "^4.0.1" -glob@^7.1.2, glob@^7.1.3, glob@7.2.0: +glob@7.2.0, glob@^7.1.2, glob@^7.1.3: version "7.2.0" resolved "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz" integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== @@ -5252,13 +5262,15 @@ 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.6: - version "7.1.6" +glob@~7.2.3: + 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.0.4" + minimatch "^3.1.1" once "^1.3.0" path-is-absolute "^1.0.0" @@ -5294,24 +5306,6 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -got@^7.1.0: - version "7.1.0" - dependencies: - decompress-response "^3.2.0" - duplexer3 "^0.1.4" - get-stream "^3.0.0" - is-plain-obj "^1.1.0" - is-retry-allowed "^1.0.0" - is-stream "^1.0.0" - isurl "^1.0.0-alpha5" - lowercase-keys "^1.0.0" - p-cancelable "^0.3.0" - p-timeout "^1.1.1" - safe-buffer "^5.0.1" - timed-out "^4.0.0" - url-parse-lax "^1.0.0" - url-to-options "^1.0.1" - got@9.6.0: version "9.6.0" resolved "https://registry.npmjs.org/got/-/got-9.6.0.tgz" @@ -5329,6 +5323,23 @@ got@9.6.0: to-readable-stream "^1.0.0" url-parse-lax "^3.0.0" +got@^11.8.5: + version "11.8.6" + resolved "https://registry.yarnpkg.com/got/-/got-11.8.6.tgz#276e827ead8772eddbcfc97170590b841823233a" + integrity sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g== + dependencies: + "@sindresorhus/is" "^4.0.0" + "@szmarczak/http-timer" "^4.0.5" + "@types/cacheable-request" "^6.0.1" + "@types/responselike" "^1.0.0" + cacheable-lookup "^5.0.3" + cacheable-request "^7.0.2" + decompress-response "^6.0.0" + http2-wrapper "^1.0.0-beta.5.2" + lowercase-keys "^2.0.0" + p-cancelable "^2.0.0" + responselike "^2.0.0" + 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.11" resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz" @@ -5361,7 +5372,7 @@ hardhat-deploy-ethers@^0.4.1: resolved "https://registry.npmjs.org/hardhat-deploy-ethers/-/hardhat-deploy-ethers-0.4.1.tgz" integrity sha512-RM6JUcD0dOCjemxnKLtK7XQQI7NWn+LxF5qicGYax0PtWayEUXAewOb4WIHZ/yearhj+s2t6dL0MnHyLTENwJg== -hardhat-deploy@^0.11.34, hardhat-deploy@^0.11.44: +hardhat-deploy@^0.11.44: version "0.11.45" resolved "https://registry.npmjs.org/hardhat-deploy/-/hardhat-deploy-0.11.45.tgz" integrity sha512-aC8UNaq3JcORnEUIwV945iJuvBwi65tjHVDU3v6mOcqik7WAzHVCJ7cwmkkipsHrWysrB5YvGF1q9S1vIph83w== @@ -5389,7 +5400,7 @@ hardhat-deploy@^0.11.34, hardhat-deploy@^0.11.44: match-all "^1.2.6" murmur-128 "^0.2.1" qs "^6.9.4" - zksync-ethers "^5.0.0" + zksync-web3 "^0.14.3" hardhat-gas-reporter@^1.0.9: version "1.0.9" @@ -5400,14 +5411,21 @@ hardhat-gas-reporter@^1.0.9: eth-gas-reporter "^0.2.25" sha1 "^1.1.1" -hardhat@^2.0.0, hardhat@^2.0.2, hardhat@^2.0.4, hardhat@^2.16.0, hardhat@^2.17.2, hardhat@^2.22.5, hardhat@^2.9.4, hardhat@^2.9.5: - version "2.22.6" - resolved "https://registry.npmjs.org/hardhat/-/hardhat-2.22.6.tgz" - integrity sha512-abFEnd9QACwEtSvZZGSmzvw7N3zhQN1cDKz5SLHAupfG24qTHofCjqvD5kT5Wwsq5XOL0ON1Mq5rr4v0XX5ciw== +hardhat-watcher@^2.1.1: + version "2.5.0" + resolved "https://registry.yarnpkg.com/hardhat-watcher/-/hardhat-watcher-2.5.0.tgz#3ee76c3cb5b99f2875b78d176207745aa484ed4a" + integrity sha512-Su2qcSMIo2YO2PrmJ0/tdkf+6pSt8zf9+4URR5edMVti6+ShI8T3xhPrwugdyTOFuyj8lKHrcTZNKUFYowYiyA== + dependencies: + chokidar "^3.5.3" + +hardhat@^2.22.1: + version "2.22.13" + resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.22.13.tgz#1d2c7c4b640d060ae0f5b04757322118a003955a" + integrity sha512-psVJX4FSXDpSXwsU8OcKTJN04pQEj9cFBMX5OPko+OFwbIoiOpvRmafa954/UaA1934npTj8sV3gaTSdx9bPbA== dependencies: "@ethersproject/abi" "^5.1.2" "@metamask/eth-sig-util" "^4.0.0" - "@nomicfoundation/edr" "^0.4.1" + "@nomicfoundation/edr" "^0.6.3" "@nomicfoundation/ethereumjs-common" "4.0.4" "@nomicfoundation/ethereumjs-tx" "5.0.4" "@nomicfoundation/ethereumjs-util" "9.0.4" @@ -5420,7 +5438,7 @@ hardhat@^2.0.0, hardhat@^2.0.2, hardhat@^2.0.4, hardhat@^2.16.0, hardhat@^2.17.2 ansi-escapes "^4.3.0" boxen "^5.1.2" chalk "^2.4.2" - chokidar "^3.4.0" + chokidar "^4.0.0" ci-info "^2.0.0" debug "^4.1.1" enquirer "^2.3.0" @@ -5433,6 +5451,7 @@ hardhat@^2.0.0, hardhat@^2.0.2, hardhat@^2.0.4, hardhat@^2.16.0, hardhat@^2.17.2 glob "7.2.0" immutable "^4.0.0-rc.12" io-ts "1.10.4" + json-stream-stringify "^3.1.4" keccak "^3.0.2" lodash "^4.17.11" mnemonist "^0.38.0" @@ -5478,27 +5497,28 @@ has-property-descriptors@^1.0.0: dependencies: get-intrinsic "^1.2.2" +has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== + dependencies: + es-define-property "^1.0.0" + has-proto@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz" integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== -has-symbol-support-x@^1.4.1: - version "1.4.2" - -has-symbols@^1.0.1: - version "1.0.1" +has-proto@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd" + integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== -has-to-string-tag-x@^1.2.0: - version "1.4.1" - dependencies: - has-symbol-support-x "^1.4.1" - has-tostringtag@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz" @@ -5506,6 +5526,13 @@ has-tostringtag@^1.0.0: dependencies: has-symbols "^1.0.2" +has-tostringtag@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" + integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== + dependencies: + has-symbols "^1.0.3" + has-value@^0.3.1: version "0.3.1" resolved "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz" @@ -5537,10 +5564,10 @@ has-values@^1.0.0: is-number "^3.0.0" kind-of "^4.0.0" -has@^1.0.3, has@~1.0.3: - version "1.0.3" - dependencies: - function-bind "^1.1.1" +has@~1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.4.tgz#2eb2860e000011dae4f1406a86fe80e530fb2ec6" + integrity sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ== hash-base@^3.0.0: version "3.1.0" @@ -5551,13 +5578,13 @@ hash-base@^3.0.0: readable-stream "^3.6.0" safe-buffer "^5.2.0" -hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7, hash.js@1.1.7: - version "1.1.7" - resolved "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz" - integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== +hash-base@~3.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" + integrity sha512-EeeoJKjTyt868liAlVmcv2ZsUfGHlE3Q+BICOXcZiwN3osr5Q/zFGYmTJpoIzuaSTAwndFy+GqhEwlU4L3j4Ow== dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.1" + inherits "^2.0.1" + safe-buffer "^5.0.1" hash.js@1.1.3: version "1.1.3" @@ -5567,6 +5594,14 @@ hash.js@1.1.3: inherits "^2.0.3" minimalistic-assert "^1.0.0" +hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: + version "1.1.7" + resolved "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + hasown@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz" @@ -5574,6 +5609,13 @@ hasown@^2.0.0: dependencies: function-bind "^1.1.2" +hasown@^2.0.1, hasown@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== + dependencies: + function-bind "^1.1.2" + he@1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/he/-/he-1.2.0.tgz" @@ -5584,13 +5626,6 @@ heap@0.2.6: resolved "https://registry.npmjs.org/heap/-/heap-0.2.6.tgz" integrity sha512-MzzWcnfB1e4EG2vHi3dXHoBupmuXNZzx6pY6HldVS55JKKBoq3xOyzfSaZRkJp37HIhEYC78knabHff3zc4dQQ== -hmac-drbg@^1.0.0: - version "1.0.1" - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - hmac-drbg@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz" @@ -5624,16 +5659,9 @@ http-basic@^8.1.1: parse-cache-control "^1.0.1" http-cache-semantics@^4.0.0: - version "4.1.0" - -http-errors@~1.7.2, http-errors@1.7.2: - version "1.7.2" - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.1" - statuses ">= 1.5.0 < 2" - toidentifier "1.0.0" + version "4.1.1" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" + integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== http-errors@2.0.0: version "2.0.0" @@ -5667,6 +5695,14 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" +http2-wrapper@^1.0.0-beta.5.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-1.0.3.tgz#b8f55e0c1f25d4ebd08b3b0c2c079f9590800b3d" + integrity sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg== + dependencies: + quick-lru "^5.1.1" + resolve-alpn "^1.0.0" + https-proxy-agent@^5.0.0: version "5.0.1" resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz" @@ -5675,11 +5711,6 @@ https-proxy-agent@^5.0.0: agent-base "6" debug "4" -iconv-lite@^0.6.2: - version "0.6.2" - dependencies: - safer-buffer ">= 2.1.2 < 3.0.0" - iconv-lite@0.4.24: version "0.4.24" resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz" @@ -5687,6 +5718,13 @@ iconv-lite@0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" +iconv-lite@^0.6.2: + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + idna-uts46-hx@^2.3.1: version "2.3.1" resolved "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz" @@ -5694,12 +5732,7 @@ idna-uts46-hx@^2.3.1: dependencies: punycode "2.1.0" -ieee754@^1.1.13: - version "1.2.1" - resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz" - integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== - -ieee754@^1.1.4: +ieee754@^1.1.13, ieee754@^1.1.4: version "1.2.1" resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== @@ -5732,14 +5765,11 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3, inherits@~2.0.4, inherits@2, inherits@2.0.4: +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3, inherits@~2.0.4: version "2.0.4" resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -inherits@2.0.3: - version "2.0.3" - internal-slot@^1.0.4, internal-slot@^1.0.5: version "1.0.6" resolved "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz" @@ -5749,6 +5779,15 @@ internal-slot@^1.0.4, internal-slot@^1.0.5: hasown "^2.0.0" side-channel "^1.0.4" +internal-slot@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.7.tgz#c06dcca3ed874249881007b0a5523b172a190802" + integrity sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g== + dependencies: + es-errors "^1.3.0" + hasown "^2.0.0" + side-channel "^1.0.4" + invariant@^2.2.2: version "2.2.4" resolved "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz" @@ -5773,20 +5812,12 @@ ipaddr.js@1.9.1: resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz" integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== -is-accessor-descriptor@^0.1.6: - version "0.1.6" - dependencies: - kind-of "^3.0.2" - -is-accessor-descriptor@^1.0.0: - version "1.0.0" - dependencies: - kind-of "^6.0.0" - -is-arguments@^1.0.4: - version "1.1.0" +is-accessor-descriptor@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.1.tgz#3223b10628354644b86260db29b3e693f5ceedd4" + integrity sha512-YBUanLI8Yoihw923YeFUS5fs0fF2f5TSFTNiYAAzhhDscDa3lEqYuz1pDOEP5KvX94I9ey3vsqjJcLVFVU+3QA== dependencies: - call-bind "^1.0.0" + hasown "^2.0.0" is-arguments@^1.1.1: version "1.1.1" @@ -5805,6 +5836,14 @@ is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: get-intrinsic "^1.2.0" is-typed-array "^1.1.10" +is-array-buffer@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.4.tgz#7a1f92b3d61edd2bc65d24f130530ea93d7fae98" + integrity sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.1" + is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" @@ -5842,9 +5881,6 @@ is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: resolved "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== -is-callable@^1.2.2: - version "1.2.2" - is-ci@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz" @@ -5852,15 +5888,26 @@ is-ci@^2.0.0: dependencies: ci-info "^2.0.0" -is-data-descriptor@^0.1.4: - version "0.1.4" +is-core-module@^2.13.0: + version "2.15.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.15.1.tgz#a7363a25bee942fefab0de13bf6aa372c82dcc37" + integrity sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ== dependencies: - kind-of "^3.0.2" + hasown "^2.0.2" -is-data-descriptor@^1.0.0: - version "1.0.0" +is-data-descriptor@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.1.tgz#2109164426166d32ea38c405c1e0945d9e6a4eeb" + integrity sha512-bc4NlCDiCr28U4aEsQ3Qs2491gVq4V8G7MQyws968ImqjKuYtTJXrl7Vq7jsN7Ly/C3xj5KWFrY7sHNeDkAzXw== dependencies: - kind-of "^6.0.0" + hasown "^2.0.0" + +is-data-view@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-data-view/-/is-data-view-1.0.1.tgz#4b4d3a511b70f3dc26d42c03ca9ca515d847759f" + integrity sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w== + dependencies: + is-typed-array "^1.1.13" is-date-object@^1.0.1, is-date-object@^1.0.5: version "1.0.5" @@ -5870,18 +5917,20 @@ is-date-object@^1.0.1, is-date-object@^1.0.5: has-tostringtag "^1.0.0" is-descriptor@^0.1.0: - version "0.1.6" + version "0.1.7" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.7.tgz#2727eb61fd789dcd5bdf0ed4569f551d2fe3be33" + integrity sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg== dependencies: - is-accessor-descriptor "^0.1.6" - is-data-descriptor "^0.1.4" - kind-of "^5.0.0" + is-accessor-descriptor "^1.0.1" + is-data-descriptor "^1.0.1" is-descriptor@^1.0.0, is-descriptor@^1.0.2: - version "1.0.2" + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.3.tgz#92d27cb3cd311c4977a4db47df457234a13cb306" + integrity sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw== dependencies: - is-accessor-descriptor "^1.0.0" - is-data-descriptor "^1.0.0" - kind-of "^6.0.2" + is-accessor-descriptor "^1.0.1" + is-data-descriptor "^1.0.1" is-docker@^2.0.0: version "2.2.1" @@ -5893,11 +5942,6 @@ is-extendable@^0.1.0, is-extendable@^0.1.1: resolved "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz" integrity sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw== -is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz" - integrity sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw== - is-extendable@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz" @@ -5959,14 +6003,16 @@ is-map@^2.0.1, is-map@^2.0.2: resolved "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz" integrity sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg== -is-negative-zero@^2.0.0: - version "2.0.1" - is-negative-zero@^2.0.2: version "2.0.2" resolved "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz" integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== +is-negative-zero@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.3.tgz#ced903a027aca6381b777a5743069d7376a49747" + integrity sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw== + is-number-object@^1.0.4: version "1.0.7" resolved "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz" @@ -5986,12 +6032,6 @@ is-number@^7.0.0: resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== -is-object@^1.0.1: - version "1.0.2" - -is-plain-obj@^1.1.0: - version "1.1.0" - is-plain-obj@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz" @@ -6004,12 +6044,7 @@ is-plain-object@^2.0.3, is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" -is-regex@^1.0.4, is-regex@^1.1.1: - version "1.1.1" - dependencies: - has-symbols "^1.0.1" - -is-regex@^1.1.4: +is-regex@^1.1.4, is-regex@~1.1.4: version "1.1.4" resolved "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz" integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== @@ -6017,14 +6052,6 @@ is-regex@^1.1.4: call-bind "^1.0.2" has-tostringtag "^1.0.0" -is-regex@~1.0.5: - version "1.0.5" - dependencies: - has "^1.0.3" - -is-retry-allowed@^1.0.0: - version "1.2.0" - is-set@^2.0.1, is-set@^2.0.2: version "2.0.2" resolved "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz" @@ -6037,8 +6064,12 @@ is-shared-array-buffer@^1.0.2: dependencies: call-bind "^1.0.2" -is-stream@^1.0.0: - version "1.1.0" +is-shared-array-buffer@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz#1237f1cba059cdb62431d378dcc37d9680181688" + integrity sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg== + dependencies: + call-bind "^1.0.7" is-stream@^1.0.1: version "1.1.0" @@ -6066,6 +6097,13 @@ is-typed-array@^1.1.10, is-typed-array@^1.1.12, is-typed-array@^1.1.9: dependencies: which-typed-array "^1.1.11" +is-typed-array@^1.1.13: + version "1.1.13" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.13.tgz#d6c5ca56df62334959322d7d7dd1cca50debe229" + integrity sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw== + dependencies: + which-typed-array "^1.1.14" + is-typedarray@^1.0.0, is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz" @@ -6118,7 +6156,12 @@ is-wsl@^2.1.1: dependencies: is-docker "^2.0.0" -isarray@^1.0.0, isarray@~1.0.0, isarray@1.0.0: +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + integrity sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ== + +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== @@ -6128,11 +6171,6 @@ isarray@^2.0.5: resolved "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz" integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== -isarray@0.0.1: - version "0.0.1" - resolved "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" - integrity sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ== - isexe@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" @@ -6163,28 +6201,22 @@ isstream@~0.1.2: resolved "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz" integrity sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g== -isurl@^1.0.0-alpha5: - version "1.0.0" - dependencies: - has-to-string-tag-x "^1.2.0" - is-object "^1.0.1" - js-cookie@^2.2.1: version "2.2.1" resolved "https://registry.npmjs.org/js-cookie/-/js-cookie-2.2.1.tgz" integrity sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ== -js-sha3@^0.5.7, js-sha3@0.5.7: +js-sha3@0.5.7, js-sha3@^0.5.7: version "0.5.7" resolved "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz" integrity sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g== -js-sha3@^0.8.0, js-sha3@0.8.0: +js-sha3@0.8.0, js-sha3@^0.8.0: version "0.8.0" resolved "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz" integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== -"js-tokens@^3.0.0 || ^4.0.0": +"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== @@ -6194,11 +6226,6 @@ js-tokens@^3.0.2: resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz" integrity sha512-RjTcuD4xjtthQkaWH7dFlH85L+QaVtSoOyGdZ3g6HFhS9dFNDfLyqgm2NFe2X6cQpeFmt0452FJjFG5UameExg== -js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - js-yaml@4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz" @@ -6206,6 +6233,11 @@ js-yaml@4.1.0: dependencies: argparse "^2.0.1" +jsbi@^3.1.4: + version "3.2.5" + resolved "https://registry.yarnpkg.com/jsbi/-/jsbi-3.2.5.tgz#b37bb90e0e5c2814c1c2a1bcd8c729888a2e37d6" + integrity sha512-aBE4n43IPvjaddScbvWRA2YlTzKEynHzu7MqOyTipdHucf/VxS63ViCjxYRg86M8Rxwbt/GfzHl1kKERkt45fQ== + jsbn@~0.1.0: version "0.1.1" resolved "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz" @@ -6231,6 +6263,11 @@ json-buffer@3.0.0: resolved "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz" integrity sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ== +json-buffer@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== + json-rpc-engine@^3.4.0, json-rpc-engine@^3.6.0: version "3.8.0" resolved "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-3.8.0.tgz" @@ -6265,18 +6302,25 @@ json-schema-traverse@^1.0.0: resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz" integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== -json-schema@0.2.3: - version "0.2.3" - json-schema@0.4.0: version "0.4.0" resolved "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz" integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== json-stable-stringify@^1.0.1: - version "1.0.1" + version "1.1.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.1.1.tgz#52d4361b47d49168bcc4e564189a42e5a7439454" + integrity sha512-SU/971Kt5qVQfJpyDveVhQ/vya+5hvrjClFOcr8c0Fq5aODJjMwutrOfCU+eCnVD5gpx1Q3fEqkyom77zH1iIg== dependencies: - jsonify "~0.0.0" + call-bind "^1.0.5" + isarray "^2.0.5" + jsonify "^0.0.1" + object-keys "^1.1.1" + +json-stream-stringify@^3.1.4: + version "3.1.6" + resolved "https://registry.yarnpkg.com/json-stream-stringify/-/json-stream-stringify-3.1.6.tgz#ebe32193876fb99d4ec9f612389a8d8e2b5d54d4" + integrity sha512-x7fpwxOkbhFCaJDJ8vb1fBY3DdSa4AlITaz+HHILQJzdPMnHEFjxPwVUi1ALIbcIxDE0PNe/0i7frnY8QnBQog== json-stringify-safe@~5.0.1: version "5.0.1" @@ -6316,8 +6360,10 @@ jsonfile@^6.0.1: optionalDependencies: graceful-fs "^4.1.6" -jsonify@~0.0.0: - version "0.0.0" +jsonify@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.1.tgz#2aa3111dae3d34a0f151c63f3a45d995d9420978" + integrity sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg== jsprim@^1.2.2: version "1.4.2" @@ -6329,6 +6375,14 @@ jsprim@^1.2.2: json-schema "0.4.0" verror "1.10.0" +keccak@3.0.1: + version "3.0.1" + resolved "https://registry.npmjs.org/keccak/-/keccak-3.0.1.tgz" + integrity sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA== + dependencies: + node-addon-api "^2.0.0" + node-gyp-build "^4.2.0" + keccak@^3.0.0, keccak@^3.0.2: version "3.0.4" resolved "https://registry.npmjs.org/keccak/-/keccak-3.0.4.tgz" @@ -6338,14 +6392,6 @@ keccak@^3.0.0, keccak@^3.0.2: node-gyp-build "^4.2.0" readable-stream "^3.6.0" -keccak@3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/keccak/-/keccak-3.0.1.tgz" - integrity sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA== - dependencies: - node-addon-api "^2.0.0" - node-gyp-build "^4.2.0" - keyv@^3.0.0: version "3.1.0" resolved "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz" @@ -6353,14 +6399,14 @@ keyv@^3.0.0: dependencies: json-buffer "3.0.0" -kind-of@^3.0.2, kind-of@^3.0.3: - version "3.2.2" - resolved "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz" - integrity sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ== +keyv@^4.0.0: + version "4.5.4" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" + integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== dependencies: - is-buffer "^1.1.5" + json-buffer "3.0.1" -kind-of@^3.2.0: +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz" integrity sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ== @@ -6374,10 +6420,7 @@ kind-of@^4.0.0: dependencies: is-buffer "^1.1.5" -kind-of@^5.0.0: - version "5.1.0" - -kind-of@^6.0.0, kind-of@^6.0.2: +kind-of@^6.0.2: version "6.0.3" resolved "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== @@ -6496,6 +6539,14 @@ level-sublevel@6.6.4: typewiselite "~1.0.0" xtend "~4.0.0" +level-ws@0.0.0: + version "0.0.0" + resolved "https://registry.npmjs.org/level-ws/-/level-ws-0.0.0.tgz" + integrity sha512-XUTaO/+Db51Uiyp/t7fCMGVFOTdtLS/NIACxE/GHsij15mKzxksZifKVjlXDF41JMUP/oM1Oc4YNGdKnc3dVLw== + dependencies: + readable-stream "~1.0.15" + xtend "~2.1.1" + level-ws@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/level-ws/-/level-ws-1.0.0.tgz" @@ -6505,13 +6556,15 @@ level-ws@^1.0.0: readable-stream "^2.2.8" xtend "^4.0.1" -level-ws@0.0.0: - version "0.0.0" - resolved "https://registry.npmjs.org/level-ws/-/level-ws-0.0.0.tgz" - integrity sha512-XUTaO/+Db51Uiyp/t7fCMGVFOTdtLS/NIACxE/GHsij15mKzxksZifKVjlXDF41JMUP/oM1Oc4YNGdKnc3dVLw== +levelup@3.1.1, levelup@^3.0.0: + version "3.1.1" + resolved "https://registry.npmjs.org/levelup/-/levelup-3.1.1.tgz" + integrity sha512-9N10xRkUU4dShSRRFTBdNaBxofz+PGaIZO962ckboJZiNmLuhVT6FZ6ZKAsICKfUBO76ySaYU6fJWX/jnj3Lcg== dependencies: - readable-stream "~1.0.15" - xtend "~2.1.1" + deferred-leveldown "~4.0.0" + level-errors "~2.0.0" + level-iterator-stream "~3.0.0" + xtend "~4.0.0" levelup@^1.2.1: version "1.3.9" @@ -6526,16 +6579,6 @@ levelup@^1.2.1: semver "~5.4.1" xtend "~4.0.0" -levelup@^3.0.0, levelup@3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/levelup/-/levelup-3.1.1.tgz" - integrity sha512-9N10xRkUU4dShSRRFTBdNaBxofz+PGaIZO962ckboJZiNmLuhVT6FZ6ZKAsICKfUBO76ySaYU6fJWX/jnj3Lcg== - dependencies: - deferred-leveldown "~4.0.0" - level-errors "~2.0.0" - level-iterator-stream "~3.0.0" - xtend "~4.0.0" - load-json-file@^1.0.0: version "1.1.0" resolved "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz" @@ -6592,16 +6635,16 @@ lodash.truncate@^4.4.2: resolved "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz" integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== -lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.21: - version "4.17.21" - resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -lodash@^4.17.4, lodash@4.17.20: +lodash@4.17.20, lodash@^4.17.4: version "4.17.20" resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz" integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== +lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21: + version "4.17.21" + resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + log-symbols@4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz" @@ -6644,10 +6687,12 @@ lowercase-keys@^2.0.0: resolved "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz" integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== -lru_map@^0.3.3: - version "0.3.3" - resolved "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz" - integrity sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ== +lru-cache@5.1.1, lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" lru-cache@^3.2.0: version "3.2.0" @@ -6656,19 +6701,10 @@ lru-cache@^3.2.0: dependencies: pseudomap "^1.0.1" -lru-cache@^5.1.1, lru-cache@5.1.1: - version "5.1.1" - resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz" - integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== - dependencies: - yallist "^3.0.2" - -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" +lru_map@^0.3.3: + version "0.3.3" + resolved "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz" + integrity sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ== ltgt@^2.1.2, ltgt@~2.1.1: version "2.1.3" @@ -6745,10 +6781,23 @@ memorystream@^0.3.1: resolved "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz" integrity sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw== -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz" - integrity sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w== +merge-descriptors@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.3.tgz#d80319a65f3c7935351e5cfdac8f9318504dbed5" + integrity sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ== + +merkle-patricia-tree@3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-3.0.0.tgz" + integrity sha512-soRaMuNf/ILmw3KWbybaCjhx86EYeBbD8ph0edQCTed0JN/rxDt1EBN52Ajre3VyGo+91f8+/rfPIRQnnGMqmQ== + dependencies: + async "^2.6.1" + ethereumjs-util "^5.2.0" + level-mem "^3.0.1" + level-ws "^1.0.0" + readable-stream "^3.0.6" + rlp "^2.0.0" + semaphore ">=1.0.1" merkle-patricia-tree@^2.1.2, merkle-patricia-tree@^2.3.2: version "2.3.2" @@ -6764,19 +6813,6 @@ merkle-patricia-tree@^2.1.2, merkle-patricia-tree@^2.3.2: rlp "^2.0.0" semaphore ">=1.0.1" -merkle-patricia-tree@3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-3.0.0.tgz" - integrity sha512-soRaMuNf/ILmw3KWbybaCjhx86EYeBbD8ph0edQCTed0JN/rxDt1EBN52Ajre3VyGo+91f8+/rfPIRQnnGMqmQ== - dependencies: - async "^2.6.1" - ethereumjs-util "^5.2.0" - level-mem "^3.0.1" - level-ws "^1.0.0" - readable-stream "^3.0.6" - rlp "^2.0.0" - semaphore ">=1.0.1" - methods@~1.1.2: version "1.1.2" resolved "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz" @@ -6822,26 +6858,18 @@ miller-rabin@^4.0.0: bn.js "^4.0.0" brorand "^1.0.1" -mime-db@1.45.0: - version "1.45.0" - mime-db@1.52.0: version "1.52.0" resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== -mime-types@^2.1.12, mime-types@~2.1.19: +mime-types@^2.1.12, mime-types@^2.1.16, mime-types@~2.1.19, mime-types@~2.1.24, mime-types@~2.1.34: version "2.1.35" resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== dependencies: mime-db "1.52.0" -mime-types@^2.1.16, mime-types@~2.1.24: - version "2.1.28" - dependencies: - mime-db "1.45.0" - mime@1.6.0: version "1.6.0" resolved "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz" @@ -6852,6 +6880,11 @@ mimic-response@^1.0.0, mimic-response@^1.0.1: resolved "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz" integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== +mimic-response@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" + integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== + min-document@^2.19.0: version "2.19.0" resolved "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz" @@ -6864,42 +6897,38 @@ minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: resolved "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz" integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== -minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: +minimalistic-crypto-utils@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz" integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== -minimatch@^3.0.4: +minimatch@5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz" + integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== + dependencies: + brace-expansion "^2.0.1" + +minimatch@^3.0.4, minimatch@^3.1.1: version "3.1.2" resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" -minimatch@5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz" - integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== +minimatch@^9.0.5: + version "9.0.5" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" + integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== dependencies: brace-expansion "^2.0.1" -minimist@^1.2.0, minimist@^1.2.5, minimist@~1.2.5: - version "1.2.5" - -minimist@^1.2.6, minimist@^1.2.7: +minimist@^1.2.0, minimist@^1.2.6, minimist@^1.2.7, minimist@~1.2.8: version "1.2.8" resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== -minipass@^2.6.0, minipass@^2.8.6: - version "2.9.0" - resolved "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz" - integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== - dependencies: - safe-buffer "^5.1.2" - yallist "^3.0.0" - -minipass@^2.9.0: +minipass@^2.6.0, minipass@^2.9.0: version "2.9.0" resolved "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz" integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== @@ -6907,8 +6936,10 @@ minipass@^2.9.0: safe-buffer "^5.1.2" yallist "^3.0.0" -minizlib@^1.2.1: +minizlib@^1.3.3: version "1.3.3" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" + integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== dependencies: minipass "^2.9.0" @@ -6927,12 +6958,12 @@ mkdirp-promise@^5.0.1: dependencies: mkdirp "*" -mkdirp@*, mkdirp@^0.5.0: - version "0.5.5" - dependencies: - minimist "^1.2.5" +mkdirp@*: + version "3.0.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-3.0.1.tgz#e44e4c5607fb279c168241713cc6e0fea9adcb50" + integrity sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg== -mkdirp@^0.5.1: +mkdirp@^0.5.1, mkdirp@^0.5.5: version "0.5.6" resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz" integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== @@ -6974,20 +7005,31 @@ mocha@^10.0.0, mocha@^10.2.0: yargs-unparser "2.0.0" mock-fs@^4.1.0: - version "4.13.0" + version "4.14.0" + resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.14.0.tgz#ce5124d2c601421255985e6e94da80a7357b1b18" + integrity sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw== -ms@^2.1.1, ms@2.1.2: - version "2.1.2" - resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +mock-property@~1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/mock-property/-/mock-property-1.0.3.tgz#3e37c50a56609d548cabd56559fde3dd8767b10c" + integrity sha512-2emPTb1reeLLYwHxyVx993iYyCHEiRRO+y8NFXFPL5kl5q14sgTK76cXyEKkeKCHeRw35SfdkUJ10Q1KfHuiIQ== + dependencies: + define-data-property "^1.1.1" + functions-have-names "^1.2.3" + gopd "^1.0.1" + has-property-descriptors "^1.0.0" + hasown "^2.0.0" + isarray "^2.0.5" ms@2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== -ms@2.1.1: - version "2.1.1" +ms@2.1.2, ms@^2.1.1: + version "2.1.2" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== ms@2.1.3: version "2.1.3" @@ -7070,11 +7112,15 @@ nanomatch@^1.2.9: snapdragon "^0.8.1" to-regex "^3.0.1" -negotiator@0.6.2: - version "0.6.2" +negotiator@0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" + integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== -next-tick@~1.0.0: - version "1.0.0" +next-tick@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" + integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== nice-try@^1.0.4: version "1.0.5" @@ -7086,7 +7132,7 @@ node-addon-api@^2.0.0: resolved "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz" integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== -node-fetch@^2.6.1, node-fetch@^2.6.12: +node-fetch@^2.6.0, node-fetch@^2.6.1, node-fetch@^2.6.12, node-fetch@^2.6.7: version "2.7.0" resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz" integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== @@ -7101,14 +7147,16 @@ node-fetch@~1.7.1: encoding "^0.1.11" is-stream "^1.0.1" -node-fetch@2.1.2: - version "2.1.2" - node-gyp-build@^4.2.0: version "4.8.0" resolved "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.0.tgz" integrity sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og== +node-gyp-build@^4.3.0: + version "4.8.2" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.8.2.tgz#4f802b71c1ab2ca16af830e6c1ea7dd1ad9496fa" + integrity sha512-IRUxE4BVsHWXkV/SFOut4qTlagw2aM8T5/vnTsmrHJvVoKueJHRc/JaFND7QDDc61kLYUJ6qlZM3sqTSyx2dTw== + node-releases@^2.0.14: version "2.0.14" resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz" @@ -7135,7 +7183,14 @@ normalize-path@^3.0.0, normalize-path@~3.0.0: integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== normalize-url@^4.1.0: - version "4.5.0" + version "4.5.1" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.1.tgz#0dd90cf1288ee1d1313b87081c9a5932ee48518a" + integrity sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA== + +normalize-url@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" + integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== number-is-nan@^1.0.0: version "1.0.1" @@ -7174,17 +7229,10 @@ object-inspect@^1.13.1, object-inspect@^1.9.0: resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz" integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== -object-inspect@^1.8.0: - version "1.9.0" - -object-inspect@~1.7.0: - version "1.7.0" - -object-is@^1.0.1: - version "1.1.4" - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" +object-inspect@~1.12.3: + version "1.12.3" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" + integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== object-is@^1.1.5: version "1.1.5" @@ -7194,7 +7242,7 @@ object-is@^1.1.5: 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.npmjs.org/object-keys/-/object-keys-1.1.1.tgz" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== @@ -7211,15 +7259,7 @@ object-visit@^1.0.0: dependencies: isobject "^3.0.0" -object.assign@^4.1.1: - version "4.1.2" - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - has-symbols "^1.0.1" - object-keys "^1.1.1" - -object.assign@^4.1.4: +object.assign@^4.1.4, object.assign@^4.1.5: version "4.1.5" resolved "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz" integrity sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ== @@ -7229,12 +7269,18 @@ object.assign@^4.1.4: has-symbols "^1.0.3" object-keys "^1.1.1" -object.getownpropertydescriptors@^2.1.1: - version "2.1.1" +object.getownpropertydescriptors@^2.1.6: + version "2.1.8" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.8.tgz#2f1fe0606ec1a7658154ccd4f728504f69667923" + integrity sha512-qkHIGe4q0lSYMv0XI4SsBTJz3WaURhLvd0lKSgtVuOsJ2krg4SgMw3PIRQFMp07yi++UR3se2mkcLqsBNpBb/A== dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - es-abstract "^1.18.0-next.1" + array.prototype.reduce "^1.0.6" + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-object-atoms "^1.0.0" + gopd "^1.0.1" + safe-array-concat "^1.1.2" object.pick@^1.3.0: version "1.3.0" @@ -7255,8 +7301,10 @@ oboe@2.1.4: dependencies: http-https "^1.0.0" -on-finished@~2.3.0: - version "2.3.0" +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" @@ -7297,16 +7345,15 @@ os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: resolved "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz" integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== -p-cancelable@^0.3.0: - version "0.3.0" - p-cancelable@^1.0.0: version "1.1.0" resolved "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz" integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== -p-finally@^1.0.0: - version "1.0.0" +p-cancelable@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.1.1.tgz#aab7fbd416582fa32a3db49859c122487c5ed2cf" + integrity sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg== p-limit@^1.1.0: version "1.3.0" @@ -7343,17 +7390,12 @@ p-map@^4.0.0: dependencies: aggregate-error "^3.0.0" -p-timeout@^1.1.1: - version "1.2.1" - dependencies: - p-finally "^1.0.0" - p-try@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz" integrity sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww== -parse-asn1@^5.0.0, parse-asn1@^5.1.5: +parse-asn1@^5.0.0: version "5.1.6" resolved "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz" integrity sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw== @@ -7364,13 +7406,27 @@ parse-asn1@^5.0.0, parse-asn1@^5.1.5: pbkdf2 "^3.0.3" safe-buffer "^5.1.1" +parse-asn1@^5.1.7: + version "5.1.7" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.7.tgz#73cdaaa822125f9647165625eb45f8a051d2df06" + integrity sha512-CTM5kuWR3sx9IFamcl5ErfPl6ea/N8IYwiJ+vpeB2g+1iknv7zBl5uPwbMbRVznRVbrNY6lGuDoE5b30grmbqg== + dependencies: + asn1.js "^4.10.1" + browserify-aes "^1.2.0" + evp_bytestokey "^1.0.3" + hash-base "~3.0" + pbkdf2 "^3.1.2" + safe-buffer "^5.2.1" + parse-cache-control@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/parse-cache-control/-/parse-cache-control-1.0.1.tgz" integrity sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg== parse-headers@^2.0.0: - version "2.0.3" + version "2.0.5" + resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.5.tgz#069793f9356a54008571eb7f9761153e6c770da9" + integrity sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1Zau/HwI75HA== parse-json@^2.2.0: version "2.2.0" @@ -7389,6 +7445,24 @@ pascalcase@^0.1.1: resolved "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz" integrity sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw== +patch-package@6.2.2: + version "6.2.2" + resolved "https://registry.npmjs.org/patch-package/-/patch-package-6.2.2.tgz" + integrity sha512-YqScVYkVcClUY0v8fF0kWOjDYopzIM8e3bj/RU1DPeEF14+dCGm6UeOYm4jvCyxqIEQ5/eJzmbWfDWnUleFNMg== + dependencies: + "@yarnpkg/lockfile" "^1.1.0" + chalk "^2.4.2" + cross-spawn "^6.0.5" + find-yarn-workspace-root "^1.2.1" + fs-extra "^7.0.1" + is-ci "^2.0.0" + klaw-sync "^6.0.0" + minimist "^1.2.0" + rimraf "^2.6.3" + semver "^5.6.0" + slash "^2.0.0" + tmp "^0.0.33" + patch-package@^6.2.2: version "6.5.1" resolved "https://registry.npmjs.org/patch-package/-/patch-package-6.5.1.tgz" @@ -7409,24 +7483,6 @@ patch-package@^6.2.2: tmp "^0.0.33" yaml "^1.10.2" -patch-package@6.2.2: - version "6.2.2" - resolved "https://registry.npmjs.org/patch-package/-/patch-package-6.2.2.tgz" - integrity sha512-YqScVYkVcClUY0v8fF0kWOjDYopzIM8e3bj/RU1DPeEF14+dCGm6UeOYm4jvCyxqIEQ5/eJzmbWfDWnUleFNMg== - dependencies: - "@yarnpkg/lockfile" "^1.1.0" - chalk "^2.4.2" - cross-spawn "^6.0.5" - find-yarn-workspace-root "^1.2.1" - fs-extra "^7.0.1" - is-ci "^2.0.0" - klaw-sync "^6.0.0" - minimist "^1.2.0" - rimraf "^2.6.3" - semver "^5.6.0" - slash "^2.0.0" - tmp "^0.0.33" - path-browserify@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz" @@ -7459,15 +7515,15 @@ path-key@^2.0.1: resolved "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz" integrity sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw== -path-parse@^1.0.6: +path-parse@^1.0.6, path-parse@^1.0.7: version "1.0.7" resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz" - integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== +path-to-regexp@0.1.10: + version "0.1.10" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.10.tgz#67e9108c5c0551b9e5326064387de4763c4d5f8b" + integrity sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w== path-type@^1.0.0: version "1.1.0" @@ -7483,7 +7539,7 @@ pathval@^1.1.1: resolved "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz" integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== -pbkdf2@^3.0.17: +pbkdf2@^3.0.17, pbkdf2@^3.0.3, pbkdf2@^3.0.9, pbkdf2@^3.1.2: version "3.1.2" resolved "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz" integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== @@ -7494,15 +7550,6 @@ pbkdf2@^3.0.17: safe-buffer "^5.0.1" sha.js "^2.4.8" -pbkdf2@^3.0.3, pbkdf2@^3.0.9: - version "3.1.1" - dependencies: - create-hash "^1.1.2" - create-hmac "^1.1.4" - ripemd160 "^2.0.1" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - performance-now@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz" @@ -7518,12 +7565,7 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== -pify@^2.0.0: - version "2.3.0" - resolved "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz" - integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog== - -pify@^2.3.0: +pify@^2.0.0, pify@^2.3.0: version "2.3.0" resolved "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz" integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog== @@ -7550,6 +7592,11 @@ posix-character-classes@^0.1.0: resolved "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz" integrity sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg== +possible-typed-array-names@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz#89bb63c6fada2c3e90adc4a647beeeb39cc7bf8f" + integrity sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q== + postinstall-postinstall@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/postinstall-postinstall/-/postinstall-postinstall-2.1.0.tgz" @@ -7560,9 +7607,6 @@ precond@0.2: resolved "https://registry.npmjs.org/precond/-/precond-0.2.3.tgz" integrity sha512-QCYG84SgGyGzqJ/vlMsxeXd/pgL/I94ixdNFyh1PusWmTCyVfPJjZ1K1jvHtsbfnXQs2TSkEP2fR7QiMZAnKFQ== -prepend-http@^1.0.1: - version "1.0.4" - prepend-http@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz" @@ -7577,7 +7621,7 @@ prettier-plugin-solidity@^1.0.0-beta.16: semver "^7.5.4" solidity-comments-extractor "^0.0.8" -prettier@^2.1.2, prettier@^2.3.2, prettier@>=2.3.0: +prettier@^2.1.2, prettier@^2.3.2: version "2.8.8" resolved "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz" integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== @@ -7621,10 +7665,12 @@ proper-lockfile@^4.1.1: retry "^0.12.0" signal-exit "^3.0.2" -proxy-addr@~2.0.5: - version "2.0.6" +proxy-addr@~2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" + integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== dependencies: - forwarded "~0.1.2" + forwarded "0.2.0" ipaddr.js "1.9.1" proxy-from-env@^1.1.0: @@ -7696,7 +7742,9 @@ pull-pushable@^2.0.0: integrity sha512-M7dp95enQ2kaHvfCt2+DJfyzgCSpWVR2h2kWYnVsW6ZpxQBx5wOu0QWOvQPVoPnBLUZYitYP2y7HyHkLQNeGXg== pull-stream@^3.2.3, pull-stream@^3.4.0, pull-stream@^3.6.8: - version "3.6.14" + version "3.7.0" + resolved "https://registry.yarnpkg.com/pull-stream/-/pull-stream-3.7.0.tgz#85de0e44ff38a4d2ad08cc43fc458e1922f9bf0b" + integrity sha512-Eco+/R004UaCK2qEDE8vGklcTG2OeZSVm1kTUQNrykEjDwcFXDZhygFDsW49DbXyJMEhHeRL3z5cRVqPAhXlIw== pull-window@^2.1.4: version "2.1.4" @@ -7713,18 +7761,27 @@ pump@^3.0.0: end-of-stream "^1.1.0" once "^1.3.1" +punycode@2.1.0, punycode@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz" + integrity sha512-Yxz2kRwT90aPiWEMHVYnEf4+rhwF1tBmmZ4KepCP+Wkium9JxtWnUm1nqGwpiAHr/tnTSeHqr3wb++jgSkXjhA== + punycode@^1.4.1: version "1.4.1" resolved "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz" integrity sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ== -punycode@^2.1.0, punycode@2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz" - integrity sha512-Yxz2kRwT90aPiWEMHVYnEf4+rhwF1tBmmZ4KepCP+Wkium9JxtWnUm1nqGwpiAHr/tnTSeHqr3wb++jgSkXjhA== - punycode@^2.1.1: - version "2.1.1" + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== + +qs@6.13.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.0.tgz#6ca3bd58439f7e245655798997787b0d88a51906" + integrity sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg== + dependencies: + side-channel "^1.0.6" qs@^6.11.2, qs@^6.4.0, qs@^6.9.4: version "6.11.2" @@ -7734,10 +7791,9 @@ qs@^6.11.2, qs@^6.4.0, qs@^6.9.4: side-channel "^1.0.4" qs@~6.5.2: - version "6.5.2" - -qs@6.7.0: - version "6.7.0" + version "6.5.3" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" + integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== query-string@^5.0.1: version "5.1.1" @@ -7748,6 +7804,11 @@ query-string@^5.0.1: object-assign "^4.1.0" strict-uri-encode "^1.0.0" +quick-lru@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" + integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA== + randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.0.6, randombytes@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz" @@ -7768,9 +7829,9 @@ range-parser@~1.2.1: resolved "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz" integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== -raw-body@^2.4.1: +raw-body@2.5.2, raw-body@^2.4.1: version "2.5.2" - resolved "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a" integrity sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA== dependencies: bytes "3.1.2" @@ -7778,14 +7839,6 @@ raw-body@^2.4.1: iconv-lite "0.4.24" unpipe "1.0.0" -raw-body@2.4.0: - version "2.4.0" - dependencies: - bytes "3.1.0" - http-errors "1.7.2" - iconv-lite "0.4.24" - unpipe "1.0.0" - read-pkg-up@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz" @@ -7813,18 +7866,7 @@ readable-stream@^1.0.33: isarray "0.0.1" string_decoder "~0.10.x" -readable-stream@^2.0.0, readable-stream@^2.0.5, readable-stream@^2.2.8, readable-stream@^2.2.9, readable-stream@^2.3.6, readable-stream@~2.3.6: - version "2.3.7" - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - -readable-stream@^2.2.2: +readable-stream@^2.0.0, readable-stream@^2.0.5, readable-stream@^2.2.2, readable-stream@^2.2.8, readable-stream@^2.2.9, readable-stream@^2.3.6, readable-stream@^2.3.8, readable-stream@~2.3.6: version "2.3.8" resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz" integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== @@ -7837,14 +7879,7 @@ readable-stream@^2.2.2: string_decoder "~1.1.1" util-deprecate "~1.0.1" -readable-stream@^3.0.6: - version "3.6.0" - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readable-stream@^3.6.0: +readable-stream@^3.0.6, readable-stream@^3.6.0: version "3.6.2" resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz" integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== @@ -7863,6 +7898,11 @@ readable-stream@~1.0.15: isarray "0.0.1" string_decoder "~0.10.x" +readdirp@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-4.0.2.tgz#388fccb8b75665da3abffe2d8f8ed59fe74c230a" + integrity sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA== + readdirp@~3.6.0: version "3.6.0" resolved "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz" @@ -7902,12 +7942,6 @@ 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.3.0" - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.0-next.1" - regexp.prototype.flags@^1.5.1: version "1.5.1" resolved "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz" @@ -7917,6 +7951,16 @@ regexp.prototype.flags@^1.5.1: define-properties "^1.2.0" set-function-name "^2.0.0" +regexp.prototype.flags@^1.5.2: + version "1.5.3" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.3.tgz#b3ae40b1d2499b8350ab2c3fe6ef3845d3a96f42" + integrity sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-errors "^1.3.0" + set-function-name "^2.0.2" + regexpu-core@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz" @@ -7939,7 +7983,9 @@ regjsparser@^0.1.4: jsesc "~0.5.0" repeat-element@^1.1.2: - version "1.1.3" + version "1.1.4" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.4.tgz#be681520847ab58c7568ac75fbfad28ed42d39e9" + integrity sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ== repeat-string@^1.6.1: version "1.6.1" @@ -8013,6 +8059,11 @@ require-main-filename@^1.0.1: resolved "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz" integrity sha512-IqSUtOVP4ksd1C/ej5zeEh/BIP2ajqpn8c5x+q99gvcIG/Qf0cud5raVnE/Dwd0ua9TXYDoDc0RE5hBSdz22Ug== +resolve-alpn@^1.0.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.2.1.tgz#b7adbdac3546aaaec20b45e7d8265927072726f9" + integrity sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g== + resolve-from@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz" @@ -8023,17 +8074,21 @@ resolve-url@^0.2.1: resolved "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz" integrity sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg== -resolve@^1.10.0, resolve@^1.8.1, resolve@1.17.0: +resolve@1.17.0, resolve@^1.10.0, resolve@^1.8.1: version "1.17.0" resolved "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz" integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== dependencies: path-parse "^1.0.6" -resolve@~1.17.0: - version "1.17.0" +resolve@~1.22.6: + version "1.22.8" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" + integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== dependencies: - path-parse "^1.0.6" + is-core-module "^2.13.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" responselike@^1.0.2: version "1.0.2" @@ -8042,26 +8097,28 @@ responselike@^1.0.2: dependencies: lowercase-keys "^1.0.0" -resumer@~0.0.0: - version "0.0.0" +responselike@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/responselike/-/responselike-2.0.1.tgz#9a0bc8fdc252f3fb1cca68b016591059ba1422bc" + integrity sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw== dependencies: - through "~2.3.4" + lowercase-keys "^2.0.0" ret@~0.1.10: version "0.1.15" resolved "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz" integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== -retry@^0.12.0: - version "0.12.0" - resolved "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz" - integrity sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow== - retry@0.13.1: version "0.13.1" resolved "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz" integrity sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg== +retry@^0.12.0: + version "0.12.0" + resolved "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz" + integrity sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow== + rimraf@^2.2.8, rimraf@^2.6.3: version "2.7.1" resolved "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz" @@ -8077,23 +8134,28 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" -rlp@^2.0.0, rlp@^2.2.3, rlp@^2.2.4: +rlp@^2.0.0, rlp@^2.2.1, rlp@^2.2.2, rlp@^2.2.3, rlp@^2.2.4: version "2.2.7" resolved "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz" integrity sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ== dependencies: bn.js "^5.2.0" -rlp@^2.2.1, rlp@^2.2.2: - version "2.2.6" - dependencies: - bn.js "^4.11.1" - rustbn.js@~0.2.0: version "0.2.0" resolved "https://registry.npmjs.org/rustbn.js/-/rustbn.js-0.2.0.tgz" integrity sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA== +safe-array-concat@^1.0.0, safe-array-concat@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.1.2.tgz#81d77ee0c4e8b863635227c721278dd524c20edb" + integrity sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q== + dependencies: + call-bind "^1.0.7" + get-intrinsic "^1.2.4" + has-symbols "^1.0.3" + isarray "^2.0.5" + safe-array-concat@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz" @@ -8104,7 +8166,7 @@ safe-array-concat@^1.0.1: has-symbols "^1.0.3" isarray "^2.0.5" -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: +safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@^5.2.1, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -8114,9 +8176,6 @@ safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@5.1.2: - version "5.1.2" - safe-event-emitter@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/safe-event-emitter/-/safe-event-emitter-1.0.1.tgz" @@ -8133,6 +8192,15 @@ safe-regex-test@^1.0.0: get-intrinsic "^1.2.2" is-regex "^1.1.4" +safe-regex-test@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.3.tgz#a5b4c0f06e0ab50ea2c395c14d8371232924c377" + integrity sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw== + dependencies: + call-bind "^1.0.6" + es-errors "^1.3.0" + is-regex "^1.1.4" + safe-regex@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz" @@ -8140,21 +8208,21 @@ safe-regex@^1.1.0: dependencies: ret "~0.1.10" -safer-buffer@^2.0.2, safer-buffer@^2.1.0, "safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@~2.1.0: +"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -scrypt-js@^3.0.0, scrypt-js@^3.0.1, scrypt-js@3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz" - integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== - scrypt-js@2.0.4: version "2.0.4" resolved "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz" integrity sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw== +scrypt-js@3.0.1, scrypt-js@^3.0.0, scrypt-js@^3.0.1: + version "3.0.1" + resolved "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz" + integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== + scryptsy@^1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/scryptsy/-/scryptsy-1.2.1.tgz" @@ -8176,22 +8244,12 @@ seedrandom@3.0.1: resolved "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.1.tgz" integrity sha512-1/02Y/rUeU1CJBAGLebiC5Lbo5FnB22gQbIFFYTLkwvp1xdABZJH1sn4ZT1MzXmPpzv+Rf/Lu2NcsLJiK4rcDg== -semaphore@^1.0.3, semaphore@^1.1.0, semaphore@>=1.0.1: +semaphore@>=1.0.1, semaphore@^1.0.3, semaphore@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/semaphore/-/semaphore-1.1.0.tgz" integrity sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA== -semver@^5.3.0: - version "5.7.2" - resolved "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz" - integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== - -semver@^5.5.0: - version "5.7.2" - resolved "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz" - integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== - -semver@^5.6.0: +"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0, semver@^5.6.0: version "5.7.2" resolved "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== @@ -8211,27 +8269,24 @@ semver@~5.4.1: resolved "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz" integrity sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg== -"semver@2 || 3 || 4 || 5": - version "5.7.2" - resolved "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz" - integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== - -send@0.17.1: - version "0.17.1" +send@0.19.0: + version "0.19.0" + resolved "https://registry.yarnpkg.com/send/-/send-0.19.0.tgz#bbc5a388c8ea6c048967049dbeac0e4a3f09d7f8" + integrity sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw== 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.7.2" + http-errors "2.0.0" mime "1.6.0" - ms "2.1.1" - on-finished "~2.3.0" + ms "2.1.3" + 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" @@ -8240,13 +8295,15 @@ serialize-javascript@6.0.0: dependencies: randombytes "^2.1.0" -serve-static@1.14.1: - version "1.14.1" +serve-static@1.16.2: + version "1.16.2" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.16.2.tgz#b6a5343da47f6bdd2673848bf45754941e803296" + integrity sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw== dependencies: - encodeurl "~1.0.2" + encodeurl "~2.0.0" escape-html "~1.0.3" parseurl "~1.3.3" - send "0.17.1" + send "0.19.0" servify@^0.1.12: version "0.1.12" @@ -8274,6 +8331,18 @@ set-function-length@^1.1.1: gopd "^1.0.1" has-property-descriptors "^1.0.0" +set-function-length@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + set-function-name@^2.0.0: version "2.0.1" resolved "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz" @@ -8283,6 +8352,16 @@ set-function-name@^2.0.0: functions-have-names "^1.2.3" has-property-descriptors "^1.0.0" +set-function-name@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.2.tgz#16a705c5a0dc2f5e638ca96d8a8cd4e1c2b90985" + integrity sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + functions-have-names "^1.2.3" + has-property-descriptors "^1.0.2" + set-immediate-shim@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz" @@ -8298,18 +8377,15 @@ set-value@^2.0.0, set-value@^2.0.1: is-plain-object "^2.0.3" split-string "^3.0.1" -setimmediate@^1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz" - integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA== - setimmediate@1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz" integrity sha512-/TjEmXQVEzdod/FFskf3o7oOAsGhHf2j1dZqRFbDzq4F3mvvxflIIi4Hd3bLQE9y/CpwqfSQam5JakI/mi3Pog== -setprototypeof@1.1.1: - version "1.1.1" +setimmediate@^1.0.5: + version "1.0.5" + resolved "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz" + integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA== setprototypeof@1.2.0: version "1.2.0" @@ -8353,6 +8429,16 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" +side-channel@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" + integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + object-inspect "^1.13.1" + signal-exit@^3.0.2: version "3.0.7" resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz" @@ -8364,7 +8450,9 @@ simple-concat@^1.0.0: integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== simple-get@^2.7.0: - version "2.8.1" + version "2.8.2" + resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-2.8.2.tgz#5708fb0919d440657326cd5fe7d2599d07705019" + integrity sha512-Ijd/rV5o+mSBBs4F/x9oDPtTx9Zb6X9brmnXvMW4J7IR15ngi9q5xxqWBKU744jTZiaXtxaPL7uHG6vtN8kUkw== dependencies: decompress-response "^3.3.0" once "^1.3.1" @@ -8419,6 +8507,19 @@ snapdragon@^0.8.1: source-map-resolve "^0.5.0" use "^3.1.0" +solc@0.8.26: + version "0.8.26" + resolved "https://registry.npmjs.org/solc/-/solc-0.8.26.tgz" + integrity sha512-yiPQNVf5rBFHwN6SIf3TUUvVAFKcQqmSUFeq+fb6pNRCo0ZCgpYOZDi3BVoezCPIAcKrVYd/qXlBLUP9wVrZ9g== + dependencies: + command-exists "^1.2.8" + commander "^8.1.0" + follow-redirects "^1.12.1" + js-sha3 "0.8.0" + memorystream "^0.3.1" + semver "^5.5.0" + tmp "0.0.33" + solc@^0.4.20: version "0.4.26" resolved "https://registry.npmjs.org/solc/-/solc-0.4.26.tgz" @@ -8444,19 +8545,6 @@ solc@^0.6.3: semver "^5.5.0" tmp "0.0.33" -solc@0.8.26: - version "0.8.26" - resolved "https://registry.npmjs.org/solc/-/solc-0.8.26.tgz" - integrity sha512-yiPQNVf5rBFHwN6SIf3TUUvVAFKcQqmSUFeq+fb6pNRCo0ZCgpYOZDi3BVoezCPIAcKrVYd/qXlBLUP9wVrZ9g== - dependencies: - command-exists "^1.2.8" - commander "^8.1.0" - follow-redirects "^1.12.1" - js-sha3 "0.8.0" - memorystream "^0.3.1" - semver "^5.5.0" - tmp "0.0.33" - solidity-ast@^0.4.51: version "0.4.55" resolved "https://registry.npmjs.org/solidity-ast/-/solidity-ast-0.4.55.tgz" @@ -8480,6 +8568,14 @@ source-map-resolve@^0.5.0: source-map-url "^0.4.0" urix "^0.1.0" +source-map-support@0.5.12: + version "0.5.12" + resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz" + integrity sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + source-map-support@^0.4.15: version "0.4.18" resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz" @@ -8495,16 +8591,10 @@ source-map-support@^0.5.13: buffer-from "^1.0.0" source-map "^0.6.0" -source-map-support@0.5.12: - version "0.5.12" - resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz" - integrity sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - source-map-url@^0.4.0: - version "0.4.0" + version "0.4.1" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.1.tgz#0af66605a745a5a2f91cf1bbf8a7afbc283dec56" + integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw== source-map@^0.5.6, source-map@^0.5.7: version "0.5.7" @@ -8579,9 +8669,6 @@ static-extend@^0.1.1: define-property "^0.2.5" object-copy "^0.1.0" -"statuses@>= 1.5.0 < 2", statuses@~1.5.0: - version "1.5.0" - statuses@2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz" @@ -8592,39 +8679,20 @@ stop-iteration-iterator@^1.0.0: resolved "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz" integrity sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ== dependencies: - internal-slot "^1.0.4" - -stream-to-pull-stream@^1.7.1: - version "1.7.3" - resolved "https://registry.npmjs.org/stream-to-pull-stream/-/stream-to-pull-stream-1.7.3.tgz" - integrity sha512-6sNyqJpr5dIOQdgNy/xcDWwDuzAsAwVzhzrWlAPAQ7Lkjx/rv0wgvxEyKwTq6FmNd5rjTrELt/CLmaSw7crMGg== - dependencies: - looper "^3.0.0" - pull-stream "^3.2.3" - -strict-uri-encode@^1.0.0: - version "1.1.0" - resolved "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz" - integrity sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ== - -string_decoder@^1.1.1: - version "1.3.0" - resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" - integrity sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ== - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + internal-slot "^1.0.4" + +stream-to-pull-stream@^1.7.1: + version "1.7.3" + resolved "https://registry.npmjs.org/stream-to-pull-stream/-/stream-to-pull-stream-1.7.3.tgz" + integrity sha512-6sNyqJpr5dIOQdgNy/xcDWwDuzAsAwVzhzrWlAPAQ7Lkjx/rv0wgvxEyKwTq6FmNd5rjTrELt/CLmaSw7crMGg== dependencies: - safe-buffer "~5.1.0" + looper "^3.0.0" + pull-stream "^3.2.3" + +strict-uri-encode@^1.0.0: + version "1.1.0" + resolved "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz" + integrity sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ== string-width@^1.0.1: version "1.0.2" @@ -8661,18 +8729,15 @@ string.prototype.trim@^1.2.8: define-properties "^1.2.0" es-abstract "^1.22.1" -string.prototype.trim@~1.2.1: - version "1.2.3" - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - es-abstract "^1.18.0-next.1" - -string.prototype.trimend@^1.0.1: - version "1.0.3" +string.prototype.trim@^1.2.9, string.prototype.trim@~1.2.8: + version "1.2.9" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz#b6fa326d72d2c78b6df02f7759c73f8f6274faa4" + integrity sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw== dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.0" + es-object-atoms "^1.0.0" string.prototype.trimend@^1.0.7: version "1.0.7" @@ -8683,11 +8748,14 @@ string.prototype.trimend@^1.0.7: define-properties "^1.2.0" es-abstract "^1.22.1" -string.prototype.trimstart@^1.0.1: - version "1.0.3" +string.prototype.trimend@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz#3651b8513719e8a9f48de7f2f77640b26652b229" + integrity sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ== dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" string.prototype.trimstart@^1.0.7: version "1.0.7" @@ -8698,6 +8766,34 @@ string.prototype.trimstart@^1.0.7: define-properties "^1.2.0" es-abstract "^1.22.1" +string.prototype.trimstart@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz#7ee834dda8c7c17eff3118472bb35bfedaa34dde" + integrity sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + integrity sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ== + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz" @@ -8738,6 +8834,13 @@ strip-json-comments@3.1.1: resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== +supports-color@8.1.1: + version "8.1.1" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + supports-color@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" @@ -8757,21 +8860,21 @@ supports-color@^7.1.0: dependencies: has-flag "^4.0.0" -supports-color@8.1.1: - version "8.1.1" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== swarm-js@^0.1.40: - version "0.1.40" + version "0.1.42" + resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.42.tgz#497995c62df6696f6e22372f457120e43e727979" + integrity sha512-BV7c/dVlA3R6ya1lMlSSNPLYrntt0LUq4YMgy3iwpCIc6rZnS5W2wUoctarZ5pXlpKtxDDf9hNziEkcfrxdhqQ== dependencies: bluebird "^3.5.0" buffer "^5.0.5" eth-lib "^0.1.26" fs-extra "^4.0.2" - got "^7.1.0" + got "^11.8.5" mime-types "^2.1.16" mkdirp-promise "^5.0.1" mock-fs "^4.1.0" @@ -8807,34 +8910,39 @@ table@^6.8.0: strip-ansi "^6.0.1" tape@^4.6.3: - version "4.13.3" + version "4.17.0" + resolved "https://registry.yarnpkg.com/tape/-/tape-4.17.0.tgz#de89f3671ddc5dad178d04c28dc6b0183f42268e" + integrity sha512-KCuXjYxCZ3ru40dmND+oCLsXyuA8hoseu2SS404Px5ouyS0A99v8X/mdiLqsR5MTAyamMBN7PRwt2Dv3+xGIxw== dependencies: + "@ljharb/resumer" "~0.0.1" + "@ljharb/through" "~2.3.9" + call-bind "~1.0.2" deep-equal "~1.1.1" - defined "~1.0.0" + defined "~1.0.1" dotignore "~0.1.2" for-each "~0.3.3" - function-bind "~1.1.1" - glob "~7.1.6" + glob "~7.2.3" has "~1.0.3" inherits "~2.0.4" - is-regex "~1.0.5" - minimist "~1.2.5" - object-inspect "~1.7.0" - resolve "~1.17.0" - resumer "~0.0.0" - string.prototype.trim "~1.2.1" - through "~2.3.8" + is-regex "~1.1.4" + minimist "~1.2.8" + mock-property "~1.0.0" + object-inspect "~1.12.3" + resolve "~1.22.6" + string.prototype.trim "~1.2.8" tar@^4.0.2: - version "4.4.13" + version "4.4.19" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.19.tgz#2e4d7263df26f2b914dee10c825ab132123742f3" + integrity sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA== dependencies: - chownr "^1.1.1" - fs-minipass "^1.2.5" - minipass "^2.8.6" - minizlib "^1.2.1" - mkdirp "^0.5.0" - safe-buffer "^5.1.2" - yallist "^3.0.3" + chownr "^1.1.4" + fs-minipass "^1.2.7" + minipass "^2.9.0" + minizlib "^1.3.3" + mkdirp "^0.5.5" + safe-buffer "^5.2.1" + yallist "^3.1.1" test-value@^2.1.0: version "2.1.0" @@ -8866,9 +8974,6 @@ then-request@^6.0.0: promise "^8.0.0" qs "^6.4.0" -through@~2.3.4, through@~2.3.8: - version "2.3.8" - through2@^2.0.3: version "2.0.5" resolved "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz" @@ -8877,12 +8982,22 @@ through2@^2.0.3: readable-stream "~2.3.6" xtend "~4.0.1" -timed-out@^4.0.0, timed-out@^4.0.1: +timed-out@^4.0.1: version "4.0.1" resolved "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz" integrity sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA== -tmp@^0.0.33, tmp@0.0.33: +tiny-invariant@^1.1.0: + version "1.3.3" + resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.3.3.tgz#46680b7a873a0d5d10005995eb90a70d74d60127" + integrity sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg== + +tiny-warning@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754" + integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA== + +tmp@0.0.33, tmp@^0.0.33: version "0.0.33" resolved "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz" integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== @@ -8943,8 +9058,10 @@ to-regex@^3.0.1, to-regex@^3.0.2: regex-not "^1.0.2" safe-regex "^1.1.0" -toidentifier@1.0.0: - version "1.0.0" +toformat@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/toformat/-/toformat-2.0.0.tgz#7a043fd2dfbe9021a4e36e508835ba32056739d8" + integrity sha512-03SWBVop6nU8bpyZCx7SodpYznbZF5R4ljwNLBcTQzKOD9xuihRo/psX58llS1BMFhhAI08H3luot5GoXJz2pQ== toidentifier@1.0.1: version "1.0.1" @@ -8994,26 +9111,21 @@ ts-generator@^0.1.1: resolve "^1.8.1" ts-essentials "^1.0.0" +tslib@2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.7.0.tgz#d9b40c5c40ab59e8738f297df3087bf1a2690c01" + integrity sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA== + tslib@^1.11.1, tslib@^1.9.3: version "1.14.1" resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.3.1: - version "2.6.3" - resolved "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz" - integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== - -tslib@^2.6.2: +tslib@^2.3.1, tslib@^2.6.2: version "2.6.3" resolved "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz" integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== -tslib@2.4.0: - version "2.4.0" - resolved "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz" - integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== - tsort@0.0.1: version "0.0.1" resolved "https://registry.npmjs.org/tsort/-/tsort-0.0.1.tgz" @@ -9031,26 +9143,16 @@ tweetnacl-util@^0.15.0, tweetnacl-util@^0.15.1: resolved "https://registry.npmjs.org/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz" integrity sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw== -tweetnacl@^0.14.3: +tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz" integrity sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA== -tweetnacl@^1.0.0: - version "1.0.3" - resolved "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz" - integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== - -tweetnacl@^1.0.3: +tweetnacl@^1.0.0, tweetnacl@^1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz" integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== -tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz" - integrity sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA== - type-detect@^4.0.0, type-detect@^4.0.8: version "4.0.8" resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz" @@ -9071,7 +9173,7 @@ type-fest@^0.7.1: resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.7.1.tgz" integrity sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg== -type-is@~1.6.17, type-is@~1.6.18: +type-is@~1.6.18: version "1.6.18" resolved "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz" integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== @@ -9084,8 +9186,10 @@ type@^1.0.1: resolved "https://registry.npmjs.org/type/-/type-1.2.0.tgz" integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== -type@^2.0.0: - version "2.1.0" +type@^2.7.2: + version "2.7.3" + resolved "https://registry.yarnpkg.com/type/-/type-2.7.3.tgz#436981652129285cc3ba94f392886c2637ea0486" + integrity sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ== typechain@^3.0.0: version "3.0.0" @@ -9109,6 +9213,15 @@ typed-array-buffer@^1.0.0: get-intrinsic "^1.2.1" is-typed-array "^1.1.10" +typed-array-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz#1867c5d83b20fcb5ccf32649e5e2fc7424474ff3" + integrity sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + is-typed-array "^1.1.13" + typed-array-byte-length@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz" @@ -9119,6 +9232,17 @@ typed-array-byte-length@^1.0.0: has-proto "^1.0.1" is-typed-array "^1.1.10" +typed-array-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz#d92972d3cff99a3fa2e765a28fcdc0f1d89dec67" + integrity sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw== + dependencies: + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + has-proto "^1.0.3" + is-typed-array "^1.1.13" + typed-array-byte-offset@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz" @@ -9130,6 +9254,18 @@ typed-array-byte-offset@^1.0.0: has-proto "^1.0.1" is-typed-array "^1.1.10" +typed-array-byte-offset@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz#f9ec1acb9259f395093e4567eb3c28a580d02063" + integrity sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA== + dependencies: + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + has-proto "^1.0.3" + is-typed-array "^1.1.13" + typed-array-length@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz" @@ -9139,6 +9275,18 @@ typed-array-length@^1.0.4: for-each "^0.3.3" is-typed-array "^1.1.9" +typed-array-length@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.6.tgz#57155207c76e64a3457482dfdc1c9d1d3c4c73a3" + integrity sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g== + dependencies: + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + has-proto "^1.0.3" + is-typed-array "^1.1.13" + possible-typed-array-names "^1.0.0" + typedarray-to-buffer@^3.1.5: version "3.1.5" resolved "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz" @@ -9151,11 +9299,6 @@ typedarray@^0.0.6: resolved "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz" integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== -typescript@*, typescript@>=3.7.0: - version "5.5.3" - resolved "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz" - integrity sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ== - typewise-core@^1.2, typewise-core@^1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/typewise-core/-/typewise-core-1.2.0.tgz" @@ -9203,6 +9346,11 @@ undici-types@~5.26.4: resolved "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== +undici-types@~6.19.2: + version "6.19.8" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" + integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== + undici@^5.14.0: version "5.28.2" resolved "https://registry.npmjs.org/undici/-/undici-5.28.2.tgz" @@ -9210,11 +9358,6 @@ undici@^5.14.0: dependencies: "@fastify/busboy" "^2.0.0" -undici@^6.11.1: - version "6.19.2" - resolved "https://registry.npmjs.org/undici/-/undici-6.19.2.tgz" - integrity sha512-JfjKqIauur3Q6biAtHJ564e3bWa8VvT+7cSiOJHFbX4Erv6CLGDpg8z+Fmg/1OI/47RA+GI2QZaF48SSaLvyBA== - unfetch@^4.2.0: version "4.2.0" resolved "https://registry.npmjs.org/unfetch/-/unfetch-4.2.0.tgz" @@ -9245,7 +9388,7 @@ unorm@^1.3.3: resolved "https://registry.npmjs.org/unorm/-/unorm-1.6.0.tgz" integrity sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA== -unpipe@~1.0.0, unpipe@1.0.0: +unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz" integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== @@ -9278,11 +9421,6 @@ urix@^0.1.0: resolved "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz" integrity sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg== -url-parse-lax@^1.0.0: - version "1.0.0" - dependencies: - prepend-http "^1.0.1" - url-parse-lax@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz" @@ -9295,9 +9433,6 @@ url-set-query@^1.0.0: resolved "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz" integrity sha512-3AChu4NiXquPfeckE5R5cGdiHCMWJx1dwCWOmWIL4KHAziJNOFIYJlpGFeKDvwLPHovZRCxK3cYlwzqI9Vp+Gg== -url-to-options@^1.0.1: - version "1.0.1" - url@^0.11.0: version "0.11.3" resolved "https://registry.npmjs.org/url/-/url-0.11.3.tgz" @@ -9312,11 +9447,13 @@ use@^3.1.0: integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== utf-8-validate@^5.0.2: - version "5.0.4" + version "5.0.10" + resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.10.tgz#d7d10ea39318171ca982718b6b96a8d2442571a2" + integrity sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ== dependencies: - node-gyp-build "^4.2.0" + node-gyp-build "^4.3.0" -utf8@^3.0.0, utf8@3.0.0: +utf8@3.0.0, utf8@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz" integrity sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ== @@ -9327,19 +9464,33 @@ util-deprecate@^1.0.1, util-deprecate@~1.0.1: integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== util.promisify@^1.0.0: - version "1.1.1" + version "1.1.2" + resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.1.2.tgz#02b3dbadbb80071eee4c43aed58747afdfc516db" + integrity sha512-PBdZ03m1kBnQ5cjjO0ZvJMJS+QsbyIcFwi4hY4U76OQsCO9JrOYjbCFgIF76ccFg9xnJo7ZHPkqyj1GqmdS7MA== dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" + call-bind "^1.0.2" + define-properties "^1.2.0" for-each "^0.3.3" - has-symbols "^1.0.1" - object.getownpropertydescriptors "^2.1.1" + has-proto "^1.0.1" + has-symbols "^1.0.3" + object.getownpropertydescriptors "^2.1.6" + safe-array-concat "^1.0.0" utils-merge@1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz" integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== +uuid@2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz" + integrity sha512-nWg9+Oa3qD2CQzHIP4qKUqwNfzKn8P0LtFhotaCTFchsV7ZfDhAybeip/HZVeMIpZi9JgY1E3nUlwaCmZT1sEg== + +uuid@3.3.2: + version "3.3.2" + resolved "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz" + integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== + uuid@^3.3.2: version "3.4.0" resolved "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz" @@ -9355,16 +9506,6 @@ uuid@^9.0.1: resolved "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz" integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== -uuid@2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz" - integrity sha512-nWg9+Oa3qD2CQzHIP4qKUqwNfzKn8P0LtFhotaCTFchsV7ZfDhAybeip/HZVeMIpZi9JgY1E3nUlwaCmZT1sEg== - -uuid@3.3.2: - version "3.3.2" - resolved "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz" - integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== - validate-npm-package-license@^3.0.1: version "3.0.4" resolved "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz" @@ -9630,20 +9771,6 @@ web3-shh@1.2.11: web3-core-subscriptions "1.2.11" web3-net "1.2.11" -web3-utils@^1.0.0-beta.31: - version "1.10.3" - resolved "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.3.tgz" - integrity sha512-OqcUrEE16fDBbGoQtZXWdavsPzbGIDc5v3VrRTZ0XrIpefC/viZ1ZU9bGEemazyS0catk/3rkOOxpzTfY+XsyQ== - dependencies: - "@ethereumjs/util" "^8.1.0" - bn.js "^5.2.1" - ethereum-bloom-filters "^1.0.6" - ethereum-cryptography "^2.1.2" - ethjs-unit "0.1.6" - number-to-bn "1.7.0" - randombytes "^2.1.0" - utf8 "3.0.0" - web3-utils@1.2.11: version "1.2.11" resolved "https://registry.npmjs.org/web3-utils/-/web3-utils-1.2.11.tgz" @@ -9658,6 +9785,20 @@ web3-utils@1.2.11: underscore "1.9.1" utf8 "3.0.0" +web3-utils@^1.0.0-beta.31: + version "1.10.3" + resolved "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.3.tgz" + integrity sha512-OqcUrEE16fDBbGoQtZXWdavsPzbGIDc5v3VrRTZ0XrIpefC/viZ1ZU9bGEemazyS0catk/3rkOOxpzTfY+XsyQ== + dependencies: + "@ethereumjs/util" "^8.1.0" + bn.js "^5.2.1" + ethereum-bloom-filters "^1.0.6" + ethereum-cryptography "^2.1.2" + ethjs-unit "0.1.6" + number-to-bn "1.7.0" + randombytes "^2.1.0" + utf8 "3.0.0" + web3@1.2.11: version "1.2.11" resolved "https://registry.npmjs.org/web3/-/web3-1.2.11.tgz" @@ -9676,7 +9817,7 @@ webidl-conversions@^3.0.0: resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz" integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== -websocket@^1.0.31, websocket@1.0.32: +websocket@1.0.32, websocket@^1.0.31: version "1.0.32" resolved "https://registry.npmjs.org/websocket/-/websocket-1.0.32.tgz" integrity sha512-i4yhcllSP4wrpoPMU2N0TQ/q0O94LRG/eUQjEAamRltjQ1oT1PFFKOG4i877OlJgCG8rw6LrrowJp+TYCEWF7Q== @@ -9688,8 +9829,10 @@ websocket@^1.0.31, websocket@1.0.32: 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== whatwg-url@^5.0.0: version "5.0.0" @@ -9736,6 +9879,17 @@ which-typed-array@^1.1.11, which-typed-array@^1.1.13: gopd "^1.0.1" has-tostringtag "^1.0.0" +which-typed-array@^1.1.14, which-typed-array@^1.1.15: + version "1.1.15" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.15.tgz#264859e9b11a649b388bfaaf4f767df1f779b38d" + integrity sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA== + dependencies: + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + has-tostringtag "^1.0.2" + which@^1.2.9: version "1.3.1" resolved "https://registry.npmjs.org/which/-/which-1.3.1.tgz" @@ -9782,6 +9936,16 @@ wrappy@1: resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== +ws@7.4.6: + version "7.4.6" + resolved "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz" + integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== + +ws@8.17.1: + version "8.17.1" + resolved "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz" + integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ== + ws@^3.0.0: version "3.3.3" resolved "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz" @@ -9792,7 +9956,9 @@ ws@^3.0.0: ultron "~1.1.0" ws@^5.1.1: - version "5.2.2" + version "5.2.4" + resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.4.tgz#c7bea9f1cfb5f410de50e70e82662e562113f9a7" + integrity sha512-fFCejsuC8f9kOSu9FYaOw8CdO68O3h5v0lg4p74o8JqWpwTf9tniOD+nOB78aWoVSS6WptVUmDrp/KPsMVBWFQ== dependencies: async-limiter "~1.0.0" @@ -9801,16 +9967,6 @@ ws@^7.4.6: resolved "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz" integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== -ws@7.4.6: - version "7.4.6" - resolved "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz" - integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== - -ws@8.17.1: - version "8.17.1" - resolved "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz" - integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ== - xhr-request-promise@^0.1.2: version "0.1.3" resolved "https://registry.npmjs.org/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz" @@ -9831,6 +9987,13 @@ xhr-request@^1.0.1, xhr-request@^1.1.0: url-set-query "^1.0.0" xhr "^2.0.4" +xhr2-cookies@1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz" + integrity sha512-hjXUA6q+jl/bd8ADHcVfFsSPIf+tyLIjuO9TwJC9WI6JP2zKcS7C+p56I9kCLLsaCiNT035iYvEUUzdEFj/8+g== + dependencies: + cookiejar "^2.1.1" + xhr@^2.0.4, xhr@^2.2.0, xhr@^2.3.3: version "2.6.0" resolved "https://registry.npmjs.org/xhr/-/xhr-2.6.0.tgz" @@ -9841,13 +10004,6 @@ xhr@^2.0.4, xhr@^2.2.0, xhr@^2.3.3: parse-headers "^2.0.0" xtend "^4.0.0" -xhr2-cookies@1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz" - integrity sha512-hjXUA6q+jl/bd8ADHcVfFsSPIf+tyLIjuO9TwJC9WI6JP2zKcS7C+p56I9kCLLsaCiNT035iYvEUUzdEFj/8+g== - dependencies: - cookiejar "^2.1.1" - xmlhttprequest@1.8.0: version "1.8.0" resolved "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz" @@ -9880,21 +10036,21 @@ yaeti@^0.0.6: resolved "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz" integrity sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug== -yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3: +yallist@^3.0.0, yallist@^3.0.2, yallist@^3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - yaml@^1.10.2: version "1.10.2" resolved "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== +yargs-parser@20.2.4, yargs-parser@^20.2.2: + version "20.2.4" + resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== + yargs-parser@^2.4.1: version "2.4.1" resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz" @@ -9903,11 +10059,6 @@ yargs-parser@^2.4.1: camelcase "^3.0.0" lodash.assign "^4.0.6" -yargs-parser@^20.2.2, yargs-parser@20.2.4: - version "20.2.4" - resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz" - integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== - yargs-unparser@2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz" @@ -9918,6 +10069,19 @@ yargs-unparser@2.0.0: flat "^5.0.2" is-plain-obj "^2.1.0" +yargs@16.2.0: + version "16.2.0" + resolved "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + yargs@^4.7.1: version "4.8.1" resolved "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz" @@ -9938,27 +10102,19 @@ yargs@^4.7.1: y18n "^3.2.1" yargs-parser "^2.4.1" -yargs@16.2.0: - version "16.2.0" - resolved "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz" - integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== - dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.0" - y18n "^5.0.5" - yargs-parser "^20.2.2" - yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== -zksync-ethers@^5.0.0: - version "5.9.1" - resolved "https://registry.npmjs.org/zksync-ethers/-/zksync-ethers-5.9.1.tgz" - integrity sha512-Y1zxoVxOz1cujw+5RcJVR6rANpX398DVFtUIOkovciltyk1hKetavGmCTA5fCmfqoA074Jjxl6SpX7vrDcUVSg== +zksync-web3@^0.14.3: + version "0.14.4" + resolved "https://registry.yarnpkg.com/zksync-web3/-/zksync-web3-0.14.4.tgz#0b70a7e1a9d45cc57c0971736079185746d46b1f" + integrity sha512-kYehMD/S6Uhe1g434UnaMN+sBr9nQm23Ywn0EUP5BfQCsbjcr3ORuS68PosZw8xUTu3pac7G6YMSnNHk+fwzvg== + +zksync-web3@^0.17.1: + version "0.17.1" + resolved "https://registry.yarnpkg.com/zksync-web3/-/zksync-web3-0.17.1.tgz#809c3b31295c29aae924ec2fe47f87701b539012" + integrity sha512-jMV4gfAQyehkIbNs81i4uvccHLe+XBu/tNPFb0Rm38pXccWY5VXzVE6XWS0dBiHlMfjdfUGn/sxwzJbWZDGYGQ== dependencies: ethers "~5.7.0"