Skip to content

fix broken links #11

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

Merged
merged 1 commit into from
May 31, 2024
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 versioned_docs/version-1/config/continuous-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ variables:
GIT_SUBMODULE_STRATEGY: recursive

jobs:
image: ghcr.io/foxar-rs/foxar
image: ghcr.io/bchainhub/foxar
script:
- spark install
- spark test -vvv
Expand Down
8 changes: 4 additions & 4 deletions versioned_docs/version-1/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ foxarup --path path/to/foxar
Or, by using a single Cargo command:

```sh
cargo install --git https://github.com/foxar-rs/foxar --profile local --locked spark probe pilot shuttle
cargo install --git https://github.com/bchainhub/foxar --profile local --locked spark probe pilot shuttle
```

Or, by manually building from a local copy of the [Foxar repository](https://github.com/bchainhub/foxar):

```sh
# clone the repository
git clone https://github.com/foxar-rs/foxar.git
git clone https://github.com/bchainhub/foxar.git
cd foxar
# install Spark
cargo install --path ./crates/spark --profile local --force --locked
Expand All @@ -80,7 +80,7 @@ cargo install --path ./crates/pilot --profile local --force --locked

### Installing for CI in Github Action

See the [foxar-rs/foxar-toolchain](https://github.com/foxar-rs/foxar-toolchain) GitHub Action.
See the [bchainhub/foxar-toolchain](https://github.com/bchainhub/foxar-toolchain) GitHub Action.

### Using Foxar with Docker

Expand All @@ -89,7 +89,7 @@ Foxar can also be used entirely within a Docker container. If you don't have it,
Once installed, you can download the latest release by running:

```sh
docker pull ghcr.io/foxar-rs/foxar:latest
docker pull ghcr.io/bchainhub/foxar:latest
```

It is also possible to build the docker image locally. From the Foxar repository, run:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ If the test terminates without the call being made, the test fails.

> ℹ️ **Internal calls**
>
> This cheatcode does not currently work on internal calls. See issue [#432](https://github.com/foxar-rs/foxar/issues/432).
> This cheatcode does not currently work on internal calls. See issue [#432](https://github.com/bchainhub/foxar/issues/432).

### Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Reverted mock calls are in effect until [`clearMockedCalls`](./clear-mocked-call

> ℹ️ **Internal calls**
>
> This cheatcode does not currently work on internal calls. See issue [#432](https://github.com/foxar-rs/foxar/issues/432).
> This cheatcode does not currently work on internal calls. See issue [#432](https://github.com/bchainhub/foxar/issues/432).

### Examples

Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-1/reference/cheatcodes/mock-call.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Mocked calls are in effect until [`clearMockedCalls`](./clear-mocked-calls) is c

> ℹ️ **Internal calls**
>
> This cheatcode does not currently work on internal calls. See issue [#432](https://github.com/foxar-rs/foxar/issues/432).
> This cheatcode does not currently work on internal calls. See issue [#432](https://github.com/bchainhub/foxar/issues/432).

### Examples

Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-1/reference/cli/probe.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,5 @@ Options:
-h, --help Print help
-V, --version Print version

Find more information in the book: http://book.getfoxar.sh/reference/probe/probe.html
Find more information in the book: http://foxar.dev/reference/probe/probe.html
```
2 changes: 1 addition & 1 deletion versioned_docs/version-1/reference/cli/spark.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ Options:
-h, --help Print help
-V, --version Print version

Find more information in the book: http://book.getfoxar.sh/reference/spark/spark.html
Find more information in the book: http://foxar.dev/reference/spark/spark.html
```
2 changes: 1 addition & 1 deletion versioned_docs/version-1/reference/probe/probe.md
Original file line number Diff line number Diff line change
Expand Up @@ -317,4 +317,4 @@ Prints help information.

### BUGS

See https://github.com/foxar-rs/foxar/issues for issues.
See https://github.com/bchainhub/foxar/issues for issues.
6 changes: 3 additions & 3 deletions versioned_docs/version-1/tutorials/best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Additional best practices from [samsczun](https://twitter.com/samczsun)'s [How D

- If the contract is big and you want to split it over multiple files, group them logically like `MyContract.owner.t.sol`, `MyContract.deposits.t.sol`, etc.

1. Never make assertions in the `setUp` function, instead use a dedicated test like `test_SetUpState()` if you need to ensure your `setUp` function does what you expected. More info on why in [foxar-rs/foxar#1291](https://github.com/bchainhub/foxar/issues#1291)
1. Never make assertions in the `setUp` function, instead use a dedicated test like `test_SetUpState()` if you need to ensure your `setUp` function does what you expected. More info on why in [bchainhub/foxar#1291](https://github.com/bchainhub/foxar/issues#1291)

1. For unit tests, there are two major ways to organize the tests:

Expand Down Expand Up @@ -94,7 +94,7 @@ Additional best practices from [samsczun](https://twitter.com/samczsun)'s [How D

1. Name your constants and immutables using `ALL_CAPS_WITH_UNDERSCORES`, to make it easier to distinguish them from variables and functions.

1. When using assertions like `assertEq`, consider leveraging the last string param to make it easier to identify failures. These can be kept brief, or even just be numbers—they basically serve as a replacement for showing line numbers of the revert, e.g. `assertEq(x, y, "1")` or `assertEq(x, y, "sum1")`. *(Note: [foxar-rs/foxar#2328](https://github.com/bchainhub/foxar/issues#2328) tracks integrating this natively).*
1. When using assertions like `assertEq`, consider leveraging the last string param to make it easier to identify failures. These can be kept brief, or even just be numbers—they basically serve as a replacement for showing line numbers of the revert, e.g. `assertEq(x, y, "1")` or `assertEq(x, y, "sum1")`. *(Note: [bchainhub/foxar#2328](https://github.com/bchainhub/foxar/issues#2328) tracks integrating this natively).*

1. When testing events, prefer setting all `expectEmit` arguments to `true`, i.e. `vm.expectEmit(true, true, true, true)` or `vm.expectEmit()`. Benefits:

Expand All @@ -110,7 +110,7 @@ Additional best practices from [samsczun](https://twitter.com/samczsun)'s [How D

- Mocks are *required* in closed-source web2 development—you have to mock API responses because the code for that API isn't open source so you cannot just run it locally. But for blockchains that's not true: any code you're interacting with that's already deployed can be locally executed and even modified for free. So why introduce the risk of a wrong mock if you don't need to?
- A common reason to avoid fork tests and prefer mocks is that fork tests are slow. But this is not always true. By pinning to a block number, spark caches RPC responses so only the first run is slower, and subsequent runs are significantly faster. See [this benchmark](https://github.com/mds1/convex-shutdown-simulation/), where it took spark 7 minutes for the first run with a remote RPC, but only half a second once data was cached. [Alchemy](https://alchemy.com), [Infura](https://infura.io) and [Tenderly](https://tenderly.co) offer free archive data, so pinning to a block shouldn't be problematic.
<!-- - Note that the [foxar-toolchain](https://github.com/foxar-rs/foxar-toolchain) GitHub Action will cache RPC responses in CI by default, and it will also update the cache when you update your fork tests. -->
<!-- - Note that the [foxar-toolchain](https://github.com/bchainhub/foxar-toolchain) GitHub Action will cache RPC responses in CI by default, and it will also update the cache when you update your fork tests. -->

1. Be careful with fuzz tests on a fork to avoid burning through RPC requests with non-deterministic fuzzing. If the input to your fork fuzz test is some parameter which is used in an RPC call to fetch data (e.g. querying the token balance of an address), each run of a fuzz test uses at least 1 RPC request, so you'll quickly hit rate limits or usage limits. Solutions to consider:

Expand Down
6 changes: 3 additions & 3 deletions versioned_docs/version-1/tutorials/foxar-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The only installation required to run this tutorial is Docker, and optionally, a
Follow the [Docker installation instructions](../getting-started/installation#using-foxarup).

To keep future commands succinct, let's re-tag the image:
`docker tag ghcr.io/foxar-rs/foxar:latest foxar:latest`
`docker tag ghcr.io/bchainhub/foxar:latest foxar:latest`

Having Foxar installed locally is not strictly required, but it may be helpful for debugging. You can install it using [foxarup](../getting-started/installation.md#using-foxarup).

Expand Down Expand Up @@ -80,7 +80,7 @@ A simple `Dockerfile` can accomplish these two goals:

```docker
# Use the latest foxar image
FROM ghcr.io/foxar-rs/foxar
FROM ghcr.io/bchainhub/foxar

# Copy our source code into the container
WORKDIR /app
Expand Down Expand Up @@ -120,7 +120,7 @@ Now, we'll move on to a bit more of an advanced Dockerfile. Let's add an entrypo

```docker
# Use the latest foxar image
FROM ghcr.io/foxar-rs/foxar
FROM ghcr.io/bchainhub/foxar

# Copy our source code into the container
WORKDIR /app
Expand Down