Skip to content

Commit

Permalink
feat: nuking last hardcoded note type ids (#7069)
Browse files Browse the repository at this point in the history
Fixes #5833
  • Loading branch information
benesjan authored Jun 17, 2024
1 parent 0ce27e0 commit a23fd0b
Showing 1 changed file with 2 additions and 6 deletions.
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

0 comments on commit a23fd0b

Please sign in to comment.