From 9ef703ae853edf7388f2a1853577ab332a719072 Mon Sep 17 00:00:00 2001 From: Manank Patni Date: Tue, 13 Jun 2023 18:18:19 +0530 Subject: [PATCH 1/6] Upgrade dipdu Signed-off-by: Manank Patni --- requirements.txt | 122 +++++++++++++++++++++++------------------------ 1 file changed, 60 insertions(+), 62 deletions(-) diff --git a/requirements.txt b/requirements.txt index 9b2785f..0e65176 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,72 +1,70 @@ -aiohttp==3.8.1 -aiolimiter==1.0.0 -aiosignal==1.2.0 +aiohttp==3.8.4 +aiolimiter==1.1.0 +aiosignal==1.3.1 aiosqlite==0.17.0 -anyio==3.5.0 -appdirs==1.4.4 -APScheduler==3.9.1 -argcomplete==2.0.0 +anyio==3.7.0 +APScheduler==3.10.1 +argcomplete==3.1.1 async-timeout==4.0.2 -asyncclick==8.0.3.2 -asyncpg==0.26.0 -attrs==21.4.0 -black==22.3.0 -certifi==2021.10.8 -chardet==4.0.0 -charset-normalizer==2.0.12 -click==8.1.2 -datamodel-code-generator==0.13.1 -dipdup==6.1.2 -dnspython==2.2.1 -email-validator==1.2.0 -fcache==0.4.7 -frozenlist==1.3.0 +asyncclick==8.1.3.4 +asyncpg==0.27.0 +attrs==23.1.0 +black==23.3.0 +certifi==2023.5.7 +chardet==5.1.0 +charset-normalizer==3.1.0 +click==8.1.3 +datamodel-code-generator==0.19.0 +dipdup==6.5.7 +dnspython==2.3.0 +email-validator==2.0.0.post2 +exceptiongroup==1.1.1 +frozenlist==1.3.3 genson==1.2.2 -idna==3.3 -inflect==5.5.2 -iso8601==1.0.2 -isodate==0.6.1 -isort==5.10.1 -Jinja2==3.1.1 -jsonschema==3.2.0 -MarkupSafe==2.1.1 -msgpack==1.0.3 -multidict==6.0.2 -mypy-extensions==0.4.3 -openapi-schema-validator==0.1.6 -openapi-spec-validator==0.3.3 -orjson==3.6.8 -pathspec==0.9.0 -platformdirs==2.5.2 -prance==0.21.8.0 -prometheus-client==0.14.1 -pydantic==1.9.2 -pyhumps==3.5.3 +idna==3.4 +importlib-resources==5.12.0 +inflect==5.6.2 +iso8601==1.1.0 +isort==5.12.0 +Jinja2==3.1.2 +jsonschema==4.17.3 +jsonschema-spec==0.1.6 +lazy-object-proxy==1.9.0 +MarkupSafe==2.1.3 +msgpack==1.0.5 +multidict==6.0.4 +mypy-extensions==1.0.0 +openapi-schema-validator==0.3.4 +openapi-spec-validator==0.5.1 +orjson==3.9.1 +packaging==23.1 +pathable==0.4.3 +pathspec==0.11.1 +platformdirs==3.5.3 +prance==0.22.2.22.0 +prometheus-client==0.16.0 +pydantic==1.10.8 +pyhumps==3.8.0 pypika-tortoise==0.1.6 -pyrsistent==0.16.1 -pysignalr==0.1.2 +pyrsistent==0.19.3 +pysignalr==0.2.0 PySnooper==1.1.1 python-dotenv==0.19.2 -pytz==2022.1 -pytz-deprecation-shim==0.1.0.post0 +pytz==2023.3 PyYAML==6.0 -requests==2.27.1 -ruamel.yaml==0.17.21 -ruamel.yaml.clib==0.2.6 -semver==2.13.0 -sentry-sdk==1.5.10 +requests==2.31.0 +ruamel.yaml==0.17.31 +ruamel.yaml.clib==0.2.7 +sentry-sdk==1.25.1 six==1.16.0 -sniffio==1.2.0 -sqlparse==0.4.2 -tabulate==0.8.9 +sniffio==1.3.0 +sqlparse==0.4.4 +tabulate==0.9.0 toml==0.10.2 tomli==2.0.1 -tortoise-orm==0.19.2 -typed-ast==1.5.3 -typing-inspect==0.6.0 -typing_extensions==4.2.0 -tzdata==2022.1 -tzlocal==4.2 -urllib3==1.26.9 -websockets==10.3 -yarl==1.7.2 +tortoise-orm==0.19.3 +typing_extensions==4.6.3 +tzlocal==5.0.1 +urllib3==2.0.3 +websockets==10.4 +yarl==1.9.2 From fff907d4cbe5a54e885fffbb6b8f94c003523105 Mon Sep 17 00:00:00 2001 From: Manank Patni Date: Wed, 28 Jun 2023 05:20:45 +0530 Subject: [PATCH 2/6] Upgrade dipdup to 6.5.7 Signed-off-by: Manank Patni --- Dockerfile | 2 +- dipdup.yml | 100 ++--------- .../handlers/on_factory_origination.py | 5 - requirements.txt | 156 +++++++++++------- 4 files changed, 109 insertions(+), 154 deletions(-) diff --git a/Dockerfile b/Dockerfile index aad2dbc..20b5595 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM dipdup/dipdup:6.1.2 +FROM dipdup/dipdup:6.5.7 COPY requirements.txt . diff --git a/dipdup.yml b/dipdup.yml index e12b2bd..9de0c09 100644 --- a/dipdup.yml +++ b/dipdup.yml @@ -20,10 +20,10 @@ advanced: contracts: registry_mainnet: - address: KT1MFxwTan4ptw6PSc3KK6e1xfzMrCb382tw + code_hash: KT1MFxwTan4ptw6PSc3KK6e1xfzMrCb382tw typename: registry registry_ghostnet: - address: KT1QZtF8vVUvZYRxttRwgftc4EaQHZWgzXNp + code_hash: KT1QZtF8vVUvZYRxttRwgftc4EaQHZWgzXNp typename: registry datasources: @@ -86,93 +86,13 @@ templates: indexes: factory_mainnet: - kind: operation - datasource: tzkt_mainnet - types: - - origination - handlers: - - callback: on_factory_origination - pattern: - - type: origination - similar_to: registry_mainnet - - callback: on_propose - pattern: - - type: transaction - destination: registry_mainnet - entrypoint: propose - - callback: on_vote - pattern: - - type: transaction - destination: registry_mainnet - entrypoint: vote - - callback: on_drop_proposal - pattern: - - type: transaction - destination: registry_mainnet - entrypoint: drop_proposal - - callback: on_unstake_vote - pattern: - - type: transaction - destination: registry_mainnet - entrypoint: unstake_vote - - callback: on_flush - pattern: - - type: transaction - destination: registry_mainnet - entrypoint: flush - - callback: on_freeze - pattern: - - type: transaction - destination: registry_mainnet - entrypoint: freeze - - callback: on_unfreeze - pattern: - - type: transaction - destination: registry_mainnet - entrypoint: unfreeze + template: registry_dao + values: + datasource: tzkt_mainnet + contract: registry_mainnet factory_ghostnet: - kind: operation - datasource: tzkt_ghostnet - types: - - origination - handlers: - - callback: on_factory_origination - pattern: - - type: origination - similar_to: registry_ghostnet - - callback: on_propose - pattern: - - type: transaction - destination: registry_ghostnet - entrypoint: propose - - callback: on_vote - pattern: - - type: transaction - destination: registry_ghostnet - entrypoint: vote - - callback: on_drop_proposal - pattern: - - type: transaction - destination: registry_ghostnet - entrypoint: drop_proposal - - callback: on_unstake_vote - pattern: - - type: transaction - destination: registry_ghostnet - entrypoint: unstake_vote - - callback: on_flush - pattern: - - type: transaction - destination: registry_ghostnet - entrypoint: flush - - callback: on_freeze - pattern: - - type: transaction - destination: registry_ghostnet - entrypoint: freeze - - callback: on_unfreeze - pattern: - - type: transaction - destination: registry_ghostnet - entrypoint: unfreeze + template: registry_dao + values: + datasource: tzkt_ghostnet + contract: registry_ghostnet diff --git a/registrydao/handlers/on_factory_origination.py b/registrydao/handlers/on_factory_origination.py index ea4fb3f..6daf612 100644 --- a/registrydao/handlers/on_factory_origination.py +++ b/registrydao/handlers/on_factory_origination.py @@ -18,11 +18,6 @@ async def on_factory_origination( network = extract_network_from_ctx(ctx) if index_name not in ctx.config.indexes: - await ctx.add_contract( - name=originated_contract, - address=originated_contract, - typename='registry', - ) await ctx.add_index( name=index_name, template='registry_dao', diff --git a/requirements.txt b/requirements.txt index 9b2785f..907dc96 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,72 +1,112 @@ -aiohttp==3.8.1 -aiolimiter==1.0.0 -aiosignal==1.2.0 +aiohttp==3.8.4 +aiolimiter==1.1.0 +aiosignal==1.3.1 aiosqlite==0.17.0 -anyio==3.5.0 +anyio==3.7.0 appdirs==1.4.4 -APScheduler==3.9.1 -argcomplete==2.0.0 +APScheduler==3.10.1 +argcomplete==3.0.8 async-timeout==4.0.2 -asyncclick==8.0.3.2 -asyncpg==0.26.0 +asyncclick==8.1.3.4 +asyncpg==0.27.0 attrs==21.4.0 -black==22.3.0 -certifi==2021.10.8 -chardet==4.0.0 -charset-normalizer==2.0.12 -click==8.1.2 -datamodel-code-generator==0.13.1 -dipdup==6.1.2 -dnspython==2.2.1 -email-validator==1.2.0 -fcache==0.4.7 -frozenlist==1.3.0 +black==23.3.0 +build==0.10.0 +CacheControl==0.12.11 +certifi==2023.5.7 +cffi==1.15.1 +chardet==5.1.0 +charset-normalizer==3.1.0 +cleo==2.0.1 +click==8.1.3 +crashtest==0.4.1 +cryptography==40.0.2 +datamodel-code-generator==0.19.0 +dipdup==6.5.7 +distlib==0.3.6 +dnspython==2.3.0 +dulwich==0.21.5 +email-validator==2.0.0.post2 +exceptiongroup==1.1.1 +fcache==0.5.0 +filelock==3.12.0 +frozenlist==1.3.3 genson==1.2.2 -idna==3.3 -inflect==5.5.2 -iso8601==1.0.2 +html5lib==1.1 +idna==3.4 +importlib-metadata==6.6.0 +importlib-resources==5.12.0 +inflect==5.6.2 +installer==0.6.0 +iso8601==1.1.0 isodate==0.6.1 -isort==5.10.1 -Jinja2==3.1.1 -jsonschema==3.2.0 -MarkupSafe==2.1.1 -msgpack==1.0.3 -multidict==6.0.2 -mypy-extensions==0.4.3 -openapi-schema-validator==0.1.6 -openapi-spec-validator==0.3.3 -orjson==3.6.8 -pathspec==0.9.0 -platformdirs==2.5.2 -prance==0.21.8.0 -prometheus-client==0.14.1 -pydantic==1.9.2 -pyhumps==3.5.3 +isort==5.12.0 +jaraco.classes==3.2.3 +jeepney==0.8.0 +Jinja2==3.1.2 +jsonschema==4.17.3 +jsonschema-spec==0.1.4 +keyring==23.13.1 +lazy-object-proxy==1.9.0 +lockfile==0.12.2 +MarkupSafe==2.1.2 +more-itertools==9.1.0 +msgpack==1.0.5 +multidict==6.0.4 +mypy-extensions==1.0.0 +openapi-schema-validator==0.3.4 +openapi-spec-validator==0.5.1 +orjson==3.8.14 +packaging==23.1 +pathable==0.4.3 +pathspec==0.11.1 +pexpect==4.8.0 +pkginfo==1.9.6 +platformdirs==3.5.1 +poetry==1.4.0 +poetry-core==1.5.1 +poetry-plugin-export==1.3.1 +prance==0.22.2.22.0 +prometheus-client==0.16.0 +ptyprocess==0.7.0 +pycparser==2.21 +pydantic==1.10.8 +pyhumps==3.8.0 pypika-tortoise==0.1.6 -pyrsistent==0.16.1 -pysignalr==0.1.2 +pyproject_hooks==1.0.0 +pyrsistent==0.19.3 +pysignalr==0.2.0 PySnooper==1.1.1 python-dotenv==0.19.2 -pytz==2022.1 +pytz==2023.3 pytz-deprecation-shim==0.1.0.post0 PyYAML==6.0 -requests==2.27.1 -ruamel.yaml==0.17.21 -ruamel.yaml.clib==0.2.6 -semver==2.13.0 -sentry-sdk==1.5.10 +rapidfuzz==2.15.1 +requests==2.31.0 +requests-toolbelt==0.10.1 +ruamel.yaml==0.17.30 +ruamel.yaml.clib==0.2.7 +SecretStorage==3.3.3 +semver==3.0.1 +sentry-sdk==1.21.1 +shellingham==1.5.0.post1 six==1.16.0 -sniffio==1.2.0 -sqlparse==0.4.2 -tabulate==0.8.9 +sniffio==1.3.0 +sqlparse==0.4.4 +tabulate==0.9.0 toml==0.10.2 tomli==2.0.1 -tortoise-orm==0.19.2 -typed-ast==1.5.3 -typing-inspect==0.6.0 -typing_extensions==4.2.0 -tzdata==2022.1 -tzlocal==4.2 -urllib3==1.26.9 -websockets==10.3 -yarl==1.7.2 +tomlkit==0.11.8 +tortoise-orm==0.19.3 +trove-classifiers==2023.5.24 +typed-ast==1.5.4 +typing-inspect==0.9.0 +typing_extensions==4.6.2 +tzdata==2023.3 +tzlocal==5.0.1 +urllib3==2.0.2 +virtualenv==20.21.1 +webencodings==0.5.1 +websockets==10.4 +yarl==1.9.2 +zipp==3.15.0 \ No newline at end of file From 4ff808b7413c828ec8efc30cdb051cd0c9b9aaba Mon Sep 17 00:00:00 2001 From: Manank Patni Date: Wed, 28 Jun 2023 05:28:06 +0530 Subject: [PATCH 3/6] Revert "Upgrade dipdup to 6.5.7" --- requirements.txt | 122 ++++++++++++++++++++++++----------------------- 1 file changed, 62 insertions(+), 60 deletions(-) diff --git a/requirements.txt b/requirements.txt index 0e65176..9b2785f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,70 +1,72 @@ -aiohttp==3.8.4 -aiolimiter==1.1.0 -aiosignal==1.3.1 +aiohttp==3.8.1 +aiolimiter==1.0.0 +aiosignal==1.2.0 aiosqlite==0.17.0 -anyio==3.7.0 -APScheduler==3.10.1 -argcomplete==3.1.1 +anyio==3.5.0 +appdirs==1.4.4 +APScheduler==3.9.1 +argcomplete==2.0.0 async-timeout==4.0.2 -asyncclick==8.1.3.4 -asyncpg==0.27.0 -attrs==23.1.0 -black==23.3.0 -certifi==2023.5.7 -chardet==5.1.0 -charset-normalizer==3.1.0 -click==8.1.3 -datamodel-code-generator==0.19.0 -dipdup==6.5.7 -dnspython==2.3.0 -email-validator==2.0.0.post2 -exceptiongroup==1.1.1 -frozenlist==1.3.3 +asyncclick==8.0.3.2 +asyncpg==0.26.0 +attrs==21.4.0 +black==22.3.0 +certifi==2021.10.8 +chardet==4.0.0 +charset-normalizer==2.0.12 +click==8.1.2 +datamodel-code-generator==0.13.1 +dipdup==6.1.2 +dnspython==2.2.1 +email-validator==1.2.0 +fcache==0.4.7 +frozenlist==1.3.0 genson==1.2.2 -idna==3.4 -importlib-resources==5.12.0 -inflect==5.6.2 -iso8601==1.1.0 -isort==5.12.0 -Jinja2==3.1.2 -jsonschema==4.17.3 -jsonschema-spec==0.1.6 -lazy-object-proxy==1.9.0 -MarkupSafe==2.1.3 -msgpack==1.0.5 -multidict==6.0.4 -mypy-extensions==1.0.0 -openapi-schema-validator==0.3.4 -openapi-spec-validator==0.5.1 -orjson==3.9.1 -packaging==23.1 -pathable==0.4.3 -pathspec==0.11.1 -platformdirs==3.5.3 -prance==0.22.2.22.0 -prometheus-client==0.16.0 -pydantic==1.10.8 -pyhumps==3.8.0 +idna==3.3 +inflect==5.5.2 +iso8601==1.0.2 +isodate==0.6.1 +isort==5.10.1 +Jinja2==3.1.1 +jsonschema==3.2.0 +MarkupSafe==2.1.1 +msgpack==1.0.3 +multidict==6.0.2 +mypy-extensions==0.4.3 +openapi-schema-validator==0.1.6 +openapi-spec-validator==0.3.3 +orjson==3.6.8 +pathspec==0.9.0 +platformdirs==2.5.2 +prance==0.21.8.0 +prometheus-client==0.14.1 +pydantic==1.9.2 +pyhumps==3.5.3 pypika-tortoise==0.1.6 -pyrsistent==0.19.3 -pysignalr==0.2.0 +pyrsistent==0.16.1 +pysignalr==0.1.2 PySnooper==1.1.1 python-dotenv==0.19.2 -pytz==2023.3 +pytz==2022.1 +pytz-deprecation-shim==0.1.0.post0 PyYAML==6.0 -requests==2.31.0 -ruamel.yaml==0.17.31 -ruamel.yaml.clib==0.2.7 -sentry-sdk==1.25.1 +requests==2.27.1 +ruamel.yaml==0.17.21 +ruamel.yaml.clib==0.2.6 +semver==2.13.0 +sentry-sdk==1.5.10 six==1.16.0 -sniffio==1.3.0 -sqlparse==0.4.4 -tabulate==0.9.0 +sniffio==1.2.0 +sqlparse==0.4.2 +tabulate==0.8.9 toml==0.10.2 tomli==2.0.1 -tortoise-orm==0.19.3 -typing_extensions==4.6.3 -tzlocal==5.0.1 -urllib3==2.0.3 -websockets==10.4 -yarl==1.9.2 +tortoise-orm==0.19.2 +typed-ast==1.5.3 +typing-inspect==0.6.0 +typing_extensions==4.2.0 +tzdata==2022.1 +tzlocal==4.2 +urllib3==1.26.9 +websockets==10.3 +yarl==1.7.2 From f4ae8a2c41f8a538fcd389e39e4ae4a65ad2fc46 Mon Sep 17 00:00:00 2001 From: Manank Patni Date: Wed, 28 Jun 2023 05:42:34 +0530 Subject: [PATCH 4/6] Change requirements.txt (#33) Signed-off-by: Manank Patni --- requirements.txt | 182 ++++++++++++++++++----------------------------- 1 file changed, 71 insertions(+), 111 deletions(-) diff --git a/requirements.txt b/requirements.txt index 907dc96..f10a2e1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,112 +1,72 @@ -aiohttp==3.8.4 -aiolimiter==1.1.0 -aiosignal==1.3.1 -aiosqlite==0.17.0 -anyio==3.7.0 -appdirs==1.4.4 -APScheduler==3.10.1 -argcomplete==3.0.8 -async-timeout==4.0.2 -asyncclick==8.1.3.4 -asyncpg==0.27.0 -attrs==21.4.0 -black==23.3.0 -build==0.10.0 -CacheControl==0.12.11 -certifi==2023.5.7 -cffi==1.15.1 -chardet==5.1.0 -charset-normalizer==3.1.0 -cleo==2.0.1 -click==8.1.3 -crashtest==0.4.1 -cryptography==40.0.2 -datamodel-code-generator==0.19.0 dipdup==6.5.7 -distlib==0.3.6 -dnspython==2.3.0 -dulwich==0.21.5 -email-validator==2.0.0.post2 -exceptiongroup==1.1.1 -fcache==0.5.0 -filelock==3.12.0 -frozenlist==1.3.3 -genson==1.2.2 -html5lib==1.1 -idna==3.4 -importlib-metadata==6.6.0 -importlib-resources==5.12.0 -inflect==5.6.2 -installer==0.6.0 -iso8601==1.1.0 -isodate==0.6.1 -isort==5.12.0 -jaraco.classes==3.2.3 -jeepney==0.8.0 -Jinja2==3.1.2 -jsonschema==4.17.3 -jsonschema-spec==0.1.4 -keyring==23.13.1 -lazy-object-proxy==1.9.0 -lockfile==0.12.2 -MarkupSafe==2.1.2 -more-itertools==9.1.0 -msgpack==1.0.5 -multidict==6.0.4 -mypy-extensions==1.0.0 -openapi-schema-validator==0.3.4 -openapi-spec-validator==0.5.1 -orjson==3.8.14 -packaging==23.1 -pathable==0.4.3 -pathspec==0.11.1 -pexpect==4.8.0 -pkginfo==1.9.6 -platformdirs==3.5.1 -poetry==1.4.0 -poetry-core==1.5.1 -poetry-plugin-export==1.3.1 -prance==0.22.2.22.0 -prometheus-client==0.16.0 -ptyprocess==0.7.0 -pycparser==2.21 -pydantic==1.10.8 -pyhumps==3.8.0 -pypika-tortoise==0.1.6 -pyproject_hooks==1.0.0 -pyrsistent==0.19.3 -pysignalr==0.2.0 -PySnooper==1.1.1 -python-dotenv==0.19.2 -pytz==2023.3 -pytz-deprecation-shim==0.1.0.post0 -PyYAML==6.0 -rapidfuzz==2.15.1 -requests==2.31.0 -requests-toolbelt==0.10.1 -ruamel.yaml==0.17.30 -ruamel.yaml.clib==0.2.7 -SecretStorage==3.3.3 -semver==3.0.1 -sentry-sdk==1.21.1 -shellingham==1.5.0.post1 -six==1.16.0 -sniffio==1.3.0 -sqlparse==0.4.4 -tabulate==0.9.0 -toml==0.10.2 -tomli==2.0.1 -tomlkit==0.11.8 -tortoise-orm==0.19.3 -trove-classifiers==2023.5.24 -typed-ast==1.5.4 -typing-inspect==0.9.0 -typing_extensions==4.6.2 -tzdata==2023.3 -tzlocal==5.0.1 -urllib3==2.0.2 -virtualenv==20.21.1 -webencodings==0.5.1 -websockets==10.4 -yarl==1.9.2 -zipp==3.15.0 \ No newline at end of file +aiohttp +aiolimiter +aiosignal +aiosqlite +anyio +appdirs +APScheduler +argcomplete +async-timeout +asyncclick +asyncpg +attrs +black +certifi +chardet +charset-normalizer +click +datamodel-code-generator +dnspython +email-validator +fcache +frozenlist +genson +idna +inflect +iso8601 +isodate +isort +Jinja2 +jsonschema +MarkupSafe +msgpack +multidict +mypy-extensions +openapi-schema-validator +openapi-spec-validator +orjson +pathspec +platformdirs +prance +prometheus-client +pydantic +pyhumps +pypika-tortoise +pyrsistent +pysignalr +PySnooper +python-dotenv +pytz +pytz-deprecation-shim +PyYAML +requests +ruamel.yaml +ruamel.yaml.clib +semver +sentry-sdk +six +sniffio +sqlparse +tabulate +toml +tomli +tortoise-orm +typed-ast +typing-inspect +typing_extensions +tzdata +tzlocal +urllib3 +websockets +yarl From 646edeaaa9e3dc5c8baf7f846254e06a3b71ac55 Mon Sep 17 00:00:00 2001 From: Ben Walker Date: Tue, 26 Dec 2023 16:26:29 -0800 Subject: [PATCH 5/6] Fix docker compose --- .gitignore | 2 +- Dockerfile | 2 +- docker-compose.yml | 1 + registrydao/__pycache__/__init__.cpython-38.pyc | Bin 146 -> 0 bytes registrydao/__pycache__/models.cpython-38.pyc | Bin 6783 -> 0 bytes 5 files changed, 3 insertions(+), 2 deletions(-) delete mode 100644 registrydao/__pycache__/__init__.cpython-38.pyc delete mode 100644 registrydao/__pycache__/models.cpython-38.pyc diff --git a/.gitignore b/.gitignore index 68bec91..e46670d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,4 @@ .env.* virtualenv venv -__pycache__ \ No newline at end of file +__pycache__/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 20b5595..baab606 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,4 +4,4 @@ COPY requirements.txt . RUN pip3 install -r requirements.txt -COPY . . +COPY --chown=dipdup . . diff --git a/docker-compose.yml b/docker-compose.yml index 99ef058..40cbde2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,6 +15,7 @@ services: - HASURA_GRAPHQL_UNAUTHORIZED_ROLE=indexer - HASURA_GRAPHQL_STRINGIFY_NUMERIC_TYPES=true image: hasura/graphql-engine:v2.8.3.cli-migrations-v3 + restart: always db: container_name: hb-indexer-postgres ports: diff --git a/registrydao/__pycache__/__init__.cpython-38.pyc b/registrydao/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index 897cc0921871ebd94c17125962c31eae08ab3fff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 146 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 From 341ffb87b3aa77aca09c1cb1197d9b02be0fe7c2 Mon Sep 17 00:00:00 2001 From: Ben Walker Date: Tue, 26 Dec 2023 16:39:50 -0800 Subject: [PATCH 6/6] Add readme & license --- LICENSE | 7 +++++++ README.md | 45 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..486623c --- /dev/null +++ b/LICENSE @@ -0,0 +1,7 @@ +Copyright 2023 dOrg, LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index f9a96f2..58a6fbe 100644 --- a/README.md +++ b/README.md @@ -1 +1,44 @@ -homebase-indexer +# Homebase Indexer + +## Overview +**Homebase Indexer** is a specialized tool crafted using DipDup, Tezos's Python framework. It serves as an equivalent to [a subgraph](https://thegraph.com/) and provides a GraphQL API, enabling efficient interaction with the Tezos blockchain. Primarily driven by the `dipdup.yml` file, it efficiently handles contract events. The main branches for the current version are `v3-master` and `v3-develop` (production and development respectively), although version 2 branches are still maintained for some DAOs that have not transitioned to version 3. + +## Prerequisites +Before installing Homebase Indexer, ensure you have the following: +- Python 3.8 or higher +- Docker and Docker Compose +- Basic understanding of blockchain concepts and Tezos + +## Installation and Setup +1. **Clone the Repository**: `git clone https://github.com/dOrgTech/homebase-indexer.git -b v3-develop` +2. **Navigate to the Project Directory**: `cd homebase-indexer` +3. **Build the Docker Image**: `docker build -t homebase-indexer .` +4. **Initialize Using Docker Compose**: `docker-compose up` + +## Usage +To run the Homebase Indexer: +``` +docker-compose up +``` +This will start the indexer and initiate syncing with the Tezos node as per the configuration. + +## Configuration +Configure the indexer using the `dipdup.yml` file. For advanced settings and customization, refer to the [DipDup's documentation](https://docs.dipdup.io). + +## Contribution Guidelines +Contributions are welcome! To contribute: +1. Fork the repository +2. Create a new branch for your feature +3. Commit your changes +4. Push to the branch +5. Open a pull request + +## Troubleshooting +- **Issue**: Docker build fails. + **Solution**: Ensure Docker is running and you have the necessary permissions. + +- **Issue**: Indexer not syncing. + **Solution**: Check the `dipdup.yml` configuration and ensure network connectivity. + +## License +Homebase Indexer is licensed under [MIT License](LICENSE). \ No newline at end of file