2023-11-28 11:00:45 -08:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: {{ .NAME }}-eth
|
|
|
|
namespace: {{ .NAMESPACE }}
|
|
|
|
labels:
|
|
|
|
app: {{ .NAME }}-eth
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
app: {{ .NAME }}-eth
|
|
|
|
ports:
|
|
|
|
- port: {{ .PORT }}
|
|
|
|
targetPort: {{ .PORT }}
|
|
|
|
name: {{ .NAME }}-eth
|
|
|
|
protocol: TCP
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: PersistentVolumeClaim
|
|
|
|
metadata:
|
|
|
|
name: blockchain-watcher-eth-pvc
|
|
|
|
namespace: {{ .NAMESPACE }}
|
|
|
|
spec:
|
|
|
|
accessModes:
|
|
|
|
- ReadWriteOnce
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
storage: 10Mi
|
|
|
|
storageClassName: gp2
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: ConfigMap
|
|
|
|
metadata:
|
|
|
|
name: {{ .NAME }}-eth-jobs
|
|
|
|
namespace: {{ .NAMESPACE }}
|
|
|
|
data:
|
|
|
|
testnet-jobs.json: |-
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"id": "poll-log-message-published-ethereum",
|
|
|
|
"chain": "ethereum",
|
|
|
|
"source": {
|
|
|
|
"action": "PollEvmLogs",
|
|
|
|
"config": {
|
|
|
|
"fromBlock": "10012499",
|
|
|
|
"blockBatchSize": 100,
|
|
|
|
"commitment": "latest",
|
|
|
|
"interval": 15000,
|
|
|
|
"addresses": ["0x706abc4E45D419950511e474C7B9Ed348A4a716c"],
|
|
|
|
"chain": "ethereum",
|
|
|
|
"topics": []
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"handlers": [
|
|
|
|
{
|
|
|
|
"action": "HandleEvmLogs",
|
|
|
|
"target": "sns",
|
|
|
|
"mapper": "evmLogMessagePublishedMapper",
|
|
|
|
"config": {
|
|
|
|
"abi": "event LogMessagePublished(address indexed sender, uint64 sequence, uint32 nonce, bytes payload, uint8 consistencyLevel)",
|
|
|
|
"filter": {
|
|
|
|
"addresses": ["0x706abc4E45D419950511e474C7B9Ed348A4a716c"],
|
|
|
|
"topics": ["0x6eb224fb001ed210e379b335e35efe88672a8ce935d981a6896b27ffdf52a3b2"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2023-11-30 07:43:37 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"id": "poll-log-message-published-karura",
|
|
|
|
"chain": "karura",
|
|
|
|
"source": {
|
|
|
|
"action": "PollEvmLogs",
|
|
|
|
"config": {
|
|
|
|
"blockBatchSize": 100,
|
|
|
|
"commitment": "finalized",
|
|
|
|
"interval": 15000,
|
|
|
|
"addresses": [
|
|
|
|
"0xE4eacc10990ba3308DdCC72d985f2a27D20c7d03"
|
|
|
|
],
|
|
|
|
"chain": "karura",
|
|
|
|
"topics": []
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"handlers": [
|
|
|
|
{
|
|
|
|
"action": "HandleEvmLogs",
|
|
|
|
"target": "sns",
|
|
|
|
"mapper": "evmLogMessagePublishedMapper",
|
|
|
|
"config": {
|
|
|
|
"abi": "event LogMessagePublished(address indexed sender, uint64 sequence, uint32 nonce, bytes payload, uint8 consistencyLevel)",
|
|
|
|
"filter": {
|
|
|
|
"addresses": [
|
|
|
|
"0xE4eacc10990ba3308DdCC72d985f2a27D20c7d03"
|
|
|
|
],
|
|
|
|
"topics": [
|
|
|
|
"0x6eb224fb001ed210e379b335e35efe88672a8ce935d981a6896b27ffdf52a3b2"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2023-12-01 05:09:58 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"id": "poll-log-message-published-fantom",
|
|
|
|
"chain": "fantom",
|
|
|
|
"source": {
|
|
|
|
"action": "PollEvmLogs",
|
|
|
|
"config": {
|
|
|
|
"blockBatchSize": 100,
|
|
|
|
"commitment": "latest",
|
|
|
|
"interval": 15000,
|
|
|
|
"addresses": [
|
|
|
|
"0x1BB3B4119b7BA9dfad76B0545fb3F531383c3bB7"
|
|
|
|
],
|
|
|
|
"chain": "fantom",
|
|
|
|
"topics": []
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"handlers": [
|
|
|
|
{
|
|
|
|
"action": "HandleEvmLogs",
|
|
|
|
"target": "sns",
|
|
|
|
"mapper": "evmLogMessagePublishedMapper",
|
|
|
|
"config": {
|
|
|
|
"abi": "event LogMessagePublished(address indexed sender, uint64 sequence, uint32 nonce, bytes payload, uint8 consistencyLevel)",
|
|
|
|
"filter": {
|
|
|
|
"addresses": [
|
|
|
|
"0x1BB3B4119b7BA9dfad76B0545fb3F531383c3bB7"
|
|
|
|
],
|
|
|
|
"topics": [
|
|
|
|
"0x6eb224fb001ed210e379b335e35efe88672a8ce935d981a6896b27ffdf52a3b2"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2023-12-01 11:25:02 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"id": "poll-log-message-published-acala",
|
|
|
|
"chain": "acala",
|
|
|
|
"source": {
|
|
|
|
"action": "PollEvmLogs",
|
|
|
|
"config": {
|
|
|
|
"blockBatchSize": 100,
|
2023-12-04 04:24:36 -08:00
|
|
|
"commitment": "finalized",
|
2023-12-01 11:25:02 -08:00
|
|
|
"interval": 15000,
|
|
|
|
"addresses": [
|
|
|
|
"0x4377B49d559c0a9466477195C6AdC3D433e265c0"
|
|
|
|
],
|
|
|
|
"chain": "acala",
|
|
|
|
"topics": []
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"handlers": [
|
|
|
|
{
|
|
|
|
"action": "HandleEvmLogs",
|
|
|
|
"target": "sns",
|
|
|
|
"mapper": "evmLogMessagePublishedMapper",
|
|
|
|
"config": {
|
|
|
|
"abi": "event LogMessagePublished(address indexed sender, uint64 sequence, uint32 nonce, bytes payload, uint8 consistencyLevel)",
|
|
|
|
"filter": {
|
|
|
|
"addresses": [
|
|
|
|
"0x4377B49d559c0a9466477195C6AdC3D433e265c0"
|
|
|
|
],
|
|
|
|
"topics": [
|
|
|
|
"0x6eb224fb001ed210e379b335e35efe88672a8ce935d981a6896b27ffdf52a3b2"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2023-12-04 04:24:36 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"id": "poll-log-message-published-avalanche",
|
|
|
|
"chain": "avalanche",
|
|
|
|
"source": {
|
|
|
|
"action": "PollEvmLogs",
|
|
|
|
"config": {
|
|
|
|
"blockBatchSize": 100,
|
|
|
|
"commitment": "finalized",
|
|
|
|
"interval": 15000,
|
|
|
|
"addresses": [
|
|
|
|
"0x7bbcE28e64B3F8b84d876Ab298393c38ad7aac4C"
|
|
|
|
],
|
|
|
|
"chain": "avalanche",
|
|
|
|
"topics": []
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"handlers": [
|
|
|
|
{
|
|
|
|
"action": "HandleEvmLogs",
|
|
|
|
"target": "sns",
|
|
|
|
"mapper": "evmLogMessagePublishedMapper",
|
|
|
|
"config": {
|
|
|
|
"abi": "event LogMessagePublished(address indexed sender, uint64 sequence, uint32 nonce, bytes payload, uint8 consistencyLevel)",
|
|
|
|
"filter": {
|
|
|
|
"addresses": [
|
|
|
|
"0x7bbcE28e64B3F8b84d876Ab298393c38ad7aac4C"
|
|
|
|
],
|
|
|
|
"topics": [
|
|
|
|
"0x6eb224fb001ed210e379b335e35efe88672a8ce935d981a6896b27ffdf52a3b2"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2023-11-28 11:00:45 -08:00
|
|
|
}
|
|
|
|
]
|
|
|
|
mainnet-jobs.json: |-
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"id": "poll-log-message-published-ethereum",
|
|
|
|
"chain": "ethereum",
|
|
|
|
"source": {
|
|
|
|
"action": "PollEvmLogs",
|
|
|
|
"config": {
|
|
|
|
"blockBatchSize": 100,
|
|
|
|
"commitment": "latest",
|
2023-12-04 04:24:36 -08:00
|
|
|
"interval": 5000,
|
2023-11-28 11:00:45 -08:00
|
|
|
"addresses": ["0x98f3c9e6E3fAce36bAAd05FE09d375Ef1464288B"],
|
|
|
|
"chain": "ethereum",
|
|
|
|
"topics": []
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"handlers": [
|
|
|
|
{
|
|
|
|
"action": "HandleEvmLogs",
|
|
|
|
"target": "sns",
|
|
|
|
"mapper": "evmLogMessagePublishedMapper",
|
|
|
|
"config": {
|
|
|
|
"abi": "event LogMessagePublished(address indexed sender, uint64 sequence, uint32 nonce, bytes payload, uint8 consistencyLevel)",
|
|
|
|
"filter": {
|
|
|
|
"addresses": ["0x98f3c9e6E3fAce36bAAd05FE09d375Ef1464288B"],
|
|
|
|
"topics": ["0x6eb224fb001ed210e379b335e35efe88672a8ce935d981a6896b27ffdf52a3b2"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2023-11-30 07:43:37 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"id": "poll-log-message-published-karura",
|
|
|
|
"chain": "karura",
|
|
|
|
"source": {
|
|
|
|
"action": "PollEvmLogs",
|
|
|
|
"config": {
|
|
|
|
"blockBatchSize": 100,
|
|
|
|
"commitment": "finalized",
|
2023-12-04 04:24:36 -08:00
|
|
|
"interval": 5000,
|
2023-11-30 07:43:37 -08:00
|
|
|
"addresses": [
|
|
|
|
"0xa321448d90d4e5b0A732867c18eA198e75CAC48E"
|
|
|
|
],
|
|
|
|
"chain": "karura",
|
|
|
|
"topics": []
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"handlers": [
|
|
|
|
{
|
|
|
|
"action": "HandleEvmLogs",
|
|
|
|
"target": "sns",
|
|
|
|
"mapper": "evmLogMessagePublishedMapper",
|
|
|
|
"config": {
|
|
|
|
"abi": "event LogMessagePublished(address indexed sender, uint64 sequence, uint32 nonce, bytes payload, uint8 consistencyLevel)",
|
|
|
|
"filter": {
|
|
|
|
"addresses": [
|
|
|
|
"0xa321448d90d4e5b0A732867c18eA198e75CAC48E"
|
|
|
|
],
|
|
|
|
"topics": [
|
|
|
|
"0x6eb224fb001ed210e379b335e35efe88672a8ce935d981a6896b27ffdf52a3b2"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2023-12-01 05:09:58 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"id": "poll-log-message-published-fantom",
|
|
|
|
"chain": "fantom",
|
|
|
|
"source": {
|
|
|
|
"action": "PollEvmLogs",
|
|
|
|
"config": {
|
|
|
|
"blockBatchSize": 100,
|
|
|
|
"commitment": "latest",
|
2023-12-04 04:24:36 -08:00
|
|
|
"interval": 5000,
|
2023-12-01 05:09:58 -08:00
|
|
|
"addresses": [
|
|
|
|
"0x126783A6Cb203a3E35344528B26ca3a0489a1485"
|
|
|
|
],
|
|
|
|
"chain": "fantom",
|
|
|
|
"topics": []
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"handlers": [
|
|
|
|
{
|
|
|
|
"action": "HandleEvmLogs",
|
|
|
|
"target": "sns",
|
|
|
|
"mapper": "evmLogMessagePublishedMapper",
|
|
|
|
"config": {
|
|
|
|
"abi": "event LogMessagePublished(address indexed sender, uint64 sequence, uint32 nonce, bytes payload, uint8 consistencyLevel)",
|
|
|
|
"filter": {
|
|
|
|
"addresses": [
|
|
|
|
"0x126783A6Cb203a3E35344528B26ca3a0489a1485"
|
|
|
|
],
|
|
|
|
"topics": [
|
|
|
|
"0x6eb224fb001ed210e379b335e35efe88672a8ce935d981a6896b27ffdf52a3b2"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2023-12-01 11:25:02 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"id": "poll-log-message-published-acala",
|
|
|
|
"chain": "acala",
|
|
|
|
"source": {
|
|
|
|
"action": "PollEvmLogs",
|
|
|
|
"config": {
|
|
|
|
"blockBatchSize": 100,
|
2023-12-04 04:24:36 -08:00
|
|
|
"commitment": "finalized",
|
|
|
|
"interval": 5000,
|
2023-12-01 11:25:02 -08:00
|
|
|
"addresses": [
|
|
|
|
"0xa321448d90d4e5b0A732867c18eA198e75CAC48E"
|
|
|
|
],
|
|
|
|
"chain": "acala",
|
|
|
|
"topics": []
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"handlers": [
|
|
|
|
{
|
|
|
|
"action": "HandleEvmLogs",
|
|
|
|
"target": "sns",
|
|
|
|
"mapper": "evmLogMessagePublishedMapper",
|
|
|
|
"config": {
|
|
|
|
"abi": "event LogMessagePublished(address indexed sender, uint64 sequence, uint32 nonce, bytes payload, uint8 consistencyLevel)",
|
|
|
|
"filter": {
|
|
|
|
"addresses": [
|
|
|
|
"0xa321448d90d4e5b0A732867c18eA198e75CAC48E"
|
|
|
|
],
|
|
|
|
"topics": [
|
|
|
|
"0x6eb224fb001ed210e379b335e35efe88672a8ce935d981a6896b27ffdf52a3b2"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2023-12-04 04:24:36 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"id": "poll-log-message-published-avalanche",
|
|
|
|
"chain": "avalanche",
|
|
|
|
"source": {
|
|
|
|
"action": "PollEvmLogs",
|
|
|
|
"config": {
|
|
|
|
"blockBatchSize": 100,
|
|
|
|
"commitment": "finalized",
|
|
|
|
"interval": 5000,
|
|
|
|
"addresses": [
|
|
|
|
"0x54a8e5f9c4CbA08F9943965859F6c34eAF03E26c"
|
|
|
|
],
|
|
|
|
"chain": "avalanche",
|
|
|
|
"topics": []
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"handlers": [
|
|
|
|
{
|
|
|
|
"action": "HandleEvmLogs",
|
|
|
|
"target": "sns",
|
|
|
|
"mapper": "evmLogMessagePublishedMapper",
|
|
|
|
"config": {
|
|
|
|
"abi": "event LogMessagePublished(address indexed sender, uint64 sequence, uint32 nonce, bytes payload, uint8 consistencyLevel)",
|
|
|
|
"filter": {
|
|
|
|
"addresses": [
|
|
|
|
"0x54a8e5f9c4CbA08F9943965859F6c34eAF03E26c"
|
|
|
|
],
|
|
|
|
"topics": [
|
|
|
|
"0x6eb224fb001ed210e379b335e35efe88672a8ce935d981a6896b27ffdf52a3b2"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2023-11-28 11:00:45 -08:00
|
|
|
}
|
|
|
|
]
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Pod
|
|
|
|
metadata:
|
|
|
|
name: {{ .NAME }}-eth
|
|
|
|
namespace: {{ .NAMESPACE }}
|
|
|
|
labels:
|
|
|
|
app: {{ .NAME }}-eth
|
|
|
|
annotations:
|
|
|
|
prometheus.io/scrape: "true"
|
|
|
|
prometheus.io/port: "{{ .PORT }}"
|
|
|
|
spec:
|
|
|
|
restartPolicy: Always
|
|
|
|
terminationGracePeriodSeconds: 30
|
|
|
|
serviceAccountName: event-watcher
|
|
|
|
containers:
|
|
|
|
- name: {{ .NAME }}
|
|
|
|
image: {{ .IMAGE_NAME }}
|
|
|
|
env:
|
|
|
|
- name: NODE_ENV
|
|
|
|
value: {{ .NODE_ENV }}
|
|
|
|
- name: PORT
|
|
|
|
value: "{{ .PORT }}"
|
|
|
|
- name: LOG_LEVEL
|
|
|
|
value: {{ .LOG_LEVEL }}
|
|
|
|
- name: BLOCKCHAIN_ENV
|
|
|
|
value: {{ .BLOCKCHAIN_ENV }}
|
|
|
|
- name: DRY_RUN_ENABLED
|
|
|
|
value: "{{ .DRY_RUN_ENABLED }}"
|
|
|
|
- name: SNS_TOPIC_ARN
|
|
|
|
value: {{ .SNS_TOPIC_ARN }}
|
|
|
|
- name: SNS_REGION
|
|
|
|
value: {{ .SNS_REGION }}
|
|
|
|
- name: JOBS_DIR
|
|
|
|
value: /home/node/app/jobs
|
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
memory: {{ .RESOURCES_LIMITS_MEMORY }}
|
|
|
|
cpu: {{ .RESOURCES_LIMITS_CPU }}
|
|
|
|
requests:
|
|
|
|
memory: {{ .RESOURCES_REQUESTS_MEMORY }}
|
|
|
|
cpu: {{ .RESOURCES_REQUESTS_CPU }}
|
|
|
|
volumeMounts:
|
|
|
|
- name: metadata-volume
|
|
|
|
mountPath: /home/node/app/metadata-repo
|
|
|
|
- name: jobs-volume
|
|
|
|
mountPath: /home/node/app/jobs
|
|
|
|
volumes:
|
|
|
|
- name: metadata-volume
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: blockchain-watcher-eth-pvc
|
|
|
|
- name: jobs-volume
|
|
|
|
configMap:
|
|
|
|
name: {{ .NAME }}-eth-jobs
|
|
|
|
items:
|
|
|
|
- key: {{ .BLOCKCHAIN_ENV }}-jobs.json
|
|
|
|
path: jobs.json
|