From e332a4ccc451767881d21600991965c15d9ee1cb Mon Sep 17 00:00:00 2001 From: IlyasRidhuan Date: Wed, 10 Apr 2024 12:12:39 +0000 Subject: [PATCH] chore(avm): formatter --- .../simulator/src/public/avm_executor.test.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/yarn-project/simulator/src/public/avm_executor.test.ts b/yarn-project/simulator/src/public/avm_executor.test.ts index f9d79c15ccb..6a8e13a51f3 100644 --- a/yarn-project/simulator/src/public/avm_executor.test.ts +++ b/yarn-project/simulator/src/public/avm_executor.test.ts @@ -6,10 +6,10 @@ import { AvmTestContractArtifact } from '@aztec/noir-contracts.js'; import { type MockProxy, mock } from 'jest-mock-extended'; +import { initContext, initExecutionEnvironment } from '../avm/fixtures/index.js'; import { type CommitmentsDB, type PublicContractsDB, type PublicStateDB } from './db.js'; import { type PublicExecution } from './execution.js'; import { PublicExecutor } from './executor.js'; -import { initContext, initExecutionEnvironment } from '../avm/fixtures/index.js'; describe('AVM WitGen and Proof Generation', () => { let publicState: MockProxy; @@ -43,11 +43,16 @@ describe('AVM WitGen and Proof Generation', () => { const functionData = FunctionData.fromAbi(addArtifact); const args: Fr[] = [new Fr(99), new Fr(12)]; - // We call initContext here to load up a AvmExecutionEnvironment that prepends the calldata with the function selector + // We call initContext here to load up a AvmExecutionEnvironment that prepends the calldata with the function selector // and the args hash. In reality, we should simulate here and get this from the output of the simulation call. // For now, the interfaces for the PublicExecutor don't quite line up, so we are doing this. const context = initContext({ env: initExecutionEnvironment({ calldata: args }) }); - const execution: PublicExecution = { contractAddress, functionData, args: context.environment.calldata, callContext }; + const execution: PublicExecution = { + contractAddress, + functionData, + args: context.environment.calldata, + callContext, + }; const executor = new PublicExecutor(publicState, publicContracts, commitmentsDb, header); const [proof, vk] = await executor.getAvmProof(execution); const valid = await executor.verifyAvmProof(vk, proof);