Skip to content

Commit

Permalink
Join config from multiple paths (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
droserasprout authored Apr 27, 2021
1 parent 73e90e8 commit 00a5eb7
Show file tree
Hide file tree
Showing 10 changed files with 53 additions and 307 deletions.
18 changes: 13 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ services:
depends_on:
- db
volumes:
- ./src/demo_hic_et_nunc/dipdup-docker.yml:/home/dipdup/dipdup.yml
- ./src/demo_hic_et_nunc/dipdup.yml:/home/dipdup/dipdup.yml
- ./src/demo_hic_et_nunc/dipdup-docker.yml:/home/dipdup/dipdup-docker.yml
command: ["-c", "dipdup.yml", "-c", "dipdup-docker.yml", "run"]
restart: always
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-changeme}
Expand All @@ -17,7 +19,9 @@ services:
depends_on:
- db
volumes:
- ./src/demo_quipuswap/dipdup-docker.yml:/home/dipdup/dipdup.yml
- ./src/demo_quipuswap/dipdup.yml:/home/dipdup/dipdup.yml
- ./src/demo_quipuswap/dipdup-docker.yml:/home/dipdup/dipdup-docker.yml
command: ["-c", "dipdup.yml", "-c", "dipdup-docker.yml", "run"]
restart: always
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-changeme}
Expand All @@ -28,18 +32,22 @@ services:
depends_on:
- db
volumes:
- ./src/demo_tzcolors/dipdup-docker.yml:/home/dipdup/dipdup.yml
- ./src/demo_tzcolors/dipdup.yml:/home/dipdup/dipdup.yml
- ./src/demo_tzcolors/dipdup-docker.yml:/home/dipdup/dipdup-docker.yml
command: ["-c", "dipdup.yml", "-c", "dipdup-docker.yml", "run"]
restart: always
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-changeme}
- ADMIN_SECRET=${ADMIN_SECRET:-changeme}

domains:
tezos_domains:
build: .
depends_on:
- db
volumes:
- ./src/demo_tezos_domains/dipdup-docker.yml:/home/dipdup/dipdup.yml
- ./src/demo_tezos_domains/dipdup.yml:/home/dipdup/dipdup.yml
- ./src/demo_tezos_domains/dipdup-docker.yml:/home/dipdup/dipdup-docker.yml
command: ["-c", "dipdup.yml", "-c", "dipdup-docker.yml", "run"]
restart: always
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-changeme}
Expand Down
41 changes: 0 additions & 41 deletions src/demo_hic_et_nunc/dipdup-docker.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
spec_version: 0.0.1
package: demo_hic_et_nunc

database:
kind: postgres
host: db
Expand All @@ -13,41 +10,3 @@ database:
hasura:
url: http://hasura:8080
admin_secret: ${ADMIN_SECRET:-changeme}

contracts:
HEN_objkts:
address: ${HEN_OBJKTS:-KT1RJ6PbjHpwc3M5rw5s2Nbmefwbuwbdxton}
typename: hen_objkts
HEN_minter:
address: ${HEN_MINTER:-KT1Hkg5qeNhfwpKW4fXvq7HGZB9z2EnmCCA9}
typename: hen_minter

