Conversation
1297793 to
c58a277
Compare
| // TODO: this will not work with `send_transaction` and does not differentiate between EIP-1559 | ||
| // and legacy tx | ||
| request: CallRequest, |
There was a problem hiding this comment.
right for signing we need another step where the request is converted into a TypedTransaction first
crates/contract/src/call.rs
Outdated
| /// Signs and broadcasts this call as a transaction. | ||
| pub async fn send(&self) -> Result<()> { | ||
| todo!() | ||
| } |
There was a problem hiding this comment.
Perhaps we can move this behind a Provider trait bound, requiring that the provider supports signing
There was a problem hiding this comment.
we want it to work with eth_sendTransaction too, so i think just need to modify the comment
| /// [`CallBuilder`] using a [`SolCall`] type as the call decoder. | ||
| // NOTE: please avoid changing this type due to its use in the `sol!` macro. | ||
| pub type SolCallBuilder<P, C> = CallBuilder<P, PhantomData<C>>; | ||
|
|
||
| /// [`CallBuilder`] using a [`Function`] as the call decoder. | ||
| pub type DynCallBuilder<P> = CallBuilder<P, Function>; | ||
|
|
||
| /// [`CallBuilder`] that does not have a call decoder. | ||
| pub type RawCallBuilder<P> = CallBuilder<P, ()>; |
There was a problem hiding this comment.
amazing -- exactly how i had it in mind
|
CallBuilder internals changing is fine, as long as the APIs marked with my NOTE comment stay the same, so as to not break |
|
|
onbjerg
left a comment
There was a problem hiding this comment.
pog personally, this looks good to me. excited to see this macro in the wild
need to fix deny check, otherwise can merge imo
Upgrade
alloy-dyn-contracttoalloy-contractby makingCallBuildergeneric over the output decoder, which can now besol!-generated (see alloy-rs/core#510) as well "noop" decoder which makescallbehave the same ascall_raw.Bumps MSRV to 1.75, but this is not strictly necessary for the core functionality.