Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

fix: exclusive prank/broadcast #56

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions src/HuffConfig.sol
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,6 @@ contract HuffConfig {
string[] memory cleanup = new string[](2);
cleanup[0] = "rm";
cleanup[1] = string.concat("src/", tempFile, ".huff");

// set `msg.sender` for upcoming create context
vm.prank(deployer);


vm.ffi(cleanup);
}

Expand All @@ -232,7 +227,11 @@ contract HuffConfig {

/// @notice deploy the bytecode with the create instruction
address deployedAddress;
if (should_broadcast) vm.broadcast();
if (should_broadcast) {
vm.broadcast();
} else {
vm.prank(deployer);
}
assembly {
let val := sload(value.slot)
deployedAddress := create(val, add(concatenated, 0x20), mload(concatenated))
Expand Down