-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
7 changed files
with
62 additions
and
40 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import pkg from "../package.json" assert { type: "json" }; | ||
import { Session } from "@wharfkit/session"; | ||
import { StartOptions } from "../bin/cli.js"; | ||
import { DEFAULT_HOSTNAME } from "./config.js"; | ||
|
||
export function banner( session: Session, port: number, options: StartOptions = {} ) { | ||
const host = `${options.hostname ?? DEFAULT_HOSTNAME}:${port.toString()}`; | ||
const host_metrics = `${options.hostname ?? DEFAULT_HOSTNAME}:${options.metricsListenPort?.toString()}` | ||
const publicKey = session.walletPlugin.metadata.publicKey; | ||
let text = ` | ||
███████╗ ██████╗ ███████╗ ███████╗██╗ ██╗███╗ ███╗ | ||
██╔════╝██╔═══██╗██╔════╝ ██╔════╝██║ ██║████╗ ████║ | ||
█████╗ ██║ ██║███████╗ █████╗ ██║ ██║██╔████╔██║ | ||
██╔══╝ ██║ ██║╚════██║ ██╔══╝ ╚██╗ ██╔╝██║╚██╔╝██║ | ||
███████╗╚██████╔╝███████║ ███████╗ ╚████╔╝ ██║ ╚═╝ ██║ | ||
╚══════╝ ╚═════╝ ╚══════╝ ╚══════╝ ╚═══╝ ╚═╝ ╚═╝ | ||
` | ||
text += ` EOS EVM Miner v${pkg.version}\n` | ||
if ( options.showEndpoints ) text += ` Ethereum JSON-RPC API listening on @ ${host}\n` | ||
if ( options.showEndpoints && !options.metricsDisabled ) text += ` Prometheus metrics listening on @ ${host_metrics}\n`; | ||
if ( options.showEndpoints ) text += ` RPC Nodeos proxy @ ${session.chain.url.toString()}\n` | ||
if ( options.showEndpoints ) text += ` RPC EVM proxy @ ${options.rpcEvmEndpoint}\n` | ||
if ( options.showMiner ) text += ` EVM miner [${session.actor.toString()}]\n`; | ||
if ( options.showMiner && publicKey ) text += ` ${publicKey}\n` | ||
return text; | ||
} |
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