From 95f59c400aa95e8331aa67a7983d391c36207b5b Mon Sep 17 00:00:00 2001 From: aalavandhann <6264334+aalavandhan@users.noreply.github.com> Date: Sun, 28 Apr 2024 11:43:55 -0400 Subject: [PATCH 01/10] updated per-tranche mint cap --- spot-contracts/contracts/PerpetualTranche.sol | 79 ++++++++++++++----- spot-contracts/test/perp/PerpetualTranche.ts | 45 +++++++++-- .../test/perp/PerpetualTranche_deposit.ts | 48 ++++++++--- 3 files changed, 134 insertions(+), 38 deletions(-) diff --git a/spot-contracts/contracts/PerpetualTranche.sol b/spot-contracts/contracts/PerpetualTranche.sol index 7450cddd..12310868 100644 --- a/spot-contracts/contracts/PerpetualTranche.sol +++ b/spot-contracts/contracts/PerpetualTranche.sol @@ -5,7 +5,7 @@ import { IERC20MetadataUpgradeable } from "@openzeppelin/contracts-upgradeable/t import { IERC20Upgradeable, IPerpetualTranche, IBondIssuer, IFeePolicy, IBondController, ITranche } from "./_interfaces/IPerpetualTranche.sol"; import { IRolloverVault } from "./_interfaces/IRolloverVault.sol"; import { TokenAmount, RolloverData, SubscriptionParams } from "./_interfaces/CommonTypes.sol"; -import { UnauthorizedCall, UnauthorizedTransferOut, UnexpectedDecimals, UnexpectedAsset, UnacceptableParams, UnacceptableRollover, ExceededMaxSupply, ExceededMaxMintPerTranche, ReserveCountOverLimit } from "./_interfaces/ProtocolErrors.sol"; +import { UnauthorizedCall, UnauthorizedTransferOut, UnexpectedDecimals, UnexpectedAsset, UnacceptableParams, UnacceptableRollover, ExceededMaxSupply, ExceededMaxMintPerTranche, ReserveCountOverLimit, InvalidPerc } from "./_interfaces/ProtocolErrors.sol"; import { OwnableUpgradeable } from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import { PausableUpgradeable } from "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; @@ -111,6 +111,10 @@ contract PerpetualTranche is uint8 public constant FEE_POLICY_DECIMALS = 8; uint256 public constant FEE_ONE = (10 ** FEE_POLICY_DECIMALS); + /// @dev Internal percentages are fixed point numbers with {PERC_DECIMALS} places. + uint8 public constant PERC_DECIMALS = 8; + uint256 public constant ONE = (10 ** PERC_DECIMALS); // 1.0 or 100% + /// @dev The maximum number of reserve assets that can be held by perp. uint8 public constant MAX_RESERVE_COUNT = 11; @@ -170,11 +174,15 @@ contract PerpetualTranche is /// @notice The maximum supply of perps that can exist at any given time. uint256 public maxSupply; - /// @notice The max number of perps that can be minted using the senior tranche in the minting bond. - uint256 public maxMintAmtPerTranche; + /// @notice Enforced maximum percentage of reserve value in the deposit tranche. + /// @custom:oz-upgrades-renamed-from maxMintAmtPerTranche + uint256 public maxDepositTrancheValuePerc; - /// @notice The total number of perps that have been minted using a given tranche. - mapping(ITranche => uint256) public mintedSupplyPerTranche; + /// @notice DEPRECATED. + /// @dev This used to store the number of perps minted using each deposit tranche. + /// @custom:oz-upgrades-renamed-from mintedSupplyPerTranche + // solhint-disable-next-line var-name-mixedcase + mapping(ITranche => uint256) private _mintedSupplyPerTranche_DEPRECATED; /// @notice DEPRECATED. /// @dev This used to store the discount factor applied on each reserve token. @@ -266,7 +274,8 @@ contract PerpetualTranche is updateBondIssuer(bondIssuer_); updateTolerableTrancheMaturity(1, type(uint256).max); - updateMintingLimits(type(uint256).max, type(uint256).max); + updateMaxSupply(type(uint256).max); + updateMaxDepositTrancheValuePerc(ONE); } //-------------------------------------------------------------------------- @@ -346,12 +355,20 @@ contract PerpetualTranche is _unpause(); } - /// @notice Update parameters controlling the perp token mint limits. + /// @notice Updates the maximum supply. /// @param maxSupply_ New max total supply. - /// @param maxMintAmtPerTranche_ New max total for per tranche in minting bond. - function updateMintingLimits(uint256 maxSupply_, uint256 maxMintAmtPerTranche_) public onlyKeeper { + function updateMaxSupply(uint256 maxSupply_) public onlyKeeper { maxSupply = maxSupply_; - maxMintAmtPerTranche = maxMintAmtPerTranche_; + } + + /// @notice Updates the enforced maximum percentage value of deposit tranches. + /// @dev Stored as a fixed point number with {PERC_DECIMALS} places. + /// @param maxDepositTrancheValuePerc_ New max percentage. + function updateMaxDepositTrancheValuePerc(uint256 maxDepositTrancheValuePerc_) public onlyKeeper { + if (maxDepositTrancheValuePerc_ > ONE) { + revert InvalidPerc(); + } + maxDepositTrancheValuePerc = maxDepositTrancheValuePerc_; } //-------------------------------------------------------------------------- @@ -380,7 +397,6 @@ contract PerpetualTranche is _mint(msg.sender, perpAmtMint); // post-deposit checks - mintedSupplyPerTranche[trancheIn] += perpAmtMint; _enforceMintCaps(trancheIn); return perpAmtMint; @@ -680,9 +696,6 @@ contract PerpetualTranche is } else if (balance <= 0 && inReserve_) { // Removes tranche from reserve set. _reserves.remove(address(token)); - - // Frees up minted supply. - delete mintedSupplyPerTranche[ITranche(address(token))]; } return balance; @@ -887,17 +900,41 @@ contract PerpetualTranche is } /// @dev Enforces the total supply and per tranche mint cap. To be invoked AFTER the mint operation. - function _enforceMintCaps(ITranche trancheIn) private view { - // checks if supply minted using the given tranche is within the cap - if (mintedSupplyPerTranche[trancheIn] > maxMintAmtPerTranche) { - revert ExceededMaxMintPerTranche(); - } - - // checks if new total supply is within the max supply cap + function _enforceMintCaps(ITranche depositTranche) private view { + // Checks if new total supply is within the max supply cap uint256 newSupply = totalSupply(); if (newSupply > maxSupply) { revert ExceededMaxSupply(); } + + // Checks if the value of deposit tranche relative to the other tranches in the reserve + // is no higher than the defined limit. + // + // NOTE: We consider the tranches which are up for rollover and mature collateral (if any), + // to be part of the deposit tranche, as given enough time + // they will be eventually rolled over into the deposit tranche. + IERC20Upgradeable underlying_ = _reserveAt(0); + uint256 totalVal = underlying_.balanceOf(address(this)); + uint256 depositTrancheValue = totalVal; + uint8 reserveCount = uint8(_reserves.length()); + for (uint8 i = 1; i < reserveCount; ++i) { + ITranche tranche = ITranche(address(_reserveAt(i))); + uint256 trancheValue = _computeReserveTrancheValue( + tranche, + IBondController(tranche.bond()), + underlying_, + tranche.balanceOf(address(this)), + true + ); + if (tranche == depositTranche || _isTimeForRollout(tranche)) { + depositTrancheValue += trancheValue; + } + totalVal += trancheValue; + } + uint256 depositTrancheValuePerc = depositTrancheValue.mulDiv(ONE, totalVal); + if (depositTrancheValuePerc > maxDepositTrancheValuePerc) { + revert ExceededMaxMintPerTranche(); + } } /// @dev Fetches the reserve token by index. diff --git a/spot-contracts/test/perp/PerpetualTranche.ts b/spot-contracts/test/perp/PerpetualTranche.ts index 54909b3d..85a48f71 100644 --- a/spot-contracts/test/perp/PerpetualTranche.ts +++ b/spot-contracts/test/perp/PerpetualTranche.ts @@ -15,6 +15,7 @@ import { TimeHelpers, rebase, advancePerpQueueToRollover, + toPercFixedPtAmt, } from "../helpers"; use(smock.matchers); @@ -90,7 +91,7 @@ describe("PerpetualTranche", function () { expect(await perp.minTrancheMaturitySec()).to.eq(1); expect(await perp.maxTrancheMaturitySec()).to.eq(constants.MaxUint256); expect(await perp.maxSupply()).to.eq(constants.MaxUint256); - expect(await perp.maxMintAmtPerTranche()).to.eq(constants.MaxUint256); + expect(await perp.maxDepositTrancheValuePerc()).to.eq(toPercFixedPtAmt("1")); }); it("should NOT be paused", async function () { @@ -327,26 +328,58 @@ describe("PerpetualTranche", function () { }); }); - describe("#updateMintingLimits", function () { + describe("#updateMaxSupply", function () { + let tx: Transaction; + + describe("when triggered by non-keeper", function () { + it("should revert", async function () { + await expect(perp.connect(otherUser).updateMaxSupply(constants.MaxUint256)).to.be.revertedWithCustomError( + perp, + "UnauthorizedCall", + ); + }); + }); + + describe("when triggered by owner", function () { + beforeEach(async function () { + await perp.updateKeeper(await otherUser.getAddress()); + tx = perp.connect(otherUser).updateMaxSupply(toFixedPtAmt("100")); + await tx; + }); + it("should update reference", async function () { + expect(await perp.maxSupply()).to.eq(toFixedPtAmt("100")); + }); + }); + }); + + describe("#updateMaxDepositTrancheValuePerc", function () { let tx: Transaction; describe("when triggered by non-keeper", function () { it("should revert", async function () { await expect( - perp.connect(otherUser).updateMintingLimits(constants.MaxUint256, constants.MaxUint256), + perp.connect(otherUser).updateMaxDepositTrancheValuePerc(toPercFixedPtAmt("0.33")), ).to.be.revertedWithCustomError(perp, "UnauthorizedCall"); }); }); + describe("when invalid perc", function () { + it("should revert", async function () { + await perp.updateKeeper(await otherUser.getAddress()); + await expect( + perp.connect(otherUser).updateMaxDepositTrancheValuePerc(toPercFixedPtAmt("1.01")), + ).to.be.revertedWithCustomError(perp, "InvalidPerc"); + }); + }); + describe("when triggered by owner", function () { beforeEach(async function () { await perp.updateKeeper(await otherUser.getAddress()); - tx = perp.connect(otherUser).updateMintingLimits(toFixedPtAmt("100"), toFixedPtAmt("20")); + tx = perp.connect(otherUser).updateMaxDepositTrancheValuePerc(toPercFixedPtAmt("0.33")); await tx; }); it("should update reference", async function () { - expect(await perp.maxSupply()).to.eq(toFixedPtAmt("100")); - expect(await perp.maxMintAmtPerTranche()).to.eq(toFixedPtAmt("20")); + expect(await perp.maxDepositTrancheValuePerc()).to.eq(toPercFixedPtAmt("0.33")); }); }); }); diff --git a/spot-contracts/test/perp/PerpetualTranche_deposit.ts b/spot-contracts/test/perp/PerpetualTranche_deposit.ts index c6a860be..1b4d68d0 100644 --- a/spot-contracts/test/perp/PerpetualTranche_deposit.ts +++ b/spot-contracts/test/perp/PerpetualTranche_deposit.ts @@ -166,7 +166,7 @@ describe("PerpetualTranche", function () { describe("when the supply cap is exceeded", function () { beforeEach(async function () { - await perp.updateMintingLimits(toFixedPtAmt("499"), toFixedPtAmt("1000")); + await perp.updateMaxSupply(toFixedPtAmt("499")); }); it("should revert", async function () { @@ -180,7 +180,7 @@ describe("PerpetualTranche", function () { describe("when the supply cap is exceeded and existing supply > 0", function () { beforeEach(async function () { await perp.deposit(depositTrancheA.address, toFixedPtAmt("400")); - await perp.updateMintingLimits(toFixedPtAmt("499"), toFixedPtAmt("1000")); + await perp.updateMaxSupply(toFixedPtAmt("499")); }); it("should revert", async function () { @@ -191,29 +191,55 @@ describe("PerpetualTranche", function () { }); }); - describe("when the tranche mint limit is exceeded", function () { + describe("when the existing supply is zero", function () { beforeEach(async function () { - await perp.updateMintingLimits(toFixedPtAmt("1000"), toFixedPtAmt("499")); + await perp.updateMaxDepositTrancheValuePerc(toPercFixedPtAmt("0.5")); }); - - it("should revert", async function () { - await expect(perp.deposit(depositTrancheA.address, toFixedPtAmt("500"))).to.revertedWithCustomError( + it("should not revert", async function () { + await expect(perp.deposit(depositTrancheA.address, toFixedPtAmt("100"))).to.revertedWithCustomError( perp, "ExceededMaxMintPerTranche", ); }); }); + describe("when the tranche mint limit has not exceeded and existing supply > 0", function () { + beforeEach(async function () { + await perp.deposit(depositTrancheA.address, toFixedPtAmt("250")); + await advancePerpQueue(perp, 1200); + await perp.updateMaxDepositTrancheValuePerc(toPercFixedPtAmt("0.5")); + }); + + it("should NOT revert", async function () { + await mintCollteralToken(collateralToken, toFixedPtAmt("50"), deployer); + await collateralToken.transfer(perp.address, toFixedPtAmt("50")); + const newBond = await bondAt(await perp.callStatic.getDepositBond()); + await depositIntoBond(newBond, toFixedPtAmt("2000"), deployer); + const tranches = await getTranches(newBond); + const newTranche = tranches[0]; + await newTranche.approve(perp.address, toFixedPtAmt("500")); + await perp.deposit(newTranche.address, toFixedPtAmt("200")); + await expect(perp.deposit(newTranche.address, toFixedPtAmt("1"))).not.to.reverted; + }); + }); + describe("when the tranche mint limit is exceeded and existing supply > 0", function () { beforeEach(async function () { - await perp.deposit(depositTrancheA.address, toFixedPtAmt("400")); - await perp.updateMintingLimits(toFixedPtAmt("1000"), toFixedPtAmt("499")); + await perp.deposit(depositTrancheA.address, toFixedPtAmt("250")); + await advancePerpQueue(perp, 1200); + await perp.updateMaxDepositTrancheValuePerc(toPercFixedPtAmt("0.5")); }); it("should revert", async function () { - await expect(perp.deposit(depositTrancheA.address, toFixedPtAmt("100"))).to.revertedWithCustomError( + const newBond = await bondAt(await perp.callStatic.getDepositBond()); + await depositIntoBond(newBond, toFixedPtAmt("2000"), deployer); + const tranches = await getTranches(newBond); + const newTranche = tranches[0]; + await newTranche.approve(perp.address, toFixedPtAmt("500")); + await perp.deposit(newTranche.address, toFixedPtAmt("250")); + await expect(perp.deposit(newTranche.address, toFixedPtAmt("1"))).to.revertedWithCustomError( perp, - `ExceededMaxMintPerTranche`, + "ExceededMaxMintPerTranche", ); }); }); From cf4a9745bee5d9616cd31e5a47c07fb68614dd92 Mon Sep 17 00:00:00 2001 From: aalavandhann <6264334+aalavandhan@users.noreply.github.com> Date: Sun, 28 Apr 2024 20:31:31 -0400 Subject: [PATCH 02/10] removed redundant constant --- spot-contracts/contracts/PerpetualTranche.sol | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/spot-contracts/contracts/PerpetualTranche.sol b/spot-contracts/contracts/PerpetualTranche.sol index 12310868..6cb6da78 100644 --- a/spot-contracts/contracts/PerpetualTranche.sol +++ b/spot-contracts/contracts/PerpetualTranche.sol @@ -107,9 +107,6 @@ contract PerpetualTranche is // //------------------------------------------------------------------------- // Constants & Immutables - // Number of decimals for a multiplier of 1.0x (i.e. 100%) - uint8 public constant FEE_POLICY_DECIMALS = 8; - uint256 public constant FEE_ONE = (10 ** FEE_POLICY_DECIMALS); /// @dev Internal percentages are fixed point numbers with {PERC_DECIMALS} places. uint8 public constant PERC_DECIMALS = 8; @@ -305,7 +302,7 @@ contract PerpetualTranche is /// @notice Update the reference to the fee policy contract. /// @param feePolicy_ New strategy address. function updateFeePolicy(IFeePolicy feePolicy_) public onlyOwner { - if (feePolicy_.decimals() != FEE_POLICY_DECIMALS) { + if (feePolicy_.decimals() != PERC_DECIMALS) { revert UnexpectedDecimals(); } feePolicy = feePolicy_; @@ -719,7 +716,7 @@ contract PerpetualTranche is // The mint fees are settled by simply minting fewer perps. if (feePerc > 0) { - perpAmtMint = perpAmtMint.mulDiv(FEE_ONE - feePerc, FEE_ONE); + perpAmtMint = perpAmtMint.mulDiv(ONE - feePerc, ONE); } return perpAmtMint; @@ -746,7 +743,7 @@ contract PerpetualTranche is // The burn fees are settled by simply redeeming for fewer tranches. if (feePerc > 0) { - reserveTokens[i].amount = reserveTokens[i].amount.mulDiv(FEE_ONE - feePerc, FEE_ONE); + reserveTokens[i].amount = reserveTokens[i].amount.mulDiv(ONE - feePerc, ONE); } } @@ -813,12 +810,12 @@ contract PerpetualTranche is // A positive fee percentage implies that perp charges rotators by // offering tranchesOut for a premium, i.e) more tranches in. if (feePerc > 0) { - r.trancheInAmt = r.trancheInAmt.mulDiv(FEE_ONE, FEE_ONE - feePerc.toUint256(), MathUpgradeable.Rounding.Up); + r.trancheInAmt = r.trancheInAmt.mulDiv(ONE, ONE - feePerc.toUint256(), MathUpgradeable.Rounding.Up); } // A negative fee percentage (or a reward) implies that perp pays the rotators by // offering tranchesOut at a discount, i.e) fewer tranches in. else if (feePerc < 0) { - r.trancheInAmt = r.trancheInAmt.mulDiv(FEE_ONE, FEE_ONE + feePerc.abs(), MathUpgradeable.Rounding.Up); + r.trancheInAmt = r.trancheInAmt.mulDiv(ONE, ONE + feePerc.abs(), MathUpgradeable.Rounding.Up); } //----------------------------------------------------------------------------- @@ -835,13 +832,13 @@ contract PerpetualTranche is // accepting tranchesIn at a discount, i.e) fewer tokens out. // This results in perp enrichment. if (feePerc > 0) { - r.tokenOutAmt = r.tokenOutAmt.mulDiv(FEE_ONE - feePerc.abs(), FEE_ONE); + r.tokenOutAmt = r.tokenOutAmt.mulDiv(ONE - feePerc.abs(), ONE); } // A negative fee percentage (or a reward) implies that perp pays the rotators by // accepting tranchesIn at a premium, i.e) more tokens out. // This results in perp debasement. else if (feePerc < 0) { - r.tokenOutAmt = r.tokenOutAmt.mulDiv(FEE_ONE + feePerc.abs(), FEE_ONE); + r.tokenOutAmt = r.tokenOutAmt.mulDiv(ONE + feePerc.abs(), ONE); } } From a06805a531b0b76355cddef1d1ff28cba5b63eec Mon Sep 17 00:00:00 2001 From: aalavandhann <6264334+aalavandhan@users.noreply.github.com> Date: Wed, 22 May 2024 10:32:15 -0700 Subject: [PATCH 03/10] added dr to the spot and vault interface --- spot-contracts/contracts/PerpetualTranche.sol | 12 ++++++++++++ spot-contracts/contracts/RolloverVault.sol | 7 ++++++- .../contracts/_interfaces/IPerpetualTranche.sol | 3 +++ .../contracts/_interfaces/IRolloverVault.sol | 3 +++ 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/spot-contracts/contracts/PerpetualTranche.sol b/spot-contracts/contracts/PerpetualTranche.sol index 6cb6da78..844b0ee2 100644 --- a/spot-contracts/contracts/PerpetualTranche.sol +++ b/spot-contracts/contracts/PerpetualTranche.sol @@ -579,6 +579,18 @@ contract PerpetualTranche is return _computeRolloverAmt(trancheIn, tokenOut, trancheInAmtAvailable); } + /// @inheritdoc IPerpetualTranche + function deviationRatio() external override afterStateUpdate nonReentrant returns (uint256) { + return + feePolicy.computeDeviationRatio( + SubscriptionParams({ + perpTVL: _reserveValue(), + vaultTVL: vault.getTVL(), + seniorTR: _depositBond.getSeniorTrancheRatio() + }) + ); + } + //-------------------------------------------------------------------------- // Public methods diff --git a/spot-contracts/contracts/RolloverVault.sol b/spot-contracts/contracts/RolloverVault.sol index d166993a..4c8d200e 100644 --- a/spot-contracts/contracts/RolloverVault.sol +++ b/spot-contracts/contracts/RolloverVault.sol @@ -521,7 +521,12 @@ contract RolloverVault is } //-------------------------------------------------------------------------- - // External & Public methods + // External & Public compute methods + + /// @inheritdoc IRolloverVault + function deviationRatio() external override nonReentrant returns (uint256) { + return feePolicy.computeDeviationRatio(_querySubscriptionState(perp)); + } /// @inheritdoc IRolloverVault function computeUnderlyingToPerpSwapAmt( diff --git a/spot-contracts/contracts/_interfaces/IPerpetualTranche.sol b/spot-contracts/contracts/_interfaces/IPerpetualTranche.sol index 7d37a4e6..4b64fc01 100644 --- a/spot-contracts/contracts/_interfaces/IPerpetualTranche.sol +++ b/spot-contracts/contracts/_interfaces/IPerpetualTranche.sol @@ -138,4 +138,7 @@ interface IPerpetualTranche is IERC20Upgradeable { /// @notice Updates time dependent storage state. function updateState() external; + + /// @return The system's current deviation ratio. + function deviationRatio() external returns (uint256); } diff --git a/spot-contracts/contracts/_interfaces/IRolloverVault.sol b/spot-contracts/contracts/_interfaces/IRolloverVault.sol index dea92298..0b6c4742 100644 --- a/spot-contracts/contracts/_interfaces/IRolloverVault.sol +++ b/spot-contracts/contracts/_interfaces/IRolloverVault.sol @@ -32,4 +32,7 @@ interface IRolloverVault is IVault { function computePerpToUnderlyingSwapAmt( uint256 perpAmtIn ) external returns (uint256, uint256, SubscriptionParams memory); + + /// @return The system's current deviation ratio. + function deviationRatio() external returns (uint256); } From 4fad289d410b8c2541861d599bd174bb24074310 Mon Sep 17 00:00:00 2001 From: aalavandhann <6264334+aalavandhan@users.noreply.github.com> Date: Wed, 22 May 2024 12:02:38 -0700 Subject: [PATCH 04/10] added mintedSupplyPerTranche cleanup --- spot-contracts/contracts/PerpetualTranche.sol | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spot-contracts/contracts/PerpetualTranche.sol b/spot-contracts/contracts/PerpetualTranche.sol index 844b0ee2..c6d1a9b9 100644 --- a/spot-contracts/contracts/PerpetualTranche.sol +++ b/spot-contracts/contracts/PerpetualTranche.sol @@ -705,6 +705,12 @@ contract PerpetualTranche is } else if (balance <= 0 && inReserve_) { // Removes tranche from reserve set. _reserves.remove(address(token)); + + // Frees up storage slot used by existing tranches in the system. + // NOTE: This variable in the process of being `DEPRECATED`, and the following line + // can be removed once all storage used by all the current tranches are zeroed out + // as they are removed from the reserve. + delete _mintedSupplyPerTranche_DEPRECATED[ITranche(address(token))]; } return balance; From dec67f3b762b2ffc50e0c7ddaa249e2af389ad5e Mon Sep 17 00:00:00 2001 From: aalavandhann <6264334+aalavandhan@users.noreply.github.com> Date: Wed, 22 May 2024 12:17:39 -0700 Subject: [PATCH 05/10] updated rounding --- spot-contracts/contracts/PerpetualTranche.sol | 44 ++++++++++++------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/spot-contracts/contracts/PerpetualTranche.sol b/spot-contracts/contracts/PerpetualTranche.sol index c6d1a9b9..960dfc8e 100644 --- a/spot-contracts/contracts/PerpetualTranche.sol +++ b/spot-contracts/contracts/PerpetualTranche.sol @@ -504,7 +504,14 @@ contract PerpetualTranche is ITranche tranche = ITranche(address(token)); IBondController parentBond = IBondController(tranche.bond()); - return _computeReserveTrancheValue(tranche, parentBond, _reserveAt(0), tranche.balanceOf(address(this)), true); + return + _computeReserveTrancheValue( + tranche, + parentBond, + _reserveAt(0), + tranche.balanceOf(address(this)), + MathUpgradeable.Rounding.Up + ); } /// @inheritdoc IPerpetualTranche @@ -718,7 +725,13 @@ contract PerpetualTranche is /// @dev Computes the fee adjusted perp mint amount for given amount of tranche tokens deposited into the reserve. function _computeMintAmt(ITranche trancheIn, uint256 trancheInAmt) private view returns (uint256) { - uint256 valueIn = _computeReserveTrancheValue(trancheIn, _depositBond, _reserveAt(0), trancheInAmt, false); + uint256 valueIn = _computeReserveTrancheValue( + trancheIn, + _depositBond, + _reserveAt(0), + trancheInAmt, + MathUpgradeable.Rounding.Down + ); //----------------------------------------------------------------------------- // We charge no mint fee when interacting with other callers within the system. @@ -795,7 +808,13 @@ contract PerpetualTranche is // with the same number of decimals. IERC20Upgradeable underlying_ = _reserveAt(0); uint256 unitTokenAmt = (10 ** _decimals); - uint256 trancheInPrice = _computeReserveTrancheValue(trancheIn, _depositBond, underlying_, unitTokenAmt, false); + uint256 trancheInPrice = _computeReserveTrancheValue( + trancheIn, + _depositBond, + underlying_, + unitTokenAmt, + MathUpgradeable.Rounding.Down + ); uint256 tokenOutPrice = unitTokenAmt; if (tokenOut != underlying_) { ITranche trancheOut = ITranche(address(tokenOut)); @@ -804,7 +823,7 @@ contract PerpetualTranche is IBondController(trancheOut.bond()), underlying_, unitTokenAmt, - true + MathUpgradeable.Rounding.Up ); } @@ -939,14 +958,14 @@ contract PerpetualTranche is IBondController(tranche.bond()), underlying_, tranche.balanceOf(address(this)), - true + MathUpgradeable.Rounding.Up ); if (tranche == depositTranche || _isTimeForRollout(tranche)) { depositTrancheValue += trancheValue; } totalVal += trancheValue; } - uint256 depositTrancheValuePerc = depositTrancheValue.mulDiv(ONE, totalVal); + uint256 depositTrancheValuePerc = depositTrancheValue.mulDiv(ONE, totalVal, MathUpgradeable.Rounding.Up); if (depositTrancheValuePerc > maxDepositTrancheValuePerc) { revert ExceededMaxMintPerTranche(); } @@ -976,7 +995,7 @@ contract PerpetualTranche is parentBond, underlying_, tranche.balanceOf(address(this)), - true + MathUpgradeable.Rounding.Up ); } return totalVal; @@ -990,7 +1009,7 @@ contract PerpetualTranche is IBondController parentBond, IERC20Upgradeable collateralToken, uint256 trancheAmt, - bool roundUp + MathUpgradeable.Rounding rounding ) private view returns (uint256) { // NOTE: As an optimization here, we assume that the reserve tranche is immature and has the most senior claim. uint256 parentBondCollateralBalance = collateralToken.balanceOf(address(parentBond)); @@ -998,14 +1017,7 @@ contract PerpetualTranche is uint256 trancheClaim = MathUpgradeable.min(trancheSupply, parentBondCollateralBalance); // Tranche supply is zero (its parent bond has no deposits yet); // the tranche's CDR is assumed 1.0. - return - (trancheSupply > 0) - ? trancheClaim.mulDiv( - trancheAmt, - trancheSupply, - roundUp ? MathUpgradeable.Rounding.Up : MathUpgradeable.Rounding.Down - ) - : trancheAmt; + return (trancheSupply > 0) ? trancheClaim.mulDiv(trancheAmt, trancheSupply, rounding) : trancheAmt; } /// @dev Checks if the given token is the underlying collateral token. From 9cdc695f744029c391241b151466b13d09f03005 Mon Sep 17 00:00:00 2001 From: aalavandhann <6264334+aalavandhan@users.noreply.github.com> Date: Wed, 22 May 2024 14:14:41 -0700 Subject: [PATCH 06/10] updated unit test --- .../test/perp/PerpetualTranche_deposit.ts | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/spot-contracts/test/perp/PerpetualTranche_deposit.ts b/spot-contracts/test/perp/PerpetualTranche_deposit.ts index 1b4d68d0..d42714e9 100644 --- a/spot-contracts/test/perp/PerpetualTranche_deposit.ts +++ b/spot-contracts/test/perp/PerpetualTranche_deposit.ts @@ -212,7 +212,7 @@ describe("PerpetualTranche", function () { it("should NOT revert", async function () { await mintCollteralToken(collateralToken, toFixedPtAmt("50"), deployer); - await collateralToken.transfer(perp.address, toFixedPtAmt("50")); + await collateralToken.transfer(perp.address, toFixedPtAmt("10")); const newBond = await bondAt(await perp.callStatic.getDepositBond()); await depositIntoBond(newBond, toFixedPtAmt("2000"), deployer); const tranches = await getTranches(newBond); @@ -223,6 +223,26 @@ describe("PerpetualTranche", function () { }); }); + describe("when the tranche mint limit has exceeded and existing supply > 0", function () { + beforeEach(async function () { + await perp.deposit(depositTrancheA.address, toFixedPtAmt("250")); + await advancePerpQueue(perp, 1200); + await perp.updateMaxDepositTrancheValuePerc(toPercFixedPtAmt("0.5")); + }); + + it("should revert", async function () { + await mintCollteralToken(collateralToken, toFixedPtAmt("50"), deployer); + await collateralToken.transfer(perp.address, toFixedPtAmt("50")); + const newBond = await bondAt(await perp.callStatic.getDepositBond()); + await depositIntoBond(newBond, toFixedPtAmt("2000"), deployer); + const tranches = await getTranches(newBond); + const newTranche = tranches[0]; + await newTranche.approve(perp.address, toFixedPtAmt("500")); + await perp.deposit(newTranche.address, toFixedPtAmt("200")); + await expect(perp.deposit(newTranche.address, toFixedPtAmt("1"))).to.reverted; + }); + }); + describe("when the tranche mint limit is exceeded and existing supply > 0", function () { beforeEach(async function () { await perp.deposit(depositTrancheA.address, toFixedPtAmt("250")); From 23cf94dd1e720ca3f71c8d72366e43c8bc481304 Mon Sep 17 00:00:00 2001 From: aalavandhann <6264334+aalavandhan@users.noreply.github.com> Date: Fri, 24 May 2024 14:09:12 -0700 Subject: [PATCH 07/10] renamed constants in rollover vault to keep consistant with perp --- spot-contracts/contracts/RolloverVault.sol | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/spot-contracts/contracts/RolloverVault.sol b/spot-contracts/contracts/RolloverVault.sol index 4c8d200e..75970182 100644 --- a/spot-contracts/contracts/RolloverVault.sol +++ b/spot-contracts/contracts/RolloverVault.sol @@ -74,10 +74,6 @@ contract RolloverVault is //------------------------------------------------------------------------- // Constants - /// @dev Number of decimals for a multiplier of 1.0x (i.e. 100%) - uint8 public constant FEE_POLICY_DECIMALS = 8; - uint256 public constant FEE_ONE = (10 ** FEE_POLICY_DECIMALS); - /// @dev Internal percentages are fixed point numbers with {PERC_DECIMALS} places. uint8 public constant PERC_DECIMALS = 8; uint256 public constant ONE = (10 ** PERC_DECIMALS); // 1.0 or 100% @@ -207,7 +203,7 @@ contract RolloverVault is /// @notice Update the reference to the fee policy contract. /// @param feePolicy_ New strategy address. function updateFeePolicy(IFeePolicy feePolicy_) public onlyOwner { - if (feePolicy_.decimals() != FEE_POLICY_DECIMALS) { + if (feePolicy_.decimals() != PERC_DECIMALS) { revert UnexpectedDecimals(); } feePolicy = feePolicy_; @@ -550,10 +546,10 @@ contract RolloverVault is //----------------------------------------------------------------------------- // Calculate perp fee share to be paid by the vault - uint256 perpFeeAmtToBurn = perpAmtOut.mulDiv(perpFeePerc, FEE_ONE, MathUpgradeable.Rounding.Up); + uint256 perpFeeAmtToBurn = perpAmtOut.mulDiv(perpFeePerc, ONE, MathUpgradeable.Rounding.Up); // We deduct fees by transferring out fewer perp tokens - perpAmtOut = perpAmtOut.mulDiv(FEE_ONE - (perpFeePerc + vaultFeePerc), FEE_ONE); + perpAmtOut = perpAmtOut.mulDiv(ONE - (perpFeePerc + vaultFeePerc), ONE); return (perpAmtOut, perpFeeAmtToBurn, s); } @@ -584,10 +580,10 @@ contract RolloverVault is //----------------------------------------------------------------------------- // Calculate perp fee share to be paid by the vault - uint256 perpFeeAmtToBurn = perpAmtIn.mulDiv(perpFeePerc, FEE_ONE, MathUpgradeable.Rounding.Up); + uint256 perpFeeAmtToBurn = perpAmtIn.mulDiv(perpFeePerc, ONE, MathUpgradeable.Rounding.Up); // We deduct fees by transferring out fewer underlying tokens - underlyingAmtOut = underlyingAmtOut.mulDiv(FEE_ONE - (perpFeePerc + vaultFeePerc), FEE_ONE); + underlyingAmtOut = underlyingAmtOut.mulDiv(ONE - (perpFeePerc + vaultFeePerc), ONE); return (underlyingAmtOut, perpFeeAmtToBurn, s); } @@ -608,7 +604,7 @@ contract RolloverVault is : (underlyingAmtIn * INITIAL_RATE); // The mint fees are settled by simply minting fewer vault notes. - notes = notes.mulDiv(FEE_ONE - feePerc, FEE_ONE); + notes = notes.mulDiv(ONE - feePerc, ONE); return notes; } @@ -630,7 +626,7 @@ contract RolloverVault is token: underlying_, amount: underlying_.balanceOf(address(this)).mulDiv(noteAmtBurnt, noteSupply) }); - redemptions[0].amount = redemptions[0].amount.mulDiv(FEE_ONE - feePerc, FEE_ONE); + redemptions[0].amount = redemptions[0].amount.mulDiv(ONE - feePerc, ONE); for (uint8 i = 1; i < assetCount_; ++i) { // tranche token share to be redeemed @@ -641,7 +637,7 @@ contract RolloverVault is }); // deduct redemption fee - redemptions[i].amount = redemptions[i].amount.mulDiv(FEE_ONE - feePerc, FEE_ONE); + redemptions[i].amount = redemptions[i].amount.mulDiv(ONE - feePerc, ONE); // in case the redemption amount is just dust, we skip if (redemptions[i].amount < TRANCHE_DUST_AMT) { From d1794f83f41971e09fcfbc7b5bad600d62e69382 Mon Sep 17 00:00:00 2001 From: Aalavandhan <6264334+aalavandhan@users.noreply.github.com> Date: Thu, 30 May 2024 16:14:42 -0400 Subject: [PATCH 08/10] Bill broker (#203) * bill broker * BB Internal audit fixes (#210) * internal audit fixes * code review fixes * Update spot-vaults/contracts/_interfaces/BillBrokerErrors.sol Co-authored-by: Brandon Iles --------- Co-authored-by: Brandon Iles --------- Co-authored-by: Brandon Iles --- .github/workflows/nightly.yml | 9 + .github/workflows/test.yml | 2 +- .nvmrc | 2 +- package.json | 3 +- spot-vaults/.eslintignore | 4 + spot-vaults/.eslintrc.js | 46 + spot-vaults/.eslintrc.yaml | 0 spot-vaults/.gitignore | 14 + spot-vaults/.prettierignore | 12 + spot-vaults/.prettierrc | 17 + spot-vaults/.solcover.js | 3 + spot-vaults/.solhint.json | 10 + spot-vaults/.solhintignore | 1 + spot-vaults/README.md | 34 + spot-vaults/contracts/BillBroker.sol | 772 ++++ .../_interfaces/BillBrokerErrors.sol | 29 + .../contracts/_interfaces/BillBrokerTypes.sol | 48 + .../IBillBrokerPricingStrategy.sol | 22 + .../contracts/_interfaces/external/IAMPL.sol | 8 + .../_interfaces/external/IAmpleforth.sol | 7 + .../external/IAmpleforthOracle.sol | 8 + .../_interfaces/external/IChainlinkOracle.sol | 17 + .../contracts/_strategies/SpotAppraiser.sol | 221 ++ spot-vaults/contracts/_test/DMock.sol | 52 + spot-vaults/contracts/_test/MockCLOracle.sol | 26 + spot-vaults/contracts/_test/MockERC20.sol | 24 + .../contracts/_test/PerpTestArtifacts.sol | 5 + .../contracts/_test/TrancheTestArtifacts.sol | 8 + .../_test/UFragmentsTestArtifacts.sol | 11 + spot-vaults/hardhat.config.ts | 74 + spot-vaults/package.json | 78 + spot-vaults/test/BillBroker.ts | 579 +++ spot-vaults/test/BillBroker_deposit_redeem.ts | 903 +++++ spot-vaults/test/BillBroker_swap.ts | 1103 ++++++ spot-vaults/test/SpotAppraiser.ts | 242 ++ spot-vaults/test/helpers.ts | 79 + spot-vaults/tsconfig.json | 11 + yarn.lock | 3388 +++++++++++------ 38 files changed, 6772 insertions(+), 1100 deletions(-) create mode 100644 spot-vaults/.eslintignore create mode 100644 spot-vaults/.eslintrc.js create mode 100644 spot-vaults/.eslintrc.yaml create mode 100644 spot-vaults/.gitignore create mode 100644 spot-vaults/.prettierignore create mode 100644 spot-vaults/.prettierrc create mode 100644 spot-vaults/.solcover.js create mode 100644 spot-vaults/.solhint.json create mode 100644 spot-vaults/.solhintignore create mode 100644 spot-vaults/README.md create mode 100644 spot-vaults/contracts/BillBroker.sol create mode 100644 spot-vaults/contracts/_interfaces/BillBrokerErrors.sol create mode 100644 spot-vaults/contracts/_interfaces/BillBrokerTypes.sol create mode 100644 spot-vaults/contracts/_interfaces/IBillBrokerPricingStrategy.sol create mode 100644 spot-vaults/contracts/_interfaces/external/IAMPL.sol create mode 100644 spot-vaults/contracts/_interfaces/external/IAmpleforth.sol create mode 100644 spot-vaults/contracts/_interfaces/external/IAmpleforthOracle.sol create mode 100644 spot-vaults/contracts/_interfaces/external/IChainlinkOracle.sol create mode 100644 spot-vaults/contracts/_strategies/SpotAppraiser.sol create mode 100644 spot-vaults/contracts/_test/DMock.sol create mode 100644 spot-vaults/contracts/_test/MockCLOracle.sol create mode 100644 spot-vaults/contracts/_test/MockERC20.sol create mode 100644 spot-vaults/contracts/_test/PerpTestArtifacts.sol create mode 100644 spot-vaults/contracts/_test/TrancheTestArtifacts.sol create mode 100644 spot-vaults/contracts/_test/UFragmentsTestArtifacts.sol create mode 100644 spot-vaults/hardhat.config.ts create mode 100644 spot-vaults/package.json create mode 100644 spot-vaults/test/BillBroker.ts create mode 100644 spot-vaults/test/BillBroker_deposit_redeem.ts create mode 100644 spot-vaults/test/BillBroker_swap.ts create mode 100644 spot-vaults/test/SpotAppraiser.ts create mode 100644 spot-vaults/test/helpers.ts create mode 100644 spot-vaults/tsconfig.json diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 766ec403..f0ad685c 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -34,3 +34,12 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} path-to-lcov: "./spot-contracts/coverage/lcov.info" + + - name: spot-vaults run coverage + run: yarn workspace @ampleforthorg/spot-vaults run coverage + + - name: spot-vaults report coverage + uses: coverallsapp/github-action@v2.2.3 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + path-to-lcov: "./spot-vaults/coverage/lcov.info" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b4842eae..a52de619 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,7 +4,7 @@ on: push: branches: [main] pull_request: - branches: [main] + branches: [main,dev] jobs: test: diff --git a/.nvmrc b/.nvmrc index b6a7d89c..209e3ef4 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -16 +20 diff --git a/package.json b/package.json index cd67320c..6d18b01c 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "packageManager": "yarn@3.2.1", "workspaces": [ "spot-contracts", - "spot-subgraph" + "spot-subgraph", + "spot-vaults" ] } diff --git a/spot-vaults/.eslintignore b/spot-vaults/.eslintignore new file mode 100644 index 00000000..85f5562a --- /dev/null +++ b/spot-vaults/.eslintignore @@ -0,0 +1,4 @@ +node_modules +artifacts +cache +coverage diff --git a/spot-vaults/.eslintrc.js b/spot-vaults/.eslintrc.js new file mode 100644 index 00000000..a785c8ed --- /dev/null +++ b/spot-vaults/.eslintrc.js @@ -0,0 +1,46 @@ +module.exports = { + env: { + browser: false, + es2021: true, + mocha: true, + node: true, + }, + plugins: ["@typescript-eslint", "no-only-tests", "unused-imports"], + extends: ["standard", "plugin:prettier/recommended", "plugin:node/recommended"], + parser: "@typescript-eslint/parser", + parserOptions: { + ecmaVersion: 12, + warnOnUnsupportedTypeScriptVersion: false, + }, + rules: { + "node/no-unsupported-features/es-syntax": ["error", { ignores: ["modules"] }], + "node/no-missing-import": [ + "error", + { + tryExtensions: [".ts", ".js", ".json"], + }, + ], + "node/no-unpublished-import": [ + "error", + { + allowModules: [ + "hardhat", + "ethers", + "@openzeppelin/upgrades-core", + "chai", + "@nomicfoundation/hardhat-ethers", + "@nomicfoundation/hardhat-chai-matchers", + "@nomicfoundation/hardhat-verify", + "@nomicfoundation/hardhat-toolbox", + "@openzeppelin/hardhat-upgrades", + "solidity-coverage", + "hardhat-gas-reporter", + "dotenv", + ], + }, + ], + "no-only-tests/no-only-tests": "error", + "unused-imports/no-unused-imports": "error", + "unused-imports/no-unused-vars": ["warn", { vars: "all" }], + }, +}; diff --git a/spot-vaults/.eslintrc.yaml b/spot-vaults/.eslintrc.yaml new file mode 100644 index 00000000..e69de29b diff --git a/spot-vaults/.gitignore b/spot-vaults/.gitignore new file mode 100644 index 00000000..9722dbfa --- /dev/null +++ b/spot-vaults/.gitignore @@ -0,0 +1,14 @@ +node_modules +.env + +# Hardhat files +/cache +/artifacts + +# TypeChain files +/typechain +/typechain-types + +# solidity-coverage files +/coverage +/coverage.json diff --git a/spot-vaults/.prettierignore b/spot-vaults/.prettierignore new file mode 100644 index 00000000..ad450725 --- /dev/null +++ b/spot-vaults/.prettierignore @@ -0,0 +1,12 @@ +# folders +artifacts/ +build/ +cache/ +coverage/ +dist/ +lib/ +node_modules/ +typechain/ + +# files +coverage.json diff --git a/spot-vaults/.prettierrc b/spot-vaults/.prettierrc new file mode 100644 index 00000000..46a7cb19 --- /dev/null +++ b/spot-vaults/.prettierrc @@ -0,0 +1,17 @@ +{ + "arrowParens": "avoid", + "bracketSpacing": true, + "endOfLine":"auto", + "printWidth": 90, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "all", + "overrides": [ + { + "files": "*.sol", + "options": { + "tabWidth": 4 + } + } + ] +} diff --git a/spot-vaults/.solcover.js b/spot-vaults/.solcover.js new file mode 100644 index 00000000..081573c5 --- /dev/null +++ b/spot-vaults/.solcover.js @@ -0,0 +1,3 @@ +module.exports = { + skipFiles: ["_test", "_interfaces", "_external"], +}; diff --git a/spot-vaults/.solhint.json b/spot-vaults/.solhint.json new file mode 100644 index 00000000..95267e66 --- /dev/null +++ b/spot-vaults/.solhint.json @@ -0,0 +1,10 @@ +{ + "extends": "solhint:recommended", + "rules": { + "compiler-version": ["error", "^0.8.0"], + "func-visibility": ["warn", { "ignoreConstructors": true }], + "reason-string": ["warn", { "maxLength": 64 }], + "not-rely-on-time": "off", + "max-states-count": ["warn", 17] + } +} diff --git a/spot-vaults/.solhintignore b/spot-vaults/.solhintignore new file mode 100644 index 00000000..3c3629e6 --- /dev/null +++ b/spot-vaults/.solhintignore @@ -0,0 +1 @@ +node_modules diff --git a/spot-vaults/README.md b/spot-vaults/README.md new file mode 100644 index 00000000..ab107d40 --- /dev/null +++ b/spot-vaults/README.md @@ -0,0 +1,34 @@ +# spot-vaults + +This repository is a collection of vault strategies leveraging the SPOT system. + +## Install + +```bash +# Install project dependencies +yarn +``` + +## Testing + +```bash +# Run all unit tests (compatible with node v12+) +yarn test +``` + +## Contribute + +To report bugs within this package, create an issue in this repository. +For security issues, please contact dev-support@ampleforth.org. +When submitting code ensure that it is free of lint errors and has 100% test coverage. + +```bash +# Lint code +yarn lint:fix + +# Run solidity coverage report (compatible with node v12) +yarn coverage + +# Run solidity gas usage report +yarn profile +``` diff --git a/spot-vaults/contracts/BillBroker.sol b/spot-vaults/contracts/BillBroker.sol new file mode 100644 index 00000000..35b852be --- /dev/null +++ b/spot-vaults/contracts/BillBroker.sol @@ -0,0 +1,772 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.24; + +import { OwnableUpgradeable } from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; +import { PausableUpgradeable } from "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; +import { ReentrancyGuardUpgradeable } from "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; +import { MathUpgradeable } from "@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol"; +import { SafeCastUpgradeable } from "@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol"; +import { SignedMathUpgradeable } from "@openzeppelin/contracts-upgradeable/utils/math/SignedMathUpgradeable.sol"; +import { SafeERC20Upgradeable } from "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol"; +import { ERC20BurnableUpgradeable } from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol"; +import { IERC20Upgradeable } from "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; +import { IERC20MetadataUpgradeable } from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol"; + +import { IPerpetualTranche } from "@ampleforthorg/spot-contracts/contracts/_interfaces/IPerpetualTranche.sol"; +import { IBillBrokerPricingStrategy } from "./_interfaces/IBillBrokerPricingStrategy.sol"; +import { ReserveState, Range, Line, BillBrokerFees } from "./_interfaces/BillBrokerTypes.sol"; +import { UnacceptableSwap, UnreliablePrice, UnexpectedDecimals, InvalidPerc, InvalidARBound, SlippageTooHigh, UnauthorizedCall, UnexpectedARDelta } from "./_interfaces/BillBrokerErrors.sol"; + +/** + * @title BillBroker + * + * @notice The `BillBroker` contract (inspired by bill brokers in LombardSt) acts as an intermediary between + * parties who want to borrow and lend. + * + * `BillBroker` LPs deposit perps and dollars as available liquidity into the contract. + * Any user can now sell/buy perps (swap) from the bill broker for dollars, + * at a "fair" exchange rate determined by the contract. + * + * The contract charges a fee for swap operations. + * The fee is a function of available liquidity held in the contract, and goes to the LPs. + * + * The ratio of value of dollar tokens vs perp tokens held by the contract is defined as it's `assetRatio`. + * => `assetRatio` = reserveValue(usd) / reserveValue(perp) + * + * The owner can define hard limits on the system's assetRatio outside which swapping is disabled. + * + * The contract relies on external data sources to price assets. + * If the data is unreliable, swaps are simply halted. + * + * Intermediating borrowing: + * Borrowers who want to borrower dollars against their collateral, + * tranche their collateral, mint perps and sell it for dollars to the bill broker. + * When they want to close out their position they can buy back perps from the bill broker + * using dollars, and redeem their tranches for the original collateral. + * The spread is the "interest rate" paid for the loan, which goes to the bill broker LPs + * who take on the risk of holding perps through the duration of the loan. + * + * Intermediating lending: + * Lenders can buy perps from the bill broker contract when it's under-priced, + * hold the perp tokens until the market price recovers and sell it back to the bill broker contract. + * + * + */ +contract BillBroker is + ERC20BurnableUpgradeable, + OwnableUpgradeable, + PausableUpgradeable, + ReentrancyGuardUpgradeable +{ + //------------------------------------------------------------------------- + // Libraries + + // ERC20 operations + using SafeERC20Upgradeable for IERC20Upgradeable; + using SafeERC20Upgradeable for IPerpetualTranche; + + // Math + using MathUpgradeable for uint256; + using SafeCastUpgradeable for uint256; + using SafeCastUpgradeable for int256; + using SignedMathUpgradeable for int256; + + //------------------------------------------------------------------------- + // Constants & Immutables + + uint256 public constant DECIMALS = 18; + uint256 public constant ONE = (10 ** DECIMALS); + uint256 private constant INITIAL_RATE = 1000000; + + //------------------------------------------------------------------------- + // Storage + + /// @notice The perpetual senior tranche token. + IPerpetualTranche public perp; + + /// @notice The USD token. + IERC20Upgradeable public usd; + + /// @notice The fixed-point amount of usd tokens equivalent to 1.0 usd. + uint256 public usdUnitAmt; + + /// @notice The fixed-point amount of perp tokens equivalent to 1.0 perp. + uint256 public perpUnitAmt; + + /// @notice Reference to the address that has the ability to pause/unpause operations. + /// @dev The keeper is meant for time-sensitive operations, and may be different from the owner address. + /// @return The address of the keeper. + address public keeper; + + /// @notice The pricing strategy. + IBillBrokerPricingStrategy public pricingStrategy; + + /// @notice All of the system fees. + BillBrokerFees public fees; + + /// @notice The asset ratio bounds outside which swapping is disabled. + Range public arHardBound; + + /// @notice The asset ratio bounds outside which swapping is still functional but, + /// the swap fees transition from a flat percentage fee to a linear function. + Range public arSoftBound; + + //-------------------------------------------------------------------------- + // Modifiers + + /// @dev Throws if called by any account other than the keeper. + modifier onlyKeeper() { + if (_msgSender() != keeper) { + revert UnauthorizedCall(); + } + _; + } + + //----------------------------------------------------------------------------- + + /// @custom:oz-upgrades-unsafe-allow constructor + constructor() { + _disableInitializers(); + } + + /// @notice Contract initializer. + /// @param name ERC-20 Name of the Bill broker LP token. + /// @param symbol ERC-20 Symbol of the Bill broker LP token. + /// @param usd_ Address of the usd token. + /// @param perp_ Address of the perp token. + /// @param pricingStrategy_ Address of the pricing strategy contract. + function init( + string memory name, + string memory symbol, + IERC20Upgradeable usd_, + IPerpetualTranche perp_, + IBillBrokerPricingStrategy pricingStrategy_ + ) public initializer { + // initialize dependencies + __ERC20_init(name, symbol); + __ERC20Burnable_init(); + __Ownable_init(); + __Pausable_init(); + __ReentrancyGuard_init(); + + usd = usd_; + perp = perp_; + + usdUnitAmt = 10 ** IERC20MetadataUpgradeable(address(usd_)).decimals(); + perpUnitAmt = 10 ** IERC20MetadataUpgradeable(address(perp_)).decimals(); + + updateKeeper(owner()); + updatePricingStrategy(pricingStrategy_); + updateFees( + BillBrokerFees({ + mintFeePerc: 0, + burnFeePerc: 0, + perpToUSDSwapFeePercs: Range({ lower: ONE, upper: ONE }), + usdToPerpSwapFeePercs: Range({ lower: ONE, upper: ONE }), + protocolSwapSharePerc: 0 + }) + ); + + updateARBounds( + // Soft bound + Range({ lower: 0, upper: type(uint256).max }), + // Hard bound + Range({ lower: 0, upper: type(uint256).max }) + ); + } + + //-------------------------------------------------------------------------- + // Owner only methods + + /// @notice Updates the reference to the keeper. + /// @param keeper_ The address of the new keeper. + function updateKeeper(address keeper_) public onlyOwner { + keeper = keeper_; + } + + /// @notice Updates the reference to the pricing strategy. + /// @param pricingStrategy_ The address of the new pricing strategy. + function updatePricingStrategy( + IBillBrokerPricingStrategy pricingStrategy_ + ) public onlyOwner { + if (pricingStrategy_.decimals() != DECIMALS) { + revert UnexpectedDecimals(); + } + pricingStrategy = pricingStrategy_; + } + + /// @notice Updates the system fees. + /// @param fees_ The new system fees. + function updateFees(BillBrokerFees memory fees_) public onlyOwner { + if ( + fees_.mintFeePerc > ONE || + fees_.burnFeePerc > ONE || + fees_.perpToUSDSwapFeePercs.lower > fees_.perpToUSDSwapFeePercs.upper || + fees_.usdToPerpSwapFeePercs.lower > fees_.usdToPerpSwapFeePercs.upper || + fees_.protocolSwapSharePerc > ONE + ) { + revert InvalidPerc(); + } + + fees = fees_; + } + + /// @notice Updates the hard asset ratio bound. + /// @dev Swaps are made expensive when the system is outside the defined soft bounds, + /// and swaps are disabled when the system is outside the defined hard bounds. + /// @param arSoftBound_ The updated soft bounds. + /// @param arHardBound_ The updated hard bounds. + function updateARBounds( + Range memory arSoftBound_, + Range memory arHardBound_ + ) public onlyOwner { + bool validBounds = (arHardBound_.lower <= arSoftBound_.lower && + arSoftBound_.lower <= arSoftBound_.upper && + arSoftBound_.upper <= arHardBound_.upper); + if (!validBounds) { + revert InvalidARBound(); + } + arSoftBound = arSoftBound_; + arHardBound = arHardBound_; + } + + //-------------------------------------------------------------------------- + // Keeper only methods + + /// @notice Pauses deposits, withdrawals and swaps. + /// @dev ERC-20 functions, like transfers will always remain operational. + function pause() external onlyKeeper { + _pause(); + } + + /// @notice Unpauses deposits, withdrawals and rollovers. + /// @dev ERC-20 functions, like transfers will always remain operational. + function unpause() external onlyKeeper { + _unpause(); + } + + //-------------------------------------------------------------------------- + // External & Public write methods + + /// @notice Deposits usd tokens and perp tokens and mint LP tokens. + /// @param usdAmtMax The amount of usd tokens maximum available to be deposited. + /// @param perpAmtMax The amount of perp tokens maximum available to be deposited. + /// @param usdAmtMin The minimum amount of usd tokens that are expected to be deposited. + /// @param perpAmtMin The minimum amount of perp tokens that are expected to be deposited. + /// @return mintAmt The amount of LP tokens minted. + function deposit( + uint256 usdAmtMax, + uint256 perpAmtMax, + uint256 usdAmtMin, + uint256 perpAmtMin + ) external nonReentrant whenNotPaused returns (uint256 mintAmt) { + uint256 usdAmtIn; + uint256 perpAmtIn; + (mintAmt, usdAmtIn, perpAmtIn) = computeMintAmt(usdAmtMax, perpAmtMax); + if (mintAmt <= 0) { + return 0; + } + if (usdAmtIn < usdAmtMin || perpAmtIn < perpAmtMin) { + revert SlippageTooHigh(); + } + + // Transfer perp and usd tokens from the user + usd.safeTransferFrom(_msgSender(), address(this), usdAmtIn); + perp.safeTransferFrom(_msgSender(), address(this), perpAmtIn); + + // mint LP tokens + _mint(_msgSender(), mintAmt); + } + + /// @notice Burns LP tokens and redeems usd and perp tokens. + /// @param burnAmt The LP tokens to be burnt. + /// @return usdAmtOut The amount usd tokens returned. + /// @return perpAmtOut The amount perp tokens returned. + function redeem( + uint256 burnAmt + ) + external + nonReentrant + whenNotPaused + returns (uint256 usdAmtOut, uint256 perpAmtOut) + { + (usdAmtOut, perpAmtOut) = computeRedemptionAmts(burnAmt); + if (usdAmtOut == 0 && perpAmtOut == 0) { + return (0, 0); + } + + // burn LP tokens + _burn(_msgSender(), burnAmt); + + // return funds + usd.safeTransfer(_msgSender(), usdAmtOut); + perp.safeTransfer(_msgSender(), perpAmtOut); + } + + /// @notice Swaps usd tokens from the user for perp tokens from the reserve. + /// @param usdAmtIn The amount of usd tokens swapped in. + /// @param perpAmtMin The minimum amount of perp tokens that are expected out. + /// @return perpAmtOut The amount perp tokens swapped out. + function swapUSDForPerps( + uint256 usdAmtIn, + uint256 perpAmtMin + ) external nonReentrant whenNotPaused returns (uint256 perpAmtOut) { + // compute perp amount out + uint256 protocolFeePerpAmt; + (perpAmtOut, , protocolFeePerpAmt) = computeUSDToPerpSwapAmt( + usdAmtIn, + reserveState() + ); + if (usdAmtIn <= 0 || perpAmtOut <= 0) { + revert UnacceptableSwap(); + } + if (perpAmtOut < perpAmtMin) { + revert SlippageTooHigh(); + } + + // Transfer usd tokens from user + usd.safeTransferFrom(_msgSender(), address(this), usdAmtIn); + + // settle fees + if (protocolFeePerpAmt > 0) { + perp.safeTransfer(protocolFeeCollector(), protocolFeePerpAmt); + } + + // transfer perps out to the user + perp.safeTransfer(_msgSender(), perpAmtOut); + } + + /// @notice Swaps perp tokens from the user for usd tokens from the reserve. + /// @param perpAmtIn The amount of perp tokens swapped in. + /// @param usdAmtMin The minimum amount of usd tokens that are expected out. + /// @return usdAmtOut The amount usd tokens swapped out. + function swapPerpsForUSD( + uint256 perpAmtIn, + uint256 usdAmtMin + ) external nonReentrant whenNotPaused returns (uint256 usdAmtOut) { + // Compute swap amount + uint256 protocolFeeUsdAmt; + (usdAmtOut, , protocolFeeUsdAmt) = computePerpToUSDSwapAmt( + perpAmtIn, + reserveState() + ); + if (perpAmtIn <= 0 || usdAmtOut <= 0) { + revert UnacceptableSwap(); + } + if (usdAmtOut < usdAmtMin) { + revert SlippageTooHigh(); + } + + // Transfer perp tokens from user + perp.safeTransferFrom(_msgSender(), address(this), perpAmtIn); + + // settle fees + if (protocolFeeUsdAmt > 0) { + usd.safeTransfer(protocolFeeCollector(), protocolFeeUsdAmt); + } + + // transfer usd out to the user + usd.safeTransfer(_msgSender(), usdAmtOut); + } + + //----------------------------------------------------------------------------- + // Public methods + + /// @notice Computes the amount of usd tokens swapped out, + /// when the given number of perp tokens are sent in. + /// @param perpAmtIn The amount of perp tokens swapped in. + /// @return usdAmtOut The amount usd tokens swapped out. + function computePerpToUSDSwapAmt( + uint256 perpAmtIn + ) public returns (uint256 usdAmtOut) { + (usdAmtOut, , ) = computePerpToUSDSwapAmt(perpAmtIn, reserveState()); + } + + /// @notice Computes the amount of perp tokens swapped out, + /// when the given number of usd tokens are sent in. + /// @param usdAmtIn The number of usd tokens sent in. + /// @return perpAmtOut The amount of perp tokens swapped out. + function computeUSDToPerpSwapAmt( + uint256 usdAmtIn + ) public returns (uint256 perpAmtOut) { + (perpAmtOut, , ) = computeUSDToPerpSwapAmt(usdAmtIn, reserveState()); + } + + /// @return s The reserve usd and perp token balances and prices. + function reserveState() public returns (ReserveState memory s) { + return + ReserveState({ + usdBalance: usd.balanceOf(address(this)), + perpBalance: perp.balanceOf(address(this)), + usdPrice: usdPrice(), + perpPrice: perpPrice() + }); + } + + /// @dev Reverts if the pricing strategy returns an invalid price. + /// @return The price of usd tokens from the pricing strategy. + function usdPrice() public returns (uint256) { + (uint256 p, bool v) = pricingStrategy.usdPrice(); + if (!v) { + revert UnreliablePrice(); + } + return p; + } + + /// @dev Reverts if the pricing strategy returns an invalid price. + /// @return The price of perp tokens from the pricing strategy. + function perpPrice() public returns (uint256) { + (uint256 p, bool v) = pricingStrategy.perpPrice(); + if (!v) { + revert UnreliablePrice(); + } + return p; + } + + //----------------------------------------------------------------------------- + // External view methods + + /// @return The balance of usd tokens in the reserve. + function usdBalance() external view returns (uint256) { + return usd.balanceOf(address(this)); + } + + /// @return The balance of perp tokens in the reserve. + function perpBalance() external view returns (uint256) { + return perp.balanceOf(address(this)); + } + + //----------------------------------------------------------------------------- + // Public view methods + + /// @notice Computes the amount of LP tokens minted, + /// when the given number of usd and perp tokens are deposited. + /// @param usdAmtMax The maximum available usd tokens. + /// @param perpAmtMax The maximum available perp tokens. + /// @return mintAmt The amount of LP tokens minted. + /// @return usdAmtIn The usd tokens to be deposited. + /// @return perpAmtIn The perp tokens to be deposited. + function computeMintAmt( + uint256 usdAmtMax, + uint256 perpAmtMax + ) public view returns (uint256 mintAmt, uint256 usdAmtIn, uint256 perpAmtIn) { + if (usdAmtMax <= 0 && perpAmtMax <= 0) { + return (0, 0, 0); + } + + uint256 totalSupply_ = totalSupply(); + // During the initial deposit we deposit the entire available amounts. + // The onus is on the depositor to ensure that the value of USD tokens and + // perp tokens on first deposit are equivalent. + if (totalSupply_ <= 0) { + usdAmtIn = usdAmtMax; + perpAmtIn = perpAmtMax; + mintAmt = (ONE.mulDiv(usdAmtIn, usdUnitAmt) + + ONE.mulDiv(perpAmtIn, perpUnitAmt)); + mintAmt = mintAmt * INITIAL_RATE; + } else { + // Users can deposit assets proportional to the reserve. + uint256 usdBalance_ = usd.balanceOf(address(this)); + uint256 perpBalance_ = perp.balanceOf(address(this)); + if (usdBalance_ == 0) { + usdAmtIn = 0; + perpAmtIn = perpAmtMax; + mintAmt = totalSupply_.mulDiv(perpAmtIn, perpBalance_); + } else if (perpBalance_ == 0) { + perpAmtIn = 0; + usdAmtIn = usdAmtMax; + mintAmt = totalSupply_.mulDiv(usdAmtIn, usdBalance_); + } else { + usdAmtIn = usdAmtMax; + perpAmtIn = perpBalance_.mulDiv(usdAmtIn, usdBalance_); + if (perpAmtIn > perpAmtMax) { + perpAmtIn = perpAmtMax; + usdAmtIn = usdBalance_.mulDiv(perpAmtIn, perpBalance_); + } + mintAmt = totalSupply_.mulDiv(usdAmtIn, usdBalance_); + } + } + + mintAmt = mintAmt.mulDiv(ONE - fees.mintFeePerc, ONE); + } + + /// @notice Computes the amount of usd and perp tokens redeemed, + /// when the given number of LP tokens are burnt. + /// @param burnAmt The amount of LP tokens to be burnt. + /// @return usdAmtOut The amount of usd tokens redeemed. + /// @return perpAmtOut The amount of perp tokens redeemed. + function computeRedemptionAmts( + uint256 burnAmt + ) public view returns (uint256 usdAmtOut, uint256 perpAmtOut) { + if (burnAmt <= 0) { + return (0, 0); + } + + uint256 totalSupply_ = totalSupply(); + usdAmtOut = usd.balanceOf(address(this)).mulDiv(burnAmt, totalSupply_).mulDiv( + ONE - fees.burnFeePerc, + ONE + ); + perpAmtOut = perp.balanceOf(address(this)).mulDiv(burnAmt, totalSupply_).mulDiv( + ONE - fees.burnFeePerc, + ONE + ); + } + + /// @notice Computes the amount of usd tokens swapped out, + /// when the given number of perp tokens are sent in. + /// @param perpAmtIn The number of perp tokens sent in. + /// @param s The current reserve state. + /// @dev Quoted usd token amount out includes the fees withheld. + /// @return usdAmtOut The amount of usd tokens swapped out. + /// @return lpFeeUsdAmt The amount of usd tokens charged as swap fees by LPs. + /// @return protocolFeeUsdAmt The amount of usd tokens charged as protocol fees. + function computePerpToUSDSwapAmt( + uint256 perpAmtIn, + ReserveState memory s + ) + public + view + returns (uint256 usdAmtOut, uint256 lpFeeUsdAmt, uint256 protocolFeeUsdAmt) + { + // We compute equal value of usd tokens out given perp tokens in. + usdAmtOut = perpAmtIn.mulDiv(s.perpPrice, s.usdPrice).mulDiv( + usdUnitAmt, + perpUnitAmt + ); + + // We compute the total fee percentage, lp fees and protocol fees + uint256 totalFeePerc = computePerpToUSDSwapFeePerc( + assetRatio(s), + assetRatio( + ReserveState({ + usdBalance: s.usdBalance - usdAmtOut, + perpBalance: s.perpBalance + perpAmtIn, + usdPrice: s.usdPrice, + perpPrice: s.perpPrice + }) + ) + ); + if (totalFeePerc >= ONE) { + return (0, 0, 0); + } + uint256 totalFeeUsdAmt = usdAmtOut.mulDiv(totalFeePerc, ONE); + usdAmtOut -= totalFeeUsdAmt; + protocolFeeUsdAmt = totalFeeUsdAmt.mulDiv(fees.protocolSwapSharePerc, ONE); + lpFeeUsdAmt = totalFeeUsdAmt - protocolFeeUsdAmt; + } + + /// @notice Computes the amount of perp tokens swapped out, + /// when the given number of usd tokens are sent in. + /// @param usdAmtIn The number of usd tokens sent in. + /// @param s The current reserve state. + /// @dev Quoted perp token amount out includes the fees withheld. + /// @return perpAmtOut The amount of perp tokens swapped out. + /// @return lpFeePerpAmt The amount of perp tokens charged as swap fees by LPs. + /// @return protocolFeePerpAmt The amount of perp tokens charged as protocol fees. + function computeUSDToPerpSwapAmt( + uint256 usdAmtIn, + ReserveState memory s + ) + public + view + returns (uint256 perpAmtOut, uint256 lpFeePerpAmt, uint256 protocolFeePerpAmt) + { + // We compute equal value of perp tokens out given usd tokens in. + perpAmtOut = usdAmtIn.mulDiv(s.usdPrice, s.perpPrice).mulDiv( + perpUnitAmt, + usdUnitAmt + ); + // We compute the total fee percentage, lp fees and protocol fees + uint256 totalFeePerc = computeUSDToPerpSwapFeePerc( + assetRatio(s), + assetRatio( + ReserveState({ + usdBalance: s.usdBalance + usdAmtIn, + perpBalance: s.perpBalance - perpAmtOut, + usdPrice: s.usdPrice, + perpPrice: s.perpPrice + }) + ) + ); + if (totalFeePerc >= ONE) { + return (0, 0, 0); + } + uint256 totalFeePerpAmt = perpAmtOut.mulDiv(totalFeePerc, ONE); + perpAmtOut -= totalFeePerpAmt; + protocolFeePerpAmt = totalFeePerpAmt.mulDiv(fees.protocolSwapSharePerc, ONE); + lpFeePerpAmt = totalFeePerpAmt - protocolFeePerpAmt; + } + + /// @notice Computes the swap fee percentage when swapping from perp to usd tokens. + /// @dev Swapping from perp to usd tokens, leaves the system with more perp and fewer usd tokens + /// thereby decreasing the system's `assetRatio`. Thus arPost < arPre. + /// @param arPre The asset ratio of the system before swapping. + /// @param arPost The asset ratio of the system after swapping. + /// @return The fee percentage. + function computePerpToUSDSwapFeePerc( + uint256 arPre, + uint256 arPost + ) public view returns (uint256) { + if (arPost > arPre) { + revert UnexpectedARDelta(); + } + + // When the ar decreases below the lower bound, + // swaps are effectively halted by setting fees to 100%. + if (arPost < arHardBound.lower) { + return ONE; + } + // When the ar is between the soft and hard bound, a linear function is applied. + // When the ar is above the soft bound, a flat percentage fee is applied. + // + // fee + // ^ + // | + // fh | \ | + // | \ | + // | \ | + // | \ | + // | \ | + // | \ | + // fl | \__________ + // | | + // | | + // | | + // +---------------------------> ar + // arHL arSL 1.0 + // + Range memory swapFeePercs = fees.perpToUSDSwapFeePercs; + return + _computeFeePerc( + Line({ + x1: arHardBound.lower, + y1: swapFeePercs.upper, + x2: arSoftBound.lower, + y2: swapFeePercs.lower + }), + Line({ x1: 0, y1: swapFeePercs.lower, x2: ONE, y2: swapFeePercs.lower }), + arPost, + arPre, + arSoftBound.lower + ); + } + + /// @notice Computes the swap fee percentage when swapping from usd to perp tokens. + /// @dev Swapping from usd to perp tokens, leaves the system with more usd and fewer perp tokens + /// thereby increasing the system's `assetRatio`. Thus arPost > arPre. + /// @param arPre The asset ratio of the system before swapping. + /// @param arPost The asset ratio of the system after swapping. + /// @return The fee percentage. + function computeUSDToPerpSwapFeePerc( + uint256 arPre, + uint256 arPost + ) public view returns (uint256) { + if (arPost < arPre) { + revert UnexpectedARDelta(); + } + + // When the ar increases above the hard bound, + // swaps are effectively halted by setting fees to 100%. + if (arPost > arHardBound.upper) { + return ONE; + } + + // When the ar is between the soft and hard bound, a linear function is applied. + // When the ar is below the soft bound, a flat percentage fee is applied. + // + // fee + // ^ + // | + // fh | | / + // | | / + // | | / + // | | / + // | | / + // | | / + // fl | __________/ + // | | + // | | + // | | + // +---------------------------> ar + // 1.0 arSU arHU + // + Range memory swapFeePercs = fees.usdToPerpSwapFeePercs; + return + _computeFeePerc( + Line({ x1: 0, y1: swapFeePercs.lower, x2: ONE, y2: swapFeePercs.lower }), + Line({ + x1: arSoftBound.upper, + y1: swapFeePercs.lower, + x2: arHardBound.upper, + y2: swapFeePercs.upper + }), + arPre, + arPost, + arSoftBound.upper + ); + } + + /// @param s The system reserve state. + /// @return The computed asset ratio of the system. + function assetRatio(ReserveState memory s) public view returns (uint256) { + return + s.perpBalance > 0 + ? ( + s.usdBalance.mulDiv(s.usdPrice, usdUnitAmt).mulDiv( + ONE, + s.perpBalance.mulDiv(s.perpPrice, perpUnitAmt) + ) + ) + : type(uint256).max; + } + + /// @notice The address which holds any revenue extracted by protocol. + /// @return Address of the fee collector. + function protocolFeeCollector() public view returns (address) { + return owner(); + } + + //----------------------------------------------------------------------------- + // Private methods + + /// @dev The function assumes the fee curve is defined as a pair-wise linear function which merge at the cutoff point. + /// The swap fee is computed as avg height of the fee curve between {arL,arU}. + function _computeFeePerc( + Line memory fn1, + Line memory fn2, + uint256 arL, + uint256 arU, + uint256 cutoff + ) private pure returns (uint256) { + if (arU <= cutoff) { + return _avgY(fn1, arL, arU); + } else if (arL >= cutoff) { + return _avgY(fn2, arL, arU); + } else { + return (_avgY(fn1, arL, cutoff).mulDiv(cutoff - arL, arU - arL) + + _avgY(fn2, cutoff, arU).mulDiv(arU - cutoff, arU - arL)); + } + } + + /// @dev We compute the average height of the line between {xL,xU}. + function _avgY( + Line memory fn, + uint256 xL, + uint256 xU + ) private pure returns (uint256) { + // if the line has a zero slope, return any y + if (fn.y1 == fn.y2) { + return fn.y2; + } + + // m = dlY/dlX + // c = y2 - m . x2 + // Avg height => (yL + yU) / 2 + // => m . ( xL + xU ) / 2 + c + int256 dlY = fn.y2.toInt256() - fn.y1.toInt256(); + int256 dlX = fn.x2.toInt256() - fn.x1.toInt256(); + int256 c = fn.y2.toInt256() - ((fn.x2.toInt256() * dlY) / dlX); + return ((((xL + xU).toInt256() * dlY) / (2 * dlX)) + c).abs(); + } +} diff --git a/spot-vaults/contracts/_interfaces/BillBrokerErrors.sol b/spot-vaults/contracts/_interfaces/BillBrokerErrors.sol new file mode 100644 index 00000000..babbae79 --- /dev/null +++ b/spot-vaults/contracts/_interfaces/BillBrokerErrors.sol @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.24; + +/// @notice Expected contract call to be triggered by authorized caller. +error UnauthorizedCall(); + +/// @notice Expected interface contract to return a fixed point with a different number of decimals. +error UnexpectedDecimals(); + +/// @notice Expected perc value to be at most (1 * 10**DECIMALS), i.e) 1.0 or 100%. +error InvalidPerc(); + +/// @notice Expected Senior CDR bound to be more than 1.0 or 100%. +error InvalidSeniorCDRBound(); + +/// @notice Expect AR lower bound to be under the upper bound. +error InvalidARBound(); + +/// @notice Expected pre and post swap AR delta to be non-increasing or non-decreasing. +error UnexpectedARDelta(); + +/// @notice Slippage higher than tolerance requested by user. +error SlippageTooHigh(); + +/// @notice Expected non-zero swap amounts; +error UnacceptableSwap(); + +/// @notice Expected usable external price. +error UnreliablePrice(); diff --git a/spot-vaults/contracts/_interfaces/BillBrokerTypes.sol b/spot-vaults/contracts/_interfaces/BillBrokerTypes.sol new file mode 100644 index 00000000..d24601ad --- /dev/null +++ b/spot-vaults/contracts/_interfaces/BillBrokerTypes.sol @@ -0,0 +1,48 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.24; + +/// @notice A data structure to define a geometric Line with two points. +struct Line { + /// @notice x-coordinate of the first point. + uint256 x1; + /// @notice y-coordinate of the first point. + uint256 y1; + /// @notice x-coordinate of the second point. + uint256 x2; + /// @notice y-coordinate of the second point. + uint256 y2; +} + +/// @notice A data structure to define a numeric Range. +struct Range { + /// @notice Lower bound of the range. + uint256 lower; + /// @notice Upper bound of the range. + uint256 upper; +} + +/// @notice A data structure to store various fees associated with BillBroker operations. +struct BillBrokerFees { + /// @notice The percentage fee charged for minting BillBroker LP tokens. + uint256 mintFeePerc; + /// @notice The percentage fee charged for burning BillBroker LP tokens. + uint256 burnFeePerc; + /// @notice Range of fee percentages for swapping from perp tokens to USD. + Range perpToUSDSwapFeePercs; + /// @notice Range of fee percentages for swapping from USD to perp tokens. + Range usdToPerpSwapFeePercs; + /// @notice The percentage of the swap fees that goes to the protocol. + uint256 protocolSwapSharePerc; +} + +/// @notice A data structure to represent the BillBroker's reserve state. +struct ReserveState { + /// @notice The reserve USD token balance. + uint256 usdBalance; + /// @notice The reserve perp token balance. + uint256 perpBalance; + /// @notice The price of USD tokens in dollars (or some common denomination). + uint256 usdPrice; + /// @notice The price of perp tokens in dollars (or some common denomination). + uint256 perpPrice; +} diff --git a/spot-vaults/contracts/_interfaces/IBillBrokerPricingStrategy.sol b/spot-vaults/contracts/_interfaces/IBillBrokerPricingStrategy.sol new file mode 100644 index 00000000..0787c298 --- /dev/null +++ b/spot-vaults/contracts/_interfaces/IBillBrokerPricingStrategy.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.24; + +/** + * @title IBillBrokerPricingStrategy + * + * @notice Pricing strategy adapter for a BillBroker vault + * which accepts Perp and USDC tokens. + * + */ +interface IBillBrokerPricingStrategy { + /// @return Number of decimals representing the prices returned. + function decimals() external pure returns (uint8); + + /// @return price The price of USD tokens. + /// @return isValid True if the returned price is valid. + function usdPrice() external returns (uint256 price, bool isValid); + + /// @return price The price of perp tokens. + /// @return isValid True if the returned price is valid. + function perpPrice() external returns (uint256 price, bool isValid); +} diff --git a/spot-vaults/contracts/_interfaces/external/IAMPL.sol b/spot-vaults/contracts/_interfaces/external/IAMPL.sol new file mode 100644 index 00000000..c29afada --- /dev/null +++ b/spot-vaults/contracts/_interfaces/external/IAMPL.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-3.0-or-later +pragma solidity ^0.8.24; +import { IERC20Upgradeable } from "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; +import { IAmpleforth } from "./IAmpleforth.sol"; + +interface IAMPL is IERC20Upgradeable { + function monetaryPolicy() external view returns (IAmpleforth); +} diff --git a/spot-vaults/contracts/_interfaces/external/IAmpleforth.sol b/spot-vaults/contracts/_interfaces/external/IAmpleforth.sol new file mode 100644 index 00000000..d16f307e --- /dev/null +++ b/spot-vaults/contracts/_interfaces/external/IAmpleforth.sol @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: GPL-3.0-or-later +pragma solidity ^0.8.24; +import { IAmpleforthOracle } from "./IAmpleforthOracle.sol"; + +interface IAmpleforth { + function cpiOracle() external view returns (IAmpleforthOracle); +} diff --git a/spot-vaults/contracts/_interfaces/external/IAmpleforthOracle.sol b/spot-vaults/contracts/_interfaces/external/IAmpleforthOracle.sol new file mode 100644 index 00000000..0e78a96d --- /dev/null +++ b/spot-vaults/contracts/_interfaces/external/IAmpleforthOracle.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-3.0-or-later +pragma solidity ^0.8.24; + +interface IAmpleforthOracle { + // solhint-disable-next-line func-name-mixedcase + function DECIMALS() external returns (uint8); + function getData() external returns (uint256, bool); +} diff --git a/spot-vaults/contracts/_interfaces/external/IChainlinkOracle.sol b/spot-vaults/contracts/_interfaces/external/IChainlinkOracle.sol new file mode 100644 index 00000000..07ee0999 --- /dev/null +++ b/spot-vaults/contracts/_interfaces/external/IChainlinkOracle.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-3.0-or-later +pragma solidity ^0.8.24; + +interface IChainlinkOracle { + function decimals() external view returns (uint8); + + function latestRoundData() + external + view + returns ( + uint80 roundId, + int256 answer, + uint256 startedAt, + uint256 updatedAt, + uint80 answeredInRound + ); +} diff --git a/spot-vaults/contracts/_strategies/SpotAppraiser.sol b/spot-vaults/contracts/_strategies/SpotAppraiser.sol new file mode 100644 index 00000000..6b86196f --- /dev/null +++ b/spot-vaults/contracts/_strategies/SpotAppraiser.sol @@ -0,0 +1,221 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.24; + +import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; +import { Math } from "@openzeppelin/contracts/utils/math/Math.sol"; + +import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import { ITranche } from "@ampleforthorg/spot-contracts/contracts/_interfaces/buttonwood/ITranche.sol"; +import { IBondController } from "@ampleforthorg/spot-contracts/contracts/_interfaces/buttonwood/IBondController.sol"; +import { IPerpetualTranche } from "@ampleforthorg/spot-contracts/contracts/_interfaces/IPerpetualTranche.sol"; +import { IChainlinkOracle } from "../_interfaces/external/IChainlinkOracle.sol"; +import { IAmpleforthOracle } from "../_interfaces/external/IAmpleforthOracle.sol"; +import { IBillBrokerPricingStrategy } from "../_interfaces/IBillBrokerPricingStrategy.sol"; +import { InvalidSeniorCDRBound } from "../_interfaces/BillBrokerErrors.sol"; + +/** + * @title SpotAppraiser + * + * @notice Pricing strategy adapter for a BillBroker vault which accepts + * SPOT (as the perp token) and dollar tokens like USDC. + * + * AMPL is the underlying token for SPOT. + * The market price of AMPL is mean reverting and eventually converges to its target. + * However, it can significantly deviate from the target in the near term. + * + * SPOT is a perpetual claim on AMPL senior tranches. Insofar as SPOT is fully backed by + * healthy senior tranches, we can price spot reliably using the following strategy: + * + * SPOT_PRICE = MULTIPLIER * AMPL_TARGET + * MULTIPLIER = spot.getTVL() / spot.totalSupply(), which is it's enrichment/debasement factor. + * To know more, read the spot documentation. + * + * We get the AMPL target price from Ampleforth's CPI oracle, + * which is also used by the protocol to adjust AMPL supply through rebasing. + * + * And the MULTIPLIER is directly queried from the SPOT contract. + * + */ +contract SpotAppraiser is Ownable, IBillBrokerPricingStrategy { + //------------------------------------------------------------------------- + // Libraries + using Math for uint256; + + //------------------------------------------------------------------------- + // Constants & Immutables + + uint256 private constant DECIMALS = 18; + uint256 private constant ONE = (10 ** DECIMALS); + uint256 private constant SPOT_DR_DECIMALS = 8; + uint256 private constant SPOT_DR_ONE = (10 ** SPOT_DR_DECIMALS); + uint256 public constant CL_ORACLE_DECIMALS = 8; + uint256 public constant CL_ORACLE_STALENESS_THRESHOLD_SEC = 3600 * 48; // 2 days + uint256 public constant USD_LOWER_BOUND = (99 * ONE) / 100; // 0.99$ + uint256 public constant AMPL_DUST_AMT = 25000 * (10 ** 9); // 25000 AMPL + + /// @notice Address of the SPOT (perpetual tranche) ERC-20 token contract. + IPerpetualTranche public immutable SPOT; + + /// @notice Address of the AMPL ERC-20 token contract. + IERC20 public immutable AMPL; + + /// @notice Address of the USD token market price oracle. + IChainlinkOracle public immutable USD_ORACLE; + + /// @notice Number of decimals representing the prices returned by the chainlink oracle. + uint256 public immutable USD_ORACLE_DECIMALS; + + /// @notice Address of the Ampleforth CPI oracle. (provides the inflation-adjusted target price for AMPL). + IAmpleforthOracle public immutable AMPL_CPI_ORACLE; + + /// @notice Number of decimals representing the prices returned by the ampleforth oracle. + uint256 public immutable AMPL_CPI_ORACLE_DECIMALS; + + //------------------------------------------------------------------------- + // Storage + + /// @notice The minimum "deviation ratio" of the SPOT outside which it's considered unhealthy. + uint256 public minSPOTDR; + + /// @notice The minimum CDR of senior tranches backing SPOT outside which it's considered unhealthy. + uint256 public minSeniorCDR; + + //----------------------------------------------------------------------------- + // Constructor + + /// @notice Contract constructor. + /// @param spot Address of the SPOT token. + /// @param usdOracle Address of the USD token market price oracle token. + /// @param cpiOracle Address of the Ampleforth CPI oracle. + constructor( + IPerpetualTranche spot, + IChainlinkOracle usdOracle, + IAmpleforthOracle cpiOracle + ) Ownable() { + SPOT = spot; + AMPL = IERC20(address(spot.underlying())); + + USD_ORACLE = usdOracle; + USD_ORACLE_DECIMALS = usdOracle.decimals(); + + AMPL_CPI_ORACLE = cpiOracle; + AMPL_CPI_ORACLE_DECIMALS = cpiOracle.DECIMALS(); + + minSPOTDR = (ONE * 8) / 10; // 0.8 + minSeniorCDR = (ONE * 11) / 10; // 110% + } + + //-------------------------------------------------------------------------- + // Owner only methods + + /// @notice Controls the minimum `deviationRatio` ratio of SPOT below which SPOT is considered unhealthy. + /// @param minSPOTDR_ The minimum SPOT `deviationRatio`. + function updateMinSPOTDR(uint256 minSPOTDR_) external onlyOwner { + minSPOTDR = minSPOTDR_; + } + + /// @notice Controls the minimum CDR of SPOT's senior tranche below which SPOT is considered unhealthy. + /// @param minSeniorCDR_ The minimum senior tranche CDR. + function updateMinPerpCollateralCDR(uint256 minSeniorCDR_) external onlyOwner { + if (minSeniorCDR_ < ONE) { + revert InvalidSeniorCDRBound(); + } + minSeniorCDR = minSeniorCDR_; + } + + //-------------------------------------------------------------------------- + // External methods + + /// @return p The price of the usd token in dollars. + /// @return v True if the price is valid and can be used by downstream consumers. + function usdPrice() external view override returns (uint256, bool) { + (uint256 p, bool v) = _getCLOracleData(USD_ORACLE, USD_ORACLE_DECIMALS); + // If the market price of the USD coin fallen too much below 1$, + // it's an indication of some systemic issue with the USD token + // and thus its price should be considered unreliable. + return (ONE, (v && p > USD_LOWER_BOUND)); + } + + /// @return p The price of the spot token in dollar coins. + /// @return v True if the price is valid and can be used by downstream consumers. + function perpPrice() external override returns (uint256, bool) { + // + // TODO: + // Go through governance to increase the delay time of cpi oracle to 1 week, + // This ensures there's enough time to react to BEA's PCE data issues. + // OR we could store the previous targetPrice in the contract state and ensure + // that is hasn't deviated too much. (TBD) + // + (uint256 targetPrice, bool targetPriceValid) = AMPL_CPI_ORACLE.getData(); + uint256 p = targetPrice.mulDiv(SPOT.getTVL(), SPOT.totalSupply()); + bool v = (targetPriceValid && isSPOTHealthy()); + return (p, v); + } + + /// @return Number of decimals representing a price of 1.0 USD. + function decimals() external pure override returns (uint8) { + return uint8(DECIMALS); + } + + //----------------------------------------------------------------------------- + // Public methods + + /// @return If the spot token is healthy. + function isSPOTHealthy() public returns (bool) { + // If the SPOT's `deviationRatio` is lower than the defined bound + // i.e) it doesn't have enough capital to cover future rollovers, + // we consider it unhealthy. + uint256 spotDR = SPOT.deviationRatio().mulDiv(ONE, SPOT_DR_ONE); + if (spotDR < minSPOTDR) { + return false; + } + + // We compute the CDR of all the senior tranches backing perp. + // If any one of the seniors is mature or has a CDR below below the defined minimum, + // we consider it unhealthy. + // NOTE: Any CDR below 100%, means that the tranche is impaired + // and is roughly equivalent to holding AMPL. + uint8 reserveCount = uint8(SPOT.getReserveCount()); + for (uint8 i = 1; i < reserveCount; i++) { + ITranche tranche = ITranche(address(SPOT.getReserveAt(i))); + IBondController bond = IBondController(tranche.bond()); + if (bond.isMature()) { + return false; + } + uint256 seniorCDR = AMPL.balanceOf(address(bond)).mulDiv( + ONE, + tranche.totalSupply() + ); + if (seniorCDR < minSeniorCDR) { + return false; + } + } + + // If SPOT has ANY raw AMPL as collateral, we consider it unhealthy. + // NOTE: In practice some dust might exist or someone could grief this check + // by transferring some dust AMPL into the spot contract. + // We consider SPOT unhealthy if it has more than `AMPL_DUST_AMT` AMPL. + if (AMPL.balanceOf(address(SPOT)) > AMPL_DUST_AMT) { + return false; + } + + return true; + } + + //----------------------------------------------------------------------------- + // Private methods + + /// @dev Fetches most recent report from the given chain link oracle contract. + /// The data is considered invalid if the latest report is stale. + function _getCLOracleData( + IChainlinkOracle oracle, + uint256 oracleDecimals + ) private view returns (uint256, bool) { + (, int256 p, , uint256 updatedAt, ) = oracle.latestRoundData(); + uint256 price = uint256(p).mulDiv(ONE, 10 ** oracleDecimals); + return ( + price, + (block.timestamp - updatedAt) <= CL_ORACLE_STALENESS_THRESHOLD_SEC + ); + } +} diff --git a/spot-vaults/contracts/_test/DMock.sol b/spot-vaults/contracts/_test/DMock.sol new file mode 100644 index 00000000..ff0cac3b --- /dev/null +++ b/spot-vaults/contracts/_test/DMock.sol @@ -0,0 +1,52 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +contract DMock { + struct MockCall { + bytes data; + bytes returnValue; + } + + // Maps a method signature to its mock call definition + mapping(bytes32 => MockCall) public mockCalls; + + // Fallback function to handle all calls + // solhint-disable-next-line + fallback(bytes calldata) external returns (bytes memory) { + // Check if mock has been defined based on {sig,param} pair + MockCall storage mockCall_ = mockCalls[keccak256(msg.data)]; + + // else check if generic mock has been defined based on sig + if (mockCall_.data.length <= 0) { + mockCall_ = mockCalls[keccak256(abi.encodePacked(bytes4(msg.data)))]; + } + + // solhint-disable-next-line custom-errors + require(mockCall_.data.length > 0, "DMock: method not mocked"); + + // Return the mocked return value + return mockCall_.returnValue; + } + + // Function to set up a mock call, given method sig and parameters + function mockCall(bytes memory data, bytes memory returnValue) public { + mockCalls[keccak256(data)] = MockCall(data, returnValue); + } + + // Function to set up a mock call, given just method sig + function mockMethod(bytes4 sig, bytes memory returnValue) public { + bytes memory data = abi.encodePacked(sig); + mockCalls[keccak256(data)] = MockCall(data, returnValue); + } + + // Function to clear mocked call + function clearMockCall(bytes memory data) public { + delete mockCalls[keccak256(data)]; + } + + // Function to clear mocked method call + function clearMockMethodSig(bytes4 sig) public { + bytes memory data = abi.encodePacked(sig); + delete mockCalls[keccak256(data)]; + } +} diff --git a/spot-vaults/contracts/_test/MockCLOracle.sol b/spot-vaults/contracts/_test/MockCLOracle.sol new file mode 100644 index 00000000..e781a5a0 --- /dev/null +++ b/spot-vaults/contracts/_test/MockCLOracle.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.20; + +import { IChainlinkOracle } from "../_interfaces/external/IChainlinkOracle.sol"; + +contract MockCLOracle is IChainlinkOracle { + int256 private _answer; + uint256 private _reportTime; + + function mockLastRoundData(int256 answer, uint256 reportTime) external { + _answer = answer; + _reportTime = reportTime; + } + + function latestRoundData() + external + view + returns (uint80, int256, uint256, uint256, uint80) + { + return (uint80(0), _answer, 0, _reportTime, uint80(0)); + } + + function decimals() public pure override returns (uint8) { + return 8; + } +} diff --git a/spot-vaults/contracts/_test/MockERC20.sol b/spot-vaults/contracts/_test/MockERC20.sol new file mode 100644 index 00000000..52d8e116 --- /dev/null +++ b/spot-vaults/contracts/_test/MockERC20.sol @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: BUSL-1.1 +pragma solidity ^0.8.20; + +import { ERC20Upgradeable } from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol"; + +contract MockERC20 is ERC20Upgradeable { + uint8 private _decimals; + function init( + string memory name_, + string memory symbol_, + uint8 decimals_ + ) external initializer { + __ERC20_init(name_, symbol_); + _decimals = decimals_; + } + + function mint(address account, uint256 amount) external { + _mint(account, amount); + } + + function decimals() public view override returns (uint8) { + return _decimals; + } +} diff --git a/spot-vaults/contracts/_test/PerpTestArtifacts.sol b/spot-vaults/contracts/_test/PerpTestArtifacts.sol new file mode 100644 index 00000000..88f6d5e9 --- /dev/null +++ b/spot-vaults/contracts/_test/PerpTestArtifacts.sol @@ -0,0 +1,5 @@ +// SPDX-License-Identifier: GPL-3.0-or-later +pragma solidity ^0.8.24; + +// solhint-disable-next-line no-unused-import +import { PerpetualTranche } from "@ampleforthorg/spot-contracts/contracts/PerpetualTranche.sol"; diff --git a/spot-vaults/contracts/_test/TrancheTestArtifacts.sol b/spot-vaults/contracts/_test/TrancheTestArtifacts.sol new file mode 100644 index 00000000..bfbb2cab --- /dev/null +++ b/spot-vaults/contracts/_test/TrancheTestArtifacts.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-3.0-or-later +pragma solidity ^0.8.3; + +// solhint-disable-next-line no-unused-import +import { BondController } from "tranche/contracts/BondController.sol"; + +// solhint-disable-next-line no-unused-import +import { Tranche } from "tranche/contracts/Tranche.sol"; diff --git a/spot-vaults/contracts/_test/UFragmentsTestArtifacts.sol b/spot-vaults/contracts/_test/UFragmentsTestArtifacts.sol new file mode 100644 index 00000000..b4849d4f --- /dev/null +++ b/spot-vaults/contracts/_test/UFragmentsTestArtifacts.sol @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: GPL-3.0-or-later +pragma solidity 0.8.4; + +// solhint-disable-next-line no-unused-import +import { UFragments } from "ampleforth-contracts/contracts/UFragments.sol"; + +// solhint-disable-next-line no-unused-import +import { UFragmentsPolicy } from "ampleforth-contracts/contracts/UFragmentsPolicy.sol"; + +// solhint-disable-next-line no-unused-import +import { MedianOracle } from "ampleforth-contracts/contracts/MedianOracle.sol"; diff --git a/spot-vaults/hardhat.config.ts b/spot-vaults/hardhat.config.ts new file mode 100644 index 00000000..aa7afc0c --- /dev/null +++ b/spot-vaults/hardhat.config.ts @@ -0,0 +1,74 @@ +import { HardhatUserConfig } from "hardhat/config"; +import { Wallet } from "ethers"; + +import "@nomicfoundation/hardhat-ethers"; +import "@nomicfoundation/hardhat-chai-matchers"; +import "@nomicfoundation/hardhat-verify"; +import "@openzeppelin/hardhat-upgrades"; +import "solidity-coverage"; +import "hardhat-gas-reporter"; + +// Loads env variables from .env file +import * as dotenv from "dotenv"; +dotenv.config(); + +export default { + networks: { + hardhat: { + initialBaseFeePerGas: 0, + accounts: { + mnemonic: Wallet.createRandom().mnemonic.phrase, + }, + }, + ganache: { + url: "http://127.0.0.1:8545", + chainId: 1337, + }, + sepolia: { + url: `https://eth-sepolia.g.alchemy.com/v2/${process.env.ALCHEMY_SECRET}`, + accounts: { + mnemonic: process.env.PROD_MNEMONIC || Wallet.createRandom().mnemonic.phrase, + }, + gasMultiplier: 1.01, + }, + mainnet: { + url: `https://eth-mainnet.g.alchemy.com/v2/${process.env.ALCHEMY_SECRET}`, + accounts: { + mnemonic: process.env.PROD_MNEMONIC || Wallet.createRandom().mnemonic.phrase, + }, + gasMultiplier: 1.005, + }, + }, + solidity: { + compilers: [ + { + version: "0.8.3", + }, + { + version: "0.8.4", + }, + { + version: "0.8.24", + settings: { + optimizer: { + enabled: true, + runs: 750, + }, + }, + }, + ], + }, + gasReporter: { + currency: "USD", + enabled: !!process.env.REPORT_GAS, + excludeContracts: ["_test/"], + coinmarketcap: process.env.COINMARKETCAP_API_KEY, + }, + etherscan: { + apiKey: process.env.ETHERSCAN_API_KEY, + }, + mocha: { + bail: false, + timeout: 100000000, + }, +} as HardhatUserConfig; diff --git a/spot-vaults/package.json b/spot-vaults/package.json new file mode 100644 index 00000000..0904cf3c --- /dev/null +++ b/spot-vaults/package.json @@ -0,0 +1,78 @@ +{ + "name": "@ampleforthorg/spot-vaults", + "packageManager": "yarn@3.2.1", + "scripts": { + "compile": "yarn hardhat compile", + "coverage": "yarn hardhat coverage --testfiles 'test/*.ts test/**/*.ts'", + "lint": "yarn run lint:sol && yarn run lint:ts && yarn run prettier:list-different", + "lint:fix": "yarn run prettier && yarn run lint:sol:fix && yarn run lint:ts:fix", + "lint:sol": "solhint --config ./.solhint.json --max-warnings 0 \"contracts/**/*.sol\"", + "lint:sol:fix": "solhint --config ./.solhint.json --fix --max-warnings 1 \"contracts/**/*.sol\"", + "lint:ts": "eslint --config ./.eslintrc.yaml --ignore-path ./.eslintignore --ext .js,.ts .", + "lint:ts:fix": "eslint --config ./.eslintrc.yaml --fix --ignore-path ./.eslintignore --ext .js,.ts .", + "prettier": "prettier --config .prettierrc --write \"**/*.{js,json,md,sol,ts}\"", + "prettier:list-different": "prettier --config .prettierrc --list-different \"**/*.{js,json,md,sol,ts}\"", + "profile": "REPORT_GAS=true yarn hardhat test test/*.ts test/**/*.ts", + "test": "yarn hardhat test test/*.ts test/**/*.ts" + }, + "dependencies": { + "@ampleforthorg/spot-contracts": "workspaces:*", + "@openzeppelin/contracts": "4.9.6", + "@openzeppelin/contracts-upgradeable": "4.7.3", + "ampleforth-contracts": "https://github.com/ampleforth/ampleforth-contracts#master", + "tranche": "https://github.com/buttonwood-protocol/tranche.git" + }, + "devDependencies": { + "@ethersproject/abi": "^5.6.4", + "@ethersproject/abstract-provider": "^5.7.0", + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/bytes": "^5.6.1", + "@ethersproject/providers": "^5.6.8", + "@nomicfoundation/hardhat-chai-matchers": "latest", + "@nomicfoundation/hardhat-ethers": "^3.0.0", + "@nomicfoundation/hardhat-ignition-ethers": "^0.15.0", + "@nomicfoundation/hardhat-network-helpers": "^1.0.0", + "@nomicfoundation/hardhat-toolbox": "latest", + "@nomicfoundation/hardhat-verify": "latest", + "@nomiclabs/hardhat-waffle": "^2.0.6", + "@openzeppelin/hardhat-upgrades": "^3.0.4", + "@openzeppelin/upgrades-core": "latest", + "@typechain/ethers-v6": "^0.5.1", + "@typechain/hardhat": "^6.1.2", + "@types/chai": "^4.3.1", + "@types/mocha": "^9.1.1", + "@types/node": "^18.6.1", + "@types/sinon-chai": "^3.2.12", + "@typescript-eslint/eslint-plugin": "^5.0.0", + "@typescript-eslint/parser": "^5.0.0", + "chai": "^4.3.6", + "dotenv": "^16.0.1", + "eslint": "^8.20.0", + "eslint-config-prettier": "^8.5.0", + "eslint-config-standard": "^17.0.0", + "eslint-plugin-import": "^2.26.0", + "eslint-plugin-n": "^15.2.4", + "eslint-plugin-no-only-tests": "^3.1.0", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-promise": "^6.0.0", + "eslint-plugin-unused-imports": "^3.0.0", + "ethereum-waffle": "latest", + "ethers": "^6.6.0", + "ethers-v5": "npm:ethers@^5.7.0", + "ganache-cli": "latest", + "hardhat": "^2.22.1", + "hardhat-gas-reporter": "latest", + "lodash": "^4.17.21", + "prettier": "^2.7.1", + "prettier-plugin-solidity": "^1.0.0-dev.23", + "solhint": "^3.3.7", + "solidity-coverage": "^0.8.5", + "ts-node": "^10.9.1", + "typechain": "^8.1.0", + "typescript": "^4.7.4" + }, + "engines": { + "node": ">=20" + } +} diff --git a/spot-vaults/test/BillBroker.ts b/spot-vaults/test/BillBroker.ts new file mode 100644 index 00000000..cd7d942c --- /dev/null +++ b/spot-vaults/test/BillBroker.ts @@ -0,0 +1,579 @@ +import { ethers, upgrades } from "hardhat"; +import { loadFixture } from "@nomicfoundation/hardhat-toolbox/network-helpers"; +import { expect } from "chai"; +import { DMock, usdFP, perpFP, percentageFP, priceFP } from "./helpers"; + +describe("BillBroker", function () { + async function setupContracts() { + const accounts = await ethers.getSigners(); + const deployer = accounts[0]; + + const Token = await ethers.getContractFactory("MockERC20"); + const usd = await Token.deploy(); + await usd.init("USD token", "usd", 6); + const perp = await Token.deploy(); + await perp.init("Perp token", "perp", 9); + const pricingStrategy = new DMock("SpotAppraiser"); + await pricingStrategy.deploy(); + await pricingStrategy.mockMethod("decimals()", [18]); + await pricingStrategy.mockMethod("perpPrice()", [0, false]); + await pricingStrategy.mockMethod("usdPrice()", [0, false]); + + const BillBroker = await ethers.getContractFactory("BillBroker"); + const billBroker = await upgrades.deployProxy( + BillBroker.connect(deployer), + ["BillBroker LP", "LP token", usd.target, perp.target, pricingStrategy.target], + { + initializer: "init(string,string,address,address,address)", + }, + ); + return { deployer, usd, perp, pricingStrategy, billBroker }; + } + + describe("init", function () { + it("should set initial values", async function () { + const { deployer, billBroker, usd, pricingStrategy } = await loadFixture( + setupContracts, + ); + expect(await billBroker.usd()).to.eq(usd.target); + expect(await billBroker.pricingStrategy()).to.eq(pricingStrategy.target); + expect(await billBroker.usdUnitAmt()).to.eq(usdFP("1")); + expect(await billBroker.perpUnitAmt()).to.eq(perpFP("1")); + + expect(await billBroker.owner()).to.eq(await deployer.getAddress()); + expect(await billBroker.keeper()).to.eq(await deployer.getAddress()); + + const arHardBound = await billBroker.arHardBound(); + expect(arHardBound.upper).to.eq(ethers.MaxUint256); + expect(arHardBound.lower).to.eq(0n); + + const arSoftBound = await billBroker.arSoftBound(); + expect(arSoftBound.upper).to.eq(ethers.MaxUint256); + expect(arSoftBound.lower).to.eq(0n); + + const fees = await billBroker.fees(); + expect(fees.mintFeePerc).to.eq(0); + expect(fees.burnFeePerc).to.eq(0); + expect(fees.perpToUSDSwapFeePercs.lower).to.eq(percentageFP("1")); + expect(fees.perpToUSDSwapFeePercs.upper).to.eq(percentageFP("1")); + expect(fees.usdToPerpSwapFeePercs.lower).to.eq(percentageFP("1")); + expect(fees.usdToPerpSwapFeePercs.upper).to.eq(percentageFP("1")); + expect(fees.protocolSwapSharePerc).to.eq(0); + + expect(await billBroker.usdBalance()).to.eq(0n); + expect(await billBroker.perpBalance()).to.eq(0n); + }); + }); + + describe("#updateKeeper", function () { + describe("when triggered by non-owner", function () { + it("should revert", async function () { + const { billBroker } = await loadFixture(setupContracts); + await billBroker.renounceOwnership(); + await expect(billBroker.updateKeeper(ethers.ZeroAddress)).to.be.revertedWith( + "Ownable: caller is not the owner", + ); + }); + }); + + describe("when set address is valid", function () { + it("should update reference", async function () { + const { billBroker } = await loadFixture(setupContracts); + await billBroker.updateKeeper(billBroker.target); + expect(await billBroker.keeper()).to.eq(billBroker.target); + }); + }); + }); + + describe("#updatePricingStrategy", function () { + describe("when triggered by non-owner", function () { + it("should revert", async function () { + const { billBroker } = await loadFixture(setupContracts); + await billBroker.renounceOwnership(); + await expect( + billBroker.updatePricingStrategy(ethers.ZeroAddress), + ).to.be.revertedWith("Ownable: caller is not the owner"); + }); + }); + + describe("when pricing strategy is not valid", function () { + it("should revert", async function () { + const { billBroker } = await loadFixture(setupContracts); + const pricingStrategy = new DMock("SpotAppraiser"); + await pricingStrategy.deploy(); + await pricingStrategy.mockMethod("decimals()", [17]); + await expect( + billBroker.updatePricingStrategy(pricingStrategy.target), + ).to.be.revertedWithCustomError(billBroker, "UnexpectedDecimals"); + }); + it("should revert", async function () { + const { billBroker } = await loadFixture(setupContracts); + const pricingStrategy = new DMock("SpotAppraiser"); + await pricingStrategy.deploy(); + await pricingStrategy.mockMethod("decimals()", [18]); + + await billBroker.updatePricingStrategy(pricingStrategy.target); + expect(await billBroker.pricingStrategy()).to.eq(pricingStrategy.target); + }); + }); + }); + + describe("#updateFees", function () { + let fees: any; + beforeEach(async function () { + fees = { + mintFeePerc: percentageFP("0.005"), + burnFeePerc: percentageFP("0.025"), + perpToUSDSwapFeePercs: { + lower: percentageFP("0.01"), + upper: percentageFP("0.1"), + }, + usdToPerpSwapFeePercs: { + lower: percentageFP("0.02"), + upper: percentageFP("0.2"), + }, + protocolSwapSharePerc: percentageFP("0.05"), + }; + }); + + describe("when triggered by non-owner", function () { + it("should revert", async function () { + const { billBroker } = await loadFixture(setupContracts); + await billBroker.renounceOwnership(); + await expect(billBroker.updateFees(fees)).to.be.revertedWith( + "Ownable: caller is not the owner", + ); + }); + }); + + describe("when parameters are invalid", function () { + it("should revert", async function () { + const { billBroker } = await loadFixture(setupContracts); + fees.mintFeePerc = percentageFP("1.01"); + await expect(billBroker.updateFees(fees)).to.be.revertedWithCustomError( + billBroker, + "InvalidPerc", + ); + }); + }); + + describe("when parameters are invalid", function () { + it("should revert", async function () { + const { billBroker } = await loadFixture(setupContracts); + fees.burnFeePerc = percentageFP("1.01"); + await expect(billBroker.updateFees(fees)).to.be.revertedWithCustomError( + billBroker, + "InvalidPerc", + ); + }); + it("should revert", async function () { + const { billBroker } = await loadFixture(setupContracts); + fees.perpToUSDSwapFeePercs.lower = percentageFP("0.2"); + fees.perpToUSDSwapFeePercs.upper = percentageFP("0.1"); + await expect(billBroker.updateFees(fees)).to.be.revertedWithCustomError( + billBroker, + "InvalidPerc", + ); + }); + it("should revert", async function () { + const { billBroker } = await loadFixture(setupContracts); + fees.usdToPerpSwapFeePercs.lower = percentageFP("0.2"); + fees.usdToPerpSwapFeePercs.upper = percentageFP("0.1"); + await expect(billBroker.updateFees(fees)).to.be.revertedWithCustomError( + billBroker, + "InvalidPerc", + ); + }); + it("should revert", async function () { + const { billBroker } = await loadFixture(setupContracts); + fees.protocolSwapSharePerc = percentageFP("1.01"); + await expect(billBroker.updateFees(fees)).to.be.revertedWithCustomError( + billBroker, + "InvalidPerc", + ); + }); + }); + + describe("when parameters are valid", function () { + it("should update fees", async function () { + const { billBroker } = await loadFixture(setupContracts); + await billBroker.updateFees(fees); + const f = await billBroker.fees(); + expect(f.mintFeePerc).to.eq(fees.mintFeePerc); + expect(f.burnFeePerc).to.eq(fees.burnFeePerc); + expect(f.perpToUSDSwapFeePercs.lower).to.eq(fees.perpToUSDSwapFeePercs.lower); + expect(f.perpToUSDSwapFeePercs.upper).to.eq(fees.perpToUSDSwapFeePercs.upper); + expect(f.usdToPerpSwapFeePercs.lower).to.eq(fees.usdToPerpSwapFeePercs.lower); + expect(f.usdToPerpSwapFeePercs.upper).to.eq(fees.usdToPerpSwapFeePercs.upper); + expect(f.protocolSwapSharePerc).to.eq(fees.protocolSwapSharePerc); + }); + }); + }); + + describe("#updateARBounds", function () { + describe("when triggered by non-owner", function () { + it("should revert", async function () { + const { billBroker } = await loadFixture(setupContracts); + await billBroker.renounceOwnership(); + await expect( + billBroker.updateARBounds( + [percentageFP("0.9"), percentageFP("1.1")], + [percentageFP("0.8"), percentageFP("1.2")], + ), + ).to.be.revertedWith("Ownable: caller is not the owner"); + }); + }); + + describe("when parameters are not valid", function () { + it("should revert", async function () { + const { billBroker } = await loadFixture(setupContracts); + await expect( + billBroker.updateARBounds( + [percentageFP("1.1"), percentageFP("1.0")], + [percentageFP("0.8"), percentageFP("1.2")], + ), + ).to.be.revertedWithCustomError(billBroker, "InvalidARBound"); + }); + + it("should revert", async function () { + const { billBroker } = await loadFixture(setupContracts); + await expect( + billBroker.updateARBounds( + [percentageFP("0.9"), percentageFP("1.1")], + [percentageFP("1.2"), percentageFP("0.8")], + ), + ).to.be.revertedWithCustomError(billBroker, "InvalidARBound"); + }); + + it("should revert", async function () { + const { billBroker } = await loadFixture(setupContracts); + await expect( + billBroker.updateARBounds( + [percentageFP("0.9"), percentageFP("0.8")], + [percentageFP("1.1"), percentageFP("1.2")], + ), + ).to.be.revertedWithCustomError(billBroker, "InvalidARBound"); + }); + + it("should revert", async function () { + const { billBroker } = await loadFixture(setupContracts); + await expect( + billBroker.updateARBounds( + [percentageFP("0.8"), percentageFP("1.2")], + [percentageFP("0.9"), percentageFP("1.1")], + ), + ).to.be.revertedWithCustomError(billBroker, "InvalidARBound"); + }); + }); + + describe("when parameters are valid", function () { + it("should update bound", async function () { + const { billBroker } = await loadFixture(setupContracts); + await billBroker.updateARBounds( + [percentageFP("0.9"), percentageFP("1.1")], + [percentageFP("0.8"), percentageFP("1.2")], + ); + const b1 = await billBroker.arSoftBound(); + expect(b1.lower).to.eq(percentageFP("0.9")); + expect(b1.upper).to.eq(percentageFP("1.1")); + + const b2 = await billBroker.arHardBound(); + expect(b2.lower).to.eq(percentageFP("0.8")); + expect(b2.upper).to.eq(percentageFP("1.2")); + }); + }); + }); + + describe("#pause", function () { + describe("when triggered by non-keeper", function () { + it("should revert", async function () { + const { billBroker } = await loadFixture(setupContracts); + await billBroker.updateKeeper(ethers.ZeroAddress); + await expect(billBroker.pause()).to.be.revertedWithCustomError( + billBroker, + "UnauthorizedCall", + ); + }); + }); + + describe("when already paused", function () { + it("should revert", async function () { + const { billBroker } = await loadFixture(setupContracts); + await billBroker.pause(); + await expect(billBroker.pause()).to.be.revertedWith("Pausable: paused"); + }); + }); + + describe("when valid", function () { + it("should pause", async function () { + const { billBroker } = await loadFixture(setupContracts); + await billBroker.pause(); + expect(await billBroker.paused()).to.eq(true); + }); + }); + }); + + describe("#unpause", function () { + describe("when triggered by non-keeper", function () { + it("should revert", async function () { + const { billBroker } = await loadFixture(setupContracts); + await billBroker.pause(); + await billBroker.updateKeeper(ethers.ZeroAddress); + await expect(billBroker.unpause()).to.be.revertedWithCustomError( + billBroker, + "UnauthorizedCall", + ); + }); + }); + + describe("when not paused", function () { + it("should revert", async function () { + const { billBroker } = await loadFixture(setupContracts); + await expect(billBroker.unpause()).to.be.revertedWith("Pausable: not paused"); + }); + }); + + describe("when valid", function () { + it("should unpause", async function () { + const { billBroker } = await loadFixture(setupContracts); + await billBroker.pause(); + await billBroker.unpause(); + expect(await billBroker.paused()).to.eq(false); + }); + }); + }); + + describe("#usdPrice", function () { + describe("when the price is invalid", function () { + it("should revert", async function () { + const { billBroker, pricingStrategy } = await loadFixture(setupContracts); + await pricingStrategy.mockMethod("usdPrice()", [priceFP("1"), false]); + await expect(billBroker.usdPrice()).to.be.revertedWithCustomError( + billBroker, + "UnreliablePrice", + ); + }); + }); + + describe("when the price is valid", function () { + it("should return strategy price", async function () { + const { billBroker, pricingStrategy } = await loadFixture(setupContracts); + await pricingStrategy.mockMethod("usdPrice()", [priceFP("1.001"), true]); + expect(await billBroker.usdPrice.staticCall()).to.eq(priceFP("1.001")); + }); + }); + }); + + describe("#perpPrice", function () { + describe("when the price is invalid", function () { + it("should revert", async function () { + const { billBroker, pricingStrategy } = await loadFixture(setupContracts); + await pricingStrategy.mockMethod("perpPrice()", [priceFP("1.17"), false]); + await expect(billBroker.perpPrice()).to.be.revertedWithCustomError( + billBroker, + "UnreliablePrice", + ); + }); + }); + + describe("when the price is valid", function () { + it("should return strategy price", async function () { + const { billBroker, pricingStrategy } = await loadFixture(setupContracts); + await pricingStrategy.mockMethod("perpPrice()", [priceFP("1.17"), true]); + expect(await billBroker.perpPrice.staticCall()).to.eq(priceFP("1.17")); + }); + }); + }); + + describe("#usdBalance", function () { + it("should return the reserve balance", async function () { + const { billBroker, usd } = await loadFixture(setupContracts); + await usd.mint(billBroker.target, usdFP("1246")); + expect(await billBroker.usdBalance()).to.eq(usdFP("1246")); + }); + }); + + describe("#perpBalance", function () { + it("should return the reserve balance", async function () { + const { billBroker, perp } = await loadFixture(setupContracts); + await perp.mint(billBroker.target, perpFP("999")); + expect(await billBroker.perpBalance()).to.eq(perpFP("999")); + }); + }); + + describe("#reserveState", function () { + it("should return the reserve state", async function () { + const { billBroker, perp, usd, pricingStrategy } = await loadFixture( + setupContracts, + ); + await usd.mint(billBroker.target, usdFP("115")); + await perp.mint(billBroker.target, perpFP("100")); + await pricingStrategy.mockMethod("usdPrice()", [priceFP("1"), true]); + await pricingStrategy.mockMethod("perpPrice()", [priceFP("1.3"), true]); + const r = { + usdBalance: await billBroker.usdBalance(), + perpBalance: await billBroker.perpBalance(), + usdPrice: await billBroker.usdPrice.staticCall(), + perpPrice: await billBroker.perpPrice.staticCall(), + }; + expect(r.usdBalance).to.eq(usdFP("115")); + expect(r.perpBalance).to.eq(perpFP("100")); + expect(r.usdPrice).to.eq(priceFP("1")); + expect(r.perpPrice).to.eq(priceFP("1.3")); + }); + }); + + describe("#computeUSDToPerpSwapFeePerc", function () { + it("should compute the right fee perc", async function () { + const { billBroker } = await loadFixture(setupContracts); + await billBroker.updateARBounds( + [percentageFP("0.75"), percentageFP("1.25")], + [percentageFP("0.5"), percentageFP("1.5")], + ); + + await billBroker.updateFees({ + mintFeePerc: 0n, + burnFeePerc: 0n, + perpToUSDSwapFeePercs: { + lower: 0n, + upper: 0n, + }, + usdToPerpSwapFeePercs: { + lower: percentageFP("0.05"), + upper: percentageFP("1.5"), + }, + protocolSwapSharePerc: 0n, + }); + + await expect( + billBroker.computeUSDToPerpSwapFeePerc(percentageFP("1.5"), percentageFP("0.5")), + ).to.be.revertedWithCustomError(billBroker, "UnexpectedARDelta"); + await expect( + billBroker.computeUSDToPerpSwapFeePerc( + percentageFP("1.25"), + percentageFP("1.249"), + ), + ).to.be.revertedWithCustomError(billBroker, "UnexpectedARDelta"); + + expect( + await billBroker.computeUSDToPerpSwapFeePerc( + percentageFP("0.25"), + percentageFP("1.2"), + ), + ).to.eq(percentageFP("0.05")); + expect( + await billBroker.computeUSDToPerpSwapFeePerc( + percentageFP("0.25"), + percentageFP("1.25"), + ), + ).to.eq(percentageFP("0.05")); + expect( + await billBroker.computeUSDToPerpSwapFeePerc( + percentageFP("1.2"), + percentageFP("1.3"), + ), + ).to.eq(percentageFP("0.1225")); + expect( + await billBroker.computeUSDToPerpSwapFeePerc( + percentageFP("1.3"), + percentageFP("1.45"), + ), + ).to.eq(percentageFP("0.775")); + expect( + await billBroker.computeUSDToPerpSwapFeePerc( + percentageFP("1.3"), + percentageFP("1.5"), + ), + ).to.eq(percentageFP("0.92")); + expect( + await billBroker.computeUSDToPerpSwapFeePerc( + percentageFP("0.5"), + percentageFP("1.5"), + ), + ).to.eq(percentageFP("0.23125")); + expect( + await billBroker.computeUSDToPerpSwapFeePerc( + percentageFP("1.3"), + percentageFP("1.501"), + ), + ).to.eq(percentageFP("1")); + expect( + await billBroker.computeUSDToPerpSwapFeePerc( + percentageFP("1.3"), + percentageFP("2"), + ), + ).to.eq(percentageFP("1")); + }); + }); + + describe("#computePerpToUSDSwapFeePerc", function () { + it("should compute the right fee perc", async function () { + const { billBroker } = await loadFixture(setupContracts); + await billBroker.updateARBounds( + [percentageFP("0.75"), percentageFP("1.25")], + [percentageFP("0.5"), percentageFP("1.5")], + ); + + await billBroker.updateFees({ + mintFeePerc: 0n, + burnFeePerc: 0n, + perpToUSDSwapFeePercs: { + lower: percentageFP("0.1"), + upper: percentageFP("0.5"), + }, + usdToPerpSwapFeePercs: { + lower: 0n, + upper: 0n, + }, + protocolSwapSharePerc: 0n, + }); + + await expect( + billBroker.computePerpToUSDSwapFeePerc(percentageFP("0.5"), percentageFP("1.5")), + ).to.be.revertedWithCustomError(billBroker, "UnexpectedARDelta"); + await expect( + billBroker.computePerpToUSDSwapFeePerc( + percentageFP("1.25"), + percentageFP("1.251"), + ), + ).to.be.revertedWithCustomError(billBroker, "UnexpectedARDelta"); + + expect( + await billBroker.computePerpToUSDSwapFeePerc( + percentageFP("2"), + percentageFP("0.8"), + ), + ).to.eq(percentageFP("0.1")); + expect( + await billBroker.computePerpToUSDSwapFeePerc( + percentageFP("1.45"), + percentageFP("0.8"), + ), + ).to.eq(percentageFP("0.1")); + expect( + await billBroker.computePerpToUSDSwapFeePerc( + percentageFP("0.8"), + percentageFP("0.7"), + ), + ).to.eq(percentageFP("0.12")); + expect( + await billBroker.computePerpToUSDSwapFeePerc( + percentageFP("0.8"), + percentageFP("0.5"), + ), + ).to.eq(percentageFP("0.266666666666666666")); + expect( + await billBroker.computePerpToUSDSwapFeePerc( + percentageFP("1.5"), + percentageFP("0.5"), + ), + ).to.eq(percentageFP("0.15")); + expect( + await billBroker.computePerpToUSDSwapFeePerc( + percentageFP("1.0"), + percentageFP("0.49"), + ), + ).to.eq(percentageFP("1")); + }); + }); +}); diff --git a/spot-vaults/test/BillBroker_deposit_redeem.ts b/spot-vaults/test/BillBroker_deposit_redeem.ts new file mode 100644 index 00000000..535b3362 --- /dev/null +++ b/spot-vaults/test/BillBroker_deposit_redeem.ts @@ -0,0 +1,903 @@ +import { ethers, upgrades } from "hardhat"; +import { loadFixture } from "@nomicfoundation/hardhat-toolbox/network-helpers"; +import { expect } from "chai"; +import { DMock, usdFP, perpFP, lpAmtFP, percentageFP, priceFP } from "./helpers"; + +describe("BillBroker", function () { + async function setupContracts() { + const accounts = await ethers.getSigners(); + const deployer = accounts[0]; + const otherUser = accounts[1]; + + const Token = await ethers.getContractFactory("MockERC20"); + const usd = await Token.deploy(); + await usd.init("USD token", "usd", 6); + const perp = await Token.deploy(); + await perp.init("Perp token", "perp", 9); + const pricingStrategy = new DMock("SpotAppraiser"); + await pricingStrategy.deploy(); + await pricingStrategy.mockMethod("decimals()", [18]); + await pricingStrategy.mockMethod("perpPrice()", [priceFP("1.15"), true]); + await pricingStrategy.mockMethod("usdPrice()", [priceFP("1"), true]); + + const BillBroker = await ethers.getContractFactory("BillBroker"); + const billBroker = await upgrades.deployProxy( + BillBroker.connect(deployer), + ["BillBroker LP", "LP token", usd.target, perp.target, pricingStrategy.target], + { + initializer: "init(string,string,address,address,address)", + }, + ); + await billBroker.updateFees({ + mintFeePerc: 0n, + burnFeePerc: 0n, + perpToUSDSwapFeePercs: { + lower: 0n, + upper: 0n, + }, + usdToPerpSwapFeePercs: { + lower: 0n, + upper: 0n, + }, + protocolSwapSharePerc: 0n, + }); + await usd.mint(await deployer.getAddress(), usdFP("2000")); + await perp.mint(await deployer.getAddress(), perpFP("2000")); + await usd.mint(await otherUser.getAddress(), usdFP("2000")); + await perp.mint(await otherUser.getAddress(), perpFP("2000")); + return { deployer, otherUser, usd, perp, pricingStrategy, billBroker }; + } + + describe("#computeMintAmt", function () { + describe("when amounts available are zero", function () { + it("should return zero", async function () { + const { billBroker } = await loadFixture(setupContracts); + const r = await billBroker.computeMintAmt.staticCall(0n, 0n); + expect(r[0]).to.eq(0n); + expect(r[1]).to.eq(0n); + expect(r[2]).to.eq(0n); + }); + }); + + describe("first mint", function () { + it("should compute mint amount", async function () { + const { billBroker } = await loadFixture(setupContracts); + const r = await billBroker.computeMintAmt.staticCall(usdFP("115"), perpFP("100")); + expect(r[0]).to.eq(lpAmtFP("215")); + expect(r[1]).to.eq(usdFP("115")); + expect(r[2]).to.eq(perpFP("100")); + }); + }); + + describe("when supply > 0 and minting in the right ratio", function () { + it("should compute mint amount", async function () { + const { billBroker, usd, perp } = await loadFixture(setupContracts); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.deposit( + usdFP("115"), + perpFP("100"), + usdFP("115"), + perpFP("100"), + ); + const r = await billBroker.computeMintAmt.staticCall(usdFP("230"), perpFP("200")); + expect(r[0]).to.eq(lpAmtFP("430")); + expect(r[1]).to.eq(usdFP("230")); + expect(r[2]).to.eq(perpFP("200")); + }); + }); + + describe("when supply > 0 and minting ratio is different", function () { + it("should compute mint amount", async function () { + const { billBroker, usd, perp } = await loadFixture(setupContracts); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.deposit( + usdFP("115"), + perpFP("100"), + usdFP("115"), + perpFP("100"), + ); + const r = await billBroker.computeMintAmt.staticCall(usdFP("230"), perpFP("100")); + expect(r[0]).to.eq(lpAmtFP("215")); + expect(r[1]).to.eq(usdFP("115")); + expect(r[2]).to.eq(perpFP("100")); + }); + }); + + describe("when supply > 0 and minting ratio is different", function () { + it("should compute mint amount", async function () { + const { billBroker, usd, perp } = await loadFixture(setupContracts); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.deposit( + usdFP("115"), + perpFP("100"), + usdFP("115"), + perpFP("100"), + ); + const r = await billBroker.computeMintAmt.staticCall(usdFP("50"), perpFP("100")); + expect(r[0]).to.eq(lpAmtFP("93.478260869565217391304347")); + expect(r[1]).to.eq(usdFP("50")); + expect(r[2]).to.eq(perpFP("43.478260869")); + }); + }); + + describe("when fee > 0", async function () { + it("should compute mint amount", async function () { + const { billBroker, usd, perp } = await loadFixture(setupContracts); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.deposit( + usdFP("115"), + perpFP("100"), + usdFP("115"), + perpFP("100"), + ); + await billBroker.updateFees({ + mintFeePerc: percentageFP("0.1"), + burnFeePerc: 0n, + perpToUSDSwapFeePercs: { + lower: 0n, + upper: 0n, + }, + usdToPerpSwapFeePercs: { + lower: 0n, + upper: 0n, + }, + protocolSwapSharePerc: 0n, + }); + const r = await billBroker.computeMintAmt.staticCall(usdFP("115"), perpFP("100")); + expect(r[0]).to.eq(lpAmtFP("193.5")); + expect(r[1]).to.eq(usdFP("115")); + expect(r[2]).to.eq(perpFP("100")); + }); + }); + + describe("when the pool has only usd", function () { + it("should compute mint amount", async function () { + const { billBroker, usd, perp } = await loadFixture(setupContracts); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.deposit( + usdFP("115"), + perpFP("100"), + usdFP("115"), + perpFP("100"), + ); + + await usd.approve(billBroker.target, usdFP("115")); + await billBroker.swapUSDForPerps(usdFP("115"), 0n); + expect(await perp.balanceOf(billBroker.target)).to.eq(0n); + + const s = await billBroker.reserveState.staticCall(); + expect( + await billBroker.assetRatio({ + usdBalance: s[0], + perpBalance: s[1], + usdPrice: s[2], + perpPrice: s[3], + }), + ).to.eq(ethers.MaxUint256); + + const r = await billBroker.computeMintAmt.staticCall(usdFP("100"), 0n); + expect(r[0]).to.eq(lpAmtFP("93.478260869565217391304347")); + expect(r[1]).to.eq(usdFP("100")); + expect(r[2]).to.eq(0n); + }); + }); + + describe("when the pool has only perps", function () { + it("should compute mint amount", async function () { + const { billBroker, usd, perp } = await loadFixture(setupContracts); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.deposit( + usdFP("115"), + perpFP("100"), + usdFP("115"), + perpFP("100"), + ); + + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.swapPerpsForUSD(perpFP("100"), 0n); + expect(await usd.balanceOf(billBroker.target)).to.eq(0n); + + const s = await billBroker.reserveState.staticCall(); + expect( + await billBroker.assetRatio({ + usdBalance: s[0], + perpBalance: s[1], + usdPrice: s[2], + perpPrice: s[3], + }), + ).to.eq(0); + + const r = await billBroker.computeMintAmt.staticCall(0n, perpFP("100")); + expect(r[0]).to.eq(lpAmtFP("107.5")); + expect(r[1]).to.eq(0n); + expect(r[2]).to.eq(perpFP("100")); + }); + }); + }); + + describe("#deposit", function () { + describe("when paused", function () { + it("should revert", async function () { + const { billBroker } = await loadFixture(setupContracts); + await billBroker.pause(); + await expect( + billBroker.deposit(usdFP("115"), perpFP("100"), usdFP("115"), perpFP("100")), + ).to.be.reverted; + }); + }); + + describe("when amounts available are zero", function () { + it("should return zero", async function () { + const { billBroker } = await loadFixture(setupContracts); + const r = await billBroker.deposit.staticCall(0n, 0n, 0n, 0n); + expect(r).to.eq(0n); + }); + }); + + describe("when slippage is too high", function () { + it("should revert", async function () { + const { billBroker, usd, perp } = await loadFixture(setupContracts); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.deposit( + usdFP("115"), + perpFP("100"), + usdFP("115"), + perpFP("100"), + ); + await expect( + billBroker.deposit(usdFP("100"), perpFP("100"), usdFP("120"), perpFP("100")), + ).to.be.revertedWithCustomError(billBroker, "SlippageTooHigh"); + }); + + it("should revert", async function () { + const { billBroker, usd, perp } = await loadFixture(setupContracts); + await usd.approve(billBroker.target, usdFP("100")); + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.deposit( + usdFP("100"), + perpFP("100"), + usdFP("100"), + perpFP("100"), + ); + await expect( + billBroker.deposit(usdFP("100"), perpFP("115"), usdFP("100"), perpFP("115")), + ).to.be.revertedWithCustomError(billBroker, "SlippageTooHigh"); + }); + }); + + describe("first deposit", function () { + it("should transfer usd from user", async function () { + const { billBroker, usd, perp, deployer } = await loadFixture(setupContracts); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await expect(() => + billBroker.deposit(usdFP("115"), perpFP("100"), usdFP("115"), perpFP("100")), + ).to.changeTokenBalance(usd, deployer, usdFP("-115")); + }); + + it("should transfer perps from user", async function () { + const { billBroker, usd, perp, deployer } = await loadFixture(setupContracts); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await expect(() => + billBroker.deposit(usdFP("115"), perpFP("100"), usdFP("115"), perpFP("100")), + ).to.changeTokenBalance(perp, deployer, perpFP("-100")); + }); + + it("should mint lp tokens", async function () { + const { billBroker, usd, perp, deployer } = await loadFixture(setupContracts); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await expect(() => + billBroker.deposit(usdFP("115"), perpFP("100"), usdFP("115"), perpFP("100")), + ).to.changeTokenBalance(billBroker, deployer, lpAmtFP("215")); + expect(await billBroker.totalSupply()).to.eq(lpAmtFP("215")); + }); + + it("should return mint amount", async function () { + const { billBroker, usd, perp } = await loadFixture(setupContracts); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + const r = await billBroker.deposit.staticCall( + usdFP("115"), + perpFP("100"), + usdFP("115"), + perpFP("100"), + ); + expect(r).to.eq(lpAmtFP("215")); + }); + }); + + describe("subsequent deposits", function () { + it("should transfer usd from user", async function () { + const { billBroker, usd, perp, otherUser } = await loadFixture(setupContracts); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.deposit( + usdFP("115"), + perpFP("100"), + usdFP("115"), + perpFP("100"), + ); + await usd.connect(otherUser).approve(billBroker.target, usdFP("100")); + await perp.connect(otherUser).approve(billBroker.target, perpFP("100")); + await expect(() => + billBroker + .connect(otherUser) + .deposit(usdFP("23"), perpFP("100"), usdFP("20"), perpFP("20")), + ).to.changeTokenBalance(usd, otherUser, usdFP("-23")); + }); + + it("should transfer perps from user", async function () { + const { billBroker, usd, perp, otherUser } = await loadFixture(setupContracts); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.deposit( + usdFP("115"), + perpFP("100"), + usdFP("115"), + perpFP("100"), + ); + await usd.connect(otherUser).approve(billBroker.target, usdFP("100")); + await perp.connect(otherUser).approve(billBroker.target, perpFP("100")); + await expect(() => + billBroker + .connect(otherUser) + .deposit(usdFP("23"), perpFP("100"), usdFP("20"), perpFP("20")), + ).to.changeTokenBalance(perp, otherUser, perpFP("-20")); + }); + + it("should mint lp tokens", async function () { + const { billBroker, usd, perp, otherUser } = await loadFixture(setupContracts); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.deposit( + usdFP("115"), + perpFP("100"), + usdFP("115"), + perpFP("100"), + ); + await usd.connect(otherUser).approve(billBroker.target, usdFP("100")); + await perp.connect(otherUser).approve(billBroker.target, perpFP("100")); + await expect(() => + billBroker + .connect(otherUser) + .deposit(usdFP("23"), perpFP("100"), usdFP("20"), perpFP("20")), + ).to.changeTokenBalance(billBroker, otherUser, lpAmtFP("43")); + expect(await billBroker.totalSupply()).to.eq(lpAmtFP("258")); + }); + + it("should return mint amount", async function () { + const { billBroker, usd, perp, otherUser } = await loadFixture(setupContracts); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.deposit( + usdFP("115"), + perpFP("100"), + usdFP("115"), + perpFP("100"), + ); + await usd.connect(otherUser).approve(billBroker.target, usdFP("100")); + await perp.connect(otherUser).approve(billBroker.target, perpFP("100")); + const r = await billBroker + .connect(otherUser) + .deposit.staticCall(usdFP("23"), perpFP("100"), usdFP("20"), perpFP("20")); + expect(r).to.eq(lpAmtFP("43")); + }); + }); + + describe("when fee > 0", function () { + it("should withhold fees and mint lp tokens", async function () { + const { billBroker, usd, perp, deployer } = await loadFixture(setupContracts); + await billBroker.updateFees({ + mintFeePerc: percentageFP("0.1"), + burnFeePerc: 0n, + perpToUSDSwapFeePercs: { + lower: 0n, + upper: 0n, + }, + usdToPerpSwapFeePercs: { + lower: 0n, + upper: 0n, + }, + protocolSwapSharePerc: 0n, + }); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await expect(() => + billBroker.deposit(usdFP("115"), perpFP("100"), usdFP("115"), perpFP("100")), + ).to.changeTokenBalance(billBroker, deployer, lpAmtFP("193.5")); + }); + }); + + describe("when the pool has only usd", function () { + it("should mint lp tokens", async function () { + const { billBroker, usd, perp, deployer } = await loadFixture(setupContracts); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.deposit( + usdFP("115"), + perpFP("100"), + usdFP("115"), + perpFP("100"), + ); + + await usd.approve(billBroker.target, usdFP("115")); + await billBroker.swapUSDForPerps(usdFP("115"), 0n); + expect(await perp.balanceOf(billBroker.target)).to.eq(0n); + + const s = await billBroker.reserveState.staticCall(); + expect( + await billBroker.assetRatio({ + usdBalance: s[0], + perpBalance: s[1], + usdPrice: s[2], + perpPrice: s[3], + }), + ).to.eq(ethers.MaxUint256); + + await usd.approve(billBroker.target, usdFP("115")); + await expect(() => + billBroker.deposit(usdFP("100"), 0n, usdFP("100"), 0n), + ).to.changeTokenBalance( + billBroker, + deployer, + lpAmtFP("93.478260869565217391304347"), + ); + }); + }); + + describe("when the pool has only perps", function () { + it("should mint lp tokens", async function () { + const { billBroker, usd, perp, deployer } = await loadFixture(setupContracts); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.deposit( + usdFP("115"), + perpFP("100"), + usdFP("115"), + perpFP("100"), + ); + + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.swapPerpsForUSD(perpFP("100"), 0n); + expect(await usd.balanceOf(billBroker.target)).to.eq(0n); + + const s = await billBroker.reserveState.staticCall(); + expect( + await billBroker.assetRatio({ + usdBalance: s[0], + perpBalance: s[1], + usdPrice: s[2], + perpPrice: s[3], + }), + ).to.eq(0); + + await perp.approve(billBroker.target, perpFP("100")); + await expect(() => + billBroker.deposit(usdFP("100"), perpFP("100"), 0n, perpFP("100")), + ).to.changeTokenBalance(billBroker, deployer, lpAmtFP("107.5")); + }); + }); + }); + + describe("#computeRedemptionAmts", function () { + describe("when burn amount is zero", function () { + it("should return zero", async function () { + const { billBroker } = await loadFixture(setupContracts); + const r = await billBroker.computeRedemptionAmts.staticCall(0n); + expect(r[0]).to.eq(0n); + expect(r[1]).to.eq(0n); + }); + }); + + describe("when supply is zero", function () { + it("should revert", async function () { + const { billBroker } = await loadFixture(setupContracts); + await expect(billBroker.computeRedemptionAmts.staticCall(lpAmtFP("100"))).to.be + .reverted; + }); + }); + + describe("when redeeming partial supply", function () { + it("should return redemption amounts", async function () { + const { billBroker, usd, perp } = await loadFixture(setupContracts); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.deposit( + usdFP("115"), + perpFP("100"), + usdFP("115"), + perpFP("100"), + ); + const r = await billBroker.computeRedemptionAmts.staticCall(lpAmtFP("100")); + expect(r[0]).to.eq(usdFP("53.488372")); + expect(r[1]).to.eq(perpFP("46.511627906")); + }); + }); + + describe("when redeeming entire supply", function () { + it("should return redemption amounts", async function () { + const { billBroker, usd, perp } = await loadFixture(setupContracts); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.deposit( + usdFP("115"), + perpFP("100"), + usdFP("115"), + perpFP("100"), + ); + const r = await billBroker.computeRedemptionAmts.staticCall(lpAmtFP("215")); + expect(r[0]).to.eq(usdFP("115")); + expect(r[1]).to.eq(perpFP("100")); + }); + }); + + describe("when fee is zero", function () { + it("should withhold and return redemption amounts", async function () { + const { billBroker, usd, perp } = await loadFixture(setupContracts); + await billBroker.updateFees({ + mintFeePerc: 0n, + burnFeePerc: percentageFP("0.1"), + perpToUSDSwapFeePercs: { + lower: 0n, + upper: 0n, + }, + usdToPerpSwapFeePercs: { + lower: 0n, + upper: 0n, + }, + protocolSwapSharePerc: 0n, + }); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.deposit( + usdFP("115"), + perpFP("100"), + usdFP("115"), + perpFP("100"), + ); + const r = await billBroker.computeRedemptionAmts.staticCall(lpAmtFP("215")); + expect(r[0]).to.eq(usdFP("103.5")); + expect(r[1]).to.eq(perpFP("90")); + }); + }); + + describe("when the pool has only usd", function () { + it("should return redemption amounts", async function () { + const { billBroker, usd, perp } = await loadFixture(setupContracts); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.deposit( + usdFP("115"), + perpFP("100"), + usdFP("115"), + perpFP("100"), + ); + + await usd.approve(billBroker.target, usdFP("115")); + await billBroker.swapUSDForPerps(usdFP("115"), 0n); + expect(await perp.balanceOf(billBroker.target)).to.eq(0n); + + const s = await billBroker.reserveState.staticCall(); + expect( + await billBroker.assetRatio({ + usdBalance: s[0], + perpBalance: s[1], + usdPrice: s[2], + perpPrice: s[3], + }), + ).to.eq(ethers.MaxUint256); + + const r = await billBroker.computeRedemptionAmts.staticCall(lpAmtFP("100")); + expect(r[0]).to.eq(usdFP("106.976744")); + expect(r[1]).to.eq(0n); + }); + }); + + describe("when the pool has only perps", function () { + it("should return redemption amounts", async function () { + const { billBroker, usd, perp } = await loadFixture(setupContracts); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.deposit( + usdFP("115"), + perpFP("100"), + usdFP("115"), + perpFP("100"), + ); + + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.swapPerpsForUSD(perpFP("100"), 0n); + expect(await usd.balanceOf(billBroker.target)).to.eq(0n); + + const s = await billBroker.reserveState.staticCall(); + expect( + await billBroker.assetRatio({ + usdBalance: s[0], + perpBalance: s[1], + usdPrice: s[2], + perpPrice: s[3], + }), + ).to.eq(0); + + const r = await billBroker.computeRedemptionAmts.staticCall(lpAmtFP("100")); + expect(r[0]).to.eq(0n); + expect(r[1]).to.eq(perpFP("93.023255813")); + }); + }); + }); + + describe("#redeem", function () { + describe("when paused", function () { + it("should revert", async function () { + const { billBroker } = await loadFixture(setupContracts); + await billBroker.pause(); + await expect(billBroker.redeem.staticCall(0n)).to.be.reverted; + }); + }); + + describe("when burn amount is zero", function () { + it("should return zero", async function () { + const { billBroker } = await loadFixture(setupContracts); + const r = await billBroker.redeem.staticCall(0n); + expect(r[0]).to.eq(0n); + expect(r[1]).to.eq(0n); + }); + }); + + describe("when burning more than balance", function () { + it("should return zero", async function () { + const { billBroker, usd, perp } = await loadFixture(setupContracts); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.deposit( + usdFP("115"), + perpFP("100"), + usdFP("115"), + perpFP("100"), + ); + await expect(billBroker.redeem.staticCall(lpAmtFP("1000"))).to.be.reverted; + }); + }); + + describe("on partial redemption", function () { + it("should burn lp tokens", async function () { + const { billBroker, usd, perp, otherUser } = await loadFixture(setupContracts); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.deposit( + usdFP("115"), + perpFP("100"), + usdFP("115"), + perpFP("100"), + ); + await billBroker.transfer(await otherUser.getAddress(), lpAmtFP("101")); + await expect(() => + billBroker.connect(otherUser).redeem(lpAmtFP("100")), + ).to.changeTokenBalance(billBroker, otherUser, lpAmtFP("-100")); + expect(await billBroker.balanceOf(await otherUser.getAddress())).to.eq( + lpAmtFP("1"), + ); + expect(await billBroker.totalSupply()).to.eq(lpAmtFP("115")); + }); + + it("should not change other balances", async function () { + const { billBroker, usd, perp, deployer, otherUser } = await loadFixture( + setupContracts, + ); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.deposit( + usdFP("115"), + perpFP("100"), + usdFP("115"), + perpFP("100"), + ); + await billBroker.transfer(await otherUser.getAddress(), lpAmtFP("101")); + await expect(() => + billBroker.connect(otherUser).redeem(lpAmtFP("100")), + ).to.changeTokenBalance(billBroker, deployer, 0n); + }); + + it("should return returned amounts", async function () { + const { billBroker, usd, perp, otherUser } = await loadFixture(setupContracts); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.deposit( + usdFP("115"), + perpFP("100"), + usdFP("115"), + perpFP("100"), + ); + await billBroker.transfer(await otherUser.getAddress(), lpAmtFP("101")); + const r = await billBroker.connect(otherUser).redeem.staticCall(lpAmtFP("100")); + expect(r[0]).to.eq(usdFP("53.488372")); + expect(r[1]).to.eq(perpFP("46.511627906")); + }); + + it("should transfer usd to user", async function () { + const { billBroker, usd, perp, otherUser } = await loadFixture(setupContracts); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.deposit( + usdFP("115"), + perpFP("100"), + usdFP("115"), + perpFP("100"), + ); + await billBroker.transfer(await otherUser.getAddress(), lpAmtFP("101")); + await expect(() => + billBroker.connect(otherUser).redeem(lpAmtFP("100")), + ).to.changeTokenBalance(usd, otherUser, usdFP("53.488372")); + }); + + it("should transfer perps to user", async function () { + const { billBroker, usd, perp, otherUser } = await loadFixture(setupContracts); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.deposit( + usdFP("115"), + perpFP("100"), + usdFP("115"), + perpFP("100"), + ); + await billBroker.transfer(await otherUser.getAddress(), lpAmtFP("101")); + await expect(() => + billBroker.connect(otherUser).redeem(lpAmtFP("100")), + ).to.changeTokenBalance(perp, otherUser, perpFP("46.511627906")); + }); + }); + + describe("on complete redemption", function () { + it("should burn lp tokens", async function () { + const { billBroker, usd, perp, deployer } = await loadFixture(setupContracts); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.deposit( + usdFP("115"), + perpFP("100"), + usdFP("115"), + perpFP("100"), + ); + await expect(() => billBroker.redeem(lpAmtFP("215"))).to.changeTokenBalance( + billBroker, + deployer, + lpAmtFP("-215"), + ); + expect(await billBroker.balanceOf(await deployer.getAddress())).to.eq(0n); + expect(await billBroker.totalSupply()).to.eq(0n); + }); + + it("should return returned amounts", async function () { + const { billBroker, usd, perp } = await loadFixture(setupContracts); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.deposit( + usdFP("115"), + perpFP("100"), + usdFP("115"), + perpFP("100"), + ); + const r = await billBroker.redeem.staticCall(lpAmtFP("215")); + expect(r[0]).to.eq(usdFP("115")); + expect(r[1]).to.eq(perpFP("100")); + }); + + it("should transfer usd to user", async function () { + const { billBroker, usd, perp, deployer } = await loadFixture(setupContracts); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.deposit( + usdFP("115"), + perpFP("100"), + usdFP("115"), + perpFP("100"), + ); + await expect(() => billBroker.redeem(lpAmtFP("215"))).to.changeTokenBalance( + usd, + deployer, + usdFP("115"), + ); + }); + + it("should transfer perps to user", async function () { + const { billBroker, usd, perp, deployer } = await loadFixture(setupContracts); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.deposit( + usdFP("115"), + perpFP("100"), + usdFP("115"), + perpFP("100"), + ); + await expect(() => billBroker.redeem(lpAmtFP("215"))).to.changeTokenBalance( + perp, + deployer, + perpFP("100"), + ); + }); + }); + + describe("when the pool has only usd", function () { + it("should burn lp tokens", async function () { + const { billBroker, usd, perp, deployer } = await loadFixture(setupContracts); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.deposit( + usdFP("115"), + perpFP("100"), + usdFP("115"), + perpFP("100"), + ); + + await usd.approve(billBroker.target, usdFP("115")); + await billBroker.swapUSDForPerps(usdFP("115"), 0n); + expect(await perp.balanceOf(billBroker.target)).to.eq(0n); + + const s = await billBroker.reserveState.staticCall(); + expect( + await billBroker.assetRatio({ + usdBalance: s[0], + perpBalance: s[1], + usdPrice: s[2], + perpPrice: s[3], + }), + ).to.eq(ethers.MaxUint256); + + const perpBal = await perp.balanceOf(await deployer.getAddress()); + await expect(() => billBroker.redeem(lpAmtFP("100"))).to.changeTokenBalance( + usd, + deployer, + usdFP("106.976744"), + ); + const perpBal_ = await perp.balanceOf(await deployer.getAddress()); + expect(perpBal_ - perpBal).to.eq(0n); + }); + }); + + describe("when the pool has only perps", function () { + it("should burn lp tokens", async function () { + const { billBroker, usd, perp, deployer } = await loadFixture(setupContracts); + await usd.approve(billBroker.target, usdFP("115")); + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.deposit( + usdFP("115"), + perpFP("100"), + usdFP("115"), + perpFP("100"), + ); + + await perp.approve(billBroker.target, perpFP("100")); + await billBroker.swapPerpsForUSD(perpFP("100"), 0n); + expect(await usd.balanceOf(billBroker.target)).to.eq(0n); + + const s = await billBroker.reserveState.staticCall(); + expect( + await billBroker.assetRatio({ + usdBalance: s[0], + perpBalance: s[1], + usdPrice: s[2], + perpPrice: s[3], + }), + ).to.eq(0); + + const usdBal = await usd.balanceOf(await deployer.getAddress()); + await expect(() => billBroker.redeem(lpAmtFP("100"))).to.changeTokenBalance( + perp, + deployer, + perpFP("93.023255813"), + ); + const usdBal_ = await usd.balanceOf(await deployer.getAddress()); + expect(usdBal_ - usdBal).to.eq(0n); + }); + }); + }); +}); diff --git a/spot-vaults/test/BillBroker_swap.ts b/spot-vaults/test/BillBroker_swap.ts new file mode 100644 index 00000000..c58faab5 --- /dev/null +++ b/spot-vaults/test/BillBroker_swap.ts @@ -0,0 +1,1103 @@ +import { ethers, upgrades } from "hardhat"; +import { Contract } from "ethers"; +import { loadFixture } from "@nomicfoundation/hardhat-toolbox/network-helpers"; +import { expect } from "chai"; +import { DMock, usdFP, perpFP, priceFP, percentageFP } from "./helpers"; + +async function updateFees(billBroker: Contract, fees: any) { + const currentFees = await billBroker.fees(); + await billBroker.updateFees({ + ...{ + mintFeePerc: currentFees[0], + burnFeePerc: currentFees[1], + perpToUSDSwapFeePercs: { + lower: currentFees[2][0], + upper: currentFees[2][1], + }, + usdToPerpSwapFeePercs: { + lower: currentFees[3][0], + upper: currentFees[3][1], + }, + protocolSwapSharePerc: currentFees[4], + }, + ...fees, + }); +} + +async function checkUSDToPerpSwapAmt( + billBroker: Contract, + usdAmtIn: BigInt, + reserveState: any, + amoutsOut: any, +) { + const r = await billBroker[ + "computeUSDToPerpSwapAmt(uint256,(uint256,uint256,uint256,uint256))" + ](usdAmtIn, reserveState); + expect(r[0]).to.eq(amoutsOut[0]); + expect(r[1]).to.eq(amoutsOut[1]); + expect(r[2]).to.eq(amoutsOut[2]); +} + +async function checkPerpTpUSDSwapAmt( + billBroker: Contract, + perpAmtIn: BigInt, + reserveState: any, + amoutsOut: any, +) { + const r = await billBroker[ + "computePerpToUSDSwapAmt(uint256,(uint256,uint256,uint256,uint256))" + ](perpAmtIn, reserveState); + expect(r[0]).to.eq(amoutsOut[0]); + expect(r[1]).to.eq(amoutsOut[1]); + expect(r[2]).to.eq(amoutsOut[2]); +} + +async function reserveState(billBroker: Contract) { + const r = await billBroker.reserveState.staticCall(); + return { + usdBalance: r[0], + perpBalance: r[1], + usdPrice: r[2], + perpPrice: r[3], + }; +} + +async function assetRatio(billBroker: Contract) { + return billBroker.assetRatio(await reserveState(billBroker)); +} + +describe("BillBroker", function () { + async function setupContracts() { + const accounts = await ethers.getSigners(); + const deployer = accounts[0]; + const feeCollector = accounts[1]; + + const Token = await ethers.getContractFactory("MockERC20"); + const usd = await Token.deploy(); + await usd.init("USD token", "usd", 6); + const perp = await Token.deploy(); + await perp.init("Perp token", "perp", 9); + const pricingStrategy = new DMock("SpotAppraiser"); + await pricingStrategy.deploy(); + await pricingStrategy.mockMethod("decimals()", [18]); + await pricingStrategy.mockMethod("perpPrice()", [priceFP("1.15"), true]); + await pricingStrategy.mockMethod("usdPrice()", [priceFP("1"), true]); + + const BillBroker = await ethers.getContractFactory("BillBroker"); + const billBroker = await upgrades.deployProxy( + BillBroker.connect(deployer), + ["BillBroker LP", "LP token", usd.target, perp.target, pricingStrategy.target], + { + initializer: "init(string,string,address,address,address)", + }, + ); + await updateFees(billBroker, { + mintFeePerc: 0n, + burnFeePerc: 0n, + perpToUSDSwapFeePercs: { + lower: 0n, + upper: 0n, + }, + usdToPerpSwapFeePercs: { + lower: 0n, + upper: 0n, + }, + protocolSwapSharePerc: 0n, + }); + await billBroker.updateARBounds( + [percentageFP("0.9"), percentageFP("1.1")], + [percentageFP("0.75"), percentageFP("1.25")], + ); + + await usd.mint(billBroker.target, usdFP("115000")); + await perp.mint(billBroker.target, perpFP("100000")); + await usd.mint(await deployer.getAddress(), usdFP("250000")); + await perp.mint(await deployer.getAddress(), perpFP("250000")); + await usd.approve(billBroker.target, usdFP("25000")); + await perp.approve(billBroker.target, perpFP("25000")); + + const r = await reserveState(billBroker); + expect(r.usdBalance).to.eq(usdFP("115000")); + expect(r.perpBalance).to.eq(perpFP("100000")); + expect(r.usdPrice).to.eq(priceFP("1")); + expect(r.perpPrice).to.eq(priceFP("1.15")); + + return { deployer, feeCollector, usd, perp, pricingStrategy, billBroker }; + } + + describe("#computeUSDToPerpSwapAmt", function () { + it("should return the perp amount and fees", async function () { + const { billBroker } = await loadFixture(setupContracts); + await checkUSDToPerpSwapAmt( + billBroker, + usdFP("115"), + [usdFP("115000"), perpFP("100000"), priceFP("1"), priceFP("1.15")], + [perpFP("100"), 0n, 0n], + ); + }); + + it("should return the perp amount and fees", async function () { + const { billBroker } = await loadFixture(setupContracts); + await checkUSDToPerpSwapAmt( + billBroker, + usdFP("100"), + [usdFP("110000"), perpFP("100000"), priceFP("1"), priceFP("1")], + [perpFP("100"), 0n, 0n], + ); + }); + + it("should return the perp amount and fees", async function () { + const { billBroker } = await loadFixture(setupContracts); + await checkUSDToPerpSwapAmt( + billBroker, + usdFP("11111"), + [usdFP("100000"), perpFP("100000"), priceFP("1"), priceFP("1")], + [perpFP("11111"), 0n, 0n], + ); + }); + + it("should return the perp amount and fees", async function () { + const { billBroker } = await loadFixture(setupContracts); + await checkUSDToPerpSwapAmt( + billBroker, + usdFP("11112"), + [usdFP("100000"), perpFP("100000"), priceFP("1"), priceFP("1")], + [0n, 0n, 0n], + ); + }); + + it("should return the perp amount and fees", async function () { + const { billBroker } = await loadFixture(setupContracts); + await checkUSDToPerpSwapAmt( + billBroker, + usdFP("100"), + [usdFP("100000"), perpFP("100000"), priceFP("1"), priceFP("0.9")], + [perpFP("111.111111"), 0n, 0n], + ); + }); + + describe("when fees are set", async function () { + it("should return the perp amount and fees", async function () { + const { billBroker } = await loadFixture(setupContracts); + await updateFees(billBroker, { + usdToPerpSwapFeePercs: { + lower: percentageFP("0.05"), + upper: percentageFP("0.5"), + }, + }); + await checkUSDToPerpSwapAmt( + billBroker, + usdFP("115"), + [usdFP("115000"), perpFP("100000"), priceFP("1"), priceFP("1.15")], + [perpFP("95"), perpFP("5"), 0n], + ); + }); + + it("should return the perp amount and fees", async function () { + const { billBroker } = await loadFixture(setupContracts); + await updateFees(billBroker, { + usdToPerpSwapFeePercs: { + lower: percentageFP("0.05"), + upper: percentageFP("0.5"), + }, + }); + await checkUSDToPerpSwapAmt( + billBroker, + usdFP("100"), + [usdFP("100000"), perpFP("100000"), priceFP("1"), priceFP("1")], + [perpFP("95"), perpFP("5"), 0n], + ); + }); + + it("should return the perp amount and fees", async function () { + const { billBroker } = await loadFixture(setupContracts); + await updateFees(billBroker, { + usdToPerpSwapFeePercs: { + lower: percentageFP("0.05"), + upper: percentageFP("0.5"), + }, + }); + await checkUSDToPerpSwapAmt( + billBroker, + usdFP("100"), + [usdFP("100000"), perpFP("100000"), priceFP("1"), priceFP("0.9")], + [perpFP("101.460470381"), perpFP("9.650640619"), 0n], + ); + }); + + it("should return the perp amount and fees", async function () { + const { billBroker } = await loadFixture(setupContracts); + await updateFees(billBroker, { + usdToPerpSwapFeePercs: { + lower: percentageFP("0.05"), + upper: percentageFP("0.5"), + }, + }); + await checkUSDToPerpSwapAmt( + billBroker, + usdFP("10000"), + [usdFP("100000"), perpFP("100000"), priceFP("1"), priceFP("1")], + [perpFP("8491.666666667"), perpFP("1508.333333333"), 0n], + ); + }); + + it("should return the perp amount and fees", async function () { + const { billBroker } = await loadFixture(setupContracts); + await updateFees(billBroker, { + usdToPerpSwapFeePercs: { + lower: percentageFP("0.05"), + upper: percentageFP("0.5"), + }, + }); + await checkUSDToPerpSwapAmt( + billBroker, + usdFP("20000"), + [usdFP("100000"), perpFP("100000"), priceFP("1"), priceFP("1")], + [0n, 0n, 0n], + ); + }); + }); + + describe("when protocol fees are set", async function () { + it("should return the perp amount and fees", async function () { + const { billBroker } = await loadFixture(setupContracts); + await updateFees(billBroker, { + usdToPerpSwapFeePercs: { + lower: percentageFP("0.05"), + upper: percentageFP("0.5"), + }, + protocolSwapSharePerc: percentageFP("0.1"), + }); + await checkUSDToPerpSwapAmt( + billBroker, + usdFP("115"), + [usdFP("115000"), perpFP("100000"), priceFP("1"), priceFP("1.15")], + [perpFP("95"), perpFP("4.5"), perpFP("0.5")], + ); + }); + }); + + describe("when the pool has only usd", function () { + it("should revert", async function () { + const { billBroker, usd, perp } = await loadFixture(setupContracts); + + await billBroker.updateARBounds([0n, ethers.MaxUint256], [0n, ethers.MaxUint256]); + await usd.approve(billBroker.target, usdFP("115000")); + await billBroker.swapUSDForPerps(usdFP("115000"), 0n); + expect(await perp.balanceOf(billBroker.target)).to.eq(0n); + + await expect( + billBroker[ + "computeUSDToPerpSwapAmt(uint256,(uint256,uint256,uint256,uint256))" + ](usdFP("100"), [usdFP("100000"), 0n, priceFP("1"), priceFP("1")]), + ).to.be.reverted; + }); + }); + + describe("when the pool has only perps", function () { + it("should return the swap amount", async function () { + const { billBroker, usd, perp } = await loadFixture(setupContracts); + + await billBroker.updateARBounds([0n, ethers.MaxUint256], [0n, ethers.MaxUint256]); + await perp.approve(billBroker.target, perpFP("100000")); + await billBroker.swapPerpsForUSD(perpFP("100000"), 0n); + expect(await usd.balanceOf(billBroker.target)).to.eq(0n); + + await checkUSDToPerpSwapAmt( + billBroker, + usdFP("100"), + [0n, perpFP("100000"), priceFP("1"), priceFP("1")], + [perpFP("100"), 0n, 0n], + ); + }); + }); + }); + + describe("#computePerpToUSDSwapAmt", function () { + it("should return the perp amount and fees", async function () { + const { billBroker } = await loadFixture(setupContracts); + await checkPerpTpUSDSwapAmt( + billBroker, + perpFP("100"), + [usdFP("115000"), perpFP("100000"), priceFP("1"), priceFP("1.15")], + [usdFP("115"), 0n, 0n], + ); + }); + + it("should return the perp amount and fees", async function () { + const { billBroker } = await loadFixture(setupContracts); + await checkPerpTpUSDSwapAmt( + billBroker, + perpFP("100"), + [usdFP("110000"), perpFP("100000"), priceFP("1"), priceFP("1")], + [usdFP("100"), 0n, 0n], + ); + }); + + it("should return the perp amount and fees", async function () { + const { billBroker } = await loadFixture(setupContracts); + await checkPerpTpUSDSwapAmt( + billBroker, + perpFP("14285"), + [usdFP("100000"), perpFP("100000"), priceFP("1"), priceFP("1")], + [usdFP("14285"), 0n, 0n], + ); + }); + + it("should return the perp amount and fees", async function () { + const { billBroker } = await loadFixture(setupContracts); + await checkPerpTpUSDSwapAmt( + billBroker, + perpFP("14286"), + [usdFP("100000"), perpFP("100000"), priceFP("1"), priceFP("1")], + [0n, 0n, 0n], + ); + }); + + it("should return the perp amount and fees", async function () { + const { billBroker } = await loadFixture(setupContracts); + await checkPerpTpUSDSwapAmt( + billBroker, + perpFP("100"), + [usdFP("100000"), perpFP("100000"), priceFP("1"), priceFP("0.9")], + [usdFP("90"), 0n, 0n], + ); + }); + + describe("when fees are set", async function () { + it("should return the perp amount and fees", async function () { + const { billBroker } = await loadFixture(setupContracts); + await updateFees(billBroker, { + perpToUSDSwapFeePercs: { + lower: percentageFP("0.1"), + upper: percentageFP("0.5"), + }, + }); + await checkPerpTpUSDSwapAmt( + billBroker, + perpFP("100"), + [usdFP("115000"), perpFP("100000"), priceFP("1"), priceFP("1.15")], + [usdFP("103.5"), usdFP("11.5"), 0n], + ); + }); + + it("should return the perp amount and fees", async function () { + const { billBroker } = await loadFixture(setupContracts); + await updateFees(billBroker, { + perpToUSDSwapFeePercs: { + lower: percentageFP("0.1"), + upper: percentageFP("0.5"), + }, + }); + await checkPerpTpUSDSwapAmt( + billBroker, + perpFP("100"), + [usdFP("110000"), perpFP("100000"), priceFP("1"), priceFP("1")], + [usdFP("90"), usdFP("10"), 0n], + ); + }); + + it("should return the perp amount and fees", async function () { + const { billBroker } = await loadFixture(setupContracts); + await updateFees(billBroker, { + perpToUSDSwapFeePercs: { + lower: percentageFP("0.1"), + upper: percentageFP("0.5"), + }, + }); + await checkPerpTpUSDSwapAmt( + billBroker, + perpFP("14285"), + [usdFP("100000"), perpFP("100000"), priceFP("1"), priceFP("1")], + [usdFP("11142.474991"), usdFP("3142.525009"), 0n], + ); + }); + + it("should return the perp amount and fees", async function () { + const { billBroker } = await loadFixture(setupContracts); + await updateFees(billBroker, { + perpToUSDSwapFeePercs: { + lower: percentageFP("0.1"), + upper: percentageFP("0.5"), + }, + }); + await checkPerpTpUSDSwapAmt( + billBroker, + perpFP("14286"), + [usdFP("100000"), perpFP("100000"), priceFP("1"), priceFP("1")], + [0n, 0n, 0n], + ); + }); + + it("should return the perp amount and fees", async function () { + const { billBroker } = await loadFixture(setupContracts); + await updateFees(billBroker, { + perpToUSDSwapFeePercs: { + lower: percentageFP("0.1"), + upper: percentageFP("0.5"), + }, + }); + await checkPerpTpUSDSwapAmt( + billBroker, + perpFP("100"), + [usdFP("100000"), perpFP("100000"), priceFP("1"), priceFP("0.9")], + [usdFP("81"), usdFP("9"), 0n], + ); + }); + }); + + describe("when protocol fees are set", async function () { + it("should return the perp amount and fees", async function () { + const { billBroker } = await loadFixture(setupContracts); + await updateFees(billBroker, { + perpToUSDSwapFeePercs: { + lower: percentageFP("0.1"), + upper: percentageFP("0.5"), + }, + protocolSwapSharePerc: percentageFP("0.1"), + }); + await checkPerpTpUSDSwapAmt( + billBroker, + perpFP("100"), + [usdFP("110000"), perpFP("100000"), priceFP("1"), priceFP("1")], + [usdFP("90"), usdFP("9"), usdFP("1")], + ); + }); + }); + + describe("when the pool has only usd", function () { + it("should return the swap amount", async function () { + const { billBroker, usd, perp } = await loadFixture(setupContracts); + await billBroker.updateARBounds([0n, ethers.MaxUint256], [0n, ethers.MaxUint256]); + await usd.approve(billBroker.target, usdFP("115000")); + await billBroker.swapUSDForPerps(usdFP("115000"), 0n); + expect(await perp.balanceOf(billBroker.target)).to.eq(0n); + + await checkPerpTpUSDSwapAmt( + billBroker, + perpFP("100"), + [usdFP("100000"), 0n, priceFP("1"), priceFP("1")], + [usdFP("100"), 0n, 0n], + ); + }); + }); + + describe("when the pool has only perps", function () { + it("should return the swap amount", async function () { + const { billBroker, usd, perp } = await loadFixture(setupContracts); + await billBroker.updateARBounds([0n, ethers.MaxUint256], [0n, ethers.MaxUint256]); + await perp.approve(billBroker.target, perpFP("100000")); + await billBroker.swapPerpsForUSD(perpFP("100000"), 0n); + expect(await usd.balanceOf(billBroker.target)).to.eq(0n); + + await expect( + billBroker[ + "computePerpToUSDSwapAmt(uint256,(uint256,uint256,uint256,uint256))" + ](perpFP("100"), [0n, perpFP("100000"), priceFP("1"), priceFP("1")]), + ).to.be.reverted; + }); + }); + }); + + describe("#swapUSDForPerps", function () { + describe("when paused", function () { + it("should revert", async function () { + const { billBroker } = await loadFixture(setupContracts); + await billBroker.pause(); + await expect(billBroker.swapUSDForPerps(usdFP("115"), perpFP("90"))).to.be + .reverted; + }); + }); + describe("when swap amount is zero", function () { + it("should revert", async function () { + const { billBroker } = await loadFixture(setupContracts); + await expect(billBroker.swapUSDForPerps(0n, 0n)).to.be.revertedWithCustomError( + billBroker, + "UnacceptableSwap", + ); + }); + }); + + describe("when slippage is too high", function () { + it("should revert", async function () { + const { billBroker } = await loadFixture(setupContracts); + await expect( + billBroker.swapUSDForPerps(usdFP("115"), perpFP("100.01")), + ).to.be.revertedWithCustomError(billBroker, "SlippageTooHigh"); + }); + }); + + describe("when oracle price is unreliable", function () { + it("should revert", async function () { + const { billBroker, pricingStrategy } = await loadFixture(setupContracts); + await pricingStrategy.mockMethod("perpPrice()", [0n, false]); + await expect( + billBroker.swapUSDForPerps(usdFP("115"), perpFP("100")), + ).to.be.revertedWithCustomError(billBroker, "UnreliablePrice"); + }); + it("should revert", async function () { + const { billBroker, pricingStrategy } = await loadFixture(setupContracts); + await pricingStrategy.mockMethod("usdPrice()", [0n, false]); + await expect( + billBroker.swapUSDForPerps(usdFP("115"), perpFP("100")), + ).to.be.revertedWithCustomError(billBroker, "UnreliablePrice"); + }); + }); + + describe("stable swap", function () { + it("should transfer usd from the user", async function () { + const { billBroker, deployer, usd } = await loadFixture(setupContracts); + await expect(() => + billBroker.swapUSDForPerps(usdFP("115"), perpFP("100")), + ).to.changeTokenBalance(usd, deployer, usdFP("-115")); + }); + it("should transfer perps to the user", async function () { + const { billBroker, deployer, perp } = await loadFixture(setupContracts); + await expect(() => + billBroker.swapUSDForPerps(usdFP("115"), perpFP("100")), + ).to.changeTokenBalance(perp, deployer, perpFP("100")); + }); + it("should increase the reserve ar", async function () { + const { billBroker } = await loadFixture(setupContracts); + expect(await assetRatio(billBroker)).to.eq(percentageFP("1")); + await billBroker.swapUSDForPerps(usdFP("115"), perpFP("100")); + expect(await assetRatio(billBroker)).to.eq(percentageFP("1.002002002002002002")); + }); + it("should update the reserve", async function () { + const { billBroker } = await loadFixture(setupContracts); + await billBroker.swapUSDForPerps(usdFP("115"), perpFP("100")); + const r = await reserveState(billBroker); + expect(r.usdBalance).to.eq(usdFP("115115")); + expect(r.perpBalance).to.eq(perpFP("99900")); + }); + }); + + describe("stable swap with fees", function () { + it("should transfer usd from the user", async function () { + const { billBroker, deployer, usd } = await loadFixture(setupContracts); + await updateFees(billBroker, { + usdToPerpSwapFeePercs: { + lower: percentageFP("0.05"), + upper: percentageFP("0.5"), + }, + }); + await expect(() => + billBroker.swapUSDForPerps(usdFP("115"), perpFP("95")), + ).to.changeTokenBalance(usd, deployer, usdFP("-115")); + }); + it("should transfer perps to the user", async function () { + const { billBroker, deployer, perp } = await loadFixture(setupContracts); + await updateFees(billBroker, { + usdToPerpSwapFeePercs: { + lower: percentageFP("0.05"), + upper: percentageFP("0.5"), + }, + }); + await expect(() => + billBroker.swapUSDForPerps(usdFP("115"), perpFP("95")), + ).to.changeTokenBalance(perp, deployer, perpFP("95")); + }); + it("should increase the reserve ar", async function () { + const { billBroker } = await loadFixture(setupContracts); + await updateFees(billBroker, { + usdToPerpSwapFeePercs: { + lower: percentageFP("0.05"), + upper: percentageFP("0.5"), + }, + }); + expect(await assetRatio(billBroker)).to.eq(percentageFP("1")); + await billBroker.swapUSDForPerps(usdFP("115"), perpFP("95")); + expect(await assetRatio(billBroker)).to.eq(percentageFP("1.001951854261548471")); + }); + it("should update the reserve", async function () { + const { billBroker } = await loadFixture(setupContracts); + await updateFees(billBroker, { + usdToPerpSwapFeePercs: { + lower: percentageFP("0.05"), + upper: percentageFP("0.5"), + }, + }); + await billBroker.swapUSDForPerps(usdFP("115"), perpFP("95")); + const r = await reserveState(billBroker); + expect(r.usdBalance).to.eq(usdFP("115115")); + expect(r.perpBalance).to.eq(perpFP("99905")); + }); + }); + + describe("stable swap with protocol fees", function () { + it("should transfer usd from the user", async function () { + const { billBroker, deployer, usd } = await loadFixture(setupContracts); + await updateFees(billBroker, { + usdToPerpSwapFeePercs: { + lower: percentageFP("0.05"), + upper: percentageFP("0.5"), + }, + protocolSwapSharePerc: percentageFP("0.1"), + }); + await expect(() => + billBroker.swapUSDForPerps(usdFP("115"), perpFP("95")), + ).to.changeTokenBalance(usd, deployer, usdFP("-115")); + }); + it("should transfer perps to the user", async function () { + const { billBroker, deployer, feeCollector, perp } = await loadFixture( + setupContracts, + ); + await updateFees(billBroker, { + usdToPerpSwapFeePercs: { + lower: percentageFP("0.05"), + upper: percentageFP("0.5"), + }, + protocolSwapSharePerc: percentageFP("0.1"), + }); + await billBroker + .connect(deployer) + .transferOwnership(await feeCollector.getAddress()); + await expect(() => + billBroker.swapUSDForPerps(usdFP("115"), perpFP("95")), + ).to.changeTokenBalance(perp, deployer, perpFP("95")); + }); + it("should transfer protocol fee to the owner", async function () { + const { billBroker, perp, feeCollector } = await loadFixture(setupContracts); + await updateFees(billBroker, { + usdToPerpSwapFeePercs: { + lower: percentageFP("0.05"), + upper: percentageFP("0.5"), + }, + protocolSwapSharePerc: percentageFP("0.1"), + }); + await billBroker.transferOwnership(await feeCollector.getAddress()); + await expect(() => + billBroker.swapUSDForPerps(usdFP("115"), perpFP("95")), + ).to.changeTokenBalance(perp, feeCollector, perpFP("0.5")); + }); + it("should increase the reserve ar", async function () { + const { billBroker } = await loadFixture(setupContracts); + await updateFees(billBroker, { + usdToPerpSwapFeePercs: { + lower: percentageFP("0.05"), + upper: percentageFP("0.5"), + }, + protocolSwapSharePerc: percentageFP("0.1"), + }); + expect(await assetRatio(billBroker)).to.eq(percentageFP("1")); + await billBroker.swapUSDForPerps(usdFP("115"), perpFP("95")); + expect(await assetRatio(billBroker)).to.eq(percentageFP("1.001956868809713276")); + }); + it("should update the reserve", async function () { + const { billBroker } = await loadFixture(setupContracts); + await updateFees(billBroker, { + usdToPerpSwapFeePercs: { + lower: percentageFP("0.05"), + upper: percentageFP("0.5"), + }, + protocolSwapSharePerc: percentageFP("0.1"), + }); + await billBroker.swapUSDForPerps(usdFP("115"), perpFP("95")); + const r = await reserveState(billBroker); + expect(r.usdBalance).to.eq(usdFP("115115")); + expect(r.perpBalance).to.eq(perpFP("99904.5")); + }); + }); + + describe("when swap amount pushes system outside soft bound", async function () { + it("should transfer usd from the user", async function () { + const { billBroker, deployer, usd } = await loadFixture(setupContracts); + await updateFees(billBroker, { + usdToPerpSwapFeePercs: { + lower: percentageFP("0.05"), + upper: percentageFP("0.5"), + }, + }); + await expect(() => + billBroker.swapUSDForPerps(usdFP("3795"), perpFP("3130")), + ).to.changeTokenBalance(usd, deployer, usdFP("-3795")); + }); + it("should transfer perps to the user", async function () { + const { billBroker, deployer, perp } = await loadFixture(setupContracts); + await updateFees(billBroker, { + usdToPerpSwapFeePercs: { + lower: percentageFP("0.05"), + upper: percentageFP("0.5"), + }, + }); + await expect(() => + billBroker.swapUSDForPerps(usdFP("3795"), perpFP("3130")), + ).to.changeTokenBalance(perp, deployer, perpFP("3135")); + }); + + it("should increase the reserve ar", async function () { + const { billBroker } = await loadFixture(setupContracts); + await updateFees(billBroker, { + usdToPerpSwapFeePercs: { + lower: percentageFP("0.05"), + upper: percentageFP("0.5"), + }, + }); + expect(await assetRatio(billBroker)).to.eq(percentageFP("1")); + await billBroker.swapUSDForPerps(usdFP("3795"), perpFP("3130")); + expect(await assetRatio(billBroker)).to.eq(percentageFP("1.066432664016930779")); + }); + it("should update the reserve", async function () { + const { billBroker } = await loadFixture(setupContracts); + await updateFees(billBroker, { + usdToPerpSwapFeePercs: { + lower: percentageFP("0.05"), + upper: percentageFP("0.5"), + }, + }); + await billBroker.swapUSDForPerps(usdFP("3795"), perpFP("3130")); + const r = await reserveState(billBroker); + expect(r.usdBalance).to.eq(usdFP("118795")); + expect(r.perpBalance).to.eq(perpFP("96865")); + }); + }); + + describe("when swap amount pushes system outside hard bound", async function () { + it("should revert", async function () { + const { billBroker } = await loadFixture(setupContracts); + await billBroker.updateARBounds( + [percentageFP("0.8"), percentageFP("1")], + [percentageFP("0.75"), percentageFP("1.05")], + ); + await updateFees(billBroker, { + usdToPerpSwapFeePercs: { + lower: percentageFP("0.05"), + upper: percentageFP("0.5"), + }, + }); + await expect( + billBroker.swapUSDForPerps(usdFP("5000"), perpFP("4000")), + ).to.be.revertedWithCustomError(billBroker, "UnacceptableSwap"); + }); + }); + + describe("when the pool has only usd", function () { + it("should revert", async function () { + const { billBroker, usd, perp } = await loadFixture(setupContracts); + await billBroker.updateARBounds([0n, ethers.MaxUint256], [0n, ethers.MaxUint256]); + await usd.approve(billBroker.target, usdFP("115000")); + await billBroker.swapUSDForPerps(usdFP("115000"), 0n); + expect(await perp.balanceOf(billBroker.target)).to.eq(0n); + + await usd.approve(billBroker.target, usdFP("115")); + await expect(billBroker.swapUSDForPerps(usdFP("115"), perpFP("0"))).to.be + .reverted; + }); + }); + + describe("when the pool has only perps", function () { + it("should execute swap", async function () { + const { billBroker, usd, perp, deployer } = await loadFixture(setupContracts); + await billBroker.updateARBounds([0n, ethers.MaxUint256], [0n, ethers.MaxUint256]); + await perp.approve(billBroker.target, perpFP("100000")); + await billBroker.swapPerpsForUSD(perpFP("100000"), 0n); + expect(await usd.balanceOf(billBroker.target)).to.eq(0n); + + await usd.approve(billBroker.target, usdFP("115")); + await expect(() => + billBroker.swapUSDForPerps(usdFP("115"), perpFP("0")), + ).to.changeTokenBalance(perp, deployer, perpFP("100")); + }); + }); + }); + + describe("#swapPerpsForUSD", function () { + describe("when paused", function () { + it("should revert", async function () { + const { billBroker } = await loadFixture(setupContracts); + await billBroker.pause(); + await expect(billBroker.swapPerpsForUSD(perpFP("100"), usdFP("100"))).to.be + .reverted; + }); + }); + describe("when swap amount is zero", function () { + it("should revert", async function () { + const { billBroker } = await loadFixture(setupContracts); + await expect(billBroker.swapPerpsForUSD(0n, 0n)).to.be.revertedWithCustomError( + billBroker, + "UnacceptableSwap", + ); + }); + }); + + describe("when slippage is too high", function () { + it("should revert", async function () { + const { billBroker } = await loadFixture(setupContracts); + await expect( + billBroker.swapPerpsForUSD(perpFP("100"), usdFP("116")), + ).to.be.revertedWithCustomError(billBroker, "SlippageTooHigh"); + }); + }); + + describe("when oracle price is unreliable", function () { + it("should revert", async function () { + const { billBroker, pricingStrategy } = await loadFixture(setupContracts); + await pricingStrategy.mockMethod("perpPrice()", [0n, false]); + await expect( + billBroker.swapPerpsForUSD(perpFP("115"), usdFP("100")), + ).to.be.revertedWithCustomError(billBroker, "UnreliablePrice"); + }); + it("should revert", async function () { + const { billBroker, pricingStrategy } = await loadFixture(setupContracts); + await pricingStrategy.mockMethod("usdPrice()", [0n, false]); + await expect( + billBroker.swapPerpsForUSD(perpFP("115"), usdFP("100")), + ).to.be.revertedWithCustomError(billBroker, "UnreliablePrice"); + }); + }); + + describe("stable swap", function () { + it("should transfer perps from the user", async function () { + const { billBroker, deployer, perp } = await loadFixture(setupContracts); + await expect(() => + billBroker.swapPerpsForUSD(perpFP("100"), usdFP("115")), + ).to.changeTokenBalance(perp, deployer, perpFP("-100")); + }); + it("should transfer usd to the user", async function () { + const { billBroker, deployer, usd } = await loadFixture(setupContracts); + await expect(() => + billBroker.swapPerpsForUSD(perpFP("100"), usdFP("115")), + ).to.changeTokenBalance(usd, deployer, usdFP("115")); + }); + + it("should decrease the reserve ar", async function () { + const { billBroker } = await loadFixture(setupContracts); + expect(await assetRatio(billBroker)).to.eq(percentageFP("1")); + await billBroker.swapPerpsForUSD(perpFP("100"), usdFP("115")); + expect(await assetRatio(billBroker)).to.eq(percentageFP("0.998001998001998001")); + }); + it("should update the reserve", async function () { + const { billBroker } = await loadFixture(setupContracts); + await billBroker.swapPerpsForUSD(perpFP("100"), usdFP("115")); + const r = await reserveState(billBroker); + expect(r.usdBalance).to.eq(usdFP("114885")); + expect(r.perpBalance).to.eq(perpFP("100100")); + }); + }); + + describe("stable swap with fees", function () { + it("should transfer perps from the user", async function () { + const { billBroker, deployer, perp } = await loadFixture(setupContracts); + await updateFees(billBroker, { + perpToUSDSwapFeePercs: { + lower: percentageFP("0.1"), + upper: percentageFP("0.5"), + }, + }); + await expect(() => + billBroker.swapPerpsForUSD(perpFP("100"), usdFP("103")), + ).to.changeTokenBalance(perp, deployer, perpFP("-100")); + }); + it("should transfer usd to the user", async function () { + const { billBroker, deployer, usd } = await loadFixture(setupContracts); + await updateFees(billBroker, { + perpToUSDSwapFeePercs: { + lower: percentageFP("0.1"), + upper: percentageFP("0.5"), + }, + }); + await expect(() => + billBroker.swapPerpsForUSD(perpFP("100"), usdFP("103")), + ).to.changeTokenBalance(usd, deployer, usdFP("103.5")); + }); + it("should increase the reserve ar", async function () { + const { billBroker } = await loadFixture(setupContracts); + await updateFees(billBroker, { + perpToUSDSwapFeePercs: { + lower: percentageFP("0.1"), + upper: percentageFP("0.5"), + }, + }); + expect(await assetRatio(billBroker)).to.eq(percentageFP("1")); + await billBroker.swapPerpsForUSD(perpFP("100"), usdFP("103")); + expect(await assetRatio(billBroker)).to.eq(percentageFP("0.998101898101898101")); + }); + it("should update the reserve", async function () { + const { billBroker } = await loadFixture(setupContracts); + await updateFees(billBroker, { + perpToUSDSwapFeePercs: { + lower: percentageFP("0.1"), + upper: percentageFP("0.5"), + }, + }); + await billBroker.swapPerpsForUSD(perpFP("100"), usdFP("103")); + const r = await reserveState(billBroker); + expect(r.usdBalance).to.eq(usdFP("114896.5")); + expect(r.perpBalance).to.eq(perpFP("100100")); + }); + }); + + describe("stable swap with protocol fees", function () { + it("should transfer perps from the user", async function () { + const { billBroker, deployer, perp } = await loadFixture(setupContracts); + await updateFees(billBroker, { + perpToUSDSwapFeePercs: { + lower: percentageFP("0.1"), + upper: percentageFP("0.5"), + }, + protocolSwapSharePerc: percentageFP("0.1"), + }); + await expect(() => + billBroker.swapPerpsForUSD(perpFP("100"), usdFP("103")), + ).to.changeTokenBalance(perp, deployer, perpFP("-100")); + }); + it("should transfer usd to the user", async function () { + const { billBroker, deployer, usd, feeCollector } = await loadFixture( + setupContracts, + ); + await updateFees(billBroker, { + perpToUSDSwapFeePercs: { + lower: percentageFP("0.1"), + upper: percentageFP("0.5"), + }, + protocolSwapSharePerc: percentageFP("0.1"), + }); + await billBroker.transferOwnership(await feeCollector.getAddress()); + await expect(() => + billBroker.swapPerpsForUSD(perpFP("100"), usdFP("103")), + ).to.changeTokenBalance(usd, deployer, usdFP("103.5")); + }); + it("should transfer protocol fee to the owner", async function () { + const { billBroker, usd, feeCollector } = await loadFixture(setupContracts); + await updateFees(billBroker, { + perpToUSDSwapFeePercs: { + lower: percentageFP("0.1"), + upper: percentageFP("0.5"), + }, + protocolSwapSharePerc: percentageFP("0.1"), + }); + await billBroker.transferOwnership(await feeCollector.getAddress()); + await expect(() => + billBroker.swapPerpsForUSD(perpFP("100"), usdFP("103")), + ).to.changeTokenBalance(usd, feeCollector, usdFP("1.15")); + }); + it("should increase the reserve ar", async function () { + const { billBroker } = await loadFixture(setupContracts); + await updateFees(billBroker, { + perpToUSDSwapFeePercs: { + lower: percentageFP("0.1"), + upper: percentageFP("0.5"), + }, + protocolSwapSharePerc: percentageFP("0.1"), + }); + expect(await assetRatio(billBroker)).to.eq(percentageFP("1")); + await billBroker.swapPerpsForUSD(perpFP("100"), usdFP("103")); + expect(await assetRatio(billBroker)).to.eq(percentageFP("0.998091908091908091")); + }); + it("should update the reserve", async function () { + const { billBroker } = await loadFixture(setupContracts); + await updateFees(billBroker, { + perpToUSDSwapFeePercs: { + lower: percentageFP("0.1"), + upper: percentageFP("0.5"), + }, + protocolSwapSharePerc: percentageFP("0.1"), + }); + await billBroker.swapPerpsForUSD(perpFP("100"), usdFP("103")); + const r = await reserveState(billBroker); + expect(r.usdBalance).to.eq(usdFP("114895.35")); + expect(r.perpBalance).to.eq(perpFP("100100")); + }); + }); + + describe("when swap pushes system outside soft bound", function () { + it("should transfer perps from the user", async function () { + const { billBroker, deployer, perp } = await loadFixture(setupContracts); + await updateFees(billBroker, { + perpToUSDSwapFeePercs: { + lower: percentageFP("0.1"), + upper: percentageFP("0.5"), + }, + }); + await expect(() => + billBroker.swapPerpsForUSD(perpFP("3600"), usdFP("3700")), + ).to.changeTokenBalance(perp, deployer, perpFP("-3600")); + }); + it("should transfer usd to the user", async function () { + const { billBroker, deployer, usd } = await loadFixture(setupContracts); + await updateFees(billBroker, { + perpToUSDSwapFeePercs: { + lower: percentageFP("0.1"), + upper: percentageFP("0.5"), + }, + }); + await expect(() => + billBroker.swapPerpsForUSD(perpFP("3600"), usdFP("3000")), + ).to.changeTokenBalance(usd, deployer, usdFP("3726")); + }); + it("should decrease the reserve ar", async function () { + const { billBroker } = await loadFixture(setupContracts); + await updateFees(billBroker, { + perpToUSDSwapFeePercs: { + lower: percentageFP("0.1"), + upper: percentageFP("0.5"), + }, + }); + expect(await assetRatio(billBroker)).to.eq(percentageFP("1")); + await billBroker.swapPerpsForUSD(perpFP("3600"), usdFP("3700")); + expect(await assetRatio(billBroker)).to.eq(percentageFP("0.933976833976833976")); + }); + it("should update the reserve", async function () { + const { billBroker } = await loadFixture(setupContracts); + await updateFees(billBroker, { + perpToUSDSwapFeePercs: { + lower: percentageFP("0.1"), + upper: percentageFP("0.5"), + }, + }); + await billBroker.swapPerpsForUSD(perpFP("3600"), usdFP("3700")); + const r = await reserveState(billBroker); + expect(r.usdBalance).to.eq(usdFP("111274")); + expect(r.perpBalance).to.eq(perpFP("103600")); + }); + }); + + describe("when swap pushes system outside hard bound", function () { + it("should revert", async function () { + const { billBroker } = await loadFixture(setupContracts); + await billBroker.updateARBounds( + [percentageFP("1"), percentageFP("1.1")], + [percentageFP("0.95"), percentageFP("1.25")], + ); + await updateFees(billBroker, { + perpToUSDSwapFeePercs: { + lower: percentageFP("0.1"), + upper: percentageFP("0.5"), + }, + }); + await expect( + billBroker.swapPerpsForUSD(perpFP("5000"), usdFP("4000")), + ).to.be.revertedWithCustomError(billBroker, "UnacceptableSwap"); + }); + }); + + describe("when the pool has only usd", function () { + it("should execute swap", async function () { + const { billBroker, usd, perp, deployer } = await loadFixture(setupContracts); + await billBroker.updateARBounds([0n, ethers.MaxUint256], [0n, ethers.MaxUint256]); + await usd.approve(billBroker.target, usdFP("115000")); + await billBroker.swapUSDForPerps(usdFP("115000"), 0n); + expect(await perp.balanceOf(billBroker.target)).to.eq(0n); + + await perp.approve(billBroker.target, perpFP("100")); + await expect(() => + billBroker.swapPerpsForUSD(perpFP("100"), usdFP("0")), + ).to.changeTokenBalance(usd, deployer, usdFP("115")); + }); + }); + + describe("when the pool has only perps", function () { + it("should revert", async function () { + const { billBroker, usd, perp } = await loadFixture(setupContracts); + await billBroker.updateARBounds([0n, ethers.MaxUint256], [0n, ethers.MaxUint256]); + await perp.approve(billBroker.target, perpFP("100000")); + await billBroker.swapPerpsForUSD(perpFP("100000"), 0n); + expect(await usd.balanceOf(billBroker.target)).to.eq(0n); + + await perp.approve(billBroker.target, perpFP("100")); + await expect(billBroker.swapPerpsForUSD(perpFP("100"), usdFP("0"))).to.be + .reverted; + }); + }); + }); +}); diff --git a/spot-vaults/test/SpotAppraiser.ts b/spot-vaults/test/SpotAppraiser.ts new file mode 100644 index 00000000..ab281b7f --- /dev/null +++ b/spot-vaults/test/SpotAppraiser.ts @@ -0,0 +1,242 @@ +import { ethers } from "hardhat"; +import { loadFixture } from "@nomicfoundation/hardhat-toolbox/network-helpers"; +import { expect } from "chai"; +import { oracleAnsFP, perpFP, percentageFP, priceFP, DMock } from "./helpers"; + +const nowTS = () => parseInt(Date.now() / 1000); + +describe("SpotAppraiser", function () { + async function setupContracts() { + const accounts = await ethers.getSigners(); + const deployer = accounts[0]; + + const amplTargetOracle = new DMock("MedianOracle"); + await amplTargetOracle.deploy(); + await amplTargetOracle.mockMethod("getData()", [priceFP("1.15"), true]); + await amplTargetOracle.mockMethod("DECIMALS()", [18]); + + const policy = new DMock("UFragmentsPolicy"); + await policy.deploy(); + await policy.mockMethod("cpiOracle()", [amplTargetOracle.target]); + + const ampl = new DMock("UFragments"); + await ampl.deploy(); + await ampl.mockMethod("decimals()", [9]); + await ampl.mockMethod("monetaryPolicy()", [policy.target]); + + const bond = new DMock("BondController"); + await bond.deploy(); + await bond.mockMethod("isMature()", [false]); + await bond.mockMethod("trancheCount()", [2]); + await bond.mockMethod("totalDebt()", [perpFP("500000")]); + await ampl.mockCall("balanceOf(address)", [bond.target], [perpFP("500000")]); + + const tranche = new DMock("Tranche"); + await tranche.deploy(); + await tranche.mockMethod("bond()", [bond.target]); + await tranche.mockMethod("totalSupply()", [perpFP("100000")]); + await bond.mockCall("tranches(uint256)", [0], [tranche.target, 200]); + await bond.mockCall("tranches(uint256)", [1], [ethers.ZeroAddress, 800]); + + const spot = new DMock("PerpetualTranche"); + await spot.deploy(); + await spot.mockMethod("underlying()", [ampl.target]); + await spot.mockMethod("getTVL()", [perpFP("1000000")]); + await spot.mockMethod("totalSupply()", [perpFP("1000000")]); + await spot.mockMethod("deviationRatio()", [oracleAnsFP("1.5")]); + await spot.mockMethod("getReserveCount()", [2]); + await spot.mockCall("getReserveAt(uint256)", [0], [ampl.target]); + await spot.mockCall("getReserveAt(uint256)", [1], [tranche.target]); + await ampl.mockCall("balanceOf(address)", [spot.target], [perpFP("1000")]); + + const PriceOracle = await ethers.getContractFactory("MockCLOracle"); + const usdPriceOrcle = await PriceOracle.deploy(); + await usdPriceOrcle.mockLastRoundData(oracleAnsFP("1"), nowTS()); + + const SpotAppraiser = await ethers.getContractFactory("SpotAppraiser"); + const strategy = await SpotAppraiser.deploy( + spot.target, + usdPriceOrcle.target, + amplTargetOracle.target, + ); + return { + deployer, + ampl, + spot, + usdPriceOrcle, + amplTargetOracle, + bond, + tranche, + strategy, + }; + } + + describe("init", function () { + it("should initial params", async function () { + const { deployer, strategy, ampl, spot, usdPriceOrcle, amplTargetOracle } = + await loadFixture(setupContracts); + expect(await strategy.AMPL()).to.eq(ampl.target); + expect(await strategy.SPOT()).to.eq(spot.target); + expect(await strategy.USD_ORACLE()).to.eq(usdPriceOrcle.target); + expect(await strategy.AMPL_CPI_ORACLE()).to.eq(amplTargetOracle.target); + expect(await strategy.AMPL_DUST_AMT()).to.eq(perpFP("25000")); + expect(await strategy.minSPOTDR()).to.eq(percentageFP("0.8")); + expect(await strategy.minSeniorCDR()).to.eq(percentageFP("1.1")); + expect(await strategy.owner()).to.eq(await deployer.getAddress()); + expect(await strategy.decimals()).to.eq(18); + }); + }); + + describe("#updateMinSPOTDR", function () { + describe("when triggered by non-owner", function () { + it("should revert", async function () { + const { strategy } = await loadFixture(setupContracts); + await strategy.renounceOwnership(); + await expect(strategy.updateMinSPOTDR(percentageFP("1.15"))).to.be.revertedWith( + "Ownable: caller is not the owner", + ); + }); + }); + + describe("when triggered by owner", function () { + it("should update value", async function () { + const { strategy } = await loadFixture(setupContracts); + await strategy.updateMinSPOTDR(percentageFP("1.15")); + expect(await strategy.minSPOTDR()).to.eq(percentageFP("1.15")); + }); + }); + }); + + describe("#updateMinPerpCollateralCDR", function () { + describe("when triggered by non-owner", function () { + it("should revert", async function () { + const { strategy } = await loadFixture(setupContracts); + await strategy.renounceOwnership(); + await expect( + strategy.updateMinPerpCollateralCDR(percentageFP("1.25")), + ).to.be.revertedWith("Ownable: caller is not the owner"); + }); + }); + + describe("when cdr is invalid", function () { + it("should revert", async function () { + const { strategy } = await loadFixture(setupContracts); + await expect( + strategy.updateMinPerpCollateralCDR(percentageFP("0.9")), + ).to.be.revertedWithCustomError(strategy, "InvalidSeniorCDRBound"); + }); + }); + + describe("when triggered by owner", function () { + it("should update value", async function () { + const { strategy } = await loadFixture(setupContracts); + await strategy.updateMinPerpCollateralCDR(percentageFP("1.25")); + expect(await strategy.minSeniorCDR()).to.eq(percentageFP("1.25")); + }); + }); + }); + + describe("#usdPrice", function () { + describe("when data is stale", function () { + it("should return invalid", async function () { + const { strategy, usdPriceOrcle } = await loadFixture(setupContracts); + await usdPriceOrcle.mockLastRoundData(oracleAnsFP("1"), nowTS() - 50 * 3600); + const p = await strategy.usdPrice(); + expect(p[0]).to.eq(priceFP("1")); + expect(p[1]).to.eq(false); + }); + }); + + describe("when oracle price is below thresh", function () { + it("should return invalid", async function () { + const { strategy, usdPriceOrcle } = await loadFixture(setupContracts); + await usdPriceOrcle.mockLastRoundData(oracleAnsFP("0.98"), nowTS()); + const p = await strategy.usdPrice(); + expect(p[0]).to.eq(priceFP("1")); + expect(p[1]).to.eq(false); + }); + }); + + it("should return price", async function () { + const { strategy } = await loadFixture(setupContracts); + const p = await strategy.usdPrice(); + expect(p[0]).to.eq(priceFP("1")); + expect(p[1]).to.eq(true); + }); + }); + + describe("#perpPrice", function () { + describe("when AMPL target data is invalid", function () { + it("should return invalid", async function () { + const { strategy, amplTargetOracle } = await loadFixture(setupContracts); + await amplTargetOracle.mockMethod("getData()", [priceFP("1.2"), false]); + const p = await strategy.perpPrice.staticCall(); + expect(p[0]).to.eq(priceFP("1.2")); + expect(p[1]).to.eq(false); + }); + }); + + describe("when balancer DR is too low", function () { + it("should return invalid", async function () { + const { strategy, spot } = await loadFixture(setupContracts); + await spot.mockMethod("deviationRatio()", [oracleAnsFP("0.79999")]); + const p = await strategy.perpPrice.staticCall(); + expect(p[0]).to.eq(priceFP("1.15")); + expect(p[1]).to.eq(false); + }); + }); + + describe("when spot senior cdr is too low", function () { + it("should return invalid", async function () { + const { strategy, ampl, bond } = await loadFixture(setupContracts); + await ampl.mockCall("balanceOf(address)", [bond.target], [perpFP("109999")]); + const p = await strategy.perpPrice.staticCall(); + expect(p[0]).to.eq(priceFP("1.15")); + expect(p[1]).to.eq(false); + }); + it("should return invalid", async function () { + const { strategy, bond } = await loadFixture(setupContracts); + await bond.mockMethod("isMature()", [true]); + const p = await strategy.perpPrice.staticCall(); + expect(p[0]).to.eq(priceFP("1.15")); + expect(p[1]).to.eq(false); + }); + }); + + describe("when spot has mature AMPL", function () { + it("should return invalid", async function () { + const { strategy, ampl, spot } = await loadFixture(setupContracts); + await ampl.mockCall("balanceOf(address)", [spot.target], [perpFP("25001")]); + const p = await strategy.perpPrice.staticCall(); + expect(p[0]).to.eq(priceFP("1.15")); + expect(p[1]).to.eq(false); + }); + }); + + it("should return price", async function () { + const { strategy } = await loadFixture(setupContracts); + const p = await strategy.perpPrice.staticCall(); + expect(p[0]).to.eq(priceFP("1.15")); + expect(p[1]).to.eq(true); + }); + + describe("when debasement/enrichment multiplier is not 1", function () { + it("should return price", async function () { + const { strategy, spot } = await loadFixture(setupContracts); + await spot.mockMethod("getTVL()", [perpFP("1500000")]); + await spot.mockMethod("totalSupply()", [perpFP("1000000")]); + const p = await strategy.perpPrice.staticCall(); + expect(p[0]).to.eq(priceFP("1.725")); + expect(p[1]).to.eq(true); + }); + it("should return price", async function () { + const { strategy, spot } = await loadFixture(setupContracts); + await spot.mockMethod("getTVL()", [perpFP("900000")]); + await spot.mockMethod("totalSupply()", [perpFP("1000000")]); + const p = await strategy.perpPrice.staticCall(); + expect(p[0]).to.eq(priceFP("1.035")); + expect(p[1]).to.eq(true); + }); + }); + }); +}); diff --git a/spot-vaults/test/helpers.ts b/spot-vaults/test/helpers.ts new file mode 100644 index 00000000..2319d254 --- /dev/null +++ b/spot-vaults/test/helpers.ts @@ -0,0 +1,79 @@ +import { ethers } from "hardhat"; +import { Contract, ContractFactory } from "ethers"; + +const sciParseFloat = (a: string): BigInt => + a.includes("e") ? parseFloat(a).toFixed(18) : a; +export const usdFP = (a: string): BigInt => ethers.parseUnits(sciParseFloat(a), 6); +export const perpFP = (a: string): BigInt => ethers.parseUnits(sciParseFloat(a), 9); +export const percentageFP = (a: string): BigInt => + ethers.parseUnits(sciParseFloat(a), 18); +export const priceFP = (a: string): BigInt => ethers.parseUnits(sciParseFloat(a), 18); +export const lpAmtFP = (a: string): BigInt => ethers.parseUnits(sciParseFloat(a), 24); +export const oracleAnsFP = (a: string): BigInt => ethers.parseUnits(sciParseFloat(a), 8); + +export class DMock { + private refArtifact: string; + private refFactory: ContractFactory; + private contract: Contract | null = null; + private target: string | null = null; + + constructor(refArtifact: string) { + this.refArtifact = refArtifact; + } + + public async deploy(): Promise { + this.refFactory = await ethers.getContractFactory(this.refArtifact); + this.contract = await (await ethers.getContractFactory("DMock")).deploy(); + this.target = this.contract.target; + } + + public async mockMethod(methodFragment: string, returnValue: any = []): Promise { + if (!this.contract) { + await this.deploy(); + } + const methodFragmentObj = this.refFactory.interface.fragments.filter( + f => f.type === "function" && f.format("sighash") === methodFragment, + )[0]; + if (!methodFragmentObj) { + throw Error( + `Unkown function fragment ${methodFragment}, not part of the contract abi`, + ); + } + const encodedReturnValue = ethers.AbiCoder.defaultAbiCoder().encode( + methodFragmentObj.outputs, + returnValue, + ); + await this.contract.mockMethod(methodFragmentObj.selector, encodedReturnValue); + } + + public async mockCall( + methodFragment: string, + parameters: any, + returnValue: any = [], + ): Promise { + if (!this.contract) { + await this.deploy(); + } + const methodFragmentObj = this.refFactory.interface.fragments.filter( + f => f.type === "function" && f.format("sighash") === methodFragment, + )[0]; + if (!methodFragmentObj) { + throw Error( + `Unkown function fragment ${methodFragment}, not part of the contract abi`, + ); + } + const encodedData = this.refFactory.interface.encodeFunctionData( + methodFragmentObj, + parameters, + ); + await this.contract.mockCall( + encodedData, + ethers.AbiCoder.defaultAbiCoder().encode(methodFragmentObj.outputs, returnValue), + ); + } + + public async staticCall(methodFragment: string, parameters: any = []): Promise { + const mock = this.refFactory.attach(this.contract.target); + return mock[methodFragment].staticCall(...parameters); + } +} diff --git a/spot-vaults/tsconfig.json b/spot-vaults/tsconfig.json new file mode 100644 index 00000000..574e785c --- /dev/null +++ b/spot-vaults/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "target": "es2020", + "module": "commonjs", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true, + "resolveJsonModule": true + } +} diff --git a/yarn.lock b/yarn.lock index b576ca51..abebbce8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,7 +12,21 @@ __metadata: languageName: node linkType: hard -"@ampleforthorg/spot-contracts@workspace:spot-contracts": +"@adraffy/ens-normalize@npm:1.10.0": + version: 1.10.0 + resolution: "@adraffy/ens-normalize@npm:1.10.0" + checksum: af0540f963a2632da2bbc37e36ea6593dcfc607b937857133791781e246d47f870d5e3d21fa70d5cfe94e772c284588c81ea3f5b7f4ea8fbb824369444e4dbcb + languageName: node + linkType: hard + +"@adraffy/ens-normalize@npm:1.10.1": + version: 1.10.1 + resolution: "@adraffy/ens-normalize@npm:1.10.1" + checksum: 0836f394ea256972ec19a0b5e78cb7f5bcdfd48d8a32c7478afc94dd53ae44c04d1aa2303d7f3077b4f3ac2323b1f557ab9188e8059978748fdcd83e04a80dcc + languageName: node + linkType: hard + +"@ampleforthorg/spot-contracts@workspace:spot-contracts, @ampleforthorg/spot-contracts@workspaces:*": version: 0.0.0-use.local resolution: "@ampleforthorg/spot-contracts@workspace:spot-contracts" dependencies: @@ -87,6 +101,66 @@ __metadata: languageName: unknown linkType: soft +"@ampleforthorg/spot-vaults@workspace:spot-vaults": + version: 0.0.0-use.local + resolution: "@ampleforthorg/spot-vaults@workspace:spot-vaults" + dependencies: + "@ampleforthorg/spot-contracts": "workspaces:*" + "@ethersproject/abi": ^5.6.4 + "@ethersproject/abstract-provider": ^5.7.0 + "@ethersproject/abstract-signer": ^5.7.0 + "@ethersproject/bytes": ^5.6.1 + "@ethersproject/providers": ^5.6.8 + "@nomicfoundation/hardhat-chai-matchers": latest + "@nomicfoundation/hardhat-ethers": ^3.0.0 + "@nomicfoundation/hardhat-ignition-ethers": ^0.15.0 + "@nomicfoundation/hardhat-network-helpers": ^1.0.0 + "@nomicfoundation/hardhat-toolbox": latest + "@nomicfoundation/hardhat-verify": latest + "@nomiclabs/hardhat-waffle": ^2.0.6 + "@openzeppelin/contracts": 4.9.6 + "@openzeppelin/contracts-upgradeable": 4.7.3 + "@openzeppelin/hardhat-upgrades": ^3.0.4 + "@openzeppelin/upgrades-core": latest + "@typechain/ethers-v6": ^0.5.1 + "@typechain/hardhat": ^6.1.2 + "@types/chai": ^4.3.1 + "@types/mocha": ^9.1.1 + "@types/node": ^18.6.1 + "@types/sinon-chai": ^3.2.12 + "@typescript-eslint/eslint-plugin": ^5.0.0 + "@typescript-eslint/parser": ^5.0.0 + ampleforth-contracts: "https://github.com/ampleforth/ampleforth-contracts#master" + chai: ^4.3.6 + dotenv: ^16.0.1 + eslint: ^8.20.0 + eslint-config-prettier: ^8.5.0 + eslint-config-standard: ^17.0.0 + eslint-plugin-import: ^2.26.0 + eslint-plugin-n: ^15.2.4 + eslint-plugin-no-only-tests: ^3.1.0 + eslint-plugin-node: ^11.1.0 + eslint-plugin-prettier: ^4.2.1 + eslint-plugin-promise: ^6.0.0 + eslint-plugin-unused-imports: ^3.0.0 + ethereum-waffle: latest + ethers: ^6.6.0 + ethers-v5: "npm:ethers@^5.7.0" + ganache-cli: latest + hardhat: ^2.22.1 + hardhat-gas-reporter: latest + lodash: ^4.17.21 + prettier: ^2.7.1 + prettier-plugin-solidity: ^1.0.0-dev.23 + solhint: ^3.3.7 + solidity-coverage: ^0.8.5 + tranche: "https://github.com/buttonwood-protocol/tranche.git" + ts-node: ^10.9.1 + typechain: ^8.1.0 + typescript: ^4.7.4 + languageName: unknown + linkType: soft + "@aws-crypto/sha256-js@npm:1.2.2": version: 1.2.2 resolution: "@aws-crypto/sha256-js@npm:1.2.2" @@ -110,12 +184,12 @@ __metadata: linkType: hard "@aws-sdk/types@npm:^3.1.0": - version: 3.502.0 - resolution: "@aws-sdk/types@npm:3.502.0" + version: 3.535.0 + resolution: "@aws-sdk/types@npm:3.535.0" dependencies: - "@smithy/types": ^2.9.1 - tslib: ^2.5.0 - checksum: 11dddc2c1fb7b601adba1df6339b68367a3c77fcdd298c7ceb42541c813ba777ffc9ddfbb68633f9fd9082c883edf1b2fe3139acdf822d7d423c0b5f76ce78dd + "@smithy/types": ^2.12.0 + tslib: ^2.6.2 + checksum: 3f735c78ea3a6f37d05387286f6d18b0e5deb41442095bd2f7c27b000659962872d1c801fa8484a6ac4b7d2725b2e176dc628c3fa2a903a3141d4be76488d48f languageName: node linkType: hard @@ -129,12 +203,12 @@ __metadata: linkType: hard "@babel/code-frame@npm:^7.0.0": - version: 7.23.5 - resolution: "@babel/code-frame@npm:7.23.5" + version: 7.24.2 + resolution: "@babel/code-frame@npm:7.24.2" dependencies: - "@babel/highlight": ^7.23.4 - chalk: ^2.4.2 - checksum: d90981fdf56a2824a9b14d19a4c0e8db93633fd488c772624b4e83e0ceac6039a27cd298a247c3214faa952bf803ba23696172ae7e7235f3b97f43ba278c569a + "@babel/highlight": ^7.24.2 + picocolors: ^1.0.0 + checksum: 70e867340cfe09ca5488b2f36372c45cabf43c79a5b6426e6df5ef0611ff5dfa75a57dda841895693de6008f32c21a7c97027a8c7bcabd63a7d17416cbead6f8 languageName: node linkType: hard @@ -145,60 +219,22 @@ __metadata: languageName: node linkType: hard -"@babel/highlight@npm:^7.23.4": - version: 7.23.4 - resolution: "@babel/highlight@npm:7.23.4" +"@babel/highlight@npm:^7.24.2": + version: 7.24.2 + resolution: "@babel/highlight@npm:7.24.2" dependencies: "@babel/helper-validator-identifier": ^7.22.20 chalk: ^2.4.2 js-tokens: ^4.0.0 - checksum: 643acecdc235f87d925979a979b539a5d7d1f31ae7db8d89047269082694122d11aa85351304c9c978ceeb6d250591ccadb06c366f358ccee08bb9c122476b89 + picocolors: ^1.0.0 + checksum: 5f17b131cc3ebf3ab285a62cf98a404aef1bd71a6be045e748f8d5bf66d6a6e1aefd62f5972c84369472e8d9f22a614c58a89cd331eb60b7ba965b31b1bbeaf5 languageName: node linkType: hard -"@chainsafe/as-sha256@npm:^0.3.1": - version: 0.3.1 - resolution: "@chainsafe/as-sha256@npm:0.3.1" - checksum: 58ea733be1657b0e31dbf48b0dba862da0833df34a81c1460c7352f04ce90874f70003cbf34d0afb9e5e53a33ee2d63a261a8b12462be85b2ba0a6f7f13d6150 - languageName: node - linkType: hard - -"@chainsafe/persistent-merkle-tree@npm:^0.4.2": - version: 0.4.2 - resolution: "@chainsafe/persistent-merkle-tree@npm:0.4.2" - dependencies: - "@chainsafe/as-sha256": ^0.3.1 - checksum: f9cfcb2132a243992709715dbd28186ab48c7c0c696f29d30857693cca5526bf753974a505ef68ffd5623bbdbcaa10f9083f4dd40bf99eb6408e451cc26a1a9e - languageName: node - linkType: hard - -"@chainsafe/persistent-merkle-tree@npm:^0.5.0": - version: 0.5.0 - resolution: "@chainsafe/persistent-merkle-tree@npm:0.5.0" - dependencies: - "@chainsafe/as-sha256": ^0.3.1 - checksum: 2c67203da776c79cd3a6132e2d672fe132393b2e63dc71604e3134acc8c0ec25cc5e431051545939ea0f7c5ff2066fb806b9e5cab974ca085d046226a1671f7d - languageName: node - linkType: hard - -"@chainsafe/ssz@npm:^0.10.0": - version: 0.10.2 - resolution: "@chainsafe/ssz@npm:0.10.2" - dependencies: - "@chainsafe/as-sha256": ^0.3.1 - "@chainsafe/persistent-merkle-tree": ^0.5.0 - checksum: 6bb70cf741d0a19dd0b28b3f6f067b96fa39f556e2eefa6ac745b21db9c3b3a8393dc3cca8ff4a6ce065ed71ddc3fb1b2b390a92004b9d01067c26e2558e5503 - languageName: node - linkType: hard - -"@chainsafe/ssz@npm:^0.9.2": - version: 0.9.4 - resolution: "@chainsafe/ssz@npm:0.9.4" - dependencies: - "@chainsafe/as-sha256": ^0.3.1 - "@chainsafe/persistent-merkle-tree": ^0.4.2 - case: ^1.6.3 - checksum: c6eaedeae9e5618b3c666ff4507a27647f665a8dcf17d5ca86da4ed4788c5a93868f256d0005467d184fdf35ec03f323517ec2e55ec42492d769540a2ec396bc +"@colors/colors@npm:1.5.0": + version: 1.5.0 + resolution: "@colors/colors@npm:1.5.0" + checksum: d64d5260bed1d5012ae3fc617d38d1afc0329fec05342f4e6b838f46998855ba56e0a73833f4a80fa8378c84810da254f76a8a19c39d038260dc06dc4e007425 languageName: node linkType: hard @@ -212,12 +248,10 @@ __metadata: linkType: hard "@defi-wonderland/smock@npm:^2.3.4": - version: 2.3.5 - resolution: "@defi-wonderland/smock@npm:2.3.5" + version: 2.4.0 + resolution: "@defi-wonderland/smock@npm:2.4.0" dependencies: - "@nomicfoundation/ethereumjs-evm": ^1.0.0-rc.3 - "@nomicfoundation/ethereumjs-util": ^8.0.0-rc.3 - "@nomicfoundation/ethereumjs-vm": ^6.0.0-rc.3 + "@nomicfoundation/ethereumjs-util": ^9.0.4 diff: ^5.0.0 lodash.isequal: ^4.5.0 lodash.isequalwith: ^4.4.0 @@ -229,8 +263,8 @@ __metadata: "@ethersproject/abstract-signer": ^5 "@nomiclabs/hardhat-ethers": ^2 ethers: ^5 - hardhat: ^2 - checksum: b3c408fb43cd7b02bf6f3b3a392758944ee4d4ad9d92a5bcb595b2bdf7ebe702d052b8631afba0b408e80185b1db22d655dc63feba82365f5f1f6786eb98d859 + hardhat: ^2.21.0 + checksum: 421f97cfa9a8f7bbdafc6521723f5ed0c3b7cd0462dc7d1a143a2de9cbdac46dd6acd7db619aa03a09d62695c5337fb17699259db2d5e4ddb530f5f55ef4ef30 languageName: node linkType: hard @@ -289,10 +323,23 @@ __metadata: languageName: node linkType: hard -"@eslint/js@npm:8.56.0": - version: 8.56.0 - resolution: "@eslint/js@npm:8.56.0" - checksum: 5804130574ef810207bdf321c265437814e7a26f4e6fac9b496de3206afd52f533e09ec002a3be06cd9adcc9da63e727f1883938e663c4e4751c007d5b58e539 +"@eslint/js@npm:8.57.0": + version: 8.57.0 + resolution: "@eslint/js@npm:8.57.0" + checksum: 315dc65b0e9893e2bff139bddace7ea601ad77ed47b4550e73da8c9c2d2766c7a575c3cddf17ef85b8fd6a36ff34f91729d0dcca56e73ca887c10df91a41b0bb + languageName: node + linkType: hard + +"@ethereum-waffle/chai@npm:4.0.10": + version: 4.0.10 + resolution: "@ethereum-waffle/chai@npm:4.0.10" + dependencies: + "@ethereum-waffle/provider": 4.0.5 + debug: ^4.3.4 + json-bigint: ^1.0.0 + peerDependencies: + ethers: "*" + checksum: 11a2fa51224e98ee4cbf346a731be68b17b3c172e68391b25fc0027545d7477dbeca916bbd10be0fa9de612eaed6115a0578f9d3e312e9fe95af2b7791fd0981 languageName: node linkType: hard @@ -306,6 +353,25 @@ __metadata: languageName: node linkType: hard +"@ethereum-waffle/compiler@npm:4.0.3": + version: 4.0.3 + resolution: "@ethereum-waffle/compiler@npm:4.0.3" + dependencies: + "@resolver-engine/imports": ^0.3.3 + "@resolver-engine/imports-fs": ^0.3.3 + "@typechain/ethers-v5": ^10.0.0 + "@types/mkdirp": ^0.5.2 + "@types/node-fetch": ^2.6.1 + mkdirp: ^0.5.1 + node-fetch: ^2.6.7 + peerDependencies: + ethers: "*" + solc: "*" + typechain: ^8.0.0 + checksum: ec7839b0f79a40a77fa05bb6941e00b2b3b1e0aa5514a617400c988b302bbbc5e9373b25ba52c7319bb00b83923dce42011384883c7a234c52f8c44eb5b571fc + languageName: node + linkType: hard + "@ethereum-waffle/compiler@npm:^3.4.4": version: 3.4.4 resolution: "@ethereum-waffle/compiler@npm:3.4.4" @@ -325,6 +391,17 @@ __metadata: languageName: node linkType: hard +"@ethereum-waffle/ens@npm:4.0.3": + version: 4.0.3 + resolution: "@ethereum-waffle/ens@npm:4.0.3" + peerDependencies: + "@ensdomains/ens": ^0.4.4 + "@ensdomains/resolver": ^0.2.4 + ethers: "*" + checksum: 84435c3dda78c416b332c481cfa9322f5bf06168d5887607d320cb30f20283ccde52eabd18adb5791485125d44d99ff7b5f84bd7bbdb1fde86465abb40a81966 + languageName: node + linkType: hard + "@ethereum-waffle/ens@npm:^3.4.4": version: 3.4.4 resolution: "@ethereum-waffle/ens@npm:3.4.4" @@ -336,6 +413,15 @@ __metadata: languageName: node linkType: hard +"@ethereum-waffle/mock-contract@npm:4.0.4": + version: 4.0.4 + resolution: "@ethereum-waffle/mock-contract@npm:4.0.4" + peerDependencies: + ethers: "*" + checksum: 45bea2ba4615a0bb81692c3d647ad39c2c37fcf250b577aeb6c5aad03fd4d0912d8d9ef5de638ab276ece1eb9ca1d09d23ed297d96da683fe34e0b01ba631da9 + languageName: node + linkType: hard + "@ethereum-waffle/mock-contract@npm:^3.4.4": version: 3.4.4 resolution: "@ethereum-waffle/mock-contract@npm:3.4.4" @@ -346,6 +432,20 @@ __metadata: languageName: node linkType: hard +"@ethereum-waffle/provider@npm:4.0.5": + version: 4.0.5 + resolution: "@ethereum-waffle/provider@npm:4.0.5" + dependencies: + "@ethereum-waffle/ens": 4.0.3 + "@ganache/ethereum-options": 0.1.4 + debug: ^4.3.4 + ganache: 7.4.3 + peerDependencies: + ethers: "*" + checksum: b1282ea28cbfba05343cc101bceab3f72fdd9ed391f7c7e0f252aead81aec46b6a0ab7d7ca8504e080e306d6554c21e5420765965d92ed5b303a12543dc85cf4 + languageName: node + linkType: hard + "@ethereum-waffle/provider@npm:^3.4.4": version: 3.4.4 resolution: "@ethereum-waffle/provider@npm:3.4.4" @@ -359,6 +459,67 @@ __metadata: languageName: node linkType: hard +"@ethereumjs/block@npm:^3.5.0, @ethereumjs/block@npm:^3.6.0, @ethereumjs/block@npm:^3.6.2": + version: 3.6.3 + resolution: "@ethereumjs/block@npm:3.6.3" + dependencies: + "@ethereumjs/common": ^2.6.5 + "@ethereumjs/tx": ^3.5.2 + ethereumjs-util: ^7.1.5 + merkle-patricia-tree: ^4.2.4 + checksum: d08c78134d15bc09c08b9a355ab736faa0f6b04ab87d2962e60df9c8bf977ebc68fe10aec6ca50bc2486532f489d7968fb5046defcd839b3b5ce28ca9dbce40f + languageName: node + linkType: hard + +"@ethereumjs/blockchain@npm:^5.5.0": + version: 5.5.3 + resolution: "@ethereumjs/blockchain@npm:5.5.3" + dependencies: + "@ethereumjs/block": ^3.6.2 + "@ethereumjs/common": ^2.6.4 + "@ethereumjs/ethash": ^1.1.0 + debug: ^4.3.3 + ethereumjs-util: ^7.1.5 + level-mem: ^5.0.1 + lru-cache: ^5.1.1 + semaphore-async-await: ^1.5.1 + checksum: eeefb4735ac06e6fe5ec5457eb9ac7aa26ced8651093d05067aee264f23704d79eacb1b2742e0651b73d2528aa8a9a40f3cc9e479f1837253c2dbb784a7a8e59 + languageName: node + linkType: hard + +"@ethereumjs/common@npm:2.6.0": + version: 2.6.0 + resolution: "@ethereumjs/common@npm:2.6.0" + dependencies: + crc-32: ^1.2.0 + ethereumjs-util: ^7.1.3 + checksum: f1e775f0d3963011f84cd6f6de985b342064331c8fd41bc81a6497abe959078704bf4febd8c59a3fc51c3527b1261441436d55d032f85f0453ff1af4a8dbccb3 + languageName: node + linkType: hard + +"@ethereumjs/common@npm:^2.6.0, @ethereumjs/common@npm:^2.6.4, @ethereumjs/common@npm:^2.6.5": + version: 2.6.5 + resolution: "@ethereumjs/common@npm:2.6.5" + dependencies: + crc-32: ^1.2.0 + ethereumjs-util: ^7.1.5 + checksum: 0143386f267ef01b7a8bb1847596f964ad58643c084e5fd8e3a0271a7bf8428605dbf38cbb92c84f6622080ad095abeb765f178c02d86ec52abf9e8a4c0e4ecf + languageName: node + linkType: hard + +"@ethereumjs/ethash@npm:^1.1.0": + version: 1.1.0 + resolution: "@ethereumjs/ethash@npm:1.1.0" + dependencies: + "@ethereumjs/block": ^3.5.0 + "@types/levelup": ^4.3.0 + buffer-xor: ^2.0.1 + ethereumjs-util: ^7.1.1 + miller-rabin: ^4.0.0 + checksum: 152bc0850eeb0f2507383ca005418697b0a6a4487b120d7b3fadae4cb3b4781403c96c01f0c47149031431e518fb174c284ff38806b457f86f00c500eb213df3 + languageName: node + linkType: hard + "@ethereumjs/rlp@npm:^4.0.1": version: 4.0.1 resolution: "@ethereumjs/rlp@npm:4.0.1" @@ -368,6 +529,26 @@ __metadata: languageName: node linkType: hard +"@ethereumjs/tx@npm:3.4.0": + version: 3.4.0 + resolution: "@ethereumjs/tx@npm:3.4.0" + dependencies: + "@ethereumjs/common": ^2.6.0 + ethereumjs-util: ^7.1.3 + checksum: 381cbb872edb0ae83a56bf5d5657ac4f594f43ca0956b6577fb762840033081252345d67151d4feafde3f97caaab9a9826348780553c05d5a8ca2984259ad555 + languageName: node + linkType: hard + +"@ethereumjs/tx@npm:^3.4.0, @ethereumjs/tx@npm:^3.5.2": + version: 3.5.2 + resolution: "@ethereumjs/tx@npm:3.5.2" + dependencies: + "@ethereumjs/common": ^2.6.4 + ethereumjs-util: ^7.1.5 + checksum: a34a7228a623b40300484d15875b9f31f0a612cfeab64a845f6866cf0bfe439519e9455ac6396149f29bc527cf0ee277ace082ae013a1075dcbf7193220a0146 + languageName: node + linkType: hard + "@ethereumjs/util@npm:^8.1.0": version: 8.1.0 resolution: "@ethereumjs/util@npm:8.1.0" @@ -379,6 +560,26 @@ __metadata: languageName: node linkType: hard +"@ethereumjs/vm@npm:5.6.0": + version: 5.6.0 + resolution: "@ethereumjs/vm@npm:5.6.0" + dependencies: + "@ethereumjs/block": ^3.6.0 + "@ethereumjs/blockchain": ^5.5.0 + "@ethereumjs/common": ^2.6.0 + "@ethereumjs/tx": ^3.4.0 + async-eventemitter: ^0.2.4 + core-js-pure: ^3.0.1 + debug: ^2.2.0 + ethereumjs-util: ^7.1.3 + functional-red-black-tree: ^1.0.1 + mcl-wasm: ^0.7.1 + merkle-patricia-tree: ^4.2.2 + rustbn.js: ~0.2.0 + checksum: 67f803f7dc851aeed9996cdab6751dc3f7565146ff8a24982526d33a07c173e84dd449b2fbb9202a479c7446b628105af41465b75c1f9143e1e68cf573fed4c3 + languageName: node + linkType: hard + "@ethersproject/abi@npm:5.0.0-beta.153": version: 5.0.0-beta.153 resolution: "@ethersproject/abi@npm:5.0.0-beta.153" @@ -623,7 +824,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/providers@npm:5.7.2, @ethersproject/providers@npm:^5.6.8, @ethersproject/providers@npm:^5.7.1, @ethersproject/providers@npm:^5.7.2": +"@ethersproject/providers@npm:5.7.2, @ethersproject/providers@npm:^5.6.8": version: 5.7.2 resolution: "@ethersproject/providers@npm:5.7.2" dependencies: @@ -738,7 +939,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/units@npm:5.7.0": +"@ethersproject/units@npm:5.7.0, @ethersproject/units@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/units@npm:5.7.0" dependencies: @@ -799,9 +1000,85 @@ __metadata: linkType: hard "@fastify/busboy@npm:^2.0.0": - version: 2.1.0 - resolution: "@fastify/busboy@npm:2.1.0" - checksum: 3233abd10f73e50668cb4bb278a79b7b3fadd30215ac6458299b0e5a09a29c3586ec07597aae6bd93f5cbedfcef43a8aeea51829cd28fc13850cdbcd324c28d5 + version: 2.1.1 + resolution: "@fastify/busboy@npm:2.1.1" + checksum: 42c32ef75e906c9a4809c1e1930a5ca6d4ddc8d138e1a8c8ba5ea07f997db32210617d23b2e4a85fe376316a41a1a0439fc6ff2dedf5126d96f45a9d80754fb2 + languageName: node + linkType: hard + +"@ganache/ethereum-address@npm:0.1.4": + version: 0.1.4 + resolution: "@ganache/ethereum-address@npm:0.1.4" + dependencies: + "@ganache/utils": 0.1.4 + checksum: 0e07102c67aa2c25233e30f8ca359cbd012ad0e0b9580b8e6aff6f87dd46daee89bbc60d9518f2204f36f943e7bd5d20e571646c85e6a68a98784c3ede2ccec0 + languageName: node + linkType: hard + +"@ganache/ethereum-options@npm:0.1.4": + version: 0.1.4 + resolution: "@ganache/ethereum-options@npm:0.1.4" + dependencies: + "@ganache/ethereum-address": 0.1.4 + "@ganache/ethereum-utils": 0.1.4 + "@ganache/options": 0.1.4 + "@ganache/utils": 0.1.4 + bip39: 3.0.4 + seedrandom: 3.0.5 + checksum: 597b32502654ce9f3fec02fdf308f1e6b2c657b5e25c6d4219d71ecbea94e45faa4135c6d4e25cacf1faac1509f2b7546f3d8bbdba1e9121975d820999d3aa76 + languageName: node + linkType: hard + +"@ganache/ethereum-utils@npm:0.1.4": + version: 0.1.4 + resolution: "@ganache/ethereum-utils@npm:0.1.4" + dependencies: + "@ethereumjs/common": 2.6.0 + "@ethereumjs/tx": 3.4.0 + "@ethereumjs/vm": 5.6.0 + "@ganache/ethereum-address": 0.1.4 + "@ganache/rlp": 0.1.4 + "@ganache/utils": 0.1.4 + emittery: 0.10.0 + ethereumjs-abi: 0.6.8 + ethereumjs-util: 7.1.3 + checksum: 74bc7b7fb62e9dc2f114f6f428c465d9365c0bb84c85144d34935d24a2893c5471c8cae263ae4bea51f1335803b6b1771f57c25a276e9c0539a08a90c3289bca + languageName: node + linkType: hard + +"@ganache/options@npm:0.1.4": + version: 0.1.4 + resolution: "@ganache/options@npm:0.1.4" + dependencies: + "@ganache/utils": 0.1.4 + bip39: 3.0.4 + seedrandom: 3.0.5 + checksum: 4f1cda646f5599b18a0eeaf27286499c78c3e2e0eb2541db756c27f2ca16e58539c9db99aab8441e593f9fe586269940d800900f63312fcb10231ab95ebdc3dc + languageName: node + linkType: hard + +"@ganache/rlp@npm:0.1.4": + version: 0.1.4 + resolution: "@ganache/rlp@npm:0.1.4" + dependencies: + "@ganache/utils": 0.1.4 + rlp: 2.2.6 + checksum: 425c5d4a0a36b834cfac005d05679b3df970a6d8d953f385a5f9bd003a326ba23c1bce06095729879136699b70389d7f2627f939f712ed8897c96e542766771f + languageName: node + linkType: hard + +"@ganache/utils@npm:0.1.4": + version: 0.1.4 + resolution: "@ganache/utils@npm:0.1.4" + dependencies: + "@trufflesuite/bigint-buffer": 1.1.9 + emittery: 0.10.0 + keccak: 3.0.1 + seedrandom: 3.0.5 + dependenciesMeta: + "@trufflesuite/bigint-buffer": + optional: true + checksum: c81b7380d56292a44e9cdb0e581d815b9510fb1be87661fe135e2d3611b495f1cd01aa4b91e287bfc28d08d1b4b4210f7b54e32ea28e054faa006cf232fb3dcc languageName: node linkType: hard @@ -844,7 +1121,7 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/config-array@npm:^0.11.13": +"@humanwhocodes/config-array@npm:^0.11.14": version: 0.11.14 resolution: "@humanwhocodes/config-array@npm:0.11.14" dependencies: @@ -863,9 +1140,9 @@ __metadata: linkType: hard "@humanwhocodes/object-schema@npm:^2.0.2": - version: 2.0.2 - resolution: "@humanwhocodes/object-schema@npm:2.0.2" - checksum: 2fc11503361b5fb4f14714c700c02a3f4c7c93e9acd6b87a29f62c522d90470f364d6161b03d1cc618b979f2ae02aed1106fd29d302695d8927e2fc8165ba8ee + version: 2.0.3 + resolution: "@humanwhocodes/object-schema@npm:2.0.3" + checksum: d3b78f6c5831888c6ecc899df0d03bcc25d46f3ad26a11d7ea52944dc36a35ef543fad965322174238d677a43d5c694434f6607532cff7077062513ad7022631 languageName: node linkType: hard @@ -913,9 +1190,9 @@ __metadata: linkType: hard "@jridgewell/resolve-uri@npm:^3.0.3": - version: 3.1.1 - resolution: "@jridgewell/resolve-uri@npm:3.1.1" - checksum: f5b441fe7900eab4f9155b3b93f9800a916257f4e8563afbcd3b5a5337b55e52bd8ae6735453b1b745457d9f6cdb16d74cd6220bbdd98cf153239e13f6cbb653 + version: 3.1.2 + resolution: "@jridgewell/resolve-uri@npm:3.1.2" + checksum: 83b85f72c59d1c080b4cbec0fef84528963a1b5db34e4370fa4bd1e3ff64a0d80e0cee7369d11d73c704e0286fb2865b530acac7a871088fbe92b5edf1000870 languageName: node linkType: hard @@ -946,11 +1223,11 @@ __metadata: linkType: hard "@ljharb/through@npm:^2.3.9, @ljharb/through@npm:~2.3.9": - version: 2.3.12 - resolution: "@ljharb/through@npm:2.3.12" + version: 2.3.13 + resolution: "@ljharb/through@npm:2.3.13" dependencies: - call-bind: ^1.0.5 - checksum: d5a78568cd3025c03264a9f9c61b30511d27cb9611fae7575cb1339a1baa1a263b6af03e28505b821324f3c6285086ee5add612b8b0155d1f253ed5159cd3f56 + call-bind: ^1.0.7 + checksum: 0255464a0ec7901b08cff3e99370b87e66663f46249505959c0cb4f6121095d533bbb7c7cda338063d3e134cbdd721e2705bc18eac7611b4f9ead6e7935d13ba languageName: node linkType: hard @@ -967,6 +1244,15 @@ __metadata: languageName: node linkType: hard +"@noble/curves@npm:1.2.0, @noble/curves@npm:~1.2.0": + version: 1.2.0 + resolution: "@noble/curves@npm:1.2.0" + dependencies: + "@noble/hashes": 1.3.2 + checksum: bb798d7a66d8e43789e93bc3c2ddff91a1e19fdb79a99b86cd98f1e5eff0ee2024a2672902c2576ef3577b6f282f3b5c778bebd55761ddbb30e36bf275e83dd0 + languageName: node + linkType: hard + "@noble/curves@npm:1.3.0, @noble/curves@npm:~1.3.0": version: 1.3.0 resolution: "@noble/curves@npm:1.3.0" @@ -983,13 +1269,27 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.3.3, @noble/hashes@npm:~1.3.2": +"@noble/hashes@npm:1.3.2": + version: 1.3.2 + resolution: "@noble/hashes@npm:1.3.2" + checksum: fe23536b436539d13f90e4b9be843cc63b1b17666a07634a2b1259dded6f490be3d050249e6af98076ea8f2ea0d56f578773c2197f2aa0eeaa5fba5bc18ba474 + languageName: node + linkType: hard + +"@noble/hashes@npm:1.3.3, @noble/hashes@npm:~1.3.0, @noble/hashes@npm:~1.3.2": version: 1.3.3 resolution: "@noble/hashes@npm:1.3.3" checksum: 8a6496d1c0c64797339bc694ad06cdfaa0f9e56cd0c3f68ae3666cfb153a791a55deb0af9c653c7ed2db64d537aa3e3054629740d2f2338bb1dcb7ab60cd205b languageName: node linkType: hard +"@noble/hashes@npm:^1.4.0": + version: 1.4.0 + resolution: "@noble/hashes@npm:1.4.0" + checksum: 8ba816ae26c90764b8c42493eea383716396096c5f7ba6bea559993194f49d80a73c081f315f4c367e51bd2d5891700bcdfa816b421d24ab45b41cb03e4f3342 + languageName: node + linkType: hard + "@noble/secp256k1@npm:1.7.1, @noble/secp256k1@npm:~1.7.0": version: 1.7.1 resolution: "@noble/secp256k1@npm:1.7.1" @@ -1024,317 +1324,196 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/ethereumjs-block@npm:4.2.2": - version: 4.2.2 - resolution: "@nomicfoundation/ethereumjs-block@npm:4.2.2" - dependencies: - "@nomicfoundation/ethereumjs-common": 3.1.2 - "@nomicfoundation/ethereumjs-rlp": 4.0.3 - "@nomicfoundation/ethereumjs-trie": 5.0.5 - "@nomicfoundation/ethereumjs-tx": 4.1.2 - "@nomicfoundation/ethereumjs-util": 8.0.6 - ethereum-cryptography: 0.1.3 - checksum: 174a251d9c4e0bb9c1a7a6e77c52f1b2b4708d8135dba55c1025776248258ce905e4383a79da0ce7ac4e67e03b6c56351ca634a771b5eae976ed97498fc163f9 - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-block@npm:5.0.2": - version: 5.0.2 - resolution: "@nomicfoundation/ethereumjs-block@npm:5.0.2" - dependencies: - "@nomicfoundation/ethereumjs-common": 4.0.2 - "@nomicfoundation/ethereumjs-rlp": 5.0.2 - "@nomicfoundation/ethereumjs-trie": 6.0.2 - "@nomicfoundation/ethereumjs-tx": 5.0.2 - "@nomicfoundation/ethereumjs-util": 9.0.2 - ethereum-cryptography: 0.1.3 - ethers: ^5.7.1 - checksum: 7ff744f44a01f1c059ca7812a1cfc8089f87aa506af6cb39c78331dca71b32993cbd6fa05ad03f8c4f4fab73bb998a927af69e0d8ff01ae192ee5931606e09f5 +"@nomicfoundation/edr-darwin-arm64@npm:0.3.5": + version: 0.3.5 + resolution: "@nomicfoundation/edr-darwin-arm64@npm:0.3.5" + conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@nomicfoundation/ethereumjs-blockchain@npm:6.2.2": - version: 6.2.2 - resolution: "@nomicfoundation/ethereumjs-blockchain@npm:6.2.2" - dependencies: - "@nomicfoundation/ethereumjs-block": 4.2.2 - "@nomicfoundation/ethereumjs-common": 3.1.2 - "@nomicfoundation/ethereumjs-ethash": 2.0.5 - "@nomicfoundation/ethereumjs-rlp": 4.0.3 - "@nomicfoundation/ethereumjs-trie": 5.0.5 - "@nomicfoundation/ethereumjs-util": 8.0.6 - abstract-level: ^1.0.3 - debug: ^4.3.3 - ethereum-cryptography: 0.1.3 - level: ^8.0.0 - lru-cache: ^5.1.1 - memory-level: ^1.0.0 - checksum: 5933600bf005ec3e33f6fdd0b3582b80ed7eac8fa776fc86f21de8a6ac3614e3262c48ad3737015c19558165aecd7b13a8056e96afd61511d0605411e0264871 +"@nomicfoundation/edr-darwin-arm64@npm:0.3.8": + version: 0.3.8 + resolution: "@nomicfoundation/edr-darwin-arm64@npm:0.3.8" + checksum: 20166c1cd0413fb3078c8240ad3604fb6ff6076b8142dfff14e51715ed313c73ec90486fe0a3b5a48ca3031e98e92339cd2bf825f6f199bfdf9b41bec906ebb8 languageName: node linkType: hard -"@nomicfoundation/ethereumjs-blockchain@npm:7.0.2": - version: 7.0.2 - resolution: "@nomicfoundation/ethereumjs-blockchain@npm:7.0.2" - dependencies: - "@nomicfoundation/ethereumjs-block": 5.0.2 - "@nomicfoundation/ethereumjs-common": 4.0.2 - "@nomicfoundation/ethereumjs-ethash": 3.0.2 - "@nomicfoundation/ethereumjs-rlp": 5.0.2 - "@nomicfoundation/ethereumjs-trie": 6.0.2 - "@nomicfoundation/ethereumjs-tx": 5.0.2 - "@nomicfoundation/ethereumjs-util": 9.0.2 - abstract-level: ^1.0.3 - debug: ^4.3.3 - ethereum-cryptography: 0.1.3 - level: ^8.0.0 - lru-cache: ^5.1.1 - memory-level: ^1.0.0 - checksum: b7e440dcd73e32aa72d13bfd28cb472773c9c60ea808a884131bf7eb3f42286ad594a0864215f599332d800f3fe1f772fff4b138d2dcaa8f41e4d8389bff33e7 +"@nomicfoundation/edr-darwin-x64@npm:0.3.5": + version: 0.3.5 + resolution: "@nomicfoundation/edr-darwin-x64@npm:0.3.5" + conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@nomicfoundation/ethereumjs-common@npm:3.1.2": - version: 3.1.2 - resolution: "@nomicfoundation/ethereumjs-common@npm:3.1.2" - dependencies: - "@nomicfoundation/ethereumjs-util": 8.0.6 - crc-32: ^1.2.0 - checksum: b886e47bb4da26b42bf9e905c5f073db62d2ad1b740d50898012580b501868839fcf08430debe3fca927b4d73e01628c1b0b2e84401feb551245dacfac045404 +"@nomicfoundation/edr-darwin-x64@npm:0.3.8": + version: 0.3.8 + resolution: "@nomicfoundation/edr-darwin-x64@npm:0.3.8" + checksum: c9ba1c9eeda71876f6c69550b20f7b0d865f6249cb88c0a3dc853d7ca32061d9a71f40f14cc628fa7f286786fc2cd48c5a2a9527a6d0f55939f2a9565809b561 languageName: node linkType: hard -"@nomicfoundation/ethereumjs-common@npm:4.0.2": - version: 4.0.2 - resolution: "@nomicfoundation/ethereumjs-common@npm:4.0.2" - dependencies: - "@nomicfoundation/ethereumjs-util": 9.0.2 - crc-32: ^1.2.0 - checksum: f0d84704d6254d374299c19884312bd5666974b4b6f342d3f10bc76e549de78d20e45a53d25fbdc146268a52335497127e4f069126da7c60ac933a158e704887 +"@nomicfoundation/edr-linux-arm64-gnu@npm:0.3.5": + version: 0.3.5 + resolution: "@nomicfoundation/edr-linux-arm64-gnu@npm:0.3.5" + conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@nomicfoundation/ethereumjs-ethash@npm:2.0.5": - version: 2.0.5 - resolution: "@nomicfoundation/ethereumjs-ethash@npm:2.0.5" - dependencies: - "@nomicfoundation/ethereumjs-block": 4.2.2 - "@nomicfoundation/ethereumjs-rlp": 4.0.3 - "@nomicfoundation/ethereumjs-util": 8.0.6 - abstract-level: ^1.0.3 - bigint-crypto-utils: ^3.0.23 - ethereum-cryptography: 0.1.3 - checksum: 0b03c8771602cfa64c9d35e5686326d0bfecb7dc0874cd9ff737cae0ec401396187d8499c103b8858fed5b9bd930e132b8fd09d19b3f0649df36d7d0fdf4d27c +"@nomicfoundation/edr-linux-arm64-gnu@npm:0.3.8": + version: 0.3.8 + resolution: "@nomicfoundation/edr-linux-arm64-gnu@npm:0.3.8" + checksum: bebb780f8c22ca13af9b336873a6d00091139f88669ba4c569d03efd7a6671f10b4c6afd7ee9444d9b18364d05eedf46f4dd82d1e7329de32267175127a6989b languageName: node linkType: hard -"@nomicfoundation/ethereumjs-ethash@npm:3.0.2": - version: 3.0.2 - resolution: "@nomicfoundation/ethereumjs-ethash@npm:3.0.2" - dependencies: - "@nomicfoundation/ethereumjs-block": 5.0.2 - "@nomicfoundation/ethereumjs-rlp": 5.0.2 - "@nomicfoundation/ethereumjs-util": 9.0.2 - abstract-level: ^1.0.3 - bigint-crypto-utils: ^3.0.23 - ethereum-cryptography: 0.1.3 - checksum: e4011e4019dd9b92f7eeebfc1e6c9a9685c52d8fd0ee4f28f03e50048a23b600c714490827f59fdce497b3afb503b3fd2ebf6815ff307e9949c3efeff1403278 +"@nomicfoundation/edr-linux-arm64-musl@npm:0.3.5": + version: 0.3.5 + resolution: "@nomicfoundation/edr-linux-arm64-musl@npm:0.3.5" + conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@nomicfoundation/ethereumjs-evm@npm:1.3.2, @nomicfoundation/ethereumjs-evm@npm:^1.0.0-rc.3": - version: 1.3.2 - resolution: "@nomicfoundation/ethereumjs-evm@npm:1.3.2" - dependencies: - "@nomicfoundation/ethereumjs-common": 3.1.2 - "@nomicfoundation/ethereumjs-util": 8.0.6 - "@types/async-eventemitter": ^0.2.1 - async-eventemitter: ^0.2.4 - debug: ^4.3.3 - ethereum-cryptography: 0.1.3 - mcl-wasm: ^0.7.1 - rustbn.js: ~0.2.0 - checksum: 4a051f36968574ffbee5d3c401ebf1c81899b69a0692c372fced67691fe18f26741f26d1781e79dfa52136af888e561d80de4fd7dd59000d640c51bd8b130023 +"@nomicfoundation/edr-linux-arm64-musl@npm:0.3.8": + version: 0.3.8 + resolution: "@nomicfoundation/edr-linux-arm64-musl@npm:0.3.8" + checksum: 6cf009e4686780c41c6af271e67d1414b5e5096e5422f64980b8c3a4ddd6273b3289a5d228d976b217d6c1d8da52af912f599d923a098225b9dd906f03b889c8 languageName: node linkType: hard -"@nomicfoundation/ethereumjs-evm@npm:2.0.2": - version: 2.0.2 - resolution: "@nomicfoundation/ethereumjs-evm@npm:2.0.2" - dependencies: - "@ethersproject/providers": ^5.7.1 - "@nomicfoundation/ethereumjs-common": 4.0.2 - "@nomicfoundation/ethereumjs-tx": 5.0.2 - "@nomicfoundation/ethereumjs-util": 9.0.2 - debug: ^4.3.3 - ethereum-cryptography: 0.1.3 - mcl-wasm: ^0.7.1 - rustbn.js: ~0.2.0 - checksum: a23cf570836ddc147606b02df568069de946108e640f902358fef67e589f6b371d856056ee44299d9b4e3497f8ae25faa45e6b18fefd90e9b222dc6a761d85f0 +"@nomicfoundation/edr-linux-x64-gnu@npm:0.3.5": + version: 0.3.5 + resolution: "@nomicfoundation/edr-linux-x64-gnu@npm:0.3.5" + conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@nomicfoundation/ethereumjs-rlp@npm:4.0.3": - version: 4.0.3 - resolution: "@nomicfoundation/ethereumjs-rlp@npm:4.0.3" - bin: - rlp: bin/rlp - checksum: 14fc83701dd52323fae705786549ab07482ace315de69a586bb948b6f21ec529794cef8248af0b5c7e8f8b05fbadfbe222754b305841fa2189bfbc8f1eb064a2 +"@nomicfoundation/edr-linux-x64-gnu@npm:0.3.8": + version: 0.3.8 + resolution: "@nomicfoundation/edr-linux-x64-gnu@npm:0.3.8" + checksum: 6afb66601880bee40a254272ecb88d3c00b1acd97bde503127b2d900d15aa2707926b56e652abdfb0c0e75dde53e201aaef40ae0fd3bd7c6e48163eaa6ed3a17 languageName: node linkType: hard -"@nomicfoundation/ethereumjs-rlp@npm:5.0.2": - version: 5.0.2 - resolution: "@nomicfoundation/ethereumjs-rlp@npm:5.0.2" - bin: - rlp: bin/rlp - checksum: a74434cadefca9aa8754607cc1ad7bb4bbea4ee61c6214918e60a5bbee83206850346eb64e39fd1fe97f854c7ec0163e01148c0c881dda23881938f0645a0ef2 +"@nomicfoundation/edr-linux-x64-musl@npm:0.3.5": + version: 0.3.5 + resolution: "@nomicfoundation/edr-linux-x64-musl@npm:0.3.5" + conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@nomicfoundation/ethereumjs-statemanager@npm:1.0.5": - version: 1.0.5 - resolution: "@nomicfoundation/ethereumjs-statemanager@npm:1.0.5" - dependencies: - "@nomicfoundation/ethereumjs-common": 3.1.2 - "@nomicfoundation/ethereumjs-rlp": 4.0.3 - "@nomicfoundation/ethereumjs-trie": 5.0.5 - "@nomicfoundation/ethereumjs-util": 8.0.6 - debug: ^4.3.3 - ethereum-cryptography: 0.1.3 - functional-red-black-tree: ^1.0.1 - checksum: 0f88743900b2211deb5d2393bf111ef63411ce533387a6d06c48cc9ac1f4fc38f968cdecc4712ebdafdebc3c4c2ce6bd1abd82989f4f4f515d3f571981d38f9f +"@nomicfoundation/edr-linux-x64-musl@npm:0.3.8": + version: 0.3.8 + resolution: "@nomicfoundation/edr-linux-x64-musl@npm:0.3.8" + checksum: 72cd4be88ea30fd47fa1f984f446d80bf6d33e928e35df02ae4b842701b459dd92d7ba4071e388c95739a9688d6247100cb7155f3e67a5e624f54b2b42098dfd languageName: node linkType: hard -"@nomicfoundation/ethereumjs-statemanager@npm:2.0.2": - version: 2.0.2 - resolution: "@nomicfoundation/ethereumjs-statemanager@npm:2.0.2" - dependencies: - "@nomicfoundation/ethereumjs-common": 4.0.2 - "@nomicfoundation/ethereumjs-rlp": 5.0.2 - debug: ^4.3.3 - ethereum-cryptography: 0.1.3 - ethers: ^5.7.1 - js-sdsl: ^4.1.4 - checksum: 3ab6578e252e53609afd98d8ba42a99f182dcf80252f23ed9a5e0471023ffb2502130f85fc47fa7c94cd149f9be799ed9a0942ca52a143405be9267f4ad94e64 +"@nomicfoundation/edr-win32-x64-msvc@npm:0.3.5": + version: 0.3.5 + resolution: "@nomicfoundation/edr-win32-x64-msvc@npm:0.3.5" + conditions: os=win32 & cpu=x64 languageName: node linkType: hard -"@nomicfoundation/ethereumjs-trie@npm:5.0.5": - version: 5.0.5 - resolution: "@nomicfoundation/ethereumjs-trie@npm:5.0.5" - dependencies: - "@nomicfoundation/ethereumjs-rlp": 4.0.3 - "@nomicfoundation/ethereumjs-util": 8.0.6 - ethereum-cryptography: 0.1.3 - readable-stream: ^3.6.0 - checksum: bed56b55093275166c40d0aa097b32d348b3795cbfdc3797d48d136a578161431e70f30bcf453b74b52f77b897d79b61a3fb9d1abd10187c0cb7f25e40dea9c5 +"@nomicfoundation/edr-win32-x64-msvc@npm:0.3.8": + version: 0.3.8 + resolution: "@nomicfoundation/edr-win32-x64-msvc@npm:0.3.8" + checksum: d7b5bbe71f2347075a9e4d88d22609ec9b8058734ee048ff94300fecb51afad96d0d596686ad9cf6cf8ee74d1c117bf53ce5d77bf077cb472977d4a9bd88eb43 languageName: node linkType: hard -"@nomicfoundation/ethereumjs-trie@npm:6.0.2": - version: 6.0.2 - resolution: "@nomicfoundation/ethereumjs-trie@npm:6.0.2" +"@nomicfoundation/edr@npm:^0.3.5": + version: 0.3.5 + resolution: "@nomicfoundation/edr@npm:0.3.5" dependencies: - "@nomicfoundation/ethereumjs-rlp": 5.0.2 - "@nomicfoundation/ethereumjs-util": 9.0.2 - "@types/readable-stream": ^2.3.13 - ethereum-cryptography: 0.1.3 - readable-stream: ^3.6.0 - checksum: d4da918d333851b9f2cce7dbd25ab5753e0accd43d562d98fd991b168b6a08d1794528f0ade40fe5617c84900378376fe6256cdbe52c8d66bf4c53293bbc7c40 + "@nomicfoundation/edr-darwin-arm64": 0.3.5 + "@nomicfoundation/edr-darwin-x64": 0.3.5 + "@nomicfoundation/edr-linux-arm64-gnu": 0.3.5 + "@nomicfoundation/edr-linux-arm64-musl": 0.3.5 + "@nomicfoundation/edr-linux-x64-gnu": 0.3.5 + "@nomicfoundation/edr-linux-x64-musl": 0.3.5 + "@nomicfoundation/edr-win32-x64-msvc": 0.3.5 + dependenciesMeta: + "@nomicfoundation/edr-darwin-arm64": + optional: true + "@nomicfoundation/edr-darwin-x64": + optional: true + "@nomicfoundation/edr-linux-arm64-gnu": + optional: true + "@nomicfoundation/edr-linux-arm64-musl": + optional: true + "@nomicfoundation/edr-linux-x64-gnu": + optional: true + "@nomicfoundation/edr-linux-x64-musl": + optional: true + "@nomicfoundation/edr-win32-x64-msvc": + optional: true + checksum: 6d083fa8f8a3601af93d1a6a25da0031029e8f3125a7f5629de439d1b3b8ba5a699defca59470c5f087ab89cacb7d27a3492ceeb648166caa89c6747bf669e2f languageName: node linkType: hard -"@nomicfoundation/ethereumjs-tx@npm:4.1.2": - version: 4.1.2 - resolution: "@nomicfoundation/ethereumjs-tx@npm:4.1.2" +"@nomicfoundation/edr@npm:^0.3.7": + version: 0.3.8 + resolution: "@nomicfoundation/edr@npm:0.3.8" dependencies: - "@nomicfoundation/ethereumjs-common": 3.1.2 - "@nomicfoundation/ethereumjs-rlp": 4.0.3 - "@nomicfoundation/ethereumjs-util": 8.0.6 - ethereum-cryptography: 0.1.3 - checksum: 209622bdc56e5f1267e5d2de69ed18388b141edc568f739f0ed865aecfe96e07c381aab779ed0adacefeae4da5be64fa1110a02e481e9a7c343bf0d53f4fd1b9 + "@nomicfoundation/edr-darwin-arm64": 0.3.8 + "@nomicfoundation/edr-darwin-x64": 0.3.8 + "@nomicfoundation/edr-linux-arm64-gnu": 0.3.8 + "@nomicfoundation/edr-linux-arm64-musl": 0.3.8 + "@nomicfoundation/edr-linux-x64-gnu": 0.3.8 + "@nomicfoundation/edr-linux-x64-musl": 0.3.8 + "@nomicfoundation/edr-win32-x64-msvc": 0.3.8 + checksum: 31047fdde18034e2c6bd65dfbe3192c149b2af7f06a108e8c7b829c45bc5071c9d536c68d2d3b988bc67c7f7d331f0a88eee49ce3c882b3bcd5e20bc301d32a8 languageName: node linkType: hard -"@nomicfoundation/ethereumjs-tx@npm:5.0.2": - version: 5.0.2 - resolution: "@nomicfoundation/ethereumjs-tx@npm:5.0.2" +"@nomicfoundation/ethereumjs-common@npm:4.0.4": + version: 4.0.4 + resolution: "@nomicfoundation/ethereumjs-common@npm:4.0.4" dependencies: - "@chainsafe/ssz": ^0.9.2 - "@ethersproject/providers": ^5.7.2 - "@nomicfoundation/ethereumjs-common": 4.0.2 - "@nomicfoundation/ethereumjs-rlp": 5.0.2 - "@nomicfoundation/ethereumjs-util": 9.0.2 - ethereum-cryptography: 0.1.3 - checksum: 0bbcea75786b2ccb559afe2ecc9866fb4566a9f157b6ffba4f50960d14f4b3da2e86e273f6fadda9b860e67cfcabf589970fb951b328cb5f900a585cd21842a2 + "@nomicfoundation/ethereumjs-util": 9.0.4 + checksum: ce3f6e4ae15b976efdb7ccda27e19aadb62b5ffee209f9503e68b4fd8633715d4d697c0cc10ccd35f5e4e977edd05100d0f214e28880ec64fff77341dc34fcdf languageName: node linkType: hard -"@nomicfoundation/ethereumjs-util@npm:8.0.6, @nomicfoundation/ethereumjs-util@npm:^8.0.0-rc.3": - version: 8.0.6 - resolution: "@nomicfoundation/ethereumjs-util@npm:8.0.6" - dependencies: - "@nomicfoundation/ethereumjs-rlp": 4.0.3 - ethereum-cryptography: 0.1.3 - checksum: 7a51c2069702750d94bf6bc5afd4a26c50321fe42504339d5275b60974941451eb41232f8a08c307797bcd498f20a3b27074351a76abdfc36a5e74473a7eda01 +"@nomicfoundation/ethereumjs-rlp@npm:5.0.4": + version: 5.0.4 + resolution: "@nomicfoundation/ethereumjs-rlp@npm:5.0.4" + bin: + rlp: bin/rlp.cjs + checksum: ee2c2e5776c73801dc5ed636f4988b599b4563c2d0037da542ea57eb237c69dd1ac555f6bcb5e06f70515b6459779ba0d68252a6e105132b4659ab4bf62919b0 languageName: node linkType: hard -"@nomicfoundation/ethereumjs-util@npm:9.0.2": - version: 9.0.2 - resolution: "@nomicfoundation/ethereumjs-util@npm:9.0.2" +"@nomicfoundation/ethereumjs-tx@npm:5.0.4": + version: 5.0.4 + resolution: "@nomicfoundation/ethereumjs-tx@npm:5.0.4" dependencies: - "@chainsafe/ssz": ^0.10.0 - "@nomicfoundation/ethereumjs-rlp": 5.0.2 + "@nomicfoundation/ethereumjs-common": 4.0.4 + "@nomicfoundation/ethereumjs-rlp": 5.0.4 + "@nomicfoundation/ethereumjs-util": 9.0.4 ethereum-cryptography: 0.1.3 - checksum: 3a08f7b88079ef9f53b43da9bdcb8195498fd3d3911c2feee2571f4d1204656053f058b2f650471c86f7d2d0ba2f814768c7cfb0f266eede41c848356afc4900 - languageName: node - linkType: hard - -"@nomicfoundation/ethereumjs-vm@npm:7.0.2": - version: 7.0.2 - resolution: "@nomicfoundation/ethereumjs-vm@npm:7.0.2" - dependencies: - "@nomicfoundation/ethereumjs-block": 5.0.2 - "@nomicfoundation/ethereumjs-blockchain": 7.0.2 - "@nomicfoundation/ethereumjs-common": 4.0.2 - "@nomicfoundation/ethereumjs-evm": 2.0.2 - "@nomicfoundation/ethereumjs-rlp": 5.0.2 - "@nomicfoundation/ethereumjs-statemanager": 2.0.2 - "@nomicfoundation/ethereumjs-trie": 6.0.2 - "@nomicfoundation/ethereumjs-tx": 5.0.2 - "@nomicfoundation/ethereumjs-util": 9.0.2 - debug: ^4.3.3 - ethereum-cryptography: 0.1.3 - mcl-wasm: ^0.7.1 - rustbn.js: ~0.2.0 - checksum: 1c25ba4d0644cadb8a2b0241a4bb02e578bfd7f70e3492b855c2ab5c120cb159cb8f7486f84dc1597884bd1697feedbfb5feb66e91352afb51f3694fd8e4a043 + peerDependencies: + c-kzg: ^2.1.2 + peerDependenciesMeta: + c-kzg: + optional: true + checksum: 0f1c87716682ccbcf4d92ffc6cf8ab557e658b90319d82be3219a091a736859f8803c73c98e4863682e3e86d264751c472d33ff6d3c3daf4e75b5f01d0af8fa3 languageName: node linkType: hard -"@nomicfoundation/ethereumjs-vm@npm:^6.0.0-rc.3": - version: 6.4.2 - resolution: "@nomicfoundation/ethereumjs-vm@npm:6.4.2" +"@nomicfoundation/ethereumjs-util@npm:9.0.4, @nomicfoundation/ethereumjs-util@npm:^9.0.4": + version: 9.0.4 + resolution: "@nomicfoundation/ethereumjs-util@npm:9.0.4" dependencies: - "@nomicfoundation/ethereumjs-block": 4.2.2 - "@nomicfoundation/ethereumjs-blockchain": 6.2.2 - "@nomicfoundation/ethereumjs-common": 3.1.2 - "@nomicfoundation/ethereumjs-evm": 1.3.2 - "@nomicfoundation/ethereumjs-rlp": 4.0.3 - "@nomicfoundation/ethereumjs-statemanager": 1.0.5 - "@nomicfoundation/ethereumjs-trie": 5.0.5 - "@nomicfoundation/ethereumjs-tx": 4.1.2 - "@nomicfoundation/ethereumjs-util": 8.0.6 - "@types/async-eventemitter": ^0.2.1 - async-eventemitter: ^0.2.4 - debug: ^4.3.3 + "@nomicfoundation/ethereumjs-rlp": 5.0.4 ethereum-cryptography: 0.1.3 - functional-red-black-tree: ^1.0.1 - mcl-wasm: ^0.7.1 - rustbn.js: ~0.2.0 - checksum: 9138b8cce872a51fe2e378942c52fc6c54d8126ff094ba6bb78cbb630cafa20d7fbaa2b08bdcf7cad6de78e19ce68493ddbcc2e02acb7c803b866dc121274ea7 + peerDependencies: + c-kzg: ^2.1.2 + peerDependenciesMeta: + c-kzg: + optional: true + checksum: 754439f72b11cad2d8986707ad020077dcc763c4055f73e2668a0b4cadb22aa4407faa9b3c587d9eb5b97ac337afbe037eb642bc1d5a16197284f83db3462cbe languageName: node linkType: hard @@ -1356,9 +1535,108 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/hardhat-verify@npm:^1.1.0": - version: 1.1.1 - resolution: "@nomicfoundation/hardhat-verify@npm:1.1.1" +"@nomicfoundation/hardhat-chai-matchers@npm:latest": + version: 2.0.6 + resolution: "@nomicfoundation/hardhat-chai-matchers@npm:2.0.6" + dependencies: + "@types/chai-as-promised": ^7.1.3 + chai-as-promised: ^7.1.1 + deep-eql: ^4.0.1 + ordinal: ^1.0.3 + peerDependencies: + "@nomicfoundation/hardhat-ethers": ^3.0.0 + chai: ^4.2.0 + ethers: ^6.1.0 + hardhat: ^2.9.4 + checksum: 050bf0cf2f33b480bc93912330929649b0e08a0f9405bbadda66239bfeedaee7f2cfc7e34ed03540cb381b41925fc9dd4ec9a36088ccfa8d7461259d8c78003d + languageName: node + linkType: hard + +"@nomicfoundation/hardhat-ethers@npm:^3.0.0": + version: 3.0.5 + resolution: "@nomicfoundation/hardhat-ethers@npm:3.0.5" + dependencies: + debug: ^4.1.1 + lodash.isequal: ^4.5.0 + peerDependencies: + ethers: ^6.1.0 + hardhat: ^2.0.0 + checksum: 34b092dfec68f8d8673c96af717660327edc814bc5c9cdb5bc1f82d5bde2b18bc9b9d3499a632784a3d4f2505ac174217e55d31b546b7eaa77a5bb30b3c80bb4 + languageName: node + linkType: hard + +"@nomicfoundation/hardhat-ignition-ethers@npm:^0.15.0": + version: 0.15.1 + resolution: "@nomicfoundation/hardhat-ignition-ethers@npm:0.15.1" + peerDependencies: + "@nomicfoundation/hardhat-ethers": ^3.0.4 + "@nomicfoundation/hardhat-ignition": ^0.15.1 + "@nomicfoundation/ignition-core": ^0.15.1 + ethers: ^6.7.0 + hardhat: ^2.18.0 + checksum: c8aa21a1d131fa4ec55c2f7a6e5f3f6b4475afe2ffbf82a46bcd429a4d8424935a1529a10bfa8edfb1e7633b4d496d61ff7f160023f457bf3e3806b8aa15d48e + languageName: node + linkType: hard + +"@nomicfoundation/hardhat-network-helpers@npm:^1.0.0": + version: 1.0.10 + resolution: "@nomicfoundation/hardhat-network-helpers@npm:1.0.10" + dependencies: + ethereumjs-util: ^7.1.4 + peerDependencies: + hardhat: ^2.9.5 + checksum: 675da8d3229946a2bac0df9d1b5cc278bba9cd1a8214b5ff6099dcba874d913df07b9772a2ead0cb7ea2ced6b3fa430a73f94a3e257ae105493931c38fc7bf61 + languageName: node + linkType: hard + +"@nomicfoundation/hardhat-toolbox@npm:latest": + version: 5.0.0 + resolution: "@nomicfoundation/hardhat-toolbox@npm:5.0.0" + peerDependencies: + "@nomicfoundation/hardhat-chai-matchers": ^2.0.0 + "@nomicfoundation/hardhat-ethers": ^3.0.0 + "@nomicfoundation/hardhat-ignition-ethers": ^0.15.0 + "@nomicfoundation/hardhat-network-helpers": ^1.0.0 + "@nomicfoundation/hardhat-verify": ^2.0.0 + "@typechain/ethers-v6": ^0.5.0 + "@typechain/hardhat": ^9.0.0 + "@types/chai": ^4.2.0 + "@types/mocha": ">=9.1.0" + "@types/node": ">=18.0.0" + chai: ^4.2.0 + ethers: ^6.4.0 + hardhat: ^2.11.0 + hardhat-gas-reporter: ^1.0.8 + solidity-coverage: ^0.8.1 + ts-node: ">=8.0.0" + typechain: ^8.3.0 + typescript: ">=4.5.0" + checksum: 18890eaf1cc130afb7dc83ea48cb6ef23c499eb5d28c3fbb36e706082383a320118ee6d4491ede64acf684d2f1ffa117cf84ad80d8ebde9fa52a443f8780a898 + languageName: node + linkType: hard + +"@nomicfoundation/hardhat-verify@npm:^1.1.0": + version: 1.1.1 + resolution: "@nomicfoundation/hardhat-verify@npm:1.1.1" + dependencies: + "@ethersproject/abi": ^5.1.2 + "@ethersproject/address": ^5.0.2 + cbor: ^8.1.0 + chalk: ^2.4.2 + debug: ^4.1.1 + lodash.clonedeep: ^4.5.0 + semver: ^6.3.0 + table: ^6.8.0 + undici: ^5.14.0 + peerDependencies: + hardhat: ^2.0.4 + checksum: 2d83d32d6833f23fb62c30c68c9a2ab3956098030edcf459e69639960f059c72572d203bcf92f191c69c9cb0fbbf011a1113bacde1e3cbb28d5e812334f04f32 + languageName: node + linkType: hard + +"@nomicfoundation/hardhat-verify@npm:latest": + version: 2.0.6 + resolution: "@nomicfoundation/hardhat-verify@npm:2.0.6" dependencies: "@ethersproject/abi": ^5.1.2 "@ethersproject/address": ^5.0.2 @@ -1371,7 +1649,7 @@ __metadata: undici: ^5.14.0 peerDependencies: hardhat: ^2.0.4 - checksum: 2d83d32d6833f23fb62c30c68c9a2ab3956098030edcf459e69639960f059c72572d203bcf92f191c69c9cb0fbbf011a1113bacde1e3cbb28d5e812334f04f32 + checksum: 38091d1d35e6c88b547e11c5ba0ad2b23db7df6c8d708a7a48625a9cf4adf6c51bf3544e2b6bb729280952056fddc43212ad3f04f5f1f66b04e1ee0aed58b8ca languageName: node linkType: hard @@ -1494,7 +1772,7 @@ __metadata: languageName: node linkType: hard -"@nomiclabs/hardhat-waffle@npm:^2.0.3": +"@nomiclabs/hardhat-waffle@npm:^2.0.3, @nomiclabs/hardhat-waffle@npm:^2.0.6": version: 2.0.6 resolution: "@nomiclabs/hardhat-waffle@npm:2.0.6" peerDependencies: @@ -1508,15 +1786,15 @@ __metadata: linkType: hard "@npmcli/agent@npm:^2.0.0": - version: 2.2.0 - resolution: "@npmcli/agent@npm:2.2.0" + version: 2.2.2 + resolution: "@npmcli/agent@npm:2.2.2" dependencies: agent-base: ^7.1.0 http-proxy-agent: ^7.0.0 https-proxy-agent: ^7.0.1 lru-cache: ^10.0.1 - socks-proxy-agent: ^8.0.1 - checksum: 3b25312edbdfaa4089af28e2d423b6f19838b945e47765b0c8174c1395c79d43c3ad6d23cb364b43f59fd3acb02c93e3b493f72ddbe3dfea04c86843a7311fc4 + socks-proxy-agent: ^8.0.3 + checksum: 67de7b88cc627a79743c88bab35e023e23daf13831a8aa4e15f998b92f5507b644d8ffc3788afc8e64423c612e0785a6a92b74782ce368f49a6746084b50d874 languageName: node linkType: hard @@ -1529,14 +1807,48 @@ __metadata: languageName: node linkType: hard -"@openzeppelin/contracts-upgradeable@npm:^4.7.3": - version: 4.9.5 - resolution: "@openzeppelin/contracts-upgradeable@npm:4.9.5" - checksum: d5d9bad93fe2a88a8336060901d45f185ebfe1fed9844b1fe50e8641d946588c6e69a5a8f1694f0bd073c913b4b9a5c34316acfc17d8f75228adecbcb635ea62 +"@openzeppelin/contracts-upgradeable@npm:4.7.3": + version: 4.7.3 + resolution: "@openzeppelin/contracts-upgradeable@npm:4.7.3" + checksum: c9ffb40cb847a975d440204fc6a811f43af960050242f707332b984d29bd16dc242ffa0935de61867aeb9e0357fadedb16b09b276deda5e9775582face831021 languageName: node linkType: hard -"@openzeppelin/defender-base-client@npm:^1.46.0": +"@openzeppelin/contracts-upgradeable@npm:^4.1.0, @openzeppelin/contracts-upgradeable@npm:^4.7.3": + version: 4.9.6 + resolution: "@openzeppelin/contracts-upgradeable@npm:4.9.6" + checksum: 481075e7222cab025ae55304263fca69a2d04305521957bc16d2aece9fa2b86b6914711724822493e3d04df7e793469cd0bcb1e09f0ddd10cb4e360ac7eed12a + languageName: node + linkType: hard + +"@openzeppelin/contracts@npm:3.4.2-solc-0.7": + version: 3.4.2-solc-0.7 + resolution: "@openzeppelin/contracts@npm:3.4.2-solc-0.7" + checksum: 1a6048f31ed560c34429a05e534102c51124ecaf113aca7ebeb7897cfaaf61007cdd7952374c282adaeb79b04ee86ee80b16eed28b62fc6d60e3ffcd7a696895 + languageName: node + linkType: hard + +"@openzeppelin/contracts@npm:4.9.6": + version: 4.9.6 + resolution: "@openzeppelin/contracts@npm:4.9.6" + checksum: 274b6e968268294f12d5ca4f0278f6e6357792c8bb4d76664f83dbdc325f780541538a127e6a6e97e4f018088b42f65952014dec9c745c0fa25081f43ef9c4bf + languageName: node + linkType: hard + +"@openzeppelin/defender-admin-client@npm:^1.52.0": + version: 1.54.1 + resolution: "@openzeppelin/defender-admin-client@npm:1.54.1" + dependencies: + "@openzeppelin/defender-base-client": 1.54.1 + axios: ^1.4.0 + ethers: ^5.7.2 + lodash: ^4.17.19 + node-fetch: ^2.6.0 + checksum: c247b38c9fdedc55d01d59b7db7fbe212b1ff5177950a0626010b8df3e298e3cf52e0d46d06cadc95c418f570547864c3d652e42804f4c845b3790de581e3d19 + languageName: node + linkType: hard + +"@openzeppelin/defender-base-client@npm:1.54.1, @openzeppelin/defender-base-client@npm:^1.52.0": version: 1.54.1 resolution: "@openzeppelin/defender-base-client@npm:1.54.1" dependencies: @@ -1549,6 +1861,51 @@ __metadata: languageName: node linkType: hard +"@openzeppelin/defender-base-client@npm:^1.46.0": + version: 1.54.6 + resolution: "@openzeppelin/defender-base-client@npm:1.54.6" + 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 + checksum: 75b260a545fd734b7678d5591b29847f5211466bad25caca95fc24490c36d49b419b1ef06e6abc9dc6c9b4be97ae2957e033f3050a8675ddd246da817eaedd83 + languageName: node + linkType: hard + +"@openzeppelin/defender-sdk-base-client@npm:^1.10.0, @openzeppelin/defender-sdk-base-client@npm:^1.12.0": + version: 1.12.0 + resolution: "@openzeppelin/defender-sdk-base-client@npm:1.12.0" + dependencies: + amazon-cognito-identity-js: ^6.3.6 + async-retry: ^1.3.3 + checksum: bd0501fad9fa7830ad65a0b27c1fa2ce2b84b30fd218c3dda7347dfac76d7500ecba75defa100a2d77d775db8606dac56cecccf898593784f8868e69edd9d121 + languageName: node + linkType: hard + +"@openzeppelin/defender-sdk-deploy-client@npm:^1.10.0": + version: 1.12.0 + resolution: "@openzeppelin/defender-sdk-deploy-client@npm:1.12.0" + dependencies: + "@openzeppelin/defender-sdk-base-client": ^1.12.0 + axios: ^1.6.7 + lodash: ^4.17.21 + checksum: 2032c0967bb255a6ada456a84fdc1f90a8199fc57061f4a43df63830ab08ef08981674fb5e897afff20ad2c3f60051dda29d8939e79eba2a54c8302c5fc76869 + languageName: node + linkType: hard + +"@openzeppelin/defender-sdk-network-client@npm:^1.10.0": + version: 1.12.0 + resolution: "@openzeppelin/defender-sdk-network-client@npm:1.12.0" + dependencies: + "@openzeppelin/defender-sdk-base-client": ^1.12.0 + axios: ^1.6.7 + lodash: ^4.17.21 + checksum: fdc151be291a28267315398f6f131ab71b4214bf0c706d4ac4b7904be6ce5647cfde994d39caad6d86c5a3361b0f0b354c88c7a905c20bf50562f75204b62ce0 + languageName: node + linkType: hard + "@openzeppelin/hardhat-upgrades@npm:^1.19.0": version: 1.28.0 resolution: "@openzeppelin/hardhat-upgrades@npm:1.28.0" @@ -1573,6 +1930,35 @@ __metadata: languageName: node linkType: hard +"@openzeppelin/hardhat-upgrades@npm:^3.0.4": + version: 3.0.5 + resolution: "@openzeppelin/hardhat-upgrades@npm:3.0.5" + dependencies: + "@openzeppelin/defender-admin-client": ^1.52.0 + "@openzeppelin/defender-base-client": ^1.52.0 + "@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 + chalk: ^4.1.0 + debug: ^4.1.1 + ethereumjs-util: ^7.1.5 + proper-lockfile: ^4.1.1 + undici: ^6.0.0 + peerDependencies: + "@nomicfoundation/hardhat-ethers": ^3.0.0 + "@nomicfoundation/hardhat-verify": ^2.0.0 + ethers: ^6.6.0 + hardhat: ^2.0.2 + peerDependenciesMeta: + "@nomicfoundation/hardhat-verify": + optional: true + bin: + migrate-oz-cli-project: dist/scripts/migrate-oz-cli-project.js + checksum: daea1b110273a4f96b47147590e740eb4c2164114e130403754a3e1552e14f16bb435fd6c8d1144fcef9fd3ee52a0a3441e233f89c3bef352600872a95c0e415 + languageName: node + linkType: hard + "@openzeppelin/platform-deploy-client@npm:^0.8.0": version: 0.8.0 resolution: "@openzeppelin/platform-deploy-client@npm:0.8.0" @@ -1586,9 +1972,27 @@ __metadata: languageName: node linkType: hard -"@openzeppelin/upgrades-core@npm:^1.27.0, @openzeppelin/upgrades-core@npm:latest": - version: 1.32.4 - resolution: "@openzeppelin/upgrades-core@npm:1.32.4" +"@openzeppelin/upgrades-core@npm:^1.27.0": + version: 1.33.1 + resolution: "@openzeppelin/upgrades-core@npm:1.33.1" + dependencies: + cbor: ^9.0.0 + chalk: ^4.1.0 + compare-versions: ^6.0.0 + debug: ^4.1.1 + ethereumjs-util: ^7.0.3 + minimist: ^1.2.7 + proper-lockfile: ^4.1.1 + solidity-ast: ^0.4.51 + bin: + openzeppelin-upgrades-core: dist/cli/cli.js + checksum: 9c96b92c1a2284f2d78313a3b2707b6025c8353604d3569c76ebd72deef988f38755ef17feab4ff81a0f0ef2671d7dd87e0934f1ff4b58b1bbc71e8626000889 + languageName: node + linkType: hard + +"@openzeppelin/upgrades-core@npm:^1.32.0, @openzeppelin/upgrades-core@npm:latest": + version: 1.32.6 + resolution: "@openzeppelin/upgrades-core@npm:1.32.6" dependencies: cbor: ^9.0.0 chalk: ^4.1.0 @@ -1600,7 +2004,7 @@ __metadata: solidity-ast: ^0.4.51 bin: openzeppelin-upgrades-core: dist/cli/cli.js - checksum: 3efb07adbc8b1c92ca64817f2c48a7312f6c9338d0e79f7a640756aad472be023b201962d79704eb8e1f470a2c50a6c920f0cb860dd2a04c8bc6ea09a0b451c0 + checksum: 9e7d71ae7960d9bfc81a8c08299acb3a002c0641e112072a7a13a95e928ad467b93c4092af9f37f2fa6d0d6894b98bd5c86f2e305351edf6b301adcc677aae1f languageName: node linkType: hard @@ -1684,6 +2088,13 @@ __metadata: languageName: node linkType: hard +"@rari-capital/solmate@npm:^6.4.0": + version: 6.4.0 + resolution: "@rari-capital/solmate@npm:6.4.0" + checksum: 27c656f72ce9b51ab6ec25165ae5426f74af934352eca062eb8419c4cf7fc4c6debf45487afd6bee7860e38b7c33d3a6d353a0d4c176c961c9c8125d30cf52a4 + languageName: node + linkType: hard + "@resolver-engine/core@npm:^0.3.3": version: 0.3.3 resolution: "@resolver-engine/core@npm:0.3.3" @@ -1729,10 +2140,10 @@ __metadata: languageName: node linkType: hard -"@scure/base@npm:~1.1.0, @scure/base@npm:~1.1.4": - version: 1.1.5 - resolution: "@scure/base@npm:1.1.5" - checksum: 9e9ee6088cb3aa0fb91f5a48497d26682c7829df3019b1251d088d166d7a8c0f941c68aaa8e7b96bbad20c71eb210397cb1099062cde3e29d4bad6b975c18519 +"@scure/base@npm:~1.1.0, @scure/base@npm:~1.1.2, @scure/base@npm:~1.1.4": + version: 1.1.6 + resolution: "@scure/base@npm:1.1.6" + checksum: d6deaae91deba99e87939af9e55d80edba302674983f32bba57f942e22b1726a83c62dc50d8f4370a5d5d35a212dda167fb169f4b0d0c297488d8604608fc3d3 languageName: node linkType: hard @@ -1747,6 +2158,17 @@ __metadata: languageName: node linkType: hard +"@scure/bip32@npm:1.3.2": + version: 1.3.2 + resolution: "@scure/bip32@npm:1.3.2" + dependencies: + "@noble/curves": ~1.2.0 + "@noble/hashes": ~1.3.2 + "@scure/base": ~1.1.2 + checksum: c5ae84fae43490853693b481531132b89e056d45c945fc8b92b9d032577f753dfd79c5a7bbcbf0a7f035951006ff0311b6cf7a389e26c9ec6335e42b20c53157 + languageName: node + linkType: hard + "@scure/bip32@npm:1.3.3": version: 1.3.3 resolution: "@scure/bip32@npm:1.3.3" @@ -1768,6 +2190,16 @@ __metadata: languageName: node linkType: hard +"@scure/bip39@npm:1.2.1": + version: 1.2.1 + resolution: "@scure/bip39@npm:1.2.1" + dependencies: + "@noble/hashes": ~1.3.0 + "@scure/base": ~1.1.0 + checksum: c5bd6f1328fdbeae2dcdd891825b1610225310e5e62a4942714db51066866e4f7bef242c7b06a1b9dcc8043a4a13412cf5c5df76d3b10aa9e36b82e9b6e3eeaa + languageName: node + linkType: hard + "@scure/bip39@npm:1.2.2": version: 1.2.2 resolution: "@scure/bip39@npm:1.2.2" @@ -1874,12 +2306,12 @@ __metadata: languageName: node linkType: hard -"@smithy/types@npm:^2.9.1": - version: 2.9.1 - resolution: "@smithy/types@npm:2.9.1" +"@smithy/types@npm:^2.12.0": + version: 2.12.0 + resolution: "@smithy/types@npm:2.12.0" dependencies: - tslib: ^2.5.0 - checksum: 8570affb4abb5d0ead57293977fc915d44be481120defcabb87a3fb1c7b5d2501b117835eca357b5d54ea4bbee08032f9dc3d909ecbf0abb0cec2ca9678ae7bd + tslib: ^2.6.2 + checksum: 2dd93746624d87afbf51c22116fc69f82e95004b78cf681c4a283d908155c22a2b7a3afbd64a3aff7deefb6619276f186e212422ad200df3b42c32ef5330374e languageName: node linkType: hard @@ -1933,10 +2365,30 @@ __metadata: languageName: node linkType: hard +"@trufflesuite/bigint-buffer@npm:1.1.10": + version: 1.1.10 + resolution: "@trufflesuite/bigint-buffer@npm:1.1.10" + dependencies: + node-gyp: latest + node-gyp-build: 4.4.0 + checksum: e1dc5e4fbf348a55e660c0055267021eb04cbbdb7f6b0ee983ad32cd4aae1200be448a2ca3963c7d19c7c936d42f66c1ff8b5e4e2332cb1a9e3f870ff818dce4 + languageName: node + linkType: hard + +"@trufflesuite/bigint-buffer@npm:1.1.9": + version: 1.1.9 + resolution: "@trufflesuite/bigint-buffer@npm:1.1.9" + dependencies: + node-gyp: latest + node-gyp-build: 4.3.0 + checksum: 627dcff2cae7afe31432646232518363869e89b300f90f88ca68d903d0bdc79119975a5bc338223c03c1a4484cfac6d9cf4413ef20933a69eee48dd925519165 + languageName: node + linkType: hard + "@tsconfig/node10@npm:^1.0.7": - version: 1.0.9 - resolution: "@tsconfig/node10@npm:1.0.9" - checksum: a33ae4dc2a621c0678ac8ac4bceb8e512ae75dac65417a2ad9b022d9b5411e863c4c198b6ba9ef659e14b9fb609bbec680841a2e84c1172df7a5ffcf076539df + version: 1.0.11 + resolution: "@tsconfig/node10@npm:1.0.11" + checksum: 51fe47d55fe1b80ec35e6e5ed30a13665fd3a531945350aa74a14a1e82875fb60b350c2f2a5e72a64831b1b6bc02acb6760c30b3738b54954ec2dea82db7a267 languageName: node linkType: hard @@ -1961,7 +2413,7 @@ __metadata: languageName: node linkType: hard -"@typechain/ethers-v5@npm:^10.1.0": +"@typechain/ethers-v5@npm:^10.0.0, @typechain/ethers-v5@npm:^10.1.0": version: 10.2.1 resolution: "@typechain/ethers-v5@npm:10.2.1" dependencies: @@ -1989,6 +2441,20 @@ __metadata: languageName: node linkType: hard +"@typechain/ethers-v6@npm:^0.5.1": + version: 0.5.1 + resolution: "@typechain/ethers-v6@npm:0.5.1" + dependencies: + lodash: ^4.17.15 + ts-essentials: ^7.0.1 + peerDependencies: + ethers: 6.x + typechain: ^8.3.2 + typescript: ">=4.7.0" + checksum: 44e7970ce95eeb1a02019f8a53bbe30dcb87664e1df15fe436ae48eea1bf91ca72b5b230eac1bdf9cbe9b55bc488b54c6273e6f77155eaeff885fb34cfcd1108 + languageName: node + linkType: hard + "@typechain/hardhat@npm:^6.1.2": version: 6.1.6 resolution: "@typechain/hardhat@npm:6.1.6" @@ -2005,12 +2471,10 @@ __metadata: languageName: node linkType: hard -"@types/async-eventemitter@npm:^0.2.1": - version: 0.2.4 - resolution: "@types/async-eventemitter@npm:0.2.4" - dependencies: - "@types/events": "*" - checksum: cee62e258cf02a45688a3f6f517b623270a9c2779dfd2f53b52e0efbcb0282d7078c3ce1fafb2af257aefdb892acc09ba51d93647930885414ec719437430bf7 +"@types/abstract-leveldown@npm:*": + version: 7.2.5 + resolution: "@types/abstract-leveldown@npm:7.2.5" + checksum: 3a99b13c81a53a62b42bea9cff326880de3146b4eeff528b039be69a268515b3120a6c12142e96646fcb0a03c463f298998581e86d9ddb29fbea3612f40edb2b languageName: node linkType: hard @@ -2054,9 +2518,9 @@ __metadata: linkType: hard "@types/chai@npm:*, @types/chai@npm:^4.3.1": - version: 4.3.11 - resolution: "@types/chai@npm:4.3.11" - checksum: d0c05fe5d02b2e6bbca2bd4866a2ab20a59cf729bc04af0060e7a3277eaf2fb65651b90d4c74b0ebf1d152b4b1d49fa8e44143acef276a2bbaa7785fbe5642d3 + version: 4.3.14 + resolution: "@types/chai@npm:4.3.14" + checksum: 962c67d1295005886ced8f87c73614616f6d65ed1ec71818021c9206decbaab1234da878295ba52450883c78a8ee5e1359e5deeadee3b7d058538b0ae8c67b08 languageName: node linkType: hard @@ -2085,13 +2549,6 @@ __metadata: languageName: node linkType: hard -"@types/events@npm:*": - version: 3.0.3 - resolution: "@types/events@npm:3.0.3" - checksum: 50af9312fab001fd6bd4bb3ff65830f940877e6778de140a92481a0d9bf5f4853d44ec758a8800ef60e0598ac43ed1b5688116a3c65906ae54e989278d6c7c82 - languageName: node - linkType: hard - "@types/form-data@npm:0.0.33": version: 0.0.33 resolution: "@types/form-data@npm:0.0.33" @@ -2141,6 +2598,24 @@ __metadata: languageName: node linkType: hard +"@types/level-errors@npm:*": + version: 3.0.2 + resolution: "@types/level-errors@npm:3.0.2" + checksum: 3d9b801f6499f795b60ac723c1b3f93ca105f20ed26966eeb606c804b10c65984c3233fb99914644d75a3223f80f220eca74fda316640a85a5b3d7572cd86925 + languageName: node + linkType: hard + +"@types/levelup@npm:^4.3.0": + version: 4.3.3 + resolution: "@types/levelup@npm:4.3.3" + dependencies: + "@types/abstract-leveldown": "*" + "@types/level-errors": "*" + "@types/node": "*" + checksum: 04969bb805035960b8d6650e8f76893be7ba70267bb7012f6f00d67a0cf096ada552355629791b3f5925e9cdb6912d3fe08892c33c3c583e8fd02099b573bdd7 + languageName: node + linkType: hard + "@types/long@npm:^4.0.1": version: 4.0.2 resolution: "@types/long@npm:4.0.2" @@ -2148,7 +2623,7 @@ __metadata: languageName: node linkType: hard -"@types/lru-cache@npm:^5.1.0": +"@types/lru-cache@npm:5.1.1, @types/lru-cache@npm:^5.1.0": version: 5.1.1 resolution: "@types/lru-cache@npm:5.1.1" checksum: e1d6c0085f61b16ec5b3073ec76ad1be4844ea036561c3f145fc19f71f084b58a6eb600b14128aa95809d057d28f1d147c910186ae51219f58366ffd2ff2e118 @@ -2185,7 +2660,7 @@ __metadata: languageName: node linkType: hard -"@types/node-fetch@npm:^2.5.5": +"@types/node-fetch@npm:^2.5.5, @types/node-fetch@npm:^2.6.1": version: 2.6.11 resolution: "@types/node-fetch@npm:2.6.11" dependencies: @@ -2196,11 +2671,25 @@ __metadata: linkType: hard "@types/node@npm:*, @types/node@npm:>=13.7.0": - version: 20.11.16 - resolution: "@types/node@npm:20.11.16" + version: 20.12.7 + resolution: "@types/node@npm:20.12.7" dependencies: undici-types: ~5.26.4 - checksum: 51f0831c1219bf4698e7430aeb9892237bd851deeb25ce23c5bb0ceefcc77c3b114e48f4e98d9fc26def5a87ba9d8079f0281dd37bee691140a93f133812c152 + checksum: 7cc979f7e2ca9a339ec71318c3901b9978555257929ef3666987f3e447123bc6dc92afcc89f6347e09e07d602fde7d51bcddea626c23aa2bb74aeaacfd1e1686 + languageName: node + linkType: hard + +"@types/node@npm:11.11.6": + version: 11.11.6 + resolution: "@types/node@npm:11.11.6" + checksum: 075f1c011cf568e49701419acbcb55c24906b3bb5a34d9412a3b88f228a7a78401a5ad4d3e1cd6855c99aaea5ef96e37fc86ca097e50f06da92cf822befc1fff + languageName: node + linkType: hard + +"@types/node@npm:18.15.13": + version: 18.15.13 + resolution: "@types/node@npm:18.15.13" + checksum: 79cc5a2b5f98e8973061a4260a781425efd39161a0e117a69cd089603964816c1a14025e1387b4590c8e82d05133b7b4154fa53a7dffb3877890a66145e76515 languageName: node linkType: hard @@ -2219,11 +2708,11 @@ __metadata: linkType: hard "@types/node@npm:^18.6.1": - version: 18.19.14 - resolution: "@types/node@npm:18.19.14" + version: 18.19.31 + resolution: "@types/node@npm:18.19.31" dependencies: undici-types: ~5.26.4 - checksum: 3d42b50e649f18c6ca7044714eaeb51ba5fda463c845eeb1973bcbbfcab8e93179501fbf865e675cb0c7a5e59f7ea18eca8296b52c2455c856aa45c77ae815dc + checksum: 949bddfd7071bd47300d1f33d380ee34695ccd5f046f1a03e4d2be0d953ace896905144d44a6f483f241b5ef34b86f0e40a0e312201117782eecf89e81a4ff13 languageName: node linkType: hard @@ -2258,19 +2747,9 @@ __metadata: linkType: hard "@types/qs@npm:^6.2.31": - version: 6.9.11 - resolution: "@types/qs@npm:6.9.11" - checksum: 620ca1628bf3da65662c54ed6ebb120b18a3da477d0bfcc872b696685a9bb1893c3c92b53a1190a8f54d52eaddb6af8b2157755699ac83164604329935e8a7f2 - languageName: node - linkType: hard - -"@types/readable-stream@npm:^2.3.13": - version: 2.3.15 - resolution: "@types/readable-stream@npm:2.3.15" - dependencies: - "@types/node": "*" - safe-buffer: ~5.1.1 - checksum: ec36f525cad09b6c65a1dafcb5ad99b9e2ed824ec49b7aa23180ac427e5d35b8a0706193ecd79ab4253a283ad485ba03d5917a98daaaa144f0ea34f4823e9d82 + version: 6.9.15 + resolution: "@types/qs@npm:6.9.15" + checksum: 97d8208c2b82013b618e7a9fc14df6bd40a73e1385ac479b6896bafc7949a46201c15f42afd06e86a05e914f146f495f606b6fb65610cc60cf2e0ff743ec38a2 languageName: node linkType: hard @@ -2301,10 +2780,17 @@ __metadata: languageName: node linkType: hard +"@types/seedrandom@npm:3.0.1": + version: 3.0.1 + resolution: "@types/seedrandom@npm:3.0.1" + checksum: d9755452f224a4f5072a1d8738da6c9de3039fc59a2a449b1f658e51087be7b48ada49bcabc8b0f16633c095f55598c32fcd072c448858422a2f6a0566569e4c + languageName: node + linkType: hard + "@types/semver@npm:^7.3.12": - version: 7.5.6 - resolution: "@types/semver@npm:7.5.6" - checksum: 563a0120ec0efcc326567db2ed920d5d98346f3638b6324ea6b50222b96f02a8add3c51a916b6897b51523aad8ac227d21d3dcf8913559f1bfc6c15b14d23037 + version: 7.5.8 + resolution: "@types/semver@npm:7.5.8" + checksum: ea6f5276f5b84c55921785a3a27a3cd37afee0111dfe2bcb3e03c31819c197c782598f17f0b150a69d453c9584cd14c4c4d7b9a55d2c5e6cacd4d66fdb3b3663 languageName: node linkType: hard @@ -2538,6 +3024,64 @@ __metadata: languageName: node linkType: hard +"@uniswap/lib@npm:1.1.1": + version: 1.1.1 + resolution: "@uniswap/lib@npm:1.1.1" + checksum: 2ec6689f606a0cf7dc7acd8b7471997638b2c89202c52743dcb4dfc0df182f6e058ec1a5e4d94a872c81bb85cbcde9e4a46b6de45eea0d34582627d97e743c7b + languageName: node + linkType: hard + +"@uniswap/lib@npm:^4.0.1-alpha": + version: 4.0.1-alpha + resolution: "@uniswap/lib@npm:4.0.1-alpha" + checksum: d7bbacccef40966af16c7e215ab085f575686d316b2802c9e1cfd03f7ad351970e547535670a28b2279c3cfcc4fb02888614c46f94efe2987af2309f3ec86127 + languageName: node + linkType: hard + +"@uniswap/v2-core@npm:1.0.0": + version: 1.0.0 + resolution: "@uniswap/v2-core@npm:1.0.0" + checksum: 41e42ad801dbc058ebf0ab38a8ce3195990e21eff4b2d49cd0a8c8fd25ac067feed55c379f2be22d915a7601d94966ae66127b748b2d3acde20eeb2351e51703 + languageName: node + linkType: hard + +"@uniswap/v2-core@npm:^1.0.1": + version: 1.0.1 + resolution: "@uniswap/v2-core@npm:1.0.1" + checksum: eaa118fe45eac2e80b7468547ce2cde12bd3c8157555d2e40e0462a788c9506c6295247b511382da85e44a89ad92aff7bb3433b23bfbd2eeea23942ecd46e979 + languageName: node + linkType: hard + +"@uniswap/v2-periphery@npm:^1.1.0-beta.0": + version: 1.1.0-beta.0 + resolution: "@uniswap/v2-periphery@npm:1.1.0-beta.0" + dependencies: + "@uniswap/lib": 1.1.1 + "@uniswap/v2-core": 1.0.0 + checksum: af13224c9f28f817be6e5794a7590b8433788e5387912343a8d61227a42b494b431fe6e549505e87d96a6896e96e289f80d92c68788eea4917596ec7fd94734e + languageName: node + linkType: hard + +"@uniswap/v3-core@npm:^1.0.0": + version: 1.0.1 + resolution: "@uniswap/v3-core@npm:1.0.1" + checksum: 4bfd8b218391a3d9efde44e0f984cfec3bc25889cd4d1386766828521006e71b210a3583ee32b52f3c81d384af9e8c39f471f2229e9af4d50da6801446ecb3e4 + languageName: node + linkType: hard + +"@uniswap/v3-periphery@npm:^1.1.0": + version: 1.4.4 + resolution: "@uniswap/v3-periphery@npm:1.4.4" + 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 + checksum: 48b57f1f648cb002935421ac1770666ab3c0263885a03c769985b06501b88d513a435c8edc439b41ac5aef7ad40a11038a3561f7e828cce5ae6ec2c77742f1af + languageName: node + linkType: hard + "@yarnpkg/lockfile@npm:^1.1.0": version: 1.1.0 resolution: "@yarnpkg/lockfile@npm:1.1.0" @@ -2590,6 +3134,21 @@ __metadata: languageName: node linkType: hard +"abitype@npm:1.0.0": + version: 1.0.0 + resolution: "abitype@npm:1.0.0" + peerDependencies: + typescript: ">=5.0.4" + zod: ^3 >=3.22.0 + peerDependenciesMeta: + typescript: + optional: true + zod: + optional: true + checksum: ea2c0548c3ba58c37a6de7483d63389074da498e63d803b742bbe94eb4eaa1f51a35d000c424058b2583aef56698cf07c696eb3bc4dd0303bc20c6f0826a241a + languageName: node + linkType: hard + "abort-controller@npm:^3.0.0": version: 3.0.0 resolution: "abort-controller@npm:3.0.0" @@ -2599,21 +3158,6 @@ __metadata: languageName: node linkType: hard -"abstract-level@npm:^1.0.0, abstract-level@npm:^1.0.2, abstract-level@npm:^1.0.3, abstract-level@npm:^1.0.4": - version: 1.0.4 - resolution: "abstract-level@npm:1.0.4" - dependencies: - buffer: ^6.0.3 - catering: ^2.1.0 - is-buffer: ^2.0.5 - level-supports: ^4.0.0 - level-transcoder: ^1.0.1 - module-error: ^1.0.1 - queue-microtask: ^1.2.3 - checksum: 5b70d08926f5234c3c23ffca848542af4def780dc96d6ca35a81659af80e6439c46f5106bd14a5ea37465173d7dcc8294317048b0194fdf6480103edc4aa9e63 - languageName: node - linkType: hard - "abstract-leveldown@npm:3.0.0": version: 3.0.0 resolution: "abstract-leveldown@npm:3.0.0" @@ -2641,6 +3185,33 @@ __metadata: languageName: node linkType: hard +"abstract-leveldown@npm:^6.2.1": + version: 6.3.0 + resolution: "abstract-leveldown@npm:6.3.0" + dependencies: + buffer: ^5.5.0 + immediate: ^3.2.3 + level-concat-iterator: ~2.0.0 + level-supports: ~1.0.0 + xtend: ~4.0.0 + checksum: 121a8509d8c6a540e656c2a69e5b8d853d4df71072011afefc868b98076991bb00120550e90643de9dc18889c675f62413409eeb4c8c204663124c7d215e4ec3 + languageName: node + linkType: hard + +"abstract-leveldown@npm:^7.2.0": + version: 7.2.0 + resolution: "abstract-leveldown@npm:7.2.0" + dependencies: + buffer: ^6.0.3 + catering: ^2.0.0 + is-buffer: ^2.0.5 + level-concat-iterator: ^3.0.0 + level-supports: ^2.0.1 + queue-microtask: ^1.2.3 + checksum: d558111f2d123da95ac80b8ba3b9b0a5bc8cd87296e64b05dca693f5f4839aa0e2fc97bad56a101766f499824e2962611750f8a76bbac4a5db35801968fbbe02 + languageName: node + linkType: hard + "abstract-leveldown@npm:~2.6.0": version: 2.6.3 resolution: "abstract-leveldown@npm:2.6.3" @@ -2650,6 +3221,19 @@ __metadata: languageName: node linkType: hard +"abstract-leveldown@npm:~6.2.1": + version: 6.2.3 + resolution: "abstract-leveldown@npm:6.2.3" + dependencies: + buffer: ^5.5.0 + immediate: ^3.2.3 + level-concat-iterator: ~2.0.0 + level-supports: ~1.0.0 + xtend: ~4.0.0 + checksum: 00202b2eb7955dd7bc04f3e44d225e60160cedb8f96fe6ae0e6dca9c356d57071f001ece8ae1d53f48095c4c036d92b3440f2bc7666730610ddea030f9fbde4a + languageName: node + linkType: hard + "accepts@npm:~1.3.8": version: 1.3.8 resolution: "accepts@npm:1.3.8" @@ -2694,13 +3278,6 @@ __metadata: languageName: node linkType: hard -"address@npm:^1.0.1": - version: 1.2.2 - resolution: "address@npm:1.2.2" - checksum: ace439960c1e3564d8f523aff23a841904bf33a2a7c2e064f7f60a064194075758b9690e65bd9785692a4ef698a998c57eb74d145881a1cecab8ba658ddb1607 - languageName: node - linkType: hard - "adm-zip@npm:^0.4.16": version: 0.4.16 resolution: "adm-zip@npm:0.4.16" @@ -2715,6 +3292,13 @@ __metadata: languageName: node linkType: hard +"aes-js@npm:4.0.0-beta.5": + version: 4.0.0-beta.5 + resolution: "aes-js@npm:4.0.0-beta.5" + checksum: cc2ea969d77df939c32057f7e361b6530aa6cb93cb10617a17a45cd164e6d761002f031ff6330af3e67e58b1f0a3a8fd0b63a720afd591a653b02f649470e15b + languageName: node + linkType: hard + "aes-js@npm:^3.1.1": version: 3.1.2 resolution: "aes-js@npm:3.1.2" @@ -2731,12 +3315,12 @@ __metadata: languageName: node linkType: hard -"agent-base@npm:^7.0.2, agent-base@npm:^7.1.0": - version: 7.1.0 - resolution: "agent-base@npm:7.1.0" +"agent-base@npm:^7.0.2, agent-base@npm:^7.1.0, agent-base@npm:^7.1.1": + version: 7.1.1 + resolution: "agent-base@npm:7.1.1" dependencies: debug: ^4.3.4 - checksum: f7828f991470a0cc22cb579c86a18cbae83d8a3cbed39992ab34fc7217c4d126017f1c74d0ab66be87f71455318a8ea3e757d6a37881b8d0f2a2c6aa55e5418f + checksum: 51c158769c5c051482f9ca2e6e1ec085ac72b5a418a9b31b4e82fe6c0a6699adb94c1c42d246699a587b3335215037091c79e0de512c516f73b6ea844202f037 languageName: node linkType: hard @@ -2774,16 +3358,16 @@ __metadata: languageName: node linkType: hard -"amazon-cognito-identity-js@npm:^6.0.1": - version: 6.3.10 - resolution: "amazon-cognito-identity-js@npm:6.3.10" +"amazon-cognito-identity-js@npm:^6.0.1, amazon-cognito-identity-js@npm:^6.3.6": + version: 6.3.13 + resolution: "amazon-cognito-identity-js@npm:6.3.13" dependencies: "@aws-crypto/sha256-js": 1.2.2 buffer: 4.9.2 fast-base64-decode: ^1.0.0 isomorphic-unfetch: ^3.0.0 js-cookie: ^2.2.1 - checksum: c82aaaff8a0e9485d00c3c2541d5bfdea0112c2eced27bc9cbdf9a92c31aa6bcc2e389e429582e6aa115f5fd0394843f47c09bae84ec0c649ddcac16d6fa6756 + checksum: 8a608ef1b99fca57d87103ceb2706d38e499a548d7724f194d50a709fa564ec63dbc703ded6a106e112d5443d06859f40e242815c25c465fdee4806bbce79459 languageName: node linkType: hard @@ -2794,6 +3378,15 @@ __metadata: languageName: node linkType: hard +"ampleforth-contracts@https://github.com/ampleforth/ampleforth-contracts#master": + version: 0.0.1 + resolution: "ampleforth-contracts@https://github.com/ampleforth/ampleforth-contracts.git#commit=d6cbb023e670159edf85fb6386c47fd7b6b0f6e9" + dependencies: + "@openzeppelin/contracts-upgradeable": ^4.7.3 + checksum: c544fa68e4b1b6db93c51bf8144cfdf06dba77b018f725b75d42baa1a8a4973bb5212a9f28658503880d4cd947b8fb8ce7145826d4b6e0253ea70c0feeb286ec + languageName: node + linkType: hard + "ansi-align@npm:^3.0.0": version: 3.0.1 resolution: "ansi-align@npm:3.0.1" @@ -3035,7 +3628,7 @@ __metadata: languageName: node linkType: hard -"array-buffer-byte-length@npm:^1.0.0, array-buffer-byte-length@npm:^1.0.1": +"array-buffer-byte-length@npm:^1.0.1": version: 1.0.1 resolution: "array-buffer-byte-length@npm:1.0.1" dependencies: @@ -3053,15 +3646,16 @@ __metadata: linkType: hard "array-includes@npm:^3.1.7": - version: 3.1.7 - resolution: "array-includes@npm:3.1.7" + version: 3.1.8 + resolution: "array-includes@npm:3.1.8" dependencies: - call-bind: ^1.0.2 - define-properties: ^1.2.0 - es-abstract: ^1.22.1 - get-intrinsic: ^1.2.1 + call-bind: ^1.0.7 + define-properties: ^1.2.1 + es-abstract: ^1.23.2 + es-object-atoms: ^1.0.0 + get-intrinsic: ^1.2.4 is-string: ^1.0.7 - checksum: 06f9e4598fac12a919f7c59a3f04f010ea07f0b7f0585465ed12ef528a60e45f374e79d1bddbb34cdd4338357d00023ddbd0ac18b0be36964f5e726e8965d7fc + checksum: eb39ba5530f64e4d8acab39297c11c1c5be2a4ea188ab2b34aba5fb7224d918f77717a9d57a3e2900caaa8440e59431bdaf5c974d5212ef65d97f132e38e2d91 languageName: node linkType: hard @@ -3086,42 +3680,31 @@ __metadata: languageName: node linkType: hard -"array.prototype.filter@npm:^1.0.3": - version: 1.0.3 - resolution: "array.prototype.filter@npm:1.0.3" - dependencies: - call-bind: ^1.0.2 - define-properties: ^1.2.0 - es-abstract: ^1.22.1 - es-array-method-boxes-properly: ^1.0.0 - is-string: ^1.0.7 - checksum: 5443cde6ad64596649e5751252b1b2f5242b41052980c2fb2506ba485e3ffd7607e8f6f2f1aefa0cb1cfb9b8623b2b2be103579cb367a161a3426400619b6e73 - languageName: node - linkType: hard - "array.prototype.findlast@npm:^1.2.2": - version: 1.2.3 - resolution: "array.prototype.findlast@npm:1.2.3" - dependencies: - call-bind: ^1.0.2 - define-properties: ^1.2.0 - es-abstract: ^1.22.1 - es-shim-unscopables: ^1.0.0 - get-intrinsic: ^1.2.1 - checksum: 853d359bac5c4ce7354e5f2f2930f09eb47eeed18b6d6fb630cf6fa1fe4f32217fd27d07ee4aeeb3d1fd710538cf7bc00d4efc34df64da49fff0b13f57b0d66f + version: 1.2.5 + resolution: "array.prototype.findlast@npm:1.2.5" + dependencies: + call-bind: ^1.0.7 + define-properties: ^1.2.1 + es-abstract: ^1.23.2 + es-errors: ^1.3.0 + es-object-atoms: ^1.0.0 + es-shim-unscopables: ^1.0.2 + checksum: 83ce4ad95bae07f136d316f5a7c3a5b911ac3296c3476abe60225bc4a17938bf37541972fcc37dd5adbc99cbb9c928c70bbbfc1c1ce549d41a415144030bb446 languageName: node linkType: hard "array.prototype.findlastindex@npm:^1.2.3": - version: 1.2.3 - resolution: "array.prototype.findlastindex@npm:1.2.3" + version: 1.2.5 + resolution: "array.prototype.findlastindex@npm:1.2.5" dependencies: - call-bind: ^1.0.2 - define-properties: ^1.2.0 - es-abstract: ^1.22.1 - es-shim-unscopables: ^1.0.0 - get-intrinsic: ^1.2.1 - checksum: 31f35d7b370c84db56484618132041a9af401b338f51899c2e78ef7690fbba5909ee7ca3c59a7192085b328cc0c68c6fd1f6d1553db01a689a589ae510f3966e + call-bind: ^1.0.7 + define-properties: ^1.2.1 + es-abstract: ^1.23.2 + es-errors: ^1.3.0 + es-object-atoms: ^1.0.0 + es-shim-unscopables: ^1.0.2 + checksum: 2c81cff2a75deb95bf1ed89b6f5f2bfbfb882211e3b7cc59c3d6b87df774cd9d6b36949a8ae39ac476e092c1d4a4905f5ee11a86a456abb10f35f8211ae4e710 languageName: node linkType: hard @@ -3150,19 +3733,21 @@ __metadata: linkType: hard "array.prototype.reduce@npm:^1.0.6": - version: 1.0.6 - resolution: "array.prototype.reduce@npm:1.0.6" + version: 1.0.7 + resolution: "array.prototype.reduce@npm:1.0.7" dependencies: - call-bind: ^1.0.2 - define-properties: ^1.2.0 - es-abstract: ^1.22.1 + 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 - checksum: c709c3f5caa2aac4fb10e0c6c1982cca50328a2a48658d53b1da8ee3a78069ad67cdac21296d6285521aa3a932a8178c0e192b5fc831fae2977b69a5a8a64ad7 + checksum: 90303617bd70c8e9a81ebff041d3e10fad1a97f163699cb015b7c84a3f9e6960d9bb161a30f1d0309d6e476f166af5668c1e24f7add3202213d25f7c7f15475d languageName: node linkType: hard -"arraybuffer.prototype.slice@npm:^1.0.2": +"arraybuffer.prototype.slice@npm:^1.0.3": version: 1.0.3 resolution: "arraybuffer.prototype.slice@npm:1.0.3" dependencies: @@ -3185,15 +3770,14 @@ __metadata: languageName: node linkType: hard -"asn1.js@npm:^5.2.0": - version: 5.4.1 - resolution: "asn1.js@npm:5.4.1" +"asn1.js@npm:^4.10.1": + version: 4.10.1 + resolution: "asn1.js@npm:4.10.1" dependencies: bn.js: ^4.0.0 inherits: ^2.0.1 minimalistic-assert: ^1.0.0 - safer-buffer: ^2.1.0 - checksum: 3786a101ac6f304bd4e9a7df79549a7561950a13d4bcaec0c7790d44c80d147c1a94ba3d4e663673406064642a40b23fcd6c82a9952468e386c1a1376d747f9a + checksum: 9289a1a55401238755e3142511d7b8f6fc32f08c86ff68bd7100da8b6c186179dd6b14234fba2f7f6099afcd6758a816708485efe44bc5b2a6ec87d9ceeddbb5 languageName: node linkType: hard @@ -3338,10 +3922,12 @@ __metadata: languageName: node linkType: hard -"available-typed-arrays@npm:^1.0.5, available-typed-arrays@npm:^1.0.6": - version: 1.0.6 - resolution: "available-typed-arrays@npm:1.0.6" - checksum: 8295571eb86447138adf64a0df0c08ae61250b17190bba30e1fae8c80a816077a6d028e5506f602c382c0197d3080bae131e92e331139d55460989580eeae659 +"available-typed-arrays@npm:^1.0.7": + version: 1.0.7 + resolution: "available-typed-arrays@npm:1.0.7" + dependencies: + possible-typed-array-names: ^1.0.0 + checksum: 1aa3ffbfe6578276996de660848b6e95669d9a95ad149e3dd0c0cda77db6ee1dbd9d1dd723b65b6d277b882dd0c4b91a654ae9d3cf9e1254b7e93e4908d78fd3 languageName: node linkType: hard @@ -3368,14 +3954,25 @@ __metadata: languageName: node linkType: hard -"axios@npm:^1.4.0, axios@npm:^1.5.1": - version: 1.6.7 - resolution: "axios@npm:1.6.7" +"axios@npm:^1.4.0, axios@npm:^1.6.7": + version: 1.6.8 + resolution: "axios@npm:1.6.8" + dependencies: + follow-redirects: ^1.15.6 + form-data: ^4.0.0 + proxy-from-env: ^1.1.0 + checksum: bf007fa4b207d102459300698620b3b0873503c6d47bf5a8f6e43c0c64c90035a4f698b55027ca1958f61ab43723df2781c38a99711848d232cad7accbcdfcdd + languageName: node + linkType: hard + +"axios@npm:^1.5.1": + version: 1.7.2 + resolution: "axios@npm:1.7.2" dependencies: - follow-redirects: ^1.15.4 + follow-redirects: ^1.15.6 form-data: ^4.0.0 proxy-from-env: ^1.1.0 - checksum: 87d4d429927d09942771f3b3a6c13580c183e31d7be0ee12f09be6d5655304996bb033d85e54be81606f4e89684df43be7bf52d14becb73a12727bf33298a082 + checksum: e457e2b0ab748504621f6fa6609074ac08c824bf0881592209dfa15098ece7e88495300e02cd22ba50b3468fd712fe687e629dcb03d6a3f6a51989727405aedf languageName: node linkType: hard @@ -4040,6 +4637,13 @@ __metadata: languageName: node linkType: hard +"base64-sol@npm:1.0.1": + version: 1.0.1 + resolution: "base64-sol@npm:1.0.1" + checksum: be0f9e8cf3c744256913223fbae8187773f530cc096e98a77f49ef0bd6cedeb294d15a784e439419f7cb99f07bf85b08999169feafafa1a9e29c3affc0bc6d0a + languageName: node + linkType: hard + "base@npm:^0.11.1": version: 0.11.2 resolution: "base@npm:0.11.2" @@ -4071,13 +4675,6 @@ __metadata: languageName: node linkType: hard -"bigint-crypto-utils@npm:^3.0.23": - version: 3.3.0 - resolution: "bigint-crypto-utils@npm:3.3.0" - checksum: 9598ce57b23f776c8936d44114c9f051e62b5fa654915b664784cbcbacc5aa0485f4479571c51ff58008abb1210c0d6a234853742f07cf84bda890f2a1e01000 - languageName: node - linkType: hard - "bignumber.js@npm:^9.0.0": version: 9.1.2 resolution: "bignumber.js@npm:9.1.2" @@ -4086,9 +4683,9 @@ __metadata: linkType: hard "binary-extensions@npm:^2.0.0": - version: 2.2.0 - resolution: "binary-extensions@npm:2.2.0" - checksum: ccd267956c58d2315f5d3ea6757cf09863c5fc703e50fbeb13a7dc849b812ef76e3cf9ca8f35a0c48498776a7478d7b4a0418e1e2b8cb9cb9731f2922aaad7f8 + version: 2.3.0 + resolution: "binary-extensions@npm:2.3.0" + checksum: bcad01494e8a9283abf18c1b967af65ee79b0c6a9e6fcfafebfe91dbe6e0fc7272bafb73389e198b310516ae04f7ad17d79aacf6cb4c0d5d5202a7e2e52c7d98 languageName: node linkType: hard @@ -4116,6 +4713,18 @@ __metadata: languageName: node linkType: hard +"bip39@npm:3.0.4": + version: 3.0.4 + resolution: "bip39@npm:3.0.4" + dependencies: + "@types/node": 11.11.6 + create-hash: ^1.1.0 + pbkdf2: ^3.0.9 + randombytes: ^2.0.1 + checksum: 79ce1600a03d1ba5053bdd4e6323f9463ec340764c7e52918b6c6b9dca81221940f2d9a65656447f108f9bc2c8d9ae8df319cca83bbd1dad63f53ef2768d9bae + languageName: node + linkType: hard + "bl@npm:^1.0.0": version: 1.2.3 resolution: "bl@npm:1.2.3" @@ -4156,7 +4765,7 @@ __metadata: languageName: node linkType: hard -"bn.js@npm:^4.0.0, bn.js@npm:^4.1.0, bn.js@npm:^4.10.0, bn.js@npm:^4.11.0, bn.js@npm:^4.11.6, bn.js@npm:^4.11.8, bn.js@npm:^4.11.9, bn.js@npm:^4.8.0": +"bn.js@npm:^4.0.0, bn.js@npm:^4.1.0, bn.js@npm:^4.10.0, bn.js@npm:^4.11.0, bn.js@npm:^4.11.1, bn.js@npm:^4.11.6, bn.js@npm:^4.11.8, bn.js@npm:^4.11.9, bn.js@npm:^4.8.0": version: 4.12.0 resolution: "bn.js@npm:4.12.0" checksum: 39afb4f15f4ea537b55eaf1446c896af28ac948fdcf47171961475724d1bb65118cca49fa6e3d67706e4790955ec0e74de584e45c8f1ef89f46c812bee5b5a12 @@ -4170,27 +4779,7 @@ __metadata: languageName: node linkType: hard -"body-parser@npm:1.20.1": - version: 1.20.1 - resolution: "body-parser@npm:1.20.1" - dependencies: - bytes: 3.1.2 - content-type: ~1.0.4 - debug: 2.6.9 - depd: 2.0.0 - destroy: 1.2.0 - http-errors: 2.0.0 - iconv-lite: 0.4.24 - on-finished: 2.4.1 - qs: 6.11.0 - raw-body: 2.5.1 - type-is: ~1.6.18 - unpipe: 1.0.0 - checksum: f1050dbac3bede6a78f0b87947a8d548ce43f91ccc718a50dd774f3c81f2d8b04693e52acf62659fad23101827dd318da1fb1363444ff9a8482b886a3e4a5266 - languageName: node - linkType: hard - -"body-parser@npm:^1.16.0": +"body-parser@npm:1.20.2, body-parser@npm:^1.16.0": version: 1.20.2 resolution: "body-parser@npm:1.20.2" dependencies: @@ -4272,6 +4861,15 @@ __metadata: languageName: node linkType: hard +"braces@npm:^3.0.3": + version: 3.0.3 + resolution: "braces@npm:3.0.3" + dependencies: + fill-range: ^7.1.1 + checksum: b95aa0b3bd909f6cd1720ffcf031aeaf46154dd88b4da01f9a1d3f7ea866a79eba76a6d01cbc3c422b2ee5cdc39a4f02491058d5df0d7bf6e6a162a832df1f69 + languageName: node + linkType: hard + "brorand@npm:^1.0.1, brorand@npm:^1.1.0": version: 1.1.0 resolution: "brorand@npm:1.1.0" @@ -4279,15 +4877,10 @@ __metadata: languageName: node linkType: hard -"browser-level@npm:^1.0.1": - version: 1.0.1 - resolution: "browser-level@npm:1.0.1" - dependencies: - abstract-level: ^1.0.2 - catering: ^2.1.1 - module-error: ^1.0.2 - run-parallel-limit: ^1.1.0 - checksum: 67fbc77ce832940bfa25073eccff279f512ad56f545deb996a5b23b02316f5e76f4a79d381acc27eda983f5c9a2566aaf9c97e4fdd0748288c4407307537a29b +"brotli-wasm@npm:^2.0.1": + version: 2.0.1 + resolution: "brotli-wasm@npm:2.0.1" + checksum: 3a0506c66ad3a27512deebee3a9c9a0c59cd1dc7de0c1934c37f0a7b8772de8aa22093fb1fb466c8fdd1cd80f99e5a7c814ff1235350853fb1cd4129d99609f5 languageName: node linkType: hard @@ -4305,7 +4898,7 @@ __metadata: languageName: node linkType: hard -"browserify-aes@npm:^1.0.0, browserify-aes@npm:^1.0.4, browserify-aes@npm:^1.2.0": +"browserify-aes@npm:^1.0.4, browserify-aes@npm:^1.2.0": version: 1.2.0 resolution: "browserify-aes@npm:1.2.0" dependencies: @@ -4353,19 +4946,20 @@ __metadata: linkType: hard "browserify-sign@npm:^4.0.0": - version: 4.2.2 - resolution: "browserify-sign@npm:4.2.2" + version: 4.2.3 + resolution: "browserify-sign@npm:4.2.3" dependencies: bn.js: ^5.2.1 browserify-rsa: ^4.1.0 create-hash: ^1.2.0 create-hmac: ^1.1.7 - elliptic: ^6.5.4 + elliptic: ^6.5.5 + hash-base: ~3.0 inherits: ^2.0.4 - parse-asn1: ^5.1.6 - readable-stream: ^3.6.2 + parse-asn1: ^5.1.7 + readable-stream: ^2.3.8 safe-buffer: ^5.2.1 - checksum: b622730c0fc183328c3a1c9fdaaaa5118821ed6822b266fa6b0375db7e20061ebec87301d61931d79b9da9a96ada1cab317fce3c68f233e5e93ed02dbb35544c + checksum: 403a8061d229ae31266670345b4a7c00051266761d2c9bbeb68b1a9bcb05f68143b16110cf23a171a5d6716396a1f41296282b3e73eeec0a1871c77f0ff4ee6b languageName: node linkType: hard @@ -4486,6 +5080,16 @@ __metadata: languageName: node linkType: hard +"bufferutil@npm:4.0.5": + version: 4.0.5 + resolution: "bufferutil@npm:4.0.5" + dependencies: + node-gyp: latest + node-gyp-build: ^4.3.0 + checksum: 37d5bef7cb38d29f9377b8891ff8a57f53ae6057313d77a8aa2a7417df37a72f16987100796cb2f1e1862f3eb80057705f3c052615ec076a0dcc7aa6c83b68c9 + languageName: node + linkType: hard + "bufferutil@npm:^4.0.1": version: 4.0.8 resolution: "bufferutil@npm:4.0.8" @@ -4497,11 +5101,11 @@ __metadata: linkType: hard "builtins@npm:^5.0.1": - version: 5.0.1 - resolution: "builtins@npm:5.0.1" + version: 5.1.0 + resolution: "builtins@npm:5.1.0" dependencies: semver: ^7.0.0 - checksum: 66d204657fe36522822a95b288943ad11b58f5eaede235b11d8c4edaa28ce4800087d44a2681524c340494aadb120a0068011acabe99d30e8f11a7d826d83515 + checksum: 76327fa85b8e253b26e52f79988148013ea742691b4ab15f7228ebee47dd757832da308c9d4e4fc89763a1773e3f25a9836fff6315df85c7c6c72190436bf11d languageName: node linkType: hard @@ -4615,14 +5219,16 @@ __metadata: languageName: node linkType: hard -"call-bind@npm:^1.0.0, call-bind@npm:^1.0.2, call-bind@npm:^1.0.5, call-bind@npm:~1.0.2": - version: 1.0.5 - resolution: "call-bind@npm:1.0.5" +"call-bind@npm:^1.0.2, call-bind@npm:^1.0.5, call-bind@npm:^1.0.6, call-bind@npm:^1.0.7, call-bind@npm:~1.0.2": + version: 1.0.7 + resolution: "call-bind@npm:1.0.7" dependencies: + es-define-property: ^1.0.0 + es-errors: ^1.3.0 function-bind: ^1.1.2 - get-intrinsic: ^1.2.1 - set-function-length: ^1.1.1 - checksum: 449e83ecbd4ba48e7eaac5af26fea3b50f8f6072202c2dd7c5a6e7a6308f2421abe5e13a3bbd55221087f76320c5e09f25a8fdad1bab2b77c68ae74d92234ea5 + get-intrinsic: ^1.2.4 + set-function-length: ^1.2.1 + checksum: 295c0c62b90dd6522e6db3b0ab1ce26bdf9e7404215bda13cfee25b626b5ff1a7761324d58d38b1ef1607fc65aca2d06e44d2e18d0dfc6c14b465b00d8660029 languageName: node linkType: hard @@ -4655,16 +5261,9 @@ __metadata: linkType: hard "caniuse-lite@npm:^1.0.30000844": - version: 1.0.30001584 - resolution: "caniuse-lite@npm:1.0.30001584" - checksum: de7018759561795ef31864b0d1584735eef267033d4e9b5f046b976756e06c43e85afd46705c5d63c63e3c36484c26794c259b9748eefffa582750b4ad0822ce - languageName: node - linkType: hard - -"case@npm:^1.6.3": - version: 1.6.3 - resolution: "case@npm:1.6.3" - checksum: febe73278f910b0d28aab7efd6f51c235f9aa9e296148edb56dfb83fd58faa88308c30ce9a0122b6e53e0362c44f4407105bd5ef89c46860fc2b184e540fd68d + version: 1.0.30001621 + resolution: "caniuse-lite@npm:1.0.30001621" + checksum: 0afb65bbf558faea769c16e831fbbd5600c684c0f6bb4ffbc0d38528671fb5cb5d88714804241a88c61872ce289f7c6333aef6cfdfb09277bda0dbdf0aab3459 languageName: node linkType: hard @@ -4675,7 +5274,7 @@ __metadata: languageName: node linkType: hard -"catering@npm:^2.1.0, catering@npm:^2.1.1": +"catering@npm:^2.0.0, catering@npm:^2.1.0": version: 2.1.1 resolution: "catering@npm:2.1.1" checksum: 205daefa69c935b0c19f3d8f2e0a520dd69aebe9bda55902958003f7c9cff8f967dfb90071b421bd6eb618576f657a89d2bc0986872c9bc04bbd66655e9d4bd6 @@ -4735,6 +5334,16 @@ __metadata: languageName: node linkType: hard +"chalk@npm:4.1.2, chalk@npm:^4.0.0, chalk@npm:^4.1.0, chalk@npm:^4.1.2": + version: 4.1.2 + resolution: "chalk@npm:4.1.2" + dependencies: + ansi-styles: ^4.1.0 + supports-color: ^7.1.0 + checksum: fe75c9d5c76a7a98d45495b91b2172fa3b7a09e0cc9370e5c8feb1c567b85c4288e2b3fded7cfdd7359ac28d6b3844feb8b82b8686842e93d23c827c417e83fc + languageName: node + linkType: hard + "chalk@npm:^1.1.3": version: 1.1.3 resolution: "chalk@npm:1.1.3" @@ -4769,16 +5378,6 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^4.0.0, chalk@npm:^4.1.0, chalk@npm:^4.1.2": - version: 4.1.2 - resolution: "chalk@npm:4.1.2" - dependencies: - ansi-styles: ^4.1.0 - supports-color: ^7.1.0 - checksum: fe75c9d5c76a7a98d45495b91b2172fa3b7a09e0cc9370e5c8feb1c567b85c4288e2b3fded7cfdd7359ac28d6b3844feb8b82b8686842e93d23c827c417e83fc - languageName: node - linkType: hard - "chardet@npm:^0.7.0": version: 0.7.0 resolution: "chardet@npm:0.7.0" @@ -4811,7 +5410,7 @@ __metadata: languageName: node linkType: hard -"chokidar@npm:3.5.3, chokidar@npm:^3.0.2, chokidar@npm:^3.4.0": +"chokidar@npm:3.5.3": version: 3.5.3 resolution: "chokidar@npm:3.5.3" dependencies: @@ -4830,6 +5429,25 @@ __metadata: languageName: node linkType: hard +"chokidar@npm:^3.0.2, chokidar@npm:^3.4.0": + version: 3.6.0 + resolution: "chokidar@npm:3.6.0" + dependencies: + anymatch: ~3.1.2 + braces: ~3.0.2 + fsevents: ~2.3.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 + dependenciesMeta: + fsevents: + optional: true + checksum: d2f29f499705dcd4f6f3bbed79a9ce2388cf530460122eed3b9c48efeab7a4e28739c6551fd15bec9245c6b9eeca7a32baa64694d64d9b6faeb74ddb8c4a413d + languageName: node + linkType: hard + "chownr@npm:^1.0.1, chownr@npm:^1.1.4": version: 1.1.4 resolution: "chownr@npm:1.1.4" @@ -4893,20 +5511,6 @@ __metadata: languageName: node linkType: hard -"classic-level@npm:^1.2.0": - version: 1.4.1 - resolution: "classic-level@npm:1.4.1" - dependencies: - abstract-level: ^1.0.2 - catering: ^2.1.0 - module-error: ^1.0.1 - napi-macros: ^2.2.2 - node-gyp: latest - node-gyp-build: ^4.3.0 - checksum: 62e7e07297fcd656941eb88f92b91df0046ebb2b34987e98ec870cb736f096e212ef109a25541deba2f30866b9d5df550594ed04948614815dd5964933da50a9 - languageName: node - linkType: hard - "clean-stack@npm:^2.0.0": version: 2.2.0 resolution: "clean-stack@npm:2.2.0" @@ -4951,6 +5555,19 @@ __metadata: languageName: node linkType: hard +"cli-table3@npm:^0.6.3": + version: 0.6.4 + resolution: "cli-table3@npm:0.6.4" + dependencies: + "@colors/colors": 1.5.0 + string-width: ^4.2.0 + dependenciesMeta: + "@colors/colors": + optional: true + checksum: 0942d9977c05b31e9c7e0172276246b3ac2124c2929451851c01dbf5fc9b3d40cc4e1c9d468ff26dd3cfd18617963fe227b4cfeeae2881b70f302d69d792b5bb + languageName: node + linkType: hard + "cli-width@npm:^3.0.0": version: 3.0.0 resolution: "cli-width@npm:3.0.0" @@ -5144,6 +5761,13 @@ __metadata: languageName: node linkType: hard +"commander@npm:^8.1.0": + version: 8.3.0 + resolution: "commander@npm:8.3.0" + checksum: 0f82321821fc27b83bd409510bb9deeebcfa799ff0bf5d102128b500b7af22872c0c92cb6a0ebc5a4cf19c6b550fba9cedfa7329d18c6442a625f851377bacf0 + languageName: node + linkType: hard + "compare-versions@npm:^6.0.0": version: 6.1.0 resolution: "compare-versions@npm:6.1.0" @@ -5218,10 +5842,10 @@ __metadata: languageName: node linkType: hard -"cookie@npm:0.5.0": - version: 0.5.0 - resolution: "cookie@npm:0.5.0" - checksum: 1f4bd2ca5765f8c9689a7e8954183f5332139eb72b6ff783d8947032ec1fdf43109852c178e21a953a30c0dd42257828185be01b49d1eb1a67fd054ca588a180 +"cookie@npm:0.6.0": + version: 0.6.0 + resolution: "cookie@npm:0.6.0" + checksum: f56a7d32a07db5458e79c726b77e3c2eff655c36792f2b6c58d351fb5f61531e5b1ab7f46987150136e366c65213cbe31729e02a3eaed630c3bf7334635fb410 languageName: node linkType: hard @@ -5247,9 +5871,9 @@ __metadata: linkType: hard "core-js-pure@npm:^3.0.1": - version: 3.35.1 - resolution: "core-js-pure@npm:3.35.1" - checksum: 2fb360757c403b1487e746bb3648c7f0be45c196640552767f4e2a55a962411a33093cd8babf5e0416de7f4c38d1b05bbaf576c0a3bf2d6565935bab749d3fb5 + version: 3.37.0 + resolution: "core-js-pure@npm:3.37.0" + checksum: 206797d88046f4f5a62ecb9a7158bc6ba38127db2239bcbd1e85b2c8cf3cfb9bb3bbc6a312ecf0f87702f87659959d10625aeac74de6336a9303866f7010d364 languageName: node linkType: hard @@ -5427,13 +6051,13 @@ __metadata: languageName: node linkType: hard -"d@npm:1, d@npm:^1.0.1": - version: 1.0.1 - resolution: "d@npm:1.0.1" +"d@npm:1, d@npm:^1.0.1, d@npm:^1.0.2": + version: 1.0.2 + resolution: "d@npm:1.0.2" dependencies: - es5-ext: ^0.10.50 - type: ^1.0.1 - checksum: 49ca0639c7b822db670de93d4fbce44b4aa072cd848c76292c9978a8cd0fff1028763020ff4b0f147bd77bfe29b4c7f82e0f71ade76b2a06100543cdfd948d19 + es5-ext: ^0.10.64 + type: ^2.7.2 + checksum: 775db1e8ced6707cddf64a5840522fcf5475d38ef49a5d615be0ac47f86ef64d15f5a73de1522b09327cc466d4dc35ea83dbfeed456f7a0fdcab138deb800355 languageName: node linkType: hard @@ -5446,6 +6070,39 @@ __metadata: languageName: node linkType: hard +"data-view-buffer@npm:^1.0.1": + version: 1.0.1 + resolution: "data-view-buffer@npm:1.0.1" + dependencies: + call-bind: ^1.0.6 + es-errors: ^1.3.0 + is-data-view: ^1.0.1 + checksum: ce24348f3c6231223b216da92e7e6a57a12b4af81a23f27eff8feabdf06acfb16c00639c8b705ca4d167f761cfc756e27e5f065d0a1f840c10b907fdaf8b988c + languageName: node + linkType: hard + +"data-view-byte-length@npm:^1.0.1": + version: 1.0.1 + resolution: "data-view-byte-length@npm:1.0.1" + dependencies: + call-bind: ^1.0.7 + es-errors: ^1.3.0 + is-data-view: ^1.0.1 + checksum: dbb3200edcb7c1ef0d68979834f81d64fd8cab2f7691b3a4c6b97e67f22182f3ec2c8602efd7b76997b55af6ff8bce485829c1feda4fa2165a6b71fb7baa4269 + languageName: node + linkType: hard + +"data-view-byte-offset@npm:^1.0.0": + version: 1.0.0 + resolution: "data-view-byte-offset@npm:1.0.0" + dependencies: + call-bind: ^1.0.6 + es-errors: ^1.3.0 + is-data-view: ^1.0.1 + checksum: 7f0bf8720b7414ca719eedf1846aeec392f2054d7af707c5dc9a753cc77eb8625f067fa901e0b5127e831f9da9056138d894b9c2be79c27a21f6db5824f009c2 + languageName: node + linkType: hard + "death@npm:^1.1.0": version: 1.1.0 resolution: "death@npm:1.1.0" @@ -5610,14 +6267,24 @@ __metadata: languageName: node linkType: hard -"define-data-property@npm:^1.0.1, define-data-property@npm:^1.1.1": - version: 1.1.1 - resolution: "define-data-property@npm:1.1.1" +"deferred-leveldown@npm:~5.3.0": + version: 5.3.0 + resolution: "deferred-leveldown@npm:5.3.0" dependencies: - get-intrinsic: ^1.2.1 + abstract-leveldown: ~6.2.1 + inherits: ^2.0.3 + checksum: 5631e153528bb9de1aa60d59a5065d1a519374c5e4c1d486f2190dba4008dcf5c2ee8dd7f2f81396fc4d5a6bb6e7d0055e3dfe68afe00da02adaa3bf329addf7 + languageName: node + linkType: hard + +"define-data-property@npm:^1.0.1, define-data-property@npm:^1.1.1, define-data-property@npm:^1.1.4": + version: 1.1.4 + resolution: "define-data-property@npm:1.1.4" + dependencies: + es-define-property: ^1.0.0 + es-errors: ^1.3.0 gopd: ^1.0.1 - has-property-descriptors: ^1.0.0 - checksum: a29855ad3f0630ea82e3c5012c812efa6ca3078d5c2aa8df06b5f597c1cde6f7254692df41945851d903e05a1668607b6d34e778f402b9ff9ffb38111f1a3f0d + checksum: 8068ee6cab694d409ac25936eb861eea704b7763f7f342adbdfe337fc27c78d7ae0eff2364b2917b58c508d723c7a074326d068eef2e45c4edcd85cf94d0313b languageName: node linkType: hard @@ -5714,19 +6381,6 @@ __metadata: languageName: node linkType: hard -"detect-port@npm:^1.3.0": - version: 1.5.1 - resolution: "detect-port@npm:1.5.1" - dependencies: - address: ^1.0.1 - debug: 4 - bin: - detect: bin/detect-port.js - detect-port: bin/detect-port.js - checksum: b48da9340481742547263d5d985e65d078592557863402ecf538511735e83575867e94f91fe74405ea19b61351feb99efccae7e55de9a151d5654e3417cea05b - languageName: node - linkType: hard - "diff@npm:5.0.0": version: 5.0.0 resolution: "diff@npm:5.0.0" @@ -5742,9 +6396,9 @@ __metadata: linkType: hard "diff@npm:^5.0.0": - version: 5.1.0 - resolution: "diff@npm:5.1.0" - checksum: c7bf0df7c9bfbe1cf8a678fd1b2137c4fb11be117a67bc18a0e03ae75105e8533dbfb1cda6b46beb3586ef5aed22143ef9d70713977d5fb1f9114e21455fba90 + version: 5.2.0 + resolution: "diff@npm:5.2.0" + checksum: 12b63ca9c36c72bafa3effa77121f0581b4015df18bc16bac1f8e263597735649f1a173c26f7eba17fb4162b073fee61788abe49610e6c70a2641fe1895443fd languageName: node linkType: hard @@ -5846,9 +6500,9 @@ __metadata: linkType: hard "dotenv@npm:^16.0.1": - version: 16.4.1 - resolution: "dotenv@npm:16.4.1" - checksum: a343f0a1d156deef8c60034f797969867af4dbccfacedd4ac15fad04547e7ffe0553b58fc3b27a5837950f0d977e38e9234943fbcec4aeced4e3d044309a76ab + version: 16.4.5 + resolution: "dotenv@npm:16.4.5" + checksum: 301a12c3d44fd49888b74eb9ccf9f07a1f5df43f489e7fcb89647a2edcd84c42d6bc349dc8df099cd18f07c35c7b04685c1a4f3e6a6a9e6b30f8d48c15b7f49c languageName: node linkType: hard @@ -5911,13 +6565,13 @@ __metadata: linkType: hard "electron-to-chromium@npm:^1.3.47": - version: 1.4.656 - resolution: "electron-to-chromium@npm:1.4.656" - checksum: b9e00c81e74ee307141a216ef971efeff8784232a9eaa9074a65687b631029725f8f4ddeefd98c43287339cdadb6c7aba92c01806122f9cae813a95735fcd432 + version: 1.4.783 + resolution: "electron-to-chromium@npm:1.4.783" + checksum: 49dfd8614c8e28076ca82e241a4a246685440dacde5e2cdb85d57a0d5bcc1cbd5de3201b3158b94ad5f1016e91ab9bb0d4da8cfe46d2897400fb62e6a5be198e languageName: node linkType: hard -"elliptic@npm:6.5.4, elliptic@npm:^6.4.0, elliptic@npm:^6.5.2, elliptic@npm:^6.5.3, elliptic@npm:^6.5.4": +"elliptic@npm:6.5.4": version: 6.5.4 resolution: "elliptic@npm:6.5.4" dependencies: @@ -5932,6 +6586,28 @@ __metadata: languageName: node linkType: hard +"elliptic@npm:^6.4.0, elliptic@npm:^6.5.2, elliptic@npm:^6.5.3, elliptic@npm:^6.5.4, elliptic@npm:^6.5.5": + version: 6.5.5 + resolution: "elliptic@npm:6.5.5" + 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 + checksum: ec9105e4469eb3b32b0ee2579756c888ddf3f99d259aa0d65fccb906ee877768aaf8880caae73e3e669c9a4adeb3eb1945703aa974ec5000d2d33a239f4567eb + languageName: node + linkType: hard + +"emittery@npm:0.10.0": + version: 0.10.0 + resolution: "emittery@npm:0.10.0" + checksum: 2616a802df51e3f412b9b33f1b43161f7bc96037142cada6ecdbf35ddef1368e30d4f8e47fddc10b0753ccf91d3483b20ebca535b4b1e47526440e13150e2bc7 + languageName: node + linkType: hard + "emoji-regex@npm:^7.0.1": version: 7.0.3 resolution: "emoji-regex@npm:7.0.3" @@ -5973,6 +6649,18 @@ __metadata: languageName: node linkType: hard +"encoding-down@npm:^6.3.0": + version: 6.3.0 + resolution: "encoding-down@npm:6.3.0" + dependencies: + abstract-leveldown: ^6.2.1 + inherits: ^2.0.3 + level-codec: ^9.0.0 + level-errors: ^2.0.0 + checksum: 74043e6d9061a470614ff61d708c849259ab32932a428fd5ddfb0878719804f56a52f59b31cccd95fddc2e636c0fd22dc3e02481fb98d5bf1bdbbbc44ca09bdc + languageName: node + linkType: hard + "encoding@npm:^0.1.11, encoding@npm:^0.1.13": version: 0.1.13 resolution: "encoding@npm:0.1.13" @@ -6051,50 +6739,57 @@ __metadata: languageName: node linkType: hard -"es-abstract@npm:^1.22.1, es-abstract@npm:^1.22.3": - version: 1.22.3 - resolution: "es-abstract@npm:1.22.3" +"es-abstract@npm:^1.22.1, es-abstract@npm:^1.22.3, es-abstract@npm:^1.23.0, es-abstract@npm:^1.23.2": + version: 1.23.3 + resolution: "es-abstract@npm:1.23.3" dependencies: - array-buffer-byte-length: ^1.0.0 - arraybuffer.prototype.slice: ^1.0.2 - available-typed-arrays: ^1.0.5 - call-bind: ^1.0.5 - es-set-tostringtag: ^2.0.1 + 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.2 - get-symbol-description: ^1.0.0 + get-intrinsic: ^1.2.4 + get-symbol-description: ^1.0.2 globalthis: ^1.0.3 gopd: ^1.0.1 - has-property-descriptors: ^1.0.0 - has-proto: ^1.0.1 + has-property-descriptors: ^1.0.2 + has-proto: ^1.0.3 has-symbols: ^1.0.3 - hasown: ^2.0.0 - internal-slot: ^1.0.5 - is-array-buffer: ^3.0.2 + hasown: ^2.0.2 + internal-slot: ^1.0.7 + is-array-buffer: ^3.0.4 is-callable: ^1.2.7 - is-negative-zero: ^2.0.2 + is-data-view: ^1.0.1 + is-negative-zero: ^2.0.3 is-regex: ^1.1.4 - is-shared-array-buffer: ^1.0.2 + is-shared-array-buffer: ^1.0.3 is-string: ^1.0.7 - is-typed-array: ^1.1.12 + 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.4 - regexp.prototype.flags: ^1.5.1 - safe-array-concat: ^1.0.1 - safe-regex-test: ^1.0.0 - string.prototype.trim: ^1.2.8 - string.prototype.trimend: ^1.0.7 - string.prototype.trimstart: ^1.0.7 - typed-array-buffer: ^1.0.0 - typed-array-byte-length: ^1.0.0 - typed-array-byte-offset: ^1.0.0 - typed-array-length: ^1.0.4 + 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.13 - checksum: b1bdc962856836f6e72be10b58dc128282bdf33771c7a38ae90419d920fc3b36cc5d2b70a222ad8016e3fc322c367bf4e9e89fc2bc79b7e933c05b218e83d79a + which-typed-array: ^1.1.15 + checksum: f840cf161224252512f9527306b57117192696571e07920f777cb893454e32999206198b4f075516112af6459daca282826d1735c450528470356d09eff3a9ae languageName: node linkType: hard @@ -6105,25 +6800,43 @@ __metadata: languageName: node linkType: hard -"es-errors@npm:^1.0.0, es-errors@npm:^1.2.1": +"es-define-property@npm:^1.0.0": + version: 1.0.0 + resolution: "es-define-property@npm:1.0.0" + dependencies: + get-intrinsic: ^1.2.4 + checksum: f66ece0a887b6dca71848fa71f70461357c0e4e7249696f81bad0a1f347eed7b31262af4a29f5d726dc026426f085483b6b90301855e647aa8e21936f07293c6 + languageName: node + linkType: hard + +"es-errors@npm:^1.2.1, es-errors@npm:^1.3.0": version: 1.3.0 resolution: "es-errors@npm:1.3.0" checksum: ec1414527a0ccacd7f15f4a3bc66e215f04f595ba23ca75cdae0927af099b5ec865f9f4d33e9d7e86f512f252876ac77d4281a7871531a50678132429b1271b5 languageName: node linkType: hard -"es-set-tostringtag@npm:^2.0.1": - version: 2.0.2 - resolution: "es-set-tostringtag@npm:2.0.2" +"es-object-atoms@npm:^1.0.0": + version: 1.0.0 + resolution: "es-object-atoms@npm:1.0.0" dependencies: - get-intrinsic: ^1.2.2 - has-tostringtag: ^1.0.0 - hasown: ^2.0.0 - checksum: afcec3a4c9890ae14d7ec606204858441c801ff84f312538e1d1ccf1e5493c8b17bd672235df785f803756472cb4f2d49b87bde5237aef33411e74c22f194e07 + es-errors: ^1.3.0 + checksum: 26f0ff78ab93b63394e8403c353842b2272836968de4eafe97656adfb8a7c84b9099bf0fe96ed58f4a4cddc860f6e34c77f91649a58a5daa4a9c40b902744e3c + languageName: node + linkType: hard + +"es-set-tostringtag@npm:^2.0.3": + version: 2.0.3 + resolution: "es-set-tostringtag@npm:2.0.3" + dependencies: + get-intrinsic: ^1.2.4 + has-tostringtag: ^1.0.2 + hasown: ^2.0.1 + checksum: 7227fa48a41c0ce83e0377b11130d324ac797390688135b8da5c28994c0165be8b252e15cd1de41e1325e5a5412511586960213e88f9ab4a5e7d028895db5129 languageName: node linkType: hard -"es-shim-unscopables@npm:^1.0.0": +"es-shim-unscopables@npm:^1.0.0, es-shim-unscopables@npm:^1.0.2": version: 1.0.2 resolution: "es-shim-unscopables@npm:1.0.2" dependencies: @@ -6143,14 +6856,15 @@ __metadata: languageName: node linkType: hard -"es5-ext@npm:^0.10.35, es5-ext@npm:^0.10.50": - version: 0.10.62 - resolution: "es5-ext@npm:0.10.62" +"es5-ext@npm:^0.10.35, es5-ext@npm:^0.10.50, es5-ext@npm:^0.10.62, es5-ext@npm:^0.10.63, es5-ext@npm:^0.10.64, es5-ext@npm:~0.10.14": + version: 0.10.64 + resolution: "es5-ext@npm:0.10.64" dependencies: es6-iterator: ^2.0.3 es6-symbol: ^3.1.3 + esniff: ^2.0.1 next-tick: ^1.1.0 - checksum: 25f42f6068cfc6e393cf670bc5bba249132c5f5ec2dd0ed6e200e6274aca2fed8e9aec8a31c76031744c78ca283c57f0b41c7e737804c6328c7b8d3fbcba7983 + checksum: 01179fab0769fdbef213062222f99d0346724dbaccf04b87c0e6ee7f0c97edabf14be647ca1321f0497425ea7145de0fd278d1b3f3478864b8933e7136a5c645 languageName: node linkType: hard @@ -6182,19 +6896,19 @@ __metadata: linkType: hard "es6-symbol@npm:^3.1.1, es6-symbol@npm:^3.1.3": - version: 3.1.3 - resolution: "es6-symbol@npm:3.1.3" + version: 3.1.4 + resolution: "es6-symbol@npm:3.1.4" dependencies: - d: ^1.0.1 - ext: ^1.1.2 - checksum: cd49722c2a70f011eb02143ef1c8c70658d2660dead6641e160b94619f408b9cf66425515787ffe338affdf0285ad54f4eae30ea5bd510e33f8659ec53bcaa70 + d: ^1.0.2 + ext: ^1.7.0 + checksum: 52125ec4b5d1b6b93b8d3d42830bb19f8da21080ffcf45253b614bc6ff3e31349be202fb745d4d1af6778cdf5e38fea30e0c7e7dc37e2aecd44acc43502055f9 languageName: node linkType: hard "escalade@npm:^3.1.1": - version: 3.1.1 - resolution: "escalade@npm:3.1.1" - checksum: a3e2a99f07acb74b3ad4989c48ca0c3140f69f923e56d0cba0526240ee470b91010f9d39001f2a4a313841d237ede70a729e92125191ba5d21e74b106800b133 + version: 3.1.2 + resolution: "escalade@npm:3.1.2" + checksum: 1ec0977aa2772075493002bdbd549d595ff6e9393b1cb0d7d6fcaf78c750da0c158f180938365486f75cb69fba20294351caddfce1b46552a7b6c3cde52eaa02 languageName: node linkType: hard @@ -6286,14 +7000,14 @@ __metadata: linkType: hard "eslint-module-utils@npm:^2.8.0": - version: 2.8.0 - resolution: "eslint-module-utils@npm:2.8.0" + version: 2.8.1 + resolution: "eslint-module-utils@npm:2.8.1" dependencies: debug: ^3.2.7 peerDependenciesMeta: eslint: optional: true - checksum: 74c6dfea7641ebcfe174be61168541a11a14aa8d72e515f5f09af55cd0d0862686104b0524aa4b8e0ce66418a44aa38a94d2588743db5fd07a6b49ffd16921d2 + checksum: 3cecd99b6baf45ffc269167da0f95dcb75e5aa67b93d73a3bab63e2a7eedd9cdd6f188eed048e2f57c1b77db82c9cbf2adac20b512fa70e597d863dd3720170d languageName: node linkType: hard @@ -6414,17 +7128,17 @@ __metadata: linkType: hard "eslint-plugin-unused-imports@npm:^3.0.0": - version: 3.0.0 - resolution: "eslint-plugin-unused-imports@npm:3.0.0" + version: 3.1.0 + resolution: "eslint-plugin-unused-imports@npm:3.1.0" dependencies: eslint-rule-composer: ^0.3.0 peerDependencies: - "@typescript-eslint/eslint-plugin": ^6.0.0 - eslint: ^8.0.0 + "@typescript-eslint/eslint-plugin": 6 - 7 + eslint: 8 peerDependenciesMeta: "@typescript-eslint/eslint-plugin": optional: true - checksum: 51666f62cc8dccba2895ced83f3c1e0b78b68c357e17360e156c4db548bfdeda34cbd8725192fb4903f22d5069400fb22ded6039631df01ee82fd618dc307247 + checksum: c41da339ea8faf40b8b4081f0d52a4c75d24f121c5b95b19b777d12abfbc23505e4aab2422918b2517dd239a749a38912fb3405b42a9aa6b50c32cf5f3d6ecf0 languageName: node linkType: hard @@ -6553,14 +7267,14 @@ __metadata: linkType: hard "eslint@npm:^8.20.0": - version: 8.56.0 - resolution: "eslint@npm:8.56.0" + version: 8.57.0 + resolution: "eslint@npm:8.57.0" dependencies: "@eslint-community/eslint-utils": ^4.2.0 "@eslint-community/regexpp": ^4.6.1 "@eslint/eslintrc": ^2.1.4 - "@eslint/js": 8.56.0 - "@humanwhocodes/config-array": ^0.11.13 + "@eslint/js": 8.57.0 + "@humanwhocodes/config-array": ^0.11.14 "@humanwhocodes/module-importer": ^1.0.1 "@nodelib/fs.walk": ^1.2.8 "@ungap/structured-clone": ^1.2.0 @@ -6596,7 +7310,19 @@ __metadata: text-table: ^0.2.0 bin: eslint: bin/eslint.js - checksum: 883436d1e809b4a25d9eb03d42f584b84c408dbac28b0019f6ea07b5177940bf3cca86208f749a6a1e0039b63e085ee47aca1236c30721e91f0deef5cc5a5136 + checksum: 3a48d7ff85ab420a8447e9810d8087aea5b1df9ef68c9151732b478de698389ee656fd895635b5f2871c89ee5a2652b3f343d11e9db6f8486880374ebc74a2d9 + languageName: node + linkType: hard + +"esniff@npm:^2.0.1": + version: 2.0.1 + resolution: "esniff@npm:2.0.1" + dependencies: + d: ^1.0.1 + es5-ext: ^0.10.62 + event-emitter: ^0.3.5 + type: ^2.7.2 + checksum: d814c0e5c39bce9925b2e65b6d8767af72c9b54f35a65f9f3d6e8c606dce9aebe35a9599d30f15b0807743f88689f445163cfb577a425de4fb8c3c5bc16710cc languageName: node linkType: hard @@ -6869,11 +7595,11 @@ __metadata: linkType: hard "ethereum-bloom-filters@npm:^1.0.6": - version: 1.0.10 - resolution: "ethereum-bloom-filters@npm:1.0.10" + version: 1.1.0 + resolution: "ethereum-bloom-filters@npm:1.1.0" dependencies: - js-sha3: ^0.8.0 - checksum: 4019cc6f9274ae271a52959194a72f6e9b013366f168f922dc3b349319faf7426bf1010125ee0676b4f75714fe4a440edd4e7e62342c121a046409f4cd4c0af9 + "@noble/hashes": ^1.4.0 + checksum: 9565cd1e2002509852a05461cc93ee6874e8f961e0f66929cfc34d05f6f451fcfa4df287f8735ee184e4ba5f6e63a76a3c69bbeda5dda5bdf486f68fb9fa61f3 languageName: node linkType: hard @@ -6926,7 +7652,7 @@ __metadata: languageName: node linkType: hard -"ethereum-cryptography@npm:^2.0.0, ethereum-cryptography@npm:^2.1.2": +"ethereum-cryptography@npm:^2.0.0, ethereum-cryptography@npm:^2.1.2, ethereum-cryptography@npm:^2.1.3": version: 2.1.3 resolution: "ethereum-cryptography@npm:2.1.3" dependencies: @@ -6953,6 +7679,24 @@ __metadata: languageName: node linkType: hard +"ethereum-waffle@npm:latest": + version: 4.0.10 + resolution: "ethereum-waffle@npm:4.0.10" + dependencies: + "@ethereum-waffle/chai": 4.0.10 + "@ethereum-waffle/compiler": 4.0.3 + "@ethereum-waffle/mock-contract": 4.0.4 + "@ethereum-waffle/provider": 4.0.5 + solc: 0.8.15 + typechain: ^8.0.0 + peerDependencies: + ethers: "*" + bin: + waffle: bin/waffle + checksum: 680df4f5cf61f2f64b740d7724323e0872b1b1462e7ee2f1de6a1c9732155b28c4ac25c669ba557f72e1bb20204f81696a1fd543aece03654d71a9d9ebe1fc53 + languageName: node + linkType: hard + "ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git": version: 0.6.8 resolution: "ethereumjs-abi@https://github.com/ethereumjs/ethereumjs-abi.git#commit=ee3994657fa7a427238e6ba92a84d0b529bbcde0" @@ -7098,6 +7842,19 @@ __metadata: languageName: node linkType: hard +"ethereumjs-util@npm:7.1.3": + version: 7.1.3 + resolution: "ethereumjs-util@npm:7.1.3" + dependencies: + "@types/bn.js": ^5.1.0 + bn.js: ^5.1.2 + create-hash: ^1.1.2 + ethereum-cryptography: ^0.1.3 + rlp: ^2.2.4 + checksum: 6de7a32af05c7265c96163ecd15ad97327afab9deb36092ef26250616657a8c0b5df8e698328247c8193e7b87c643c967f64f0b3cff2b2937cafa870ff5fcb41 + languageName: node + linkType: hard + "ethereumjs-util@npm:^4.3.0": version: 4.5.1 resolution: "ethereumjs-util@npm:4.5.1" @@ -7126,7 +7883,7 @@ __metadata: languageName: node linkType: hard -"ethereumjs-util@npm:^7.0.2, ethereumjs-util@npm:^7.0.3": +"ethereumjs-util@npm:^7.0.2, ethereumjs-util@npm:^7.0.3, ethereumjs-util@npm:^7.1.1, ethereumjs-util@npm:^7.1.3, ethereumjs-util@npm:^7.1.4, ethereumjs-util@npm:^7.1.5": version: 7.1.5 resolution: "ethereumjs-util@npm:7.1.5" dependencies: @@ -7198,7 +7955,7 @@ __metadata: languageName: node linkType: hard -"ethers@npm:^5.0.1, ethers@npm:^5.0.2, ethers@npm:^5.5.2, ethers@npm:^5.6.9, ethers@npm:^5.7.1, ethers@npm:^5.7.2": +"ethers-v5@npm:ethers@^5.7.0, ethers@npm:^5.0.1, ethers@npm:^5.0.2, ethers@npm:^5.5.2, ethers@npm:^5.6.9, ethers@npm:^5.7.2": version: 5.7.2 resolution: "ethers@npm:5.7.2" dependencies: @@ -7236,6 +7993,21 @@ __metadata: languageName: node linkType: hard +"ethers@npm:^6.6.0": + version: 6.12.0 + resolution: "ethers@npm:6.12.0" + 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.5.0 + checksum: a9fa6937f57be00f217cac045752113f0be6ecbef77b90d653202f4127930023e86d20f06631cc4114bdbcf28fcb7dcb5244a88e2e430df1dfcb623e93c23366 + languageName: node + linkType: hard + "ethjs-unit@npm:0.1.6": version: 0.1.6 resolution: "ethjs-unit@npm:0.1.6" @@ -7256,6 +8028,16 @@ __metadata: languageName: node linkType: hard +"event-emitter@npm:^0.3.5": + version: 0.3.5 + resolution: "event-emitter@npm:0.3.5" + dependencies: + d: 1 + es5-ext: ~0.10.14 + checksum: 27c1399557d9cd7e0aa0b366c37c38a4c17293e3a10258e8b692a847dd5ba9fb90429c3a5a1eeff96f31f6fa03ccbd31d8ad15e00540b22b22f01557be706030 + languageName: node + linkType: hard + "event-target-shim@npm:^5.0.0": version: 5.0.1 resolution: "event-target-shim@npm:5.0.1" @@ -7344,15 +8126,15 @@ __metadata: linkType: hard "express@npm:^4.14.0": - version: 4.18.2 - resolution: "express@npm:4.18.2" + version: 4.19.2 + resolution: "express@npm:4.19.2" dependencies: accepts: ~1.3.8 array-flatten: 1.1.1 - body-parser: 1.20.1 + body-parser: 1.20.2 content-disposition: 0.5.4 content-type: ~1.0.4 - cookie: 0.5.0 + cookie: 0.6.0 cookie-signature: 1.0.6 debug: 2.6.9 depd: 2.0.0 @@ -7378,11 +8160,11 @@ __metadata: type-is: ~1.6.18 utils-merge: 1.0.1 vary: ~1.1.2 - checksum: 3c4b9b076879442f6b968fe53d85d9f1eeacbb4f4c41e5f16cc36d77ce39a2b0d81b3f250514982110d815b2f7173f5561367f9110fcc541f9371948e8c8b037 + checksum: 212dbd6c2c222a96a61bc927639c95970a53b06257080bb9e2838adb3bffdb966856551fdad1ab5dd654a217c35db94f987d0aa88d48fb04d306340f5f34dca5 languageName: node linkType: hard -"ext@npm:^1.1.2": +"ext@npm:^1.7.0": version: 1.7.0 resolution: "ext@npm:1.7.0" dependencies: @@ -7595,6 +8377,15 @@ __metadata: languageName: node linkType: hard +"fill-range@npm:^7.1.1": + version: 7.1.1 + resolution: "fill-range@npm:7.1.1" + dependencies: + to-regex-range: ^5.0.1 + checksum: b4abfbca3839a3d55e4ae5ec62e131e2e356bf4859ce8480c64c4876100f4df292a63e5bb1618e1d7460282ca2b305653064f01654474aa35c68000980f17798 + languageName: node + linkType: hard + "finalhandler@npm:1.2.0": version: 1.2.0 resolution: "finalhandler@npm:1.2.0" @@ -7725,9 +8516,9 @@ __metadata: linkType: hard "flatted@npm:^3.2.9": - version: 3.2.9 - resolution: "flatted@npm:3.2.9" - checksum: f14167fbe26a9d20f6fca8d998e8f1f41df72c8e81f9f2c9d61ed2bea058248f5e1cbd05e7f88c0e5087a6a0b822a1e5e2b446e879f3cfbe0b07ba2d7f80b026 + version: 3.3.1 + resolution: "flatted@npm:3.3.1" + checksum: 85ae7181650bb728c221e7644cbc9f4bf28bc556f2fc89bb21266962bdf0ce1029cc7acc44bb646cd469d9baac7c317f64e841c4c4c00516afa97320cdac7f94 languageName: node linkType: hard @@ -7738,13 +8529,13 @@ __metadata: languageName: node linkType: hard -"follow-redirects@npm:^1.12.1, follow-redirects@npm:^1.14.0, follow-redirects@npm:^1.15.4": - version: 1.15.5 - resolution: "follow-redirects@npm:1.15.5" +"follow-redirects@npm:^1.12.1, follow-redirects@npm:^1.14.0, follow-redirects@npm:^1.15.6": + version: 1.15.6 + resolution: "follow-redirects@npm:1.15.6" peerDependenciesMeta: debug: optional: true - checksum: 5ca49b5ce6f44338cbfc3546823357e7a70813cecc9b7b768158a1d32c1e62e7407c944402a918ea8c38ae2e78266312d617dc68783fac502cbb55e1047b34ec + checksum: a62c378dfc8c00f60b9c80cab158ba54e99ba0239a5dd7c81245e5a5b39d10f0c35e249c3379eae719ff0285fff88c365dd446fab19dee771f1d76252df1bbf5 languageName: node linkType: hard @@ -8019,7 +8810,7 @@ __metadata: languageName: node linkType: hard -"ganache-cli@npm:^6.12.2": +"ganache-cli@npm:^6.12.2, ganache-cli@npm:latest": version: 6.12.2 resolution: "ganache-cli@npm:6.12.2" dependencies: @@ -8075,6 +8866,32 @@ __metadata: languageName: node linkType: hard +"ganache@npm:7.4.3": + version: 7.4.3 + resolution: "ganache@npm:7.4.3" + dependencies: + "@trufflesuite/bigint-buffer": 1.1.10 + "@types/bn.js": ^5.1.0 + "@types/lru-cache": 5.1.1 + "@types/seedrandom": 3.0.1 + bufferutil: 4.0.5 + emittery: 0.10.0 + keccak: 3.0.2 + leveldown: 6.1.0 + secp256k1: 4.0.3 + utf-8-validate: 5.0.7 + dependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + bin: + ganache: dist/node/cli.js + ganache-cli: dist/node/cli.js + checksum: 170dde8c2ecd88e7f02a92bf582149e6497a2fdfb05abe9ab63a5b7cf33c061d71390f9719ef3d716dad4149299f8a87c71612ab4b40d1c57c55d7a185314630 + languageName: node + linkType: hard + "get-caller-file@npm:^1.0.1": version: 1.0.3 resolution: "get-caller-file@npm:1.0.3" @@ -8096,16 +8913,16 @@ __metadata: languageName: node linkType: hard -"get-intrinsic@npm:^1.0.2, get-intrinsic@npm:^1.1.1, get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.2, get-intrinsic@npm:^1.2.3": - version: 1.2.3 - resolution: "get-intrinsic@npm:1.2.3" +"get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.3, get-intrinsic@npm:^1.2.4": + version: 1.2.4 + resolution: "get-intrinsic@npm:1.2.4" dependencies: - es-errors: ^1.0.0 + es-errors: ^1.3.0 function-bind: ^1.1.2 has-proto: ^1.0.1 has-symbols: ^1.0.3 hasown: ^2.0.0 - checksum: 497fe6e444a2c570d174486c2450fc2b8c5020ae33a945a4b3d06c88bd69fb02a4611163e7a5bd9a5f61162e85ee83e55f06400dd3de108d6407eea32c6330b7 + checksum: 414e3cdf2c203d1b9d7d33111df746a4512a1aa622770b361dadddf8ed0b5aeb26c560f49ca077e24bfafb0acb55ca908d1f709216ccba33ffc548ec8a79a951 languageName: node linkType: hard @@ -8148,13 +8965,14 @@ __metadata: languageName: node linkType: hard -"get-symbol-description@npm:^1.0.0": - version: 1.0.0 - resolution: "get-symbol-description@npm:1.0.0" +"get-symbol-description@npm:^1.0.2": + version: 1.0.2 + resolution: "get-symbol-description@npm:1.0.2" dependencies: - call-bind: ^1.0.2 - get-intrinsic: ^1.1.1 - checksum: 9ceff8fe968f9270a37a1f73bf3f1f7bda69ca80f4f80850670e0e7b9444ff99323f7ac52f96567f8b5f5fbe7ac717a0d81d3407c7313e82810c6199446a5247 + call-bind: ^1.0.5 + es-errors: ^1.3.0 + get-intrinsic: ^1.2.4 + checksum: e1cb53bc211f9dbe9691a4f97a46837a553c4e7caadd0488dc24ac694db8a390b93edd412b48dcdd0b4bbb4c595de1709effc75fc87c0839deedc6968f5bd973 languageName: node linkType: hard @@ -8232,18 +9050,31 @@ __metadata: languageName: node linkType: hard +"glob@npm:8.1.0, glob@npm:^8.0.3": + version: 8.1.0 + resolution: "glob@npm:8.1.0" + dependencies: + fs.realpath: ^1.0.0 + inflight: ^1.0.4 + inherits: 2 + minimatch: ^5.0.1 + once: ^1.3.0 + checksum: 92fbea3221a7d12075f26f0227abac435de868dd0736a17170663783296d0dd8d3d532a5672b4488a439bf5d7fb85cdd07c11185d6cd39184f0385cbdfb86a47 + languageName: node + linkType: hard + "glob@npm:^10.2.2, glob@npm:^10.3.10": - version: 10.3.10 - resolution: "glob@npm:10.3.10" + version: 10.3.12 + resolution: "glob@npm:10.3.12" dependencies: foreground-child: ^3.1.0 - jackspeak: ^2.3.5 + jackspeak: ^2.3.6 minimatch: ^9.0.1 - minipass: ^5.0.0 || ^6.0.2 || ^7.0.0 - path-scurry: ^1.10.1 + minipass: ^7.0.4 + path-scurry: ^1.10.2 bin: glob: dist/esm/bin.mjs - checksum: 4f2fe2511e157b5a3f525a54092169a5f92405f24d2aed3142f4411df328baca13059f4182f1db1bf933e2c69c0bd89e57ae87edd8950cba8c7ccbe84f721cf3 + checksum: 2b0949d6363021aaa561b108ac317bf5a97271b8a5d7a5fac1a176e40e8068ecdcccc992f8a7e958593d501103ac06d673de92adc1efcbdab45edefe35f8d7c6 languageName: node linkType: hard @@ -8274,19 +9105,6 @@ __metadata: languageName: node linkType: hard -"glob@npm:^8.0.3": - version: 8.1.0 - resolution: "glob@npm:8.1.0" - dependencies: - fs.realpath: ^1.0.0 - inflight: ^1.0.4 - inherits: 2 - minimatch: ^5.0.1 - once: ^1.3.0 - checksum: 92fbea3221a7d12075f26f0227abac435de868dd0736a17170663783296d0dd8d3d532a5672b4488a439bf5d7fb85cdd07c11185d6cd39184f0385cbdfb86a47 - languageName: node - linkType: hard - "global-modules@npm:^2.0.0": version: 2.0.0 resolution: "global-modules@npm:2.0.0" @@ -8537,22 +9355,102 @@ __metadata: languageName: node linkType: hard +"hardhat-gas-reporter@npm:latest": + version: 2.1.1 + resolution: "hardhat-gas-reporter@npm:2.1.1" + dependencies: + "@ethersproject/abi": ^5.7.0 + "@ethersproject/bytes": ^5.7.0 + "@ethersproject/units": ^5.7.0 + "@solidity-parser/parser": ^0.18.0 + axios: ^1.6.7 + brotli-wasm: ^2.0.1 + chalk: 4.1.2 + cli-table3: ^0.6.3 + ethereum-cryptography: ^2.1.3 + glob: ^10.3.10 + jsonschema: ^1.4.1 + lodash: ^4.17.21 + markdown-table: 2.0.0 + sha1: ^1.1.1 + viem: 2.7.14 + peerDependencies: + hardhat: ^2.16.0 + checksum: ca06f18ed7cfaa794f23e92ec6835b0e364cea1361056708488e8610a3b50d74a2b47d9b3771df36fc00bb24380ab03f7bcf183a153b047a2896c2184245b5c6 + languageName: node + linkType: hard + "hardhat@npm:^2.19.4": - version: 2.19.5 - resolution: "hardhat@npm:2.19.5" + version: 2.22.4 + resolution: "hardhat@npm:2.22.4" + dependencies: + "@ethersproject/abi": ^5.1.2 + "@metamask/eth-sig-util": ^4.0.0 + "@nomicfoundation/edr": ^0.3.7 + "@nomicfoundation/ethereumjs-common": 4.0.4 + "@nomicfoundation/ethereumjs-tx": 5.0.4 + "@nomicfoundation/ethereumjs-util": 9.0.4 + "@nomicfoundation/solidity-analyzer": ^0.1.0 + "@sentry/node": ^5.18.1 + "@types/bn.js": ^5.1.0 + "@types/lru-cache": ^5.1.0 + adm-zip: ^0.4.16 + aggregate-error: ^3.0.0 + ansi-escapes: ^4.3.0 + boxen: ^5.1.2 + chalk: ^2.4.2 + chokidar: ^3.4.0 + ci-info: ^2.0.0 + debug: ^4.1.1 + enquirer: ^2.3.0 + env-paths: ^2.2.0 + ethereum-cryptography: ^1.0.3 + ethereumjs-abi: ^0.6.8 + find-up: ^2.1.0 + fp-ts: 1.19.3 + fs-extra: ^7.0.1 + glob: 7.2.0 + immutable: ^4.0.0-rc.12 + io-ts: 1.10.4 + keccak: ^3.0.2 + lodash: ^4.17.11 + mnemonist: ^0.38.0 + mocha: ^10.0.0 + p-map: ^4.0.0 + raw-body: ^2.4.1 + resolve: 1.17.0 + semver: ^6.3.0 + solc: 0.7.3 + source-map-support: ^0.5.13 + stacktrace-parser: ^0.1.10 + tsort: 0.0.1 + undici: ^5.14.0 + uuid: ^8.3.2 + ws: ^7.4.6 + peerDependencies: + ts-node: "*" + typescript: "*" + peerDependenciesMeta: + ts-node: + optional: true + typescript: + optional: true + bin: + hardhat: internal/cli/bootstrap.js + checksum: c10deb21dac800fe4356f7325646ffef6542704894bd5712fe91246ba307d1f9b02a26998cf2e2adddf299c82e2f19afce33dadbc1afcd7de1692296157fdefc + languageName: node + linkType: hard + +"hardhat@npm:^2.22.1": + version: 2.22.3 + resolution: "hardhat@npm:2.22.3" dependencies: "@ethersproject/abi": ^5.1.2 "@metamask/eth-sig-util": ^4.0.0 - "@nomicfoundation/ethereumjs-block": 5.0.2 - "@nomicfoundation/ethereumjs-blockchain": 7.0.2 - "@nomicfoundation/ethereumjs-common": 4.0.2 - "@nomicfoundation/ethereumjs-evm": 2.0.2 - "@nomicfoundation/ethereumjs-rlp": 5.0.2 - "@nomicfoundation/ethereumjs-statemanager": 2.0.2 - "@nomicfoundation/ethereumjs-trie": 6.0.2 - "@nomicfoundation/ethereumjs-tx": 5.0.2 - "@nomicfoundation/ethereumjs-util": 9.0.2 - "@nomicfoundation/ethereumjs-vm": 7.0.2 + "@nomicfoundation/edr": ^0.3.5 + "@nomicfoundation/ethereumjs-common": 4.0.4 + "@nomicfoundation/ethereumjs-tx": 5.0.4 + "@nomicfoundation/ethereumjs-util": 9.0.4 "@nomicfoundation/solidity-analyzer": ^0.1.0 "@sentry/node": ^5.18.1 "@types/bn.js": ^5.1.0 @@ -8600,7 +9498,7 @@ __metadata: optional: true bin: hardhat: internal/cli/bootstrap.js - checksum: 316b03a1d090360e6ed471fe125360ec0c66c5bb62e29492898932b1a9a5227c12d7a18343877c59725f321647a01fde0841649bf7d8a4a746148a0d38b0ee27 + checksum: 7f0b8b2b803aca1f07b1e421605f9ff0243e93fe75f04b57d45292e7fedf7a50deb2ef435c47d0dde5b14988ea0493f58852d8973096f76719b35040927dcd55 languageName: node linkType: hard @@ -8641,19 +9539,19 @@ __metadata: languageName: node linkType: hard -"has-property-descriptors@npm:^1.0.0, has-property-descriptors@npm:^1.0.1": - version: 1.0.1 - resolution: "has-property-descriptors@npm:1.0.1" +"has-property-descriptors@npm:^1.0.0, has-property-descriptors@npm:^1.0.2": + version: 1.0.2 + resolution: "has-property-descriptors@npm:1.0.2" dependencies: - get-intrinsic: ^1.2.2 - checksum: 2bcc6bf6ec6af375add4e4b4ef586e43674850a91ad4d46666d0b28ba8e1fd69e424c7677d24d60f69470ad0afaa2f3197f508b20b0bb7dd99a8ab77ffc4b7c4 + es-define-property: ^1.0.0 + checksum: fcbb246ea2838058be39887935231c6d5788babed499d0e9d0cc5737494c48aba4fe17ba1449e0d0fbbb1e36175442faa37f9c427ae357d6ccb1d895fbcd3de3 languageName: node linkType: hard -"has-proto@npm:^1.0.1": - version: 1.0.1 - resolution: "has-proto@npm:1.0.1" - checksum: febc5b5b531de8022806ad7407935e2135f1cc9e64636c3916c6842bd7995994ca3b29871ecd7954bd35f9e2986c17b3b227880484d22259e2f8e6ce63fd383e +"has-proto@npm:^1.0.1, has-proto@npm:^1.0.3": + version: 1.0.3 + resolution: "has-proto@npm:1.0.3" + checksum: fe7c3d50b33f50f3933a04413ed1f69441d21d2d2944f81036276d30635cad9279f6b43bc8f32036c31ebdfcf6e731150f46c1907ad90c669ffe9b066c3ba5c4 languageName: node linkType: hard @@ -8664,7 +9562,7 @@ __metadata: languageName: node linkType: hard -"has-tostringtag@npm:^1.0.0, has-tostringtag@npm:^1.0.1": +"has-tostringtag@npm:^1.0.0, has-tostringtag@npm:^1.0.2": version: 1.0.2 resolution: "has-tostringtag@npm:1.0.2" dependencies: @@ -8730,6 +9628,16 @@ __metadata: languageName: node linkType: hard +"hash-base@npm:~3.0": + version: 3.0.4 + resolution: "hash-base@npm:3.0.4" + dependencies: + inherits: ^2.0.1 + safe-buffer: ^5.0.1 + checksum: 878465a0dfcc33cce195c2804135352c590d6d10980adc91a9005fd377e77f2011256c2b7cfce472e3f2e92d561d1bf3228d2da06348a9017ce9a258b3b49764 + languageName: node + linkType: hard + "hash.js@npm:1.1.7, hash.js@npm:^1.0.0, hash.js@npm:^1.0.3, hash.js@npm:^1.1.7": version: 1.1.7 resolution: "hash.js@npm:1.1.7" @@ -8740,12 +9648,12 @@ __metadata: languageName: node linkType: hard -"hasown@npm:^2.0.0": - version: 2.0.0 - resolution: "hasown@npm:2.0.0" +"hasown@npm:^2.0.0, hasown@npm:^2.0.1, hasown@npm:^2.0.2": + version: 2.0.2 + resolution: "hasown@npm:2.0.2" dependencies: function-bind: ^1.1.2 - checksum: 6151c75ca12554565098641c98a40f4cc86b85b0fd5b6fe92360967e4605a4f9610f7757260b4e8098dd1c2ce7f4b095f2006fe72a570e3b6d2d28de0298c176 + checksum: e8516f776a15149ca6c6ed2ae3110c417a00b62260e222590e54aa367cbcd6ed99122020b37b7fbdf05748df57b265e70095d7bf35a47660587619b15ffb93db languageName: node linkType: hard @@ -8840,12 +9748,12 @@ __metadata: linkType: hard "http-proxy-agent@npm:^7.0.0": - version: 7.0.0 - resolution: "http-proxy-agent@npm:7.0.0" + version: 7.0.2 + resolution: "http-proxy-agent@npm:7.0.2" dependencies: agent-base: ^7.1.0 debug: ^4.3.4 - checksum: 48d4fac997917e15f45094852b63b62a46d0c8a4f0b9c6c23ca26d27b8df8d178bed88389e604745e748bd9a01f5023e25093722777f0593c3f052009ff438b6 + checksum: 670858c8f8f3146db5889e1fa117630910101db601fff7d5a8aa637da0abedf68c899f03d3451cac2f83bcc4c3d2dabf339b3aa00ff8080571cceb02c3ce02f3 languageName: node linkType: hard @@ -8890,12 +9798,12 @@ __metadata: linkType: hard "https-proxy-agent@npm:^7.0.1": - version: 7.0.2 - resolution: "https-proxy-agent@npm:7.0.2" + version: 7.0.4 + resolution: "https-proxy-agent@npm:7.0.4" dependencies: agent-base: ^7.0.2 debug: 4 - checksum: 088969a0dd476ea7a0ed0a2cf1283013682b08f874c3bc6696c83fa061d2c157d29ef0ad3eb70a2046010bb7665573b2388d10fdcb3e410a66995e5248444292 + checksum: daaab857a967a2519ddc724f91edbbd388d766ff141b9025b629f92b9408fc83cee8a27e11a907aede392938e9c398e240d643e178408a59e4073539cde8cfe9 languageName: node linkType: hard @@ -9069,14 +9977,14 @@ __metadata: languageName: node linkType: hard -"internal-slot@npm:^1.0.5": - version: 1.0.6 - resolution: "internal-slot@npm:1.0.6" +"internal-slot@npm:^1.0.7": + version: 1.0.7 + resolution: "internal-slot@npm:1.0.7" dependencies: - get-intrinsic: ^1.2.2 + es-errors: ^1.3.0 hasown: ^2.0.0 side-channel: ^1.0.4 - checksum: 7872454888047553ce97a3fa1da7cc054a28ec5400a9c2e9f4dbe4fe7c1d041cb8e8301467614b80d4246d50377aad2fb58860b294ed74d6700cc346b6f89549 + checksum: cadc5eea5d7d9bc2342e93aae9f31f04c196afebb11bde97448327049f492cd7081e18623ae71388aac9cd237b692ca3a105be9c68ac39c1dec679d7409e33eb languageName: node linkType: hard @@ -9119,6 +10027,16 @@ __metadata: languageName: node linkType: hard +"ip-address@npm:^9.0.5": + version: 9.0.5 + resolution: "ip-address@npm:9.0.5" + dependencies: + jsbn: 1.1.0 + sprintf-js: ^1.1.3 + checksum: aa15f12cfd0ef5e38349744e3654bae649a34c3b10c77a674a167e99925d1549486c5b14730eebce9fea26f6db9d5e42097b00aa4f9f612e68c79121c71652dc + languageName: node + linkType: hard + "ip-regex@npm:^4.0.0": version: 4.3.0 resolution: "ip-regex@npm:4.3.0" @@ -9126,13 +10044,6 @@ __metadata: languageName: node linkType: hard -"ip@npm:^2.0.0": - version: 2.0.0 - resolution: "ip@npm:2.0.0" - checksum: cfcfac6b873b701996d71ec82a7dd27ba92450afdb421e356f44044ed688df04567344c36cbacea7d01b1c39a4c732dc012570ebe9bebfb06f27314bca625349 - languageName: node - linkType: hard - "ipaddr.js@npm:1.9.1": version: 1.9.1 resolution: "ipaddr.js@npm:1.9.1" @@ -9259,7 +10170,7 @@ __metadata: languageName: node linkType: hard -"is-array-buffer@npm:^3.0.2, is-array-buffer@npm:^3.0.4": +"is-array-buffer@npm:^3.0.4": version: 3.0.4 resolution: "is-array-buffer@npm:3.0.4" dependencies: @@ -9354,6 +10265,15 @@ __metadata: languageName: node linkType: hard +"is-data-view@npm:^1.0.1": + version: 1.0.1 + resolution: "is-data-view@npm:1.0.1" + dependencies: + is-typed-array: ^1.1.13 + checksum: 4ba4562ac2b2ec005fefe48269d6bd0152785458cd253c746154ffb8a8ab506a29d0cfb3b74af87513843776a88e4981ae25c89457bf640a33748eab1a7216b5 + languageName: node + linkType: hard + "is-date-object@npm:^1.0.1, is-date-object@npm:^1.0.5": version: 1.0.5 resolution: "is-date-object@npm:1.0.5" @@ -9505,10 +10425,10 @@ __metadata: languageName: node linkType: hard -"is-negative-zero@npm:^2.0.2": - version: 2.0.2 - resolution: "is-negative-zero@npm:2.0.2" - checksum: f3232194c47a549da60c3d509c9a09be442507616b69454716692e37ae9f37c4dea264fb208ad0c9f3efd15a796a46b79df07c7e53c6227c32170608b809149a +"is-negative-zero@npm:^2.0.3": + version: 2.0.3 + resolution: "is-negative-zero@npm:2.0.3" + checksum: c1e6b23d2070c0539d7b36022d5a94407132411d01aba39ec549af824231f3804b1aea90b5e4e58e807a65d23ceb538ed6e355ce76b267bdd86edb757ffcbdcd languageName: node linkType: hard @@ -9570,12 +10490,12 @@ __metadata: languageName: node linkType: hard -"is-shared-array-buffer@npm:^1.0.2": - version: 1.0.2 - resolution: "is-shared-array-buffer@npm:1.0.2" +"is-shared-array-buffer@npm:^1.0.2, is-shared-array-buffer@npm:^1.0.3": + version: 1.0.3 + resolution: "is-shared-array-buffer@npm:1.0.3" dependencies: - call-bind: ^1.0.2 - checksum: 9508929cf14fdc1afc9d61d723c6e8d34f5e117f0bffda4d97e7a5d88c3a8681f633a74f8e3ad1fe92d5113f9b921dc5ca44356492079612f9a247efbce7032a + call-bind: ^1.0.7 + checksum: a4fff602c309e64ccaa83b859255a43bb011145a42d3f56f67d9268b55bc7e6d98a5981a1d834186ad3105d6739d21547083fe7259c76c0468483fc538e716d8 languageName: node linkType: hard @@ -9611,7 +10531,7 @@ __metadata: languageName: node linkType: hard -"is-typed-array@npm:^1.1.10, is-typed-array@npm:^1.1.12, is-typed-array@npm:^1.1.9": +"is-typed-array@npm:^1.1.13": version: 1.1.13 resolution: "is-typed-array@npm:1.1.13" dependencies: @@ -9750,6 +10670,15 @@ __metadata: languageName: node linkType: hard +"isows@npm:1.0.3": + version: 1.0.3 + resolution: "isows@npm:1.0.3" + peerDependencies: + ws: "*" + checksum: 9cacd5cf59f67deb51e825580cd445ab1725ecb05a67c704050383fb772856f3cd5e7da8ad08f5a3bd2823680d77d099459d0c6a7037972a74d6429af61af440 + languageName: node + linkType: hard + "isstream@npm:~0.1.2": version: 0.1.2 resolution: "isstream@npm:0.1.2" @@ -9816,7 +10745,7 @@ __metadata: languageName: node linkType: hard -"jackspeak@npm:^2.3.5": +"jackspeak@npm:^2.3.6": version: 2.3.6 resolution: "jackspeak@npm:2.3.6" dependencies: @@ -9858,13 +10787,6 @@ __metadata: languageName: node linkType: hard -"js-sdsl@npm:^4.1.4": - version: 4.4.2 - resolution: "js-sdsl@npm:4.4.2" - checksum: ba705adc1788bf3c6f6c8e5077824f2bb4f0acab5a984420ce5cc492c7fff3daddc26335ad2c9a67d4f5e3241ec790f9e5b72a625adcf20cf321d2fd85e62b8b - languageName: node - linkType: hard - "js-sha3@npm:0.8.0, js-sha3@npm:^0.8.0": version: 0.8.0 resolution: "js-sha3@npm:0.8.0" @@ -9916,6 +10838,13 @@ __metadata: languageName: node linkType: hard +"jsbn@npm:1.1.0": + version: 1.1.0 + resolution: "jsbn@npm:1.1.0" + checksum: 944f924f2bd67ad533b3850eee47603eed0f6ae425fd1ee8c760f477e8c34a05f144c1bd4f5a5dd1963141dc79a2c55f89ccc5ab77d039e7077f3ad196b64965 + languageName: node + linkType: hard + "jsbn@npm:~0.1.0": version: 0.1.1 resolution: "jsbn@npm:0.1.1" @@ -9941,6 +10870,15 @@ __metadata: languageName: node linkType: hard +"json-bigint@npm:^1.0.0": + version: 1.0.0 + resolution: "json-bigint@npm:1.0.0" + dependencies: + bignumber.js: ^9.0.0 + checksum: c67bb93ccb3c291e60eb4b62931403e378906aab113ec1c2a8dd0f9a7f065ad6fd9713d627b732abefae2e244ac9ce1721c7a3142b2979532f12b258634ce6f6 + languageName: node + linkType: hard + "json-buffer@npm:3.0.0": version: 3.0.0 resolution: "json-buffer@npm:3.0.0" @@ -10110,7 +11048,7 @@ __metadata: languageName: node linkType: hard -"jsonschema@npm:^1.2.4": +"jsonschema@npm:^1.2.4, jsonschema@npm:^1.4.1": version: 1.4.1 resolution: "jsonschema@npm:1.4.1" checksum: 1ef02a6cd9bc32241ec86bbf1300bdbc3b5f2d8df6eb795517cf7d1cd9909e7beba1e54fdf73990fd66be98a182bda9add9607296b0cb00b1348212988e424b2 @@ -10140,6 +11078,18 @@ __metadata: languageName: node linkType: hard +"keccak@npm:3.0.2": + version: 3.0.2 + resolution: "keccak@npm:3.0.2" + dependencies: + node-addon-api: ^2.0.0 + node-gyp: latest + node-gyp-build: ^4.2.0 + readable-stream: ^3.6.0 + checksum: 39a7d6128b8ee4cb7dcd186fc7e20c6087cc39f573a0f81b147c323f688f1f7c2b34f62c4ae189fe9b81c6730b2d1228d8a399cdc1f3d8a4c8f030cdc4f20272 + languageName: node + linkType: hard + "keccak@npm:^3.0.0, keccak@npm:^3.0.2": version: 3.0.4 resolution: "keccak@npm:3.0.4" @@ -10250,6 +11200,22 @@ __metadata: languageName: node linkType: hard +"level-concat-iterator@npm:^3.0.0": + version: 3.1.0 + resolution: "level-concat-iterator@npm:3.1.0" + dependencies: + catering: ^2.1.0 + checksum: a15bc4c5fbbb30c1efa7fad06b72feaac84d90990b356b461593c198a833336f31f6daff8f40c3908fabd14cfd8856d1c5ecae9e1cb0575037b65fa607e760e9 + languageName: node + linkType: hard + +"level-concat-iterator@npm:~2.0.0": + version: 2.0.1 + resolution: "level-concat-iterator@npm:2.0.1" + checksum: 562583ef1292215f8e749c402510cb61c4d6fccf4541082b3d21dfa5ecde9fcccfe52bdcb5cfff9d2384e7ce5891f44df9439a6ddb39b0ffe31015600b4a828a + languageName: node + linkType: hard + "level-errors@npm:^1.0.3": version: 1.1.2 resolution: "level-errors@npm:1.1.2" @@ -10311,6 +11277,17 @@ __metadata: languageName: node linkType: hard +"level-iterator-stream@npm:~4.0.0": + version: 4.0.2 + resolution: "level-iterator-stream@npm:4.0.2" + dependencies: + inherits: ^2.0.4 + readable-stream: ^3.4.0 + xtend: ^4.0.2 + checksum: 239e2c7e62bffb485ed696bcd3b98de7a2bc455d13be4fce175ae3544fe9cda81c2ed93d3e88b61380ae6d28cce02511862d77b86fb2ba5b5cf00471f3c1eccc + languageName: node + linkType: hard + "level-mem@npm:^3.0.1": version: 3.0.1 resolution: "level-mem@npm:3.0.1" @@ -10321,6 +11298,26 @@ __metadata: languageName: node linkType: hard +"level-mem@npm:^5.0.1": + version: 5.0.1 + resolution: "level-mem@npm:5.0.1" + dependencies: + level-packager: ^5.0.3 + memdown: ^5.0.0 + checksum: 37a38163b0c7cc55f64385fdff78438669f953bc08dc751739e2f1edd401472a89001a73a95cc8b81f38f989e46279797c11eb82e702690ea9a171e02bf31e84 + languageName: node + linkType: hard + +"level-packager@npm:^5.0.3": + version: 5.1.1 + resolution: "level-packager@npm:5.1.1" + dependencies: + encoding-down: ^6.3.0 + levelup: ^4.3.2 + checksum: befe2aa54f2010a6ecf7ddce392c8dee225e1839205080a2704d75e560e28b01191b345494696196777b70d376e3eaae4c9e7c330cc70d3000839f5b18dd78f2 + languageName: node + linkType: hard + "level-packager@npm:~4.0.0": version: 4.0.1 resolution: "level-packager@npm:4.0.1" @@ -10358,20 +11355,19 @@ __metadata: languageName: node linkType: hard -"level-supports@npm:^4.0.0": - version: 4.0.1 - resolution: "level-supports@npm:4.0.1" - checksum: d4552b42bb8cdeada07b0f6356c7a90fefe76279147331f291aceae26e3e56d5f927b09ce921647c0230bfe03ddfbdcef332be921e5c2194421ae2bfa3cf6368 +"level-supports@npm:^2.0.1": + version: 2.1.0 + resolution: "level-supports@npm:2.1.0" + checksum: f7b16aea7ddd13326ee4fbc2c1099bcaf8a74dc95346af9ebedea4e02518c6f7a438e829b79b7890d67489b59f615a9428369a0a065021797aa7cb6b6bd84d75 languageName: node linkType: hard -"level-transcoder@npm:^1.0.1": +"level-supports@npm:~1.0.0": version: 1.0.1 - resolution: "level-transcoder@npm:1.0.1" + resolution: "level-supports@npm:1.0.1" dependencies: - buffer: ^6.0.3 - module-error: ^1.0.1 - checksum: 304f08d802faf3491a533b6d87ad8be3cabfd27f2713bbe9d4c633bf50fcb9460eab5a6776bf015e101ead7ba1c1853e05e7f341112f17a9d0cb37ee5a421a25 + xtend: ^4.0.2 + checksum: 5d6bdb88cf00c3d9adcde970db06a548c72c5a94bf42c72f998b58341a105bfe2ea30d313ce1e84396b98cc9ddbc0a9bd94574955a86e929f73c986e10fc0df0 languageName: node linkType: hard @@ -10396,14 +11392,26 @@ __metadata: languageName: node linkType: hard -"level@npm:^8.0.0": - version: 8.0.1 - resolution: "level@npm:8.0.1" +"level-ws@npm:^2.0.0": + version: 2.0.0 + resolution: "level-ws@npm:2.0.0" + dependencies: + inherits: ^2.0.3 + readable-stream: ^3.1.0 + xtend: ^4.0.1 + checksum: 4e5cbf090a07367373f693c98ad5b4797e7e694ea801ce5cd4103e06837ec883bdce9588ac11e0b9963ca144b96c95c6401c9e43583028ba1e4f847e81ec9ad6 + languageName: node + linkType: hard + +"leveldown@npm:6.1.0": + version: 6.1.0 + resolution: "leveldown@npm:6.1.0" dependencies: - abstract-level: ^1.0.4 - browser-level: ^1.0.1 - classic-level: ^1.2.0 - checksum: c5641cbba666ef9eb0292aad01d86a4f1af18e637d1fc097c65bf0109ab8d7e6fba8c8faf6c74ae4e48edac4310f7dd87def26ffeebfe395c7afd9bd2461ab97 + abstract-leveldown: ^7.2.0 + napi-macros: ~2.0.0 + node-gyp: latest + node-gyp-build: ^4.3.0 + checksum: e984b61e9fbe057cfd5c81ac0afe5d7e35d695ff130a95991e0ecb66390e4c4ff6aa3980a65b6c53edaba80527a47790bb26e3cfbd52a054957b3546d9941fe4 languageName: node linkType: hard @@ -10434,6 +11442,19 @@ __metadata: languageName: node linkType: hard +"levelup@npm:^4.3.2": + version: 4.4.0 + resolution: "levelup@npm:4.4.0" + dependencies: + deferred-leveldown: ~5.3.0 + level-errors: ~2.0.0 + level-iterator-stream: ~4.0.0 + level-supports: ~1.0.0 + xtend: ~4.0.0 + checksum: 5a09e34c78cd7c23f9f6cb73563f1ebe8121ffc5f9f5f232242529d4fbdd40e8d1ffb337d2defa0b842334e0dbd4028fbfe7a072eebfe2c4d07174f0aa4aabca + languageName: node + linkType: hard + "levn@npm:^0.3.0, levn@npm:~0.3.0": version: 0.3.0 resolution: "levn@npm:0.3.0" @@ -10747,7 +11768,7 @@ __metadata: languageName: node linkType: hard -"lru-cache@npm:^10.0.1, lru-cache@npm:^9.1.1 || ^10.0.0": +"lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0": version: 10.2.0 resolution: "lru-cache@npm:10.2.0" checksum: eee7ddda4a7475deac51ac81d7dd78709095c6fa46e8350dc2d22462559a1faa3b81ed931d5464b13d48cbd7e08b46100b6f768c76833912bc444b99c37e25db @@ -10844,6 +11865,15 @@ __metadata: languageName: node linkType: hard +"markdown-table@npm:2.0.0": + version: 2.0.0 + resolution: "markdown-table@npm:2.0.0" + dependencies: + repeat-string: ^1.0.0 + checksum: 9bb634a9300016cbb41216c1eab44c74b6b7083ac07872e296f900a29449cf0e260ece03fa10c3e9784ab94c61664d1d147da0315f95e1336e2bdcc025615c90 + languageName: node + linkType: hard + "markdown-table@npm:^1.1.3": version: 1.1.3 resolution: "markdown-table@npm:1.1.3" @@ -10901,6 +11931,20 @@ __metadata: languageName: node linkType: hard +"memdown@npm:^5.0.0": + version: 5.1.0 + resolution: "memdown@npm:5.1.0" + dependencies: + abstract-leveldown: ~6.2.1 + functional-red-black-tree: ~1.0.1 + immediate: ~3.2.3 + inherits: ~2.0.1 + ltgt: ~2.2.0 + safe-buffer: ~5.2.0 + checksum: 23e4414034e975eae1edd6864874bbe77501d41814fc27e8ead946c3379cb1cbea303d724083d08a6a269af9bf5d55073f1f767dfa7ad6e70465769f87e29794 + languageName: node + linkType: hard + "memdown@npm:~3.0.0": version: 3.0.0 resolution: "memdown@npm:3.0.0" @@ -10915,17 +11959,6 @@ __metadata: languageName: node linkType: hard -"memory-level@npm:^1.0.0": - version: 1.0.0 - resolution: "memory-level@npm:1.0.0" - dependencies: - abstract-level: ^1.0.0 - functional-red-black-tree: ^1.0.1 - module-error: ^1.0.1 - checksum: 80b1b7aedaf936e754adbcd7b9303018c3684fb32f9992fd967c448f145d177f16c724fbba9ed3c3590a9475fd563151eae664d69b83d2ad48714852e9fc5c72 - languageName: node - linkType: hard - "memorystream@npm:^0.3.1": version: 0.3.1 resolution: "memorystream@npm:0.3.1" @@ -10994,6 +12027,20 @@ __metadata: languageName: node linkType: hard +"merkle-patricia-tree@npm:^4.2.2, merkle-patricia-tree@npm:^4.2.4": + version: 4.2.4 + resolution: "merkle-patricia-tree@npm:4.2.4" + dependencies: + "@types/levelup": ^4.3.0 + ethereumjs-util: ^7.1.4 + level-mem: ^5.0.1 + level-ws: ^2.0.0 + readable-stream: ^3.6.0 + semaphore-async-await: ^1.5.1 + checksum: acedc7eea7bb14b97da01e8e023406ed55742f8e82bdd28d1ed821e3bd0cfed9e92f18c7cb300aee0d38f319c960026fd4d4e601f61e2a8665b73c0786d9f799 + languageName: node + linkType: hard + "methods@npm:~1.1.2": version: 1.1.2 resolution: "methods@npm:1.1.2" @@ -11029,7 +12076,17 @@ __metadata: languageName: node linkType: hard -"micromatch@npm:^4.0.2, micromatch@npm:^4.0.4": +"micromatch@npm:^4.0.2": + version: 4.0.7 + resolution: "micromatch@npm:4.0.7" + dependencies: + braces: ^3.0.3 + picomatch: ^2.3.1 + checksum: 3cde047d70ad80cf60c787b77198d680db3b8c25b23feb01de5e2652205d9c19f43bd81882f69a0fd1f0cde6a7a122d774998aad3271ddb1b8accf8a0f480cf7 + languageName: node + linkType: hard + +"micromatch@npm:^4.0.4": version: 4.0.5 resolution: "micromatch@npm:4.0.5" dependencies: @@ -11148,11 +12205,11 @@ __metadata: linkType: hard "minimatch@npm:^9.0.1": - version: 9.0.3 - resolution: "minimatch@npm:9.0.3" + version: 9.0.4 + resolution: "minimatch@npm:9.0.4" dependencies: brace-expansion: ^2.0.1 - checksum: 253487976bf485b612f16bf57463520a14f512662e592e95c571afdab1442a6a6864b6c88f248ce6fc4ff0b6de04ac7aa6c8bb51e868e99d1d65eb0658a708b5 + checksum: cf717f597ec3eed7dabc33153482a2e8d49f4fd3c26e58fd9c71a94c5029a0838728841b93f46bf1263b65a8010e2ee800d0dc9b004ab8ba8b6d1ec07cc115b5 languageName: node linkType: hard @@ -11240,7 +12297,7 @@ __metadata: languageName: node linkType: hard -"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3": +"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.0.4": version: 7.0.4 resolution: "minipass@npm:7.0.4" checksum: 87585e258b9488caf2e7acea242fd7856bbe9a2c84a7807643513a338d66f368c7d518200ad7b70a508664d408aa000517647b2930c259a8b1f9f0984f344a21 @@ -11324,8 +12381,8 @@ __metadata: linkType: hard "mocha@npm:^10.0.0, mocha@npm:^10.2.0": - version: 10.2.0 - resolution: "mocha@npm:10.2.0" + version: 10.4.0 + resolution: "mocha@npm:10.4.0" dependencies: ansi-colors: 4.1.1 browser-stdout: 1.3.1 @@ -11334,13 +12391,12 @@ __metadata: diff: 5.0.0 escape-string-regexp: 4.0.0 find-up: 5.0.0 - glob: 7.2.0 + glob: 8.1.0 he: 1.2.0 js-yaml: 4.1.0 log-symbols: 4.1.0 minimatch: 5.0.1 ms: 2.1.3 - nanoid: 3.3.3 serialize-javascript: 6.0.0 strip-json-comments: 3.1.1 supports-color: 8.1.1 @@ -11351,7 +12407,7 @@ __metadata: bin: _mocha: bin/_mocha mocha: bin/mocha.js - checksum: 406c45eab122ffd6ea2003c2f108b2bc35ba036225eee78e0c784b6fa2c7f34e2b13f1dbacef55a4fdf523255d76e4f22d1b5aacda2394bd11666febec17c719 + checksum: 090771d6d42a65a934c7ed448d524bcc663836351af9f0678578caa69943b01a9535a73192d24fd625b3fdb5979cce5834dfe65e3e1ee982444d65e19975b81c languageName: node linkType: hard @@ -11376,13 +12432,6 @@ __metadata: languageName: node linkType: hard -"module-error@npm:^1.0.1, module-error@npm:^1.0.2": - version: 1.0.2 - resolution: "module-error@npm:1.0.2" - checksum: 5d653e35bd55b3e95f8aee2cdac108082ea892e71b8f651be92cde43e4ee86abee4fa8bd7fc3fe5e68b63926d42f63c54cd17b87a560c31f18739295575a3962 - languageName: node - linkType: hard - "ms@npm:2.0.0": version: 2.0.0 resolution: "ms@npm:2.0.0" @@ -11507,15 +12556,6 @@ __metadata: languageName: node linkType: hard -"nanoid@npm:3.3.3": - version: 3.3.3 - resolution: "nanoid@npm:3.3.3" - bin: - nanoid: bin/nanoid.cjs - checksum: ada019402a07464a694553c61d2dca8a4353645a7d92f2830f0d487fedff403678a0bee5323a46522752b2eab95a0bc3da98b6cccaa7c0c55cd9975130e6d6f0 - languageName: node - linkType: hard - "nanoid@npm:^3.0.2, nanoid@npm:^3.1.20, nanoid@npm:^3.1.23": version: 3.3.7 resolution: "nanoid@npm:3.3.7" @@ -11544,10 +12584,10 @@ __metadata: languageName: node linkType: hard -"napi-macros@npm:^2.2.2": - version: 2.2.2 - resolution: "napi-macros@npm:2.2.2" - checksum: c6f9bd71cdbbc37ddc3535aa5be481238641d89585b8a3f4d301cb89abf459e2d294810432bb7d12056d1f9350b1a0899a5afcf460237a3da6c398cf0fec7629 +"napi-macros@npm:~2.0.0": + version: 2.0.0 + resolution: "napi-macros@npm:2.0.0" + checksum: 30384819386977c1f82034757014163fa60ab3c5a538094f778d38788bebb52534966279956f796a92ea771c7f8ae072b975df65de910d051ffbdc927f62320c languageName: node linkType: hard @@ -11653,6 +12693,28 @@ __metadata: languageName: node linkType: hard +"node-gyp-build@npm:4.3.0": + version: 4.3.0 + resolution: "node-gyp-build@npm:4.3.0" + bin: + node-gyp-build: bin.js + node-gyp-build-optional: optional.js + node-gyp-build-test: build-test.js + checksum: 1ecab16d9f275174d516e223f60f65ebe07540347d5c04a6a7d6921060b7f2e3af4f19463d9d1dcedc452e275c2ae71354a99405e55ebd5b655bb2f38025c728 + languageName: node + linkType: hard + +"node-gyp-build@npm:4.4.0": + version: 4.4.0 + resolution: "node-gyp-build@npm:4.4.0" + bin: + node-gyp-build: bin.js + node-gyp-build-optional: optional.js + node-gyp-build-test: build-test.js + checksum: 972a059f960253d254e0b23ce10f54c8982236fc0edcab85166d0b7f87443b2ce98391c877cfb2f6eeafcf03c538c5f4dd3e0bfff03828eb48634f58f4c64343 + languageName: node + linkType: hard + "node-gyp-build@npm:^4.2.0, node-gyp-build@npm:^4.3.0": version: 4.8.0 resolution: "node-gyp-build@npm:4.8.0" @@ -11665,8 +12727,8 @@ __metadata: linkType: hard "node-gyp@npm:latest": - version: 10.0.1 - resolution: "node-gyp@npm:10.0.1" + version: 10.1.0 + resolution: "node-gyp@npm:10.1.0" dependencies: env-paths: ^2.2.0 exponential-backoff: ^3.1.1 @@ -11680,7 +12742,7 @@ __metadata: which: ^4.0.0 bin: node-gyp: bin/node-gyp.js - checksum: 60a74e66d364903ce02049966303a57f898521d139860ac82744a5fdd9f7b7b3b61f75f284f3bfe6e6add3b8f1871ce305a1d41f775c7482de837b50c792223f + checksum: 72e2ab4b23fc32007a763da94018f58069fc0694bf36115d49a2b195c8831e12cf5dd1e7a3718fa85c06969aedf8fc126722d3b672ec1cb27e06ed33caee3c60 languageName: node linkType: hard @@ -11806,7 +12868,7 @@ __metadata: languageName: node linkType: hard -"object-inspect@npm:^1.13.1, object-inspect@npm:^1.9.0": +"object-inspect@npm:^1.13.1": version: 1.13.1 resolution: "object-inspect@npm:1.13.1" checksum: 7d9fa9221de3311dcb5c7c307ee5dc011cdd31dc43624b7c184b3840514e118e05ef0002be5388304c416c0eb592feb46e983db12577fc47e47d5752fbbfb61f @@ -11821,12 +12883,12 @@ __metadata: linkType: hard "object-is@npm:^1.1.5": - version: 1.1.5 - resolution: "object-is@npm:1.1.5" + version: 1.1.6 + resolution: "object-is@npm:1.1.6" dependencies: - call-bind: ^1.0.2 - define-properties: ^1.1.3 - checksum: 989b18c4cba258a6b74dc1d74a41805c1a1425bce29f6cabb50dcb1a6a651ea9104a1b07046739a49a5bb1bc49727bcb00efd5c55f932f6ea04ec8927a7901fe + call-bind: ^1.0.7 + define-properties: ^1.2.1 + checksum: 3ea22759967e6f2380a2cbbd0f737b42dc9ddb2dfefdb159a1b927fea57335e1b058b564bfa94417db8ad58cddab33621a035de6f5e5ad56d89f2dd03e66c6a1 languageName: node linkType: hard @@ -11853,7 +12915,7 @@ __metadata: languageName: node linkType: hard -"object.assign@npm:^4.1.4": +"object.assign@npm:^4.1.5": version: 4.1.5 resolution: "object.assign@npm:4.1.5" dependencies: @@ -11866,39 +12928,40 @@ __metadata: linkType: hard "object.fromentries@npm:^2.0.7": - version: 2.0.7 - resolution: "object.fromentries@npm:2.0.7" + version: 2.0.8 + resolution: "object.fromentries@npm:2.0.8" dependencies: - call-bind: ^1.0.2 - define-properties: ^1.2.0 - es-abstract: ^1.22.1 - checksum: 7341ce246e248b39a431b87a9ddd331ff52a454deb79afebc95609f94b1f8238966cf21f52188f2a353f0fdf83294f32f1ebf1f7826aae915ebad21fd0678065 + call-bind: ^1.0.7 + define-properties: ^1.2.1 + es-abstract: ^1.23.2 + es-object-atoms: ^1.0.0 + checksum: 29b2207a2db2782d7ced83f93b3ff5d425f901945f3665ffda1821e30a7253cd1fd6b891a64279976098137ddfa883d748787a6fea53ecdb51f8df8b8cec0ae1 languageName: node linkType: hard "object.getownpropertydescriptors@npm:^2.1.6": - version: 2.1.7 - resolution: "object.getownpropertydescriptors@npm:2.1.7" + version: 2.1.8 + resolution: "object.getownpropertydescriptors@npm:2.1.8" dependencies: array.prototype.reduce: ^1.0.6 - call-bind: ^1.0.2 - define-properties: ^1.2.0 - es-abstract: ^1.22.1 - safe-array-concat: ^1.0.0 - checksum: 8e7ae1d522a3874d2d23a3d0fb75828cbcee60958b65c2ad8e58ce227f4efba8cc2b59c7431a0fd48b20d9e04ec075bc0e0d694b1d2c2296e534daf558beb10b + 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 + checksum: 073e492700a7f61ff6c471a2ed96e72473b030a7a105617f03cab192fb4bbc0e6068ef76534ec56afd34baf26b5dc5408de59cb0140ec8abde781e00faa3e63e languageName: node linkType: hard "object.groupby@npm:^1.0.1": - version: 1.0.2 - resolution: "object.groupby@npm:1.0.2" + version: 1.0.3 + resolution: "object.groupby@npm:1.0.3" dependencies: - array.prototype.filter: ^1.0.3 - call-bind: ^1.0.5 + call-bind: ^1.0.7 define-properties: ^1.2.1 - es-abstract: ^1.22.3 - es-errors: ^1.0.0 - checksum: 5f95c2a3a5f60a1a8c05fdd71455110bd3d5e6af0350a20b133d8cd70f9c3385d5c7fceb6a17b940c3c61752d9c202d10d5e2eb5ce73b89002656a87e7bf767a + es-abstract: ^1.23.2 + checksum: 0d30693ca3ace29720bffd20b3130451dca7a56c612e1926c0a1a15e4306061d84410bdb1456be2656c5aca53c81b7a3661eceaa362db1bba6669c2c9b6d1982 languageName: node linkType: hard @@ -11912,13 +12975,13 @@ __metadata: linkType: hard "object.values@npm:^1.1.7": - version: 1.1.7 - resolution: "object.values@npm:1.1.7" + version: 1.2.0 + resolution: "object.values@npm:1.2.0" dependencies: - call-bind: ^1.0.2 - define-properties: ^1.2.0 - es-abstract: ^1.22.1 - checksum: f3e4ae4f21eb1cc7cebb6ce036d4c67b36e1c750428d7b7623c56a0db90edced63d08af8a316d81dfb7c41a3a5fa81b05b7cc9426e98d7da986b1682460f0777 + call-bind: ^1.0.7 + define-properties: ^1.2.1 + es-object-atoms: ^1.0.0 + checksum: 51fef456c2a544275cb1766897f34ded968b22adfc13ba13b5e4815fdaf4304a90d42a3aee114b1f1ede048a4890381d47a5594d84296f2767c6a0364b9da8fa languageName: node linkType: hard @@ -12214,16 +13277,17 @@ __metadata: languageName: node linkType: hard -"parse-asn1@npm:^5.0.0, parse-asn1@npm:^5.1.6": - version: 5.1.6 - resolution: "parse-asn1@npm:5.1.6" +"parse-asn1@npm:^5.0.0, parse-asn1@npm:^5.1.7": + version: 5.1.7 + resolution: "parse-asn1@npm:5.1.7" dependencies: - asn1.js: ^5.2.0 - browserify-aes: ^1.0.0 - evp_bytestokey: ^1.0.0 - pbkdf2: ^3.0.3 - safe-buffer: ^5.1.1 - checksum: 9243311d1f88089bc9f2158972aa38d1abd5452f7b7cabf84954ed766048fe574d434d82c6f5a39b988683e96fb84cd933071dda38927e03469dc8c8d14463c7 + 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 + checksum: 93c7194c1ed63a13e0b212d854b5213ad1aca0ace41c66b311e97cca0519cf9240f79435a0306a3b412c257f0ea3f1953fd0d9549419a0952c9e995ab361fd6c languageName: node linkType: hard @@ -12387,13 +13451,13 @@ __metadata: languageName: node linkType: hard -"path-scurry@npm:^1.10.1": - version: 1.10.1 - resolution: "path-scurry@npm:1.10.1" +"path-scurry@npm:^1.10.2": + version: 1.10.2 + resolution: "path-scurry@npm:1.10.2" dependencies: - lru-cache: ^9.1.1 || ^10.0.0 + lru-cache: ^10.2.0 minipass: ^5.0.0 || ^6.0.2 || ^7.0.0 - checksum: e2557cff3a8fb8bc07afdd6ab163a92587884f9969b05bbbaf6fe7379348bfb09af9ed292af12ed32398b15fb443e81692047b786d1eeb6d898a51eb17ed7d90 + checksum: 6739b4290f7d1a949c61c758b481c07ac7d1a841964c68cf5e1fa153d7e18cbde4872b37aadf9c5173c800d627f219c47945859159de36c977dd82419997b9b8 languageName: node linkType: hard @@ -12429,7 +13493,7 @@ __metadata: languageName: node linkType: hard -"pbkdf2@npm:^3.0.17, pbkdf2@npm:^3.0.3, pbkdf2@npm:^3.0.9": +"pbkdf2@npm:^3.0.17, pbkdf2@npm:^3.0.3, pbkdf2@npm:^3.0.9, pbkdf2@npm:^3.1.2": version: 3.1.2 resolution: "pbkdf2@npm:3.1.2" dependencies: @@ -12449,6 +13513,13 @@ __metadata: languageName: node linkType: hard +"picocolors@npm:^1.0.0": + version: 1.0.0 + resolution: "picocolors@npm:1.0.0" + checksum: a2e8092dd86c8396bdba9f2b5481032848525b3dc295ce9b57896f931e63fc16f79805144321f72976383fc249584672a75cc18d6777c6b757603f372f745981 + languageName: node + linkType: hard + "picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.3.1": version: 2.3.1 resolution: "picomatch@npm:2.3.1" @@ -12507,6 +13578,13 @@ __metadata: languageName: node linkType: hard +"possible-typed-array-names@npm:^1.0.0": + version: 1.0.0 + resolution: "possible-typed-array-names@npm:1.0.0" + checksum: b32d403ece71e042385cc7856385cecf1cd8e144fa74d2f1de40d1e16035dba097bc189715925e79b67bdd1472796ff168d3a90d296356c9c94d272d5b95f3ae + languageName: node + linkType: hard + "postinstall-postinstall@npm:^2.1.0": version: 2.1.0 resolution: "postinstall-postinstall@npm:2.1.0" @@ -12846,11 +13924,11 @@ __metadata: linkType: hard "qs@npm:^6.11.2, qs@npm:^6.4.0": - version: 6.11.2 - resolution: "qs@npm:6.11.2" + version: 6.12.1 + resolution: "qs@npm:6.12.1" dependencies: - side-channel: ^1.0.4 - checksum: e812f3c590b2262548647d62f1637b6989cc56656dc960b893fe2098d96e1bd633f36576f4cd7564dfbff9db42e17775884db96d846bebe4f37420d073ecdc0b + side-channel: ^1.0.6 + checksum: aa761d99e65b6936ba2dd2187f2d9976afbcda38deb3ff1b3fe331d09b0c578ed79ca2abdde1271164b5be619c521ec7db9b34c23f49a074e5921372d16242d5 languageName: node linkType: hard @@ -12912,18 +13990,6 @@ __metadata: languageName: node linkType: hard -"raw-body@npm:2.5.1": - version: 2.5.1 - resolution: "raw-body@npm:2.5.1" - dependencies: - bytes: 3.1.2 - http-errors: 2.0.0 - iconv-lite: 0.4.24 - unpipe: 1.0.0 - checksum: 5362adff1575d691bb3f75998803a0ffed8c64eabeaa06e54b4ada25a0cd1b2ae7f4f5ec46565d1bec337e08b5ac90c76eaa0758de6f72a633f025d754dec29e - languageName: node - linkType: hard - "raw-body@npm:2.5.2, raw-body@npm:^2.4.1": version: 2.5.2 resolution: "raw-body@npm:2.5.2" @@ -12978,7 +14044,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:^2.0.0, readable-stream@npm:^2.0.5, readable-stream@npm:^2.2.2, readable-stream@npm:^2.2.8, readable-stream@npm:^2.2.9, readable-stream@npm:^2.3.0, readable-stream@npm:^2.3.5, readable-stream@npm:^2.3.6, readable-stream@npm:~2.3.6": +"readable-stream@npm:^2.0.0, readable-stream@npm:^2.0.5, readable-stream@npm:^2.2.2, readable-stream@npm:^2.2.8, readable-stream@npm:^2.2.9, readable-stream@npm:^2.3.0, readable-stream@npm:^2.3.5, readable-stream@npm:^2.3.6, readable-stream@npm:^2.3.8, readable-stream@npm:~2.3.6": version: 2.3.8 resolution: "readable-stream@npm:2.3.8" dependencies: @@ -12993,7 +14059,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:^3.0.6, readable-stream@npm:^3.6.0, readable-stream@npm:^3.6.2": +"readable-stream@npm:^3.0.6, readable-stream@npm:^3.1.0, readable-stream@npm:^3.4.0, readable-stream@npm:^3.6.0": version: 3.6.2 resolution: "readable-stream@npm:3.6.2" dependencies: @@ -13094,14 +14160,15 @@ __metadata: languageName: node linkType: hard -"regexp.prototype.flags@npm:^1.5.1": - version: 1.5.1 - resolution: "regexp.prototype.flags@npm:1.5.1" +"regexp.prototype.flags@npm:^1.5.1, regexp.prototype.flags@npm:^1.5.2": + version: 1.5.2 + resolution: "regexp.prototype.flags@npm:1.5.2" dependencies: - call-bind: ^1.0.2 - define-properties: ^1.2.0 - set-function-name: ^2.0.0 - checksum: 869edff00288442f8d7fa4c9327f91d85f3b3acf8cbbef9ea7a220345cf23e9241b6def9263d2c1ebcf3a316b0aa52ad26a43a84aa02baca3381717b3e307f47 + call-bind: ^1.0.6 + define-properties: ^1.2.1 + es-errors: ^1.3.0 + set-function-name: ^2.0.1 + checksum: d7f333667d5c564e2d7a97c56c3075d64c722c9bb51b2b4df6822b2e8096d623a5e63088fb4c83df919b6951ef8113841de8b47de7224872fa6838bc5d8a7d64 languageName: node linkType: hard @@ -13155,7 +14222,7 @@ __metadata: languageName: node linkType: hard -"repeat-string@npm:^1.6.1": +"repeat-string@npm:^1.0.0, repeat-string@npm:^1.6.1": version: 1.6.1 resolution: "repeat-string@npm:1.6.1" checksum: 1b809fc6db97decdc68f5b12c4d1a671c8e3f65ec4a40c238bc5200e44e85bcc52a54f78268ab9c29fcf5fe4f1343e805420056d1f30fa9a9ee4c2d93e3cc6c0 @@ -13423,7 +14490,7 @@ __metadata: languageName: node linkType: hard -"rimraf@npm:^3.0.0, rimraf@npm:^3.0.2": +"rimraf@npm:^3.0.2": version: 3.0.2 resolution: "rimraf@npm:3.0.2" dependencies: @@ -13444,6 +14511,17 @@ __metadata: languageName: node linkType: hard +"rlp@npm:2.2.6": + version: 2.2.6 + resolution: "rlp@npm:2.2.6" + dependencies: + bn.js: ^4.11.1 + bin: + rlp: bin/rlp + checksum: 2601225df0fe7aa3b497b33a12fd9fbaf8fb1d2989ecc5c091918ed93ee77d1c3fab20ddd3891a9ca66a8ba66d993e6079be6fb31f450fcf38ba30873102ca46 + languageName: node + linkType: hard + "rlp@npm:^2.0.0, rlp@npm:^2.2.1, rlp@npm:^2.2.2, rlp@npm:^2.2.3, rlp@npm:^2.2.4": version: 2.2.7 resolution: "rlp@npm:2.2.7" @@ -13462,15 +14540,6 @@ __metadata: languageName: node linkType: hard -"run-parallel-limit@npm:^1.1.0": - version: 1.1.0 - resolution: "run-parallel-limit@npm:1.1.0" - dependencies: - queue-microtask: ^1.2.2 - checksum: 672c3b87e7f939c684b9965222b361421db0930223ed1e43ebf0e7e48ccc1a022ea4de080bef4d5468434e2577c33b7681e3f03b7593fdc49ad250a55381123c - languageName: node - linkType: hard - "run-parallel@npm:^1.1.9": version: 1.2.0 resolution: "run-parallel@npm:1.2.0" @@ -13505,15 +14574,15 @@ __metadata: languageName: node linkType: hard -"safe-array-concat@npm:^1.0.0, safe-array-concat@npm:^1.0.1": - version: 1.1.0 - resolution: "safe-array-concat@npm:1.1.0" +"safe-array-concat@npm:^1.0.0, safe-array-concat@npm:^1.1.2": + version: 1.1.2 + resolution: "safe-array-concat@npm:1.1.2" dependencies: - call-bind: ^1.0.5 - get-intrinsic: ^1.2.2 + call-bind: ^1.0.7 + get-intrinsic: ^1.2.4 has-symbols: ^1.0.3 isarray: ^2.0.5 - checksum: 5c71eaa999168ee7474929f1cd3aae80f486353a651a094d9968936692cf90aa065224929a6486dcda66334a27dce4250a83612f9e0fef6dced1a925d3ac7296 + checksum: a3b259694754ddfb73ae0663829e396977b99ff21cbe8607f35a469655656da8e271753497e59da8a7575baa94d2e684bea3e10ddd74ba046c0c9b4418ffa0c4 languageName: node linkType: hard @@ -13540,14 +14609,14 @@ __metadata: languageName: node linkType: hard -"safe-regex-test@npm:^1.0.0": - version: 1.0.2 - resolution: "safe-regex-test@npm:1.0.2" +"safe-regex-test@npm:^1.0.3": + version: 1.0.3 + resolution: "safe-regex-test@npm:1.0.3" dependencies: - call-bind: ^1.0.5 - get-intrinsic: ^1.2.2 + call-bind: ^1.0.6 + es-errors: ^1.3.0 is-regex: ^1.1.4 - checksum: 4af5ce05a2daa4f6d4bfd5a3c64fc33d6b886f6592122e93c0efad52f7147b9b605e5ffc03c269a1e3d1f8db2a23bc636628a961c9fd65bafdc09503330673fd + checksum: 6c7d392ff1ae7a3ae85273450ed02d1d131f1d2c76e177d6b03eb88e6df8fa062639070e7d311802c1615f351f18dc58f9454501c58e28d5ffd9b8f502ba6489 languageName: node linkType: hard @@ -13607,7 +14676,7 @@ __metadata: languageName: node linkType: hard -"secp256k1@npm:^4.0.1": +"secp256k1@npm:4.0.3, secp256k1@npm:^4.0.1": version: 4.0.3 resolution: "secp256k1@npm:4.0.3" dependencies: @@ -13626,6 +14695,20 @@ __metadata: languageName: node linkType: hard +"seedrandom@npm:3.0.5": + version: 3.0.5 + resolution: "seedrandom@npm:3.0.5" + checksum: 728b56bc3bc1b9ddeabd381e449b51cb31bdc0aa86e27fcd0190cea8c44613d5bcb2f6bb63ed79f78180cbe791c20b8ec31a9627f7b7fc7f476fd2bdb7e2da9f + languageName: node + linkType: hard + +"semaphore-async-await@npm:^1.5.1": + version: 1.5.1 + resolution: "semaphore-async-await@npm:1.5.1" + checksum: 2dedf7c59ba5f2da860fed95a81017189de6257cbe06c9de0ff2e610a3ae427e9bde1ab7685a62b03ebc28982dee437110492215d75fd6dc8257ce7a38e66b74 + languageName: node + linkType: hard + "semaphore@npm:>=1.0.1, semaphore@npm:^1.0.3, semaphore@npm:^1.1.0": version: 1.1.0 resolution: "semaphore@npm:1.1.0" @@ -13652,13 +14735,13 @@ __metadata: linkType: hard "semver@npm:^7.0.0, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.2, semver@npm:^7.5.4": - version: 7.5.4 - resolution: "semver@npm:7.5.4" + version: 7.6.0 + resolution: "semver@npm:7.6.0" dependencies: lru-cache: ^6.0.0 bin: semver: bin/semver.js - checksum: 12d8ad952fa353b0995bf180cdac205a4068b759a140e5d3c608317098b3575ac2f1e09182206bf2eb26120e1c0ed8fb92c48c592f6099680de56bb071423ca3 + checksum: 7427f05b70786c696640edc29fdd4bc33b2acf3bbe1740b955029044f80575fc664e1a512e4113c3af21e767154a94b4aa214bf6cd6e42a1f6dba5914e0b208c languageName: node linkType: hard @@ -13733,27 +14816,29 @@ __metadata: languageName: node linkType: hard -"set-function-length@npm:^1.1.1": - version: 1.2.0 - resolution: "set-function-length@npm:1.2.0" +"set-function-length@npm:^1.2.1": + version: 1.2.2 + resolution: "set-function-length@npm:1.2.2" dependencies: - define-data-property: ^1.1.1 + define-data-property: ^1.1.4 + es-errors: ^1.3.0 function-bind: ^1.1.2 - get-intrinsic: ^1.2.2 + get-intrinsic: ^1.2.4 gopd: ^1.0.1 - has-property-descriptors: ^1.0.1 - checksum: 63e34b45a2ff9abb419f52583481bf8ba597d33c0c85e56999085eb6078a0f7fbb4222051981c287feceeb358aa7789e7803cea2c82ac94c0ab37059596aff79 + has-property-descriptors: ^1.0.2 + checksum: a8248bdacdf84cb0fab4637774d9fb3c7a8e6089866d04c817583ff48e14149c87044ce683d7f50759a8c50fb87c7a7e173535b06169c87ef76f5fb276dfff72 languageName: node linkType: hard -"set-function-name@npm:^2.0.0": - version: 2.0.1 - resolution: "set-function-name@npm:2.0.1" +"set-function-name@npm:^2.0.1": + version: 2.0.2 + resolution: "set-function-name@npm:2.0.2" dependencies: - define-data-property: ^1.0.1 + define-data-property: ^1.1.4 + es-errors: ^1.3.0 functions-have-names: ^1.2.3 - has-property-descriptors: ^1.0.0 - checksum: 4975d17d90c40168eee2c7c9c59d023429f0a1690a89d75656306481ece0c3c1fb1ebcc0150ea546d1913e35fbd037bace91372c69e543e51fc5d1f31a9fa126 + has-property-descriptors: ^1.0.2 + checksum: d6229a71527fd0404399fc6227e0ff0652800362510822a291925c9d7b48a1ca1a468b11b281471c34cd5a2da0db4f5d7ff315a61d26655e77f6e971e6d0c80f languageName: node linkType: hard @@ -13857,14 +14942,15 @@ __metadata: languageName: node linkType: hard -"side-channel@npm:^1.0.4": - version: 1.0.4 - resolution: "side-channel@npm:1.0.4" +"side-channel@npm:^1.0.4, side-channel@npm:^1.0.6": + version: 1.0.6 + resolution: "side-channel@npm:1.0.6" dependencies: - call-bind: ^1.0.0 - get-intrinsic: ^1.0.2 - object-inspect: ^1.9.0 - checksum: 351e41b947079c10bd0858364f32bb3a7379514c399edb64ab3dce683933483fc63fb5e4efe0a15a2e8a7e3c436b6a91736ddb8d8c6591b0460a24bb4a1ee245 + call-bind: ^1.0.7 + es-errors: ^1.3.0 + get-intrinsic: ^1.2.4 + object-inspect: ^1.13.1 + checksum: bfc1afc1827d712271453e91b7cd3878ac0efd767495fd4e594c4c2afaa7963b7b510e249572bfd54b0527e66e4a12b61b80c061389e129755f34c493aad9b97 languageName: node linkType: hard @@ -13986,24 +15072,24 @@ __metadata: languageName: node linkType: hard -"socks-proxy-agent@npm:^8.0.1": - version: 8.0.2 - resolution: "socks-proxy-agent@npm:8.0.2" +"socks-proxy-agent@npm:^8.0.3": + version: 8.0.3 + resolution: "socks-proxy-agent@npm:8.0.3" dependencies: - agent-base: ^7.0.2 + agent-base: ^7.1.1 debug: ^4.3.4 socks: ^2.7.1 - checksum: 4fb165df08f1f380881dcd887b3cdfdc1aba3797c76c1e9f51d29048be6e494c5b06d68e7aea2e23df4572428f27a3ec22b3d7c75c570c5346507433899a4b6d + checksum: 8fab38821c327c190c28f1658087bc520eb065d55bc07b4a0fdf8d1e0e7ad5d115abbb22a95f94f944723ea969dd771ad6416b1e3cde9060c4c71f705c8b85c5 languageName: node linkType: hard "socks@npm:^2.7.1": - version: 2.7.1 - resolution: "socks@npm:2.7.1" + version: 2.8.3 + resolution: "socks@npm:2.8.3" dependencies: - ip: ^2.0.0 + ip-address: ^9.0.5 smart-buffer: ^4.2.0 - checksum: 259d9e3e8e1c9809a7f5c32238c3d4d2a36b39b83851d0f573bfde5f21c4b1288417ce1af06af1452569cd1eb0841169afd4998f0e04ba04656f6b7f0e46d748 + checksum: 7a6b7f6eedf7482b9e4597d9a20e09505824208006ea8f2c49b71657427f3c137ca2ae662089baa73e1971c62322d535d9d0cf1c9235cf6f55e315c18203eadd languageName: node linkType: hard @@ -14026,6 +15112,23 @@ __metadata: languageName: node linkType: hard +"solc@npm:0.8.15": + version: 0.8.15 + resolution: "solc@npm:0.8.15" + 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 + bin: + solcjs: solc.js + checksum: a11de198bc5d481485a4a4803fb08a81a56dd9ffa7cdc62f8d6d5fc669f72e7cb4b22789004d54481353463421f6e6e3d1dffe7365b6d0ed5f37baee303266db + languageName: node + linkType: hard + "solc@npm:^0.4.20": version: 0.4.26 resolution: "solc@npm:0.4.26" @@ -14091,11 +15194,11 @@ __metadata: linkType: hard "solidity-ast@npm:^0.4.51": - version: 0.4.55 - resolution: "solidity-ast@npm:0.4.55" + version: 0.4.56 + resolution: "solidity-ast@npm:0.4.56" dependencies: array.prototype.findlast: ^1.2.2 - checksum: a33f50b48039ca6a980eeb5d2e55a32d93c48bacbe33494faad8d50262f734cdb5c10b6d01d8bda289e702e0f9d144dd120fca1aa954c5390be8300a74a48af6 + checksum: 124cd54dc187860c83f4e8a3cbc41f890fbd0aaad4695356763034bdc782046eac414b161b7f354e423e075dba303d6bef213682df8932fee5d143d52135cd4e languageName: node linkType: hard @@ -14107,21 +15210,20 @@ __metadata: linkType: hard "solidity-coverage@npm:^0.8.5": - version: 0.8.6 - resolution: "solidity-coverage@npm:0.8.6" + version: 0.8.12 + resolution: "solidity-coverage@npm:0.8.12" dependencies: "@ethersproject/abi": ^5.0.9 "@solidity-parser/parser": ^0.18.0 chalk: ^2.4.2 death: ^1.1.0 - detect-port: ^1.3.0 difflib: ^0.2.4 fs-extra: ^8.1.0 ghost-testrpc: ^0.0.2 global-modules: ^2.0.0 globby: ^10.0.1 jsonschema: ^1.2.4 - lodash: ^4.17.15 + lodash: ^4.17.21 mocha: ^10.2.0 node-emoji: ^1.10.0 pify: ^4.0.1 @@ -14134,7 +15236,7 @@ __metadata: hardhat: ^2.11.0 bin: solidity-coverage: plugins/bin.js - checksum: 178bab95b9b41683131bf05c23ec213aca38fb65973d93a19d56ec3be3675b79e63219e2e9b1ae05ad723eb301952cc2a3c53247c676b5236262e87249a5895f + checksum: 8839416986fc76d27931dca885d915717fea3d7bae3cd2506f315f8b0583b50e05bd25a0d481262ad6cf2786966f603b6481b1658810e4add5761ce96cf5ffe4 languageName: node linkType: hard @@ -14221,9 +15323,9 @@ __metadata: linkType: hard "spdx-exceptions@npm:^2.1.0": - version: 2.4.0 - resolution: "spdx-exceptions@npm:2.4.0" - checksum: b1b650a8d94424473bf9629cf972c86a91c03cccc260f5c901bce0e4b92d831627fec28c9e0a1e9c34c5ebad0a12cf2eab887bec088e0a862abb9d720c2fd0a1 + version: 2.5.0 + resolution: "spdx-exceptions@npm:2.5.0" + checksum: bb127d6e2532de65b912f7c99fc66097cdea7d64c10d3ec9b5e96524dbbd7d20e01cba818a6ddb2ae75e62bb0c63d5e277a7e555a85cbc8ab40044984fa4ae15 languageName: node linkType: hard @@ -14238,9 +15340,9 @@ __metadata: linkType: hard "spdx-license-ids@npm:^3.0.0": - version: 3.0.16 - resolution: "spdx-license-ids@npm:3.0.16" - checksum: 5cdaa85aaa24bd02f9353a2e357b4df0a4f205cb35655f3fd0a5674a4fb77081f28ffd425379214bc3be2c2b7593ce1215df6bcc75884aeee0a9811207feabe2 + version: 3.0.18 + resolution: "spdx-license-ids@npm:3.0.18" + checksum: 457825df5dd1fc0135b0bb848c896143f70945cc2da148afc71c73ed0837d1d651f809006e406d82109c9dd71a8cb39785a3604815fe46bc0548e9d3976f6b69 languageName: node linkType: hard @@ -14260,6 +15362,13 @@ __metadata: languageName: node linkType: hard +"sprintf-js@npm:^1.1.3": + version: 1.1.3 + resolution: "sprintf-js@npm:1.1.3" + checksum: a3fdac7b49643875b70864a9d9b469d87a40dfeaf5d34d9d0c5b1cda5fd7d065531fcb43c76357d62254c57184a7b151954156563a4d6a747015cfb41021cad0 + languageName: node + linkType: hard + "sprintf-js@npm:~1.0.2": version: 1.0.3 resolution: "sprintf-js@npm:1.0.3" @@ -14410,36 +15519,37 @@ __metadata: languageName: node linkType: hard -"string.prototype.trim@npm:^1.2.8, string.prototype.trim@npm:~1.2.8": - version: 1.2.8 - resolution: "string.prototype.trim@npm:1.2.8" +"string.prototype.trim@npm:^1.2.9, string.prototype.trim@npm:~1.2.8": + version: 1.2.9 + resolution: "string.prototype.trim@npm:1.2.9" dependencies: - call-bind: ^1.0.2 - define-properties: ^1.2.0 - es-abstract: ^1.22.1 - checksum: 49eb1a862a53aba73c3fb6c2a53f5463173cb1f4512374b623bcd6b43ad49dd559a06fb5789bdec771a40fc4d2a564411c0a75d35fb27e76bbe738c211ecff07 + call-bind: ^1.0.7 + define-properties: ^1.2.1 + es-abstract: ^1.23.0 + es-object-atoms: ^1.0.0 + checksum: ea2df6ec1e914c9d4e2dc856fa08228e8b1be59b59e50b17578c94a66a176888f417264bb763d4aac638ad3b3dad56e7a03d9317086a178078d131aa293ba193 languageName: node linkType: hard -"string.prototype.trimend@npm:^1.0.7": - version: 1.0.7 - resolution: "string.prototype.trimend@npm:1.0.7" +"string.prototype.trimend@npm:^1.0.8": + version: 1.0.8 + resolution: "string.prototype.trimend@npm:1.0.8" dependencies: - call-bind: ^1.0.2 - define-properties: ^1.2.0 - es-abstract: ^1.22.1 - checksum: 2375516272fd1ba75992f4c4aa88a7b5f3c7a9ca308d963bcd5645adf689eba6f8a04ebab80c33e30ec0aefc6554181a3a8416015c38da0aa118e60ec896310c + call-bind: ^1.0.7 + define-properties: ^1.2.1 + es-object-atoms: ^1.0.0 + checksum: cc3bd2de08d8968a28787deba9a3cb3f17ca5f9f770c91e7e8fa3e7d47f079bad70fadce16f05dda9f261788be2c6e84a942f618c3bed31e42abc5c1084f8dfd languageName: node linkType: hard -"string.prototype.trimstart@npm:^1.0.7": - version: 1.0.7 - resolution: "string.prototype.trimstart@npm:1.0.7" +"string.prototype.trimstart@npm:^1.0.8": + version: 1.0.8 + resolution: "string.prototype.trimstart@npm:1.0.8" dependencies: - call-bind: ^1.0.2 - define-properties: ^1.2.0 - es-abstract: ^1.22.1 - checksum: 13d0c2cb0d5ff9e926fa0bec559158b062eed2b68cd5be777ffba782c96b2b492944e47057274e064549b94dd27cf81f48b27a31fee8af5b574cff253e7eb613 + call-bind: ^1.0.7 + define-properties: ^1.2.1 + es-object-atoms: ^1.0.0 + checksum: df1007a7f580a49d692375d996521dc14fd103acda7f3034b3c558a60b82beeed3a64fa91e494e164581793a8ab0ae2f59578a49896a7af6583c1f20472bce96 languageName: node linkType: hard @@ -14673,15 +15783,15 @@ __metadata: linkType: hard "table@npm:^6.8.0, table@npm:^6.8.1": - version: 6.8.1 - resolution: "table@npm:6.8.1" + version: 6.8.2 + resolution: "table@npm:6.8.2" dependencies: ajv: ^8.0.1 lodash.truncate: ^4.4.2 slice-ansi: ^4.0.0 string-width: ^4.2.3 strip-ansi: ^6.0.1 - checksum: 08249c7046125d9d0a944a6e96cfe9ec66908d6b8a9db125531be6eb05fa0de047fd5542e9d43b4f987057f00a093b276b8d3e19af162a9c40db2681058fd306 + checksum: 61188652f53a980d1759ca460ca8dea5c5322aece3210457e7084882f053c2b6a870041295e08a82cb1d676e31b056406845d94b0abf3c79a4b104777bec413b languageName: node linkType: hard @@ -14754,8 +15864,8 @@ __metadata: linkType: hard "tar@npm:^6.1.11, tar@npm:^6.1.2": - version: 6.2.0 - resolution: "tar@npm:6.2.0" + version: 6.2.1 + resolution: "tar@npm:6.2.1" dependencies: chownr: ^2.0.0 fs-minipass: ^2.0.0 @@ -14763,7 +15873,7 @@ __metadata: minizlib: ^2.1.1 mkdirp: ^1.0.3 yallist: ^4.0.0 - checksum: db4d9fe74a2082c3a5016630092c54c8375ff3b280186938cfd104f2e089c4fd9bad58688ef6be9cf186a889671bf355c7cda38f09bbf60604b281715ca57f5c + checksum: f1322768c9741a25356c11373bce918483f40fa9a25c69c59410c8a1247632487edef5fe76c5f12ac51a6356d2f1829e96d2bc34098668a2fc34d76050ac2b6c languageName: node linkType: hard @@ -14873,11 +15983,9 @@ __metadata: linkType: hard "tmp@npm:^0.2.0": - version: 0.2.1 - resolution: "tmp@npm:0.2.1" - dependencies: - rimraf: ^3.0.0 - checksum: 8b1214654182575124498c87ca986ac53dc76ff36e8f0e0b67139a8d221eaecfdec108c0e6ec54d76f49f1f72ab9325500b246f562b926f85bcdfca8bf35df9e + version: 0.2.3 + resolution: "tmp@npm:0.2.3" + checksum: 73b5c96b6e52da7e104d9d44afb5d106bb1e16d9fa7d00dbeb9e6522e61b571fbdb165c756c62164be9a3bbe192b9b268c236d370a2a0955c7689cd2ae377b95 languageName: node linkType: hard @@ -14966,6 +16074,19 @@ __metadata: languageName: node linkType: hard +"tranche@https://github.com/buttonwood-protocol/tranche.git": + version: 1.0.0 + resolution: "tranche@https://github.com/buttonwood-protocol/tranche.git#commit=3b9b6be224b5220fe5e08a4dfa76a27b9684f259" + dependencies: + "@openzeppelin/contracts-upgradeable": ^4.1.0 + "@rari-capital/solmate": ^6.4.0 + "@uniswap/v2-periphery": ^1.1.0-beta.0 + "@uniswap/v3-periphery": ^1.1.0 + lodash: ^4.17.21 + checksum: 953aa11f09ae1367c02758cd555ba48550300fc4ffe5cbb61182d833456123c2e9f87b88fa411572c9f06db941fa00777f0d1ad1ae34215a576587e36365a91a + languageName: node + linkType: hard + "trim-right@npm:^1.0.1": version: 1.0.1 resolution: "trim-right@npm:1.0.1" @@ -15081,6 +16202,13 @@ __metadata: languageName: node linkType: hard +"tslib@npm:2.4.0": + version: 2.4.0 + resolution: "tslib@npm:2.4.0" + checksum: 8c4aa6a3c5a754bf76aefc38026134180c053b7bd2f81338cb5e5ebf96fefa0f417bff221592bf801077f5bf990562f6264fecbc42cd3309b33872cb6fc3b113 + languageName: node + linkType: hard + "tslib@npm:^1.11.1, tslib@npm:^1.8.1, tslib@npm:^1.9.0, tslib@npm:^1.9.3": version: 1.14.1 resolution: "tslib@npm:1.14.1" @@ -15088,7 +16216,7 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.1.0, tslib@npm:^2.3.1, tslib@npm:^2.5.0": +"tslib@npm:^2.1.0, tslib@npm:^2.3.1, tslib@npm:^2.6.2": version: 2.6.2 resolution: "tslib@npm:2.6.2" checksum: 329ea56123005922f39642318e3d1f0f8265d1e7fcb92c633e0809521da75eeaca28d2cf96d7248229deb40e5c19adf408259f4b9640afd20d13aecc1430f3ad @@ -15206,13 +16334,6 @@ __metadata: languageName: node linkType: hard -"type@npm:^1.0.1": - version: 1.2.0 - resolution: "type@npm:1.2.0" - checksum: dae8c64f82c648b985caf321e9dd6e8b7f4f2e2d4f846fc6fd2c8e9dc7769382d8a52369ddbaccd59aeeceb0df7f52fb339c465be5f2e543e81e810e413451ee - languageName: node - linkType: hard - "type@npm:^2.7.2": version: 2.7.2 resolution: "type@npm:2.7.2" @@ -15237,7 +16358,7 @@ __metadata: languageName: node linkType: hard -"typechain@npm:^8.1.0": +"typechain@npm:^8.0.0, typechain@npm:^8.1.0": version: 8.3.2 resolution: "typechain@npm:8.3.2" dependencies: @@ -15259,50 +16380,55 @@ __metadata: languageName: node linkType: hard -"typed-array-buffer@npm:^1.0.0": - version: 1.0.0 - resolution: "typed-array-buffer@npm:1.0.0" +"typed-array-buffer@npm:^1.0.2": + version: 1.0.2 + resolution: "typed-array-buffer@npm:1.0.2" dependencies: - call-bind: ^1.0.2 - get-intrinsic: ^1.2.1 - is-typed-array: ^1.1.10 - checksum: 3e0281c79b2a40cd97fe715db803884301993f4e8c18e8d79d75fd18f796e8cd203310fec8c7fdb5e6c09bedf0af4f6ab8b75eb3d3a85da69328f28a80456bd3 + call-bind: ^1.0.7 + es-errors: ^1.3.0 + is-typed-array: ^1.1.13 + checksum: 02ffc185d29c6df07968272b15d5319a1610817916ec8d4cd670ded5d1efe72901541ff2202fcc622730d8a549c76e198a2f74e312eabbfb712ed907d45cbb0b languageName: node linkType: hard -"typed-array-byte-length@npm:^1.0.0": - version: 1.0.0 - resolution: "typed-array-byte-length@npm:1.0.0" +"typed-array-byte-length@npm:^1.0.1": + version: 1.0.1 + resolution: "typed-array-byte-length@npm:1.0.1" dependencies: - call-bind: ^1.0.2 + call-bind: ^1.0.7 for-each: ^0.3.3 - has-proto: ^1.0.1 - is-typed-array: ^1.1.10 - checksum: b03db16458322b263d87a702ff25388293f1356326c8a678d7515767ef563ef80e1e67ce648b821ec13178dd628eb2afdc19f97001ceae7a31acf674c849af94 + gopd: ^1.0.1 + has-proto: ^1.0.3 + is-typed-array: ^1.1.13 + checksum: f65e5ecd1cf76b1a2d0d6f631f3ea3cdb5e08da106c6703ffe687d583e49954d570cc80434816d3746e18be889ffe53c58bf3e538081ea4077c26a41055b216d languageName: node linkType: hard -"typed-array-byte-offset@npm:^1.0.0": - version: 1.0.0 - resolution: "typed-array-byte-offset@npm:1.0.0" +"typed-array-byte-offset@npm:^1.0.2": + version: 1.0.2 + resolution: "typed-array-byte-offset@npm:1.0.2" dependencies: - available-typed-arrays: ^1.0.5 - call-bind: ^1.0.2 + available-typed-arrays: ^1.0.7 + call-bind: ^1.0.7 for-each: ^0.3.3 - has-proto: ^1.0.1 - is-typed-array: ^1.1.10 - checksum: 04f6f02d0e9a948a95fbfe0d5a70b002191fae0b8fe0fe3130a9b2336f043daf7a3dda56a31333c35a067a97e13f539949ab261ca0f3692c41603a46a94e960b + gopd: ^1.0.1 + has-proto: ^1.0.3 + is-typed-array: ^1.1.13 + checksum: c8645c8794a621a0adcc142e0e2c57b1823bbfa4d590ad2c76b266aa3823895cf7afb9a893bf6685e18454ab1b0241e1a8d885a2d1340948efa4b56add4b5f67 languageName: node linkType: hard -"typed-array-length@npm:^1.0.4": - version: 1.0.4 - resolution: "typed-array-length@npm:1.0.4" +"typed-array-length@npm:^1.0.6": + version: 1.0.6 + resolution: "typed-array-length@npm:1.0.6" dependencies: - call-bind: ^1.0.2 + call-bind: ^1.0.7 for-each: ^0.3.3 - is-typed-array: ^1.1.9 - checksum: 2228febc93c7feff142b8c96a58d4a0d7623ecde6c7a24b2b98eb3170e99f7c7eff8c114f9b283085cd59dcd2bd43aadf20e25bba4b034a53c5bb292f71f8956 + gopd: ^1.0.1 + has-proto: ^1.0.3 + is-typed-array: ^1.1.13 + possible-typed-array-names: ^1.0.0 + checksum: f0315e5b8f0168c29d390ff410ad13e4d511c78e6006df4a104576844812ee447fcc32daab1f3a76c9ef4f64eff808e134528b5b2439de335586b392e9750e5c languageName: node linkType: hard @@ -15458,11 +16584,18 @@ __metadata: linkType: hard "undici@npm:^5.14.0": - version: 5.28.3 - resolution: "undici@npm:5.28.3" + version: 5.28.4 + resolution: "undici@npm:5.28.4" dependencies: "@fastify/busboy": ^2.0.0 - checksum: fa1e65aff896c5e2ee23637b632e306f9e3a2b32a3dc0b23ea71e5555ad350bcc25713aea894b3dccc0b7dc2c5e92a5a58435ebc2033b731a5524506f573dfd2 + checksum: a8193132d84540e4dc1895ecc8dbaa176e8a49d26084d6fbe48a292e28397cd19ec5d13bc13e604484e76f94f6e334b2bdc740d5f06a6e50c44072818d0c19f9 + languageName: node + linkType: hard + +"undici@npm:^6.0.0": + version: 6.13.0 + resolution: "undici@npm:6.13.0" + checksum: 47495e93aceeab18664678b6fb0ea2395b7c13a33d2ed4f7f36eb9be9ec5cd6f8e3a4ddaec18127da5e2012e5d7666ca824c7dc70af606dcfe6fdb8441ee3a7a languageName: node linkType: hard @@ -15590,6 +16723,16 @@ __metadata: languageName: node linkType: hard +"utf-8-validate@npm:5.0.7": + version: 5.0.7 + resolution: "utf-8-validate@npm:5.0.7" + dependencies: + node-gyp: latest + node-gyp-build: ^4.3.0 + checksum: 588d272b359bf555a0c4c2ffe97286edc73126de132f63f4f0c80110bd06b67d3ce44d2b3d24feea6da13ced50c04d774ba4d25fe28576371cd714cd013bd3b7 + languageName: node + linkType: hard + "utf-8-validate@npm:^5.0.2": version: 5.0.10 resolution: "utf-8-validate@npm:5.0.10" @@ -15719,6 +16862,27 @@ __metadata: languageName: node linkType: hard +"viem@npm:2.7.14": + version: 2.7.14 + resolution: "viem@npm:2.7.14" + dependencies: + "@adraffy/ens-normalize": 1.10.0 + "@noble/curves": 1.2.0 + "@noble/hashes": 1.3.2 + "@scure/bip32": 1.3.2 + "@scure/bip39": 1.2.1 + abitype: 1.0.0 + isows: 1.0.3 + ws: 8.13.0 + peerDependencies: + typescript: ">=5.0.4" + peerDependenciesMeta: + typescript: + optional: true + checksum: a6bfb53a579345e92dfaadd47d38112a981284a645df45a6e7f68daff75a23d7af5458c7ee34fd36f9e7279ae3b5fc8165aea63d5323cec58ebe366b5fefe256 + languageName: node + linkType: hard + "wcwidth@npm:^1.0.1": version: 1.0.1 resolution: "wcwidth@npm:1.0.1" @@ -16075,16 +17239,16 @@ __metadata: linkType: hard "websocket@npm:^1.0.31": - version: 1.0.34 - resolution: "websocket@npm:1.0.34" + version: 1.0.35 + resolution: "websocket@npm:1.0.35" dependencies: bufferutil: ^4.0.1 debug: ^2.2.0 - es5-ext: ^0.10.50 + es5-ext: ^0.10.63 typedarray-to-buffer: ^3.1.5 utf-8-validate: ^5.0.2 yaeti: ^0.0.6 - checksum: 8a0ce6d79cc1334bb6ea0d607f0092f3d32700b4dd19e4d5540f2a85f3b50e1f8110da0e4716737056584dde70bbebcb40bbd94bbb437d7468c71abfbfa077d8 + checksum: 760ad7b090dee914336069cdf4fb78c1a96f5a452b2a5459b68d596af088959bb48113914667123d9662388c0398980955c875c950177c51fcf0d22cc92d935c languageName: node linkType: hard @@ -16132,16 +17296,16 @@ __metadata: languageName: node linkType: hard -"which-typed-array@npm:^1.1.13, which-typed-array@npm:^1.1.14": - version: 1.1.14 - resolution: "which-typed-array@npm:1.1.14" +"which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.15": + version: 1.1.15 + resolution: "which-typed-array@npm:1.1.15" dependencies: - available-typed-arrays: ^1.0.6 - call-bind: ^1.0.5 + available-typed-arrays: ^1.0.7 + call-bind: ^1.0.7 for-each: ^0.3.3 gopd: ^1.0.1 - has-tostringtag: ^1.0.1 - checksum: efe30c143c58630dde8ab96f9330e20165bacd77ca843c602b510120a415415573bcdef3ccbc30a0e5aaf20f257360cfe24712aea0008f149ce5bb99834c0c0b + has-tostringtag: ^1.0.2 + checksum: 65227dcbfadf5677aacc43ec84356d17b5500cb8b8753059bb4397de5cd0c2de681d24e1a7bd575633f976a95f88233abfd6549c2105ef4ebd58af8aa1807c75 languageName: node linkType: hard @@ -16301,6 +17465,36 @@ __metadata: languageName: node linkType: hard +"ws@npm:8.13.0": + version: 8.13.0 + resolution: "ws@npm:8.13.0" + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ">=5.0.2" + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: 53e991bbf928faf5dc6efac9b8eb9ab6497c69feeb94f963d648b7a3530a720b19ec2e0ec037344257e05a4f35bd9ad04d9de6f289615ffb133282031b18c61c + languageName: node + linkType: hard + +"ws@npm:8.5.0": + version: 8.5.0 + resolution: "ws@npm:8.5.0" + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: 76f2f90e40344bf18fd544194e7067812fb1372b2a37865678d8f12afe4b478ff2ebc0c7c0aff82cd5e6b66fc43d889eec0f1865c2365d8f7a66d92da7744a77 + languageName: node + linkType: hard + "ws@npm:^3.0.0": version: 3.3.3 resolution: "ws@npm:3.3.3" @@ -16381,7 +17575,7 @@ __metadata: languageName: node linkType: hard -"xtend@npm:^4.0.0, xtend@npm:^4.0.1, xtend@npm:~4.0.0, xtend@npm:~4.0.1": +"xtend@npm:^4.0.0, xtend@npm:^4.0.1, xtend@npm:^4.0.2, xtend@npm:~4.0.0, xtend@npm:~4.0.1": version: 4.0.2 resolution: "xtend@npm:4.0.2" checksum: ac5dfa738b21f6e7f0dd6e65e1b3155036d68104e67e5d5d1bde74892e327d7e5636a076f625599dc394330a731861e87343ff184b0047fef1360a7ec0a5a36a From 295475787b0644f2448b0e227095613620cfd6c7 Mon Sep 17 00:00:00 2001 From: aalavandhann <6264334+aalavandhan@users.noreply.github.com> Date: Thu, 30 May 2024 16:20:47 -0400 Subject: [PATCH 09/10] updated yarn lock --- yarn.lock | 587 +++++++++++++++++------------------------------------- 1 file changed, 184 insertions(+), 403 deletions(-) diff --git a/yarn.lock b/yarn.lock index 74bf0635..623bd139 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5,13 +5,6 @@ __metadata: version: 6 cacheKey: 8 -"@aashutoshrathi/word-wrap@npm:^1.2.3": - version: 1.2.6 - resolution: "@aashutoshrathi/word-wrap@npm:1.2.6" - checksum: ada901b9e7c680d190f1d012c84217ce0063d8f5c5a7725bb91ec3c5ed99bb7572680eb2d2938a531ccbaec39a95422fcd8a6b4a13110c7d98dd75402f66a0cd - languageName: node - linkType: hard - "@adraffy/ens-normalize@npm:1.10.0": version: 1.10.0 resolution: "@adraffy/ens-normalize@npm:1.10.0" @@ -200,12 +193,12 @@ __metadata: linkType: hard "@aws-sdk/types@npm:^3.1.0": - version: 3.535.0 - resolution: "@aws-sdk/types@npm:3.535.0" + version: 3.577.0 + resolution: "@aws-sdk/types@npm:3.577.0" dependencies: - "@smithy/types": ^2.12.0 + "@smithy/types": ^3.0.0 tslib: ^2.6.2 - checksum: 3f735c78ea3a6f37d05387286f6d18b0e5deb41442095bd2f7c27b000659962872d1c801fa8484a6ac4b7d2725b2e176dc628c3fa2a903a3141d4be76488d48f + checksum: d10fe1d720adf3d8b17d5c23787611e336509569df7526efa96e8901100b9279a68e30a207eff60dc5cfa011abd68d47b81e40f2d4d1a9ddfd2d3653c20e1734 languageName: node linkType: hard @@ -219,31 +212,31 @@ __metadata: linkType: hard "@babel/code-frame@npm:^7.0.0": - version: 7.24.2 - resolution: "@babel/code-frame@npm:7.24.2" + version: 7.24.6 + resolution: "@babel/code-frame@npm:7.24.6" dependencies: - "@babel/highlight": ^7.24.2 + "@babel/highlight": ^7.24.6 picocolors: ^1.0.0 - checksum: 70e867340cfe09ca5488b2f36372c45cabf43c79a5b6426e6df5ef0611ff5dfa75a57dda841895693de6008f32c21a7c97027a8c7bcabd63a7d17416cbead6f8 + checksum: 0904514ea7079a9590c1c546cd20b9c1beab9649873f2a0703429860775c1713a8dfb2daacd781a0210bb3930c656c1c436013fb20eaa3644880fb3a2b34541d languageName: node linkType: hard -"@babel/helper-validator-identifier@npm:^7.22.20": - version: 7.22.20 - resolution: "@babel/helper-validator-identifier@npm:7.22.20" - checksum: 136412784d9428266bcdd4d91c32bcf9ff0e8d25534a9d94b044f77fe76bc50f941a90319b05aafd1ec04f7d127cd57a179a3716009ff7f3412ef835ada95bdc +"@babel/helper-validator-identifier@npm:^7.24.6": + version: 7.24.6 + resolution: "@babel/helper-validator-identifier@npm:7.24.6" + checksum: a265a6fba570332dca63ad7e749b867d29b52da2573dc62bf19b5b8c5387d4f4296af33da9da7c71ffe3d3abecd743418278f56d38b057ad4b53f09b937fe113 languageName: node linkType: hard -"@babel/highlight@npm:^7.24.2": - version: 7.24.2 - resolution: "@babel/highlight@npm:7.24.2" +"@babel/highlight@npm:^7.24.6": + version: 7.24.6 + resolution: "@babel/highlight@npm:7.24.6" dependencies: - "@babel/helper-validator-identifier": ^7.22.20 + "@babel/helper-validator-identifier": ^7.24.6 chalk: ^2.4.2 js-tokens: ^4.0.0 picocolors: ^1.0.0 - checksum: 5f17b131cc3ebf3ab285a62cf98a404aef1bd71a6be045e748f8d5bf66d6a6e1aefd62f5972c84369472e8d9f22a614c58a89cd331eb60b7ba965b31b1bbeaf5 + checksum: 2f8f7f060eeccc3ddf03ba12c263995de0e6c0dd31ad224bed58d983b3bb08fe34dfc01440396266456a4cad83226c38ad6814805bc5d0c774a056cac9182eca languageName: node linkType: hard @@ -1340,13 +1333,6 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/edr-darwin-arm64@npm:0.3.5": - version: 0.3.5 - resolution: "@nomicfoundation/edr-darwin-arm64@npm:0.3.5" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - "@nomicfoundation/edr-darwin-arm64@npm:0.3.8": version: 0.3.8 resolution: "@nomicfoundation/edr-darwin-arm64@npm:0.3.8" @@ -1354,13 +1340,6 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/edr-darwin-x64@npm:0.3.5": - version: 0.3.5 - resolution: "@nomicfoundation/edr-darwin-x64@npm:0.3.5" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - "@nomicfoundation/edr-darwin-x64@npm:0.3.8": version: 0.3.8 resolution: "@nomicfoundation/edr-darwin-x64@npm:0.3.8" @@ -1368,13 +1347,6 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/edr-linux-arm64-gnu@npm:0.3.5": - version: 0.3.5 - resolution: "@nomicfoundation/edr-linux-arm64-gnu@npm:0.3.5" - conditions: os=linux & cpu=arm64 & libc=glibc - languageName: node - linkType: hard - "@nomicfoundation/edr-linux-arm64-gnu@npm:0.3.8": version: 0.3.8 resolution: "@nomicfoundation/edr-linux-arm64-gnu@npm:0.3.8" @@ -1382,13 +1354,6 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/edr-linux-arm64-musl@npm:0.3.5": - version: 0.3.5 - resolution: "@nomicfoundation/edr-linux-arm64-musl@npm:0.3.5" - conditions: os=linux & cpu=arm64 & libc=musl - languageName: node - linkType: hard - "@nomicfoundation/edr-linux-arm64-musl@npm:0.3.8": version: 0.3.8 resolution: "@nomicfoundation/edr-linux-arm64-musl@npm:0.3.8" @@ -1396,13 +1361,6 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/edr-linux-x64-gnu@npm:0.3.5": - version: 0.3.5 - resolution: "@nomicfoundation/edr-linux-x64-gnu@npm:0.3.5" - conditions: os=linux & cpu=x64 & libc=glibc - languageName: node - linkType: hard - "@nomicfoundation/edr-linux-x64-gnu@npm:0.3.8": version: 0.3.8 resolution: "@nomicfoundation/edr-linux-x64-gnu@npm:0.3.8" @@ -1410,13 +1368,6 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/edr-linux-x64-musl@npm:0.3.5": - version: 0.3.5 - resolution: "@nomicfoundation/edr-linux-x64-musl@npm:0.3.5" - conditions: os=linux & cpu=x64 & libc=musl - languageName: node - linkType: hard - "@nomicfoundation/edr-linux-x64-musl@npm:0.3.8": version: 0.3.8 resolution: "@nomicfoundation/edr-linux-x64-musl@npm:0.3.8" @@ -1424,13 +1375,6 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/edr-win32-x64-msvc@npm:0.3.5": - version: 0.3.5 - resolution: "@nomicfoundation/edr-win32-x64-msvc@npm:0.3.5" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - "@nomicfoundation/edr-win32-x64-msvc@npm:0.3.8": version: 0.3.8 resolution: "@nomicfoundation/edr-win32-x64-msvc@npm:0.3.8" @@ -1438,36 +1382,6 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/edr@npm:^0.3.5": - version: 0.3.5 - resolution: "@nomicfoundation/edr@npm:0.3.5" - dependencies: - "@nomicfoundation/edr-darwin-arm64": 0.3.5 - "@nomicfoundation/edr-darwin-x64": 0.3.5 - "@nomicfoundation/edr-linux-arm64-gnu": 0.3.5 - "@nomicfoundation/edr-linux-arm64-musl": 0.3.5 - "@nomicfoundation/edr-linux-x64-gnu": 0.3.5 - "@nomicfoundation/edr-linux-x64-musl": 0.3.5 - "@nomicfoundation/edr-win32-x64-msvc": 0.3.5 - dependenciesMeta: - "@nomicfoundation/edr-darwin-arm64": - optional: true - "@nomicfoundation/edr-darwin-x64": - optional: true - "@nomicfoundation/edr-linux-arm64-gnu": - optional: true - "@nomicfoundation/edr-linux-arm64-musl": - optional: true - "@nomicfoundation/edr-linux-x64-gnu": - optional: true - "@nomicfoundation/edr-linux-x64-musl": - optional: true - "@nomicfoundation/edr-win32-x64-msvc": - optional: true - checksum: 6d083fa8f8a3601af93d1a6a25da0031029e8f3125a7f5629de439d1b3b8ba5a699defca59470c5f087ab89cacb7d27a3492ceeb648166caa89c6747bf669e2f - languageName: node - linkType: hard - "@nomicfoundation/edr@npm:^0.3.7": version: 0.3.8 resolution: "@nomicfoundation/edr@npm:0.3.8" @@ -1569,28 +1483,28 @@ __metadata: linkType: hard "@nomicfoundation/hardhat-ethers@npm:^3.0.0": - version: 3.0.5 - resolution: "@nomicfoundation/hardhat-ethers@npm:3.0.5" + version: 3.0.6 + resolution: "@nomicfoundation/hardhat-ethers@npm:3.0.6" dependencies: debug: ^4.1.1 lodash.isequal: ^4.5.0 peerDependencies: ethers: ^6.1.0 hardhat: ^2.0.0 - checksum: 34b092dfec68f8d8673c96af717660327edc814bc5c9cdb5bc1f82d5bde2b18bc9b9d3499a632784a3d4f2505ac174217e55d31b546b7eaa77a5bb30b3c80bb4 + checksum: 31a9b5aeb7b42cf3d8bcd1f11e680ce7018874a4c63b16b01a928fb34d2bd3e0f046fc4c7180e01bcd8b8b398874fc370317165284b3f543c4f3d1fbdcfbf05d languageName: node linkType: hard "@nomicfoundation/hardhat-ignition-ethers@npm:^0.15.0": - version: 0.15.1 - resolution: "@nomicfoundation/hardhat-ignition-ethers@npm:0.15.1" + version: 0.15.4 + resolution: "@nomicfoundation/hardhat-ignition-ethers@npm:0.15.4" peerDependencies: "@nomicfoundation/hardhat-ethers": ^3.0.4 - "@nomicfoundation/hardhat-ignition": ^0.15.1 - "@nomicfoundation/ignition-core": ^0.15.1 + "@nomicfoundation/hardhat-ignition": ^0.15.4 + "@nomicfoundation/ignition-core": ^0.15.4 ethers: ^6.7.0 hardhat: ^2.18.0 - checksum: c8aa21a1d131fa4ec55c2f7a6e5f3f6b4475afe2ffbf82a46bcd429a4d8424935a1529a10bfa8edfb1e7633b4d496d61ff7f160023f457bf3e3806b8aa15d48e + checksum: f876dbd1afae4420c80dbbc5534fb42c5ca56b32837a6c65148e7c42a1aec770a24df025b5c6039f59ccb709df6b9b1bf7c89a8d3907b47781b2b134c44a43f4 languageName: node linkType: hard @@ -1651,8 +1565,8 @@ __metadata: linkType: hard "@nomicfoundation/hardhat-verify@npm:latest": - version: 2.0.6 - resolution: "@nomicfoundation/hardhat-verify@npm:2.0.6" + version: 2.0.7 + resolution: "@nomicfoundation/hardhat-verify@npm:2.0.7" dependencies: "@ethersproject/abi": ^5.1.2 "@ethersproject/address": ^5.0.2 @@ -1665,7 +1579,7 @@ __metadata: undici: ^5.14.0 peerDependencies: hardhat: ^2.0.4 - checksum: 38091d1d35e6c88b547e11c5ba0ad2b23db7df6c8d708a7a48625a9cf4adf6c51bf3544e2b6bb729280952056fddc43212ad3f04f5f1f66b04e1ee0aed58b8ca + checksum: 4b9f2c3001d56c8a2d05af11cc57461e6985723220d9af33f46c01ecd1c4eece474e3860fc4e256bcb23a1a4f6e9a26ec535264aa7d1b97be146d46262a96473 languageName: node linkType: hard @@ -1815,11 +1729,11 @@ __metadata: linkType: hard "@npmcli/fs@npm:^3.1.0": - version: 3.1.0 - resolution: "@npmcli/fs@npm:3.1.0" + version: 3.1.1 + resolution: "@npmcli/fs@npm:3.1.1" dependencies: semver: ^7.3.5 - checksum: a50a6818de5fc557d0b0e6f50ec780a7a02ab8ad07e5ac8b16bf519e0ad60a144ac64f97d05c443c3367235d337182e1d012bbac0eb8dbae8dc7b40b193efd0e + checksum: d960cab4b93adcb31ce223bfb75c5714edbd55747342efb67dcc2f25e023d930a7af6ece3e75f2f459b6f38fc14d031c766f116cd124fdc937fd33112579e820 languageName: node linkType: hard @@ -1852,32 +1766,19 @@ __metadata: linkType: hard "@openzeppelin/defender-admin-client@npm:^1.52.0": - version: 1.54.1 - resolution: "@openzeppelin/defender-admin-client@npm:1.54.1" + version: 1.54.6 + resolution: "@openzeppelin/defender-admin-client@npm:1.54.6" dependencies: - "@openzeppelin/defender-base-client": 1.54.1 + "@openzeppelin/defender-base-client": 1.54.6 axios: ^1.4.0 ethers: ^5.7.2 lodash: ^4.17.19 node-fetch: ^2.6.0 - checksum: c247b38c9fdedc55d01d59b7db7fbe212b1ff5177950a0626010b8df3e298e3cf52e0d46d06cadc95c418f570547864c3d652e42804f4c845b3790de581e3d19 + checksum: 212e4dd496b7c41dacbdbc2d27aca5bb34e39f5d9a52cb641c86fc9af0cd1bfb0cdb4cfa0b6ed8ba01de689ed1c3c6104f9b21e4c50db969b79880e39fc3d379 languageName: node linkType: hard -"@openzeppelin/defender-base-client@npm:1.54.1, @openzeppelin/defender-base-client@npm:^1.52.0": - version: 1.54.1 - resolution: "@openzeppelin/defender-base-client@npm:1.54.1" - 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 - checksum: bb44d305b3a7b20ce765bef4c8385c1187f9eca8f2647a99ad55111034da471709e946472ca5f641eb4bd26e1c7ebd19fb9832c29919c36d353a355c009ae98c - languageName: node - linkType: hard - -"@openzeppelin/defender-base-client@npm:^1.46.0": +"@openzeppelin/defender-base-client@npm:1.54.6, @openzeppelin/defender-base-client@npm:^1.46.0, @openzeppelin/defender-base-client@npm:^1.52.0": version: 1.54.6 resolution: "@openzeppelin/defender-base-client@npm:1.54.6" dependencies: @@ -1890,35 +1791,35 @@ __metadata: languageName: node linkType: hard -"@openzeppelin/defender-sdk-base-client@npm:^1.10.0, @openzeppelin/defender-sdk-base-client@npm:^1.12.0": - version: 1.12.0 - resolution: "@openzeppelin/defender-sdk-base-client@npm:1.12.0" +"@openzeppelin/defender-sdk-base-client@npm:^1.10.0, @openzeppelin/defender-sdk-base-client@npm:^1.13.3": + version: 1.13.3 + resolution: "@openzeppelin/defender-sdk-base-client@npm:1.13.3" dependencies: amazon-cognito-identity-js: ^6.3.6 async-retry: ^1.3.3 - checksum: bd0501fad9fa7830ad65a0b27c1fa2ce2b84b30fd218c3dda7347dfac76d7500ecba75defa100a2d77d775db8606dac56cecccf898593784f8868e69edd9d121 + checksum: 7498ed12801b4891fe27b5b97f5264ef9ae8cdad23d206cfce9129b4c92e8350bb184af65872a2919118fe3b9c256ba39c6e0d0621c01e3158ce855edee946f5 languageName: node linkType: hard "@openzeppelin/defender-sdk-deploy-client@npm:^1.10.0": - version: 1.12.0 - resolution: "@openzeppelin/defender-sdk-deploy-client@npm:1.12.0" + version: 1.13.3 + resolution: "@openzeppelin/defender-sdk-deploy-client@npm:1.13.3" dependencies: - "@openzeppelin/defender-sdk-base-client": ^1.12.0 + "@openzeppelin/defender-sdk-base-client": ^1.13.3 axios: ^1.6.7 lodash: ^4.17.21 - checksum: 2032c0967bb255a6ada456a84fdc1f90a8199fc57061f4a43df63830ab08ef08981674fb5e897afff20ad2c3f60051dda29d8939e79eba2a54c8302c5fc76869 + checksum: 3a9d28d18f3596865017b13297cb8f599a23d2aecb02d80121728bec0111fb997657a7a3126cb07c1b4f1275f136b1c17943a40ef2faccf4c40eef61d8241830 languageName: node linkType: hard "@openzeppelin/defender-sdk-network-client@npm:^1.10.0": - version: 1.12.0 - resolution: "@openzeppelin/defender-sdk-network-client@npm:1.12.0" + version: 1.13.3 + resolution: "@openzeppelin/defender-sdk-network-client@npm:1.13.3" dependencies: - "@openzeppelin/defender-sdk-base-client": ^1.12.0 + "@openzeppelin/defender-sdk-base-client": ^1.13.3 axios: ^1.6.7 lodash: ^4.17.21 - checksum: fdc151be291a28267315398f6f131ab71b4214bf0c706d4ac4b7904be6ce5647cfde994d39caad6d86c5a3361b0f0b354c88c7a905c20bf50562f75204b62ce0 + checksum: 9c44a828e7229aad3f3de9dc60c70aa3432f73d83e4e64eaf80d615b7bed7f1783b17df94206d16713dd0eecfba2123e902a14d23ebb88cea8338decd99f6524 languageName: node linkType: hard @@ -1947,8 +1848,8 @@ __metadata: linkType: hard "@openzeppelin/hardhat-upgrades@npm:^3.0.4": - version: 3.0.5 - resolution: "@openzeppelin/hardhat-upgrades@npm:3.0.5" + version: 3.1.0 + resolution: "@openzeppelin/hardhat-upgrades@npm:3.1.0" dependencies: "@openzeppelin/defender-admin-client": ^1.52.0 "@openzeppelin/defender-base-client": ^1.52.0 @@ -1960,7 +1861,7 @@ __metadata: debug: ^4.1.1 ethereumjs-util: ^7.1.5 proper-lockfile: ^4.1.1 - undici: ^6.0.0 + undici: ^6.11.1 peerDependencies: "@nomicfoundation/hardhat-ethers": ^3.0.0 "@nomicfoundation/hardhat-verify": ^2.0.0 @@ -1971,7 +1872,7 @@ __metadata: optional: true bin: migrate-oz-cli-project: dist/scripts/migrate-oz-cli-project.js - checksum: daea1b110273a4f96b47147590e740eb4c2164114e130403754a3e1552e14f16bb435fd6c8d1144fcef9fd3ee52a0a3441e233f89c3bef352600872a95c0e415 + checksum: f4e0723a5c1351b89dd626f37a94300a1ab7817dc0c8c39a224c8037a7108a683c1e04cf7c15771a5a3c83fdfaaa16e98cc81dd4bbfc67d729472ca2233b0edc languageName: node linkType: hard @@ -1988,7 +1889,7 @@ __metadata: languageName: node linkType: hard -"@openzeppelin/upgrades-core@npm:^1.27.0": +"@openzeppelin/upgrades-core@npm:^1.27.0, @openzeppelin/upgrades-core@npm:^1.32.0, @openzeppelin/upgrades-core@npm:latest": version: 1.33.1 resolution: "@openzeppelin/upgrades-core@npm:1.33.1" dependencies: @@ -2006,24 +1907,6 @@ __metadata: languageName: node linkType: hard -"@openzeppelin/upgrades-core@npm:^1.32.0, @openzeppelin/upgrades-core@npm:latest": - version: 1.32.6 - resolution: "@openzeppelin/upgrades-core@npm:1.32.6" - dependencies: - cbor: ^9.0.0 - chalk: ^4.1.0 - compare-versions: ^6.0.0 - debug: ^4.1.1 - ethereumjs-util: ^7.0.3 - minimist: ^1.2.7 - proper-lockfile: ^4.1.1 - solidity-ast: ^0.4.51 - bin: - openzeppelin-upgrades-core: dist/cli/cli.js - checksum: 9e7d71ae7960d9bfc81a8c08299acb3a002c0641e112072a7a13a95e928ad467b93c4092af9f37f2fa6d0d6894b98bd5c86f2e305351edf6b301adcc677aae1f - languageName: node - linkType: hard - "@pkgjs/parseargs@npm:^0.11.0": version: 0.11.0 resolution: "@pkgjs/parseargs@npm:0.11.0" @@ -2322,12 +2205,12 @@ __metadata: languageName: node linkType: hard -"@smithy/types@npm:^2.12.0": - version: 2.12.0 - resolution: "@smithy/types@npm:2.12.0" +"@smithy/types@npm:^3.0.0": + version: 3.0.0 + resolution: "@smithy/types@npm:3.0.0" dependencies: tslib: ^2.6.2 - checksum: 2dd93746624d87afbf51c22116fc69f82e95004b78cf681c4a283d908155c22a2b7a3afbd64a3aff7deefb6619276f186e212422ad200df3b42c32ef5330374e + checksum: 1c9c196c781aec0bed7c1519f91030ca4301f30f969394b099ccaa6ab0b47e55b211f54ae56a5a101e91d64899f147d49861e77c24fdc56117cf191a300e00ec languageName: node linkType: hard @@ -2534,9 +2417,9 @@ __metadata: linkType: hard "@types/chai@npm:*, @types/chai@npm:^4.3.1": - version: 4.3.14 - resolution: "@types/chai@npm:4.3.14" - checksum: 962c67d1295005886ced8f87c73614616f6d65ed1ec71818021c9206decbaab1234da878295ba52450883c78a8ee5e1359e5deeadee3b7d058538b0ae8c67b08 + version: 4.3.16 + resolution: "@types/chai@npm:4.3.16" + checksum: bb5f52d1b70534ed8b4bf74bd248add003ffe1156303802ea367331607c06b494da885ffbc2b674a66b4f90c9ee88759790a5f243879f6759f124f22328f5e95 languageName: node linkType: hard @@ -2687,11 +2570,11 @@ __metadata: linkType: hard "@types/node@npm:*, @types/node@npm:>=13.7.0": - version: 20.12.7 - resolution: "@types/node@npm:20.12.7" + version: 20.12.13 + resolution: "@types/node@npm:20.12.13" dependencies: undici-types: ~5.26.4 - checksum: 7cc979f7e2ca9a339ec71318c3901b9978555257929ef3666987f3e447123bc6dc92afcc89f6347e09e07d602fde7d51bcddea626c23aa2bb74aeaacfd1e1686 + checksum: 9ec8971a76b2435379c10689c639ba1bbf4451075709bdf4bf23b7972a63f7d966947914410f2d3711a315e1157d782b76cfadc32944e29db9dd444221aea699 languageName: node linkType: hard @@ -2724,11 +2607,11 @@ __metadata: linkType: hard "@types/node@npm:^18.6.1": - version: 18.19.31 - resolution: "@types/node@npm:18.19.31" + version: 18.19.33 + resolution: "@types/node@npm:18.19.33" dependencies: undici-types: ~5.26.4 - checksum: 949bddfd7071bd47300d1f33d380ee34695ccd5f046f1a03e4d2be0d953ace896905144d44a6f483f241b5ef34b86f0e40a0e312201117782eecf89e81a4ff13 + checksum: b6db87d095bc541d64a410fa323a35c22c6113220b71b608bbe810b2397932d0f0a51c3c0f3ef90c20d8180a1502d950a7c5314b907e182d9cc10b36efd2a44e languageName: node linkType: hard @@ -3363,14 +3246,14 @@ __metadata: linkType: hard "ajv@npm:^8.0.1": - version: 8.12.0 - resolution: "ajv@npm:8.12.0" + version: 8.14.0 + resolution: "ajv@npm:8.14.0" dependencies: - fast-deep-equal: ^3.1.1 + fast-deep-equal: ^3.1.3 json-schema-traverse: ^1.0.0 require-from-string: ^2.0.2 - uri-js: ^4.2.2 - checksum: 4dc13714e316e67537c8b31bc063f99a1d9d9a497eb4bbd55191ac0dcd5e4985bbb71570352ad6f1e76684fb6d790928f96ba3b2d4fd6e10024be9612fe3f001 + uri-js: ^4.4.1 + checksum: 83a933ee20ca25026236cd44634ab8b88d386be26f666e4bc8e34085bbe6775bdb52cb8e25afdaca20d90cb59828a4a168993e21dd2adad3612308f568b2320e languageName: node linkType: hard @@ -3955,9 +3838,9 @@ __metadata: linkType: hard "aws4@npm:^1.8.0": - version: 1.12.0 - resolution: "aws4@npm:1.12.0" - checksum: 68f79708ac7c335992730bf638286a3ee0a645cf12575d557860100767c500c08b30e24726b9f03265d74116417f628af78509e1333575e9f8d52a80edfe8cbc + version: 1.13.0 + resolution: "aws4@npm:1.13.0" + checksum: 71594a17a5f7b1a9151ef515500c18f1029caa51e2cb65c1b5b324d9bd8dac89896a9e296825d4e6befdcd612d7fc3b0d8042c667555a56df3ee1ab15d4d9b35 languageName: node linkType: hard @@ -3970,18 +3853,7 @@ __metadata: languageName: node linkType: hard -"axios@npm:^1.4.0, axios@npm:^1.6.7": - version: 1.6.8 - resolution: "axios@npm:1.6.8" - dependencies: - follow-redirects: ^1.15.6 - form-data: ^4.0.0 - proxy-from-env: ^1.1.0 - checksum: bf007fa4b207d102459300698620b3b0873503c6d47bf5a8f6e43c0c64c90035a4f698b55027ca1958f61ab43723df2781c38a99711848d232cad7accbcdfcdd - languageName: node - linkType: hard - -"axios@npm:^1.5.1": +"axios@npm:^1.4.0, axios@npm:^1.5.1, axios@npm:^1.6.7": version: 1.7.2 resolution: "axios@npm:1.7.2" dependencies: @@ -4868,16 +4740,7 @@ __metadata: languageName: node linkType: hard -"braces@npm:^3.0.2, braces@npm:~3.0.2": - version: 3.0.2 - resolution: "braces@npm:3.0.2" - dependencies: - fill-range: ^7.0.1 - checksum: e2a8e769a863f3d4ee887b5fe21f63193a891c68b612ddb4b68d82d1b5f3ff9073af066c343e9867a393fe4c2555dcb33e89b937195feb9c1613d259edfcd459 - languageName: node - linkType: hard - -"braces@npm:^3.0.3": +"braces@npm:^3.0.3, braces@npm:~3.0.2": version: 3.0.3 resolution: "braces@npm:3.0.3" dependencies: @@ -5152,8 +5015,8 @@ __metadata: linkType: hard "cacache@npm:^18.0.0": - version: 18.0.2 - resolution: "cacache@npm:18.0.2" + version: 18.0.3 + resolution: "cacache@npm:18.0.3" dependencies: "@npmcli/fs": ^3.1.0 fs-minipass: ^3.0.0 @@ -5167,7 +5030,7 @@ __metadata: ssri: ^10.0.0 tar: ^6.1.11 unique-filename: ^3.0.0 - checksum: 0250df80e1ad0c828c956744850c5f742c24244e9deb5b7dc81bca90f8c10e011e132ecc58b64497cc1cad9a98968676147fb6575f4f94722f7619757b17a11b + checksum: b717fd9b36e9c3279bfde4545c3a8f6d5a539b084ee26a9504d48f83694beb724057d26e090b97540f9cc62bea18b9f6cf671c50e18fb7dac60eda9db691714f languageName: node linkType: hard @@ -5277,9 +5140,9 @@ __metadata: linkType: hard "caniuse-lite@npm:^1.0.30000844": - version: 1.0.30001621 - resolution: "caniuse-lite@npm:1.0.30001621" - checksum: 0afb65bbf558faea769c16e831fbbd5600c684c0f6bb4ffbc0d38528671fb5cb5d88714804241a88c61872ce289f7c6333aef6cfdfb09277bda0dbdf0aab3459 + version: 1.0.30001625 + resolution: "caniuse-lite@npm:1.0.30001625" + checksum: e7f8b9e10c35a5d9a1d1db76be398cb1c592ee1bc905fabe6bd90313537099d29a65c49c85e6350132fa30ca20e8c0317ecfaa66d997f7fac21ff37ddaece2a9 languageName: node linkType: hard @@ -5325,13 +5188,13 @@ __metadata: linkType: hard "chai-as-promised@npm:^7.1.1": - version: 7.1.1 - resolution: "chai-as-promised@npm:7.1.1" + version: 7.1.2 + resolution: "chai-as-promised@npm:7.1.2" dependencies: check-error: ^1.0.2 peerDependencies: - chai: ">= 2.1.2 < 5" - checksum: 7262868a5b51a12af4e432838ddf97a893109266a505808e1868ba63a12de7ee1166e9d43b5c501a190c377c1b11ecb9ff8e093c89f097ad96c397e8ec0f8d6a + chai: ">= 2.1.2 < 6" + checksum: 671ee980054eb23a523875c1d22929a2ac05d89b5428e1fd12800f54fc69baf41014667b87e2368e2355ee2a3140d3e3d7d5a1f8638b07cfefd7fe38a149e3f6 languageName: node linkType: hard @@ -5572,15 +5435,15 @@ __metadata: linkType: hard "cli-table3@npm:^0.6.3": - version: 0.6.4 - resolution: "cli-table3@npm:0.6.4" + version: 0.6.5 + resolution: "cli-table3@npm:0.6.5" dependencies: "@colors/colors": 1.5.0 string-width: ^4.2.0 dependenciesMeta: "@colors/colors": optional: true - checksum: 0942d9977c05b31e9c7e0172276246b3ac2124c2929451851c01dbf5fc9b3d40cc4e1c9d468ff26dd3cfd18617963fe227b4cfeeae2881b70f302d69d792b5bb + checksum: ab7afbf4f8597f1c631f3ee6bb3481d0bfeac8a3b81cffb5a578f145df5c88003b6cfff46046a7acae86596fdd03db382bfa67f20973b6b57425505abc47e42c languageName: node linkType: hard @@ -5887,9 +5750,9 @@ __metadata: linkType: hard "core-js-pure@npm:^3.0.1": - version: 3.37.0 - resolution: "core-js-pure@npm:3.37.0" - checksum: 206797d88046f4f5a62ecb9a7158bc6ba38127db2239bcbd1e85b2c8cf3cfb9bb3bbc6a312ecf0f87702f87659959d10625aeac74de6336a9303866f7010d364 + version: 3.37.1 + resolution: "core-js-pure@npm:3.37.1" + checksum: a13a40e3951975cffef12a0933d3dbf1ecedbf9821e1ec8024884b587744951ad30e3762a86bcb8e2a18fdd4b8d7c8971b2391605329799fc04e1fc1e1397dc1 languageName: node linkType: hard @@ -6304,7 +6167,7 @@ __metadata: languageName: node linkType: hard -"define-properties@npm:^1.1.3, define-properties@npm:^1.2.0, define-properties@npm:^1.2.1": +"define-properties@npm:^1.2.0, define-properties@npm:^1.2.1": version: 1.2.1 resolution: "define-properties@npm:1.2.1" dependencies: @@ -6581,9 +6444,9 @@ __metadata: linkType: hard "electron-to-chromium@npm:^1.3.47": - version: 1.4.783 - resolution: "electron-to-chromium@npm:1.4.783" - checksum: 49dfd8614c8e28076ca82e241a4a246685440dacde5e2cdb85d57a0d5bcc1cbd5de3201b3158b94ad5f1016e91ab9bb0d4da8cfe46d2897400fb62e6a5be198e + version: 1.4.787 + resolution: "electron-to-chromium@npm:1.4.787" + checksum: 0cfac6acabd8d779a4f1a3a47b91bfddf0275f2448a800830953caa46d3ccdbf548054f86c97196de147dd7abdbc2491e2628364f353d1852d9045502aa87f0f languageName: node linkType: hard @@ -7135,17 +6998,17 @@ __metadata: linkType: hard "eslint-plugin-promise@npm:^6.0.0": - version: 6.1.1 - resolution: "eslint-plugin-promise@npm:6.1.1" + version: 6.2.0 + resolution: "eslint-plugin-promise@npm:6.2.0" peerDependencies: - eslint: ^7.0.0 || ^8.0.0 - checksum: 46b9a4f79dae5539987922afc27cc17cbccdecf4f0ba19c0ccbf911b0e31853e9f39d9959eefb9637461b52772afa1a482f1f87ff16c1ba38bdb6fcf21897e9a + eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 + checksum: 4ce2ee365044aaeac7feb7c4b62f7d432594960bf96be703f871fa5fdd61f358d6620222e7c907f7ee43ff54b0b2ff392c1f70680bce335f6396c8c7af79c141 languageName: node linkType: hard "eslint-plugin-unused-imports@npm:^3.0.0": - version: 3.1.0 - resolution: "eslint-plugin-unused-imports@npm:3.1.0" + version: 3.2.0 + resolution: "eslint-plugin-unused-imports@npm:3.2.0" dependencies: eslint-rule-composer: ^0.3.0 peerDependencies: @@ -7154,7 +7017,7 @@ __metadata: peerDependenciesMeta: "@typescript-eslint/eslint-plugin": optional: true - checksum: c41da339ea8faf40b8b4081f0d52a4c75d24f121c5b95b19b777d12abfbc23505e4aab2422918b2517dd239a749a38912fb3405b42a9aa6b50c32cf5f3d6ecf0 + checksum: e85ae4f3af489294ef5e0969ab904fa87f9fa7c959ca0804f30845438db4aeb0428ddad7ab06a70608e93121626799977241b442fdf126a4d0667be57390c3d6 languageName: node linkType: hard @@ -8010,8 +7873,8 @@ __metadata: linkType: hard "ethers@npm:^6.6.0": - version: 6.12.0 - resolution: "ethers@npm:6.12.0" + version: 6.12.1 + resolution: "ethers@npm:6.12.1" dependencies: "@adraffy/ens-normalize": 1.10.1 "@noble/curves": 1.2.0 @@ -8020,7 +7883,7 @@ __metadata: aes-js: 4.0.0-beta.5 tslib: 2.4.0 ws: 8.5.0 - checksum: a9fa6937f57be00f217cac045752113f0be6ecbef77b90d653202f4127930023e86d20f06631cc4114bdbcf28fcb7dcb5244a88e2e430df1dfcb623e93c23366 + checksum: ddf398c91f584b9e643740ec17a9c82b4a1c4ea3fb6efd00f1a043b89d1ec6f9427aa80894f75850ee805722e91b8d054bce18579a2c621226302c096774df90 languageName: node linkType: hard @@ -8384,15 +8247,6 @@ __metadata: languageName: node linkType: hard -"fill-range@npm:^7.0.1": - version: 7.0.1 - resolution: "fill-range@npm:7.0.1" - dependencies: - to-regex-range: ^5.0.1 - checksum: cc283f4e65b504259e64fd969bcf4def4eb08d85565e906b7d36516e87819db52029a76b6363d0f02d0d532f0033c9603b9e2d943d56ee3b0d4f7ad3328ff917 - languageName: node - linkType: hard - "fill-range@npm:^7.1.1": version: 7.1.1 resolution: "fill-range@npm:7.1.1" @@ -9080,17 +8934,17 @@ __metadata: linkType: hard "glob@npm:^10.2.2, glob@npm:^10.3.10": - version: 10.3.12 - resolution: "glob@npm:10.3.12" + version: 10.4.1 + resolution: "glob@npm:10.4.1" dependencies: foreground-child: ^3.1.0 - jackspeak: ^2.3.6 - minimatch: ^9.0.1 - minipass: ^7.0.4 - path-scurry: ^1.10.2 + jackspeak: ^3.1.2 + minimatch: ^9.0.4 + minipass: ^7.1.2 + path-scurry: ^1.11.1 bin: glob: dist/esm/bin.mjs - checksum: 2b0949d6363021aaa561b108ac317bf5a97271b8a5d7a5fac1a176e40e8068ecdcccc992f8a7e958593d501103ac06d673de92adc1efcbdab45edefe35f8d7c6 + checksum: 5d33c686c80bf6877f4284adf99a8c3cbb2a6eccbc92342943fe5d4b42c01d78c1881f2223d950c92a938d0f857e12e37b86a8e5483ab2141822e053b67d0dde languageName: node linkType: hard @@ -9177,11 +9031,12 @@ __metadata: linkType: hard "globalthis@npm:^1.0.3": - version: 1.0.3 - resolution: "globalthis@npm:1.0.3" + version: 1.0.4 + resolution: "globalthis@npm:1.0.4" dependencies: - define-properties: ^1.1.3 - checksum: fbd7d760dc464c886d0196166d92e5ffb4c84d0730846d6621a39fbbc068aeeb9c8d1421ad330e94b7bca4bb4ea092f5f21f3d36077812af5d098b4dc006c998 + define-properties: ^1.2.1 + gopd: ^1.0.1 + checksum: 39ad667ad9f01476474633a1834a70842041f70a55571e8dcef5fb957980a92da5022db5430fca8aecc5d47704ae30618c0bc877a579c70710c904e9ef06108a languageName: node linkType: hard @@ -9372,8 +9227,8 @@ __metadata: linkType: hard "hardhat-gas-reporter@npm:latest": - version: 2.1.1 - resolution: "hardhat-gas-reporter@npm:2.1.1" + version: 2.2.0 + resolution: "hardhat-gas-reporter@npm:2.2.0" dependencies: "@ethersproject/abi": ^5.7.0 "@ethersproject/bytes": ^5.7.0 @@ -9392,11 +9247,11 @@ __metadata: viem: 2.7.14 peerDependencies: hardhat: ^2.16.0 - checksum: ca06f18ed7cfaa794f23e92ec6835b0e364cea1361056708488e8610a3b50d74a2b47d9b3771df36fc00bb24380ab03f7bcf183a153b047a2896c2184245b5c6 + checksum: b0f07ac3dcbfb88cd1a77385755fe23d8af467fc4110021bc1f890f8672a9a005f547592976ef92de3948377ab5405265ced6a40966e991ed859fa22abbde8ea languageName: node linkType: hard -"hardhat@npm:^2.19.4": +"hardhat@npm:^2.19.4, hardhat@npm:^2.22.1": version: 2.22.4 resolution: "hardhat@npm:2.22.4" dependencies: @@ -9457,67 +9312,6 @@ __metadata: languageName: node linkType: hard -"hardhat@npm:^2.22.1": - version: 2.22.3 - resolution: "hardhat@npm:2.22.3" - dependencies: - "@ethersproject/abi": ^5.1.2 - "@metamask/eth-sig-util": ^4.0.0 - "@nomicfoundation/edr": ^0.3.5 - "@nomicfoundation/ethereumjs-common": 4.0.4 - "@nomicfoundation/ethereumjs-tx": 5.0.4 - "@nomicfoundation/ethereumjs-util": 9.0.4 - "@nomicfoundation/solidity-analyzer": ^0.1.0 - "@sentry/node": ^5.18.1 - "@types/bn.js": ^5.1.0 - "@types/lru-cache": ^5.1.0 - adm-zip: ^0.4.16 - aggregate-error: ^3.0.0 - ansi-escapes: ^4.3.0 - boxen: ^5.1.2 - chalk: ^2.4.2 - chokidar: ^3.4.0 - ci-info: ^2.0.0 - debug: ^4.1.1 - enquirer: ^2.3.0 - env-paths: ^2.2.0 - ethereum-cryptography: ^1.0.3 - ethereumjs-abi: ^0.6.8 - find-up: ^2.1.0 - fp-ts: 1.19.3 - fs-extra: ^7.0.1 - glob: 7.2.0 - immutable: ^4.0.0-rc.12 - io-ts: 1.10.4 - keccak: ^3.0.2 - lodash: ^4.17.11 - mnemonist: ^0.38.0 - mocha: ^10.0.0 - p-map: ^4.0.0 - raw-body: ^2.4.1 - resolve: 1.17.0 - semver: ^6.3.0 - solc: 0.7.3 - source-map-support: ^0.5.13 - stacktrace-parser: ^0.1.10 - tsort: 0.0.1 - undici: ^5.14.0 - uuid: ^8.3.2 - ws: ^7.4.6 - peerDependencies: - ts-node: "*" - typescript: "*" - peerDependenciesMeta: - ts-node: - optional: true - typescript: - optional: true - bin: - hardhat: internal/cli/bootstrap.js - checksum: 7f0b8b2b803aca1f07b1e421605f9ff0243e93fe75f04b57d45292e7fedf7a50deb2ef435c47d0dde5b14988ea0493f58852d8973096f76719b35040927dcd55 - languageName: node - linkType: hard - "has-ansi@npm:^2.0.0": version: 2.0.0 resolution: "has-ansi@npm:2.0.0" @@ -9900,9 +9694,9 @@ __metadata: linkType: hard "immutable@npm:^4.0.0-rc.12": - version: 4.3.5 - resolution: "immutable@npm:4.3.5" - checksum: 0e25dd5c314421faede9e1122ab26cdb638cc3edc8678c4a75dee104279b12621a30c80a480fae7f68bc7e81672f1e672e454dc0fdc7e6cf0af10809348387b8 + version: 4.3.6 + resolution: "immutable@npm:4.3.6" + checksum: 3afd020be988ec9ba42c1e585b88858970beba91332ac04ac11446722c7e5da03d5956f5049806573d29dfee25f69262297cb7f3bd6b16fc83a175a0176c6c2a languageName: node linkType: hard @@ -10761,16 +10555,16 @@ __metadata: languageName: node linkType: hard -"jackspeak@npm:^2.3.6": - version: 2.3.6 - resolution: "jackspeak@npm:2.3.6" +"jackspeak@npm:^3.1.2": + version: 3.1.2 + resolution: "jackspeak@npm:3.1.2" dependencies: "@isaacs/cliui": ^8.0.2 "@pkgjs/parseargs": ^0.11.0 dependenciesMeta: "@pkgjs/parseargs": optional: true - checksum: 57d43ad11eadc98cdfe7496612f6bbb5255ea69fe51ea431162db302c2a11011642f50cfad57288bd0aea78384a0612b16e131944ad8ecd09d619041c8531b54 + checksum: 134276d5f785c518930701a0dcba1f3b0e9ce3e5b1c3e300898e2ae0bbd9b5195088b77252bf2110768de072c426e9e39f47e13912b0b002da4a3f4ff6e16eac languageName: node linkType: hard @@ -11785,9 +11579,9 @@ __metadata: linkType: hard "lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0": - version: 10.2.0 - resolution: "lru-cache@npm:10.2.0" - checksum: eee7ddda4a7475deac51ac81d7dd78709095c6fa46e8350dc2d22462559a1faa3b81ed931d5464b13d48cbd7e08b46100b6f768c76833912bc444b99c37e25db + version: 10.2.2 + resolution: "lru-cache@npm:10.2.2" + checksum: 98e8fc93691c546f719a76103ef2bee5a3ac823955c755a47641ec41f8c7fafa1baeaba466937cc1cbfa9cfd47e03536d10e2db3158a64ad91ff3a58a32c893e languageName: node linkType: hard @@ -11800,15 +11594,6 @@ __metadata: languageName: node linkType: hard -"lru-cache@npm:^6.0.0": - version: 6.0.0 - resolution: "lru-cache@npm:6.0.0" - dependencies: - yallist: ^4.0.0 - checksum: f97f499f898f23e4585742138a22f22526254fdba6d75d41a1c2526b3b6cc5747ef59c5612ba7375f42aca4f8461950e925ba08c991ead0651b4918b7c978297 - languageName: node - linkType: hard - "lru_map@npm:^0.3.3": version: 0.3.3 resolution: "lru_map@npm:0.3.3" @@ -11838,8 +11623,8 @@ __metadata: linkType: hard "make-fetch-happen@npm:^13.0.0": - version: 13.0.0 - resolution: "make-fetch-happen@npm:13.0.0" + version: 13.0.1 + resolution: "make-fetch-happen@npm:13.0.1" dependencies: "@npmcli/agent": ^2.0.0 cacache: ^18.0.0 @@ -11850,9 +11635,10 @@ __metadata: minipass-flush: ^1.0.5 minipass-pipeline: ^1.2.4 negotiator: ^0.6.3 + proc-log: ^4.2.0 promise-retry: ^2.0.1 ssri: ^10.0.0 - checksum: 7c7a6d381ce919dd83af398b66459a10e2fe8f4504f340d1d090d3fa3d1b0c93750220e1d898114c64467223504bd258612ba83efbc16f31b075cd56de24b4af + checksum: 5c9fad695579b79488fa100da05777213dd9365222f85e4757630f8dd2a21a79ddd3206c78cfd6f9b37346819681782b67900ac847a57cf04190f52dda5343fd languageName: node linkType: hard @@ -12092,7 +11878,7 @@ __metadata: languageName: node linkType: hard -"micromatch@npm:^4.0.2": +"micromatch@npm:^4.0.2, micromatch@npm:^4.0.4": version: 4.0.7 resolution: "micromatch@npm:4.0.7" dependencies: @@ -12102,16 +11888,6 @@ __metadata: languageName: node linkType: hard -"micromatch@npm:^4.0.4": - version: 4.0.5 - resolution: "micromatch@npm:4.0.5" - dependencies: - braces: ^3.0.2 - picomatch: ^2.3.1 - checksum: 02a17b671c06e8fefeeb6ef996119c1e597c942e632a21ef589154f23898c9c6a9858526246abb14f8bca6e77734aa9dcf65476fca47cedfb80d9577d52843fc - languageName: node - linkType: hard - "miller-rabin@npm:^4.0.0": version: 4.0.1 resolution: "miller-rabin@npm:4.0.1" @@ -12220,7 +11996,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^9.0.1": +"minimatch@npm:^9.0.4": version: 9.0.4 resolution: "minimatch@npm:9.0.4" dependencies: @@ -12246,8 +12022,8 @@ __metadata: linkType: hard "minipass-fetch@npm:^3.0.0": - version: 3.0.4 - resolution: "minipass-fetch@npm:3.0.4" + version: 3.0.5 + resolution: "minipass-fetch@npm:3.0.5" dependencies: encoding: ^0.1.13 minipass: ^7.0.3 @@ -12256,7 +12032,7 @@ __metadata: dependenciesMeta: encoding: optional: true - checksum: af7aad15d5c128ab1ebe52e043bdf7d62c3c6f0cecb9285b40d7b395e1375b45dcdfd40e63e93d26a0e8249c9efd5c325c65575aceee192883970ff8cb11364a + checksum: 8047d273236157aab27ab7cd8eab7ea79e6ecd63e8f80c3366ec076cb9a0fed550a6935bab51764369027c414647fd8256c2a20c5445fb250c483de43350de83 languageName: node linkType: hard @@ -12313,10 +12089,10 @@ __metadata: languageName: node linkType: hard -"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.0.4": - version: 7.0.4 - resolution: "minipass@npm:7.0.4" - checksum: 87585e258b9488caf2e7acea242fd7856bbe9a2c84a7807643513a338d66f368c7d518200ad7b70a508664d408aa000517647b2930c259a8b1f9f0984f344a21 +"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.1.2": + version: 7.1.2 + resolution: "minipass@npm:7.1.2" + checksum: 2bfd325b95c555f2b4d2814d49325691c7bee937d753814861b0b49d5edcda55cbbf22b6b6a60bb91eddac8668771f03c5ff647dcd9d0f798e9548b9cdc46ee3 languageName: node linkType: hard @@ -12732,13 +12508,13 @@ __metadata: linkType: hard "node-gyp-build@npm:^4.2.0, node-gyp-build@npm:^4.3.0": - version: 4.8.0 - resolution: "node-gyp-build@npm:4.8.0" + version: 4.8.1 + resolution: "node-gyp-build@npm:4.8.1" bin: node-gyp-build: bin.js node-gyp-build-optional: optional.js node-gyp-build-test: build-test.js - checksum: b82a56f866034b559dd3ed1ad04f55b04ae381b22ec2affe74b488d1582473ca6e7f85fccf52da085812d3de2b0bf23109e752a57709ac7b9963951c710fea40 + checksum: fe6e95da6f4608c1a98655f6bf2fe4e8dd9c877cd13256056a8acaf585cc7f98718823fe9366be11b78c2f332d5a184b00cf07a4af96c9d8fea45f640c019f98 languageName: node linkType: hard @@ -12781,13 +12557,13 @@ __metadata: linkType: hard "nopt@npm:^7.0.0": - version: 7.2.0 - resolution: "nopt@npm:7.2.0" + version: 7.2.1 + resolution: "nopt@npm:7.2.1" dependencies: abbrev: ^2.0.0 bin: nopt: bin/nopt.js - checksum: a9c0f57fb8cb9cc82ae47192ca2b7ef00e199b9480eed202482c962d61b59a7fbe7541920b2a5839a97b42ee39e288c0aed770e38057a608d7f579389dfde410 + checksum: 6fa729cc77ce4162cfad8abbc9ba31d4a0ff6850c3af61d59b505653bef4781ec059f8890ecfe93ee8aa0c511093369cca88bfc998101616a2904e715bbbb7c9 languageName: node linkType: hard @@ -13078,16 +12854,16 @@ __metadata: linkType: hard "optionator@npm:^0.9.3": - version: 0.9.3 - resolution: "optionator@npm:0.9.3" + version: 0.9.4 + resolution: "optionator@npm:0.9.4" dependencies: - "@aashutoshrathi/word-wrap": ^1.2.3 deep-is: ^0.1.3 fast-levenshtein: ^2.0.6 levn: ^0.4.1 prelude-ls: ^1.2.1 type-check: ^0.4.0 - checksum: 09281999441f2fe9c33a5eeab76700795365a061563d66b098923eb719251a42bdbe432790d35064d0816ead9296dbeb1ad51a733edf4167c96bd5d0882e428a + word-wrap: ^1.2.5 + checksum: ecbd010e3dc73e05d239976422d9ef54a82a13f37c11ca5911dff41c98a6c7f0f163b27f922c37e7f8340af9d36febd3b6e9cef508f3339d4c393d7276d716bb languageName: node linkType: hard @@ -13467,13 +13243,13 @@ __metadata: languageName: node linkType: hard -"path-scurry@npm:^1.10.2": - version: 1.10.2 - resolution: "path-scurry@npm:1.10.2" +"path-scurry@npm:^1.11.1": + version: 1.11.1 + resolution: "path-scurry@npm:1.11.1" dependencies: lru-cache: ^10.2.0 minipass: ^5.0.0 || ^6.0.2 || ^7.0.0 - checksum: 6739b4290f7d1a949c61c758b481c07ac7d1a841964c68cf5e1fa153d7e18cbde4872b37aadf9c5173c800d627f219c47945859159de36c977dd82419997b9b8 + checksum: 890d5abcd593a7912dcce7cf7c6bf7a0b5648e3dee6caf0712c126ca0a65c7f3d7b9d769072a4d1baf370f61ce493ab5b038d59988688e0c5f3f646ee3c69023 languageName: node linkType: hard @@ -13530,9 +13306,9 @@ __metadata: linkType: hard "picocolors@npm:^1.0.0": - version: 1.0.0 - resolution: "picocolors@npm:1.0.0" - checksum: a2e8092dd86c8396bdba9f2b5481032848525b3dc295ce9b57896f931e63fc16f79805144321f72976383fc249584672a75cc18d6777c6b757603f372f745981 + version: 1.0.1 + resolution: "picocolors@npm:1.0.1" + checksum: fa68166d1f56009fc02a34cdfd112b0dd3cf1ef57667ac57281f714065558c01828cdf4f18600ad6851cbe0093952ed0660b1e0156bddf2184b6aaf5817553a5 languageName: node linkType: hard @@ -13690,6 +13466,13 @@ __metadata: languageName: node linkType: hard +"proc-log@npm:^4.2.0": + version: 4.2.0 + resolution: "proc-log@npm:4.2.0" + checksum: 98f6cd012d54b5334144c5255ecb941ee171744f45fca8b43b58ae5a0c1af07352475f481cadd9848e7f0250376ee584f6aa0951a856ff8f021bdfbff4eb33fc + languageName: node + linkType: hard + "process-nextick-args@npm:~2.0.0": version: 2.0.1 resolution: "process-nextick-args@npm:2.0.1" @@ -14751,13 +14534,11 @@ __metadata: linkType: hard "semver@npm:^7.0.0, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.2, semver@npm:^7.5.4": - version: 7.6.0 - resolution: "semver@npm:7.6.0" - dependencies: - lru-cache: ^6.0.0 + version: 7.6.2 + resolution: "semver@npm:7.6.2" bin: semver: bin/semver.js - checksum: 7427f05b70786c696640edc29fdd4bc33b2acf3bbe1740b955029044f80575fc664e1a512e4113c3af21e767154a94b4aa214bf6cd6e42a1f6dba5914e0b208c + checksum: 40f6a95101e8d854357a644da1b8dd9d93ce786d5c6a77227bc69dbb17bea83d0d1d1d7c4cd5920a6df909f48e8bd8a5909869535007f90278289f2451d0292d languageName: node linkType: hard @@ -15414,11 +15195,11 @@ __metadata: linkType: hard "ssri@npm:^10.0.0": - version: 10.0.5 - resolution: "ssri@npm:10.0.5" + version: 10.0.6 + resolution: "ssri@npm:10.0.6" dependencies: minipass: ^7.0.3 - checksum: 0a31b65f21872dea1ed3f7c200d7bc1c1b91c15e419deca14f282508ba917cbb342c08a6814c7f68ca4ca4116dd1a85da2bbf39227480e50125a1ceffeecb750 + checksum: 4603d53a05bcd44188747d38f1cc43833b9951b5a1ee43ba50535bdfc5fe4a0897472dbe69837570a5417c3c073377ef4f8c1a272683b401857f72738ee57299 languageName: node linkType: hard @@ -16351,9 +16132,9 @@ __metadata: linkType: hard "type@npm:^2.7.2": - version: 2.7.2 - resolution: "type@npm:2.7.2" - checksum: 0f42379a8adb67fe529add238a3e3d16699d95b42d01adfe7b9a7c5da297f5c1ba93de39265ba30ffeb37dfd0afb3fb66ae09f58d6515da442219c086219f6f4 + version: 2.7.3 + resolution: "type@npm:2.7.3" + checksum: 69cfda3248847998f93b9d292fd251c10facf8d29513e2047d4684509d67bae82d910d7a00c1e9d9bbf2af242d36425b6616807d6c652c5c370c2be1f0008a47 languageName: node linkType: hard @@ -16608,10 +16389,10 @@ __metadata: languageName: node linkType: hard -"undici@npm:^6.0.0": - version: 6.13.0 - resolution: "undici@npm:6.13.0" - checksum: 47495e93aceeab18664678b6fb0ea2395b7c13a33d2ed4f7f36eb9be9ec5cd6f8e3a4ddaec18127da5e2012e5d7666ca824c7dc70af606dcfe6fdb8441ee3a7a +"undici@npm:^6.11.1": + version: 6.18.2 + resolution: "undici@npm:6.18.2" + checksum: c20e47bd4f959c00d24516756b178190f0a9ae000007e875f1f68c8e7f3f9a68b0a7faa03f3d030ddd71a9e3feb558fbce661b5229a0aa8380cfbe1cea4281e4 languageName: node linkType: hard @@ -16690,7 +16471,7 @@ __metadata: languageName: node linkType: hard -"uri-js@npm:^4.2.2": +"uri-js@npm:^4.2.2, uri-js@npm:^4.4.1": version: 4.4.1 resolution: "uri-js@npm:4.4.1" dependencies: @@ -17376,7 +17157,7 @@ __metadata: languageName: node linkType: hard -"word-wrap@npm:~1.2.3": +"word-wrap@npm:^1.2.5, word-wrap@npm:~1.2.3": version: 1.2.5 resolution: "word-wrap@npm:1.2.5" checksum: f93ba3586fc181f94afdaff3a6fef27920b4b6d9eaefed0f428f8e07adea2a7f54a5f2830ce59406c8416f033f86902b91eb824072354645eea687dff3691ccb From 28afc6db49ebb683fadad493000d18abddd00eec Mon Sep 17 00:00:00 2001 From: aalavandhann <6264334+aalavandhan@users.noreply.github.com> Date: Thu, 30 May 2024 16:23:25 -0400 Subject: [PATCH 10/10] bumped up ci version --- .github/workflows/nightly.yml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index f0ad685c..35c75393 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [16.x] + node-version: [20.x] os: [ubuntu-latest] steps: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a52de619..9550e51f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - node-version: [16.x] + node-version: [20.x] os: [ubuntu-latest] steps: