Skip to content

Commit

Permalink
Fix/refinements (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
igorsereda authored Sep 12, 2024
2 parents afbda85 + fd101f0 commit dd529d4
Show file tree
Hide file tree
Showing 43 changed files with 2,488 additions and 1,698 deletions.
3 changes: 2 additions & 1 deletion .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ ETHERLINK_NODE_URL=https://etherlink.dipdup.net
ETHERLINK_SUBSQUID_URL=https://etherlink-archive.dipdup.net
ROLLUP_NODE_URL=https://etherlink-rollup-paris.dipdup.net

SMART_ROLLUP_ADDRESS=sr1JBmCsMoXmCeeYQWB3YYYqP9d68wUXQzkC
SMART_ROLLUP_ADDRESS=sr1L4xrjfcfwLU9pc9Hje8DuYR8GGrSCHzyN
NATIVE_TICKETER=KT1Bdyc1UcmjgPr3prJziMyfjSCPK6SEjfqs
FA_TICKETERS=["KT1KUhD7qjMSxoQxyJcFUyGQWMcMuiruXnyh","KT1HF2CqbX4Y7vivhQQZUjaedh5pMZvugowS","KT1A8zkhk8FZhLhA1CqFuHM17WXunYuAtonw"]

HASURA_URL=https://hasura.etherlink.dipdup.net
ADMIN_SECRET=changeme
Expand Down
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ARG VENV_PATH=/opt/venv
ARG APP_PATH=/opt/app
ARG APP_USER=dipdup

FROM python:${PYTHON_VERSION}-slim-bookworm as builder-base
FROM python:${PYTHON_VERSION}-slim AS builder-base

ARG VENV_PATH
ARG POETRY_PATH
Expand All @@ -23,7 +23,7 @@ RUN apt-get update \
# deps for building python deps
build-essential \
# pytezos deps
libsodium-dev libsecp256k1-dev libgmp-dev pkg-config \
libsodium-dev libgmp-dev pkg-config \
\
# install poetry
&& curl -sSL https://install.python-poetry.org | python - \
Expand All @@ -38,18 +38,18 @@ RUN apt-get update \
&& rm -rf `find /usr/local/lib $POETRY_PATH/venv/lib $VENV_PATH/lib -name __pycache__` \
&& rm -rf /var/lib/apt/lists/*

FROM builder-base as builder-production
FROM builder-base AS builder-production

COPY ["poetry.lock", "pyproject.toml", "./"]

RUN poetry install --only main --sync --no-interaction --no-ansi -vvv \
RUN poetry install --only main --sync --no-root --no-interaction --no-ansi -vvv \
&& rm -rf /tmp \
&& rm -rf /root/.cache \
&& rm -rf $VIRTUAL_ENV/src \
&& rm -rf `find $VIRTUAL_ENV/lib -name __pycache__`


FROM python:${PYTHON_VERSION}-slim-bookworm as runtime-base
FROM python:${PYTHON_VERSION}-slim AS runtime-base

ARG VENV_PATH
ENV PATH="$VENV_PATH/bin:$PATH"
Expand All @@ -60,11 +60,11 @@ WORKDIR $APP_PATH
ARG APP_USER
RUN useradd -ms /bin/bash $APP_USER

FROM runtime-base as runtime
FROM runtime-base AS runtime

RUN apt-get update \
&& apt-get install --no-install-recommends -y \
libsodium-dev libsecp256k1-dev libgmp-dev pkg-config \
libsodium-dev libgmp-dev pkg-config \
# cleanup
&& rm -rf /tmp/* \
&& rm -rf /root/.cache \
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ unit_tests_dir := tests
dipdup_args := -c .

test:
PYTHONPATH=. $(py) pytestvol tests/
PYTHONPATH=. $(py) pytest tests/

install:
poetry install `if [ "${DEV}" = "0" ]; then echo "--only main"; fi` --sync
Expand Down
123 changes: 78 additions & 45 deletions bridge_indexer/abi/kernel/abi.json
Original file line number Diff line number Diff line change
@@ -1,94 +1,127 @@
[
{
"anonymous": false,
"type": "function",
"name": "withdraw",
"inputs": [
{
"name": "ticketOwner",
"type": "address",
"internalType": "address"
},
{
"name": "receiver",
"type": "bytes",
"internalType": "bytes"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "ticketer",
"type": "bytes22",
"internalType": "bytes22"
},
{
"name": "content",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "event",
"name": "Deposit",
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "ticketHash",
"type": "uint256"
"type": "uint256",
"indexed": true,
"internalType": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "ticketOwner",
"type": "address"
"type": "address",
"indexed": false,
"internalType": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "receiver",
"type": "address"
"type": "address",
"indexed": false,
"internalType": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "inboxLevel",
"type": "uint256"
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "inboxMsgId",
"type": "uint256"
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"name": "Deposit",
"type": "event"
"anonymous": false
},
{
"anonymous": false,
"type": "event",
"name": "Withdrawal",
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "ticketHash",
"type": "uint256"
"type": "uint256",
"indexed": true,
"internalType": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "sender",
"type": "address"
"type": "address",
"indexed": false,
"internalType": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "ticketOwner",
"type": "address"
"type": "address",
"indexed": false,
"internalType": "address"
},
{
"indexed": false,
"internalType": "bytes22",
"name": "receiver",
"type": "bytes22"
"type": "bytes22",
"indexed": false,
"internalType": "bytes22"
},
{
"name": "proxy",
"type": "bytes22",
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
"internalType": "bytes22"
},
{
"name": "amount",
"type": "uint256",
"indexed": false,
"internalType": "uint256",
"name": "outboxLevel",
"type": "uint256"
"internalType": "uint256"
},
{
"name": "withdrawalId",
"type": "uint256",
"indexed": false,
"internalType": "uint256",
"name": "outboxMsgId",
"type": "uint256"
"internalType": "uint256"
}
],
"name": "Withdrawal",
"type": "event"
"anonymous": false
}
]
66 changes: 0 additions & 66 deletions bridge_indexer/abi/kernel/events.json

This file was deleted.

33 changes: 33 additions & 0 deletions bridge_indexer/abi/kernel_native/abi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[
{
"type": "event",
"name": "Withdrawal",
"inputs": [
{
"name": "amount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "sender",
"type": "address",
"indexed": false,
"internalType": "address"
},
{
"name": "receiver",
"type": "bytes22",
"indexed": false,
"internalType": "bytes22"
},
{
"name": "withdrawalId",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
}
]
Loading

0 comments on commit dd529d4

Please sign in to comment.