Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDK with ERC-4337 contracts and alto #46

Merged
merged 3 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/hot-spiders-cover.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cartesi/sdk": minor
---

add alto bundler
5 changes: 5 additions & 0 deletions .changeset/short-oranges-happen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cartesi/sdk": minor
---

bump devnet version to include ERC-4337 smart contracts
5 changes: 5 additions & 0 deletions .changeset/young-cycles-add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cartesi/sdk": minor
---

new anvil version with correct dumpState
10 changes: 9 additions & 1 deletion packages/sdk/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ curl -sSL https://github.com/google/go-containerregistry/releases/download/v${CR
tar -zx -C /usr/local/bin
EOF

# alto
FROM node:18.19.0-bookworm AS alto
endersonmaia marked this conversation as resolved.
Show resolved Hide resolved
ARG ALTO_VERSION
RUN npm install -g @pimlico/alto@${ALTO_VERSION}

# devnet files
FROM node:slim as devnet
ARG DEVNET_VERSION
Expand All @@ -72,6 +77,7 @@ apt-get install -y --no-install-recommends \
jq \
libarchive-tools \
locales \
nodejs \
squashfs-tools \
xxd \
xz-utils
Expand All @@ -97,18 +103,20 @@ ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en

# download anvil pre-compiled binaries
ARG ANVIL_VERSION=8b694bbcabaedffc0337bf8dea9a135da5694ef9
ARG ANVIL_VERSION=e90348416c3a831ab75bb43f6fa5f0a0be4106c4
RUN curl -sSL https://github.com/foundry-rs/foundry/releases/download/nightly-${ANVIL_VERSION}/foundry_nightly_linux_$(dpkg --print-architecture).tar.gz | \
tar -zx -C /usr/local/bin

# healthcheck script using net_listening JSON-RPC method
COPY alto /usr/local/bin
COPY devnet /usr/local/bin
COPY eth_isready /usr/local/bin
COPY eth_dump /usr/local/bin
COPY eth_load /usr/local/bin
COPY create_machine_snapshot /usr/local/bin

COPY entrypoint.sh /usr/local/bin/
COPY --from=alto /usr/local/lib/node_modules/@pimlico/alto /usr/local/lib/node_modules/@pimlico/alto
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/
Expand Down
2 changes: 2 additions & 0 deletions packages/sdk/alto
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
node "/usr/local/lib/node_modules/@pimlico/alto/esm/cli/index.js" $@
3 changes: 2 additions & 1 deletion packages/sdk/docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ target "default" {
SERVER_MANAGER_ORG = "cartesi"
SERVER_MANAGER_VERSION = "0.9.1"
CARTESI_IMAGE_KERNEL_VERSION = "0.19.1"
DEVNET_VERSION = "1.7.0"
ALTO_VERSION = "0.0.4"
DEVNET_VERSION = "1.8.0"
LINUX_KERNEL_VERSION = "6.5.9-ctsi-1-v0.19.1"
XGENEXT2_VERSION = "1.5.6"
}
Expand Down
Loading