Skip to content

Commit

Permalink
Exports should group by name instead of all into one (#45)
Browse files Browse the repository at this point in the history
* exports should group by name instead of all into one

* revert forge-std to master
  • Loading branch information
hexonaut authored Aug 14, 2024
1 parent 41066f6 commit eab651b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ScriptTools.sol
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ library ScriptTools {
*/
function exportContract(string memory name, string memory label, address addr) internal {
name = vm.envOr("FOUNDRY_EXPORTS_NAME", name);
string memory json = vm.serializeAddress(EXPORT_JSON_KEY, label, addr);
string memory json = vm.serializeAddress(string(abi.encodePacked(EXPORT_JSON_KEY, "_", name)), label, addr);
_doExport(name, json);
}

Expand All @@ -162,7 +162,7 @@ library ScriptTools {
*/
function exportValue(string memory name, string memory label, uint256 val) internal {
name = vm.envOr("FOUNDRY_EXPORTS_NAME", name);
string memory json = vm.serializeUint(EXPORT_JSON_KEY, label, val);
string memory json = vm.serializeUint(string(abi.encodePacked(EXPORT_JSON_KEY, "_", name)), label, val);
_doExport(name, json);
}

Expand All @@ -187,7 +187,7 @@ library ScriptTools {
*/
function exportValue(string memory name, string memory label, string memory val) internal {
name = vm.envOr("FOUNDRY_EXPORTS_NAME", name);
string memory json = vm.serializeString(EXPORT_JSON_KEY, label, val);
string memory json = vm.serializeString(string(abi.encodePacked(EXPORT_JSON_KEY, "_", name)), label, val);
_doExport(name, json);
}

Expand Down

0 comments on commit eab651b

Please sign in to comment.