From 5aedd8bbdb8183803ba883b1a14791e933e85f8f Mon Sep 17 00:00:00 2001 From: gnkz Date: Tue, 3 Oct 2023 10:57:45 -0300 Subject: [PATCH 1/3] fix: use forge@v1.6.1 --- lib/forge-std | 2 +- src/_modules/Json.sol | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/forge-std b/lib/forge-std index 705263c9..1d9650e9 160000 --- a/lib/forge-std +++ b/lib/forge-std @@ -1 +1 @@ -Subproject commit 705263c95892a906d7af65f0f73ce8a4a0c80b80 +Subproject commit 1d9650e951204a0ddce9ff89c32f1997984cef4d diff --git a/src/_modules/Json.sol b/src/_modules/Json.sol index 848c4f76..e83987f7 100644 --- a/src/_modules/Json.sol +++ b/src/_modules/Json.sol @@ -7,6 +7,12 @@ import {LibError, Error} from "./Error.sol"; import "./Accounts.sol"; import "./Vulcan.sol"; +/// Hacky interface to use the `serializeJson` vm cheatcode +/// TODO: remove +interface SerializeJson { + function serializeJson(string memory, string memory) external returns (string memory); +} + struct JsonObject { string id; string serialized; @@ -251,8 +257,10 @@ library json { return JsonError.Invalid().toJsonResult(); } + // TODO: remove hack to use the unreleased `serializeJson` Vm cheatcode + SerializeJson vm = SerializeJson(address(vulcan.hevm)); JsonObject memory jsonObj = create(); - jsonObj.serialized = vulcan.hevm.serializeJson(jsonObj.id, obj); + jsonObj.serialized = vm.serializeJson(jsonObj.id, obj); return Ok(jsonObj); } From 19f755c5e7fad6f7920c794c5527f7eeb045ddf5 Mon Sep 17 00:00:00 2001 From: gnkz Date: Tue, 3 Oct 2023 11:02:17 -0300 Subject: [PATCH 2/3] style: run forge fmt --- src/_modules/Json.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_modules/Json.sol b/src/_modules/Json.sol index e83987f7..6a23b55a 100644 --- a/src/_modules/Json.sol +++ b/src/_modules/Json.sol @@ -257,7 +257,7 @@ library json { return JsonError.Invalid().toJsonResult(); } - // TODO: remove hack to use the unreleased `serializeJson` Vm cheatcode + // TODO: remove hack to use the unreleased `serializeJson` Vm cheatcode SerializeJson vm = SerializeJson(address(vulcan.hevm)); JsonObject memory jsonObj = create(); jsonObj.serialized = vm.serializeJson(jsonObj.id, obj); From b3e2e3dd35d259dd634d9948e823432d556ad7f4 Mon Sep 17 00:00:00 2001 From: gnkz Date: Tue, 3 Oct 2023 11:06:10 -0300 Subject: [PATCH 3/3] docs: update installation instruccions --- README.md | 2 +- docs/src/guide/installation.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 04039cc8..2299a060 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Over time, Vulcan will grow to include more functionality and utilities, eventua ## Installation ``` -$ forge install nomoixyz/vulcan@v0.4.0 +$ forge install nomoixyz/vulcan@v0.4.1 ``` ## Usage diff --git a/docs/src/guide/installation.md b/docs/src/guide/installation.md index f38b8042..572a08e2 100644 --- a/docs/src/guide/installation.md +++ b/docs/src/guide/installation.md @@ -2,5 +2,5 @@ In an existing Foundry project, use `forge install`: ``` -$ forge install nomoixyz/vulcan@0.4.0 +$ forge install nomoixyz/vulcan@0.4.1 ```