mirror of
https://github.com/luxfi/evm.git
synced 2026-09-24 00:27:44 +00:00
33 lines
702 B
Go
33 lines
702 B
Go
// (c) 2019-2020, Ava Labs, Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/ava-labs/avalanchego/utils/logging"
|
|
"github.com/ava-labs/avalanchego/utils/ulimit"
|
|
"github.com/ava-labs/avalanchego/vms/rpcchainvm"
|
|
|
|
"github.com/ava-labs/subnet-evm/plugin/evm"
|
|
)
|
|
|
|
func main() {
|
|
version, err := PrintVersion()
|
|
if err != nil {
|
|
fmt.Printf("couldn't get config: %s", err)
|
|
os.Exit(1)
|
|
}
|
|
if version {
|
|
fmt.Println(evm.Version)
|
|
os.Exit(0)
|
|
}
|
|
if err := ulimit.Set(ulimit.DefaultFDLimit, logging.NoLog{}); err != nil {
|
|
fmt.Printf("failed to set fd limit correctly due to: %s", err)
|
|
os.Exit(1)
|
|
}
|
|
rpcchainvm.Serve(&evm.VM{})
|
|
}
|