Skip to content
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
20 changes: 20 additions & 0 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
Loading