github.com/MetalBlockchain/subnet-evm@v0.4.9/plugin/main.go (about) 1 // (c) 2019-2020, Ava Labs, Inc. All rights reserved. 2 // See the file LICENSE for licensing terms. 3 4 package main 5 6 import ( 7 "fmt" 8 "os" 9 10 "github.com/MetalBlockchain/metalgo/utils/logging" 11 "github.com/MetalBlockchain/metalgo/utils/ulimit" 12 "github.com/MetalBlockchain/metalgo/version" 13 "github.com/MetalBlockchain/metalgo/vms/rpcchainvm" 14 15 "github.com/MetalBlockchain/subnet-evm/plugin/evm" 16 ) 17 18 func main() { 19 printVersion, err := PrintVersion() 20 if err != nil { 21 fmt.Printf("couldn't get config: %s", err) 22 os.Exit(1) 23 } 24 if printVersion { 25 fmt.Printf("Subnet-EVM/%s [MetalGo=%s, rpcchainvm=%d]\n", evm.Version, version.Current, version.RPCChainVMProtocol) 26 os.Exit(0) 27 } 28 if err := ulimit.Set(ulimit.DefaultFDLimit, logging.NoLog{}); err != nil { 29 fmt.Printf("failed to set fd limit correctly due to: %s", err) 30 os.Exit(1) 31 } 32 rpcchainvm.Serve(&evm.VM{}) 33 }