forked from reflexer-labs/geb-pinger-bots
-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
188 lines (164 loc) · 7.13 KB
/
serverless.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
org: reflexer
app: geb-pinger-bots
service: geb-pinger-bots
provider:
name: aws
runtime: nodejs14.x
region: 'us-west-2'
environment: ${self:custom.${opt:stage}}
# This section is needed if you wish to give a dedicated IP to the lambda function
# Useful if your ETH node is behind a firewall
# Comment-out if not needed
vpc:
subnetIds:
# A VPC with a subnet needs to be manually configured on the AWS dashboard
# The subnet needs a NAT gateway with internet access
- ${param:AWS_VPC_SUBNET_ID_1}
- ${param:AWS_VPC_SUBNET_ID_2}
securityGroupIds:
- ${param:AWS_SECURITY_GROUP}
custom:
# Redirect to either to conf
kovan: ${self:custom.prod}
mainnet: ${self:custom.prod}
custom:
webpack:
webpackConfig: './webpack.config.js'
includeModules: true
# Fetch env vars from the severless dashboard (depends on the stage which can be either kovan or mainnet)
prod:
NETWORK: ${opt:stage}
ETH_RPC: ${param:ETH_RPC}
ACCOUNTS_PASSPHRASE: ${param:ACCOUNTS_PASSPHRASE}
SLACK_HOOK_ERROR_URL: ${param:SLACK_HOOK_ERROR_URL}
SLACK_HOOK_MULTISIG_URL: ${param:SLACK_HOOK_MULTISIG_URL}
BLOCKNATIVE_API_KEY: ${param:BLOCKNATIVE_API_KEY, null}
plugins:
- 'serverless-webpack'
functions:
updateCoinTwapAndRateSetter:
handler: src/index.updateCoinTwapAndRateSetter
timeout: 240
events:
- schedule:
enabled: ${file(./config/config.${opt:stage}.json):pingers.coinTwapAndRateSetter.enabled}
rate: rate(${file(./config/config.${opt:stage}.json):pingers.coinTwapAndRateSetter.schedulerInterval} minutes)
updateETHFsm:
handler: src/index.updateETHFsm
timeout: 240
events:
- schedule:
enabled: ${file(./config/config.${opt:stage}.json):pingers.ethFsm.enabled}
rate: rate(${file(./config/config.${opt:stage}.json):pingers.ethFsm.schedulerInterval} minutes)
updateTaxCollector:
handler: src/index.updateTaxCollector
timeout: 240
events:
- schedule:
enabled: ${file(./config/config.${opt:stage}.json):pingers.taxCollector.enabled}
rate: rate(${file(./config/config.${opt:stage}.json):pingers.taxCollector.schedulerInterval} minutes)
updateStabilityFeeTreasury:
handler: src/index.updateStabilityFeeTreasury
timeout: 240
events:
- schedule:
enabled: ${file(./config/config.${opt:stage}.json):pingers.stabilityFeeTreasury.enabled}
rate: rate(${file(./config/config.${opt:stage}.json):pingers.stabilityFeeTreasury.schedulerInterval} minutes)
pauseExecutor:
handler: src/index.pauseExecutor
timeout: 240
events:
- schedule:
enabled: ${file(./config/config.${opt:stage}.json):pingers.pauseExecutor.enabled}
rate: rate(${file(./config/config.${opt:stage}.json):pingers.pauseExecutor.schedulerInterval} minutes)
debtSettler:
handler: src/index.debtSettler
timeout: 240
events:
- schedule:
enabled: ${file(./config/config.${opt:stage}.json):pingers.debtSettler.enabled}
rate: rate(${file(./config/config.${opt:stage}.json):pingers.debtSettler.schedulerInterval} minutes)
ceilingSetter:
handler: src/index.ceilingSetter
timeout: 240
events:
- schedule:
enabled: ${file(./config/config.${opt:stage}.json):pingers.ceilingSetter.enabled}
rate: rate(${file(./config/config.${opt:stage}.json):pingers.ceilingSetter.schedulerInterval} minutes)
collateralAuctionThrottler:
handler: src/index.collateralAuctionThrottler
timeout: 240
events:
- schedule:
enabled: ${file(./config/config.${opt:stage}.json):pingers.collateralAuctionThrottler.enabled}
rate: rate(${file(./config/config.${opt:stage}.json):pingers.collateralAuctionThrottler.schedulerInterval} minutes)
debtFloorAdjuster:
handler: src/index.debtFloorAdjuster
timeout: 240
events:
- schedule:
enabled: ${file(./config/config.${opt:stage}.json):pingers.debtFloorAdjuster.enabled}
rate: rate(${file(./config/config.${opt:stage}.json):pingers.debtFloorAdjuster.schedulerInterval} minutes)
autoSurplusAuctionedSetter:
handler: src/index.autoSurplusAuctionedSetter
timeout: 240
events:
- schedule:
enabled: ${file(./config/config.${opt:stage}.json):pingers.autoSurplusAuctionedSetter.enabled}
rate: rate(${file(./config/config.${opt:stage}.json):pingers.autoSurplusAuctionedSetter.schedulerInterval} minutes)
autoSurplusBufferSetter:
handler: src/index.autoSurplusBufferSetter
timeout: 240
events:
- schedule:
enabled: ${file(./config/config.${opt:stage}.json):pingers.autoSurplusBufferSetter.enabled}
rate: rate(${file(./config/config.${opt:stage}.json):pingers.autoSurplusBufferSetter.schedulerInterval} minutes)
debtAuctionInitialParameterSetter:
handler: src/index.debtAuctionInitialParameterSetter
timeout: 240
events:
- schedule:
enabled: ${file(./config/config.${opt:stage}.json):pingers.debtAuctionInitialParameterSetter.enabled}
rate: rate(${file(./config/config.${opt:stage}.json):pingers.debtAuctionInitialParameterSetter.schedulerInterval} minutes)
stakedTokensToKeepSetter:
handler: src/index.stakedTokensToKeepSetter
timeout: 240
events:
- schedule:
enabled: ${file(./config/config.${opt:stage}.json):pingers.stakedTokensToKeepSetter.enabled}
rate: rate(${file(./config/config.${opt:stage}.json):pingers.stakedTokensToKeepSetter.schedulerInterval} minutes)
stakeRewardRefill:
handler: src/index.stakeRewardRefill
timeout: 240
events:
- schedule:
enabled: ${file(./config/config.${opt:stage}.json):pingers.stakeRewardRefill.enabled}
rate: rate(${file(./config/config.${opt:stage}.json):pingers.stakeRewardRefill.schedulerInterval} minutes)
rewardAdjusterBundler:
handler: src/index.rewardAdjusterBundler
timeout: 240
events:
- schedule:
enabled: ${file(./config/config.${opt:stage}.json):pingers.rewardAdjusterBundler.enabled}
rate: rate(${file(./config/config.${opt:stage}.json):pingers.rewardAdjusterBundler.schedulerInterval} minutes)
redemptionPriceSnapOracle:
handler: src/index.redemptionPriceSnapOracle
timeout: 240
events:
- schedule:
enabled: ${file(./config/config.${opt:stage}.json):pingers.redemptionPriceSnapOracle.enabled}
rate: rate(${file(./config/config.${opt:stage}.json):pingers.redemptionPriceSnapOracle.schedulerInterval} minutes)
balanceChecker:
handler: src/index.balanceChecker
timeout: 240
events:
- schedule:
enabled: ${file(./config/config.${opt:stage}.json):pingers.balanceChecker.enabled}
rate: rate(${file(./config/config.${opt:stage}.json):pingers.balanceChecker.schedulerInterval} minutes)
livenessChecker:
handler: src/index.livenessChecker
timeout: 240
events:
- schedule:
enabled: ${file(./config/config.${opt:stage}.json):pingers.livenessChecker.enabled}
rate: rate(${file(./config/config.${opt:stage}.json):pingers.livenessChecker.schedulerInterval} minutes)