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

Add a rawBroadcast style cheatcode #7221

Closed
valerioleo opened this issue Feb 23, 2024 · 2 comments
Closed

Add a rawBroadcast style cheatcode #7221

valerioleo opened this issue Feb 23, 2024 · 2 comments
Labels
A-cheatcodes Area: cheatcodes C-forge Command: forge T-feature Type: feature

Comments

@valerioleo
Copy link

valerioleo commented Feb 23, 2024

Component

Forge

Describe the feature you would like

This is a followup from Telegram conversation: https://t.me/foundry_support/50555

Complex Scripts can sometimes require broadcasting a pre-signed transaction, just as we would do with cast publish.

For example, if I want to test Seaport using @0age's keyless deployment of IMMUTABLE_CREATE2_FACTORY (as outlined in Seaport deployment guide).

A the moment, the only alternative I could find is to use vm.ffi in this way:

    string[] memory args = new string[](5);
    args[0] = 'cast';
    args[1] = 'publish';
    args[2] = '--rpc-url';
    args[3] = 'http://127.0.0.1:8545';
    args[4] = '0xf87e8085174876e800830186a08080ad601f80600e600039806000f350fe60003681823780368234f58015156014578182fd5b80825250506014600cf31ba02222222222222222222222222222222222222222222222222222222222222222a02222222222222222222222222222222222222222222222222222222222222222';

    vm.ffi(args);

However, having a vm.publish(signetTX) cheat code can make this process much simpler.

Note: to avoid race conditions, the cheat code should return only after the inclusion of that signed tx into a block (or a revert if it is failed).

Additional context

No response

@valerioleo valerioleo added the T-feature Type: feature label Feb 23, 2024
@tynes
Copy link
Contributor

tynes commented Feb 23, 2024

See #4931 for an initial implementation of this. I would definitely find this useful

@zerosnacks zerosnacks added A-cheatcodes Area: cheatcodes C-forge Command: forge labels Jun 27, 2024
@zerosnacks
Copy link
Member

Marking as a duplicate of #4816

#4931 is currently an active PR addressing this issue we are looking to get merged

@zerosnacks zerosnacks closed this as not planned Won't fix, can't repro, duplicate, stale Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cheatcodes Area: cheatcodes C-forge Command: forge T-feature Type: feature
Projects
None yet
Development

No branches or pull requests

3 participants