2023-11-30 07:05:43 -08:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
2024-03-15 11:38:14 -07:00
|
|
|
name: {{ .NAME }}-solana-target-events-1
|
2023-11-30 07:05:43 -08:00
|
|
|
namespace: {{ .NAMESPACE }}
|
|
|
|
labels:
|
2024-03-15 11:38:14 -07:00
|
|
|
app: {{ .NAME }}-solana-target-events-1
|
2023-11-30 07:05:43 -08:00
|
|
|
spec:
|
|
|
|
selector:
|
2024-03-15 11:38:14 -07:00
|
|
|
app: {{ .NAME }}-solana-target-events-1
|
2023-11-30 07:05:43 -08:00
|
|
|
ports:
|
|
|
|
- port: {{ .PORT }}
|
|
|
|
targetPort: {{ .PORT }}
|
2024-03-15 11:38:14 -07:00
|
|
|
name: {{ .NAME }}-solana-target-events-1
|
2023-11-30 07:05:43 -08:00
|
|
|
protocol: TCP
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: PersistentVolumeClaim
|
|
|
|
metadata:
|
2024-02-07 11:56:04 -08:00
|
|
|
name: blockchain-watcher-solana-target-events-pvc
|
2023-11-30 07:05:43 -08:00
|
|
|
namespace: {{ .NAMESPACE }}
|
|
|
|
spec:
|
|
|
|
accessModes:
|
|
|
|
- ReadWriteOnce
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
storage: 10Mi
|
|
|
|
storageClassName: gp2
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: ConfigMap
|
|
|
|
metadata:
|
2024-03-15 11:38:14 -07:00
|
|
|
name: {{ .NAME }}-solana-target-events-1-jobs
|
2023-11-30 07:05:43 -08:00
|
|
|
namespace: {{ .NAMESPACE }}
|
|
|
|
data:
|
|
|
|
testnet-jobs.json: |-
|
|
|
|
[
|
2024-02-02 05:33:55 -08:00
|
|
|
{
|
|
|
|
"id": "poll-transfer-redeemed-solana",
|
|
|
|
"chain": "solana",
|
|
|
|
"source": {
|
|
|
|
"action": "PollSolanaTransactions",
|
|
|
|
"records": "GetSolanaTransactions",
|
|
|
|
"config": {
|
|
|
|
"slotBatchSize": 1000,
|
|
|
|
"commitment": "finalized",
|
|
|
|
"interval": 1500,
|
|
|
|
"signaturesLimit": 200,
|
2024-03-15 12:26:27 -07:00
|
|
|
"programIds": [
|
|
|
|
"DZnkkTmCiFWfYTfT41X3Rd1kDgozqzxWaHqsw6W4x2oe",
|
|
|
|
"nTTh3bZ5Aer6xboWZe39RDEft4MeVxSQ8D1EYAVLZw9"
|
|
|
|
],
|
2024-02-02 05:33:55 -08:00
|
|
|
"chain": "solana",
|
|
|
|
"chainId": 1
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"handlers": [
|
|
|
|
{
|
|
|
|
"action": "HandleSolanaTransactions",
|
|
|
|
"target": "sns",
|
|
|
|
"mapper": "solanaTransferRedeemedMapper",
|
|
|
|
"config": {
|
2024-03-15 12:26:27 -07:00
|
|
|
"programs": {
|
|
|
|
"DZnkkTmCiFWfYTfT41X3Rd1kDgozqzxWaHqsw6W4x2oe": {
|
|
|
|
"instructions": ["02", "03", "09", "0a"],
|
|
|
|
"vaaAccountIndex": 2
|
|
|
|
},
|
|
|
|
"nTTh3bZ5Aer6xboWZe39RDEft4MeVxSQ8D1EYAVLZw9": {
|
|
|
|
"instructions": ["86d58f44eb66e860"],
|
|
|
|
"vaaAccountIndex": 3
|
|
|
|
}
|
|
|
|
},
|
2024-02-06 13:10:12 -08:00
|
|
|
"metricName": "process_vaa_event"
|
2024-02-02 05:33:55 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2023-11-30 07:05:43 -08:00
|
|
|
}
|
|
|
|
]
|
|
|
|
mainnet-jobs.json: |-
|
|
|
|
[
|
2024-02-02 05:33:55 -08:00
|
|
|
{
|
|
|
|
"id": "poll-transfer-redeemed-solana",
|
|
|
|
"chain": "solana",
|
|
|
|
"source": {
|
|
|
|
"action": "PollSolanaTransactions",
|
|
|
|
"records": "GetSolanaTransactions",
|
|
|
|
"config": {
|
|
|
|
"slotBatchSize": 1000,
|
|
|
|
"commitment": "finalized",
|
|
|
|
"interval": 1500,
|
|
|
|
"signaturesLimit": 200,
|
2024-03-15 12:26:27 -07:00
|
|
|
"programIds": ["wormDTUJ6AWPNvk59vGQbDvGJmqbDTdgWgAqcLBCgUb"],
|
2024-02-02 05:33:55 -08:00
|
|
|
"chain": "solana",
|
|
|
|
"chainId": 1
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"handlers": [
|
|
|
|
{
|
|
|
|
"action": "HandleSolanaTransactions",
|
|
|
|
"target": "sns",
|
|
|
|
"mapper": "solanaTransferRedeemedMapper",
|
|
|
|
"config": {
|
2024-03-15 12:26:27 -07:00
|
|
|
"programs": {
|
|
|
|
"wormDTUJ6AWPNvk59vGQbDvGJmqbDTdgWgAqcLBCgUb": {
|
|
|
|
"instructions": ["02", "03", "09", "0a"],
|
|
|
|
"vaaAccountIndex": 2
|
|
|
|
}
|
|
|
|
},
|
2024-02-07 11:56:04 -08:00
|
|
|
"metricName": "process_vaa_event"
|
2024-02-02 05:33:55 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2023-11-30 07:05:43 -08:00
|
|
|
}
|
|
|
|
]
|
|
|
|
---
|
2023-12-19 09:57:51 -08:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
2023-11-30 07:05:43 -08:00
|
|
|
metadata:
|
2024-03-15 11:38:14 -07:00
|
|
|
name: {{ .NAME }}-solana-target-events-1
|
2023-11-30 07:05:43 -08:00
|
|
|
namespace: {{ .NAMESPACE }}
|
|
|
|
spec:
|
2023-12-19 09:57:51 -08:00
|
|
|
replicas: 1
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
2024-03-15 11:38:14 -07:00
|
|
|
app: {{ .NAME }}-solana-target-events-1
|
2023-12-19 09:57:51 -08:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
2024-03-15 11:38:14 -07:00
|
|
|
app: {{ .NAME }}-solana-target-events-1
|
2023-12-19 09:57:51 -08:00
|
|
|
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: NODE_OPTIONS
|
|
|
|
value: {{ .NODE_OPTIONS }}
|
|
|
|
- name: SOLANA_RPCS
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: blockchain-watcher
|
|
|
|
key: solana-urls
|
|
|
|
- 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:
|
2023-11-30 07:05:43 -08:00
|
|
|
- name: metadata-volume
|
2023-12-19 09:57:51 -08:00
|
|
|
persistentVolumeClaim:
|
2024-02-07 11:56:04 -08:00
|
|
|
claimName: blockchain-watcher-solana-target-events-pvc
|
2023-11-30 07:05:43 -08:00
|
|
|
- name: jobs-volume
|
2023-12-19 09:57:51 -08:00
|
|
|
configMap:
|
2024-03-15 11:38:14 -07:00
|
|
|
name: {{ .NAME }}-solana-target-events-1-jobs
|
2023-12-19 09:57:51 -08:00
|
|
|
items:
|
|
|
|
- key: {{ .BLOCKCHAIN_ENV }}-jobs.json
|
|
|
|
path: jobs.json
|