Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
klkvr committed Jul 31, 2024
1 parent 0a17dbc commit 2b03254
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 148 deletions.
12 changes: 0 additions & 12 deletions .dockerignore

This file was deleted.

8 changes: 0 additions & 8 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "patches/solidity-legacy"]
path = patches/solidity-legacy
url = https://github.com/ipsilon/solidity.git
branch = eof-functions-rebased
[submodule "patches/solidity-eof"]
path = patches/solidity-eof
url = https://github.com/fgimenez/solidity.git
branch = eof-functions-rebased
42 changes: 4 additions & 38 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,48 +10,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& \
update-ca-certificates

COPY .git /app/.git
COPY .gitmodules /app

WORKDIR /app

RUN git submodule init && git submodule update --recursive

WORKDIR /app/patches/solidity-eof
WORKDIR /app/solidity
RUN git clone https://github.com/ipsilon/solidity . && git checkout c49b88b

RUN mkdir build && \
cd build && \
cmake .. -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS="-Wno-error=conversion" && \
make solc -j$(nproc)

WORKDIR /app/patches/solidity-legacy

RUN mkdir build && \
cd build && \
cmake .. -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS="-Wno-error=conversion" && \
make solc -j$(nproc)

FROM ubuntu:jammy-20240212

# Copy the compiled solc binary to a standard location
COPY --from=solc-builder /app/patches/solidity-legacy/build/solc/solc /usr/local/bin/solc-legacy
COPY --from=solc-builder /app/patches/solidity-eof/build/solc/solc /usr/local/bin/solc-eof
RUN chmod +x /usr/local/bin/solc-legacy && chmod +x /usr/local/bin/solc-eof

RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
git && \
curl -L https://foundry.paradigm.xyz | bash && \
~/.foundry/bin/foundryup && \
cp ~/.foundry/bin/* /usr/local/bin
ENV PATH="${HOME}/.foundry/bin:${PATH}"

COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

EXPOSE 8545

ENTRYPOINT ["/entrypoint.sh"]
WORKDIR /app/root
ENTRYPOINT ["/app/solidity/build/solc/solc"]
42 changes: 0 additions & 42 deletions Makefile

This file was deleted.

39 changes: 0 additions & 39 deletions entrypoint.sh

This file was deleted.

1 change: 1 addition & 0 deletions eof-solc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker run -i -v $(pwd):/app/root eof-solc "$@"
11 changes: 4 additions & 7 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@
src = "src"
out = "out"
libs = ["lib"]
evm_version = "Cancun"
optimizer = true
via_ir = true
prague = true
cbor_metadata = false
bytecode_hash = "none"

# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options
solc = "./eof-solc"
via_ir = true
evm_version = "prague"
eof_version = 1
1 change: 0 additions & 1 deletion patches/solidity-eof
Submodule solidity-eof deleted from 072602
1 change: 0 additions & 1 deletion patches/solidity-legacy
Submodule solidity-legacy deleted from 921422

0 comments on commit 2b03254

Please sign in to comment.