Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
nnnnicholas committed Feb 15, 2023
1 parent 77a8bc2 commit 4871888
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,21 @@ Note: `foundry.toml`'s allows Forge to find libs in `/node_modules` without an e

## Project Handles
To test rendering Juicebox Project Handles in your SVG:

1. Switch to the `project-handles` branch.
2. Run `forge test --fork-url $RPC_URL -v --via-ir --ffi`, replacing `$RPC_URL` with your own RPC provider and API key. API providers include Infura and Alchemy. An RPC url might look like `https://mainnet.infura.io/v3/xyzabc123xyzabc123xyzabc123`.
3. If you append `--fork-block-number BLOCK_NUMBER` to the above, replacing `BLOCK_NUMBER` with a recent block height, Forge will cache the fork and the tests will run faster. Do not be surprised if values don't change when you set a new project handle onchain.
4. To fork Goerli instead of Mainnet, first swap which lines are commented in `SVG.t.sol`'s `setUp()` function, then run the command in step 2 with a Goerli RPC URL.

More information on Project Handles including its testnet address is available in [the Juicebox Docs](https://info.juicebox.money/dev/api/contracts/or-utilities/jbprojecthandles/).

## Onchain Typeface: Capsules
You can incorporate other onchain assets, such as Peripheralist's Capsules typeface, into your onchain SVG. The entire font is stored onchain, so you can incorporate it into your SVG art without worrying about offchain depenencies such as the fons built-in to the viewer's operating system, or a popular Fonts API being unavailable when the SVG is viewed.

To test rendering an SVG using Capsules:

1. Switch to the `typeface` branch
2. Run `forge test --fork-url $RPC_URL -v --via-ir --ffi`, replacing `$RPC_URL` with your own RPC provider and API key.

## Credits
This repo draws on work by [Jango](https://github.com/mejango), [DrGorilla](https://github.com/drgorillamd), [Peripheralist](https://github.com/peripheralist), and [Jeton Connu](https://github.com/jeton-connu).

0 comments on commit 4871888

Please sign in to comment.