diff --git a/src/HuffDeployer.sol b/src/HuffDeployer.sol index a7fa035..a4eacb3 100755 --- a/src/HuffDeployer.sol +++ b/src/HuffDeployer.sol @@ -18,8 +18,11 @@ library HuffDeployer { return config().deploy(fileName); } - function broadcast(string memory filename) internal returns (address) { - return config().set_broadcast(true).deploy(filename); + /// @notice Compiles a Huff contract and returns the address that the contract was deployeod to + /// @param fileName - The file name of the Huff contract. For example, the file name for "SimpleStore.huff" is "SimpleStore" + /// @return The address that the contract was deployed to + function broadcast(string memory fileName) internal returns (address) { + return config().set_broadcast(true).deploy(fileName); } /// @notice Compiles a Huff contract and returns the address that the contract was deployeod to diff --git a/src/test/HuffConfig.t.sol b/src/test/HuffConfig.t.sol index 575883f..fbcaa2f 100644 --- a/src/test/HuffConfig.t.sol +++ b/src/test/HuffConfig.t.sol @@ -39,4 +39,10 @@ contract HuffConfigTest is Test { assertEq(key, k); assertEq(value, v); } + + function testSetBroadcast(bool broadcast) public { + config.set_broadcast(broadcast); + bool b = config.should_broadcast(); + assertEq(b, broadcast); + } }