Skip to content

Commit

Permalink
Merge pull request #578 from zama-ai/awaitDeployment
Browse files Browse the repository at this point in the history
chore: awaitDeployment
  • Loading branch information
jatZama authored Oct 18, 2024
2 parents c345bc0 + 9eabcf6 commit fc57471
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 fc57471

Please sign in to comment.