From 13ff56ad9305851fc42c7a8453b7027bd8b7e787 Mon Sep 17 00:00:00 2001 From: Enderson Maia Date: Tue, 3 Dec 2024 11:07:39 -0300 Subject: [PATCH 1/2] feat(sdk): add cartesi-rollups-graphql binary --- .changeset/long-stingrays-work.md | 5 +++++ packages/sdk/Dockerfile | 11 +++++++++++ packages/sdk/docker-bake.hcl | 1 + 3 files changed, 17 insertions(+) create mode 100644 .changeset/long-stingrays-work.md diff --git a/.changeset/long-stingrays-work.md b/.changeset/long-stingrays-work.md new file mode 100644 index 00000000..d61a21a6 --- /dev/null +++ b/.changeset/long-stingrays-work.md @@ -0,0 +1,5 @@ +--- +"@cartesi/sdk": major +--- + +add cartesi-rollups-graphql binary diff --git a/packages/sdk/Dockerfile b/packages/sdk/Dockerfile index 7bc3b4dd..589dea32 100644 --- a/packages/sdk/Dockerfile +++ b/packages/sdk/Dockerfile @@ -8,6 +8,7 @@ ARG CRANE_VERSION ARG NODEJS_VERSION ARG SU_EXEC_VERSION ARG ANVIL_VERSION +ARG CARTESI_ROLLUPS_GRAPHQL_VERSION ################################################################################ # base image @@ -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 @@ -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 diff --git a/packages/sdk/docker-bake.hcl b/packages/sdk/docker-bake.hcl index fdd65555..948d7f43 100644 --- a/packages/sdk/docker-bake.hcl +++ b/packages/sdk/docker-bake.hcl @@ -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" } } From db74e30816698c5a8627fa069ab196e2edbf2540 Mon Sep 17 00:00:00 2001 From: Danilo Tuler Date: Wed, 8 Jan 2025 11:08:20 -0500 Subject: [PATCH 2/2] fixup! feat(sdk): add cartesi-rollups-graphql binary --- packages/sdk/Dockerfile | 4 ++-- packages/sdk/docker-bake.hcl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/sdk/Dockerfile b/packages/sdk/Dockerfile index 589dea32..7eafd416 100644 --- a/packages/sdk/Dockerfile +++ b/packages/sdk/Dockerfile @@ -78,7 +78,7 @@ 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 \ +RUN curl -fsSL https://github.com/cartesi/rollups-graphql/releases/download/v${CARTESI_ROLLUPS_GRAPHQL_VERSION}/rollups-graphql-v${CARTESI_ROLLUPS_GRAPHQL_VERSION}-${TARGETOS}-${TARGETARCH}.tar.gz \ | tar -xzf - -C /usr/local/bin ################################################################################ @@ -153,7 +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/ +COPY --from=graphql /usr/local/bin/rollups-graphql /usr/local/bin/cartesi-rollups-graphql RUN mkdir -p /tmp/.cartesi && chmod 1777 /tmp/.cartesi # Install cartesi-machine emulator diff --git a/packages/sdk/docker-bake.hcl b/packages/sdk/docker-bake.hcl index 948d7f43..88506a82 100644 --- a/packages/sdk/docker-bake.hcl +++ b/packages/sdk/docker-bake.hcl @@ -16,6 +16,6 @@ target "default" { NODEJS_VERSION = "18.19.0" SU_EXEC_VERSION = "0.2" ANVIL_VERSION = "2044faec64f99a21f0e5f0094458a973612d0712" - CARTESI_ROLLUPS_GRAPHQL_VERSION = "2.1.1" + CARTESI_ROLLUPS_GRAPHQL_VERSION = "2.2.2" } }