0g-chain/cmd/0gchaind/main.go

26 lines
432 B
Go
Raw Normal View History

package main
import (
"os"
"github.com/cosmos/cosmos-sdk/server"
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"
2024-08-03 09:51:56 +00:00
"github.com/0glabs/0g-chain/app"
2024-08-03 11:45:26 +00:00
"github.com/0glabs/0g-chain/chaincfg"
)
func main() {
2024-08-03 11:36:47 +00:00
rootCmd := NewRootCmd()
2024-08-03 11:45:26 +00:00
if err := svrcmd.Execute(rootCmd, chaincfg.EnvPrefix, app.DefaultNodeHome); err != nil {
switch e := err.(type) {
case server.ErrorCode:
os.Exit(e.Code)
default:
os.Exit(1)
}
}
}