-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
87 changed files
with
15,496 additions
and
2,799 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
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,13 @@ | ||
import Vorpal from "vorpal"; | ||
|
||
/** | ||
* Function to set the rollup address in the Referee contract. | ||
* @param {Vorpal} cli - The Vorpal instance to attach the command to. | ||
*/ | ||
export function displayNodeAgreement(cli: Vorpal) { | ||
cli | ||
.command('display-node-agreement', 'Display the Sentry Node Agreement') | ||
.action(async function (this: Vorpal.CommandInstance) { | ||
this.log(`View the Sentry Node Agreement here https://xai.games/sentrynodeagreement/`); | ||
}); | ||
} |
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,30 @@ | ||
import Vorpal from "vorpal"; | ||
import { dataCentralizationRuntime } from "@sentry/core"; | ||
|
||
export function startCentralizationRuntime(cli: Vorpal) { | ||
cli | ||
.command('start-centralization-runtime', 'Start the data centralization runtime') | ||
.action(async function (this: Vorpal.CommandInstance) { | ||
const mongoUriPrompt: Vorpal.PromptObject = { | ||
type: 'password', | ||
name: 'mongoUri', | ||
message: 'Enter the mongodb connection URI:', | ||
mask: '*', | ||
optional: false | ||
}; | ||
const { mongoUri } = await this.prompt(mongoUriPrompt); | ||
|
||
const commandInstance = this; | ||
|
||
const stopRuntime = await dataCentralizationRuntime({ mongoUri, logFunction: (log: string) => commandInstance.log(log) }); | ||
|
||
// Listen for process termination and call the handler | ||
process.on('SIGINT', async () => { | ||
commandInstance.log(`[${new Date().toISOString()}] The CentralizationRuntime has been terminated manually.`); | ||
stopRuntime(); | ||
process.exit(); | ||
}); | ||
|
||
return new Promise((resolve, reject) => { }); // Keep the command alive | ||
}); | ||
} |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.