-
Notifications
You must be signed in to change notification settings - Fork 234
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
feat: Use gas estimation in aztecjs contract function interactions #6260
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spalladino
force-pushed
the
palla/use-gas-estimation-in-aztecjs
branch
from
May 8, 2024 15:32
09258ca
to
27ac8c8
Compare
spalladino
force-pushed
the
palla/use-gas-estimation-in-aztecjs
branch
from
May 10, 2024 22:54
27ac8c8
to
d75c8a7
Compare
just-mitch
approved these changes
May 13, 2024
@@ -27,7 +27,7 @@ export abstract class BaseContractInteraction { | |||
protected tx?: Tx; | |||
protected txRequest?: TxExecutionRequest; | |||
|
|||
constructor(protected pxe: PXE) {} | |||
constructor(protected wallet: Wallet) {} |
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.
Why did we need to make this change?
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 just noted that all derived classes were requiring a Wallet and not a PXE, so I lifted that to the base class.
spalladino
force-pushed
the
palla/use-gas-estimation-in-aztecjs
branch
7 times, most recently
from
May 14, 2024 12:16
658f611
to
dba3592
Compare
spalladino
force-pushed
the
palla/use-gas-estimation-in-aztecjs
branch
from
May 14, 2024 14:46
0b95ba5
to
f2031e7
Compare
ludamad
pushed a commit
that referenced
this pull request
May 14, 2024
🤖 I have created a release *beep* *boop* --- <details><summary>aztec-package: 0.40.0</summary> ## [0.40.0](aztec-package-v0.39.0...aztec-package-v0.40.0) (2024-05-14) ### Miscellaneous * **aztec-package:** Synchronize aztec-packages versions </details> <details><summary>barretenberg.js: 0.40.0</summary> ## [0.40.0](barretenberg.js-v0.39.0...barretenberg.js-v0.40.0) (2024-05-14) ### Miscellaneous * **barretenberg.js:** Synchronize aztec-packages versions </details> <details><summary>aztec-packages: 0.40.0</summary> ## [0.40.0](aztec-packages-v0.39.0...aztec-packages-v0.40.0) (2024-05-14) ### ⚠ BREAKING CHANGES * debug logs for all ([#6392](#6392)) ### Features * Add wasmtime ([#6314](#6314)) ([ea6ccdd](ea6ccdd)) * Debug logs for all ([#6392](#6392)) ([10afa13](10afa13)) * Demonstrating use of nsk_app to check nullification ([#6362](#6362)) ([ddf4461](ddf4461)) * Use gas estimation in aztecjs contract function interactions ([#6260](#6260)) ([18192ac](18192ac)) ### Miscellaneous * Add more serialisation traits to protocol circuits ([#6385](#6385)) ([97d5422](97d5422)) * **ci:** Bump timeout of prover-client-test ([#6394](#6394)) ([d05cd07](d05cd07)) * Reenable bench summary ([#6211](#6211)) ([713b243](713b243)) * **token-contract-tests:** Change intrinsic assertion messages ([#6386](#6386)) ([aca81ae](aca81ae)) </details> <details><summary>barretenberg: 0.40.0</summary> ## [0.40.0](barretenberg-v0.39.0...barretenberg-v0.40.0) (2024-05-14) ### ⚠ BREAKING CHANGES * debug logs for all ([#6392](#6392)) ### Features * Debug logs for all ([#6392](#6392)) ([10afa13](10afa13)) ### Miscellaneous * Add more serialisation traits to protocol circuits ([#6385](#6385)) ([97d5422](97d5422)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
AztecBot
added a commit
to AztecProtocol/barretenberg
that referenced
this pull request
May 15, 2024
🤖 I have created a release *beep* *boop* --- <details><summary>aztec-package: 0.40.0</summary> ## [0.40.0](AztecProtocol/aztec-packages@aztec-package-v0.39.0...aztec-package-v0.40.0) (2024-05-14) ### Miscellaneous * **aztec-package:** Synchronize aztec-packages versions </details> <details><summary>barretenberg.js: 0.40.0</summary> ## [0.40.0](AztecProtocol/aztec-packages@barretenberg.js-v0.39.0...barretenberg.js-v0.40.0) (2024-05-14) ### Miscellaneous * **barretenberg.js:** Synchronize aztec-packages versions </details> <details><summary>aztec-packages: 0.40.0</summary> ## [0.40.0](AztecProtocol/aztec-packages@aztec-packages-v0.39.0...aztec-packages-v0.40.0) (2024-05-14) ### ⚠ BREAKING CHANGES * debug logs for all ([#6392](AztecProtocol/aztec-packages#6392)) ### Features * Add wasmtime ([#6314](AztecProtocol/aztec-packages#6314)) ([ea6ccdd](AztecProtocol/aztec-packages@ea6ccdd)) * Debug logs for all ([#6392](AztecProtocol/aztec-packages#6392)) ([10afa13](AztecProtocol/aztec-packages@10afa13)) * Demonstrating use of nsk_app to check nullification ([#6362](AztecProtocol/aztec-packages#6362)) ([ddf4461](AztecProtocol/aztec-packages@ddf4461)) * Use gas estimation in aztecjs contract function interactions ([#6260](AztecProtocol/aztec-packages#6260)) ([18192ac](AztecProtocol/aztec-packages@18192ac)) ### Miscellaneous * Add more serialisation traits to protocol circuits ([#6385](AztecProtocol/aztec-packages#6385)) ([97d5422](AztecProtocol/aztec-packages@97d5422)) * **ci:** Bump timeout of prover-client-test ([#6394](AztecProtocol/aztec-packages#6394)) ([d05cd07](AztecProtocol/aztec-packages@d05cd07)) * Reenable bench summary ([#6211](AztecProtocol/aztec-packages#6211)) ([713b243](AztecProtocol/aztec-packages@713b243)) * **token-contract-tests:** Change intrinsic assertion messages ([#6386](AztecProtocol/aztec-packages#6386)) ([aca81ae](AztecProtocol/aztec-packages@aca81ae)) </details> <details><summary>barretenberg: 0.40.0</summary> ## [0.40.0](AztecProtocol/aztec-packages@barretenberg-v0.39.0...barretenberg-v0.40.0) (2024-05-14) ### ⚠ BREAKING CHANGES * debug logs for all ([#6392](AztecProtocol/aztec-packages#6392)) ### Features * Debug logs for all ([#6392](AztecProtocol/aztec-packages#6392)) ([10afa13](AztecProtocol/aztec-packages@10afa13)) ### Miscellaneous * Add more serialisation traits to protocol circuits ([#6385](AztecProtocol/aztec-packages#6385)) ([97d5422](AztecProtocol/aztec-packages@97d5422)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
iakovenkos
pushed a commit
that referenced
this pull request
May 15, 2024
…6260) Adds an `estimateGas` flag to the `send` method of contract function interactions (defaulting to false for now) to run an initial simulate on the request to get the gas limits before actually sending the tx.
iakovenkos
pushed a commit
that referenced
this pull request
May 15, 2024
🤖 I have created a release *beep* *boop* --- <details><summary>aztec-package: 0.40.0</summary> ## [0.40.0](aztec-package-v0.39.0...aztec-package-v0.40.0) (2024-05-14) ### Miscellaneous * **aztec-package:** Synchronize aztec-packages versions </details> <details><summary>barretenberg.js: 0.40.0</summary> ## [0.40.0](barretenberg.js-v0.39.0...barretenberg.js-v0.40.0) (2024-05-14) ### Miscellaneous * **barretenberg.js:** Synchronize aztec-packages versions </details> <details><summary>aztec-packages: 0.40.0</summary> ## [0.40.0](aztec-packages-v0.39.0...aztec-packages-v0.40.0) (2024-05-14) ### ⚠ BREAKING CHANGES * debug logs for all ([#6392](#6392)) ### Features * Add wasmtime ([#6314](#6314)) ([ea6ccdd](ea6ccdd)) * Debug logs for all ([#6392](#6392)) ([10afa13](10afa13)) * Demonstrating use of nsk_app to check nullification ([#6362](#6362)) ([ddf4461](ddf4461)) * Use gas estimation in aztecjs contract function interactions ([#6260](#6260)) ([18192ac](18192ac)) ### Miscellaneous * Add more serialisation traits to protocol circuits ([#6385](#6385)) ([97d5422](97d5422)) * **ci:** Bump timeout of prover-client-test ([#6394](#6394)) ([d05cd07](d05cd07)) * Reenable bench summary ([#6211](#6211)) ([713b243](713b243)) * **token-contract-tests:** Change intrinsic assertion messages ([#6386](#6386)) ([aca81ae](aca81ae)) </details> <details><summary>barretenberg: 0.40.0</summary> ## [0.40.0](barretenberg-v0.39.0...barretenberg-v0.40.0) (2024-05-14) ### ⚠ BREAKING CHANGES * debug logs for all ([#6392](#6392)) ### Features * Debug logs for all ([#6392](#6392)) ([10afa13](10afa13)) ### Miscellaneous * Add more serialisation traits to protocol circuits ([#6385](#6385)) ([97d5422](97d5422)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds an
estimateGas
flag to thesend
method of contract function interactions (defaulting to false for now) to run an initial simulate on the request to get the gas limits before actually sending the tx.