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 set_sidecar to the callbuilder #594

Merged
merged 2 commits into from
Apr 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion crates/contract/src/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use alloy_json_abi::Function;
use alloy_network::{Ethereum, Network, ReceiptResponse, TransactionBuilder};
use alloy_primitives::{Address, Bytes, U256};
use alloy_provider::{PendingTransactionBuilder, Provider};
use alloy_rpc_types::{state::StateOverride, BlockId};
use alloy_rpc_types::{state::StateOverride, BlobTransactionSidecar, BlockId};
use alloy_sol_types::SolCall;
use alloy_transport::Transport;
use std::{
Expand Down Expand Up @@ -280,6 +280,12 @@ impl<T: Transport + Clone, P: Provider<T, N>, D: CallDecoder, N: Network> CallBu
self
}

/// Sets the `sidecar` field in the transaction to the provided value.
pub fn sidecar(mut self, blob_sidecar: BlobTransactionSidecar) -> Self {
self.request.set_blob_sidecar(blob_sidecar);
self
}

/// Uses a Legacy transaction instead of an EIP-1559 one to execute the call
pub fn legacy(self) -> Self {
todo!()
Expand Down
Loading