Files
zeekay 162e4f6668 refactor: remove all SubnetEVM references and backward compatibility
- Rename plugin/evm/upgrade/subnetevm package to feewindow
- Rename SubnetEVMTimestamp to EVMTimestamp (JSON: evmTimestamp)
- Rename IsSubnetEVM method to IsEVM
- Rename SubnetEVMDefaultChainConfig to EVMDefaultChainConfig
- Rename TestSubnetEVMChainConfig to TestEVMChainConfig
- Rename TestPreSubnetEVMChainConfig to TestPreEVMChainConfig
- Rename ethclient/subnetevmclient to ethclient/evmclient
- Update VM factory ID from "subnetevm" to "evm"
- Remove all backward compatibility aliases
- Update all documentation and comments

Breaking change: This removes all SubnetEVM naming - only "EVM" is supported.
No backward compatibility maintained as per user requirement.
2025-12-21 10:26:52 -08:00

46 lines
831 B
Go

// Copyright (C) 2019-2025, Lux Industries, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package runner
import (
"flag"
"github.com/spf13/pflag"
"github.com/spf13/viper"
)
func evmFlagSet() *flag.FlagSet {
fs := flag.NewFlagSet("evm", flag.ContinueOnError)
fs.Bool(versionKey, false, "If true, print version and quit")
return fs
}
// getViper returns the viper environment for the plugin binary
func getViper() (*viper.Viper, error) {
v := viper.New()
fs := evmFlagSet()
pflag.CommandLine.AddGoFlagSet(fs)
pflag.Parse()
if err := v.BindPFlags(pflag.CommandLine); err != nil {
return nil, err
}
return v, nil
}
func PrintVersion() (bool, error) {
v, err := getViper()
if err != nil {
return false, err
}
if v.GetBool(versionKey) {
return true, nil
}
return false, nil
}