Skip to content

Conversation

@mattvaux
Copy link

Summary

Fixed undefined variables in documentation examples for storage map traits. Added missing owner and spender parameters to function signatures and wrapped a standalone example in a function context.


Type of change

Please check one:

  • Bug fix (fixes incorrect behavior)
  • New feature
  • Performance improvement
  • Documentation change with concrete technical impact
  • Style, wording, formatting, or typo-only change

⚠️ Note:
To keep maintainer workload sustainable, we generally do not accept PRs that
are only minor wording, grammar, formatting, or style changes.
Such PRs may be closed without detailed review.


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: owner and spender used but not in parameters
  • StorageMapWriteAccess: same issue
  • StoragePathEntry: self and address used outside function context

What 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.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

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

@orizi made 2 comments.
Reviewable status: 0 of 1 files reviewed, 2 unresolved discussions (waiting on @mattvaux).


corelib/src/starknet/storage/map.cairo line 113 at r1 (raw file):

/// }
///
/// fn read_storage(self: @ContractState, address: ContractAddress, owner: ContractAddress, spender:

fix formatting. (over 100 chars)


corelib/src/starknet/storage/map.cairo line 143 at r1 (raw file):

/// }
///
/// fn write_storage(ref self: ContractState, address: ContractAddress, owner: ContractAddress,

fix formatting. (over 100 chars)

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.

3 participants