Skip to content

Commit 14478fc

Browse files
authored
docs: document forge-std version requirements (#290)
Signed-off-by: Luis Mastrangelo <luis@swirldslabs.com>
1 parent bada845 commit 14478fc

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

FAQ.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,26 @@ That is why when trying to get the code, for example using `cast code --rpc-url
2626
address of the HTS System Contract, you get `0xfe`.
2727
That leads to the error `EvmError: InvalidFEOpcode` mentioned in the question.
2828

29+
### Why am I getting error "`Member "keyExistsJson" not found or not visible`" when compiling my project?
30+
31+
If you get the following error when compiling your project
32+
33+
```console
34+
$ forge build
35+
[...]
36+
Error: Compiler run failed:
37+
Error (9582): Member "keyExistsJson" not found or not visible after argument-dependent lookup in contract Vm.
38+
```
39+
40+
it is because your `forge-std` dependency is outdated.
41+
You can [update](https://book.getfoundry.sh/reference/forge/forge-update) `forge-std` with
42+
43+
```sh
44+
forge update lib/forge-std
45+
```
46+
47+
See [_&sect; Requirements_](./README.md#requirements) for the full list of requirements needed to compile your project.
48+
2949
## Hardhat
3050

3151
### What causes the error `ProviderError: No known hardfork for execution`

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ First, install our library in your Foundry project
4646
forge install hashgraph/hedera-forking
4747
```
4848

49+
#### Requirements
50+
51+
Ensure your project meets the following requirements
52+
53+
- `forge-std` [`>= v1.8.0`](https://github.com/foundry-rs/forge-std/releases/tag/v1.8.0)
54+
4955
### Set up
5056

5157
To use this library in your tests, you need to enable [`ffi`](https://book.getfoundry.sh/cheatcodes/ffi).
@@ -183,7 +189,6 @@ Foundry allows you to run Solidity Scripts to interact with a remote network usi
183189
See [_Scripting with Solidity_](https://book.getfoundry.sh/guides/scripting-with-solidity) for more information on the topic.
184190

185191
To enable Foundry Scripts to work with HTS, you can use `htsSetup()` as described in the previous section.
186-
You can include
187192
For example
188193

189194
```solidity examples/foundry-hts/script/CreateToken.s.sol
@@ -252,6 +257,10 @@ previewnet = "https://previewnet.hashio.io/api"
252257
localnode = "http://localhost:7546"
253258
```
254259

260+
> [!IMPORTANT]
261+
> Make sure to include the `--skip-simulation` flag when running `forge script`.
262+
> Otherwise you will get [`EvmError: InvalidFEOpcode`](./FAQ.md#what-causes-the-error-evmerror-invalidfeopcode).
263+
255264
## Hardhat plugin
256265

257266
We provide a Hardhat plugin that enables fork testing when using HTS Tokens.

0 commit comments

Comments
 (0)