From c004a28aad59af84883972457529d0f12065e3cd Mon Sep 17 00:00:00 2001 From: Dmitry Date: Wed, 8 May 2024 15:48:06 +0200 Subject: [PATCH 1/5] Locking pragma version to 0.8.21 It is considered best practice to deploy contracts with the same compiler version. --- solidity/contracts/BitcoinDepositor.sol | 2 +- solidity/contracts/BitcoinRedeemer.sol | 2 +- solidity/contracts/MezoAllocator.sol | 2 +- solidity/contracts/PausableOwnable.sol | 2 +- solidity/contracts/bridge/ITBTCToken.sol | 2 +- solidity/contracts/interfaces/IDispatcher.sol | 2 +- solidity/contracts/lib/ERC4626Fees.sol | 2 +- solidity/contracts/stBTC.sol | 2 +- solidity/contracts/test/BitcoinDepositorHarness.sol | 2 +- solidity/contracts/test/MezoPortalStub.sol | 2 +- solidity/contracts/test/TestERC20.sol | 2 +- solidity/contracts/test/TestTBTC.sol | 2 +- solidity/contracts/test/upgrades/BitcoinDepositorV2.sol | 2 +- solidity/contracts/test/upgrades/MezoAllocatorV2.sol | 2 +- solidity/contracts/test/upgrades/stBTCV2.sol | 2 +- solidity/contracts/utils/Errors.sol | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/solidity/contracts/BitcoinDepositor.sol b/solidity/contracts/BitcoinDepositor.sol index bbcaa7784..5d85de173 100644 --- a/solidity/contracts/BitcoinDepositor.sol +++ b/solidity/contracts/BitcoinDepositor.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-only -pragma solidity ^0.8.21; +pragma solidity 0.8.21; import "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol"; import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; diff --git a/solidity/contracts/BitcoinRedeemer.sol b/solidity/contracts/BitcoinRedeemer.sol index f0c38b07f..f18f3ccd0 100644 --- a/solidity/contracts/BitcoinRedeemer.sol +++ b/solidity/contracts/BitcoinRedeemer.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-only -pragma solidity ^0.8.21; +pragma solidity 0.8.21; import "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol"; diff --git a/solidity/contracts/MezoAllocator.sol b/solidity/contracts/MezoAllocator.sol index 40a348bde..2dabcb125 100644 --- a/solidity/contracts/MezoAllocator.sol +++ b/solidity/contracts/MezoAllocator.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-only -pragma solidity ^0.8.21; +pragma solidity 0.8.21; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; diff --git a/solidity/contracts/PausableOwnable.sol b/solidity/contracts/PausableOwnable.sol index 00f8a36ec..7ef8d6201 100644 --- a/solidity/contracts/PausableOwnable.sol +++ b/solidity/contracts/PausableOwnable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-only -pragma solidity ^0.8.21; +pragma solidity 0.8.21; import "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol"; diff --git a/solidity/contracts/bridge/ITBTCToken.sol b/solidity/contracts/bridge/ITBTCToken.sol index 7b660ec06..d533d2a04 100644 --- a/solidity/contracts/bridge/ITBTCToken.sol +++ b/solidity/contracts/bridge/ITBTCToken.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-only -pragma solidity ^0.8.21; +pragma solidity 0.8.21; /// @title Interface of TBTC token contract. /// @notice This interface defines functions of TBTC token contract used by Acre diff --git a/solidity/contracts/interfaces/IDispatcher.sol b/solidity/contracts/interfaces/IDispatcher.sol index 4c762240c..956915b56 100644 --- a/solidity/contracts/interfaces/IDispatcher.sol +++ b/solidity/contracts/interfaces/IDispatcher.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-only -pragma solidity ^0.8.21; +pragma solidity 0.8.21; /// @title IDispatcher /// @notice Interface for the Dispatcher contract. diff --git a/solidity/contracts/lib/ERC4626Fees.sol b/solidity/contracts/lib/ERC4626Fees.sol index 0bc0ee1c4..4039ad36d 100644 --- a/solidity/contracts/lib/ERC4626Fees.sol +++ b/solidity/contracts/lib/ERC4626Fees.sol @@ -2,7 +2,7 @@ // Inspired by https://docs.openzeppelin.com/contracts/5.x/erc4626#fees -pragma solidity ^0.8.21; +pragma solidity 0.8.21; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {ERC4626Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC4626Upgradeable.sol"; diff --git a/solidity/contracts/stBTC.sol b/solidity/contracts/stBTC.sol index 0019aaf55..f492e917b 100644 --- a/solidity/contracts/stBTC.sol +++ b/solidity/contracts/stBTC.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-only -pragma solidity ^0.8.21; +pragma solidity 0.8.21; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; diff --git a/solidity/contracts/test/BitcoinDepositorHarness.sol b/solidity/contracts/test/BitcoinDepositorHarness.sol index 41e8791fc..4e9540628 100644 --- a/solidity/contracts/test/BitcoinDepositorHarness.sol +++ b/solidity/contracts/test/BitcoinDepositorHarness.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-3.0-only /* solhint-disable func-name-mixedcase */ -pragma solidity ^0.8.21; +pragma solidity 0.8.21; import {BitcoinDepositor} from "../BitcoinDepositor.sol"; import {MockBridge, MockTBTCVault} from "@keep-network/tbtc-v2/contracts/test/TestTBTCDepositor.sol"; diff --git a/solidity/contracts/test/MezoPortalStub.sol b/solidity/contracts/test/MezoPortalStub.sol index d38b86de8..44734feaf 100644 --- a/solidity/contracts/test/MezoPortalStub.sol +++ b/solidity/contracts/test/MezoPortalStub.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity ^0.8.21; +pragma solidity 0.8.21; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; diff --git a/solidity/contracts/test/TestERC20.sol b/solidity/contracts/test/TestERC20.sol index c6b25896d..e563878cc 100644 --- a/solidity/contracts/test/TestERC20.sol +++ b/solidity/contracts/test/TestERC20.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-only -pragma solidity ^0.8.21; +pragma solidity 0.8.21; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; diff --git a/solidity/contracts/test/TestTBTC.sol b/solidity/contracts/test/TestTBTC.sol index e6ed5152a..4cad1b0b4 100644 --- a/solidity/contracts/test/TestTBTC.sol +++ b/solidity/contracts/test/TestTBTC.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-only -pragma solidity ^0.8.21; +pragma solidity 0.8.21; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "../bridge/ITBTCToken.sol"; diff --git a/solidity/contracts/test/upgrades/BitcoinDepositorV2.sol b/solidity/contracts/test/upgrades/BitcoinDepositorV2.sol index 85f02f3c8..1f34999e0 100644 --- a/solidity/contracts/test/upgrades/BitcoinDepositorV2.sol +++ b/solidity/contracts/test/upgrades/BitcoinDepositorV2.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-only -pragma solidity ^0.8.21; +pragma solidity 0.8.21; import "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol"; import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; diff --git a/solidity/contracts/test/upgrades/MezoAllocatorV2.sol b/solidity/contracts/test/upgrades/MezoAllocatorV2.sol index ef026c00d..a2893d0b7 100644 --- a/solidity/contracts/test/upgrades/MezoAllocatorV2.sol +++ b/solidity/contracts/test/upgrades/MezoAllocatorV2.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-only -pragma solidity ^0.8.21; +pragma solidity 0.8.21; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; diff --git a/solidity/contracts/test/upgrades/stBTCV2.sol b/solidity/contracts/test/upgrades/stBTCV2.sol index 69cf8e8c6..ed9a9939e 100644 --- a/solidity/contracts/test/upgrades/stBTCV2.sol +++ b/solidity/contracts/test/upgrades/stBTCV2.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-only -pragma solidity ^0.8.21; +pragma solidity 0.8.21; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; diff --git a/solidity/contracts/utils/Errors.sol b/solidity/contracts/utils/Errors.sol index eac127c04..2fbc28545 100644 --- a/solidity/contracts/utils/Errors.sol +++ b/solidity/contracts/utils/Errors.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-only -pragma solidity ^0.8.21; +pragma solidity 0.8.21; error ZeroAddress(); From 7c056ebe8dbc61024d2c42524046e3060d2bf890 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Thu, 9 May 2024 22:17:27 +0200 Subject: [PATCH 2/5] Revert "Pausing token transfers upon pausing the protocol" This reverts commit 2c94f79332cf4600ac79fab49c721c90e92d250c. --- solidity/contracts/stBTC.sol | 15 --------------- solidity/test/stBTC.test.ts | 19 ------------------- 2 files changed, 34 deletions(-) diff --git a/solidity/contracts/stBTC.sol b/solidity/contracts/stBTC.sol index 7866d8eb2..04eb4802a 100644 --- a/solidity/contracts/stBTC.sol +++ b/solidity/contracts/stBTC.sol @@ -355,21 +355,6 @@ contract stBTC is ERC4626Fees, PausableOwnable { return convertToAssets(balanceOf(account)); } - /// @dev Transfers a `value` amount of tokens from `from` to `to`, or - /// alternatively mints (or burns) if `from` (or `to`) is the zero - /// address. All customizations to transfers, mints, and burns should - /// be done by overriding this function. - /// @param from Sender of tokens. - /// @param to Receiver of tokens. - /// @param value Amount of tokens to transfer. - function _update( - address from, - address to, - uint256 value - ) internal override whenNotPaused { - super._update(from, to, value); - } - /// @return Returns entry fee basis point used in deposits. function _entryFeeBasisPoints() internal view override returns (uint256) { return entryFeeBasisPoints; diff --git a/solidity/test/stBTC.test.ts b/solidity/test/stBTC.test.ts index fed6991b0..d35cce6c0 100644 --- a/solidity/test/stBTC.test.ts +++ b/solidity/test/stBTC.test.ts @@ -1868,25 +1868,6 @@ describe("stBTC", () => { it("should return 0 when calling maxWithdraw", async () => { expect(await stbtc.maxWithdraw(depositor1)).to.be.eq(0) }) - - it("should pause transfers", async () => { - await expect( - stbtc.connect(depositor1).transfer(depositor2, amount), - ).to.be.revertedWithCustomError(stbtc, "EnforcedPause") - }) - - it("should pause transfersFrom", async () => { - await expect( - stbtc - .connect(depositor1) - .approve(depositor2.address, amount) - .then(() => - stbtc - .connect(depositor2) - .transferFrom(depositor1, depositor2, amount), - ), - ).to.be.revertedWithCustomError(stbtc, "EnforcedPause") - }) }) }) From 4a8f04a021fe2604ee889d15b698aba989f04b54 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Fri, 10 May 2024 09:38:13 +0200 Subject: [PATCH 3/5] Bumping up hardhat version to 22.2.3 The previous version didn't support solidity compiler 0.8.24. Current version does. --- pnpm-lock.yaml | 501 +++++++++++++----------------------------- solidity/package.json | 2 +- 2 files changed, 155 insertions(+), 348 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 89c0b0bc4..92279cdd5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -202,28 +202,28 @@ importers: devDependencies: '@keep-network/hardhat-helpers': specifier: ^0.7.1 - version: 0.7.1(@nomicfoundation/hardhat-ethers@3.0.5)(@nomicfoundation/hardhat-verify@2.0.1)(@openzeppelin/hardhat-upgrades@3.0.5)(ethers@6.10.0)(hardhat-deploy@0.11.43)(hardhat@2.19.1) + version: 0.7.1(@nomicfoundation/hardhat-ethers@3.0.5)(@nomicfoundation/hardhat-verify@2.0.1)(@openzeppelin/hardhat-upgrades@3.0.5)(ethers@6.10.0)(hardhat-deploy@0.11.43)(hardhat@2.22.3) '@nomicfoundation/hardhat-chai-matchers': specifier: ^2.0.2 - version: 2.0.2(@nomicfoundation/hardhat-ethers@3.0.5)(chai@4.3.10)(ethers@6.10.0)(hardhat@2.19.1) + version: 2.0.2(@nomicfoundation/hardhat-ethers@3.0.5)(chai@4.3.10)(ethers@6.10.0)(hardhat@2.22.3) '@nomicfoundation/hardhat-ethers': specifier: ^3.0.5 - version: 3.0.5(ethers@6.10.0)(hardhat@2.19.1) + version: 3.0.5(ethers@6.10.0)(hardhat@2.22.3) '@nomicfoundation/hardhat-network-helpers': specifier: ^1.0.9 - version: 1.0.9(hardhat@2.19.1) + version: 1.0.9(hardhat@2.22.3) '@nomicfoundation/hardhat-toolbox': specifier: ^4.0.0 - version: 4.0.0(@nomicfoundation/hardhat-chai-matchers@2.0.2)(@nomicfoundation/hardhat-ethers@3.0.5)(@nomicfoundation/hardhat-network-helpers@1.0.9)(@nomicfoundation/hardhat-verify@2.0.1)(@typechain/ethers-v6@0.5.1)(@typechain/hardhat@9.1.0)(@types/chai@4.3.11)(@types/mocha@10.0.6)(@types/node@20.9.4)(chai@4.3.10)(ethers@6.10.0)(hardhat-gas-reporter@1.0.9)(hardhat@2.19.1)(solidity-coverage@0.8.5)(ts-node@10.9.1)(typechain@8.3.2)(typescript@5.3.2) + version: 4.0.0(@nomicfoundation/hardhat-chai-matchers@2.0.2)(@nomicfoundation/hardhat-ethers@3.0.5)(@nomicfoundation/hardhat-network-helpers@1.0.9)(@nomicfoundation/hardhat-verify@2.0.1)(@typechain/ethers-v6@0.5.1)(@typechain/hardhat@9.1.0)(@types/chai@4.3.11)(@types/mocha@10.0.6)(@types/node@20.9.4)(chai@4.3.10)(ethers@6.10.0)(hardhat-gas-reporter@1.0.9)(hardhat@2.22.3)(solidity-coverage@0.8.5)(ts-node@10.9.1)(typechain@8.3.2)(typescript@5.3.2) '@nomicfoundation/hardhat-verify': specifier: ^2.0.1 - version: 2.0.1(hardhat@2.19.1) + version: 2.0.1(hardhat@2.22.3) '@nomiclabs/hardhat-etherscan': specifier: ^3.1.7 - version: 3.1.7(hardhat@2.19.1) + version: 3.1.7(hardhat@2.22.3) '@openzeppelin/hardhat-upgrades': specifier: ^3.0.5 - version: 3.0.5(@nomicfoundation/hardhat-ethers@3.0.5)(@nomicfoundation/hardhat-verify@2.0.1)(ethers@6.10.0)(hardhat@2.19.1) + version: 3.0.5(@nomicfoundation/hardhat-ethers@3.0.5)(@nomicfoundation/hardhat-verify@2.0.1)(ethers@6.10.0)(hardhat@2.22.3) '@thesis-co/eslint-config': specifier: github:thesis/eslint-config#7b9bc8c version: github.com/thesis/eslint-config/7b9bc8c(eslint@8.54.0)(prettier@3.1.0)(typescript@5.3.2) @@ -232,7 +232,7 @@ importers: version: 0.5.1(ethers@6.10.0)(typechain@8.3.2)(typescript@5.3.2) '@typechain/hardhat': specifier: ^9.1.0 - version: 9.1.0(@typechain/ethers-v6@0.5.1)(ethers@6.10.0)(hardhat@2.19.1)(typechain@8.3.2) + version: 9.1.0(@typechain/ethers-v6@0.5.1)(ethers@6.10.0)(hardhat@2.22.3)(typechain@8.3.2) '@types/chai': specifier: ^4.3.11 version: 4.3.11 @@ -255,17 +255,17 @@ importers: specifier: ^6.8.1 version: 6.10.0 hardhat: - specifier: ^2.19.1 - version: 2.19.1(ts-node@10.9.1)(typescript@5.3.2) + specifier: ^2.22.3 + version: 2.22.3(ts-node@10.9.1)(typescript@5.3.2) hardhat-contract-sizer: specifier: ^2.10.0 - version: 2.10.0(hardhat@2.19.1) + version: 2.10.0(hardhat@2.22.3) hardhat-deploy: specifier: ^0.11.43 version: 0.11.43 hardhat-gas-reporter: specifier: ^1.0.9 - version: 1.0.9(hardhat@2.19.1) + version: 1.0.9(hardhat@2.22.3) prettier: specifier: ^3.1.0 version: 3.1.0 @@ -280,10 +280,10 @@ importers: version: github.com/thesis/solhint-config/266de12d96d58f01171e20858b855ec80520de8d(solhint@4.0.0) solidity-coverage: specifier: ^0.8.5 - version: 0.8.5(hardhat@2.19.1) + version: 0.8.5(hardhat@2.22.3) solidity-docgen: specifier: 0.6.0-beta.36 - version: 0.6.0-beta.36(hardhat@2.19.1) + version: 0.6.0-beta.36(hardhat@2.22.3) ts-node: specifier: ^10.9.1 version: 10.9.1(@types/node@20.9.4)(typescript@5.3.2) @@ -1977,37 +1977,6 @@ packages: - web3 dev: false - /@chainsafe/as-sha256@0.3.1: - resolution: {integrity: sha512-hldFFYuf49ed7DAakWVXSJODuq3pzJEguD8tQ7h+sGkM18vja+OFoJI9krnGmgzyuZC2ETX0NOIcCTy31v2Mtg==} - dev: true - - /@chainsafe/persistent-merkle-tree@0.4.2: - resolution: {integrity: sha512-lLO3ihKPngXLTus/L7WHKaw9PnNJWizlOF1H9NNzHP6Xvh82vzg9F2bzkXhYIFshMZ2gTCEz8tq6STe7r5NDfQ==} - dependencies: - '@chainsafe/as-sha256': 0.3.1 - dev: true - - /@chainsafe/persistent-merkle-tree@0.5.0: - resolution: {integrity: sha512-l0V1b5clxA3iwQLXP40zYjyZYospQLZXzBVIhhr9kDg/1qHZfzzHw0jj4VPBijfYCArZDlPkRi1wZaV2POKeuw==} - dependencies: - '@chainsafe/as-sha256': 0.3.1 - dev: true - - /@chainsafe/ssz@0.10.2: - resolution: {integrity: sha512-/NL3Lh8K+0q7A3LsiFq09YXS9fPE+ead2rr7vM2QK8PLzrNsw3uqrif9bpRX5UxgeRjM+vYi+boCM3+GM4ovXg==} - dependencies: - '@chainsafe/as-sha256': 0.3.1 - '@chainsafe/persistent-merkle-tree': 0.5.0 - dev: true - - /@chainsafe/ssz@0.9.4: - resolution: {integrity: sha512-77Qtg2N1ayqs4Bg/wvnWfg5Bta7iy7IRh8XqXh7oNMeP2HBbBwx8m6yTpA8p0EHItWPEBkgZd5S5/LSlp3GXuQ==} - dependencies: - '@chainsafe/as-sha256': 0.3.1 - '@chainsafe/persistent-merkle-tree': 0.4.2 - case: 1.6.3 - dev: true - /@chakra-ui/accordion@2.3.1(@chakra-ui/system@2.6.2)(framer-motion@10.16.5)(react@18.2.0): resolution: {integrity: sha512-FSXRm8iClFyU+gVaXisOSEw0/4Q+qZbFRiuhIAkVU6Boj0FxAMrlo9a8AV5TuF77rgaHytCdHk0Ng+cyUijrag==} peerDependencies: @@ -4503,7 +4472,7 @@ packages: - '@keep-network/keep-core' dev: false - /@keep-network/hardhat-helpers@0.7.1(@nomicfoundation/hardhat-ethers@3.0.5)(@nomicfoundation/hardhat-verify@2.0.1)(@openzeppelin/hardhat-upgrades@3.0.5)(ethers@6.10.0)(hardhat-deploy@0.11.43)(hardhat@2.19.1): + /@keep-network/hardhat-helpers@0.7.1(@nomicfoundation/hardhat-ethers@3.0.5)(@nomicfoundation/hardhat-verify@2.0.1)(@openzeppelin/hardhat-upgrades@3.0.5)(ethers@6.10.0)(hardhat-deploy@0.11.43)(hardhat@2.22.3): resolution: {integrity: sha512-de6Gy45JukZwGgZqVuR+Zq5PSqnmvKLDJn0/KrKT5tFzGspARUf1WzhDgTTB/D7gTK04sxlrL6WJM3XQ/wZEkw==} peerDependencies: '@nomicfoundation/hardhat-ethers': ^3.0.5 @@ -4513,11 +4482,11 @@ packages: hardhat: ^2.19.4 hardhat-deploy: ^0.11.45 dependencies: - '@nomicfoundation/hardhat-ethers': 3.0.5(ethers@6.10.0)(hardhat@2.19.1) - '@nomicfoundation/hardhat-verify': 2.0.1(hardhat@2.19.1) - '@openzeppelin/hardhat-upgrades': 3.0.5(@nomicfoundation/hardhat-ethers@3.0.5)(@nomicfoundation/hardhat-verify@2.0.1)(ethers@6.10.0)(hardhat@2.19.1) + '@nomicfoundation/hardhat-ethers': 3.0.5(ethers@6.10.0)(hardhat@2.22.3) + '@nomicfoundation/hardhat-verify': 2.0.1(hardhat@2.22.3) + '@openzeppelin/hardhat-upgrades': 3.0.5(@nomicfoundation/hardhat-ethers@3.0.5)(@nomicfoundation/hardhat-verify@2.0.1)(ethers@6.10.0)(hardhat@2.22.3) ethers: 6.10.0 - hardhat: 2.19.1(ts-node@10.9.1)(typescript@5.3.2) + hardhat: 2.22.3(ts-node@10.9.1)(typescript@5.3.2) hardhat-deploy: 0.11.43 dev: true @@ -4973,165 +4942,125 @@ packages: '@nodelib/fs.scandir': 2.1.5 fastq: 1.15.0 - /@nomicfoundation/ethereumjs-block@5.0.2: - resolution: {integrity: sha512-hSe6CuHI4SsSiWWjHDIzWhSiAVpzMUcDRpWYzN0T9l8/Rz7xNn3elwVOJ/tAyS0LqL6vitUD78Uk7lQDXZun7Q==} - engines: {node: '>=14'} - 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.2 - transitivePeerDependencies: - - bufferutil - - utf-8-validate + /@nomicfoundation/edr-darwin-arm64@0.3.7: + resolution: {integrity: sha512-6tK9Lv/lSfyBvpEQ4nsTfgxyDT1y1Uv/x8Wa+aB+E8qGo3ToexQ1BMVjxJk6PChXCDOWxB3B4KhqaZFjdhl3Ow==} + engines: {node: '>= 18'} + cpu: [arm64] + os: [darwin] + requiresBuild: true dev: true + optional: true - /@nomicfoundation/ethereumjs-blockchain@7.0.2: - resolution: {integrity: sha512-8UUsSXJs+MFfIIAKdh3cG16iNmWzWC/91P40sazNvrqhhdR/RtGDlFk2iFTGbBAZPs2+klZVzhRX8m2wvuvz3w==} - engines: {node: '>=14'} - 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.4(supports-color@8.1.1) - ethereum-cryptography: 0.1.3 - level: 8.0.0 - lru-cache: 5.1.1 - memory-level: 1.0.0 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate + /@nomicfoundation/edr-darwin-x64@0.3.7: + resolution: {integrity: sha512-1RrQ/1JPwxrYO69e0tglFv5H+ggour5Ii3bb727+yBpBShrxtOTQ7fZyfxA5h62LCN+0Z9wYOPeQ7XFcVurMaQ==} + engines: {node: '>= 18'} + cpu: [x64] + os: [darwin] + requiresBuild: true dev: true + optional: true - /@nomicfoundation/ethereumjs-common@4.0.2: - resolution: {integrity: sha512-I2WGP3HMGsOoycSdOTSqIaES0ughQTueOsddJ36aYVpI3SN8YSusgRFLwzDJwRFVIYDKx/iJz0sQ5kBHVgdDwg==} - dependencies: - '@nomicfoundation/ethereumjs-util': 9.0.2 - crc-32: 1.2.2 + /@nomicfoundation/edr-linux-arm64-gnu@0.3.7: + resolution: {integrity: sha512-ds/CKlBoVXIihjhflhgPn13EdKWed6r5bgvMs/YwRqT5wldQAQJZWAfA2+nYm0Yi2gMGh1RUpBcfkyl4pq7G+g==} + engines: {node: '>= 18'} + cpu: [arm64] + os: [linux] + requiresBuild: true dev: true + optional: true - /@nomicfoundation/ethereumjs-ethash@3.0.2: - resolution: {integrity: sha512-8PfoOQCcIcO9Pylq0Buijuq/O73tmMVURK0OqdjhwqcGHYC2PwhbajDh7GZ55ekB0Px197ajK3PQhpKoiI/UPg==} - engines: {node: '>=14'} - 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.3.0 - ethereum-cryptography: 0.1.3 - transitivePeerDependencies: - - bufferutil - - utf-8-validate + /@nomicfoundation/edr-linux-arm64-musl@0.3.7: + resolution: {integrity: sha512-e29udiRaPujhLkM3+R6ju7QISrcyOqpcaxb2FsDWBkuD7H8uU9JPZEyyUIpEp5uIY0Jh1eEJPKZKIXQmQAEAuw==} + engines: {node: '>= 18'} + cpu: [arm64] + os: [linux] + requiresBuild: true dev: true + optional: true - /@nomicfoundation/ethereumjs-evm@2.0.2: - resolution: {integrity: sha512-rBLcUaUfANJxyOx9HIdMX6uXGin6lANCulIm/pjMgRqfiCRMZie3WKYxTSd8ZE/d+qT+zTedBF4+VHTdTSePmQ==} - engines: {node: '>=14'} - dependencies: - '@ethersproject/providers': 5.7.2 - '@nomicfoundation/ethereumjs-common': 4.0.2 - '@nomicfoundation/ethereumjs-tx': 5.0.2 - '@nomicfoundation/ethereumjs-util': 9.0.2 - debug: 4.3.4(supports-color@8.1.1) - ethereum-cryptography: 0.1.3 - mcl-wasm: 0.7.9 - rustbn.js: 0.2.0 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate + /@nomicfoundation/edr-linux-x64-gnu@0.3.7: + resolution: {integrity: sha512-/xkjmTyv+bbJ4akBCW0qzFKxPOV4AqLOmqurov+s9umHb16oOv72osSa3SdzJED2gHDaKmpMITT4crxbar4Axg==} + engines: {node: '>= 18'} + cpu: [x64] + os: [linux] + requiresBuild: true dev: true + optional: true - /@nomicfoundation/ethereumjs-rlp@5.0.2: - resolution: {integrity: sha512-QwmemBc+MMsHJ1P1QvPl8R8p2aPvvVcKBbvHnQOKBpBztEo0omN0eaob6FeZS/e3y9NSe+mfu3nNFBHszqkjTA==} - engines: {node: '>=14'} - hasBin: true + /@nomicfoundation/edr-linux-x64-musl@0.3.7: + resolution: {integrity: sha512-QwBP9xlmsbf/ldZDGLcE4QiAb8Zt46E/+WLpxHBATFhGa7MrpJh6Zse+h2VlrT/SYLPbh2cpHgSmoSlqVxWG9g==} + engines: {node: '>= 18'} + cpu: [x64] + os: [linux] + requiresBuild: true dev: true + optional: true - /@nomicfoundation/ethereumjs-statemanager@2.0.2: - resolution: {integrity: sha512-dlKy5dIXLuDubx8Z74sipciZnJTRSV/uHG48RSijhgm1V7eXYFC567xgKtsKiVZB1ViTP9iFL4B6Je0xD6X2OA==} - dependencies: - '@nomicfoundation/ethereumjs-common': 4.0.2 - '@nomicfoundation/ethereumjs-rlp': 5.0.2 - debug: 4.3.4(supports-color@8.1.1) - ethereum-cryptography: 0.1.3 - ethers: 5.7.2 - js-sdsl: 4.4.2 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate + /@nomicfoundation/edr-win32-x64-msvc@0.3.7: + resolution: {integrity: sha512-j/80DEnkxrF2ewdbk/gQ2EOPvgF0XSsg8D0o4+6cKhUVAW6XwtWKzIphNL6dyD2YaWEPgIrNvqiJK/aln0ww4Q==} + engines: {node: '>= 18'} + cpu: [x64] + os: [win32] + requiresBuild: true dev: true + optional: true - /@nomicfoundation/ethereumjs-trie@6.0.2: - resolution: {integrity: sha512-yw8vg9hBeLYk4YNg5MrSJ5H55TLOv2FSWUTROtDtTMMmDGROsAu+0tBjiNGTnKRi400M6cEzoFfa89Fc5k8NTQ==} - engines: {node: '>=14'} - dependencies: - '@nomicfoundation/ethereumjs-rlp': 5.0.2 - '@nomicfoundation/ethereumjs-util': 9.0.2 - '@types/readable-stream': 2.3.15 - ethereum-cryptography: 0.1.3 - readable-stream: 3.6.2 + /@nomicfoundation/edr@0.3.7: + resolution: {integrity: sha512-v2JFWnFKRsnOa6PDUrD+sr8amcdhxnG/YbL7LzmgRGU1odWEyOF4/EwNeUajQr4ZNKVWrYnJ6XjydXtUge5OBQ==} + engines: {node: '>= 18'} + optionalDependencies: + '@nomicfoundation/edr-darwin-arm64': 0.3.7 + '@nomicfoundation/edr-darwin-x64': 0.3.7 + '@nomicfoundation/edr-linux-arm64-gnu': 0.3.7 + '@nomicfoundation/edr-linux-arm64-musl': 0.3.7 + '@nomicfoundation/edr-linux-x64-gnu': 0.3.7 + '@nomicfoundation/edr-linux-x64-musl': 0.3.7 + '@nomicfoundation/edr-win32-x64-msvc': 0.3.7 dev: true - /@nomicfoundation/ethereumjs-tx@5.0.2: - resolution: {integrity: sha512-T+l4/MmTp7VhJeNloMkM+lPU3YMUaXdcXgTGCf8+ZFvV9NYZTRLFekRwlG6/JMmVfIfbrW+dRRJ9A6H5Q/Z64g==} - engines: {node: '>=14'} + /@nomicfoundation/ethereumjs-common@4.0.4: + resolution: {integrity: sha512-9Rgb658lcWsjiicr5GzNCjI1llow/7r0k50dLL95OJ+6iZJcVbi15r3Y0xh2cIO+zgX0WIHcbzIu6FeQf9KPrg==} dependencies: - '@chainsafe/ssz': 0.9.4 - '@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 + '@nomicfoundation/ethereumjs-util': 9.0.4 transitivePeerDependencies: - - bufferutil - - utf-8-validate + - c-kzg dev: true - /@nomicfoundation/ethereumjs-util@9.0.2: - resolution: {integrity: sha512-4Wu9D3LykbSBWZo8nJCnzVIYGvGCuyiYLIJa9XXNVt1q1jUzHdB+sJvx95VGCpPkCT+IbLecW6yfzy3E1bQrwQ==} - engines: {node: '>=14'} + /@nomicfoundation/ethereumjs-rlp@5.0.4: + resolution: {integrity: sha512-8H1S3s8F6QueOc/X92SdrA4RDenpiAEqMg5vJH99kcQaCy/a3Q6fgseo75mgWlbanGJXSlAPtnCeG9jvfTYXlw==} + engines: {node: '>=18'} + hasBin: true + dev: true + + /@nomicfoundation/ethereumjs-tx@5.0.4: + resolution: {integrity: sha512-Xjv8wAKJGMrP1f0n2PeyfFCCojHd7iS3s/Ab7qzF1S64kxZ8Z22LCMynArYsVqiFx6rzYy548HNVEyI+AYN/kw==} + engines: {node: '>=18'} + peerDependencies: + c-kzg: ^2.1.2 + peerDependenciesMeta: + c-kzg: + optional: true dependencies: - '@chainsafe/ssz': 0.10.2 - '@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 dev: true - /@nomicfoundation/ethereumjs-vm@7.0.2: - resolution: {integrity: sha512-Bj3KZT64j54Tcwr7Qm/0jkeZXJMfdcAtRBedou+Hx0dPOSIgqaIr0vvLwP65TpHbak2DmAq+KJbW2KNtIoFwvA==} - engines: {node: '>=14'} + /@nomicfoundation/ethereumjs-util@9.0.4: + resolution: {integrity: sha512-sLOzjnSrlx9Bb9EFNtHzK/FJFsfg2re6bsGqinFinH1gCqVfz9YYlXiMWwDM4C/L4ywuHFCYwfKTVr/QHQcU0Q==} + engines: {node: '>=18'} + peerDependencies: + c-kzg: ^2.1.2 + peerDependenciesMeta: + c-kzg: + optional: true 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.4(supports-color@8.1.1) + '@nomicfoundation/ethereumjs-rlp': 5.0.4 ethereum-cryptography: 0.1.3 - mcl-wasm: 0.7.9 - rustbn.js: 0.2.0 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate dev: true - /@nomicfoundation/hardhat-chai-matchers@2.0.2(@nomicfoundation/hardhat-ethers@3.0.5)(chai@4.3.10)(ethers@6.10.0)(hardhat@2.19.1): + /@nomicfoundation/hardhat-chai-matchers@2.0.2(@nomicfoundation/hardhat-ethers@3.0.5)(chai@4.3.10)(ethers@6.10.0)(hardhat@2.22.3): resolution: {integrity: sha512-9Wu9mRtkj0U9ohgXYFbB/RQDa+PcEdyBm2suyEtsJf3PqzZEEjLUZgWnMjlFhATMk/fp3BjmnYVPrwl+gr8oEw==} peerDependencies: '@nomicfoundation/hardhat-ethers': ^3.0.0 @@ -5139,17 +5068,17 @@ packages: ethers: ^6.1.0 hardhat: ^2.9.4 dependencies: - '@nomicfoundation/hardhat-ethers': 3.0.5(ethers@6.10.0)(hardhat@2.19.1) + '@nomicfoundation/hardhat-ethers': 3.0.5(ethers@6.10.0)(hardhat@2.22.3) '@types/chai-as-promised': 7.1.8 chai: 4.3.10 chai-as-promised: 7.1.1(chai@4.3.10) deep-eql: 4.1.3 ethers: 6.10.0 - hardhat: 2.19.1(ts-node@10.9.1)(typescript@5.3.2) + hardhat: 2.22.3(ts-node@10.9.1)(typescript@5.3.2) ordinal: 1.0.3 dev: true - /@nomicfoundation/hardhat-ethers@3.0.5(ethers@6.10.0)(hardhat@2.19.1): + /@nomicfoundation/hardhat-ethers@3.0.5(ethers@6.10.0)(hardhat@2.22.3): resolution: {integrity: sha512-RNFe8OtbZK6Ila9kIlHp0+S80/0Bu/3p41HUpaRIoHLm6X3WekTd83vob3rE54Duufu1edCiBDxspBzi2rxHHw==} peerDependencies: ethers: ^6.1.0 @@ -5157,22 +5086,22 @@ packages: dependencies: debug: 4.3.4(supports-color@8.1.1) ethers: 6.10.0 - hardhat: 2.19.1(ts-node@10.9.1)(typescript@5.3.2) + hardhat: 2.22.3(ts-node@10.9.1)(typescript@5.3.2) lodash.isequal: 4.5.0 transitivePeerDependencies: - supports-color dev: true - /@nomicfoundation/hardhat-network-helpers@1.0.9(hardhat@2.19.1): + /@nomicfoundation/hardhat-network-helpers@1.0.9(hardhat@2.22.3): resolution: {integrity: sha512-OXWCv0cHpwLUO2u7bFxBna6dQtCC2Gg/aN/KtJLO7gmuuA28vgmVKYFRCDUqrbjujzgfwQ2aKyZ9Y3vSmDqS7Q==} peerDependencies: hardhat: ^2.9.5 dependencies: ethereumjs-util: 7.1.5 - hardhat: 2.19.1(ts-node@10.9.1)(typescript@5.3.2) + hardhat: 2.22.3(ts-node@10.9.1)(typescript@5.3.2) dev: true - /@nomicfoundation/hardhat-toolbox@4.0.0(@nomicfoundation/hardhat-chai-matchers@2.0.2)(@nomicfoundation/hardhat-ethers@3.0.5)(@nomicfoundation/hardhat-network-helpers@1.0.9)(@nomicfoundation/hardhat-verify@2.0.1)(@typechain/ethers-v6@0.5.1)(@typechain/hardhat@9.1.0)(@types/chai@4.3.11)(@types/mocha@10.0.6)(@types/node@20.9.4)(chai@4.3.10)(ethers@6.10.0)(hardhat-gas-reporter@1.0.9)(hardhat@2.19.1)(solidity-coverage@0.8.5)(ts-node@10.9.1)(typechain@8.3.2)(typescript@5.3.2): + /@nomicfoundation/hardhat-toolbox@4.0.0(@nomicfoundation/hardhat-chai-matchers@2.0.2)(@nomicfoundation/hardhat-ethers@3.0.5)(@nomicfoundation/hardhat-network-helpers@1.0.9)(@nomicfoundation/hardhat-verify@2.0.1)(@typechain/ethers-v6@0.5.1)(@typechain/hardhat@9.1.0)(@types/chai@4.3.11)(@types/mocha@10.0.6)(@types/node@20.9.4)(chai@4.3.10)(ethers@6.10.0)(hardhat-gas-reporter@1.0.9)(hardhat@2.22.3)(solidity-coverage@0.8.5)(ts-node@10.9.1)(typechain@8.3.2)(typescript@5.3.2): resolution: {integrity: sha512-jhcWHp0aHaL0aDYj8IJl80v4SZXWMS1A2XxXa1CA6pBiFfJKuZinCkO6wb+POAt0LIfXB3gA3AgdcOccrcwBwA==} peerDependencies: '@nomicfoundation/hardhat-chai-matchers': ^2.0.0 @@ -5193,26 +5122,26 @@ packages: typechain: ^8.3.0 typescript: '>=4.5.0' dependencies: - '@nomicfoundation/hardhat-chai-matchers': 2.0.2(@nomicfoundation/hardhat-ethers@3.0.5)(chai@4.3.10)(ethers@6.10.0)(hardhat@2.19.1) - '@nomicfoundation/hardhat-ethers': 3.0.5(ethers@6.10.0)(hardhat@2.19.1) - '@nomicfoundation/hardhat-network-helpers': 1.0.9(hardhat@2.19.1) - '@nomicfoundation/hardhat-verify': 2.0.1(hardhat@2.19.1) + '@nomicfoundation/hardhat-chai-matchers': 2.0.2(@nomicfoundation/hardhat-ethers@3.0.5)(chai@4.3.10)(ethers@6.10.0)(hardhat@2.22.3) + '@nomicfoundation/hardhat-ethers': 3.0.5(ethers@6.10.0)(hardhat@2.22.3) + '@nomicfoundation/hardhat-network-helpers': 1.0.9(hardhat@2.22.3) + '@nomicfoundation/hardhat-verify': 2.0.1(hardhat@2.22.3) '@typechain/ethers-v6': 0.5.1(ethers@6.10.0)(typechain@8.3.2)(typescript@5.3.2) - '@typechain/hardhat': 9.1.0(@typechain/ethers-v6@0.5.1)(ethers@6.10.0)(hardhat@2.19.1)(typechain@8.3.2) + '@typechain/hardhat': 9.1.0(@typechain/ethers-v6@0.5.1)(ethers@6.10.0)(hardhat@2.22.3)(typechain@8.3.2) '@types/chai': 4.3.11 '@types/mocha': 10.0.6 '@types/node': 20.9.4 chai: 4.3.10 ethers: 6.10.0 - hardhat: 2.19.1(ts-node@10.9.1)(typescript@5.3.2) - hardhat-gas-reporter: 1.0.9(hardhat@2.19.1) - solidity-coverage: 0.8.5(hardhat@2.19.1) + hardhat: 2.22.3(ts-node@10.9.1)(typescript@5.3.2) + hardhat-gas-reporter: 1.0.9(hardhat@2.22.3) + solidity-coverage: 0.8.5(hardhat@2.22.3) ts-node: 10.9.1(@types/node@20.9.4)(typescript@5.3.2) typechain: 8.3.2(typescript@5.3.2) typescript: 5.3.2 dev: true - /@nomicfoundation/hardhat-verify@2.0.1(hardhat@2.19.1): + /@nomicfoundation/hardhat-verify@2.0.1(hardhat@2.22.3): resolution: {integrity: sha512-TuJrhW5p9x92wDRiRhNkGQ/wzRmOkfCLkoRg8+IRxyeLigOALbayQEmkNiGWR03vGlxZS4znXhKI7y97JwZ6Og==} peerDependencies: hardhat: ^2.0.4 @@ -5222,7 +5151,7 @@ packages: cbor: 8.1.0 chalk: 2.4.2 debug: 4.3.4(supports-color@8.1.1) - hardhat: 2.19.1(ts-node@10.9.1)(typescript@5.3.2) + hardhat: 2.22.3(ts-node@10.9.1)(typescript@5.3.2) lodash.clonedeep: 4.5.0 semver: 6.3.1 table: 6.8.1 @@ -5337,7 +5266,7 @@ packages: '@nomicfoundation/solidity-analyzer-win32-x64-msvc': 0.1.1 dev: true - /@nomiclabs/hardhat-etherscan@3.1.7(hardhat@2.19.1): + /@nomiclabs/hardhat-etherscan@3.1.7(hardhat@2.22.3): resolution: {integrity: sha512-tZ3TvSgpvsQ6B6OGmo1/Au6u8BrAkvs1mIC/eURA3xgIfznUZBhmpne8hv7BXUzw9xNL3fXdpOYgOQlVMTcoHQ==} deprecated: The @nomiclabs/hardhat-etherscan package is deprecated, please use @nomicfoundation/hardhat-verify instead peerDependencies: @@ -5349,7 +5278,7 @@ packages: chalk: 2.4.2 debug: 4.3.4(supports-color@8.1.1) fs-extra: 7.0.1 - hardhat: 2.19.1(ts-node@10.9.1)(typescript@5.3.2) + hardhat: 2.22.3(ts-node@10.9.1)(typescript@5.3.2) lodash: 4.17.21 semver: 6.3.1 table: 6.8.1 @@ -5563,7 +5492,7 @@ packages: - encoding dev: true - /@openzeppelin/hardhat-upgrades@3.0.5(@nomicfoundation/hardhat-ethers@3.0.5)(@nomicfoundation/hardhat-verify@2.0.1)(ethers@6.10.0)(hardhat@2.19.1): + /@openzeppelin/hardhat-upgrades@3.0.5(@nomicfoundation/hardhat-ethers@3.0.5)(@nomicfoundation/hardhat-verify@2.0.1)(ethers@6.10.0)(hardhat@2.22.3): resolution: {integrity: sha512-7Klg1B6fH45+7Zxzr6d9mLqudrL9Uk6CUG5AeG5NckPfP4ZlQRo1squcQ8yJPwqDS8rQjfChiqKDelp4LTjyZQ==} hasBin: true peerDependencies: @@ -5575,8 +5504,8 @@ packages: '@nomicfoundation/hardhat-verify': optional: true dependencies: - '@nomicfoundation/hardhat-ethers': 3.0.5(ethers@6.10.0)(hardhat@2.19.1) - '@nomicfoundation/hardhat-verify': 2.0.1(hardhat@2.19.1) + '@nomicfoundation/hardhat-ethers': 3.0.5(ethers@6.10.0)(hardhat@2.22.3) + '@nomicfoundation/hardhat-verify': 2.0.1(hardhat@2.22.3) '@openzeppelin/defender-admin-client': 1.52.0(debug@4.3.4) '@openzeppelin/defender-base-client': 1.52.0(debug@4.3.4) '@openzeppelin/defender-sdk-base-client': 1.10.0 @@ -5587,7 +5516,7 @@ packages: debug: 4.3.4(supports-color@8.1.1) ethereumjs-util: 7.1.5 ethers: 6.10.0 - hardhat: 2.19.1(ts-node@10.9.1)(typescript@5.3.2) + hardhat: 2.22.3(ts-node@10.9.1)(typescript@5.3.2) proper-lockfile: 4.1.2 undici: 6.7.1 transitivePeerDependencies: @@ -6846,7 +6775,7 @@ packages: typescript: 5.3.2 dev: true - /@typechain/hardhat@9.1.0(@typechain/ethers-v6@0.5.1)(ethers@6.10.0)(hardhat@2.19.1)(typechain@8.3.2): + /@typechain/hardhat@9.1.0(@typechain/ethers-v6@0.5.1)(ethers@6.10.0)(hardhat@2.22.3)(typechain@8.3.2): resolution: {integrity: sha512-mtaUlzLlkqTlfPwB3FORdejqBskSnh+Jl8AIJGjXNAQfRQ4ofHADPl1+oU7Z3pAJzmZbUXII8MhOLQltcHgKnA==} peerDependencies: '@typechain/ethers-v6': ^0.5.1 @@ -6857,7 +6786,7 @@ packages: '@typechain/ethers-v6': 0.5.1(ethers@6.10.0)(typechain@8.3.2)(typescript@5.3.2) ethers: 6.10.0 fs-extra: 9.1.0 - hardhat: 2.19.1(ts-node@10.9.1)(typescript@5.3.2) + hardhat: 2.22.3(ts-node@10.9.1)(typescript@5.3.2) typechain: 8.3.2(typescript@5.3.2) dev: true @@ -7251,13 +7180,6 @@ packages: '@types/scheduler': 0.16.8 csstype: 3.1.2 - /@types/readable-stream@2.3.15: - resolution: {integrity: sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ==} - dependencies: - '@types/node': 20.9.4 - safe-buffer: 5.1.2 - dev: true - /@types/responselike@1.0.3: resolution: {integrity: sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==} dependencies: @@ -7775,19 +7697,6 @@ packages: /abortcontroller-polyfill@1.7.5: resolution: {integrity: sha512-JMJ5soJWP18htbbxJjG7bG6yuI6pRhgJ0scHHTfkUjf6wjP912xZWvM+A4sJK3gqd9E8fcPbDnOefbA9Th/FIQ==} - /abstract-level@1.0.3: - resolution: {integrity: sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA==} - engines: {node: '>=12'} - dependencies: - buffer: 6.0.3 - catering: 2.1.1 - is-buffer: 2.0.5 - level-supports: 4.0.1 - level-transcoder: 1.0.1 - module-error: 1.0.2 - queue-microtask: 1.2.3 - dev: true - /accepts@1.3.8: resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} engines: {node: '>= 0.6'} @@ -8669,11 +8578,6 @@ packages: resolution: {integrity: sha512-ddkU+dFIuEIW8lE7ZwdIAf2UPoM90eaprg5m3YXAVVTmKlqV/9BX4A2M8BOK2yOq6/VgZFVhK6QAxJebhlbhzw==} dev: false - /bigint-crypto-utils@3.3.0: - resolution: {integrity: sha512-jOTSb+drvEDxEq6OuUybOAv/xxoh3cuYRUIPyu8sSHQNKM303UQ2R1DAo45o1AkcIXw6fzbaFI1+xGGdaXs2lg==} - engines: {node: '>=14.0.0'} - dev: true - /bignumber.js@7.2.1: resolution: {integrity: sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ==} dev: false @@ -8854,15 +8758,6 @@ packages: /brorand@1.1.0: resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} - /browser-level@1.0.1: - resolution: {integrity: sha512-XECYKJ+Dbzw0lbydyQuJzwNXtOpbMSq737qxJN11sIRTErOMShvDpbzTlgju7orJKvx4epULolZAuJGLzCmWRQ==} - dependencies: - abstract-level: 1.0.3 - catering: 2.1.1 - module-error: 1.0.2 - run-parallel-limit: 1.1.0 - dev: true - /browser-readablestream-to-it@1.0.3: resolution: {integrity: sha512-+12sHB+Br8HIh6VAMVEG5r3UXCyESIgDW7kzk3BjIXa43DVqVwL7GC5TW3jeh+72dtcH99pPVpw0X8i0jt+/kw==} dev: false @@ -9037,6 +8932,7 @@ packages: dependencies: base64-js: 1.5.1 ieee754: 1.2.1 + dev: false /bufferutil@4.0.8: resolution: {integrity: sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==} @@ -9188,19 +9084,9 @@ packages: redeyed: 2.1.1 dev: false - /case@1.6.3: - resolution: {integrity: sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ==} - engines: {node: '>= 0.8.0'} - dev: true - /caseless@0.12.0: resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} - /catering@2.1.1: - resolution: {integrity: sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w==} - engines: {node: '>=6'} - dev: true - /cbor@4.3.0: resolution: {integrity: sha512-CvzaxQlaJVa88sdtTWvLJ++MbdtPHtZOBBNjm7h3YKUHILMs9nQyD4AC6hvFZy7GBVB3I6bRibJcxeHydyT2IQ==} engines: {node: '>=6.0.0'} @@ -9396,18 +9282,6 @@ packages: resolution: {integrity: sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==} dev: false - /classic-level@1.3.0: - resolution: {integrity: sha512-iwFAJQYtqRTRM0F6L8h4JCt00ZSGdOyqh7yVrhhjrOpFhmBjNlRUey64MCiyo6UmQHMJ+No3c81nujPv+n9yrg==} - engines: {node: '>=12'} - requiresBuild: true - dependencies: - abstract-level: 1.0.3 - catering: 2.1.1 - module-error: 1.0.2 - napi-macros: 2.2.2 - node-gyp-build: 4.7.0 - dev: true - /classnames@2.5.1: resolution: {integrity: sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==} dev: false @@ -9863,12 +9737,6 @@ packages: underscore: 1.13.6 dev: false - /crc-32@1.2.2: - resolution: {integrity: sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==} - engines: {node: '>=0.8'} - hasBin: true - dev: true - /create-ecdh@4.0.4: resolution: {integrity: sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==} dependencies: @@ -13551,14 +13419,14 @@ packages: har-schema: 2.0.0 dev: false - /hardhat-contract-sizer@2.10.0(hardhat@2.19.1): + /hardhat-contract-sizer@2.10.0(hardhat@2.22.3): resolution: {integrity: sha512-QiinUgBD5MqJZJh1hl1jc9dNnpJg7eE/w4/4GEnrcmZJJTDbVFNe3+/3Ep24XqISSkYxRz36czcPHKHd/a0dwA==} peerDependencies: hardhat: ^2.0.0 dependencies: chalk: 4.1.2 cli-table3: 0.6.3 - hardhat: 2.19.1(ts-node@10.9.1)(typescript@5.3.2) + hardhat: 2.22.3(ts-node@10.9.1)(typescript@5.3.2) strip-ansi: 6.0.1 dev: true @@ -13595,14 +13463,14 @@ packages: - utf-8-validate dev: true - /hardhat-gas-reporter@1.0.9(hardhat@2.19.1): + /hardhat-gas-reporter@1.0.9(hardhat@2.22.3): resolution: {integrity: sha512-INN26G3EW43adGKBNzYWOlI3+rlLnasXTwW79YNnUhXPDa+yHESgt639dJEs37gCjhkbNKcRRJnomXEuMFBXJg==} peerDependencies: hardhat: ^2.0.2 dependencies: array-uniq: 1.0.3 eth-gas-reporter: 0.2.27 - hardhat: 2.19.1(ts-node@10.9.1)(typescript@5.3.2) + hardhat: 2.22.3(ts-node@10.9.1)(typescript@5.3.2) sha1: 1.1.1 transitivePeerDependencies: - '@codechecks/client' @@ -13611,8 +13479,8 @@ packages: - utf-8-validate dev: true - /hardhat@2.19.1(ts-node@10.9.1)(typescript@5.3.2): - resolution: {integrity: sha512-bsWa63g1GB78ZyMN08WLhFElLPA+J+pShuKD1BFO2+88g3l+BL3R07vj9deIi9dMbssxgE714Gof1dBEDGqnCw==} + /hardhat@2.22.3(ts-node@10.9.1)(typescript@5.3.2): + resolution: {integrity: sha512-k8JV2ECWNchD6ahkg2BR5wKVxY0OiKot7fuxiIpRK0frRqyOljcR2vKwgWSLw6YIeDcNNA4xybj7Og7NSxr2hA==} hasBin: true peerDependencies: ts-node: '*' @@ -13625,16 +13493,10 @@ packages: dependencies: '@ethersproject/abi': 5.7.0 '@metamask/eth-sig-util': 4.0.1 - '@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.7 + '@nomicfoundation/ethereumjs-common': 4.0.4 + '@nomicfoundation/ethereumjs-tx': 5.0.4 + '@nomicfoundation/ethereumjs-util': 9.0.4 '@nomicfoundation/solidity-analyzer': 0.1.1 '@sentry/node': 5.30.0 '@types/bn.js': 5.1.5 @@ -13642,6 +13504,7 @@ packages: adm-zip: 0.4.16 aggregate-error: 3.1.0 ansi-escapes: 4.3.2 + boxen: 5.1.2 chalk: 2.4.2 chokidar: 3.5.3 ci-info: 2.0.0 @@ -13675,6 +13538,7 @@ packages: ws: 7.5.9 transitivePeerDependencies: - bufferutil + - c-kzg - supports-color - utf-8-validate dev: true @@ -14247,6 +14111,7 @@ packages: /is-buffer@2.0.5: resolution: {integrity: sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==} engines: {node: '>=4'} + dev: false /is-callable@1.2.7: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} @@ -15189,10 +15054,6 @@ packages: resolution: {integrity: sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ==} dev: true - /js-sdsl@4.4.2: - resolution: {integrity: sha512-dwXFwByc/ajSV6m5bcKAPwe4yDDF6D614pxmIi5odytzxRlwqF6nwoiCek80Ixc7Cvma5awClxrzFtxCQvcM8w==} - dev: true - /js-sha3@0.5.7: resolution: {integrity: sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==} dev: false @@ -15397,27 +15258,6 @@ packages: dependencies: package-json: 8.1.1 - /level-supports@4.0.1: - resolution: {integrity: sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA==} - engines: {node: '>=12'} - dev: true - - /level-transcoder@1.0.1: - resolution: {integrity: sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w==} - engines: {node: '>=12'} - dependencies: - buffer: 6.0.3 - module-error: 1.0.2 - dev: true - - /level@8.0.0: - resolution: {integrity: sha512-ypf0jjAk2BWI33yzEaaotpq7fkOPALKAgDBxggO6Q9HGX2MRXn0wbP1Jn/tJv1gtL867+YOjOB49WaUF3UoJNQ==} - engines: {node: '>=12'} - dependencies: - browser-level: 1.0.1 - classic-level: 1.3.0 - dev: true - /leven@3.1.0: resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} engines: {node: '>=6'} @@ -15801,11 +15641,6 @@ packages: wabt: 1.0.24 dev: true - /mcl-wasm@0.7.9: - resolution: {integrity: sha512-iJIUcQWA88IJB/5L15GnJVnSQJmf/YaxxV6zRavv83HILHaJQb6y0iFyDMdDO0gN8X37tdxmAOrH/P8B6RB8sQ==} - engines: {node: '>=8.9.0'} - dev: true - /md5.js@1.3.5: resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==} dependencies: @@ -15848,15 +15683,6 @@ packages: next-tick: 1.1.0 timers-ext: 0.1.7 - /memory-level@1.0.0: - resolution: {integrity: sha512-UXzwewuWeHBz5krr7EvehKcmLFNoXxGcvuYhC41tRnkrTbJohtS7kVn9akmgirtRygg+f7Yjsfi8Uu5SGSQ4Og==} - engines: {node: '>=12'} - dependencies: - abstract-level: 1.0.3 - functional-red-black-tree: 1.0.1 - module-error: 1.0.2 - dev: true - /memorystream@0.3.1: resolution: {integrity: sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==} engines: {node: '>= 0.10.0'} @@ -16155,11 +15981,6 @@ packages: resolution: {integrity: sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw==} dev: false - /module-error@1.0.2: - resolution: {integrity: sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA==} - engines: {node: '>=10'} - dev: true - /moment@2.29.4: resolution: {integrity: sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==} @@ -16310,10 +16131,6 @@ packages: resolution: {integrity: sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==} requiresBuild: true - /napi-macros@2.2.2: - resolution: {integrity: sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g==} - dev: true - /native-abort-controller@1.0.4(abort-controller@3.0.0): resolution: {integrity: sha512-zp8yev7nxczDJMoP6pDxyD20IU0T22eX8VwN2ztDccKvSZhRaV33yP1BGwKSZfXuqWUzsXopVFjBdau9OOAwMQ==} peerDependencies: @@ -18565,21 +18382,11 @@ packages: resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} engines: {node: '>=0.12.0'} - /run-parallel-limit@1.1.0: - resolution: {integrity: sha512-jJA7irRNM91jaKc3Hcl1npHsFLOXOoTkPCUL1JEa1R82O2miplXXRaGdjW/KM/98YQWDhJLiSs793CnXfblJUw==} - dependencies: - queue-microtask: 1.2.3 - dev: true - /run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} dependencies: queue-microtask: 1.2.3 - /rustbn.js@0.2.0: - resolution: {integrity: sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA==} - dev: true - /rxjs@6.6.7: resolution: {integrity: sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==} engines: {npm: '>=2.0.0'} @@ -19059,7 +18866,7 @@ packages: resolution: {integrity: sha512-wciNMLg/Irp8OKGrh3S2tfvZiZ0NEyILfcRCXCD4mp7SgK/i9gzLfhY2hY7VMCQJ3kH9UB9BzNdibIVMchzyYw==} dev: true - /solidity-coverage@0.8.5(hardhat@2.19.1): + /solidity-coverage@0.8.5(hardhat@2.22.3): resolution: {integrity: sha512-6C6N6OV2O8FQA0FWA95FdzVH+L16HU94iFgg5wAFZ29UpLFkgNI/DRR2HotG1bC0F4gAc/OMs2BJI44Q/DYlKQ==} hasBin: true peerDependencies: @@ -19075,7 +18882,7 @@ packages: ghost-testrpc: 0.0.2 global-modules: 2.0.0 globby: 10.0.2 - hardhat: 2.19.1(ts-node@10.9.1)(typescript@5.3.2) + hardhat: 2.22.3(ts-node@10.9.1)(typescript@5.3.2) jsonschema: 1.4.1 lodash: 4.17.21 mocha: 10.2.0 @@ -19090,13 +18897,13 @@ packages: - supports-color dev: true - /solidity-docgen@0.6.0-beta.36(hardhat@2.19.1): + /solidity-docgen@0.6.0-beta.36(hardhat@2.22.3): resolution: {integrity: sha512-f/I5G2iJgU1h0XrrjRD0hHMr7C10u276vYvm//rw1TzFcYQ4xTOyAoi9oNAHRU0JU4mY9eTuxdVc2zahdMuhaQ==} peerDependencies: hardhat: ^2.8.0 dependencies: handlebars: 4.7.8 - hardhat: 2.19.1(ts-node@10.9.1)(typescript@5.3.2) + hardhat: 2.22.3(ts-node@10.9.1)(typescript@5.3.2) solidity-ast: 0.4.53 dev: true diff --git a/solidity/package.json b/solidity/package.json index b34e4bbc9..2a671ba0f 100644 --- a/solidity/package.json +++ b/solidity/package.json @@ -50,7 +50,7 @@ "dotenv-safer": "^1.0.0", "eslint": "^8.54.0", "ethers": "^6.8.1", - "hardhat": "^2.19.1", + "hardhat": "^2.22.3", "hardhat-contract-sizer": "^2.10.0", "hardhat-deploy": "^0.11.43", "hardhat-gas-reporter": "^1.0.9", From 10c24e46c8b92d7952aba3eb3ed6baadad669fe7 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Fri, 10 May 2024 09:39:38 +0200 Subject: [PATCH 4/5] Upgrading and pinning solidity compiler to 0.8.24 This is one to the latest version of Solidity compiler. It is best practice to stick with a fixed version so that the code is tested against concrete compiler. --- solidity/contracts/BitcoinDepositor.sol | 2 +- solidity/contracts/BitcoinRedeemer.sol | 2 +- solidity/contracts/MezoAllocator.sol | 2 +- solidity/contracts/PausableOwnable.sol | 2 +- solidity/contracts/bridge/ITBTCToken.sol | 2 +- solidity/contracts/interfaces/IDispatcher.sol | 2 +- solidity/contracts/lib/ERC4626Fees.sol | 2 +- solidity/contracts/stBTC.sol | 2 +- solidity/contracts/test/BitcoinDepositorHarness.sol | 2 +- solidity/contracts/test/MezoPortalStub.sol | 2 +- solidity/contracts/test/TestERC20.sol | 2 +- solidity/contracts/test/TestTBTC.sol | 2 +- solidity/contracts/test/upgrades/BitcoinDepositorV2.sol | 2 +- solidity/contracts/test/upgrades/MezoAllocatorV2.sol | 2 +- solidity/contracts/test/upgrades/stBTCV2.sol | 2 +- solidity/contracts/utils/Errors.sol | 2 +- solidity/hardhat.config.ts | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/solidity/contracts/BitcoinDepositor.sol b/solidity/contracts/BitcoinDepositor.sol index 5d85de173..f528a27c8 100644 --- a/solidity/contracts/BitcoinDepositor.sol +++ b/solidity/contracts/BitcoinDepositor.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-only -pragma solidity 0.8.21; +pragma solidity 0.8.24; import "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol"; import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; diff --git a/solidity/contracts/BitcoinRedeemer.sol b/solidity/contracts/BitcoinRedeemer.sol index f18f3ccd0..a8adc3b24 100644 --- a/solidity/contracts/BitcoinRedeemer.sol +++ b/solidity/contracts/BitcoinRedeemer.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-only -pragma solidity 0.8.21; +pragma solidity 0.8.24; import "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol"; diff --git a/solidity/contracts/MezoAllocator.sol b/solidity/contracts/MezoAllocator.sol index 2dabcb125..2f4c4bb29 100644 --- a/solidity/contracts/MezoAllocator.sol +++ b/solidity/contracts/MezoAllocator.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-only -pragma solidity 0.8.21; +pragma solidity 0.8.24; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; diff --git a/solidity/contracts/PausableOwnable.sol b/solidity/contracts/PausableOwnable.sol index 7ef8d6201..5cbb4a64c 100644 --- a/solidity/contracts/PausableOwnable.sol +++ b/solidity/contracts/PausableOwnable.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-only -pragma solidity 0.8.21; +pragma solidity 0.8.24; import "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol"; diff --git a/solidity/contracts/bridge/ITBTCToken.sol b/solidity/contracts/bridge/ITBTCToken.sol index d533d2a04..f02427a62 100644 --- a/solidity/contracts/bridge/ITBTCToken.sol +++ b/solidity/contracts/bridge/ITBTCToken.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-only -pragma solidity 0.8.21; +pragma solidity 0.8.24; /// @title Interface of TBTC token contract. /// @notice This interface defines functions of TBTC token contract used by Acre diff --git a/solidity/contracts/interfaces/IDispatcher.sol b/solidity/contracts/interfaces/IDispatcher.sol index 956915b56..16fc3cfac 100644 --- a/solidity/contracts/interfaces/IDispatcher.sol +++ b/solidity/contracts/interfaces/IDispatcher.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-only -pragma solidity 0.8.21; +pragma solidity 0.8.24; /// @title IDispatcher /// @notice Interface for the Dispatcher contract. diff --git a/solidity/contracts/lib/ERC4626Fees.sol b/solidity/contracts/lib/ERC4626Fees.sol index 4039ad36d..acf0a70a2 100644 --- a/solidity/contracts/lib/ERC4626Fees.sol +++ b/solidity/contracts/lib/ERC4626Fees.sol @@ -2,7 +2,7 @@ // Inspired by https://docs.openzeppelin.com/contracts/5.x/erc4626#fees -pragma solidity 0.8.21; +pragma solidity 0.8.24; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {ERC4626Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC4626Upgradeable.sol"; diff --git a/solidity/contracts/stBTC.sol b/solidity/contracts/stBTC.sol index f492e917b..302396a4e 100644 --- a/solidity/contracts/stBTC.sol +++ b/solidity/contracts/stBTC.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-only -pragma solidity 0.8.21; +pragma solidity 0.8.24; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; diff --git a/solidity/contracts/test/BitcoinDepositorHarness.sol b/solidity/contracts/test/BitcoinDepositorHarness.sol index 4e9540628..150eb043c 100644 --- a/solidity/contracts/test/BitcoinDepositorHarness.sol +++ b/solidity/contracts/test/BitcoinDepositorHarness.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-3.0-only /* solhint-disable func-name-mixedcase */ -pragma solidity 0.8.21; +pragma solidity 0.8.24; import {BitcoinDepositor} from "../BitcoinDepositor.sol"; import {MockBridge, MockTBTCVault} from "@keep-network/tbtc-v2/contracts/test/TestTBTCDepositor.sol"; diff --git a/solidity/contracts/test/MezoPortalStub.sol b/solidity/contracts/test/MezoPortalStub.sol index 44734feaf..17950a727 100644 --- a/solidity/contracts/test/MezoPortalStub.sol +++ b/solidity/contracts/test/MezoPortalStub.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0 -pragma solidity 0.8.21; +pragma solidity 0.8.24; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; diff --git a/solidity/contracts/test/TestERC20.sol b/solidity/contracts/test/TestERC20.sol index e563878cc..7c54708df 100644 --- a/solidity/contracts/test/TestERC20.sol +++ b/solidity/contracts/test/TestERC20.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-only -pragma solidity 0.8.21; +pragma solidity 0.8.24; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; diff --git a/solidity/contracts/test/TestTBTC.sol b/solidity/contracts/test/TestTBTC.sol index 4cad1b0b4..f9dd9d689 100644 --- a/solidity/contracts/test/TestTBTC.sol +++ b/solidity/contracts/test/TestTBTC.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-only -pragma solidity 0.8.21; +pragma solidity 0.8.24; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "../bridge/ITBTCToken.sol"; diff --git a/solidity/contracts/test/upgrades/BitcoinDepositorV2.sol b/solidity/contracts/test/upgrades/BitcoinDepositorV2.sol index 1f34999e0..7c0ffee5f 100644 --- a/solidity/contracts/test/upgrades/BitcoinDepositorV2.sol +++ b/solidity/contracts/test/upgrades/BitcoinDepositorV2.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-only -pragma solidity 0.8.21; +pragma solidity 0.8.24; import "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol"; import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; diff --git a/solidity/contracts/test/upgrades/MezoAllocatorV2.sol b/solidity/contracts/test/upgrades/MezoAllocatorV2.sol index a2893d0b7..6dfd796a6 100644 --- a/solidity/contracts/test/upgrades/MezoAllocatorV2.sol +++ b/solidity/contracts/test/upgrades/MezoAllocatorV2.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-only -pragma solidity 0.8.21; +pragma solidity 0.8.24; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; diff --git a/solidity/contracts/test/upgrades/stBTCV2.sol b/solidity/contracts/test/upgrades/stBTCV2.sol index ed9a9939e..19293b67f 100644 --- a/solidity/contracts/test/upgrades/stBTCV2.sol +++ b/solidity/contracts/test/upgrades/stBTCV2.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-only -pragma solidity 0.8.21; +pragma solidity 0.8.24; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; diff --git a/solidity/contracts/utils/Errors.sol b/solidity/contracts/utils/Errors.sol index 2fbc28545..0f8fbf9d4 100644 --- a/solidity/contracts/utils/Errors.sol +++ b/solidity/contracts/utils/Errors.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-only -pragma solidity 0.8.21; +pragma solidity 0.8.24; error ZeroAddress(); diff --git a/solidity/hardhat.config.ts b/solidity/hardhat.config.ts index 63492ed72..6fc3515e1 100644 --- a/solidity/hardhat.config.ts +++ b/solidity/hardhat.config.ts @@ -32,7 +32,7 @@ const config: HardhatUserConfig = { solidity: { compilers: [ { - version: "0.8.21", + version: "0.8.24", settings: { optimizer: { enabled: true, From 7f8ccdb5ff30738d6bbd7eefdf729ddf6437abe7 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Fri, 10 May 2024 11:21:27 +0200 Subject: [PATCH 5/5] Adding missing check for ownership of tBTC token Added a missing check for ownership of tBTC token when updating the tbtcVault address. --- solidity/contracts/BitcoinRedeemer.sol | 7 +++++++ solidity/test/BitcoinRedeemer.test.ts | 12 +++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/solidity/contracts/BitcoinRedeemer.sol b/solidity/contracts/BitcoinRedeemer.sol index ca3b31e8c..9ba2c33d5 100644 --- a/solidity/contracts/BitcoinRedeemer.sol +++ b/solidity/contracts/BitcoinRedeemer.sol @@ -61,6 +61,9 @@ contract BitcoinRedeemer is Ownable2StepUpgradeable, IReceiveApproval { /// Reverts when approveAndCall to tBTC contract fails. error ApproveAndCallFailed(); + /// Reverts if the new TBTCVault contract is not tBTC token owner. + error NotTbtcTokenOwner(); + /// @custom:oz-upgrades-unsafe-allow constructor constructor() { _disableInitializers(); @@ -118,6 +121,10 @@ contract BitcoinRedeemer is Ownable2StepUpgradeable, IReceiveApproval { revert ZeroAddress(); } + if (newTbtcVault != tbtcToken.owner()) { + revert NotTbtcTokenOwner(); + } + emit TbtcVaultUpdated(tbtcVault, newTbtcVault); tbtcVault = newTbtcVault; diff --git a/solidity/test/BitcoinRedeemer.test.ts b/solidity/test/BitcoinRedeemer.test.ts index afff4d2b0..75014173b 100644 --- a/solidity/test/BitcoinRedeemer.test.ts +++ b/solidity/test/BitcoinRedeemer.test.ts @@ -442,7 +442,16 @@ describe("BitcoinRedeemer", () => { }) }) - context("when a new treasury is an allowed address", () => { + context("when a new tbtc vault is not tBTC token owner", () => { + it("should revert", async () => { + const newTbtcVault = await ethers.Wallet.createRandom().getAddress() + await expect( + bitcoinRedeemer.connect(governance).updateTbtcVault(newTbtcVault), + ).to.be.revertedWithCustomError(bitcoinRedeemer, "NotTbtcTokenOwner") + }) + }) + + context("when a new tbtc vault is an allowed address", () => { let oldTbtcVault: string let newTbtcVault: string let tx: ContractTransactionResponse @@ -450,6 +459,7 @@ describe("BitcoinRedeemer", () => { before(async () => { oldTbtcVault = await bitcoinRedeemer.tbtcVault() newTbtcVault = await ethers.Wallet.createRandom().getAddress() + await tbtc.setOwner(newTbtcVault) tx = await bitcoinRedeemer .connect(governance)