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

[fastx adapter] add gas fee logic #45

Closed
sblackshear opened this issue Dec 9, 2021 · 2 comments
Closed

[fastx adapter] add gas fee logic #45

sblackshear opened this issue Dec 9, 2021 · 2 comments
Assignees

Comments

@sblackshear
Copy link
Collaborator

sblackshear commented Dec 9, 2021

A MoveCall order o contains a gas_payment: ObjectID argument, but it is currently ignored. In order to levy the fee, we need to:

  1. Resolve the object O associated with the id o.gas_payment
  2. Confirm that O belongs to the order's sender
  3. Check that the value of O is greater than or equal to o.gas_budget
  4. After executing the transaction, subtract the gas used from O's value

On (3), note that the type of gas_budget reflects the computational costs and storage cost of executing a transaction (denominated in "gas units") and should be nonzero for all transactions, but that the choice of a sensible gas costs is a separate issue from the mechanics of charging for gas (which are the same regardless of the choice of budget). See #81 for more discussion on choice of gas costs.

@lxfind
Copy link
Contributor

lxfind commented Jan 4, 2022

#119 is adding gas logic for move call and module publish.

@lxfind
Copy link
Contributor

lxfind commented Jan 7, 2022

#126 added gas logic for transfer orders.

@lxfind lxfind closed this as completed Jan 7, 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

No branches or pull requests

2 participants