fix(docs): add missing parameters in storage map documentation examples #9361
+16
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixed undefined variables in documentation examples for storage map traits. Added missing
ownerandspenderparameters to function signatures and wrapped a standalone example in a function context.Type of change
Please check one:
Why is this change needed?
Examples used undefined variables (
owner,spender,self,address), which would cause compilation errors if copied.What was the behavior or documentation before?
Examples used variables not defined in function signatures:
StorageMapReadAccess:ownerandspenderused but not in parametersStorageMapWriteAccess: same issueStoragePathEntry:selfandaddressused outside function contextWhat is the behavior or documentation after?
All examples now have complete function signatures with all required parameters defined.
Related issue or discussion (if any)
N/A
Additional context
Changes only affect documentation comments. Examples are now syntactically correct and match the pattern used in module-level documentation.