Skip to content

tenderly provider ext #2699

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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

tenderly provider ext #2699

wants to merge 12 commits into from

Conversation

siosw
Copy link
Contributor

@siosw siosw commented Jul 12, 2025

Motivation

add tenderly provider extension #2667

Solution

for now this only adds the support for the simulation but wanted to get this up for discussion

I'm a little unsure about the TenderlyLogInput deserde, is there a smarter way of implementing this that I'm missing?

I set the provider tests to be ignored since they require access to a tenderly endpoint

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@siosw siosw force-pushed the siosw/tenderly-ext branch from 2bc5003 to 9169b24 Compare July 12, 2025 12:53
siosw and others added 2 commits July 12, 2025 14:54
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
@siosw siosw changed the title add tenderly simulation calls tenderly provider ext Jul 12, 2025
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

supportive,

suggesting to introduce future types for the simulate calls, like we use for ethcall and ethcallmany, this gives a nicer api with only (txrequest) as argument and then setter functions for the call future

@github-project-automation github-project-automation bot moved this to In Progress in Alloy Jul 12, 2025
@siosw
Copy link
Contributor Author

siosw commented Jul 12, 2025

supportive,

suggesting to introduce future types for the simulate calls, like we use for ethcall and ethcallmany, this gives a nicer api with only (txrequest) as argument and then setter functions for the call future

thanks for taking a look. agree it would be nicer to have the same api as eth call & reuse the type.
i stumbled onto some unexpected behaviour of EthCall, basically

let call: EthCall<Ethereum, String> = EthCall::new(provider.weak_client(), "tenderly_simulateTransaction", tx.clone()).block(block.into());
let res = call.await;

ends up calling eth_estimateGas
i think this happens whenever the method string is not equal to eth_call
is there something I'm missing here?

@siosw
Copy link
Contributor Author

siosw commented Jul 12, 2025

ah ok i guess it's this:

if method.eq("eth_call") { caller.call(params) } else { caller.estimate_gas(params) }?;

do you think we should make ethcall support more rpc calls? or create a similar type specifically for the tenderly apit?
in any case the current ethcall impl seems confusing to me because it makes it seem like it acceps arbitrary rpc calls.

@siosw
Copy link
Contributor Author

siosw commented Jul 18, 2025

@mattsse i got it working with EthCall & EthCallMany but it requires some changes to the types.
there are two issues with this approach that i've been running into:

  • tenderly requires an explicit block number for simulation which doesn't match the EthCall behavior
  • when submitting more than one bundle to EthCallMany all bundles other than the first one are silently dropped

maybe this means we will have to implement tenderly specific future types for this? wdyt?

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see,

okay after thinking about this, let's just go with all the params as args, this is easier and we dont need to change any existing code for this.

@siosw siosw force-pushed the siosw/tenderly-ext branch from fbd5bb0 to fec032c Compare July 21, 2025 12:23
siosw and others added 4 commits July 21, 2025 16:10
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
@siosw siosw requested a review from mattsse July 23, 2025 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants