From 7b527e4931805833a3fd79ddeec4f7614e33f59b Mon Sep 17 00:00:00 2001 From: Parv Date: Thu, 21 Apr 2022 13:58:26 +0530 Subject: [PATCH] test: unexpected result --- contracts/DiamondInit.sol | 3 +++ contracts/facets/LiquidityMiningFacet.sol | 2 ++ test/contracts/facets/LiquidityMiningFacet.ts | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/contracts/DiamondInit.sol b/contracts/DiamondInit.sol index 1346af91..09774719 100644 --- a/contracts/DiamondInit.sol +++ b/contracts/DiamondInit.sol @@ -9,6 +9,7 @@ import {IMigrationRegistry} from "./interfaces/IMigrationRegistry.sol"; import {IRegistry} from "./interfaces/IRegistry.sol"; import {AppStorage} from "./libs/LibAppStorage.sol"; import {LibDiamond} from "./libs/LibDiamond.sol"; +import "hardhat/console.sol"; /// @title Diamond Init /// @author Carter Carlson (@cartercarlson), @zgorizzo69 @@ -41,6 +42,8 @@ contract DiamondInit { require(msg.sender == _owner, "!owner"); require(s.diamond == address(0), "Already initialized"); s.me = _args.me; + console.log("Good address:", address(s.me)); + s.diamond = _args.diamond; s.vaultRegistry = _args.vaultRegistry; s.curveRegistry = _args.curveRegistry; diff --git a/contracts/facets/LiquidityMiningFacet.sol b/contracts/facets/LiquidityMiningFacet.sol index 2b281315..30620a85 100644 --- a/contracts/facets/LiquidityMiningFacet.sol +++ b/contracts/facets/LiquidityMiningFacet.sol @@ -12,6 +12,7 @@ import {LibLiquidityMining, PoolInfo, SeasonInfo} from "../libs/LibLiquidityMini import {MeTokenInfo} from "../libs/LibMeToken.sol"; import {Modifiers} from "../libs/LibAppStorage.sol"; import {LibMeta} from "../libs/LibMeta.sol"; +import "hardhat/console.sol"; /// @author @cartercarlson, @bunsdev, @cbobrobison /// @title Rewards contract for meTokens liquidity mining @@ -29,6 +30,7 @@ contract LiquidityMiningFacet is bytes32 merkleRoot ) external onlyLiquidityMiningController { require(!isSeasonLive(s.seasonCount), "season still live"); + console.log("Bad address:", address(s.me)); s.me.safeTransferFrom( LibMeta.msgSender(), diff --git a/test/contracts/facets/LiquidityMiningFacet.ts b/test/contracts/facets/LiquidityMiningFacet.ts index 8b5e4eb4..60fb5194 100644 --- a/test/contracts/facets/LiquidityMiningFacet.ts +++ b/test/contracts/facets/LiquidityMiningFacet.ts @@ -236,10 +236,11 @@ const setup = async () => { describe("initSeason()", () => { xit("revert when sender is not liquidityMiningController", async () => {}); - xit("should be able to initSeason", async () => { + it("should be able to initSeason", async () => { const block = await ethers.provider.getBlock("latest"); // Add mock me token const initTime = block.timestamp; + console.log(mockToken.address); await mockToken.setBalance( account0.address,