Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions yarn-project/aztec/src/examples/token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,13 @@ async function main() {
const aliceSecretHash = computeSecretHash(aliceSecret);
const receipt = await tokenAlice.methods.mint_private(ALICE_MINT_BALANCE, aliceSecretHash).send().wait();

// Add the newly created "pending shield" note to PXE
const pendingShieldsStorageSlot = new Fr(5); // The storage slot of `pending_shields` is 5.
// `pending_shields` underlying note type is TransparentNote, with the following type id.
const pendingShieldsNoteTypeId = new Fr(84114971101151129711410111011678111116101n);
const note = new Note([new Fr(ALICE_MINT_BALANCE), aliceSecretHash]);
const extendedNote = new ExtendedNote(
note,
alice.address,
token.address,
pendingShieldsStorageSlot,
pendingShieldsNoteTypeId,
TokenContract.storage.pending_shields.slot,
TokenContract.notes.TransparentNote.id,
receipt.txHash,
);
await pxe.addNote(extendedNote);
Expand Down