Skip to content

Commit

Permalink
test: unexpected result
Browse files Browse the repository at this point in the history
  • Loading branch information
parv3213 committed Apr 21, 2022
1 parent a2aad68 commit 7b527e4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions contracts/DiamondInit.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions contracts/facets/LiquidityMiningFacet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(),
Expand Down
3 changes: 2 additions & 1 deletion test/contracts/facets/LiquidityMiningFacet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7b527e4

Please sign in to comment.