diff --git a/core/contracts/Dispatcher.sol b/core/contracts/Dispatcher.sol deleted file mode 100644 index ec1696239..000000000 --- a/core/contracts/Dispatcher.sol +++ /dev/null @@ -1,174 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity ^0.8.21; - -import "@openzeppelin/contracts/access/Ownable2Step.sol"; -import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; -import "@openzeppelin/contracts/interfaces/IERC4626.sol"; -import "./Router.sol"; -import "./stBTC.sol"; - -/// @title Dispatcher -/// @notice Dispatcher is a contract that routes tBTC from stBTC to -/// yield vaults and back. Vaults supply yield strategies with tBTC that -/// generate yield for Bitcoin holders. -contract Dispatcher is Router, Ownable2Step { - using SafeERC20 for IERC20; - - /// Struct holds information about a vault. - struct VaultInfo { - bool authorized; - } - - /// The main stBTC contract holding tBTC deposited by stakers. - stBTC public immutable stbtc; - /// tBTC token contract. - IERC20 public immutable tbtc; - /// Address of the maintainer bot. - address public maintainer; - - /// Authorized Yield Vaults that implement ERC4626 standard. These - /// vaults deposit assets to yield strategies, e.g. Uniswap V3 - /// WBTC/TBTC pool. Vault can be a part of Acre ecosystem or can be - /// implemented externally. As long as it complies with ERC4626 - /// standard and is authorized by the owner it can be plugged into - /// Acre. - address[] public vaults; - /// Mapping of vaults to their information. - mapping(address => VaultInfo) public vaultsInfo; - - /// Emitted when a vault is authorized. - /// @param vault Address of the vault. - event VaultAuthorized(address indexed vault); - - /// Emitted when a vault is deauthorized. - /// @param vault Address of the vault. - event VaultDeauthorized(address indexed vault); - - /// Emitted when tBTC is routed to a vault. - /// @param vault Address of the vault. - /// @param amount Amount of tBTC. - /// @param sharesOut Amount of received shares. - event DepositAllocated( - address indexed vault, - uint256 amount, - uint256 sharesOut - ); - - /// Emitted when the maintainer address is updated. - /// @param maintainer Address of the new maintainer. - event MaintainerUpdated(address indexed maintainer); - - /// Reverts if the vault is already authorized. - error VaultAlreadyAuthorized(); - - /// Reverts if the vault is not authorized. - error VaultUnauthorized(); - - /// Reverts if the caller is not the maintainer. - error NotMaintainer(); - - /// Reverts if the address is zero. - error ZeroAddress(); - - /// Modifier that reverts if the caller is not the maintainer. - modifier onlyMaintainer() { - if (msg.sender != maintainer) { - revert NotMaintainer(); - } - _; - } - - constructor(stBTC _stbtc, IERC20 _tbtc) Ownable(msg.sender) { - stbtc = _stbtc; - tbtc = _tbtc; - } - - /// @notice Adds a vault to the list of authorized vaults. - /// @param vault Address of the vault to add. - function authorizeVault(address vault) external onlyOwner { - if (isVaultAuthorized(vault)) { - revert VaultAlreadyAuthorized(); - } - - vaults.push(vault); - vaultsInfo[vault].authorized = true; - - emit VaultAuthorized(vault); - } - - /// @notice Removes a vault from the list of authorized vaults. - /// @param vault Address of the vault to remove. - function deauthorizeVault(address vault) external onlyOwner { - if (!isVaultAuthorized(vault)) { - revert VaultUnauthorized(); - } - - vaultsInfo[vault].authorized = false; - - for (uint256 i = 0; i < vaults.length; i++) { - if (vaults[i] == vault) { - vaults[i] = vaults[vaults.length - 1]; - // slither-disable-next-line costly-loop - vaults.pop(); - break; - } - } - - emit VaultDeauthorized(vault); - } - - /// @notice Updates the maintainer address. - /// @param newMaintainer Address of the new maintainer. - function updateMaintainer(address newMaintainer) external onlyOwner { - if (newMaintainer == address(0)) { - revert ZeroAddress(); - } - - maintainer = newMaintainer; - - emit MaintainerUpdated(maintainer); - } - - /// TODO: make this function internal once the allocation distribution is - /// implemented - /// @notice Routes tBTC from stBTC to a vault. Can be called by the maintainer - /// only. - /// @param vault Address of the vault to route the assets to. - /// @param amount Amount of tBTC to deposit. - /// @param minSharesOut Minimum amount of shares to receive. - function depositToVault( - address vault, - uint256 amount, - uint256 minSharesOut - ) public onlyMaintainer { - if (!isVaultAuthorized(vault)) { - revert VaultUnauthorized(); - } - - // slither-disable-next-line arbitrary-send-erc20 - tbtc.safeTransferFrom(address(stbtc), address(this), amount); - tbtc.forceApprove(address(vault), amount); - - uint256 sharesOut = deposit( - IERC4626(vault), - address(stbtc), - amount, - minSharesOut - ); - // slither-disable-next-line reentrancy-events - emit DepositAllocated(vault, amount, sharesOut); - } - - /// @notice Returns the list of authorized vaults. - function getVaults() public view returns (address[] memory) { - return vaults; - } - - /// @notice Returns true if the vault is authorized. - /// @param vault Address of the vault to check. - function isVaultAuthorized(address vault) public view returns (bool) { - return vaultsInfo[vault].authorized; - } - - /// TODO: implement redeem() / withdraw() functions -} diff --git a/core/contracts/Router.sol b/core/contracts/Router.sol deleted file mode 100644 index f726264de..000000000 --- a/core/contracts/Router.sol +++ /dev/null @@ -1,37 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity ^0.8.21; - -import "@openzeppelin/contracts/interfaces/IERC4626.sol"; - -/// @title Router -/// @notice Router is a contract that routes tBTC from stBTC to -/// a given vault and back. Vaults supply yield strategies with tBTC that -/// generate yield for Bitcoin holders. -abstract contract Router { - /// Thrown when amount of shares received is below the min set by caller. - /// @param vault Address of the vault. - /// @param sharesOut Amount of received shares. - /// @param minSharesOut Minimum amount of shares expected to receive. - error MinSharesError( - address vault, - uint256 sharesOut, - uint256 minSharesOut - ); - - /// @notice Routes funds from stBTC to a vault. The amount of tBTC to - /// Shares of deposited tBTC are minted to the stBTC contract. - /// @param vault Address of the vault to route the funds to. - /// @param receiver Address of the receiver of the shares. - /// @param amount Amount of tBTC to deposit. - /// @param minSharesOut Minimum amount of shares to receive. - function deposit( - IERC4626 vault, - address receiver, - uint256 amount, - uint256 minSharesOut - ) internal returns (uint256 sharesOut) { - if ((sharesOut = vault.deposit(amount, receiver)) < minSharesOut) { - revert MinSharesError(address(vault), sharesOut, minSharesOut); - } - } -} diff --git a/core/contracts/stBTC.sol b/core/contracts/stBTC.sol index 0b3e27a05..976b67813 100644 --- a/core/contracts/stBTC.sol +++ b/core/contracts/stBTC.sol @@ -5,7 +5,6 @@ import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@thesis-co/solidity-contracts/contracts/token/IReceiveApproval.sol"; -import "./Dispatcher.sol"; import "./PausableOwnable.sol"; import "./lib/ERC4626Fees.sol"; import "./interfaces/IDispatcher.sol"; diff --git a/core/contracts/test/TestERC4626.sol b/core/contracts/test/TestERC4626.sol deleted file mode 100644 index acf09928e..000000000 --- a/core/contracts/test/TestERC4626.sol +++ /dev/null @@ -1,12 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity ^0.8.21; - -import "@openzeppelin/contracts/token/ERC20/extensions/ERC4626.sol"; - -contract TestERC4626 is ERC4626 { - constructor( - IERC20 asset, - string memory tokenName, - string memory tokenSymbol - ) ERC4626(asset) ERC20(tokenName, tokenSymbol) {} -} diff --git a/core/contracts/test/upgrades/stBTCV2.sol b/core/contracts/test/upgrades/stBTCV2.sol index 85c29e96e..cb5d655f7 100644 --- a/core/contracts/test/upgrades/stBTCV2.sol +++ b/core/contracts/test/upgrades/stBTCV2.sol @@ -5,9 +5,9 @@ import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@thesis-co/solidity-contracts/contracts/token/IReceiveApproval.sol"; -import "../../Dispatcher.sol"; import "../../PausableOwnable.sol"; import "../../lib/ERC4626Fees.sol"; +import "../../interfaces/IDispatcher.sol"; import {ZeroAddress} from "../../utils/Errors.sol"; /// @title stBTCV2 @@ -17,7 +17,7 @@ contract stBTCV2 is ERC4626Fees, PausableOwnable { using SafeERC20 for IERC20; /// Dispatcher contract that routes tBTC from stBTC to a given vault and back. - Dispatcher public dispatcher; + IDispatcher public dispatcher; /// Address of the treasury wallet, where fees should be transferred to. address public treasury; @@ -119,7 +119,7 @@ contract stBTCV2 is ERC4626Fees, PausableOwnable { /// @notice Updates the dispatcher contract and gives it an unlimited /// allowance to transfer staked tBTC. /// @param newDispatcher Address of the new dispatcher contract. - function updateDispatcher(Dispatcher newDispatcher) external onlyOwner { + function updateDispatcher(IDispatcher newDispatcher) external onlyOwner { if (address(newDispatcher) == address(0)) { revert ZeroAddress(); } diff --git a/core/deploy/00_resolve_testing_erc4626.ts b/core/deploy/00_resolve_testing_erc4626.ts deleted file mode 100644 index c49346b06..000000000 --- a/core/deploy/00_resolve_testing_erc4626.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type { HardhatRuntimeEnvironment } from "hardhat/types" -import type { DeployFunction } from "hardhat-deploy/types" -import { waitConfirmationsNumber } from "../helpers/deployment" - -const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { - const { getNamedAccounts, deployments } = hre - const { log } = deployments - const { deployer } = await getNamedAccounts() - const tBTC = await deployments.get("TBTC") - - log("deploying Mock ERC4626 Vault") - - await deployments.deploy("Vault", { - contract: "TestERC4626", - from: deployer, - args: [tBTC.address, "MockVault", "MV"], - log: true, - waitConfirmations: waitConfirmationsNumber(hre), - }) -} - -export default func - -func.tags = ["TestERC4626"] -func.dependencies = ["TBTC"] - -func.skip = async (hre: HardhatRuntimeEnvironment): Promise => - Promise.resolve( - hre.network.name === "mainnet" || hre.network.name === "sepolia", - ) diff --git a/core/deploy/02_deploy_dispatcher.ts b/core/deploy/02_deploy_dispatcher.ts deleted file mode 100644 index 4473531e9..000000000 --- a/core/deploy/02_deploy_dispatcher.ts +++ /dev/null @@ -1,29 +0,0 @@ -import type { HardhatRuntimeEnvironment } from "hardhat/types" -import type { DeployFunction } from "hardhat-deploy/types" -import { waitConfirmationsNumber } from "../helpers/deployment" - -const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { - const { getNamedAccounts, deployments, helpers } = hre - const { deployer } = await getNamedAccounts() - - const tbtc = await deployments.get("TBTC") - const stbtc = await deployments.get("stBTC") - - const dispatcher = await deployments.deploy("Dispatcher", { - from: deployer, - args: [stbtc.address, tbtc.address], - log: true, - waitConfirmations: waitConfirmationsNumber(hre), - }) - - if (hre.network.tags.etherscan) { - await helpers.etherscan.verify(dispatcher) - } - - // TODO: Add Tenderly verification -} - -export default func - -func.tags = ["Dispatcher"] -func.dependencies = ["stBTC"] diff --git a/core/deploy/12_mezo_allocator_update_maintainer.ts b/core/deploy/12_mezo_allocator_update_maintainer.ts index 5eb82de37..3d1bd2c5f 100644 --- a/core/deploy/12_mezo_allocator_update_maintainer.ts +++ b/core/deploy/12_mezo_allocator_update_maintainer.ts @@ -20,5 +20,5 @@ const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { export default func +func.dependencies = ["MezoAllocator"] func.tags = ["MezoAllocatorAddMaintainer"] -func.dependencies = ["Dispatcher"] diff --git a/core/deploy/22_transfer_ownership_dispatcher.ts b/core/deploy/22_transfer_ownership_dispatcher.ts deleted file mode 100644 index 427cf388e..000000000 --- a/core/deploy/22_transfer_ownership_dispatcher.ts +++ /dev/null @@ -1,31 +0,0 @@ -import type { HardhatRuntimeEnvironment } from "hardhat/types" -import type { DeployFunction } from "hardhat-deploy/types" - -const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { - const { getNamedAccounts, deployments } = hre - const { deployer, governance } = await getNamedAccounts() - const { log } = deployments - - log(`transferring ownership of Dispatcher contract to ${governance}`) - - await deployments.execute( - "Dispatcher", - { from: deployer, log: true, waitConfirmations: 1 }, - "transferOwnership", - governance, - ) - - if (hre.network.name !== "mainnet") { - await deployments.execute( - "Dispatcher", - { from: governance, log: true, waitConfirmations: 1 }, - "acceptOwnership", - ) - } -} - -export default func - -func.tags = ["TransferOwnershipDispatcher"] -func.dependencies = ["Dispatcher"] -func.runAtTheEnd = true diff --git a/core/test/Dispatcher.test.ts b/core/test/Dispatcher.test.ts deleted file mode 100644 index dfe7dba92..000000000 --- a/core/test/Dispatcher.test.ts +++ /dev/null @@ -1,342 +0,0 @@ -import { ethers, helpers } from "hardhat" -import { HardhatEthersSigner } from "@nomicfoundation/hardhat-ethers/signers" -import { expect } from "chai" -import { loadFixture } from "@nomicfoundation/hardhat-toolbox/network-helpers" - -import { ContractTransactionResponse, ZeroAddress } from "ethers" -import { - beforeAfterEachSnapshotWrapper, - beforeAfterSnapshotWrapper, - deployment, -} from "./helpers" - -import { - Dispatcher, - TestERC4626, - StBTC as stBTC, - TestERC20, -} from "../typechain" - -import { to1e18 } from "./utils" - -const { getNamedSigners, getUnnamedSigners } = helpers.signers - -async function fixture() { - const { tbtc, stbtc, dispatcher, vault } = await deployment() - const { governance, maintainer } = await getNamedSigners() - const [thirdParty] = await getUnnamedSigners() - - return { dispatcher, governance, thirdParty, maintainer, vault, tbtc, stbtc } -} -// TODO: Remove these tests once Distpather contract is removed from the project. -describe.skip("Dispatcher", () => { - let dispatcher: Dispatcher - let vault: TestERC4626 - let tbtc: TestERC20 - let stbtc: stBTC - - let governance: HardhatEthersSigner - let thirdParty: HardhatEthersSigner - let maintainer: HardhatEthersSigner - let vaultAddress1: string - let vaultAddress2: string - let vaultAddress3: string - let vaultAddress4: string - - before(async () => { - ;({ dispatcher, governance, thirdParty, maintainer, vault, tbtc, stbtc } = - await loadFixture(fixture)) - - vaultAddress1 = await ethers.Wallet.createRandom().getAddress() - vaultAddress2 = await ethers.Wallet.createRandom().getAddress() - vaultAddress3 = await ethers.Wallet.createRandom().getAddress() - vaultAddress4 = await ethers.Wallet.createRandom().getAddress() - }) - - describe("authorizeVault", () => { - beforeAfterSnapshotWrapper() - - context("when caller is not a governance account", () => { - beforeAfterSnapshotWrapper() - - it("should revert when adding a vault", async () => { - await expect( - dispatcher.connect(thirdParty).authorizeVault(vaultAddress1), - ) - .to.be.revertedWithCustomError( - dispatcher, - "OwnableUnauthorizedAccount", - ) - .withArgs(thirdParty.address) - }) - }) - - context("when caller is a governance account", () => { - beforeAfterSnapshotWrapper() - - let tx: ContractTransactionResponse - - before(async () => { - tx = await dispatcher.connect(governance).authorizeVault(vaultAddress1) - await dispatcher.connect(governance).authorizeVault(vaultAddress2) - await dispatcher.connect(governance).authorizeVault(vaultAddress3) - }) - - it("should authorize vaults", async () => { - expect(await dispatcher.vaults(0)).to.equal(vaultAddress1) - expect(await dispatcher.vaultsInfo(vaultAddress1)).to.be.equal(true) - - expect(await dispatcher.vaults(1)).to.equal(vaultAddress2) - expect(await dispatcher.vaultsInfo(vaultAddress2)).to.be.equal(true) - - expect(await dispatcher.vaults(2)).to.equal(vaultAddress3) - expect(await dispatcher.vaultsInfo(vaultAddress3)).to.be.equal(true) - }) - - it("should not authorize the same vault twice", async () => { - await expect( - dispatcher.connect(governance).authorizeVault(vaultAddress1), - ).to.be.revertedWithCustomError(dispatcher, "VaultAlreadyAuthorized") - }) - - it("should emit an event when adding a vault", async () => { - await expect(tx) - .to.emit(dispatcher, "VaultAuthorized") - .withArgs(vaultAddress1) - }) - }) - }) - - describe("deauthorizeVault", () => { - beforeAfterSnapshotWrapper() - - before(async () => { - await dispatcher.connect(governance).authorizeVault(vaultAddress1) - await dispatcher.connect(governance).authorizeVault(vaultAddress2) - await dispatcher.connect(governance).authorizeVault(vaultAddress3) - }) - - context("when caller is not a governance account", () => { - it("should revert when adding a vault", async () => { - await expect( - dispatcher.connect(thirdParty).deauthorizeVault(vaultAddress1), - ) - .to.be.revertedWithCustomError( - dispatcher, - "OwnableUnauthorizedAccount", - ) - .withArgs(thirdParty.address) - }) - }) - - context("when caller is a governance account", () => { - beforeAfterEachSnapshotWrapper() - - it("should deauthorize vaults", async () => { - await dispatcher.connect(governance).deauthorizeVault(vaultAddress1) - - // Last vault replaced the first vault in the 'vaults' array - expect(await dispatcher.vaults(0)).to.equal(vaultAddress3) - expect(await dispatcher.vaultsInfo(vaultAddress1)).to.be.equal(false) - expect((await dispatcher.getVaults()).length).to.equal(2) - - await dispatcher.connect(governance).deauthorizeVault(vaultAddress2) - - // Last vault (vaultAddress2) was removed from the 'vaults' array - expect(await dispatcher.vaults(0)).to.equal(vaultAddress3) - expect((await dispatcher.getVaults()).length).to.equal(1) - expect(await dispatcher.vaultsInfo(vaultAddress2)).to.be.equal(false) - - await dispatcher.connect(governance).deauthorizeVault(vaultAddress3) - expect((await dispatcher.getVaults()).length).to.equal(0) - expect(await dispatcher.vaultsInfo(vaultAddress3)).to.be.equal(false) - }) - - it("should deauthorize a vault and authorize it again", async () => { - await dispatcher.connect(governance).deauthorizeVault(vaultAddress1) - expect(await dispatcher.vaultsInfo(vaultAddress1)).to.be.equal(false) - - await dispatcher.connect(governance).authorizeVault(vaultAddress1) - expect(await dispatcher.vaultsInfo(vaultAddress1)).to.be.equal(true) - }) - - it("should not deauthorize a vault that is not authorized", async () => { - await expect( - dispatcher.connect(governance).deauthorizeVault(vaultAddress4), - ).to.be.revertedWithCustomError(dispatcher, "VaultUnauthorized") - }) - - it("should emit an event when removing a vault", async () => { - await expect( - dispatcher.connect(governance).deauthorizeVault(vaultAddress1), - ) - .to.emit(dispatcher, "VaultDeauthorized") - .withArgs(vaultAddress1) - }) - }) - }) - - describe("depositToVault", () => { - beforeAfterSnapshotWrapper() - - const assetsToAllocate = to1e18(100) - const minSharesOut = to1e18(100) - - before(async () => { - await dispatcher.connect(governance).authorizeVault(vault.getAddress()) - await tbtc.mint(await stbtc.getAddress(), to1e18(100000)) - }) - - context("when caller is not maintainer", () => { - beforeAfterSnapshotWrapper() - - it("should revert when depositing to a vault", async () => { - await expect( - dispatcher - .connect(thirdParty) - .depositToVault( - await vault.getAddress(), - assetsToAllocate, - minSharesOut, - ), - ).to.be.revertedWithCustomError(dispatcher, "NotMaintainer") - }) - }) - - context("when caller is maintainer", () => { - context("when vault is not authorized", () => { - beforeAfterSnapshotWrapper() - - it("should revert", async () => { - const randomAddress = await ethers.Wallet.createRandom().getAddress() - await expect( - dispatcher - .connect(maintainer) - .depositToVault(randomAddress, assetsToAllocate, minSharesOut), - ).to.be.revertedWithCustomError(dispatcher, "VaultUnauthorized") - }) - }) - - context("when the vault is authorized", () => { - let vaultAddress: string - - before(async () => { - vaultAddress = await vault.getAddress() - }) - - context("when allocation is successful", () => { - beforeAfterSnapshotWrapper() - - let tx: ContractTransactionResponse - - before(async () => { - tx = await dispatcher - .connect(maintainer) - .depositToVault(vaultAddress, assetsToAllocate, minSharesOut) - }) - - it("should deposit tBTC to a vault", async () => { - await expect(tx).to.changeTokenBalances( - tbtc, - [stbtc, vault], - [-assetsToAllocate, assetsToAllocate], - ) - }) - - it("should mint vault's shares for stBTC contract", async () => { - await expect(tx).to.changeTokenBalances( - vault, - [stbtc], - [minSharesOut], - ) - }) - - it("should emit a DepositAllocated event", async () => { - await expect(tx) - .to.emit(dispatcher, "DepositAllocated") - .withArgs(vaultAddress, assetsToAllocate, minSharesOut) - }) - }) - - context( - "when the expected returned shares are less than the actual returned shares", - () => { - beforeAfterSnapshotWrapper() - - const sharesOut = assetsToAllocate - const minShares = to1e18(101) - - it("should emit a MinSharesError event", async () => { - await expect( - dispatcher - .connect(maintainer) - .depositToVault(vaultAddress, assetsToAllocate, minShares), - ) - .to.be.revertedWithCustomError(dispatcher, "MinSharesError") - .withArgs(vaultAddress, sharesOut, minShares) - }) - }, - ) - }) - }) - }) - - describe("updateMaintainer", () => { - beforeAfterSnapshotWrapper() - - let newMaintainer: string - - before(async () => { - newMaintainer = await ethers.Wallet.createRandom().getAddress() - }) - - context("when caller is not an owner", () => { - beforeAfterSnapshotWrapper() - - it("should revert", async () => { - await expect( - dispatcher.connect(thirdParty).updateMaintainer(newMaintainer), - ) - .to.be.revertedWithCustomError( - dispatcher, - "OwnableUnauthorizedAccount", - ) - .withArgs(thirdParty.address) - }) - }) - - context("when caller is an owner", () => { - context("when maintainer is a zero address", () => { - beforeAfterSnapshotWrapper() - - it("should revert", async () => { - await expect( - dispatcher.connect(governance).updateMaintainer(ZeroAddress), - ).to.be.revertedWithCustomError(dispatcher, "ZeroAddress") - }) - }) - - context("when maintainer is not a zero address", () => { - beforeAfterSnapshotWrapper() - - let tx: ContractTransactionResponse - - before(async () => { - tx = await dispatcher - .connect(governance) - .updateMaintainer(newMaintainer) - }) - - it("should update the maintainer", async () => { - expect(await dispatcher.maintainer()).to.be.equal(newMaintainer) - }) - - it("should emit an event when updating the maintainer", async () => { - await expect(tx) - .to.emit(dispatcher, "MaintainerUpdated") - .withArgs(newMaintainer) - }) - }) - }) - }) -}) diff --git a/core/test/helpers/context.ts b/core/test/helpers/context.ts index 68584f5ae..b4d864fcb 100644 --- a/core/test/helpers/context.ts +++ b/core/test/helpers/context.ts @@ -3,9 +3,7 @@ import { getDeployedContract } from "./contract" import type { StBTC as stBTC, - Dispatcher, BridgeStub, - TestERC4626, TBTCVaultStub, MezoAllocator, MezoPortalStub, @@ -28,9 +26,6 @@ export async function deployment() { const tbtcBridge: BridgeStub = await getDeployedContract("Bridge") const tbtcVault: TBTCVaultStub = await getDeployedContract("TBTCVault") - const dispatcher: Dispatcher = await getDeployedContract("Dispatcher") - - const vault: TestERC4626 = await getDeployedContract("Vault") const mezoAllocator: MezoAllocator = await getDeployedContract("MezoAllocator") const mezoPortal: MezoPortalStub = await getDeployedContract("MezoPortal") @@ -42,8 +37,6 @@ export async function deployment() { bitcoinRedeemer, tbtcBridge, tbtcVault, - dispatcher, - vault, mezoAllocator, mezoPortal, }