Conversation
crates/network/src/any/signer.rs
Outdated
|
|
||
| /// A signer capable of signing any transaction for the [AnyNetwork] network. | ||
| #[derive(Clone)] | ||
| pub struct AnyNetworkSigner(Arc<dyn TxSigner<Signature> + Send + Sync>); |
There was a problem hiding this comment.
makes sense to make this Arc so we can share the same signer
mattsse
left a comment
There was a problem hiding this comment.
not sure if it makes sense to duplicate the signer type,
Perhaps for forward compatibility we can do that, in case we want to support more tx types that are don't exist on ehtereum (currently there aren't any)
so I think for now we can simply use the ethereumsigner for AnyNetwork as well but add impl NetworkSigner<AnyNetwork> for EthereumSigner { because both networks have the same UnsignedTx
I believe we could even do
impl<N> NetworkSigner<N> for EthereumSigner
where N: Network<UnsignedTx= TypedTransaction, TxEnvelope = TxEnvelope >
{wdyt @prestwich
crates/network/src/any/mod.rs
Outdated
| /// Alias for a catch-all receipt type. | ||
| pub type AnyReceipt = WithOtherFields<TransactionReceipt<AnyReceiptEnvelope<Log>>>; |
There was a problem hiding this comment.
could move or reexport this to/from rpc types and rename AnyTransactionReceipt?
crates/network/src/any/signer.rs
Outdated
|
|
||
| /// A signer capable of signing any transaction for the [AnyNetwork] network. | ||
| #[derive(Clone)] | ||
| pub struct AnyNetworkSigner(Arc<dyn TxSigner<Signature> + Send + Sync>); |
There was a problem hiding this comment.
this is the same as:
so I assume we can reuse EthereumSigner but
also implement impl NetworkSigner<AnyNetwork> for EthereumSigner {
?
|
supportive of type-reuse and the blanket impl The reason that |
|
basically the idea of |
* feat: helpers for AnyNetwork * fmt * Fixes * fix * fmt
Motivation
Small changes for foundry-rs/foundry#7106
Adds
AnyNetworkSignerand alias forAnyNetwork::ReceiptResponseas it's pretty longSolution
PR Checklist