Adds k8s namespace & upgrade relayer engine (#113)
* Adds k8s namespace * Upgrade relayer engine version --------- Co-authored-by: Joe Howarth <josephehowarth@gmail.com>
This commit is contained in:
parent
68892ae849
commit
844a407a3f
|
@ -2,11 +2,12 @@
|
||||||
|
|
||||||
# typically source ../../pkeys.sh in project root first
|
# typically source ../../pkeys.sh in project root first
|
||||||
|
|
||||||
kubectl delete secret private-keys --ignore-not-found
|
kubectl delete secret private-keys --ignore-not-found --namespace generic-relayer
|
||||||
|
|
||||||
kubectl create secret generic private-keys \
|
kubectl create secret generic private-keys \
|
||||||
--from-literal=PRIVATE_KEYS_CHAIN_4=${PRIVATE_KEYS_CHAIN_4} \
|
--from-literal=PRIVATE_KEYS_CHAIN_4=${PRIVATE_KEYS_CHAIN_4} \
|
||||||
--from-literal=PRIVATE_KEYS_CHAIN_5=${PRIVATE_KEYS_CHAIN_5} \
|
--from-literal=PRIVATE_KEYS_CHAIN_5=${PRIVATE_KEYS_CHAIN_5} \
|
||||||
--from-literal=PRIVATE_KEYS_CHAIN_6=${PRIVATE_KEYS_CHAIN_6} \
|
--from-literal=PRIVATE_KEYS_CHAIN_6=${PRIVATE_KEYS_CHAIN_6} \
|
||||||
--from-literal=PRIVATE_KEYS_CHAIN_16=${PRIVATE_KEYS_CHAIN_16} \
|
--from-literal=PRIVATE_KEYS_CHAIN_16=${PRIVATE_KEYS_CHAIN_16} \
|
||||||
--from-literal=PRIVATE_KEYS_CHAIN_14=${PRIVATE_KEYS_CHAIN_14}
|
--from-literal=PRIVATE_KEYS_CHAIN_14=${PRIVATE_KEYS_CHAIN_14} \
|
||||||
|
--namespace generic-relayer
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
kubectl delete secret redis-generic-relayer --ignore-not-found
|
kubectl delete secret redis-generic-relayer --ignore-not-found --namespace generic-relayer
|
||||||
|
|
||||||
kubectl create secret generic redis-generic-relayer \
|
kubectl create secret generic redis-generic-relayer \
|
||||||
--from-literal=RELAYER_ENGINE_REDIS_HOST=${RELAYER_ENGINE_REDIS_HOST} \
|
--from-literal=RELAYER_ENGINE_REDIS_HOST=${RELAYER_ENGINE_REDIS_HOST} \
|
||||||
--from-literal=RELAYER_ENGINE_REDIS_USERNAME=${RELAYER_ENGINE_REDIS_USERNAME} \
|
--from-literal=RELAYER_ENGINE_REDIS_USERNAME=${RELAYER_ENGINE_REDIS_USERNAME} \
|
||||||
--from-literal=RELAYER_ENGINE_REDIS_PASSWORD=${RELAYER_ENGINE_REDIS_PASSWORD}
|
--from-literal=RELAYER_ENGINE_REDIS_PASSWORD=${RELAYER_ENGINE_REDIS_PASSWORD} \
|
||||||
|
--namespace generic-relayer
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"mode": "BOTH",
|
"mode": "BOTH",
|
||||||
"logLevel": "debug",
|
"logLevel": "debug",
|
||||||
|
"logFormat": "json",
|
||||||
"storeType": "Redis",
|
"storeType": "Redis",
|
||||||
"redis": {
|
"redis": {
|
||||||
"port": 6379,
|
"port": 6379,
|
||||||
|
@ -14,6 +15,8 @@
|
||||||
},
|
},
|
||||||
"wormholeRpc": "https://wormhole-v2-testnet-api.certus.one",
|
"wormholeRpc": "https://wormhole-v2-testnet-api.certus.one",
|
||||||
"readinessPort": 2000,
|
"readinessPort": 2000,
|
||||||
|
"promPort": 9090,
|
||||||
|
"apiPort": 3000,
|
||||||
"numGuardians": 1,
|
"numGuardians": 1,
|
||||||
"supportedChains": [
|
"supportedChains": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,67 +4,67 @@
|
||||||
"relayProviders": [
|
"relayProviders": [
|
||||||
{
|
{
|
||||||
"chainId": 6,
|
"chainId": 6,
|
||||||
"address": "0x7903B8CE0FF4480e1c2496123b6623858be738e0"
|
"address": "0x61CAE64b05Cb1fBfc9e810683c5C52F2C886640C"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"chainId": 14,
|
"chainId": 14,
|
||||||
"address": "0x26dBc4eC46b03410a8B64bc962b83FAf1B84DA5d"
|
"address": "0xc5156B6635DC04b692e4298332eab136e1B2055C"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"chainId": 4,
|
"chainId": 4,
|
||||||
"address": "0xEf06AE191B42ac59883815c4cFaCC9164f1d50eE"
|
"address": "0xFAEd45351a0ddC272dc89c29c17e228278d2A24F"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"chainId": 5,
|
"chainId": 5,
|
||||||
"address": "0x0a7F4f38a60f48688D9aa99b240b15ddb66e45e8"
|
"address": "0x27196D91bD67C437a806Be3d824794C0260e7f4c"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"chainId": 16,
|
"chainId": 16,
|
||||||
"address": "0x55e1411d2d5AF8d9378460b486A9D84619149B5b"
|
"address": "0x8b5315217858B2feD71fcD7677DcC2a546C28C1B"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"coreRelayers": [
|
"coreRelayers": [
|
||||||
{
|
{
|
||||||
"chainId": 6,
|
"chainId": 6,
|
||||||
"address": "0x9Dfd308e2450b26290d926Beea2Bb4F0B8553729"
|
"address": "0xDDe6b89B7d0AD383FafDe6477f0d300eC4d4033e"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"chainId": 14,
|
"chainId": 14,
|
||||||
"address": "0x49181C4fE76E0F28DB04084935d81DaBb26ac26d"
|
"address": "0xA92aa4f8CBE1c2d7321F1575ad85bE396e2bbE0D"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"chainId": 4,
|
"chainId": 4,
|
||||||
"address": "0xaC9EF19ab4F9a3a265809df0C4eB1E821f43391A"
|
"address": "0xda2592C43f2e10cBBA101464326fb132eFD8cB09"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"chainId": 5,
|
"chainId": 5,
|
||||||
"address": "0xEf06AE191B42ac59883815c4cFaCC9164f1d50eE"
|
"address": "0xFAd28FcD3B05B73bBf52A3c4d8b638dFf1c5605c"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"chainId": 16,
|
"chainId": 16,
|
||||||
"address": "0x414De856795ecA8F0207D83d69C372Df799Ee377"
|
"address": "0x57523648FB5345CF510c1F12D346A18e55Aec5f5"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"mockIntegrations": [
|
"mockIntegrations": [
|
||||||
{
|
{
|
||||||
"chainId": 6,
|
"chainId": 6,
|
||||||
"address": "0xFE0058B9e4df432Cc3DBf7bA4f97369FF1731002"
|
"address": "0x0819CaB27473e585DD28c0D908DCc218dE4cB05C"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"chainId": 14,
|
"chainId": 14,
|
||||||
"address": "0xc00DBff2c041AeF61b92C115d175593ed8C3ED2F"
|
"address": "0xB7c205B9E147e4371E28fAe3F9530566de374Dcc"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"chainId": 4,
|
"chainId": 4,
|
||||||
"address": "0x0Bc36d19a88341795D69535D3F977Db773ECD5F4"
|
"address": "0xD1d6Ae0149A460204967F91Cb358C3581D4F1692"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"chainId": 5,
|
"chainId": 5,
|
||||||
"address": "0x46724E4d7fe534f70ACd7f16fcEBe428B88b47C1"
|
"address": "0xE8cfD947Eb14b0F08DEE7bf0E352480164ED2e6e"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"chainId": 16,
|
"chainId": 16,
|
||||||
"address": "0xf3245687961ccED8c4b59c8D50E36CD9a1544A6d"
|
"address": "0x87c26Ad201cfC0A969911143985B39855C9CB704"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
|
namespace: generic-relayer
|
||||||
resources:
|
resources:
|
||||||
- simple-gr.yaml
|
- simple-gr.yaml
|
||||||
configMapGenerator:
|
configMapGenerator:
|
||||||
|
@ -13,4 +14,4 @@ configMapGenerator:
|
||||||
- k8s-testnet/contracts.json
|
- k8s-testnet/contracts.json
|
||||||
- name: generic-relayer-plugin-config
|
- name: generic-relayer-plugin-config
|
||||||
files:
|
files:
|
||||||
- k8s-testnet/k8s-testnet.json
|
- k8s-testnet/k8s-testnet.json
|
||||||
|
|
|
@ -2,7 +2,7 @@ apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: simple-gr
|
name: simple-gr
|
||||||
namespace: default
|
namespace: generic-relayer
|
||||||
labels:
|
labels:
|
||||||
app: simple-gr
|
app: simple-gr
|
||||||
spec:
|
spec:
|
||||||
|
@ -12,23 +12,24 @@ spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
|
namespace: generic-relayer
|
||||||
labels:
|
labels:
|
||||||
app: simple-gr
|
app: simple-gr
|
||||||
spec:
|
spec:
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
containers:
|
containers:
|
||||||
- name: simple-gr
|
- name: simple-gr
|
||||||
image: ghcr.io/wormhole-foundation/trustless-generic-relayer:pr-76
|
image: ghcr.io/wormhole-foundation/trustless-generic-relayer:main
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
# uncomment to explore filesystem during crash loop
|
# uncomment to explore filesystem during crash loop
|
||||||
# command: [ "/bin/sh", "-c", "--" ]
|
# command: [ "/bin/sh", "-c", "--" ]
|
||||||
# args: [ "while true; do sleep 30; done;" ]
|
# args: [ "while true; do sleep 30; done;" ]
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 1000m
|
# cpu: 500m
|
||||||
memory: 600Mi
|
memory: 600Mi
|
||||||
limits:
|
limits:
|
||||||
cpu: 1000m
|
cpu: 800m
|
||||||
memory: 2000Mi
|
memory: 2000Mi
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: relayer-contracts
|
- name: relayer-contracts
|
||||||
|
|
|
@ -3,7 +3,7 @@ apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: spy
|
name: spy
|
||||||
namespace: default
|
namespace: generic-relayer
|
||||||
annotations:
|
annotations:
|
||||||
"service.beta.kubernetes.io/aws-load-balancer-internal": "0.0.0.0/0"
|
"service.beta.kubernetes.io/aws-load-balancer-internal": "0.0.0.0/0"
|
||||||
labels:
|
labels:
|
||||||
|
@ -22,7 +22,7 @@ apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: spy
|
name: spy
|
||||||
namespace: default
|
namespace: generic-relayer
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@certusone/wormhole-sdk": "^0.9.6",
|
"@certusone/wormhole-sdk": "^0.9.6",
|
||||||
"@wormhole-foundation/relayer-engine": "github:wormhole-foundation/relayer-engine#e3bd60b8249b25eb98dd8a47cf5bbd80a0e18e65",
|
"@wormhole-foundation/relayer-engine": "github:wormhole-foundation/relayer-engine#cc0aad43787a87ecd9f0d9893d8ccf92901d7adb",
|
||||||
"ts-retry": "^4.1.1"
|
"ts-retry": "^4.1.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
@ -2088,6 +2088,22 @@
|
||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/koa-basic-auth": {
|
||||||
|
"version": "2.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/koa-basic-auth/-/koa-basic-auth-2.0.4.tgz",
|
||||||
|
"integrity": "sha512-PJKvoF5OMGlEEzUnctZDGRQVqV12xB0V4KplDJvHQDX9egh9ADFa456zGXRNnhNr43t3Fe4/VzD6ziM61uM5RQ==",
|
||||||
|
"dependencies": {
|
||||||
|
"@types/koa": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@types/koa-bodyparser": {
|
||||||
|
"version": "4.3.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/koa-bodyparser/-/koa-bodyparser-4.3.10.tgz",
|
||||||
|
"integrity": "sha512-6ae05pjhmrmGhUR8GYD5qr5p9LTEMEGfGXCsK8VaSL+totwigm8+H/7MHW7K4854CMeuwRAubT8qcc/EagaeIA==",
|
||||||
|
"dependencies": {
|
||||||
|
"@types/koa": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@types/koa-compose": {
|
"node_modules/@types/koa-compose": {
|
||||||
"version": "3.2.5",
|
"version": "3.2.5",
|
||||||
"resolved": "https://registry.npmjs.org/@types/koa-compose/-/koa-compose-3.2.5.tgz",
|
"resolved": "https://registry.npmjs.org/@types/koa-compose/-/koa-compose-3.2.5.tgz",
|
||||||
|
@ -2373,8 +2389,8 @@
|
||||||
},
|
},
|
||||||
"node_modules/@wormhole-foundation/relayer-engine": {
|
"node_modules/@wormhole-foundation/relayer-engine": {
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"resolved": "git+ssh://git@github.com/wormhole-foundation/relayer-engine.git#e3bd60b8249b25eb98dd8a47cf5bbd80a0e18e65",
|
"resolved": "git+ssh://git@github.com/wormhole-foundation/relayer-engine.git#cc0aad43787a87ecd9f0d9893d8ccf92901d7adb",
|
||||||
"integrity": "sha512-l7CRnz+Gngaev3zWBDufmjjIj4J70HfD+LtDyfsJIqtbwpwZQcfyJ/+Cxe8wId+a8G83SD/1C3bpzHzjg9KYPQ==",
|
"integrity": "sha512-tjDX/0uGooWpkQU9JJU3CKyWkkG9tfDv/JJX+PIkVK0V9uxA6T6uayvfVywGfq+8jbv4ZpVhsNgHhKcLl7HwVQ==",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -2389,6 +2405,8 @@
|
||||||
"@terra-money/wallet-provider": "^3.8.0",
|
"@terra-money/wallet-provider": "^3.8.0",
|
||||||
"@types/js-yaml": "^4.0.5",
|
"@types/js-yaml": "^4.0.5",
|
||||||
"@types/koa": "^2.13.5",
|
"@types/koa": "^2.13.5",
|
||||||
|
"@types/koa-basic-auth": "^2.0.4",
|
||||||
|
"@types/koa-bodyparser": "^4.3.10",
|
||||||
"@types/koa-router": "^7.4.4",
|
"@types/koa-router": "^7.4.4",
|
||||||
"async-mutex": "^0.3.2",
|
"async-mutex": "^0.3.2",
|
||||||
"body-parser": "^1.19.0",
|
"body-parser": "^1.19.0",
|
||||||
|
@ -2399,7 +2417,9 @@
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"keyv": "^4.5.0",
|
"keyv": "^4.5.0",
|
||||||
"koa": "^2.14.1",
|
"koa": "^2.14.1",
|
||||||
|
"koa-basic-auth": "^4.0.0",
|
||||||
"koa-body": "^6.0.1",
|
"koa-body": "^6.0.1",
|
||||||
|
"koa-bodyparser": "^2.5.0",
|
||||||
"koa-router": "^12.0.0",
|
"koa-router": "^12.0.0",
|
||||||
"lru-cache": "^7.14.0",
|
"lru-cache": "^7.14.0",
|
||||||
"prom-client": "^14.1.1",
|
"prom-client": "^14.1.1",
|
||||||
|
@ -2767,6 +2787,22 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"node_modules/basic-auth": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==",
|
||||||
|
"dependencies": {
|
||||||
|
"safe-buffer": "5.1.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/basic-auth/node_modules/safe-buffer": {
|
||||||
|
"version": "5.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||||
|
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
||||||
|
},
|
||||||
"node_modules/bech32": {
|
"node_modules/bech32": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz",
|
||||||
|
@ -3303,6 +3339,11 @@
|
||||||
"node": ">= 0.8"
|
"node": ">= 0.8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/copy-to": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/copy-to/-/copy-to-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-3DdaFaU/Zf1AnpLiFDeNCD4TOWe3Zl2RZaTzUvWiIk5ERzcCodOE20Vqq4fzCbNoHURFHT4/us/Lfq+S2zyY4w=="
|
||||||
|
},
|
||||||
"node_modules/copyfiles": {
|
"node_modules/copyfiles": {
|
||||||
"version": "2.4.1",
|
"version": "2.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/copyfiles/-/copyfiles-2.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/copyfiles/-/copyfiles-2.4.1.tgz",
|
||||||
|
@ -4868,6 +4909,15 @@
|
||||||
"node": "^4.8.4 || ^6.10.1 || ^7.10.1 || >= 8.1.4"
|
"node": "^4.8.4 || ^6.10.1 || ^7.10.1 || >= 8.1.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/koa-basic-auth": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/koa-basic-auth/-/koa-basic-auth-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-eV1sGVAizDuFWNpY43VF3Z1ND4PotQZB/igxHNrcJXzXw+Flmj8Uv+4hP9LyNXyvqLJz/X5bmXeMu84AAGD9Jw==",
|
||||||
|
"dependencies": {
|
||||||
|
"basic-auth": "^2.0.0",
|
||||||
|
"tsscmp": "^1.0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/koa-body": {
|
"node_modules/koa-body": {
|
||||||
"version": "6.0.1",
|
"version": "6.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/koa-body/-/koa-body-6.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/koa-body/-/koa-body-6.0.1.tgz",
|
||||||
|
@ -4881,6 +4931,29 @@
|
||||||
"zod": "^3.19.1"
|
"zod": "^3.19.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/koa-bodyparser": {
|
||||||
|
"version": "2.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/koa-bodyparser/-/koa-bodyparser-2.5.0.tgz",
|
||||||
|
"integrity": "sha512-HIX/b+B/WhlYRaAFQCRC3ojEIrgffESfO8M8OhgZPBe1FhlGKOTw2ZE6qdDqzeDZgTJylN16eiTOsQxxrU9g4A==",
|
||||||
|
"dependencies": {
|
||||||
|
"co-body": "^5.1.0",
|
||||||
|
"copy-to": "^2.0.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/koa-bodyparser/node_modules/co-body": {
|
||||||
|
"version": "5.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/co-body/-/co-body-5.2.0.tgz",
|
||||||
|
"integrity": "sha512-sX/LQ7LqUhgyaxzbe7IqwPeTr2yfpfUIQ/dgpKo6ZI4y4lpQA0YxAomWIY+7I7rHWcG02PG+OuPREzMW/5tszQ==",
|
||||||
|
"dependencies": {
|
||||||
|
"inflation": "^2.0.0",
|
||||||
|
"qs": "^6.4.0",
|
||||||
|
"raw-body": "^2.2.0",
|
||||||
|
"type-is": "^1.6.14"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/koa-compose": {
|
"node_modules/koa-compose": {
|
||||||
"version": "4.1.0",
|
"version": "4.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/koa-compose/-/koa-compose-4.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/koa-compose/-/koa-compose-4.1.0.tgz",
|
||||||
|
@ -8592,6 +8665,22 @@
|
||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@types/koa-basic-auth": {
|
||||||
|
"version": "2.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/koa-basic-auth/-/koa-basic-auth-2.0.4.tgz",
|
||||||
|
"integrity": "sha512-PJKvoF5OMGlEEzUnctZDGRQVqV12xB0V4KplDJvHQDX9egh9ADFa456zGXRNnhNr43t3Fe4/VzD6ziM61uM5RQ==",
|
||||||
|
"requires": {
|
||||||
|
"@types/koa": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@types/koa-bodyparser": {
|
||||||
|
"version": "4.3.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/koa-bodyparser/-/koa-bodyparser-4.3.10.tgz",
|
||||||
|
"integrity": "sha512-6ae05pjhmrmGhUR8GYD5qr5p9LTEMEGfGXCsK8VaSL+totwigm8+H/7MHW7K4854CMeuwRAubT8qcc/EagaeIA==",
|
||||||
|
"requires": {
|
||||||
|
"@types/koa": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"@types/koa-compose": {
|
"@types/koa-compose": {
|
||||||
"version": "3.2.5",
|
"version": "3.2.5",
|
||||||
"resolved": "https://registry.npmjs.org/@types/koa-compose/-/koa-compose-3.2.5.tgz",
|
"resolved": "https://registry.npmjs.org/@types/koa-compose/-/koa-compose-3.2.5.tgz",
|
||||||
|
@ -8877,9 +8966,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@wormhole-foundation/relayer-engine": {
|
"@wormhole-foundation/relayer-engine": {
|
||||||
"version": "git+ssh://git@github.com/wormhole-foundation/relayer-engine.git#e3bd60b8249b25eb98dd8a47cf5bbd80a0e18e65",
|
"version": "git+ssh://git@github.com/wormhole-foundation/relayer-engine.git#cc0aad43787a87ecd9f0d9893d8ccf92901d7adb",
|
||||||
"integrity": "sha512-l7CRnz+Gngaev3zWBDufmjjIj4J70HfD+LtDyfsJIqtbwpwZQcfyJ/+Cxe8wId+a8G83SD/1C3bpzHzjg9KYPQ==",
|
"integrity": "sha512-tjDX/0uGooWpkQU9JJU3CKyWkkG9tfDv/JJX+PIkVK0V9uxA6T6uayvfVywGfq+8jbv4ZpVhsNgHhKcLl7HwVQ==",
|
||||||
"from": "@wormhole-foundation/relayer-engine@github:wormhole-foundation/relayer-engine#e3bd60b8249b25eb98dd8a47cf5bbd80a0e18e65",
|
"from": "@wormhole-foundation/relayer-engine@github:wormhole-foundation/relayer-engine#cc0aad43787a87ecd9f0d9893d8ccf92901d7adb",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@celo-tools/celo-ethers-wrapper": "^0.1.0",
|
"@celo-tools/celo-ethers-wrapper": "^0.1.0",
|
||||||
"@certusone/wormhole-sdk": "0.9.6",
|
"@certusone/wormhole-sdk": "0.9.6",
|
||||||
|
@ -8892,6 +8981,8 @@
|
||||||
"@terra-money/wallet-provider": "^3.8.0",
|
"@terra-money/wallet-provider": "^3.8.0",
|
||||||
"@types/js-yaml": "^4.0.5",
|
"@types/js-yaml": "^4.0.5",
|
||||||
"@types/koa": "^2.13.5",
|
"@types/koa": "^2.13.5",
|
||||||
|
"@types/koa-basic-auth": "^2.0.4",
|
||||||
|
"@types/koa-bodyparser": "^4.3.10",
|
||||||
"@types/koa-router": "^7.4.4",
|
"@types/koa-router": "^7.4.4",
|
||||||
"async-mutex": "^0.3.2",
|
"async-mutex": "^0.3.2",
|
||||||
"body-parser": "^1.19.0",
|
"body-parser": "^1.19.0",
|
||||||
|
@ -8902,7 +8993,9 @@
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"keyv": "^4.5.0",
|
"keyv": "^4.5.0",
|
||||||
"koa": "^2.14.1",
|
"koa": "^2.14.1",
|
||||||
|
"koa-basic-auth": "^4.0.0",
|
||||||
"koa-body": "^6.0.1",
|
"koa-body": "^6.0.1",
|
||||||
|
"koa-bodyparser": "^2.5.0",
|
||||||
"koa-router": "^12.0.0",
|
"koa-router": "^12.0.0",
|
||||||
"lru-cache": "^7.14.0",
|
"lru-cache": "^7.14.0",
|
||||||
"prom-client": "^14.1.1",
|
"prom-client": "^14.1.1",
|
||||||
|
@ -9204,6 +9297,21 @@
|
||||||
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
|
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
|
||||||
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
|
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
|
||||||
},
|
},
|
||||||
|
"basic-auth": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==",
|
||||||
|
"requires": {
|
||||||
|
"safe-buffer": "5.1.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"safe-buffer": {
|
||||||
|
"version": "5.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||||
|
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"bech32": {
|
"bech32": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz",
|
||||||
|
@ -9647,6 +9755,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"copy-to": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/copy-to/-/copy-to-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-3DdaFaU/Zf1AnpLiFDeNCD4TOWe3Zl2RZaTzUvWiIk5ERzcCodOE20Vqq4fzCbNoHURFHT4/us/Lfq+S2zyY4w=="
|
||||||
|
},
|
||||||
"copyfiles": {
|
"copyfiles": {
|
||||||
"version": "2.4.1",
|
"version": "2.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/copyfiles/-/copyfiles-2.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/copyfiles/-/copyfiles-2.4.1.tgz",
|
||||||
|
@ -10919,6 +11032,15 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"koa-basic-auth": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/koa-basic-auth/-/koa-basic-auth-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-eV1sGVAizDuFWNpY43VF3Z1ND4PotQZB/igxHNrcJXzXw+Flmj8Uv+4hP9LyNXyvqLJz/X5bmXeMu84AAGD9Jw==",
|
||||||
|
"requires": {
|
||||||
|
"basic-auth": "^2.0.0",
|
||||||
|
"tsscmp": "^1.0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
"koa-body": {
|
"koa-body": {
|
||||||
"version": "6.0.1",
|
"version": "6.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/koa-body/-/koa-body-6.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/koa-body/-/koa-body-6.0.1.tgz",
|
||||||
|
@ -10932,6 +11054,28 @@
|
||||||
"zod": "^3.19.1"
|
"zod": "^3.19.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"koa-bodyparser": {
|
||||||
|
"version": "2.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/koa-bodyparser/-/koa-bodyparser-2.5.0.tgz",
|
||||||
|
"integrity": "sha512-HIX/b+B/WhlYRaAFQCRC3ojEIrgffESfO8M8OhgZPBe1FhlGKOTw2ZE6qdDqzeDZgTJylN16eiTOsQxxrU9g4A==",
|
||||||
|
"requires": {
|
||||||
|
"co-body": "^5.1.0",
|
||||||
|
"copy-to": "^2.0.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"co-body": {
|
||||||
|
"version": "5.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/co-body/-/co-body-5.2.0.tgz",
|
||||||
|
"integrity": "sha512-sX/LQ7LqUhgyaxzbe7IqwPeTr2yfpfUIQ/dgpKo6ZI4y4lpQA0YxAomWIY+7I7rHWcG02PG+OuPREzMW/5tszQ==",
|
||||||
|
"requires": {
|
||||||
|
"inflation": "^2.0.0",
|
||||||
|
"qs": "^6.4.0",
|
||||||
|
"raw-body": "^2.2.0",
|
||||||
|
"type-is": "^1.6.14"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"koa-compose": {
|
"koa-compose": {
|
||||||
"version": "4.1.0",
|
"version": "4.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/koa-compose/-/koa-compose-4.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/koa-compose/-/koa-compose-4.1.0.tgz",
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@certusone/wormhole-sdk": "^0.9.6",
|
"@certusone/wormhole-sdk": "^0.9.6",
|
||||||
"@wormhole-foundation/relayer-engine": "github:wormhole-foundation/relayer-engine#e3bd60b8249b25eb98dd8a47cf5bbd80a0e18e65",
|
"@wormhole-foundation/relayer-engine": "github:wormhole-foundation/relayer-engine#cc0aad43787a87ecd9f0d9893d8ccf92901d7adb",
|
||||||
"ts-retry": "^4.1.1"
|
"ts-retry": "^4.1.1"
|
||||||
},
|
},
|
||||||
"author": "Chase Moran",
|
"author": "Chase Moran",
|
||||||
|
|
|
@ -1,15 +1,7 @@
|
||||||
import {
|
import {ChainId, coalesceChainName, CONTRACTS, EVMChainId,} from "@certusone/wormhole-sdk"
|
||||||
EVMChainId,
|
|
||||||
CONTRACTS,
|
|
||||||
coalesceChainName,
|
|
||||||
ChainId,
|
|
||||||
} from "@certusone/wormhole-sdk"
|
|
||||||
import * as relayerEngine from "@wormhole-foundation/relayer-engine"
|
import * as relayerEngine from "@wormhole-foundation/relayer-engine"
|
||||||
import { EnvType, validateStringEnum } from "@wormhole-foundation/relayer-engine"
|
import {validateStringEnum} from "@wormhole-foundation/relayer-engine"
|
||||||
import GenericRelayerPluginDef, {
|
import {ChainInfo, GenericRelayerPlugin, GenericRelayerPluginConfig,} from "./plugin/src/plugin"
|
||||||
ChainInfo,
|
|
||||||
GenericRelayerPluginConfig,
|
|
||||||
} from "./plugin/src/plugin"
|
|
||||||
|
|
||||||
type ContractConfigEntry = { chainId: EVMChainId; address: "string" }
|
type ContractConfigEntry = { chainId: EVMChainId; address: "string" }
|
||||||
type ContractsJson = {
|
type ContractsJson = {
|
||||||
|
@ -48,7 +40,9 @@ async function main() {
|
||||||
// run relayer engine
|
// run relayer engine
|
||||||
await relayerEngine.run({
|
await relayerEngine.run({
|
||||||
configs: "./engine_config/" + envType.toLowerCase(),
|
configs: "./engine_config/" + envType.toLowerCase(),
|
||||||
plugins: [GenericRelayerPluginDef.init(pluginConfig)],
|
plugins: {
|
||||||
|
[GenericRelayerPlugin.pluginName]: (engineConfig, logger) => new GenericRelayerPlugin(engineConfig, pluginConfig, logger)
|
||||||
|
},
|
||||||
mode: relayerEngine.Mode.BOTH,
|
mode: relayerEngine.Mode.BOTH,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,24 +8,23 @@ import {
|
||||||
ParsedVaaWithBytes,
|
ParsedVaaWithBytes,
|
||||||
parseVaaWithBytes,
|
parseVaaWithBytes,
|
||||||
Plugin,
|
Plugin,
|
||||||
PluginDefinition,
|
|
||||||
Providers,
|
Providers,
|
||||||
StagingAreaKeyLock,
|
StagingAreaKeyLock,
|
||||||
Workflow,
|
Workflow,
|
||||||
} from "@wormhole-foundation/relayer-engine"
|
} from "@wormhole-foundation/relayer-engine"
|
||||||
import * as wh from "@certusone/wormhole-sdk"
|
import * as wh from "@certusone/wormhole-sdk"
|
||||||
import { config, Logger } from "winston"
|
import {SignedVaa} from "@certusone/wormhole-sdk"
|
||||||
import { convertAddressBytesToHex, PluginError } from "./utils"
|
import { Logger } from "winston"
|
||||||
import { SignedVaa } from "@certusone/wormhole-sdk"
|
import { PluginError } from "./utils"
|
||||||
import {
|
import {
|
||||||
RelayProvider__factory,
|
|
||||||
IDelivery,
|
|
||||||
DeliveryInstructionsContainer,
|
DeliveryInstructionsContainer,
|
||||||
|
IDelivery,
|
||||||
parseDeliveryInstructionsContainer,
|
parseDeliveryInstructionsContainer,
|
||||||
parseRedeliveryByTxHashInstruction,
|
|
||||||
parsePayloadType,
|
parsePayloadType,
|
||||||
RelayerPayloadId,
|
parseRedeliveryByTxHashInstruction,
|
||||||
RedeliveryByTxHashInstruction,
|
RedeliveryByTxHashInstruction,
|
||||||
|
RelayerPayloadId,
|
||||||
|
RelayProvider__factory,
|
||||||
} from "../../../pkgs/sdk/src"
|
} from "../../../pkgs/sdk/src"
|
||||||
import * as ethers from "ethers"
|
import * as ethers from "ethers"
|
||||||
import * as vaaFetching from "./vaaFetching"
|
import * as vaaFetching from "./vaaFetching"
|
||||||
|
@ -75,7 +74,7 @@ export class GenericRelayerPlugin implements Plugin<WorkflowPayload> {
|
||||||
pluginConfig: GenericRelayerPluginConfig
|
pluginConfig: GenericRelayerPluginConfig
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
readonly engineConfig: CommonPluginEnv & { wormholeRpc: string },
|
readonly engineConfig: CommonPluginEnv,
|
||||||
pluginConfigRaw: Record<string, any>,
|
pluginConfigRaw: Record<string, any>,
|
||||||
readonly logger: Logger
|
readonly logger: Logger
|
||||||
) {
|
) {
|
||||||
|
@ -409,20 +408,3 @@ export class GenericRelayerPlugin implements Plugin<WorkflowPayload> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class Definition implements PluginDefinition<GenericRelayerPluginConfig, Plugin> {
|
|
||||||
pluginName: string = PLUGIN_NAME
|
|
||||||
|
|
||||||
init(pluginConfig: any): {
|
|
||||||
fn: (engineConfig: any, logger: Logger) => GenericRelayerPlugin
|
|
||||||
pluginName: string
|
|
||||||
} {
|
|
||||||
const pluginConfigParsed: GenericRelayerPluginConfig =
|
|
||||||
GenericRelayerPlugin.validateConfig(pluginConfig)
|
|
||||||
return {
|
|
||||||
fn: (env, logger) => new GenericRelayerPlugin(env, pluginConfigParsed, logger),
|
|
||||||
pluginName: this.pluginName,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default new Definition()
|
|
||||||
|
|
Loading…
Reference in New Issue