-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from oraichain/feat/ton-to-cw-health-check
Feat/ton to cw health check
- Loading branch information
Showing
20 changed files
with
14,085 additions
and
10,285 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
TON_HTTP_API_URL=http://localhost:5000/jsonRPC | ||
TON_HTTP_API_URL=http://localhost:5000/jsonRPC | ||
HEALTH_CHECK_PORT=3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nodeLinker: node-modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{ | ||
"$schema": "node_modules/lerna/schemas/lerna-schema.json", | ||
"npmClient": "yarn", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"command": { | ||
"publish": { | ||
"registry": "https://registry.npmjs.org/" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "@oraichain/tonbridge-orchestrator", | ||
"version": "1.0.8", | ||
"main": "build/index.js", | ||
"files": [ | ||
"build/", | ||
"@types" | ||
], | ||
"scripts": { | ||
"build": "tsc -p tsconfig.json" | ||
}, | ||
"license": "MIT", | ||
"dependencies": { | ||
"express": "^4.19.2" | ||
}, | ||
"devDependencies": { | ||
"@oraichain/tonbridge-relayer-to-cw": "workspace:^", | ||
"@types/express": "^4", | ||
"dotenv": "^16.4.5" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import express, { Request, Response } from "express"; | ||
import dotenv from "dotenv"; | ||
import { exit } from "process"; | ||
import TonToCwRelayer from "@oraichain/tonbridge-relayer-to-cw"; | ||
dotenv.config(); | ||
|
||
(async () => { | ||
try { | ||
const app = express(); | ||
const port = process.env.HEALTH_CHECK_PORT | ||
? Number(process.env.HEALTH_CHECK_PORT) | ||
: 3000; | ||
|
||
app.get("/", (req: Request, res: Response) => { | ||
res.send("Pong from ton-to-cw relayer"); | ||
}); | ||
|
||
app.listen(port, "0.0.0.0", () => { | ||
console.log(`Server is running at http://0.0.0.0:${port}`); | ||
}); | ||
|
||
// FIXME: add block & tx processor initiator here. Also add relayer from cw-to-ton as well | ||
const tonToCwRelayer = new TonToCwRelayer(); | ||
tonToCwRelayer.relay(); | ||
} catch (error) { | ||
console.error("error is: ", error); | ||
exit(1); | ||
} | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.