Skip to content

Commit

Permalink
install foundry via foundry-js
Browse files Browse the repository at this point in the history
  • Loading branch information
holic committed Feb 16, 2024
1 parent ccc7b9e commit 9635c83
Show file tree
Hide file tree
Showing 12 changed files with 97 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"onCreateCommand": "curl -L https://foundry.paradigm.xyz | bash && /home/codespace/.foundry/bin/foundryup && pnpm install"
"onCreateCommand": "bash && pnpm install"
}
5 changes: 0 additions & 5 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ runs:
registry-url: https://registry.npmjs.org
cache: pnpm

- name: Setup foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

# pnpm no longer runs this before the actual install (https://github.com/pnpm/pnpm/issues/3760)
# but we need to create some placeholder files like bins so that the install step can find them and put references to them in the right spot
# this resolves some chicken-and-egg problems with using workspace bins before they're created (install -> build -> install)
Expand Down
9 changes: 0 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,6 @@ RUN wget https://dl.google.com/go/go1.20.4.linux-amd64.tar.gz && \
tar -C /usr/local/ -xzf go1.20.4.linux-amd64.tar.gz && \
go version

# foundry
ENV PATH="${PATH}:/root/.foundry/bin"
RUN curl -L https://foundry.paradigm.xyz/ | bash && \
${HOME}/.foundry/bin/foundryup && \
forge --version && \
cast --version && \
anvil --version && \
chisel --version

# pnpm
ENV PNPM_HOME="/pnpm"
ENV PATH="${PATH}:${PNPM_HOME}"
Expand Down
6 changes: 2 additions & 4 deletions docs/pages/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,15 @@ Before we begin let’s make sure your local environment is setup with the prope
## Prerequisites

1. git ([download](https://git-scm.com/downloads))
2. foundry (forge, anvil, cast) ([download](https://book.getfoundry.sh/getting-started/installation), make sure to `foundryup` at least once)
3. node.js (v16+) ([download](https://nodejs.org/en/download/))
4. pnpm (after installing node: `npm install --global pnpm`)
2. node.js (v16+) ([download](https://nodejs.org/en/download/))
3. pnpm (after installing node: `npm install --global pnpm`)

If you are using Windows:

**Windows steps**

1. install git bash (gitforwindows.org)
2. install `nodejs`, including “native modules” (nodejs.org/en/download) (re native modules: just keep the checkmark, it’s enabled by default in the installer)
3. Install foundry via foundryup using Git bash

## Project setup

Expand Down
5 changes: 2 additions & 3 deletions docs/pages/tutorials/emojimon/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
## Prerequisites

1. git ([download](https://git-scm.com/downloads))
2. foundry (forge, anvil, cast) ([download](https://book.getfoundry.sh/getting-started/installation), make sure to `foundryup` at least once)
3. node.js (v17+) ([download](https://nodejs.org/en/download/))
4. pnpm (`npm install pnpm --global` after installing node)
2. node.js (v17+) ([download](https://nodejs.org/en/download/))
3. pnpm (`npm install pnpm --global` after installing node)

## Setup

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
"dev": "turbo run dev --concurrency 100",
"dist-tag-rm": "pnpm recursive exec -- sh -c 'npm dist-tag rm $(cat package.json | jq -r \".name\") $TAG || true'",
"docs:generate:api": "bun scripts/render-api-docs.ts",
"foundryup": "curl -L https://foundry.paradigm.xyz | bash && bash ~/.foundry/bin/foundryup",
"gas-report": "pnpm run --recursive --parallel gas-report",
"lint": "pnpm prettier:check && eslint . --ext .ts --ext .tsx",
"prepare": "husky install && (forge --version || pnpm foundryup)",
"prepare": "husky install && forge --version",
"prettier": "prettier --write '**/*.{ts,tsx,css,md,mdx,sol}'",
"prettier:check": "prettier --check '**/*.{ts,tsx,css,md,mdx,sol}'",
"release:check": "changeset status --verbose --since=origin/main",
Expand All @@ -40,6 +39,7 @@
"chalk": "^5.2.0",
"eslint": "8.29.0",
"execa": "^7.0.0",
"foundry-js": "^1.0.63",
"husky": ">=6",
"lint-staged": ">=10",
"prettier": "^2.8.4",
Expand Down
84 changes: 81 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions templates/phaser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
"dev": "mprocs",
"dev:client": "pnpm --filter 'client' run dev",
"dev:contracts": "pnpm --filter 'contracts' dev",
"foundry:up": "curl -L https://foundry.paradigm.xyz | bash && bash $HOME/.foundry/bin/foundryup",
"mud:up": "pnpm mud set-version --tag main && pnpm install",
"prepare": "(forge --version || pnpm foundry:up)",
"prepare": "forge --version",
"test": "pnpm recursive run test"
},
"devDependencies": {
"@latticexyz/cli": "link:../../packages/cli",
"@typescript-eslint/eslint-plugin": "5.46.1",
"@typescript-eslint/parser": "5.46.1",
"eslint": "8.29.0",
"foundry-js": "^1.0.63",
"mprocs": "^0.6.4",
"rimraf": "^3.0.2",
"typescript": "5.1.6"
Expand Down
4 changes: 2 additions & 2 deletions templates/react-ecs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
"dev": "mprocs",
"dev:client": "pnpm --filter 'client' run dev",
"dev:contracts": "pnpm --filter 'contracts' dev",
"foundry:up": "curl -L https://foundry.paradigm.xyz | bash && bash $HOME/.foundry/bin/foundryup",
"mud:up": "pnpm mud set-version --tag main && pnpm install",
"prepare": "(forge --version || pnpm foundry:up)",
"prepare": "forge --version",
"test": "pnpm recursive run test"
},
"devDependencies": {
"@latticexyz/cli": "link:../../packages/cli",
"@typescript-eslint/eslint-plugin": "5.46.1",
"@typescript-eslint/parser": "5.46.1",
"eslint": "8.29.0",
"foundry-js": "^1.0.63",
"mprocs": "^0.6.4",
"rimraf": "^3.0.2",
"typescript": "5.1.6"
Expand Down
4 changes: 2 additions & 2 deletions templates/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
"dev": "mprocs",
"dev:client": "pnpm --filter 'client' run dev",
"dev:contracts": "pnpm --filter 'contracts' dev",
"foundry:up": "curl -L https://foundry.paradigm.xyz | bash && bash $HOME/.foundry/bin/foundryup",
"mud:up": "pnpm mud set-version --tag main && pnpm install",
"prepare": "(forge --version || pnpm foundry:up)",
"prepare": "forge --version",
"test": "pnpm recursive run test"
},
"devDependencies": {
"@latticexyz/cli": "link:../../packages/cli",
"@typescript-eslint/eslint-plugin": "5.46.1",
"@typescript-eslint/parser": "5.46.1",
"eslint": "8.29.0",
"foundry-js": "^1.0.63",
"mprocs": "^0.6.4",
"rimraf": "^3.0.2",
"typescript": "5.1.6"
Expand Down
4 changes: 2 additions & 2 deletions templates/threejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
"dev": "mprocs",
"dev:client": "pnpm --filter 'client' run dev",
"dev:contracts": "pnpm --filter 'contracts' dev",
"foundry:up": "curl -L https://foundry.paradigm.xyz | bash && bash $HOME/.foundry/bin/foundryup",
"mud:up": "pnpm mud set-version --tag main && pnpm install",
"prepare": "(forge --version || pnpm foundry:up)",
"prepare": "forge --version",
"test": "pnpm recursive run test"
},
"devDependencies": {
"@latticexyz/cli": "link:../../packages/cli",
"@typescript-eslint/eslint-plugin": "5.46.1",
"@typescript-eslint/parser": "5.46.1",
"eslint": "8.29.0",
"foundry-js": "^1.0.63",
"mprocs": "^0.6.4",
"rimraf": "^3.0.2",
"typescript": "5.1.6"
Expand Down
3 changes: 1 addition & 2 deletions templates/vanilla/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
"dev": "mprocs",
"dev:client": "pnpm --filter 'client' run dev",
"dev:contracts": "pnpm --filter 'contracts' dev",
"foundry:up": "curl -L https://foundry.paradigm.xyz | bash && bash $HOME/.foundry/bin/foundryup",
"mud:up": "pnpm mud set-version --tag main && pnpm install",
"prepare": "(forge --version || pnpm foundry:up)",
"prepare": "forge --version",
"test": "pnpm recursive run test"
},
"devDependencies": {
Expand Down

0 comments on commit 9635c83

Please sign in to comment.