Skip to content

Commit

Permalink
Fix base fork tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shahthepro committed Oct 14, 2024
1 parent 1acfd34 commit cffc622
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions contracts/test/strategies/aerodrome-amo.base.fork-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ describe("ForkTest: Aerodrome AMO Strategy (Base)", async function () {
rafael,
aeroSwapRouter,
aeroNftManager,
harvester,
quoter;

beforeEach(async () => {
Expand All @@ -287,6 +288,7 @@ describe("ForkTest: Aerodrome AMO Strategy (Base)", async function () {
oethbVaultSigner = await impersonateAndFund(oethbVault.address);
gauge = fixture.aeroClGauge;
quoter = fixture.quoter;
harvester = fixture.harvester;

await setup();
await weth
Expand Down Expand Up @@ -369,7 +371,7 @@ describe("ForkTest: Aerodrome AMO Strategy (Base)", async function () {

// correct harvester set
expect(await aerodromeAmoStrategy.harvesterAddress()).to.equal(
await strategist.getAddress()
harvester.address
);

await assetLpStakedInGauge();
Expand Down Expand Up @@ -471,18 +473,18 @@ describe("ForkTest: Aerodrome AMO Strategy (Base)", async function () {

describe("Harvest rewards", function () {
it("Should be able to collect reward tokens", async () => {
const strategistAddr = await strategist.getAddress();

await setERC20TokenBalance(
aerodromeAmoStrategy.address,
aero,
"1337",
hre
);
const aeroBalanceBefore = await aero.balanceOf(strategistAddr);
await aerodromeAmoStrategy.connect(strategist).collectRewardTokens();
const aeroBalanceBefore = await aero.balanceOf(harvester);
const impersonatedHarvester = await impersonateAndFund(harvester.address)
await aerodromeAmoStrategy.connect(impersonatedHarvester).collectRewardTokens();

const aeroBalancediff = (await aero.balanceOf(strategistAddr)).sub(
const aeroBalancediff = (await aero.balanceOf(harvester)).sub(
aeroBalanceBefore
);

Expand Down

0 comments on commit cffc622

Please sign in to comment.