mirror of
https://github.com/luxfi/coreth.git
synced 2026-10-30 17:00:51 +00:00
- Update vm to v1.0.30 (simplified SameChain API) - Update threshold to v1.5.5 (Signature.UnmarshalBinary) - Fix AveragerHeap usage (not generic) - Fix Header.Number access (Number.Uint64() not NumberU64()) - Use rpc.Serve instead of rpc/chain.Serve (ZAP transport)
32 lines
674 B
Go
32 lines
674 B
Go
// Copyright (C) 2019-2025, Lux Industries, Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package factory
|
|
|
|
import (
|
|
atomicvm "github.com/luxfi/coreth/plugin/evm/atomic/vm"
|
|
"github.com/luxfi/ids"
|
|
log "github.com/luxfi/log"
|
|
"github.com/luxfi/vm/chain"
|
|
"github.com/luxfi/vm/manager"
|
|
|
|
"github.com/luxfi/coreth/plugin/evm"
|
|
)
|
|
|
|
var (
|
|
// ID this VM should be referenced by
|
|
ID = ids.ID{'e', 'v', 'm'}
|
|
|
|
_ manager.Factory = (*Factory)(nil)
|
|
)
|
|
|
|
type Factory struct{}
|
|
|
|
func (*Factory) New(log.Logger) (interface{}, error) {
|
|
return atomicvm.WrapVM(&evm.VM{}), nil
|
|
}
|
|
|
|
func NewPluginVM() chain.ChainVM {
|
|
return atomicvm.WrapVM(&evm.VM{IsPlugin: true})
|
|
}
|