Skip to content

Commit

Permalink
feat(sdk): add cartesi-rollups-graphql binary
Browse files Browse the repository at this point in the history
  • Loading branch information
endersonmaia committed Dec 5, 2024
1 parent 1058736 commit 45efe41
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-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 CARTESI_ROLLUPS_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}

################################################################################
# cartesi-rollups-graphql installer
FROM base AS graphql
ARG CARTESI_ROLLUPS_GRAPHQL_VERSION
ARG TARGETOS
ARG TARGETARCH
RUN curl -fsSL https://github.com/Calindra/cartesi-rollups-graphql/releases/download/v${CARTESI_ROLLUPS_GRAPHQL_VERSION}/cartesi-rollups-graphql-v${CARTESI_ROLLUPS_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=graphql /usr/local/bin/cartesi-rollups-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"
CARTESI_ROLLUPS_GRAPHQL_VERSION = "2.1.1"
}
}

0 comments on commit 45efe41

Please sign in to comment.