-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
chore(sdk): Use EthApiBuilder
instead of FnOnce
trait
#14442
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is great, and I think we want this @klkvr ?
the failing test are likely due to a missing trait bound?
ye, the trait bounds in rpc builder are madness |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made some progress on this but there are a few more things I need to think about first.
…nto emhane/ethapi-builder
5d23de0
to
4fc1af5
Compare
@mattsse lemme know if this is what you want |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool, ty. this looks good overall
need a bit more time to check a few things but I consider this complete
crates/ethereum/node/src/node.rs
Outdated
fn build( | ||
self, | ||
provider: N::Provider, | ||
pool: N::Pool, | ||
network: N::Network, | ||
evm: N::Evm, | ||
config: EthConfig, | ||
executor: impl TaskSpawner + 'static, | ||
cache: EthStateCache<BlockTy<N::Types>, ReceiptTy<N::Types>>, | ||
) -> Self::EthApi { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this could just take an instance of N
I think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah I think we should add the context container type back here but now generic over N
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, I get it now
Closes #12509
EthApiBuilderCtx
which is no longer needed since the entireEthApi
is passed to pubs and filter API builders.