Skip to content

fix(doc): review topics on maps and big-maps#81

Merged
EduardoRFS merged 6 commits intorinderknecht@new_jsligofrom
tpm/v2-maps-and-big-maps-new-jsligo
Jul 11, 2025
Merged

fix(doc): review topics on maps and big-maps#81
EduardoRFS merged 6 commits intorinderknecht@new_jsligofrom
tpm/v2-maps-and-big-maps-new-jsligo

Conversation

@timothymcmackin
Copy link
Contributor

Rebase of #62 on new_jsligo.

Comment on lines +220 to +221
To simultaneously update a map and obtain the value of the updated element, use the function `Big_map.get_and_update`.
This function allows you to extract a value from a big-map for use, as in this example:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be interesting to point out that get_and_update is useful for linear values like tickets.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After some exploration, I'm going to handle this in a future PR because I'd need to update info on handling tickets in test with contracts that use entrypoints instead of a single main function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#84

Comment on lines +242 to +243
To simultaneously update a map and obtain the value of the updated element, use the function `Map.get_and_update`.
This function allows you to extract a value from a map for use, as in this example:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above about linearity.

@timothymcmackin timothymcmackin force-pushed the tpm/v2-maps-and-big-maps-new-jsligo branch from 1c24791 to a21c6d4 Compare July 8, 2025 18:10
Co-authored-by: Eduardo Rafael <theeduardorfs@gmail.com>
@EduardoRFS EduardoRFS merged commit 180ddd3 into rinderknecht@new_jsligo Jul 11, 2025
@EduardoRFS EduardoRFS deleted the tpm/v2-maps-and-big-maps-new-jsligo branch July 11, 2025 02:42
EduardoRFS added a commit that referenced this pull request Nov 26, 2025
* Remove old language-basics topic on maps

* Rework topics on maps and big-maps

* No longer using semicolons here

* JsLIGO uses commas for big-maps

* This annotation is not necessary

* typo

Co-authored-by: Eduardo Rafael <theeduardorfs@gmail.com>

---------

Co-authored-by: Eduardo Rafael <theeduardorfs@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants