diff --git a/.github/workflows/solidity.yml b/.github/workflows/solidity.yml index 0521620..590be59 100644 --- a/.github/workflows/solidity.yml +++ b/.github/workflows/solidity.yml @@ -81,6 +81,7 @@ jobs: path: | ./node_modules ~/.npm + ~/.bun/install/cache - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 @@ -89,10 +90,12 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 + + - uses: oven-sh/setup-bun@v2 - name: Install Node dependencies - run: npm install + run: bun install - name: Install circom if: github.repository == 'settlemint/solidity-zeto' @@ -106,7 +109,7 @@ jobs: - name: Install snarkjs if: github.repository == 'settlemint/solidity-zeto' run: | - npm install -g snarkjs@latest + bun install -g snarkjs@latest - name: Install zeto if: github.repository == 'settlemint/solidity-zeto' @@ -114,7 +117,7 @@ jobs: git clone https://github.com/victoryeo/zeto.git cd zeto cd zkp/circuits - npm install + bun install cd .. circom circuits/anon_enc_nullifier.circom --output ./js/lib --sym --wasm circom circuits/anon_enc.circom --output ./js/lib --sym --wasm @@ -368,7 +371,7 @@ jobs: # 📦 Packages | Package | Install | | ------- | -------------------- | - | React | `npm i @${{ github.repository_owner }}/${{ github.repository }}@${{ env.VERSION }}` | + | React | `bun add @${{ github.repository_owner }}/${{ github.repository }}@${{ env.VERSION }}` | - uses: stefanzweifel/git-auto-commit-action@v5 if: ${{ env.TAG == 'latest' }} diff --git a/Dockerfile b/Dockerfile index fcf9ba7..09a7c93 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,9 @@ FROM node:22.11.0 AS build +COPY --from=oven/bun:1.1.34-debian --chmod=0777 /usr/local/bin/bun /bin/bun +ENV BUN_RUNTIME_TRANSPILER_CACHE_PATH=0 +ENV BUN_INSTALL_BIN=/bin + RUN --mount=type=cache,sharing=locked,target=/var/cache/apt \ export DEBIAN_FRONTEND=noninteractive && \ apt-get update && \ @@ -19,9 +23,9 @@ WORKDIR /usecase USER root -RUN npm install +RUN bun install RUN forge build -RUN npx hardhat compile +RUN bunx hardhat compile FROM busybox:1.37.0 diff --git a/README.md b/README.md index 7b33432..b8e9cd0 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ forge init my-project --template settlemint/solidity-token-erc721 Or if you want to use this set as a dependency of your own, ```shell -npm install @settlemint/solidity-token-erc721 +bun install @settlemint/solidity-token-erc721 ``` ## DX: Foundry & Hardhat hybrid diff --git a/bun.lockb b/bun.lockb new file mode 100755 index 0000000..8b074a3 Binary files /dev/null and b/bun.lockb differ diff --git a/package.json b/package.json index 3d17f4e..28aeed7 100644 --- a/package.json +++ b/package.json @@ -49,5 +49,8 @@ "overrides": { "@graphprotocol/graph-cli": "0.88.0", "@graphprotocol/graph-ts": "0.35.1" - } + }, + "trustedDependencies": [ + "protobufjs" + ] }