foundry-huff icon indicating copy to clipboard operation
foundry-huff copied to clipboard

Fix Active Prank Issue Causing Deploy Crash During Broadcast

Open vnmrtz opened this issue 2 years ago • 0 comments

There is a bug within the existing implementation of the deploy function in HuffConfig.sol. Specifically, if a user intends to broadcast the deployment of the huff contract to a network, the ongoing active prank in the creation_code_with_args function disrupts the transaction flow, leading to a transaction failure. Consequently, this renders the deployment of huff contracts across any network utilising this framework unfeasible. The resultant console output below underscores this situation:

Error: 
You have an active prank. Broadcasting and pranks are not compatible. Disable one or the other

To address this predicament, I've incorporated the vm.stopPrank() invocation just prior to the commencement of the broadcast. This strategic inclusion effectively resolves the bug:

Script ran successfully.

vnmrtz avatar Aug 22 '23 12:08 vnmrtz