Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use [email protected] #210

Merged
merged 3 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/[email protected].0
$ forge install nomoixyz/[email protected].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/[email protected].0
$ forge install nomoixyz/[email protected].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