Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
214 commits
Select commit Hold shift + click to select a range
d815dd6
EVM backend demo for Ethscriptions
RogerPodacter Sep 9, 2025
6e65804
Add ERC-20 token functionality to Ethscriptions
RogerPodacter Sep 10, 2025
0e19880
Add L1 provability system for Ethscriptions via OP Stack
RogerPodacter Sep 10, 2025
f1ff6b0
Update contracts/src/Ethscriptions.sol
RogerPodacter Sep 10, 2025
20a96e4
Add compression support for Ethscriptions storage
RogerPodacter Sep 12, 2025
842276f
Use soldeer, don't use via_ir
RogerPodacter Sep 12, 2025
91983af
Add L2 genesis state generation with minimal OP Stack predeploys
RogerPodacter Sep 12, 2025
51563f5
Add Ethscriptions contracts to L2 genesis
RogerPodacter Sep 12, 2025
8115052
Add genesis ethscription data
RogerPodacter Sep 12, 2025
ada1d75
Support burning Ethscriptions via transfer to address(0)
RogerPodacter Sep 12, 2025
2a9c5c8
Initial geth communication and tx creation logic
RogerPodacter Sep 15, 2025
3a99810
Refactor Ethscriptions to use token ID as ethscription number
RogerPodacter Sep 16, 2025
db8890a
Give Ethscriptions.sol predeploy a cooler address
RogerPodacter Sep 16, 2025
4de0e5e
Refactor Ethscriptions storage architecture for 33% gas savings
RogerPodacter Sep 16, 2025
7e3270d
Refactor Ethscriptions contract to use updated predeploy address and …
RogerPodacter Sep 16, 2025
de278ab
Helper contract failure shouldn't abort ethscription action
RogerPodacter Sep 16, 2025
48ba566
Emit events for Genesis ethscriptions
RogerPodacter Sep 16, 2025
5fa7eea
Fix text ethscription display
RogerPodacter Sep 16, 2025
bfcb920
Fix erc-20 token params extraction
RogerPodacter Sep 17, 2025
a77e637
Fix block validation string comparison encoding bug
RogerPodacter Sep 17, 2025
89c2954
Add image building gh action
RogerPodacter Sep 17, 2025
59d0343
Add Dockerfile
RogerPodacter Sep 17, 2025
d1bd3fe
Remove database dependency
RogerPodacter Sep 17, 2025
5ecaf30
Remove db dep
RogerPodacter Sep 17, 2025
939c6e4
Add docker-compose.yml
RogerPodacter Sep 17, 2025
cc22fbd
Improve import validation
RogerPodacter Sep 17, 2025
eda82ab
Set exact 0.8.30 version on all contracts
RogerPodacter Sep 17, 2025
026b1ae
Refactor ethscription transaction building architecture
RogerPodacter Sep 18, 2025
e779d04
Merge pull request #104 from ethscriptions-protocol/refactor_ethscrip…
RogerPodacter Sep 18, 2025
a299d80
Move to supported Solidity version + housekeeping
RogerPodacter Sep 18, 2025
808251d
Simplify
RogerPodacter Sep 18, 2025
52944b7
Make import faster
RogerPodacter Sep 18, 2025
f560d0b
Merge pull request #105 from ethscriptions-protocol/make_import_faster
RogerPodacter Sep 18, 2025
9cd4344
Various
RogerPodacter Sep 18, 2025
1386b82
Add combined getEthscriptionWithContent method
RogerPodacter Sep 20, 2025
3e26e67
Handle duplicate ethscription prevention at the contract level
RogerPodacter Sep 20, 2025
ed9d2cd
Fixes
RogerPodacter Sep 20, 2025
56ac4c1
Clean up
RogerPodacter Sep 20, 2025
0b40c0c
Merge pull request #106 from ethscriptions-protocol/remove_already_seen
RogerPodacter Sep 20, 2025
acd61e0
Remove old Rails files
RogerPodacter Sep 22, 2025
64a1ae8
Merge pull request #107 from ethscriptions-protocol/evm-backend-demo
RogerPodacter Sep 22, 2025
fd95c00
Decouple validation from import
RogerPodacter Sep 22, 2025
a233ccd
Update app/jobs/gap_detection_job.rb
RogerPodacter Sep 22, 2025
65acb7c
Improve validation error visibility
RogerPodacter Sep 22, 2025
f8cbc48
Update lib/l1_rpc_prefetcher.rb
RogerPodacter Sep 22, 2025
b90f970
Fixes
RogerPodacter Sep 22, 2025
8e8f10e
Improve logging, add misc files
RogerPodacter Sep 22, 2025
521a4b7
Merge pull request #108 from ethscriptions-protocol/decouple
RogerPodacter Sep 22, 2025
1356618
Fix docker setup
RogerPodacter Sep 22, 2025
e358bf2
Remove old tests
RogerPodacter Sep 22, 2025
3ec8afd
Misc changes
RogerPodacter Sep 23, 2025
da9739e
Add tests
RogerPodacter Sep 23, 2025
1a829b1
Merge pull request #110 from ethscriptions-protocol/add_tests
RogerPodacter Sep 23, 2025
6e551c0
Remove old scripts
RogerPodacter Sep 23, 2025
1e43457
Test-related fixes
RogerPodacter Sep 23, 2025
c70b9b8
Validate in docker
RogerPodacter Sep 24, 2025
74ab212
Better handlng of transient validation errors
RogerPodacter Sep 24, 2025
7f5854b
Cleanup
RogerPodacter Sep 24, 2025
737752e
Fix method name
RogerPodacter Sep 24, 2025
d36d05d
Add backtrace
RogerPodacter Sep 24, 2025
bd6d0d7
Merge pull request #111 from ethscriptions-protocol/transient_validat…
RogerPodacter Sep 24, 2025
62596f4
Fix genesis
RogerPodacter Sep 24, 2025
ac50f90
Fix error type
RogerPodacter Sep 24, 2025
23f1c6f
Instrument gap count
RogerPodacter Sep 24, 2025
0accdc9
Improve prover setup
RogerPodacter Sep 24, 2025
824ac43
Simplify
RogerPodacter Sep 24, 2025
4bf7e1f
Update contracts/test/EthscriptionsProver.t.sol
RogerPodacter Sep 24, 2025
f159468
Storage => memory
RogerPodacter Sep 24, 2025
b7f39cd
Merge pull request #112 from ethscriptions-protocol/improve_prover
RogerPodacter Sep 24, 2025
29d3ec9
Implement collections and more generic protocol framework
RogerPodacter Sep 24, 2025
3314f16
Retry validation in more cases
RogerPodacter Sep 25, 2025
18be21d
Fix errors
RogerPodacter Sep 25, 2025
c44d362
Merge pull request #114 from ethscriptions-protocol/retry_validation
RogerPodacter Sep 25, 2025
0c328be
Update docker compose
RogerPodacter Sep 25, 2025
93b33a2
Merge branch 'evm-backend-demo' into collection_protocol
RogerPodacter Sep 25, 2025
88d6def
Cleanup
RogerPodacter Sep 25, 2025
823f06e
Generic protocol framework
RogerPodacter Sep 29, 2025
24b4aa6
Simplify
RogerPodacter Oct 10, 2025
9d5ecff
Disable collections by default
RogerPodacter Oct 10, 2025
4af6943
ESIP6 fix
RogerPodacter Oct 10, 2025
cac6d49
Fixes
RogerPodacter Oct 13, 2025
28d6bf9
Fixes
RogerPodacter Oct 13, 2025
ae9d933
Merge pull request #113 from ethscriptions-protocol/collection_protocol
RogerPodacter Oct 13, 2025
b260fa9
Improve prefetcher
RogerPodacter Oct 13, 2025
d86287e
Merge pull request #117 from ethscriptions-protocol/improve_prefetcher
RogerPodacter Oct 13, 2025
19f33c6
Fix data uri normalization bug
RogerPodacter Oct 13, 2025
3922db3
Simplify
RogerPodacter Oct 13, 2025
623256c
Merge pull request #118 from ethscriptions-protocol/fix_data_uri
RogerPodacter Oct 13, 2025
232e539
Predeploys should be proxies
RogerPodacter Oct 14, 2025
30bf95c
Merge pull request #119 from ethscriptions-protocol/predeploy_proxies
RogerPodacter Oct 14, 2025
5dcdcf2
Improve text viewer
RogerPodacter Oct 14, 2025
2279f2d
Update token mint logic
RogerPodacter Oct 14, 2025
29dc822
Use IPC instead of HTTP for performance
RogerPodacter Oct 16, 2025
47034f0
Merge pull request #120 from ethscriptions-protocol/use_ipc
RogerPodacter Oct 16, 2025
2dd7fcb
Fix test
RogerPodacter Oct 16, 2025
73cebe7
Don't prove historical ethscription transfers
RogerPodacter Oct 16, 2025
9a41741
Cleanup
RogerPodacter Oct 16, 2025
c92961d
Enable address(0) erc20 balances to match ethscription behavior
RogerPodacter Oct 16, 2025
dd5038f
Move files around
RogerPodacter Oct 16, 2025
9d82ffe
Fix _mint / _update semantics
RogerPodacter Oct 16, 2025
d1523b5
Merge pull request #121 from ethscriptions-protocol/fix_erc20
RogerPodacter Oct 16, 2025
7f16c80
Update docker-compose/docker-compose.yml
RogerPodacter Oct 16, 2025
a9d6846
Update docker compose
RogerPodacter Oct 16, 2025
96c5e5e
Fix access and entrypoint
RogerPodacter Oct 16, 2025
a303cc0
Remove old files
RogerPodacter Oct 16, 2025
cc0073a
Refactor contracts
RogerPodacter Oct 17, 2025
01567bb
Refactor other contracts
RogerPodacter Oct 17, 2025
e28f496
Fix test
RogerPodacter Oct 17, 2025
3be3820
Merge pull request #122 from ethscriptions-protocol/refactor
RogerPodacter Oct 17, 2025
fe5c2b5
Cleanup
RogerPodacter Oct 17, 2025
3ba345a
Optimize contracts
RogerPodacter Oct 17, 2025
33c8891
Simplify
RogerPodacter Oct 17, 2025
d970ae2
Merge pull request #123 from ethscriptions-protocol/optimize
RogerPodacter Oct 17, 2025
887867f
Simplify tokens
RogerPodacter Oct 17, 2025
9d57d6e
Merge pull request #124 from ethscriptions-protocol/simplify
RogerPodacter Oct 17, 2025
8aacf4b
Fix comment
RogerPodacter Oct 17, 2025
03500ae
Remove genesis allocs
RogerPodacter Oct 17, 2025
2d9a931
Remove unused gems
RogerPodacter Oct 17, 2025
8210799
Refactor
RogerPodacter Oct 21, 2025
8f833bd
Add file
RogerPodacter Oct 21, 2025
0f47d8d
Merge pull request #125 from ethscriptions-protocol/recator
RogerPodacter Oct 21, 2025
13fe018
Big rename and reorg
RogerPodacter Oct 21, 2025
1fe37ed
Merge branch 'evm-backend-demo' into recator
RogerPodacter Oct 21, 2025
3260421
Cleanup
RogerPodacter Oct 21, 2025
b13cd10
Merge pull request #126 from ethscriptions-protocol/recator
RogerPodacter Oct 21, 2025
b17f2a9
Log less
RogerPodacter Oct 21, 2025
9e2df38
Update Proxy
RogerPodacter Oct 21, 2025
a308e2c
Update README
RogerPodacter Oct 21, 2025
3e8b000
Big rename
RogerPodacter Oct 22, 2025
83e4f49
Fixes
RogerPodacter Oct 22, 2025
5bea0d5
Merge pull request #127 from ethscriptions-protocol/rename
RogerPodacter Oct 22, 2025
660b651
Use upgradeable proxies for tokens and collections
RogerPodacter Oct 22, 2025
79e6dc0
Merge branch 'evm-backend-demo' into rename
RogerPodacter Oct 22, 2025
e3106d2
Merge pull request #128 from ethscriptions-protocol/rename
RogerPodacter Oct 22, 2025
822408e
More efficient enumerable
RogerPodacter Oct 22, 2025
f2a74db
Merge branch 'evm-backend-demo' into rename
RogerPodacter Oct 22, 2025
c0b8975
Fix slot
RogerPodacter Oct 22, 2025
91cb359
Merge pull request #129 from ethscriptions-protocol/rename
RogerPodacter Oct 22, 2025
a52fa7e
Simplify example config
RogerPodacter Oct 22, 2025
3043a3e
Big rename
RogerPodacter Oct 23, 2025
76920d7
Fixes
RogerPodacter Oct 23, 2025
7c5e457
Update spec/integration/token_protocol_e2e_spec.rb
RogerPodacter Oct 23, 2025
8992c1d
Merge pull request #130 from ethscriptions-protocol/rename
RogerPodacter Oct 23, 2025
1e5c78f
Update docker env example
RogerPodacter Oct 23, 2025
c168c91
Validation fixes
RogerPodacter Oct 29, 2025
557a7ff
Be more lenient about base64 data uris
RogerPodacter Oct 30, 2025
356f2c7
Remove SSTORE2 chunking now that we removed the contract size cap in …
RogerPodacter Nov 4, 2025
51cc758
Merge pull request #131 from ethscriptions-protocol/uncapped_sstore2
RogerPodacter Nov 4, 2025
54da1d1
Add BytePackLib for efficient content storage
RogerPodacter Nov 4, 2025
346a704
Fixes and tests
RogerPodacter Nov 4, 2025
08d416c
Cleanup
RogerPodacter Nov 4, 2025
9bcb6e3
Merge pull request #132 from ethscriptions-protocol/byte_pack
RogerPodacter Nov 4, 2025
f264670
Refactor Ethscription structure and retrieval methods
RogerPodacter Nov 4, 2025
7b46837
Update ABI
RogerPodacter Nov 4, 2025
4dbd5c9
Merge pull request #133 from ethscriptions-protocol/improve_reading
RogerPodacter Nov 4, 2025
7fe0239
Add Multicall3 deployment and pagination support for Ethscriptions
RogerPodacter Nov 4, 2025
7d61c9f
Fix and add tests
RogerPodacter Nov 4, 2025
33dc2cb
Merge pull request #134 from ethscriptions-protocol/improve_reading
RogerPodacter Nov 4, 2025
800bf7f
Update proof start time
RogerPodacter Nov 4, 2025
364e827
Fix test
RogerPodacter Nov 4, 2025
09dbf24
Fix tests
RogerPodacter Nov 4, 2025
9e20f57
Refactor ERC721 Ethscriptions Collection Management
RogerPodacter Nov 5, 2025
2ffa46e
Enhance ERC721 Ethscriptions Collection Parser and Manager
RogerPodacter Nov 5, 2025
466e4fc
Refactor ERC721 Ethscriptions Collection Parser and Protocol Extractor
RogerPodacter Nov 6, 2025
194c621
Merge pull request #135 from ethscriptions-protocol/fix_collections
RogerPodacter Nov 6, 2025
fa90c78
Refactor Protocol Handling and Update Dependencies
RogerPodacter Nov 6, 2025
13c1e7e
Update spec/models/erc721_ethscriptions_collection_parser_spec.rb
RogerPodacter Nov 6, 2025
a908067
Implement structured parameter handling and calldata encoding in Erc2…
RogerPodacter Nov 6, 2025
fb2b911
Merge pull request #136 from ethscriptions-protocol/fix_collections
RogerPodacter Nov 7, 2025
847d5de
Refactor Ethscription Content Handling and Metadata Storage
RogerPodacter Nov 7, 2025
0ab3868
Merge pull request #137 from ethscriptions-protocol/fix_collections
RogerPodacter Nov 7, 2025
f7f0997
Refactor ERC721 Ethscriptions Collection and Manager Contracts
RogerPodacter Nov 7, 2025
c75340f
Merge pull request #138 from ethscriptions-protocol/fix_collections
RogerPodacter Nov 7, 2025
772146b
Add URI resolution for Ethscriptions in ERC721 Collection
RogerPodacter Nov 7, 2025
71d2611
Merge pull request #139 from ethscriptions-protocol/fix_collections
RogerPodacter Nov 7, 2025
aa6679c
Refactor Protocol Parsing and Introduce Word Domains Support
RogerPodacter Nov 7, 2025
1aa1898
Remove MIN_LENGTH and MAX_LENGTH constants from NameRegistry contract…
RogerPodacter Nov 7, 2025
6d02714
Merge pull request #140 from ethscriptions-protocol/fix_collections
RogerPodacter Nov 10, 2025
154f4f3
Enhance Ethscriptions Metadata Handling and URI Resolution
RogerPodacter Nov 10, 2025
fa71121
Update L2Genesis to Include NameRegistry Implementation
RogerPodacter Nov 10, 2025
9e9b9c8
Update lib/ethscriptions_api_client.rb
RogerPodacter Nov 10, 2025
c6d238e
Merge pull request #141 from ethscriptions-protocol/fix_collections
RogerPodacter Nov 10, 2025
9f25b1a
Enhance ERC721 Contracts with Base64 Metadata Encoding
RogerPodacter Nov 10, 2025
64230ae
Implement Ownership Transfer and Renouncement in ERC721 Ethscriptions
RogerPodacter Nov 12, 2025
124b55e
Merge pull request #142 from ethscriptions-protocol/fix_collections
RogerPodacter Nov 12, 2025
423fd7c
Update Address Validation and Metadata Descriptions in Contracts
RogerPodacter Nov 12, 2025
f4d16ea
Merge pull request #143 from ethscriptions-protocol/fix_collections
RogerPodacter Nov 12, 2025
4f0811b
Implement Compression and Extraction for Collection JSON Files
RogerPodacter Nov 12, 2025
035e154
Fix collection symbol initialization and update test assertions for E…
RogerPodacter Nov 12, 2025
a732296
Merge pull request #144 from ethscriptions-protocol/fix_collections
RogerPodacter Nov 12, 2025
7e55b6c
Enhance ERC721 Ethscriptions Collection Parser with Initial Owner Sup…
RogerPodacter Nov 12, 2025
76710a3
Refactor ERC721 Ethscriptions Collection Parser for Address Handling
RogerPodacter Nov 12, 2025
9fa81fa
Merge pull request #145 from ethscriptions-protocol/fix_collections
RogerPodacter Nov 12, 2025
45e7482
Refactor ERC20FixedDenomination and Manager for Hybrid NFT Support
RogerPodacter Nov 24, 2025
d2d9b33
Fix unauthorized transfer check in ERC404NullOwnerCappedUpgradeable c…
RogerPodacter Nov 24, 2025
8d4e965
Refactor tokenURI function in ERC20FixedDenomination for improved met…
RogerPodacter Nov 24, 2025
6b89550
Merge pull request #146 from ethscriptions-protocol/fix_collections
RogerPodacter Nov 24, 2025
7ab3767
Refactor token ID handling in ERC20FixedDenomination and ERC404NullOw…
RogerPodacter Nov 24, 2025
83ef4a3
Refactor token ID handling and improve metadata functions in ERC20Fix…
RogerPodacter Nov 24, 2025
a6af08c
Merge pull request #147 from ethscriptions-protocol/fix_collections
RogerPodacter Nov 24, 2025
2a0b6ee
Remove legacy word-domains protocol support and associated parser
RogerPodacter Nov 24, 2025
77f0636
Merge pull request #148 from ethscriptions-protocol/fix_collections
RogerPodacter Nov 24, 2025
7bb3566
Remove unused ERC20NullOwnerCappedUpgradeable contract and simplify t…
RogerPodacter Nov 24, 2025
d5a888b
Merge pull request #149 from ethscriptions-protocol/fix_collections
RogerPodacter Nov 24, 2025
3437a18
Update historicalBackfillApproxDoneAt constant in Constants.sol to re…
RogerPodacter Nov 24, 2025
e9175b8
Implement header-based collections protocol with merkle proof enforce…
RogerPodacter Nov 25, 2025
870e2e1
Refactor ERC404NullOwnerCappedUpgradeable contract by removing unused…
RogerPodacter Nov 25, 2025
0cfdbd6
Merge pull request #150 from ethscriptions-protocol/cleanup
RogerPodacter Nov 25, 2025
1283c40
Enhance JSON metadata generation in ERC20FixedDenomination and update…
RogerPodacter Nov 25, 2025
5b1cea8
Fix DataUri handling of legacy behavior of esip6?
RogerPodacter Nov 29, 2025
0fdc2af
Update collections
RogerPodacter Dec 2, 2025
ef4e3f7
Correctly decode percent encoded utf8 data uris
RogerPodacter Dec 7, 2025
b887b9d
Fix collections
RogerPodacter Dec 7, 2025
6e160cc
Update README.md to enhance documentation structure and clarity
RogerPodacter Dec 15, 2025
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 .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
storage/*.sqlite3
log/*
tmp/*
.git
node_modules
63 changes: 63 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Docker Image CI

on:
push:
branches: [ "*v*", "main" ]
tags:
- '*v*'
release:
types: [published]
pull_request:
branches: [ "*v*", "main" ]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v4

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/ethscriptions-protocol/ethscriptions-node
tags: |
# Latest commit SHA
type=sha,format=short

# Branch names (v1.0.0, main, etc)
type=ref,event=branch

# Git tags (v1.0.0, etc)
type=ref,event=tag

# Semantic versioning for releases
type=semver,pattern={{version}},event=tag
type=semver,pattern={{major}}.{{minor}},event=tag
type=semver,pattern={{major}},event=tag

# Latest release tag
type=raw,value=latest-release,enable=${{ github.event_name == 'release' }}

# Latest on main branch
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,11 @@

# Ignore master key for decrypting credentials and more.
/config/master.key

.DS_Store

# Ignore uncompressed collection JSON files (keep only the tar.gz archive)
items_by_ethscription.json
collections_by_name.json
# Keep the compressed archive
# collections_data.tar.gz
12 changes: 12 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[submodule "contracts/lib/forge-std"]
path = contracts/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "contracts/lib/openzeppelin-contracts"]
path = contracts/lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
[submodule "contracts/lib/solady"]
path = contracts/lib/solady
url = https://github.com/vectorized/solady
[submodule "contracts/lib/openzeppelin-contracts-upgradeable"]
path = contracts/lib/openzeppelin-contracts-upgradeable
url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-3.2.2
ruby-3.4.4
4 changes: 3 additions & 1 deletion .sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ ETHEREUM_CLIENT_API_KEY="YOUR KEY"
ETHEREUM_NETWORK="eth-mainnet"
ETHEREUM_CLIENT_BASE_URL="https://eth-mainnet.g.alchemy.com/v2"
ETHEREUM_BEACON_NODE_API_BASE_URL="https://something.quiknode.pro/"
BLOCK_IMPORT_BATCH_SIZE="2"
L1_PREFETCH_THREADS="2"
VALIDATION_ENABLED="false"
JOB_CONCURRENCY="2"
TESTNET_START_BLOCK="5192600"
72 changes: 72 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# syntax = docker/dockerfile:1

ARG RUBY_VERSION=3.4.4
FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim AS base

WORKDIR /rails

ENV SECRET_KEY_BASE_DUMMY=1

# Set environment variables
ENV RAILS_ENV="production" \
BUNDLE_PATH="/usr/local/bundle" \
LANG="C.UTF-8" \
RAILS_LOG_TO_STDOUT="enabled"

# Throw-away build stage
FROM base AS build

# Install packages needed to build gems
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y \
build-essential \
git \
pkg-config \
libsecp256k1-dev \
libssl-dev \
libyaml-dev \
zlib1g-dev \
automake \
autoconf \
libtool && \
rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*

# Install application gems
COPY Gemfile Gemfile.lock ./
RUN bundle config build.rbsecp256k1 --use-system-libraries && \
bundle install --jobs 4 --retry 3

# Copy application code and precompile bootsnap
COPY . .
ENV BOOTSNAP_COMPILE_CACHE_THREADS=4
RUN bundle exec bootsnap precompile app/ lib/

# Final stage
FROM base

# Install only runtime dependencies
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y \
libsecp256k1-dev \
libyaml-0-2 \
ca-certificates \
tini \
bash && \
rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*

# Copy built artifacts
COPY --from=build /usr/local/bundle /usr/local/bundle
COPY --from=build /rails /rails

# Copy and set up entrypoint script
COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh

# Set up non-root user
RUN useradd rails --create-home --shell /bin/bash && \
chown -R rails:rails /rails
USER rails:rails

# Database initialization moved to runtime in entrypoint script

ENTRYPOINT ["tini", "--", "/usr/local/bin/docker-entrypoint.sh"]
53 changes: 21 additions & 32 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
source "https://rubygems.org"

ruby "3.2.2"
ruby "3.4.4"

# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
gem "rails", "~> 7.1.2"
gem "rails", "8.0.2.1"

# Use postgresql as the database for Active Record
gem "pg", "~> 1.1"

# Use the Puma web server [https://github.com/puma/puma]
gem "puma", ">= 5.0"

# Build JSON APIs with ease [https://github.com/rails/jbuilder]
# gem "jbuilder"
Expand Down Expand Up @@ -41,45 +37,38 @@ group :development do
# Speed up commands on slow machines / big apps [https://github.com/rails/spring]
# gem "spring"
gem "stackprof", "~> 0.2.25"
gem "active_record_query_trace", "~> 1.8"
end

gem "dotenv-rails", "~> 2.8", groups: [:development, :test]

gem "httpparty", "~> 0.2.0"

gem "clockwork", "~> 3.0"

gem "dalli", "~> 3.2"

gem "kaminari", "~> 1.2"

gem "airbrake", "~> 13.0"
gem "eth", github: "0xFacet/eth.rb", branch: "sync/v0.5.16-nohex"

gem "rack-cors", "~> 2.0"
gem 'sorbet', :group => :development
gem 'sorbet-runtime'
gem 'tapioca', require: false, :group => [:development, :test]

gem "eth", "~> 0.5.11"

gem "activerecord-import", "~> 1.5"

gem "scout_apm", "~> 5.3"
gem "awesome_print", "~> 1.9"

gem "memoist", "~> 0.16.2"
gem 'facet_rails_common', git: 'https://github.com/0xfacet/facet_rails_common.git', branch: 'lenient_base64'

gem "awesome_print", "~> 1.9"
gem "memery", "~> 1.5"

gem "clipboard"
gem "httparty", "~> 0.22.0"

gem "redis", "~> 5.0"
gem "jwt", "~> 2.8"

gem "httparty", "~> 0.21.0"
gem "clockwork", "~> 3.0"

gem "order_query", "~> 0.5.3"
gem "airbrake", "~> 13.0"
gem "clipboard", "~> 2.0", :group => [:development, :test]

gem 'facet_rails_common', git: 'https://github.com/0xfacet/facet_rails_common.git'
gem "net-http-persistent", "~> 4.0"

gem "cbor", "~> 0.5.9"
gem 'benchmark'
gem 'ostruct'

gem 'rswag-api'
gem "retriable", "~> 3.1"

gem 'rswag-ui'
# Database and job processing
gem "sqlite3", ">= 2.1"
gem "solid_queue"
Loading