-
Notifications
You must be signed in to change notification settings - Fork 124
Description
The CodeBuilder should allow building note and tx scripts with advice map entries in the MastForest that is created.
One use case for this is AccountInterface::build_send_notes_script which handles note attachment creation. When it creates a NoteAttachmentContent::Array it would be ideal if it could add the required elements to the advice map of the created transaction script's MastForest.
This should be possible by calling Assembler::assemble_program with a type that implements Parse::parse and returns a custom Module with the advice map entries.
If I'm not mistaken, there is currently no pub method for adding advice map entries to Modules, so this probably doesn't work yet. The question is, should this be possible or is there another way that should be used? cc @plafer
If this is doable, this should then adapt the test_send_note_script_basic_wallet test to remove the explicit advice map entry.