Skip to content

Commit

Permalink
Add test for deployed owner
Browse files Browse the repository at this point in the history
  • Loading branch information
antico5 committed Jan 2, 2022
1 parent 26eae70 commit 637eda7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions create2_precompute/test/create2_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Contract } from "ethers";
import { ethers } from "hardhat";
import {
Create2Factory,
TestContract,
TestContractSpy,
TestContract__factory,
} from "../typechain";
Expand Down Expand Up @@ -38,6 +39,13 @@ describe("Create2Factory", function () {
const deployEvent = receipt.events![0] as DeployedEvent;

expect(deployEvent.args?.addr == precalculatedAddress);

const testContract = TestContract__factory.connect(
precalculatedAddress,
signer
);

expect(await testContract.owner()).to.eq(factoryContract.address);
});
});
});

0 comments on commit 637eda7

Please sign in to comment.