From 6f62a65249c86052147bad539254cd5042032cf6 Mon Sep 17 00:00:00 2001 From: miguelmtzinf Date: Tue, 27 Feb 2024 13:06:07 +0100 Subject: [PATCH] fix: Remove ethereum fork test files --- tests/ethereum/ethereum.periphery.spec.ts | 73 ------------ tests/ethereum/ethereum.roles.spec.ts | 137 ---------------------- 2 files changed, 210 deletions(-) delete mode 100644 tests/ethereum/ethereum.periphery.spec.ts delete mode 100644 tests/ethereum/ethereum.roles.spec.ts diff --git a/tests/ethereum/ethereum.periphery.spec.ts b/tests/ethereum/ethereum.periphery.spec.ts deleted file mode 100644 index e90ebed..0000000 --- a/tests/ethereum/ethereum.periphery.spec.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { expect } from "chai"; -import { HardhatRuntimeEnvironment } from "hardhat/types"; - -import { - ConfigNames, - getAaveProtocolDataProvider, - getEthersSignersAddresses, - getPoolAddressesProvider, - getUiIncentiveDataProvider, - getUiPoolDataProvider, - ICommonConfiguration, - loadPoolConfig, - PoolAddressesProvider, -} from "../../helpers"; - -// Prevent error HH9 when importing this file inside tasks or helpers at Hardhat config load -declare var hre: HardhatRuntimeEnvironment; - -describe("Ethereum V3 - Token-less deployment: periphery contracts", function () { - let addressesProvider: PoolAddressesProvider; - let poolConfig: ICommonConfiguration; - before(async () => { - expect(process.env.MARKET_NAME).equal("Ethereum"); - - await hre.deployments.fixture(["market", "periphery-post", "after-deploy"]); - - addressesProvider = await getPoolAddressesProvider(); - poolConfig = loadPoolConfig((process.env.MARKET_NAME || "") as ConfigNames); - }); - - describe("Paraswap adapters", () => { - it("Paraswap Adapters should be deployed", async () => { - const paraswapLiquidityAdapter = await hre.deployments.getOrNull( - "ParaSwapLiquiditySwapAdapter" - ); - const paraswapRepayAdapter = await hre.deployments.getOrNull( - "ParaSwapRepayAdapter" - ); - const paraswapWithdrawSwapAdapter = await hre.deployments.getOrNull( - "ParaSwapWithdrawSwapAdapter" - ); - expect(paraswapLiquidityAdapter).to.not.be.null; - expect(paraswapRepayAdapter).to.not.be.null; - expect(paraswapWithdrawSwapAdapter).to.not.be.null; - }); - }); - - describe("UI Helpers", () => { - it("UiPoolDataProvider should be deployed and do not reverts", async () => { - const ui = await getUiPoolDataProvider(); - const [, , anyone] = await getEthersSignersAddresses(); - await expect(ui.getReservesList(addressesProvider.address)).to.not.be - .reverted; - await expect(ui.getReservesData(addressesProvider.address)).to.not.be - .reverted; - await expect(ui.getUserReservesData(addressesProvider.address, anyone)).to - .not.be.reverted; - }); - it("UiIncentives should be deployed and do not reverts", async () => { - const incentivesHelper = await getUiIncentiveDataProvider(); - await expect( - incentivesHelper.getReservesIncentivesData(addressesProvider.address) - ).to.not.be.reverted; - }); - it("PoolDataProvider should be deployed and do not reverts", async () => { - const dataProvider = await getAaveProtocolDataProvider(); - await expect(dataProvider.getAllReservesTokens()).to.not.be.reverted; - await expect(await dataProvider.getAllReservesTokens()).to.be.deep.equal( - [] - ); - }); - }); -}); diff --git a/tests/ethereum/ethereum.roles.spec.ts b/tests/ethereum/ethereum.roles.spec.ts deleted file mode 100644 index 11973a4..0000000 --- a/tests/ethereum/ethereum.roles.spec.ts +++ /dev/null @@ -1,137 +0,0 @@ -import { expect } from "chai"; -import { HardhatRuntimeEnvironment } from "hardhat/types"; - -import { - ConfigNames, - ETHEREUM_SHORT_EXECUTOR, - getACLManager, - getPoolAddressesProvider, - getPoolAddressesProviderRegistry, - getWrappedTokenGateway, - ICommonConfiguration, - loadPoolConfig, - PoolAddressesProvider, -} from "../../helpers"; -import { getOwnableContract } from "../../helpers/contract-getters"; -import { TREASURY_CONTROLLER_ID } from "../../helpers/deploy-ids"; -import { getFirstSigner } from "../../helpers/utilities/signer"; -import { AaveEcosystemReserveController__factory } from "../../typechain/factories/@aave/periphery-v3/contracts/treasury/AaveEcosystemReserveController__factory"; -import { - getEmissionManager, - getIncentivesV2, -} from "./../../helpers/contract-getters"; - -// Prevent error HH9 when importing this file inside tasks or helpers at Hardhat config load -declare var hre: HardhatRuntimeEnvironment; - -describe("Ethereum V3 - Token-less deployment", function () { - let addressesProvider: PoolAddressesProvider; - let poolConfig: ICommonConfiguration; - before(async () => { - expect(process.env.MARKET_NAME).equal("Ethereum"); - - await hre.deployments.fixture(["market", "periphery-post", "after-deploy"]); - - addressesProvider = await getPoolAddressesProvider(); - poolConfig = loadPoolConfig((process.env.MARKET_NAME || "") as ConfigNames); - }); - - describe("Roles", () => { - it("PoolAddressesProviderRegistry Owner should be short executor", async () => { - const registry = await getPoolAddressesProviderRegistry(); - expect(await registry.owner()).equals(ETHEREUM_SHORT_EXECUTOR); - }); - it("PoolAddressesProvider Owner should be short executor", async () => { - expect(await addressesProvider.owner()).equals(ETHEREUM_SHORT_EXECUTOR); - }); - it("ACLManager admin should be short executor", async () => { - const acl = await getACLManager(); - const DefaultAdminRole = await acl.DEFAULT_ADMIN_ROLE(); - await expect( - await acl.hasRole(DefaultAdminRole, ETHEREUM_SHORT_EXECUTOR) - ); - }); - it("Pool admin should be short executor", async () => { - const acl = await getACLManager(); - await expect(await acl.isPoolAdmin(ETHEREUM_SHORT_EXECUTOR)).to.be.true; - }); - it("Emergency admin should be short executor", async () => { - const acl = await getACLManager(); - await expect(await acl.isEmergencyAdmin(ETHEREUM_SHORT_EXECUTOR)).to.be - .true; - }); - it("PoolAddressesProvider ACLAdmin should be short executor", async () => { - await expect(await addressesProvider.getACLAdmin()).equal( - ETHEREUM_SHORT_EXECUTOR - ); - }); - it("WrappedCoinGateway admin should be short executor", async () => { - const wethgateway = await getWrappedTokenGateway(); - await expect(await wethgateway.owner()).equal(ETHEREUM_SHORT_EXECUTOR); - }); - it("Deployer should not be listed at ACLManager in any role", async () => { - const { deployer } = await hre.getNamedAccounts(); - const acl = await getACLManager(); - - await expect(await acl.isAssetListingAdmin(deployer)).be.false; - await expect(await acl.isBridge(deployer)).be.false; - await expect(await acl.isEmergencyAdmin(deployer)).be.false; - await expect(await acl.isPoolAdmin(deployer)).be.false; - await expect(await acl.isFlashBorrower(deployer)).be.false; - await expect(await acl.isRiskAdmin(deployer)).be.false; - }); - it("Treasury controller admin should be short executor", async () => { - const controllerArtifact = await hre.deployments.get( - TREASURY_CONTROLLER_ID - ); - const controller = AaveEcosystemReserveController__factory.connect( - controllerArtifact.address, - await getFirstSigner() - ); - - expect(await controller.owner()).equal(ETHEREUM_SHORT_EXECUTOR); - }); - it("ParawapRepayAdapter should be short executor", async () => { - const paraswapRepayAdapter = await getOwnableContract( - await ( - await hre.deployments.get("ParaSwapRepayAdapter") - ).address - ); - const owner = await paraswapRepayAdapter.owner(); - expect(owner).equal(ETHEREUM_SHORT_EXECUTOR); - }); - it("ParawapSwapAdapter should be short executor", async () => { - const paraswapSwapAdapter = await getOwnableContract( - await ( - await hre.deployments.get("ParaSwapLiquiditySwapAdapter") - ).address - ); - - const owner = await paraswapSwapAdapter.owner(); - expect(owner).equal(ETHEREUM_SHORT_EXECUTOR); - }); - it("ParawapWithdrawSwapAdapter should be short executor", async () => { - const paraswapWithdrawSwapAdapter = await getOwnableContract( - await ( - await hre.deployments.get("ParaSwapWithdrawSwapAdapter") - ).address - ); - - const owner = await paraswapWithdrawSwapAdapter.owner(); - expect(owner).equal(ETHEREUM_SHORT_EXECUTOR); - }); - it("Emission Manager owner should be short executor", async () => { - const manager = await getEmissionManager(); - - const owner = await manager.owner(); - - expect(owner).to.be.equal(ETHEREUM_SHORT_EXECUTOR); - }); - it("Expect RewardsController admin to be the Emission Manager", async () => { - const manager = await getEmissionManager(); - const controller = await getIncentivesV2(); - - await expect(await controller.EMISSION_MANAGER()).equal(manager.address); - }); - }); -});