Skip to content

Commit 3371854

Browse files
authored
fix(avm): fix SendL2ToL1Message implementation (AztecProtocol#4367)
fix(avm): fix SendL2ToL1Message implementation Relates to AztecProtocol#4002.
1 parent fdbf1cd commit 3371854

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

yarn-project/acir-simulator/src/avm/opcodes/accrued_substate.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ describe('Accrued Substate', () => {
124124

125125
const journalState = journal.flush();
126126
const expected = values.map(v => v.toFr());
127-
expect(journalState.newLogs).toEqual([expected]);
127+
expect(journalState.newL1Messages).toEqual([expected]);
128128
});
129129
});
130130

yarn-project/acir-simulator/src/avm/opcodes/accrued_substate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export class EmitUnencryptedLog extends Instruction {
7171
}
7272

7373
export class SendL2ToL1Message extends Instruction {
74-
static type: string = 'EMITUNENCRYPTEDLOG';
74+
static type: string = 'SENDL2TOL1MSG';
7575
static readonly opcode: Opcode = Opcode.SENDL2TOL1MSG;
7676
// Informs (de)serialization. See Instruction.deserialize.
7777
static readonly wireFormat = [OperandType.UINT8, OperandType.UINT8, OperandType.UINT32, OperandType.UINT32];
@@ -86,7 +86,7 @@ export class SendL2ToL1Message extends Instruction {
8686
}
8787

8888
const msg = machineState.memory.getSlice(this.msgOffset, this.msgSize).map(f => f.toFr());
89-
journal.writeLog(msg);
89+
journal.writeL1Message(msg);
9090

9191
this.incrementPc(machineState);
9292
}

0 commit comments

Comments
 (0)