Skip to content

Commit

Permalink
Merge branch 'next' into feat/pydantic-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
droserasprout committed Oct 20, 2023
2 parents b96cc33 + d9ff712 commit f2d49f2
Show file tree
Hide file tree
Showing 110 changed files with 1,953 additions and 374 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,26 @@ jobs:

steps:
- name: Check out the repo
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
with:
install: true

- name: Log in to the registry
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up metadata
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_NAME }}
flavor: |
Expand All @@ -55,7 +55,7 @@ jobs:
type=ref,event=tag
- name: Publish nightly image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ jobs:
# && sudo apt install gh -y

- name: Check out the repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@main
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
Expand All @@ -47,7 +47,7 @@ jobs:
run: pip install pdm

- name: Install project
run: pdm install
run: pdm sync

- name: Clone frontend
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
arch: arm64
steps:
- name: Check out the repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@main
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,35 +14,35 @@ jobs:

steps:
- name: Check out the repo
uses: actions/checkout@v3
uses: actions/checkout@v4
# NOTE: Fetch full history for Sentry release
with:
fetch-depth: 0

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
with:
install: true

- name: Log in to Docker Hub
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Log in to GHCR
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Docker metadata
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v5
with:
images: |
dipdup/dipdup
Expand All @@ -55,7 +55,7 @@ jobs:
type=pep440,pattern={{major}}.{{minor}}
- name: Set up Python
uses: actions/setup-python@main
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
Expand All @@ -72,7 +72,7 @@ jobs:
ALCHEMY_KEY: ${{ secrets.ALCHEMY_KEY }}

- name: Publish stable image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@ jobs:
arch: arm64
steps:
- name: Check out the repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install PDM
run: pipx install pdm

- name: Set up Python
uses: actions/setup-python@main
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'

- name: Run install
run: pdm install
run: pdm sync

- name: Run lint
run: pdm run lint
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog], and this project adheres to [Semantic Versioning].

## [Unreleased]

### Added

- cli: Added `--unsafe` and `--compose` flags to `config env` command.
- cli: Relative paths to be initialized now can be passed to the `init` command as arguments.
- tezos.tzkt.token_balances: Added new index.

### Fixed

- cli: Fixed `DIPDUP_DEBUG` not being applied to the package logger.
- tezos.tzkt.token_transfers: Fixed filtering transfers by token_id.

## [7.0.2] - 2023-10-10

### Added
Expand Down
1 change: 1 addition & 0 deletions docs/1.getting-started/7.indexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Multiple indexes are available for different workloads. Every index is linked to
| [tezos.tzkt.operations](../2.indexes/5.tezos_tzkt_operations.md) | Tezos | TzKT | typed operations |
| [tezos.tzkt.operations_unfiltered](../2.indexes/6.tezos_tzkt_operations_unfiltered.md) | Tezos | TzKT | untyped operations |
| [tezos.tzkt.token_transfers](../2.indexes/7.tezos_tzkt_token_transfers.md) | Tezos | TzKT | TZIP-12/16 token transfers |
| [tezos.tzkt.token_balances](../2.indexes/8.tezos_tzkt_token_balances.md) | Tezos | TzKT | TZIP-12/16 token balances |

Indexes can join multiple contracts considered as a single application. Also, contracts can be used by multiple indexes of any kind, but make sure that they are independent of each other and that indexed data don't overlap.

Expand Down
19 changes: 19 additions & 0 deletions docs/2.indexes/8.tezos_tzkt_token_balances.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: "Token balances"
description: "This index allows indexing token balances of contracts compatible with FA1.2 or FA2 standards."
network: "tezos"
---

# `tezos.tzkt.token_balances` index

This index allows indexing token balances of contracts compatible with [FA1.2](https://gitlab.com/tzip/tzip/-/blob/master/proposals/tzip-7/README.md) or [FA2](https://gitlab.com/tzip/tzip/-/blob/master/proposals/tzip-12/tzip-12.md) standards. You can either index transfers and cumulatively calculate balances or use this index type to fetch the latest balance information directly.

```yaml [dipdup.yaml]
{{ #include ../src/demo_token_balances/dipdup.yaml }}
```

Callback receives `TzktTokenBalanceData` model that optionally contains the owner, token, and balance values

```python
{{ #include ../src/demo_token_balances/handlers/on_balance_update.py }}
```
66 changes: 33 additions & 33 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f2d49f2

Please sign in to comment.