Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ac7db5a
commit c26d166
Showing
1 changed file
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,39 @@ | ||
console.log('test factory'); | ||
import chai from "chai"; | ||
import chaiAsPromised from "chai-as-promised"; | ||
import { solidity } from "ethereum-waffle"; | ||
import { ethers, deployments } from "hardhat"; | ||
import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; | ||
import { SoulFactory, SoulFactory__factory } from "../typechain"; | ||
|
||
chai.use(chaiAsPromised); | ||
chai.use(solidity); | ||
const expect = chai.expect; | ||
|
||
// contract instances | ||
let soulFactory: SoulFactory; | ||
|
||
let owner: SignerWithAddress; | ||
let address1: SignerWithAddress; | ||
let address2: SignerWithAddress; | ||
|
||
describe("Soul Factory", () => { | ||
before(async () => { | ||
[, owner, address1, address2] = await ethers.getSigners(); | ||
}); | ||
|
||
beforeEach(async () => { | ||
await deployments.fixture("SoulFactory", { fallbackToGlobal: false }); | ||
|
||
const { address: soulFactoryAddress } = await deployments.get( | ||
"SoulFactory" | ||
); | ||
|
||
soulFactory = SoulFactory__factory.connect(soulFactoryAddress, owner); | ||
}); | ||
|
||
describe("purchase info", () => { | ||
it("we can get purchase info", async () => { | ||
console.log(await soulFactory.purchaseInfo()); | ||
}); | ||
}); | ||
}); |