Skip to content

Commit

Permalink
Simplify main Enclave.fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
cristovaoth committed Jun 3, 2024
1 parent ecd83c1 commit 14ae4f1
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions packages/evm/test/fixtures/Enclave.fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,12 @@ import { Enclave__factory } from "../../types/factories/contracts/Enclave__facto
export async function deployEnclaveFixture({
owner,
registry,
maxDuration,
maxDuration = 60 * 60 * 24 * 30,
}: {
owner?: SignerWithAddress;
registry?: SignerWithAddress;
owner: SignerWithAddress;
registry: string;
maxDuration?: number;
} = {}) {
// Contracts are deployed using the first signer/account by default
const [account1, account2] = await ethers.getSigners();

owner = owner || account1;
registry = registry || account2;
maxDuration = maxDuration || 60 * 60 * 24 * 30;

}) {
const deployment = await (await ethers.getContractFactory("Enclave")).deploy(owner, registry, maxDuration);

return Enclave__factory.connect(await deployment.getAddress(), owner);
Expand Down

0 comments on commit 14ae4f1

Please sign in to comment.