pub trait FoundryTransactionBuilder<N: Network>:
TransactionBuilder<N>
+ Default
+ Sized
+ Send
+ Sync
+ 'static {
Show 22 methods
// Provided methods
fn max_fee_per_blob_gas(&self) -> Option<u128> { ... }
fn set_max_fee_per_blob_gas(&mut self, _max_fee_per_blob_gas: u128) { ... }
fn with_max_fee_per_blob_gas(self, max_fee_per_blob_gas: u128) -> Self { ... }
fn blob_versioned_hashes(&self) -> Option<&[B256]> { ... }
fn set_blob_versioned_hashes(&mut self, _hashes: Vec<B256>) { ... }
fn with_blob_versioned_hashes(self, hashes: Vec<B256>) -> Self { ... }
fn blob_sidecar(&self) -> Option<&BlobTransactionSidecarVariant> { ... }
fn set_blob_sidecar(&mut self, _sidecar: BlobTransactionSidecarVariant) { ... }
fn with_blob_sidecar(self, sidecar: BlobTransactionSidecarVariant) -> Self { ... }
fn blob_sidecar_4844(&self) -> Option<&BlobTransactionSidecar> { ... }
fn set_blob_sidecar_4844(&mut self, sidecar: BlobTransactionSidecar) { ... }
fn with_blob_sidecar_4844(self, sidecar: BlobTransactionSidecar) -> Self { ... }
fn blob_sidecar_7594(&self) -> Option<&BlobTransactionSidecarEip7594> { ... }
fn set_blob_sidecar_7594(&mut self, sidecar: BlobTransactionSidecarEip7594) { ... }
fn with_blob_sidecar_7594(
self,
sidecar: BlobTransactionSidecarEip7594,
) -> Self { ... }
fn authorization_list(&self) -> Option<&Vec<SignedAuthorization>> { ... }
fn set_authorization_list(
&mut self,
_authorization_list: Vec<SignedAuthorization>,
) { ... }
fn with_authorization_list(
self,
authorization_list: Vec<SignedAuthorization>,
) -> Self { ... }
fn set_fee_token(&mut self, _fee_token: Address) { ... }
fn with_fee_token(self, fee_token: Address) -> Self { ... }
fn set_nonce_key(&mut self, _nonce_key: U256) { ... }
fn with_nonce_key(self, nonce_key: U256) -> Self { ... }
}Expand description
Composite transaction builder trait for Foundry transactions.
This extends the base TransactionBuilder trait with the same methods as
[alloy_network::TransactionBuilder4844] for handling blob transaction sidecars, and
[alloy_network::TransactionBuilder7702] for handling EIP-7702 authorization lists.
By default, all methods have no-op implementations, so this can be implemented for any Network.
If the Network supports Eip4844 blob transactions implement these methods:
FoundryTransactionBuilder::max_fee_per_blob_gasFoundryTransactionBuilder::set_max_fee_per_blob_gasFoundryTransactionBuilder::blob_versioned_hashesFoundryTransactionBuilder::set_blob_versioned_hashesFoundryTransactionBuilder::blob_sidecarFoundryTransactionBuilder::set_blob_sidecar
If the Network supports EIP-7702 authorization lists, implement these methods:
If the Network supports Tempo transactions, implement these methods:
Provided Methods§
Sourcefn max_fee_per_blob_gas(&self) -> Option<u128>
fn max_fee_per_blob_gas(&self) -> Option<u128>
Get the max fee per blob gas for the transaction.
Sourcefn set_max_fee_per_blob_gas(&mut self, _max_fee_per_blob_gas: u128)
fn set_max_fee_per_blob_gas(&mut self, _max_fee_per_blob_gas: u128)
Set the max fee per blob gas for the transaction.
Sourcefn with_max_fee_per_blob_gas(self, max_fee_per_blob_gas: u128) -> Self
fn with_max_fee_per_blob_gas(self, max_fee_per_blob_gas: u128) -> Self
Builder-pattern method for setting max fee per blob gas.
Sourcefn blob_versioned_hashes(&self) -> Option<&[B256]>
fn blob_versioned_hashes(&self) -> Option<&[B256]>
Gets the EIP-4844 blob versioned hashes of the transaction.
These may be set independently of the sidecar, e.g. when the sidecar
has been pruned but the hashes are still needed for eth_call.
Sourcefn set_blob_versioned_hashes(&mut self, _hashes: Vec<B256>)
fn set_blob_versioned_hashes(&mut self, _hashes: Vec<B256>)
Sets the EIP-4844 blob versioned hashes of the transaction.
Sourcefn with_blob_versioned_hashes(self, hashes: Vec<B256>) -> Self
fn with_blob_versioned_hashes(self, hashes: Vec<B256>) -> Self
Builder-pattern method for setting the EIP-4844 blob versioned hashes.
Sourcefn blob_sidecar(&self) -> Option<&BlobTransactionSidecarVariant>
fn blob_sidecar(&self) -> Option<&BlobTransactionSidecarVariant>
Gets the blob sidecar (either EIP-4844 or EIP-7594 variant) of the transaction.
Sourcefn set_blob_sidecar(&mut self, _sidecar: BlobTransactionSidecarVariant)
fn set_blob_sidecar(&mut self, _sidecar: BlobTransactionSidecarVariant)
Sets the blob sidecar (either EIP-4844 or EIP-7594 variant) of the transaction.
Note: This will also set the versioned blob hashes accordingly: [BlobTransactionSidecarVariant::versioned_hashes]
Sourcefn with_blob_sidecar(self, sidecar: BlobTransactionSidecarVariant) -> Self
fn with_blob_sidecar(self, sidecar: BlobTransactionSidecarVariant) -> Self
Builder-pattern method for setting the blob sidecar of the transaction.
Sourcefn blob_sidecar_4844(&self) -> Option<&BlobTransactionSidecar>
fn blob_sidecar_4844(&self) -> Option<&BlobTransactionSidecar>
Gets the EIP-4844 blob sidecar if the current sidecar is of that variant.
Sourcefn set_blob_sidecar_4844(&mut self, sidecar: BlobTransactionSidecar)
fn set_blob_sidecar_4844(&mut self, sidecar: BlobTransactionSidecar)
Sets the EIP-4844 blob sidecar of the transaction.
Sourcefn with_blob_sidecar_4844(self, sidecar: BlobTransactionSidecar) -> Self
fn with_blob_sidecar_4844(self, sidecar: BlobTransactionSidecar) -> Self
Builder-pattern method for setting the EIP-4844 blob sidecar of the transaction.
Sourcefn blob_sidecar_7594(&self) -> Option<&BlobTransactionSidecarEip7594>
fn blob_sidecar_7594(&self) -> Option<&BlobTransactionSidecarEip7594>
Gets the EIP-7594 blob sidecar if the current sidecar is of that variant.
Sourcefn set_blob_sidecar_7594(&mut self, sidecar: BlobTransactionSidecarEip7594)
fn set_blob_sidecar_7594(&mut self, sidecar: BlobTransactionSidecarEip7594)
Sets the EIP-7594 blob sidecar of the transaction.
Sourcefn with_blob_sidecar_7594(self, sidecar: BlobTransactionSidecarEip7594) -> Self
fn with_blob_sidecar_7594(self, sidecar: BlobTransactionSidecarEip7594) -> Self
Builder-pattern method for setting the EIP-7594 blob sidecar of the transaction.
Get the EIP-7702 authorization list for the transaction.
Sets the EIP-7702 authorization list.
Builder-pattern method for setting the authorization list.
Sourcefn set_fee_token(&mut self, _fee_token: Address)
fn set_fee_token(&mut self, _fee_token: Address)
Set the fee token for a Tempo transaction.
Sourcefn with_fee_token(self, fee_token: Address) -> Self
fn with_fee_token(self, fee_token: Address) -> Self
Builder-pattern method for setting the Tempo fee token.
Sourcefn set_nonce_key(&mut self, _nonce_key: U256)
fn set_nonce_key(&mut self, _nonce_key: U256)
Set the 2D nonce key for the Tempo transaction.
Sourcefn with_nonce_key(self, nonce_key: U256) -> Self
fn with_nonce_key(self, nonce_key: U256) -> Self
Builder-pattern method for setting a 2D nonce key for a Tempo transaction.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.