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

feat: add support for gasPrice in transaction overrides and schemas #784

Merged
merged 2 commits into from
Dec 2, 2024

Conversation

d4mr
Copy link
Member

@d4mr d4mr commented Nov 29, 2024

PR-Codex overview

This PR introduces support for gasPrice in various transaction-related files, enhancing transaction configuration options for both legacy and EIP-1559 types. It updates schemas and utility functions to accommodate this new field.

Detailed summary

  • Added gasPrice to the overrides type in src/utils/transaction/types.ts.
  • Updated return statement in src/server/schemas/transaction/index.ts to use transaction.overrides?.gasPrice.
  • Modified src/server/utils/transactionOverrides.ts to include gasPrice in the overrides object.
  • Included gasPrice in the transaction parameters in src/worker/tasks/sendTransactionWorker.ts.
  • Updated schema in src/server/schemas/txOverrides.ts to support gasPrice with a description explaining its usage.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@@ -10,8 +10,11 @@ export const txOverridesSchema = Type.Object({
description: "Gas limit for the transaction",
}),

// Overriding `gasPrice` is currently not supported.

gasPrice: Type.Optional({
Copy link
Member Author

Choose a reason for hiding this comment

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

we could also allow for a boolean true value here, which if detected, engine calculates the right gas amount to send

@d4mr d4mr requested a review from arcoraven November 29, 2024 22:00
@d4mr d4mr merged commit 56a9b3b into main Dec 2, 2024
5 checks passed
@d4mr d4mr deleted the pb/gas-price-override branch December 2, 2024 19:28
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.

2 participants