Open mattsse opened 2 years ago
First time contributing to open-source code or looking at Foundry's code so my apologies for my ignorance. I took a look at the Foundry documentation book and found cast run
, but what is cast RunArgs
?
@fahimahmedx RunArgs
is an internal struct in our code base, it's not user facing, it defines the arguments for the command cast run
For context, this should also solve #2686
Still stuck on attempting this issue. My current understanding of the first task is that the structure RunArgs is wanting to be changed into it's own function. Is this the same as standalone function?
If not, is there any place I can find examples of what it means to refactor a struct into a standalone function? Am very confused on what that line even means.
Is there a discord server with foundry developers that I can direct these questions to? no responses on telegram chat unfortunately
Hey, happy to give some pointers What we need here is a way to replay a block or individual tx.
We need this for several things, the cast run command for example, but also would be useful for anvil.
So ideally we put all the logic in the evm crate and provide something like a struct ReplayExecutor or smth that the RunArgs would then use
Any progress on this?
Being able to trace past transactions using Anvil will be super useful https://github.com/foundry-rs/foundry/issues/2686
@mattsse Hello, could I pick up this issue, please? If on one is working on this
@timofeli did you end taking this up? i'm looking for something to work on but don't want to duplicate efforts.
@joaquinlpereyra yes I am working on it
@joaquinlpereyra Is this still being worked on?
Any progress on this? Being able to trace transactions before the fork block will be super helpful. https://github.com/foundry-rs/foundry/issues/2686
checking in, is anyone currently working on this or started working on this and has a draft?
pinging @timofeli. i haven't worked on it yet but might be able to.
This issue is now 6 months old but is extremely useful. The ability to run a locally forked Anvil node and trace transactions from before the fork is super powerful. See https://github.com/foundry-rs/foundry/issues/2686.
This is not something either Hardhat or Truffle can do.
For anyone else looking at this issue, I've built a copy command in tx2uml that replays a transaction to a local Anvil node. That way transactions can be traced on a local Anvil node.
Here are the tx2uml copy command docs https://github.com/naddison36/tx2uml#copy-command
Here's an example where an Anvil node is forked from the previous block and the tx is copied so local traces can be executed. https://github.com/naddison36/tx2uml/blob/98d238867c4f9c9d0231521f2167164f6d6d72b9/tests/tests.sh#L37
This is still a valuable feature to have
Component
Forge, Cast
Describe the feature you would like
As described here https://github.com/mds1/forge-trace-and-script-issue#issue-1-more-verbose-failure-messages-in-scripts
the tx failure error could be more verbose, we already have
cast run
which we could use to get the revert reason with some refactoringRunArgs
so it can be used as a standalone functionAdditional context
No response