Skip to content

Commit

Permalink
Add some assertions on ForkDeployment test
Browse files Browse the repository at this point in the history
  • Loading branch information
manumonti committed Sep 18, 2024
1 parent b4e53e9 commit 94e4722
Showing 1 changed file with 26 additions and 13 deletions.
39 changes: 26 additions & 13 deletions test/ForkDeployment.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { deployments, getNamedAccounts, network } = require("hardhat")
const { getNamedAccounts, network, ethers } = require("hardhat")
const { before, describe, it } = require("mocha")
const { expect } = require("chai")

Expand All @@ -13,31 +13,44 @@ describe("Deployment of RewardsAggregator using mainnet network fork", function
}
})

it("test", async function () {
const { deploy } = deployments

it("should be deployed RewardsAggregator", async function () {
const {
deployer,
tokenContract,
tacoApp,
oldCumulativeMerkleDrop,
merkleRewardsHolder,
owner,
} = await getNamedAccounts()

const args = [
const RewardsAggregator = await ethers.getContractFactory(
"RewardsAggregator"
)

const rewardsAggregator = await RewardsAggregator.deploy(
tokenContract,
tacoApp,
oldCumulativeMerkleDrop,
merkleRewardsHolder,
owner,
]
owner
)

// Check if the contract was successfully deployed
expect(await rewardsAggregator.owner()).to.equal(owner)
expect(await rewardsAggregator.token()).to.equal(tokenContract)
expect(await rewardsAggregator.application()).to.equal(tacoApp)
expect(await rewardsAggregator.merkleRewardsHolder()).to.equal(
merkleRewardsHolder
)
expect(await rewardsAggregator.oldCumulativeMerkleDrop()).to.equal(
oldCumulativeMerkleDrop
)

// Check if it is possible to claim Merkle rewards
// TODO: It is needed to allow RewardsAggregator to pull tokens from ClaimableRewards

// TODO: test a TACoApp claim

const rewardsAggregator = await deploy("RewardsAggregator", {
from: deployer,
args,
})
// TODO: test a total claim (Merkle + TACoApp)

console.log(rewardsAggregator.address)
})
})

0 comments on commit 94e4722

Please sign in to comment.