Skip to content

Commit

Permalink
fix: use forge@v1.6.1 (#210)
Browse files Browse the repository at this point in the history
* fix: use forge@v1.6.1

* style: run forge fmt

* docs: update installation instruccions
  • Loading branch information
gnkz authored Oct 3, 2023
1 parent 0dbd3f7 commit bda8bf0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/src/guide/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
2 changes: 1 addition & 1 deletion lib/forge-std
Submodule forge-std updated 2 files
+0 −4 src/StdJson.sol
+0 −1 src/Vm.sol
10 changes: 9 additions & 1 deletion src/_modules/Json.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit bda8bf0

Please sign in to comment.