Skip to content

Commit

Permalink
chore(avm): update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasRidhuan committed Apr 7, 2024
1 parent 6e5132c commit 9af7719
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion yarn-project/simulator/src/public/avm_executor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ 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
// 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 executor = new PublicExecutor(publicState, publicContracts, commitmentsDb, header);
const [proof, vk] = await executor.getAvmProof(execution);
Expand Down

0 comments on commit 9af7719

Please sign in to comment.