datasources:
tzkt_mainnet:
kind: tzkt
url: ${TZKT_URL:-https://staging.api.tzkt.io}

indexes:
hen_mainnet:
kind: operation
datasource: tzkt_mainnet
contract: HEN_minter
handlers:
- callback: on_mint
pattern:
- destination: HEN_minter
entrypoint: mint_OBJKT
- destination: HEN_objkts
entrypoint: mint
- callback: on_swap
pattern:
- destination: HEN_minter
entrypoint: swap
- callback: on_cancel_swap
pattern:
- destination: HEN_minter
entrypoint: cancel_swap
- callback: on_collect
pattern:
- destination: HEN_minter
entrypoint: collect
130 changes: 4 additions & 126 deletions src/demo_quipuswap/dipdup-docker.yml
Original file line number Diff line number Diff line change
@@ -1,134 +1,12 @@
spec_version: 0.0.1
package: demo_quipuswap

database:
kind: postgres
host: db
port: 5432
user: dipdup
password: changeme
database: dipdup
user: ${POSTGRES_USER:-dipdup}
password: ${POSTGRES_PASSWORD:-changeme}
database: ${POSTGRES_DB:-dipdup}
schema_name: quipuswap

hasura:
url: http://hasura:8080
admin_secret: changeme

contracts:
kusd_dex_mainnet:
address: KT1CiSKXR68qYSxnbzjwvfeMCRburaSDonT2
typename: quipu_fa12
tzbtc_dex_mainnet:
address: KT1N1wwNPqT5jGhM91GQ2ae5uY8UzFaXHMJS
typename: quipu_fa12
kusd_token_mainnet:
address: KT1K9gCRgaLRFKTErYt1wVxA3Frb9FjasjTV
typename: fa12_token
tzbtc_token_mainnet:
address: KT1PWx2mnDueood7fEmfbBDKx1D9BAnnXitn
typename: fa12_token
hdao_dex_mainnet:
address: KT1V41fGzkdTJki4d11T1Rp9yPkCmDhB7jph
typename: quipu_fa2
hdao_token_mainnet:
address: KT1AFA2mwNUMNd4SsujE1YYp29vd8BZejyKW
typename: fa2_token

datasources:
tzkt_staging_mainnet:
kind: tzkt
url: https://staging.api.tzkt.io

templates:
quipuswap_fa12:
kind: operation
datasource: tzkt_staging_mainnet
contract: <dex_contract>
handlers:
- callback: on_fa12_token_to_tez
pattern:
- destination: <dex_contract>
entrypoint: tokenToTezPayment
- destination: <token_contract>
entrypoint: transfer
- callback: on_fa12_tez_to_token
pattern:
- destination: <dex_contract>
entrypoint: tezToTokenPayment
- destination: <token_contract>
entrypoint: transfer
- callback: on_fa12_invest_liquidity
pattern:
- destination: <dex_contract>
entrypoint: investLiquidity
- destination: <token_contract>
entrypoint: transfer
- callback: on_fa12_divest_liquidity
pattern:
- destination: <dex_contract>
entrypoint: divestLiquidity
- destination: <token_contract>
entrypoint: transfer
- callback: on_fa12_withdraw_profit
pattern:
- destination: <dex_contract>
entrypoint: withdrawProfit

quipuswap_fa2:
kind: operation
datasource: tzkt_staging_mainnet
contract: <dex_contract>
handlers:
- callback: on_fa2_token_to_tez
pattern:
- destination: <dex_contract>
entrypoint: tokenToTezPayment
- destination: <token_contract>
entrypoint: transfer
- callback: on_fa2_tez_to_token
pattern:
- destination: <dex_contract>
entrypoint: tezToTokenPayment
- destination: <token_contract>
entrypoint: transfer
- callback: on_fa20_invest_liquidity
pattern:
- destination: <dex_contract>
entrypoint: investLiquidity
- destination: <token_contract>
entrypoint: transfer
- callback: on_fa20_divest_liquidity
pattern:
- destination: <dex_contract>
entrypoint: divestLiquidity
- destination: <token_contract>
entrypoint: transfer
- callback: on_fa20_withdraw_profit
pattern:
- destination: <dex_contract>
entrypoint: withdrawProfit

indexes:
kusd_mainnet:
template: quipuswap_fa12
values:
dex_contract: kusd_dex_mainnet
token_contract: kusd_token_mainnet
symbol: kUSD
decimals: 18

# tzbtc_mainnet:
# template: quipuswap_fa12
# values:
# dex_contract: tzbtc_dex_mainnet
# token_contract: tzbtc_token_mainnet
# symbol: tzBTC
# decimals: 8

hdao_mainnet:
template: quipuswap_fa2
values:
dex_contract: hdao_dex_mainnet
token_contract: hdao_token_mainnet
symbol: hDAO
decimals: 6
admin_secret: ${ADMIN_SECRET:-changeme}
39 changes: 4 additions & 35 deletions src/demo_registrydao/dipdup-docker.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,12 @@
spec_version: 0.0.1
package: demo_registrydao

database:
kind: postgres
host: db
port: 5432
user: dipdup
password: changeme
database: dipdup
user: ${POSTGRES_USER:-dipdup}
password: ${POSTGRES_PASSWORD:-changeme}
database: ${POSTGRES_DB:-dipdup}
schema_name: registrydao

hasura:
url: http://hasura:8080
admin_secret: changeme

contracts:
registry:
address: KT1QMdCTqzmY4QKHntV1nZEinLPU1GbxUFQu
typename: registry

datasources:
tzkt:
kind: tzkt
url: ${TZKT_URL:-https://staging.api.edo2net.tzkt.io}

templates:

registry_dao:
kind: operation
datasource: tzkt
contract: <contract>
handlers:
- callback: on_propose
pattern:
- destination: <contract>
entrypoint: propose

indexes:
registry:
template: registry_dao
values:
contract: registry
admin_secret: ${ADMIN_SECRET:-changeme}
39 changes: 4 additions & 35 deletions src/demo_tezos_domains/dipdup-docker.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,12 @@
spec_version: 0.1
package: demo_tezos_domains

database:
kind: postgres
host: db
port: 5432
user: ${POSTGRES_USER:-dipdup}
password: ${POSTGRES_PASSWORD:-changeme}
database: ${POSTGRES_DB:-dipdup}
schema_name: domains

contracts:
edo_name_registry:
address: KT1JJbWfW8CHUY95hG9iq2CEMma1RiKhMHDR
typename: name_registry

datasources:
tzkt_staging_edo:
kind: tzkt
url: https://staging.api.edo2net.tzkt.io

templates:
tezos_domains:
kind: operation
datasource: <datasource>
contract: <name_registry>
handlers:
- callback: on_admin_update
pattern:
- destination: <name_registry>
entrypoint: admin_update
- callback: on_execute
pattern:
- destination: <name_registry>
entrypoint: execute
schema_name: tezos_domains

indexes:
tezos_domains_edo:
template: tezos_domains
values:
datasource: tzkt_staging_edo
name_registry: edo_name_registry
hasura:
url: http://hasura:8080
admin_secret: ${ADMIN_SECRET:-changeme}
53 changes: 4 additions & 49 deletions src/demo_tzcolors/dipdup-docker.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,12 @@
spec_version: 0.0.1
package: demo_tzcolors

database:
kind: postgres
host: db
port: 5432
user: dipdup
password: changeme
database: dipdup
user: ${POSTGRES_USER:-dipdup}
password: ${POSTGRES_PASSWORD:-changeme}
database: ${POSTGRES_DB:-dipdup}
schema_name: tzcolors

hasura:
url: http://hasura:8080
admin_secret: changeme

contracts:
tzcolors_minter:
address: KT1FyaDqiMQWg7Exo7VUiXAgZbd2kCzo3d4s
typename: tzcolors_minter
tzcolors_auction:
address: KT1CpeSQKdkhWi4pinYcseCFKmDhs5M74BkU
typename: tzcolors_auction

datasources:
tzkt_staging:
kind: tzkt
url: ${TZKT_URL:-https://staging.api.tzkt.io}

templates:

tzcolors_auction:
kind: operation
datasource: <datasource>
contract: <auction>
handlers:
- callback: on_create_auction
pattern:
- destination: <auction>
entrypoint: create_auction
- callback: on_bid
pattern:
- destination: <auction>
entrypoint: bid
- callback: on_withdraw
pattern:
- destination: <auction>
entrypoint: withdraw

indexes:

tzcolors_auction:
template: tzcolors_auction
values:
datasource: tzkt_staging
minter: tzcolors_minter
auction: tzcolors_auction
admin_secret: ${ADMIN_SECRET:-changeme}
Loading

0 comments on commit 00a5eb7

Please sign in to comment.