Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the account::set_map_item procedure #1137

Open
Fumuran opened this issue Feb 10, 2025 · 1 comment
Open

Update the account::set_map_item procedure #1137

Fumuran opened this issue Feb 10, 2025 · 1 comment
Labels
good first issue Good for newcomers kernels Related to transaction, batch, or block kernels refactoring Code clean-ups, improvements, and refactoring
Milestone

Comments

@Fumuran
Copy link
Contributor

Fumuran commented Feb 10, 2025

What should be done?

Currently set_map_item procedure from the kernel lib requires the input stack to be [index, KEY, NEW_VALUE, OLD_ROOT], where the index is the index of the storage slot where root of the tree is stored. This root is exactly the same as OLD_ROOT, so it could be removed from the inputs data and obtained inside the procedure.

How should it be done?

OLD_ROOT word should be removed from the inputs of the kernel account::set_map_item procedure, this root should be obtained inside this procedure using the provided storage slot index.

When is this task done?

This task is done when the old root is removed from the inputs of the set_map_item procedure.

Additional context

No response

@Fumuran Fumuran added good first issue Good for newcomers kernels Related to transaction, batch, or block kernels refactoring Code clean-ups, improvements, and refactoring labels Feb 10, 2025
@bobbinth bobbinth added this to the v0.9 milestone Feb 10, 2025
@bobbinth
Copy link
Contributor

Once this is done, we should be able to simplify mint_non_fungible_asset and burn_non_fungible_asset procedures a bit (and maybe some others).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers kernels Related to transaction, batch, or block kernels refactoring Code clean-ups, improvements, and refactoring
Projects
None yet
Development

No branches or pull requests

2 participants