This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dipdup.yml
256 lines (245 loc) · 6.79 KB
/
dipdup.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
spec_version: 1.2
package: juster
database:
kind: postgres
host: db
port: 5432
user: ${POSTGRES_USER:-dipdup}
password: ${POSTGRES_PASSWORD:-changeme}
database: ${POSTGRES_DB:-dipdup}
hasura:
url: http://hasura:8080
admin_secret: ${ADMIN_SECRET:-changeme}
select_limit: ${SELECT_LIMIT:-1000}
camel_case: true
allow_aggregations: false
rest: true
contracts:
coinbase_storage_ghostnet:
address: KT1UcwQtaztLSq8oufdXAtWpRTfFySCj7gFM
typename: harbinger_storage
juster_ghostnet:
address: KT1Feq9iRBBhpSBdPF1Y7Sd7iJu7uLqqRf1A
typename: juster
pool_contract_ghostnet:
address: KT1M6fueToCaYBTeG25XZEFCa7YXcNDMn12x
typename: pool
datasources:
tzkt_ghostnet:
kind: tzkt
url: https://api.ghostnet.tzkt.io
coinbase:
kind: coinbase
templates:
harbinger:
kind: big_map
datasource: <datasource>
handlers:
- callback: harbinger.on_oracle_storage_update
contract: <contract>
path: oracleData
pool:
kind: operation
datasource: <datasource>
contracts:
- <contract>
handlers:
- callback: pool.on_deposit_liquidity
pattern:
- type: transaction
destination: <contract>
entrypoint: depositLiquidity
- callback: pool.on_approve_entry
pattern:
- type: transaction
destination: <contract>
entrypoint: approveEntry
- callback: pool.on_cancel_entry
pattern:
- type: transaction
destination: <contract>
entrypoint: cancelEntry
- callback: pool.on_claim_liquidity
pattern:
- type: transaction
destination: <contract>
entrypoint: claimLiquidity
- type: transaction
source: <contract>
optional: True
- callback: pool.on_withdraw_claims
pattern:
- type: transaction
destination: <contract>
entrypoint: withdrawClaims
- callback: pool.on_create_event
pattern:
- type: transaction
destination: <contract>
entrypoint: createEvent
- type: transaction
entrypoint: newEvent
source: <contract>
destination: <juster_core>
- type: transaction
entrypoint: provideLiquidity
source: <contract>
destination: <juster_core>
- callback: pool.on_pay_reward
pattern:
- type: transaction
destination: <contract>
entrypoint: payReward
- callback: pool.on_default
pattern:
- type: transaction
destination: <contract>
entrypoint: default
- callback: pool.on_add_line
pattern:
- type: transaction
destination: <contract>
entrypoint: addLine
- callback: pool.on_trigger_pause_deposit
pattern:
- type: transaction
destination: <contract>
entrypoint: triggerPauseDeposit
- callback: pool.on_trigger_pause_line
pattern:
- type: transaction
destination: <contract>
entrypoint: triggerPauseLine
- callback: pool.on_set_entry_lock_period
pattern:
- type: transaction
destination: <contract>
entrypoint: setEntryLockPeriod
- callback: pool.on_disband
pattern:
- type: transaction
destination: <contract>
entrypoint: disband
juster:
kind: operation
datasource: <datasource>
contracts:
- <contract>
handlers:
- callback: core.on_new_event
pattern:
- type: transaction
destination: <contract>
entrypoint: newEvent
- callback: core.on_provide_liquidity
pattern:
- type: transaction
destination: <contract>
entrypoint: provideLiquidity
- callback: core.on_bet
pattern:
- type: transaction
destination: <contract>
entrypoint: bet
- callback: core.on_start_measurement
pattern:
- type: transaction
destination: <contract>
entrypoint: startMeasurementCallback
- type: transaction
source: <contract>
- callback: core.on_close
pattern:
- type: transaction
destination: <contract>
entrypoint: closeCallback
- type: transaction
source: <contract>
- callback: core.on_withdraw
pattern:
- type: transaction
destination: <contract>
entrypoint: withdraw
- type: transaction
source: <contract>
optional: True
- type: transaction
source: <contract>
optional: True
- callback: core.on_force_majeure
pattern:
- type: transaction
destination: <contract>
entrypoint: triggerForceMajeure
- type: transaction
source: <contract>
pool_origination:
kind: operation
datasource: <datasource>
types:
- transaction
- origination
handlers:
- callback: pool.on_pool_origination
pattern:
- type: origination
similar_to: <pool_example>
strict: true
indexes:
harbinger_ghostnet:
template: harbinger
values:
datasource: tzkt_ghostnet
contract: coinbase_storage_ghostnet
juster_ghostnet:
template: juster
values:
datasource: tzkt_ghostnet
contract: juster_ghostnet
pool_ghostnet_origination:
template: pool_origination
values:
datasource: tzkt_ghostnet
juster_core: juster_ghostnet
approved_source: tz1bgvq6y5RdjAUzBNNovqoAgBXv77dbkdhT
pool_example: pool_contract_ghostnet
hooks:
fetch_coinbase_candles:
callback: fetch_coinbase_candles
atomic: false
args:
datasource: str
candle_interval: str
since: str
currency_pair: str
refresh_views:
callback: refresh_views
atomic: false
jobs:
coinbase_xtz_usd_1m_candles:
hook: fetch_coinbase_candles
crontab: "* * * * *"
args:
datasource: coinbase
candle_interval: ONE_MINUTE
since: ${CANDLES_SINCE:-2022-01-01T00:00:00}
currency_pair: XTZ-USD
coinbase_btc_usd_1m_candles:
hook: fetch_coinbase_candles
crontab: "* * * * *"
args:
datasource: coinbase
candle_interval: ONE_MINUTE
since: ${CANDLES_SINCE:-2022-01-01T00:00:00}
currency_pair: BTC-USD
coinbase_eth_usd_1m_candles:
hook: fetch_coinbase_candles
crontab: "* * * * *"
args:
datasource: coinbase
candle_interval: ONE_MINUTE
since: ${CANDLES_SINCE:-2022-01-01T00:00:00}
currency_pair: ETH-USD
refresh_views:
hook: refresh_views
crontab: "* * * * *"