Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Mar 1, 2024
1 parent 396286f commit 40424a6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 16 deletions.
2 changes: 0 additions & 2 deletions yarn-project/aztec.js/src/contract/sent_tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ export class SentTx {
l2ToL1Msgs: tx.l2ToL1Msgs.filter(l => !l.isZero()),
contractsLeaves: tx.contractLeaves.filter(c => !c.isZero()),
contractData: tx.contractData.filter(c => !c.isEmpty()),
encryptedLogs: tx.encryptedLogs.unrollLogs(),
unencryptedLogs: tx.unencryptedLogs.unrollLogs(),
visibleNotes,
};
}
Expand Down
5 changes: 0 additions & 5 deletions yarn-project/circuit-types/src/tx/tx_receipt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,6 @@ interface DebugInfo {
* New contract data created by the transaction.
*/
contractData: ContractData[];
/**
* The logs emitted by the tx
*/
encryptedLogs: Buffer[];
unencryptedLogs: Buffer[];
/**
* Notes created in this tx which belong to accounts which are registered in the PXE which was used to submit the
* tx. You will not receive notes of accounts which are not registered in the PXE here even though they were
Expand Down
20 changes: 11 additions & 9 deletions yarn-project/end-to-end/src/e2e_non_contract_account.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,13 @@ describe('e2e_non_contract_account', () => {
const contractWithNoContractWallet = await TestContract.at(contract.address, nonContractAccountWallet);

// Send transaction as arbitrary non-contract account
const { debugInfo } = await contractWithNoContractWallet.methods
.emit_msg_sender()
.send()
.wait({ interval: 0.1, debug: true });
const tx = contractWithNoContractWallet.methods.emit_msg_sender().send();
await tx.wait({ interval: 0.1 });

const logs = debugInfo!.unencryptedLogs;
const logs = (await tx.getUnencryptedLogs()).logs;
expect(logs.length).toBe(1);
const msgSender = toBigInt(logs[0]);

const msgSender = toBigInt(logs[0].log.data);
expect(msgSender).toBe(0n);
}, 120_000);

Expand All @@ -62,10 +61,13 @@ describe('e2e_non_contract_account', () => {
it('can set and get a constant', async () => {
const value = 123n;

const receipt = await contract.methods.set_constant(value).send().wait({ interval: 0.1, debug: true });
const { txHash, debugInfo } = await contract.methods
.set_constant(value)
.send()
.wait({ interval: 0.1, debug: true });

// check that 1 note hash was created
expect(receipt.debugInfo!.noteHashes.length).toBe(1);
expect(debugInfo!.noteHashes.length).toBe(1);

// Add the note
const note = new Note([new Fr(value)]);
Expand All @@ -78,7 +80,7 @@ describe('e2e_non_contract_account', () => {
contract.address,
storageSlot,
noteTypeId,
receipt.txHash,
txHash,
);
await wallet.addNote(extendedNote);

Expand Down

0 comments on commit 40424a6

Please sign in to comment.