-
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c74899b
commit 24919d1
Showing
97 changed files
with
18,590 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1216,4 +1216,4 @@ description: "Config file reference" | |
</ul> | ||
</dd> | ||
</dl> | ||
</dd></dl> | ||
</dd></dl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -859,4 +859,4 @@ description: "Models reference" | |
</dd></dl> | ||
|
||
</section> | ||
</section> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
spec_version: 3.0 | ||
replay: | ||
description: Empty config for a fresh start | ||
package: demo_blank | ||
template: demo_blank |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
spec_version: 3.0 | ||
replay: | ||
description: ERC-20 token transfers (from event logs) | ||
package: demo_evm_events | ||
template: demo_evm_events |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
spec_version: 3.0 | ||
replay: | ||
description: ERC-20 token transfers (from transactions) | ||
package: demo_evm_transactions | ||
template: demo_evm_transactions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
spec_version: 3.0 | ||
replay: | ||
description: Uniswap V3 pools, positions, etc. (advanced, uses TimescaleDB) | ||
package: demo_evm_uniswap | ||
template: demo_evm_uniswap | ||
postgres_image: timescale/timescaledb-ha:pg15 | ||
postgres_data_path: /home/postgres/pgdata/data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
spec_version: 3.0 | ||
replay: | ||
description: ERC-20 token transfers (from events) | ||
package: demo_starknet_events | ||
template: demo_starknet_events |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,4 @@ async def on_index_rollback( | |
index=index.name, | ||
from_level=from_level, | ||
to_level=to_level, | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
from dipdup import fields | ||
from dipdup.models import CachedModel | ||
from dipdup.models import Model | ||
|
||
|
||
class Holder(CachedModel): | ||
class Holder(Model): | ||
address = fields.TextField(primary_key=True) | ||
balance = fields.DecimalField(decimal_places=6, max_digits=40, default=0) | ||
turnover = fields.DecimalField(decimal_places=6, max_digits=40, default=0) | ||
tx_count = fields.BigIntField(default=0) | ||
last_seen = fields.BigIntField(null=True) | ||
|
||
class Meta: | ||
maxsize = 2 ** 18 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
insert into | ||
holder ( | ||
[address], | ||
balance, | ||
turnover, | ||
tx_count, | ||
last_seen | ||
) | ||
values | ||
(:address, :balance, abs(:balance), 1, :level) on conflict ([address]) do | ||
update | ||
set | ||
balance = balance + :balance, | ||
turnover = turnover + abs(:balance), | ||
tx_count = tx_count + 1, | ||
last_seen = :level; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Ignore all | ||
* | ||
|
||
# Add metadata and build files | ||
!demo_substrate_events_orm | ||
!pyproject.toml | ||
!*.lock | ||
!README.md | ||
|
||
# Add Python code | ||
!**/*.py | ||
**/.*_cache | ||
**/__pycache__ | ||
|
||
# Add configs and scripts (but not env!) | ||
!**/*.graphql | ||
!**/*.json | ||
!**/*.sql | ||
!**/*.yaml | ||
!**/*.yml | ||
!**/*.j2 | ||
!**/.keep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Ignore all | ||
* | ||
!*/ | ||
|
||
# Add metadata and build files | ||
!demo_substrate_events_orm | ||
!.gitignore | ||
!.dockerignore | ||
!py.typed | ||
!**/Dockerfile | ||
!**/Makefile | ||
!**/pyproject.toml | ||
!**/*.lock | ||
!**/README.md | ||
!**/.keep | ||
|
||
# Add Python code | ||
!**/*.py | ||
**/.*_cache | ||
**/__pycache__ | ||
|
||
# Add configs and scripts (but not env!) | ||
!**/*.graphql | ||
!**/*.json | ||
!**/*.sql | ||
!**/*.yaml | ||
!**/*.yml | ||
!**/*.j2 | ||
!**/*.env.default |
Oops, something went wrong.