Calling a smart contract from within the PayloadBuilder context #15502
-
I am trying to implement a custom payload builder that should call a smart contract when a new payload is being built. Currently, I am using Here is a simplified version of the payload builder. Where I have access to the Reth's
In the To address the transport issue, I attempted to create an adapter that wraps the reth provider to implement
But still, I couldn't find a way to use What is the expected way to make it possible to call smart contracts from within the PayloadBuilder context? Can alloy bindings be used there? If not, what is the canonical approach here? I can't use ethers-rs since the project's type system is based on alloy. IIUC, I just need to encode the function call and then use reth's EvmEnv to execute it. Using a mocked/dummy provider seems like an ugly workaround and I believe an idiomatic approach should exist. Any guidance, documentation, or example implementations would be greatly appreciated. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
this shouldn't be the case because then you should have call types that implement: https://docs.rs/alloy-sol-types/1.0.0/alloy_sol_types/trait.SolCall.html I suggest to take a look at the expanded code |
Beta Was this translation helpful? Give feedback.
this shouldn't be the case because then you should have call types that implement:
https://docs.rs/alloy-sol-types/1.0.0/alloy_sol_types/trait.SolCall.html
I suggest to take a look at the expanded code