Skip to content

Commit

Permalink
feat(sdk): add cartesi-rollups-hl-graphql binary
Browse files Browse the repository at this point in the history
  • Loading branch information
endersonmaia committed Dec 3, 2024
1 parent 1058736 commit 4ebfc18
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/long-stingrays-work.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cartesi/sdk": major
---

add cartesi-rollups-hl-graphql binary
11 changes: 11 additions & 0 deletions packages/sdk/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ ARG CRANE_VERSION
ARG NODEJS_VERSION
ARG SU_EXEC_VERSION
ARG ANVIL_VERSION
ARG HL_GRAPHQL_VERSION

################################################################################
# base image
Expand Down Expand Up @@ -71,6 +72,15 @@ FROM node:${NODEJS_VERSION}-bookworm AS devnet
ARG DEVNET_VERSION
RUN npm install -g @cartesi/devnet@${DEVNET_VERSION}

################################################################################
# hl-graphql installer
FROM base as hl-graphql

Check warning on line 77 in packages/sdk/Dockerfile

View workflow job for this annotation

GitHub Actions / build

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
ARG HL_GRAPHQL_VERSION
ARG TARGETOS
ARG TARGETARCH
RUN curl -fsSL https://github.com/Calindra/cartesi-rollups-hl-graphql/releases/download/v${HL_GRAPHQL_VERSION}/cartesi-rollups-hl-graphql-v${HL_GRAPHQL_VERSION}-${TARGETOS}-${TARGETARCH}.tar.gz \
| tar -xzf - -C /usr/local/bin

################################################################################
# sdk final image
FROM base
Expand Down Expand Up @@ -143,6 +153,7 @@ COPY --from=su-exec /usr/local/src/su-exec /usr/local/bin/
COPY --from=crane /usr/local/bin/crane /usr/local/bin/
COPY --from=devnet /usr/local/lib/node_modules/@cartesi/devnet/export/abi/localhost.json /usr/share/cartesi/
COPY --from=devnet /usr/local/lib/node_modules/@cartesi/devnet/build/anvil_state.json /usr/share/cartesi/
COPY --from=hl-graphql /usr/local/bin/cartesi-rollups-hl-graphql /usr/local/bin/
RUN mkdir -p /tmp/.cartesi && chmod 1777 /tmp/.cartesi

# Install cartesi-machine emulator
Expand Down
1 change: 1 addition & 0 deletions packages/sdk/docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ target "default" {
NODEJS_VERSION = "18.19.0"
SU_EXEC_VERSION = "0.2"
ANVIL_VERSION = "2044faec64f99a21f0e5f0094458a973612d0712"
HL_GRAPHQL_VERSION = "2.1.1"
}
}

0 comments on commit 4ebfc18

Please sign in to comment.