Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
fa70179
build(deps): bump kentaro-m/auto-assign-action (#1785)
dependabot[bot] Mar 26, 2026
6d54347
build(deps): bump requests from 2.32.5 to 2.33.0 (#1787)
dependabot[bot] Mar 26, 2026
7a93d02
build(deps): bump picomatch (#1786)
dependabot[bot] Mar 26, 2026
eb486f4
build(deps): bump cryptography from 46.0.5 to 46.0.6 (#1788)
dependabot[bot] Mar 30, 2026
2abaa97
build(deps): bump pygments from 2.19.1 to 2.20.0 (#1790)
dependabot[bot] Mar 30, 2026
53c6418
build(deps): bump aiohttp from 3.13.3 to 3.13.4 (#1800)
dependabot[bot] Apr 2, 2026
110421b
build(deps): bump astral-sh/setup-uv in the all-dependencies group (#…
dependabot[bot] Apr 2, 2026
fa5ad24
build(deps-dev): bump lodash from 4.17.23 to 4.18.1 (#1802)
dependabot[bot] Apr 2, 2026
c9b8a56
Make listing fields required and remove orphan executable contracts (…
purplesmoke05 Apr 3, 2026
b6067fb
refactor: enforce non-null constraints on consume_coupon fields and u…
purplesmoke05 Apr 6, 2026
565baf5
fix: change email sending error log level to ERROR and update test as…
purplesmoke05 Apr 8, 2026
2832470
refactor: enforce non-null constraints on notification fields (#1807)
purplesmoke05 Apr 8, 2026
633eb27
build(deps): bump cryptography from 46.0.6 to 46.0.7 (#1808)
dependabot[bot] Apr 8, 2026
7c69d75
build(deps-dev): bump pytest from 8.4.0 to 9.0.3 (#1809)
dependabot[bot] Apr 14, 2026
8387d27
Migrate local dev from Hardhat to Anvil (#1810)
YoshihitoAso Apr 14, 2026
b599a56
Remove npm Dependabot config and pin jrm (#1812)
YoshihitoAso Apr 15, 2026
4a1268c
build(deps): bump mako from 1.3.10 to 1.3.11 (#1814)
dependabot[bot] Apr 16, 2026
090a0ba
Pin GitHub Actions to SHAs and bump Node (#1815)
YoshihitoAso Apr 21, 2026
a68f287
build(deps): bump python-dotenv from 1.2.1 to 1.2.2 (#1816)
dependabot[bot] Apr 21, 2026
0ccfb49
build(deps): bump the all-dependencies group with 4 updates (#1817)
dependabot[bot] Apr 23, 2026
a51a37b
build(deps): bump github/codeql-action in the all-dependencies group …
dependabot[bot] May 7, 2026
e6ca288
build(deps): bump mako from 1.3.11 to 1.3.12 (#1819)
dependabot[bot] May 7, 2026
a01a994
build(deps): bump urllib3 from 2.6.3 to 2.7.0 (#1820)
dependabot[bot] May 12, 2026
6215878
build(deps): bump github/codeql-action in the all-dependencies group …
dependabot[bot] May 14, 2026
44cc695
Add contract_version to token list (#1823)
YoshihitoAso May 19, 2026
f9595fd
build(deps): bump idna from 3.10 to 3.15 (#1824)
dependabot[bot] May 19, 2026
98e4cb4
Bump Python to 3.14 (#1826)
YoshihitoAso May 21, 2026
3a848fe
build(deps): bump github/codeql-action in the all-dependencies group …
dependabot[bot] May 21, 2026
c01a9e7
build(deps): bump the all-dependencies group with 4 updates (#1827)
dependabot[bot] May 27, 2026
07078bf
chore: update dependency management and add guardrail checks (#1828)
purplesmoke05 May 28, 2026
8ca0851
build(deps): bump astral-sh/uv in / (#1829)
dependabot[bot] May 28, 2026
608f16a
Cache resolved web3 provider endpoints (#1831)
YoshihitoAso May 29, 2026
6fd563b
build(deps): bump astral-sh/uv in / (#1832)
dependabot[bot] Jun 4, 2026
0970aae
build(deps): bump ubuntu in / (#1833)
dependabot[bot] Jun 4, 2026
3ed075c
Bump uv to 0.11.19 and enable malware check (#1834)
YoshihitoAso Jun 9, 2026
d7b0aa1
build(deps): bump the all-dependencies group with 3 updates (#1835)
dependabot[bot] Jun 17, 2026
d191592
Add uv exclude-newer and update lockfile (#1836)
YoshihitoAso Jun 21, 2026
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
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ docs/
.cov/
.venv
Dockerfile
.env
.env
6 changes: 3 additions & 3 deletions .github/actions/setup-test-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ description: 'Setup docker builder for using github actions cache'
runs:
using: "composite"
steps:
- uses: docker/setup-buildx-action@v3
- uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
- name: Set metadata
id: metadata
uses: docker/metadata-action@v5
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
with:
images: ibet-wallet-api
tags: |
type=sha,format=short
- uses: docker/build-push-action@v6
- uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
with:
context: .
file: ./tests/Dockerfile_unittest
Expand Down
27 changes: 19 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ updates:
allow:
- dependency-name: "*"
dependency-type: "direct"
cooldown:
default-days: 14
groups:
all-dependencies:
patterns:
Expand All @@ -21,30 +23,39 @@ updates:
allow:
- dependency-name: "*"
dependency-type: "direct"
cooldown:
default-days: 14
groups:
all-dependencies:
patterns:
- "*"

- package-ecosystem: docker-compose
directory: "/"
- package-ecosystem: "docker"
directories:
- "/"
- "/tests"
schedule:
interval: "monthly"
cooldown:
default-days: 14
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
- dependency-name: "*"
update-types: ["version-update:semver-major"]
groups:
all-dependencies:
patterns:
- "*"
group-by: dependency-name

- package-ecosystem: "npm"
- package-ecosystem: "docker-compose"
directory: "/"
schedule:
interval: "weekly"
allow:
interval: "monthly"
cooldown:
default-days: 14
ignore:
- dependency-name: "*"
dependency-type: "direct"
update-types: ["version-update:semver-major"]
groups:
all-dependencies:
patterns:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auto-assign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: kentaro-m/auto-assign-action@a6d59add3a817df08cafa9b166367768d2c337f8 # v2.0.1
- uses: kentaro-m/auto-assign-action@0a2c53d3721e4c5cfcce6afd4014aecc337979f6 # v2.0.2
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ jobs:
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0

- name: Login to GitHub Container Registry
uses: docker/login-action@v4
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
Expand All @@ -28,7 +28,7 @@ jobs:
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}

- name: Build and Push (ibet-wallet)
uses: docker/build-push-action@v7
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0
with:
context: .
file: Dockerfile
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ jobs:
timeout-minutes: 60
steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
uses: github/codeql-action/init@87557b9c84dde89fdd9b10e88954ac2f4248e463 # v4.36.1
with:
languages: ${{ matrix.language }}

# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
- name: Autobuild
uses: github/codeql-action/autobuild@v4
uses: github/codeql-action/autobuild@87557b9c84dde89fdd9b10e88954ac2f4248e463 # v4.36.1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
uses: github/codeql-action/analyze@87557b9c84dde89fdd9b10e88954ac2f4248e463 # v4.36.1
with:
category: "/language:${{matrix.language}}"
75 changes: 57 additions & 18 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,49 +7,88 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: ./.github/actions/setup-test-image
lint-ruff:
name: "Lint check (ruff and pyright)"
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v6
- uses: astral-sh/ruff-action@v3
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: astral-sh/ruff-action@0ce1b0bf8b818ef400413f810f8a11cdbda0034b # v4.0.0
- name: Install uv
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
enable-cache: true
cache-dependency-glob: |
**/pyproject.toml
**/uv.lock
- name: Restore cache
id: cache-venv
uses: actions/cache@v5
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/pyproject.toml', '**/uv.lock') }}
restore-keys: |
venv-${{ runner.os }}-
- name: Install dependencies
if: steps.cache-venv.outputs.cache-hit != 'true'
env:
UV_MALWARE_CHECK: "1"
run: |
uv sync --frozen --no-install-project
- name: Run typecheck
run: |
make typecheck
guardrail-check:
name: "Guardrail checks"
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
enable-cache: true
cache-dependency-glob: |
**/pyproject.toml
**/uv.lock
- name: Restore cache
id: cache-venv
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/pyproject.toml', '**/uv.lock') }}
restore-keys: |
venv-${{ runner.os }}-
- name: Install dependencies
if: steps.cache-venv.outputs.cache-hit != 'true'
env:
UV_MALWARE_CHECK: "1"
run: |
uv sync --frozen --no-install-project
- name: Run guardrail checks
run: |
make test_guardrail_check
unit-test:
name: "Unit tests"
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: true
matrix:
db: [postgres, mysql]
test_target: ["tests/app/", "tests/batch/"]
include:
- db: postgres
test_target: "tests/app/"
- db: mysql
test_target: "tests/app/"
- db: postgres
test_target: "tests/batch/"
- db: mysql
test_target: "tests/batch/"
timeout-minutes: 60
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: ./.github/actions/setup-test-image
- name: build image on compose
run: docker compose build
Expand All @@ -60,14 +99,14 @@ jobs:
- name: run unit test using ${{ matrix.db }}
run: docker compose run -e TEST_TARGET="${{ matrix.test_target }}" ibet-wallet-api-${{ matrix.db }}
- run: mv cov/.coverage cov/.coverage-${{ strategy.job-index }}
- uses: actions/upload-artifact@v7
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: matrix.db == 'postgres'
with:
name: .coverage-${{ strategy.job-index }}
path: cov/.coverage-${{ strategy.job-index }}
include-hidden-files: true
- run: mv cov/pytest.xml cov/pytest-${{ strategy.job-index }}.xml
- uses: actions/upload-artifact@v7
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: matrix.db == 'postgres'
with:
name: pytest-${{ strategy.job-index }}
Expand All @@ -82,15 +121,15 @@ jobs:
pull-requests: write
timeout-minutes: 60
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: ./.github/actions/setup-test-image
- name: build image on compose
run: docker compose build
- name: Change owner of output directory
run: |
sudo chown runner:docker /home/runner/work/ibet-Wallet-API/ibet-Wallet-API/cov
sudo chmod 777 /home/runner/work/ibet-Wallet-API/ibet-Wallet-API/cov
- uses: actions/download-artifact@v8
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
pattern: ".coverage-*"
path: cov/
Expand All @@ -99,21 +138,21 @@ jobs:
run: docker compose run -w /app/ibet-Wallet-API/cov ibet-wallet-api-postgres bash --login -c 'uv run coverage combine .coverage-*'
- name: generate coverage xml file
run: docker compose run -w /app/ibet-Wallet-API ibet-wallet-api-postgres bash --login -c 'uv run coverage xml --data-file=cov/.coverage -o cov/coverage.xml'
- uses: actions/download-artifact@v8
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
pattern: "pytest-*"
path: cov/
merge-multiple: true
- uses: actions/setup-node@v6
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20
node-version: 24
- name: Install junit-report-merger
run: npm install -g junit-report-merger
run: npm install -g junit-report-merger@9.0.3
- name: Merge reports
run: jrm cov/pytest.xml "cov/pytest-*.xml"
- name: Pytest coverage comment
id: coverageComment
uses: MishaKav/pytest-coverage-comment@287292879eaaff04116f36d3eb1a670f6e5df1a4 # v1.7.1
uses: MishaKav/pytest-coverage-comment@dd5b80bde6d16941f336518e92929e89069d8451 # v1.7.2
with:
report-only-changed-files: true
pytest-xml-coverage-path: cov/coverage.xml
Expand All @@ -139,7 +178,7 @@ jobs:
db: [postgres, mysql]
timeout-minutes: 60
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: ./.github/actions/setup-test-image
- name: run unit test using ${{ matrix.db }}
run: docker compose run ibet-wallet-api-${{ matrix.db }} bash --login -c "cd /app/ibet-Wallet-API && uv run pytest -vv --test-alembic -m 'alembic'"
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ repos:
- id: ruff-format
name: ruff-format
entry: make format
language_version: python3.13
language_version: python3.14
15 changes: 7 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM ubuntu:24.04 AS builder
FROM ghcr.io/astral-sh/uv:0.11.19@sha256:b46b03ddfcfbf8f547af7e9eaefdf8a39c8cebcba7c98858d3162bd28cf536f6 AS uv

ENV PYTHON_VERSION=3.13.11
ENV UV_VERSION=0.9.16
FROM ubuntu:24.04@sha256:786a8b558f7be160c6c8c4a54f9a57274f3b4fb1491cf65146521ae77ff1dc54 AS builder

ENV PYTHON_VERSION=3.14.2
ENV UV_COMPILE_BYTECODE=1
ENV UV_LINK_MODE=copy
ENV UV_INSTALL_DIR="/usr/local/bin"
ENV UV_PROJECT_ENVIRONMENT="/home/apl/.venv"

# make application directory
Expand Down Expand Up @@ -34,8 +34,7 @@ RUN apt-get update -q \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# install uv
ADD https://astral.sh/uv/$UV_VERSION/install.sh /uv-installer.sh
RUN INSTALLER_NO_MODIFY_PATH=1 sh /uv-installer.sh && rm /uv-installer.sh
COPY --from=uv /uv /uvx /usr/local/bin/

# install Python
RUN uv python install $PYTHON_VERSION
Expand All @@ -56,7 +55,7 @@ RUN echo '. $HOME/.venv/bin/activate' >> ~apl/.bashrc
COPY --chown=apl:apl . /app/ibet-Wallet-API
RUN cd /app/ibet-Wallet-API \
&& uv venv $UV_PROJECT_ENVIRONMENT \
&& uv sync --frozen --no-install-project --no-dev \
&& UV_MALWARE_CHECK=1 uv sync --frozen --no-install-project --no-dev \
&& PYTHON_BIN="$(uv python find $PYTHON_VERSION)" \
&& PYTHON_ROOT="$(dirname "$(dirname "$PYTHON_BIN")")" \
&& rm -f "$PYTHON_ROOT"/bin/pip "$PYTHON_ROOT"/bin/pip3 "$PYTHON_ROOT"/bin/pip3.* \
Expand All @@ -66,7 +65,7 @@ RUN cd /app/ibet-Wallet-API \
&& rm -f /app/ibet-Wallet-API/uv.lock \
&& rm -rf /app/ibet-Wallet-API/tests/

FROM ubuntu:24.04 AS runner
FROM ubuntu:24.04@sha256:786a8b558f7be160c6c8c4a54f9a57274f3b4fb1491cf65146521ae77ff1dc54 AS runner

# make application directory
RUN mkdir -p /app
Expand Down
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
.PHONY: format lint typecheck doc test test_migrations run
.PHONY: format lint typecheck doc test test_guardrail_check test_guardrail test_migrations run

install:
uv sync --frozen --no-install-project --all-extras
UV_MALWARE_CHECK=1 uv sync --frozen --no-install-project --all-extras
uv run pre-commit install
npm install

update:
uv lock --upgrade
npm update

format:
uv run ruff format && uv run ruff check --fix --select I
Expand All @@ -24,6 +22,11 @@ doc:
test:
uv run pytest tests/ ${ARG}

test_guardrail_check:
uv run pytest --override-ini addopts='' --noconftest -v -m "guardrail_check" tests/test_guardrail_check.py

test_guardrail: test_guardrail_check

test_migrations:
uv run pytest -vv --test-alembic -m "alembic"

Expand Down
Loading
Loading