Skip to content

Commit

Permalink
after review
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominik1999 committed May 13, 2024
1 parent 5808deb commit 06c72a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions miden-lib/asm/miden/contracts/faucets/basic_fungible.masm
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ export.distribute.1
loc_storew.0 dropw
# => [tag, note_type, RECIPIENT, ...]

# create a note containing the asset
# create a note
exec.tx::create_note
# => [note_ptr, ZERO, ZERO, ...]

# store and drop the ASSET
# load the ASSET and add it to the note
padw loc_loadw.0 movup.4 exec.tx::add_asset_to_note
# => [note_ptr, ASSET, ZERO, ...]
end
Expand Down
3 changes: 3 additions & 0 deletions miden-lib/asm/miden/kernels/tx/tx.masm
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ end
#! Panics if
#! - the note_type is not valid
#! - the note_tag is not an u32
#! - if note_tag starts with anything but 0b11, note_type must be public
#! - the number of created notes exceeds the maximum limit of 4096
export.create_note
# validate the note type
# NOTE: encrypted notes are currently unsupported
Expand Down Expand Up @@ -309,6 +311,7 @@ end
#! - the ASSET is malformed (invalid faucet ID)
#! - the max amount of fungible assets is exceeded
#! - the non-fungible asset already exists in the note
#! - adding more than 256 ASSETs to the note
export.add_asset_to_note
# get current num of assets
dup exec.memory::get_created_note_num_assets movdn.5
Expand Down

0 comments on commit 06c72a3

Please sign in to comment.