-
Notifications
You must be signed in to change notification settings - Fork 119
Open
Labels
good first issueGood for newcomersGood for newcomerskernelsRelated to transaction, batch, or block kernelsRelated to transaction, batch, or block kernels
Milestone
Description
As motivated in #2523, we should avoid returning outputs identical to inputs in kernel procedures. After #2437, native_account::remove_asset currently takes and returns ASSET_VALUE. Instead of removing the return value, we can make it more useful by making it analogous to native_account::add_asset. It returns the asset after it was merged into the account's vault, which is useful to check the balance after addition without an additional kernel call. Similarly, remove_asset should return the asset remaining in the vault after the provided value was removed.
So this could be:
#! Inputs: [ASSET_KEY, ASSET_VALUE]
#! Outputs: [REMAINING_ASSET_VALUE]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomerskernelsRelated to transaction, batch, or block kernelsRelated to transaction, batch, or block kernels