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

Explain that no struct can be created as transaction input other than some exceptions #91

Merged
merged 10 commits into from
Aug 27, 2024

Conversation

nikos-terzo
Copy link
Contributor

I happened to waste some time in my move learning process trying to see whether structs with copy ability could be created from the client side and passed into MoveVM. A colleague did the same thing too. Maybe we need to make this explicit.

I am not sure whether the format and places I used are the best.

@damirka damirka self-requested a review August 13, 2024 12:01
- std::string::String
- vector of pure types
- Option of pure types
- ID, a special type that refers to a unique identifier of an object
Copy link
Collaborator

@damirka damirka Aug 25, 2024

Choose a reason for hiding this comment

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

Ditto, not a special type, defined in sui::object::ID. Link one of the object chapters.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

object/object-model seems more appropriate as it refers to the UID.

Copy link
Contributor Author

@nikos-terzo nikos-terzo Aug 26, 2024

Choose a reason for hiding this comment

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

After all, I linked storage/uid-and-id. I also referred to object/object-model as "See also".
a49b910

Copy link
Collaborator

@damirka damirka left a comment

Choose a reason for hiding this comment

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

Love the changes with small note on ID->UID

- [`std::ascii::String`](../move-basics/string.html#ascii-strings), ASCII strings.
- [`vector<T>`](../move-basics/vector.html), where `T` is a pure type.
- [`std::option::Option<T>`](../move-basics/option.html), where `T` is a pure type.
- [`std::object::ID`](../storage/uid-and-id.html), takes part in the Unique IDentifier (UID) of an object. See also [What is an Object](../object/object-model.html).
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wouldn't mention anything UID here. ID is just a type which typically points to an object, though it's not a requirement.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@damirka
Copy link
Collaborator

damirka commented Aug 27, 2024

@nikos-terzo LGTM! Thank you for doing this and for carrying out the edit process!

@damirka damirka merged commit 7f76864 into MystenLabs:main Aug 27, 2024
3 checks passed
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