-
Notifications
You must be signed in to change notification settings - Fork 11.7k
[graphql-alt] Add checks and coin selection argument to simulateTransaction #24679
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
base: main
Are you sure you want to change the base?
[graphql-alt] Add checks and coin selection argument to simulateTransaction #24679
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
amnn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we'll need to approach the test differently to avoid it needing to be changed by folks making unrelated changes, but the core implementation is looking good, thanks @tpham-mysten !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this stale? It looks like you're using an inline snapshot now.
| "status": "SUCCESS", | ||
| "transaction": { | ||
| "gasInput": { | ||
| "gasBudget": "156976000" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even the gas budget may change because of unrelated protocol config or gas model changes. I think it will be best to write a more "E2E" test where we take the output from GraphQL, sign it, execute it, and confirm that this succeeds and the transfer actually happens.
| &self, | ||
| ctx: &Context<'_>, | ||
| transaction: Json, | ||
| checks_enabled: Option<bool>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: thoughts on aligning this with gRPC by calling it checks? I know that in gRPC there is a special enum for this which is perhaps where the Enabled comes from, though. (I don't feel particularly strongly either way, but just noted the difference).
Description
Support the same flags that gRPC's simulate transaction supports:
checks: enables transaction validation checks during simulationdo_gas_selection: enables automatic gas coin selection and budget estimationTest plan
How did you test the new or updated feature?
Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.
checksanddo_gas_selectionargument forquery.simulateTransaction