0.5.0 • Published 1 year ago
@ape.swap/hardhat-test-helpers v0.5.0
ApeSwap Hardhat Test Helper
Install this package to get access to deployable ApeSwap Mock Farm and DEX for testing with contracts developed with the Hardhat framework.
Installation
yarn add -D @ape.swap/hardhat-test-helpers
Usage
import { loadFixture } from '@nomicfoundation/hardhat-network-helpers'
import { dex, farm } from '@ape.swap/hardhat-test-helpers'
async function deployMockDexFixture() {
const [owner, feeTo, alice] = await ethers.getSigners()
const { dexFactory, dexRouter, mockWBNB, mockTokens, dexPairs } =
await dex.deployMockDex(ethers, [owner, feeTo, alice], 5)
return {
accounts: { owner, feeTo, alice },
dexFactory,
dexRouter,
mockWBNB,
mockTokens,
dexPairs,
}
}
it("Should set the right unlockTime", async function () {
const { accounts, dexRouter, dexFactory } = await loadFixture(deployMockDexFixture);
expect(await dexRouter.factory()).to.equal(dexFactory.address);
});
0.6.5-alpha.0
1 year ago
0.6.4-alpha.0
1 year ago
0.6.3-alpha.0
1 year ago
0.6.1-alpha.0
1 year ago
0.6.2-alpha.0
1 year ago
0.6.6-alpha.0
1 year ago
0.5.0
1 year ago
0.5.0-alpha.0
1 year ago
0.3.1
2 years ago
0.3.0
2 years ago
0.2.0
2 years ago
0.1.0
2 years ago
0.0.3-alpha.2
2 years ago
0.0.3-alpha.1
2 years ago
0.0.3-alpha.0
2 years ago