diff --git a/FAQ.md b/FAQ.md index 0d1c7627..59580de9 100644 --- a/FAQ.md +++ b/FAQ.md @@ -26,6 +26,26 @@ That is why when trying to get the code, for example using `cast code --rpc-url address of the HTS System Contract, you get `0xfe`. That leads to the error `EvmError: InvalidFEOpcode` mentioned in the question. +### Why am I getting error "`Member "keyExistsJson" not found or not visible`" when compiling my project? + +If you get the following error when compiling your project + +```console +$ forge build +[...] +Error: Compiler run failed: +Error (9582): Member "keyExistsJson" not found or not visible after argument-dependent lookup in contract Vm. +``` + +it is because your `forge-std` dependency is outdated. +You can [update](https://book.getfoundry.sh/reference/forge/forge-update) `forge-std` with + +```sh +forge update lib/forge-std +``` + +See [_§ Requirements_](./README.md#requirements) for the full list of requirements needed to compile your project. + ## Hardhat ### What causes the error `ProviderError: No known hardfork for execution` diff --git a/README.md b/README.md index b7e80a22..67bbfc74 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,12 @@ First, install our library in your Foundry project forge install hashgraph/hedera-forking ``` +#### Requirements + +Ensure your project meets the following requirements + +- `forge-std` [`>= v1.8.0`](https://github.com/foundry-rs/forge-std/releases/tag/v1.8.0) + ### Set up 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 See [_Scripting with Solidity_](https://book.getfoundry.sh/guides/scripting-with-solidity) for more information on the topic. To enable Foundry Scripts to work with HTS, you can use `htsSetup()` as described in the previous section. -You can include For example ```solidity examples/foundry-hts/script/CreateToken.s.sol @@ -252,6 +257,10 @@ previewnet = "https://previewnet.hashio.io/api" localnode = "http://localhost:7546" ``` +> [!IMPORTANT] +> Make sure to include the `--skip-simulation` flag when running `forge script`. +> Otherwise you will get [`EvmError: InvalidFEOpcode`](./FAQ.md#what-causes-the-error-evmerror-invalidfeopcode). + ## Hardhat plugin We provide a Hardhat plugin that enables fork testing when using HTS Tokens.