11#! /usr/bin/env node
22
33import { getChain } from 'configs' ;
4+ import { mainnet } from 'viem/chains' ;
45
56import { program } from './command/index.js' ;
67import { logError , logInfo } from './utils/logging/console.js' ;
@@ -11,23 +12,34 @@ import { disconnectWalletConnect } from './utils/index.js';
1112export * from './utils/index.js' ;
1213
1314const showTestnetWarning = ( ) => {
14- console . info ( '\n🎉🎉 HOODI V3 is officially launched! 🎉🎉' ) ;
15+ console . info ( '\nHOODI V3 application:' ) ;
16+ console . info ( '- 🌐 Web UI: https://stvaults-hoodi.testnet.fi/vaults' ) ;
1517 console . info (
16- '🌐 Web UI is available at : https://stvaults-hoodi.testnet .fi/vaults ' ,
18+ '- 📄 Contracts info : https://docs.lido .fi/deployed-contracts/hoodi ' ,
1719 ) ;
1820 console . info (
19- '📄 Contracts info : https://docs.lido.fi/deployed-contracts/hoodi ' ,
21+ '- 📖 stVaults Doc Center : https://docs.lido.fi/run-on-lido/stvaults ' ,
2022 ) ;
23+ console . info ( '\n🔄 Testnet-1 is available on the testnet-1 branch.' ) ;
24+ console . info ( '🔄 Testnet-2 is available on the testnet-2 branch.' ) ;
25+ } ;
26+
27+ const showMainnetWarning = ( ) => {
28+ console . info ( '\nMainnet V3 application:' ) ;
29+ console . info ( '- 🌐 Web UI: https://stvaults.lido.fi/vaults' ) ;
30+ console . info ( '- 📄 Contracts info: https://docs.lido.fi/deployed-contracts' ) ;
2131 console . info (
22- '📖 stVaults Doc Center: https://docs.lido.fi/run-on-lido/stvaults' ,
32+ '- 📖 stVaults Doc Center: https://docs.lido.fi/run-on-lido/stvaults' ,
2333 ) ;
24- console . info ( '\n' ) ;
25- console . info ( '🔄 Testnet-1 is available on the testnet-1 branch.' ) ;
26- console . info ( '🔄 Testnet-2 is available on the testnet-2 branch.' ) ;
2734} ;
2835
2936program . addHelpText ( 'afterAll' , ( ) => {
30- showTestnetWarning ( ) ;
37+ const chain = process . env . CHAIN_ID ;
38+ if ( chain === String ( mainnet . id ) ) {
39+ showMainnetWarning ( ) ;
40+ } else {
41+ showTestnetWarning ( ) ;
42+ }
3143 return '' ;
3244} ) ;
3345
@@ -47,7 +59,14 @@ runCLI()
4759 process . exit ( 1 ) ;
4860 } )
4961 . finally ( async ( ) => {
50- showTestnetWarning ( ) ;
62+ const chain = await getChain ( ) ;
63+
64+ if ( chain . id === mainnet . id ) {
65+ showMainnetWarning ( ) ;
66+ } else {
67+ showTestnetWarning ( ) ;
68+ }
69+
5170 await disconnectWalletConnect ( ) ;
5271 process . exit ( 0 ) ;
5372 } ) ;
0 commit comments