Skip to content

Commit

Permalink
test: inputPublished decodes params and emits the input only
Browse files Browse the repository at this point in the history
  • Loading branch information
cristovaoth committed Jun 6, 2024
1 parent 79efe76 commit 3986828
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion packages/evm/test/Enclave.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,29 @@ describe("Enclave", function () {
});
it("sets ciphertextInput correctly");
it("returns true if input is published successfully");
it("emits InputPublished event");
it("emits InputPublished event", async function () {
const { enclave, request } = await loadFixture(setup);

await enclave.request(
request.pool,
request.threshold,
request.duration,
request.computationModule,
request.cMParams,
request.executionModule,
request.eMParams,
{ value: 10 },
);

const e3Id = 0;

const inputData = abiCoder.encode(["bytes"], ["0xaabbccddeeff"]);
await enclave.activate(e3Id);

await expect(enclave.publishInput(e3Id, inputData))
.to.emit(enclave, "InputPublished")
.withArgs(e3Id, "0xaabbccddeeff");
});
});

describe("publishCiphertextOutput()", function () {
Expand Down

0 comments on commit 3986828

Please sign in to comment.