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

Allow to convert CallBuilderTo TransactionRequest #981

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

leruaa
Copy link
Contributor

@leruaa leruaa commented Jun 26, 2024

Motivation

Sometimes we don't want to send() a transaction created with CallBuilder, but instead convert it to TransactionRequest, in order to later include it in a bundle.

CallBuilder::as_ref() could be used, but it would require to clone the resulting &TransactionRequest to call FillProvider::fill().

Solution

Adding into_transaction_request() to CallBuilder.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

Cc @igorline

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

this is reasonable

@mattsse mattsse merged commit 097e21a into alloy-rs:main Jun 27, 2024
22 checks passed
ben186 pushed a commit to ben186/alloy that referenced this pull request Jul 27, 2024
feat: allow to convert CallBuilderTo TransactionRequest
@leruaa leruaa deleted the into_transaction_request branch October 10, 2024 10:47
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