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

Add gas logic for transfer orders #126

Merged
merged 1 commit into from
Jan 6, 2022
Merged

Add gas logic for transfer orders #126

merged 1 commit into from
Jan 6, 2022

Conversation

lxfind
Copy link
Contributor

@lxfind lxfind commented Jan 6, 2022

In #119 we added gas logic for move related orders. This PR adds gas logic for transfer orders.
It does the following:

  1. Added a gas_payment field to Transfer order, representing the gas object.
  2. Adjusted all related interfaces in client and authority to pass around the gas object.
  3. In authority, deduct gas when executing the Transfer order.
  4. Added gas_payment_object_id to Order type.
  5. Adjusted all tests to reflect the change.

Mostly ready for review.
TODO: Need to add a few tests that checks the gas when sending Transfer order.

fastpay/src/config.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@sblackshear sblackshear left a comment

Choose a reason for hiding this comment

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

LGTM, good stuff!

@lxfind lxfind merged commit 07864bb into MystenLabs:main Jan 6, 2022
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