Skip to content

Commit

Permalink
chore: awaitDeployment
Browse files Browse the repository at this point in the history
  • Loading branch information
jatZama committed Oct 18, 2024
1 parent c345bc0 commit 9eabcf6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/gatewayDecrypt/testAsyncDecrypt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ describe('TestAsyncDecrypt', function () {
beforeEach(async function () {
const contractFactory = await ethers.getContractFactory('TestAsyncDecrypt');
this.contract = await contractFactory.connect(this.signers.alice).deploy();
await this.contract.waitForDeployment();
this.contractAddress = await this.contract.getAddress();
this.instances = await createInstances(this.signers);
});
Expand Down Expand Up @@ -88,6 +89,7 @@ describe('TestAsyncDecrypt', function () {
it('test async decrypt bool trustless', async function () {
const contractFactory = await ethers.getContractFactory('TestAsyncDecrypt');
const contract2 = await contractFactory.connect(this.signers.alice).deploy();
await contract2.waitForDeployment();
const tx2 = await contract2.requestBoolTrustless({ gasLimit: 5_000_000 });
await tx2.wait();
await awaitAllDecryptionResults();
Expand Down Expand Up @@ -503,6 +505,7 @@ describe('TestAsyncDecrypt', function () {
it('test async decrypt ebytes256 non-trivial trustless', async function () {
const contractFactory = await ethers.getContractFactory('TestAsyncDecrypt');
const contract2 = await contractFactory.connect(this.signers.alice).deploy();
await contract2.waitForDeployment();
const inputAlice = this.instances.alice.createEncryptedInput(
await contract2.getAddress(),
this.signers.alice.address,
Expand All @@ -523,6 +526,7 @@ describe('TestAsyncDecrypt', function () {
it('test async decrypt mixed with ebytes256 trustless', async function () {
const contractFactory = await ethers.getContractFactory('TestAsyncDecrypt');
const contract2 = await contractFactory.connect(this.signers.alice).deploy();
await contract2.waitForDeployment();
const inputAlice = this.instances.alice.createEncryptedInput(
await contract2.getAddress(),
this.signers.alice.address,
Expand Down
1 change: 1 addition & 0 deletions test/reencryption/reencryption.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ describe('Reencryption', function () {
const contractFactory = await ethers.getContractFactory('Reencrypt');

this.contract = await contractFactory.connect(this.signers.alice).deploy();
await this.contract.waitForDeployment();
this.contractAddress = await this.contract.getAddress();
this.instances = await createInstances(this.signers);
});
Expand Down

0 comments on commit 9eabcf6

Please sign in to comment.