Skip to content

Commit

Permalink
exports should group by name instead of all into one
Browse files Browse the repository at this point in the history
  • Loading branch information
hexonaut committed Aug 12, 2024
1 parent 41066f6 commit 23d2dc0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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 23d2dc0

Please sign in to comment.