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

[MoveosStd] Implement shared and frozen Object #1075

Closed
jolestar opened this issue Oct 30, 2023 · 0 comments · Fixed by #1083
Closed

[MoveosStd] Implement shared and frozen Object #1075

jolestar opened this issue Oct 30, 2023 · 0 comments · Fixed by #1083
Assignees
Labels
area:stdlib Move stdlib or framework issues skill::move Need the Move language skill to complete the issue skill::rust Need the rust language skill to complete the issue
Milestone

Comments

@jolestar
Copy link
Contributor

jolestar commented Oct 30, 2023

Follow #1001

  1. Add a flag field to ObjectEntity
struct ObjectEntity<T> {
      // The object id
      id: ObjectID,
      // The owner of the object
      owner: address,
      /// A flag to indicate whether the object is shared or frozen
      flag: u8,
      // The value of the object
      // The value must be the last field
      value: T,
}
  1. Anyone can get &mut Object<T> from shared objects.
  2. None one can get &mut Object<T> from frozen objects.
@jolestar jolestar added skill::move Need the Move language skill to complete the issue skill::rust Need the rust language skill to complete the issue area:stdlib Move stdlib or framework issues labels Oct 30, 2023
@jolestar jolestar added this to the Rooch v0.3 milestone Oct 30, 2023
@jolestar jolestar added this to Rooch Oct 30, 2023
@jolestar jolestar self-assigned this Oct 30, 2023
@github-project-automation github-project-automation bot moved this to Done in Rooch Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:stdlib Move stdlib or framework issues skill::move Need the Move language skill to complete the issue skill::rust Need the rust language skill to complete the issue
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant