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

28 lines
463 B
Go
Raw Normal View History

2024-04-24 07:10:22 +00:00
package main
import (
"os"
"github.com/cosmos/cosmos-sdk/server"
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"
"github.com/0glabs/0g-chain/chaincfg"
)
func main() {
chaincfg.SetSDKConfig().Seal()
chaincfg.RegisterDenoms()
2024-04-25 00:50:02 +00:00
rootCmd := NewRootCmd()
2024-04-24 07:10:22 +00:00
if err := svrcmd.Execute(rootCmd, chaincfg.EnvPrefix, chaincfg.DefaultNodeHome); err != nil {
switch e := err.(type) {
case server.ErrorCode:
os.Exit(e.Code)
default:
os.Exit(1)
}
}
}