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

[messages] add enum for Order to simplify adding new order types #27

Merged
merged 1 commit into from
Dec 6, 2021

Conversation

sblackshear
Copy link
Collaborator

@sblackshear sblackshear commented Dec 4, 2021

Previously, there were transfer orders (to transfer funds), and confirmation orders (to commit an order that has gathered
signatures from a quorum of authorities. This PR converts the first kind of orders to an enum, which will make it easy to
add new kinds of orders (publish Move module, invoke smart contract function, create objects, ...).

Every order must know its sender, sequence number, and object ID. In time, this will need to be generalized to multiple objects, each with its own sequence number (see #8).

In addition, several usages of Order assume that there is a single recipient address (see: all the spots outside messages.rs where we need to pattern match on the OrderKind). These will also need to be refactored in time--some orders will have multiple recipients, some will have none, and in some cases the recipients may not be known prior to executing the order.

Copy link
Contributor

@lxfind lxfind left a comment

Choose a reason for hiding this comment

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

LGTM

Previously, there were transfer orders (to transfer funds), and confirmation orders (to commit an order that has gathered
signatures from a quorum of authorities. This PR converts the first kind of orders to an enum, which will make it easy to
add new kinds of orders (publish Move module, invoke smart contract function, create objects, ...).

Every order knows its sender, sequence number, and object ID. In time, this will need to be generalized to multiple objects,
each with its own sequence number (see MystenLabs/sui#8).
@sblackshear sblackshear merged commit 5a9f901 into MystenLabs:main Dec 6, 2021
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.

[fastx] Merge the traits from fastnftexec-experimental and example execution into the fastnft
2 participants