Skip to content
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

Support tracing cheatcodes #827

Open
Jrigada opened this issue Jan 9, 2025 · 0 comments
Open

Support tracing cheatcodes #827

Jrigada opened this issue Jan 9, 2025 · 0 comments
Labels
cheatcode 🎮 Issue with a cheat code against zksync feature ➕ Feature item Internal ⚙️ p2 🟡 Indicates moderately high priority item upstream-parity 🟰 Needed for upstream feature parity

Comments

@Jrigada
Copy link
Contributor

Jrigada commented Jan 9, 2025

Component

Forge

Describe the feature you would like

Add support in Foundry-zksync for Resuming and pausing tracing.

  • vm.resumeTracing
  • vm.pauseTracing
    Test
    event DummyEvent(uint256 i);
    function call(uint256 i) public {
        emit DummyEvent(i);
    }
    function generate() public {
        for (uint256 i = 0; i < 10; i++) {
            if (i == 3) {
                vm.pauseTracing();
            }
            this.call(i);
            if (i == 7) {
                vm.resumeTracing();
            }
        }
    }
}
contract PauseTracingTest is Test {
    event DummyEvent(uint256 i);
    function setUp() public {
        emit DummyEvent(1);
        vm.pauseTracing();
        emit DummyEvent(2);
    }
    function test() public {
        emit DummyEvent(3);
        TraceGenerator t = new TraceGenerator();
        vm.resumeTracing();
        t.generate();
    }
}

Additional context

No response

@Jrigada Jrigada added feature ➕ Feature item needs triage ♟️ Issue needs to be picked up or assigned cheatcode 🎮 Issue with a cheat code against zksync p2 🟡 Indicates moderately high priority item Internal ⚙️ upstream-parity 🟰 Needed for upstream feature parity and removed needs triage ♟️ Issue needs to be picked up or assigned labels Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cheatcode 🎮 Issue with a cheat code against zksync feature ➕ Feature item Internal ⚙️ p2 🟡 Indicates moderately high priority item upstream-parity 🟰 Needed for upstream feature parity
Projects
None yet
Development

No branches or pull requests

1 participant