mirror of
https://github.com/luxfi/oracle.git
synced 2026-10-30 15:23:21 +00:00
Modules declare go 1.27.1 and the build images follow. go fix applied the modernizers; omitzero is not applied, since it changes what the JSON says. Co-authored-by: Hanzo Dev <[email protected]>
29 lines
752 B
Go
29 lines
752 B
Go
// Copyright (C) 2019-2025, Lux Industries Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package vm
|
|
|
|
import (
|
|
"github.com/luxfi/ids"
|
|
"github.com/luxfi/log"
|
|
"github.com/luxfi/vm/vms"
|
|
)
|
|
|
|
var _ vms.Factory = (*Factory)(nil)
|
|
|
|
// VMID is the unique identifier for OracleVM (O-Chain)
|
|
var VMID = ids.ID{'o', 'r', 'a', 'c', 'l', 'e', 'v', 'm'}
|
|
|
|
// Factory creates new OracleVM instances
|
|
type Factory struct{}
|
|
|
|
// New returns a new instance of the OracleVM
|
|
func (f *Factory) New(logger log.Logger) (any, error) {
|
|
return &VM{
|
|
feeds: make(map[ids.ID]*Feed),
|
|
pendingObs: make(map[ids.ID][]*Observation),
|
|
values: make(map[ids.ID]map[uint64]*AggregatedValue),
|
|
pendingBlocks: make(map[ids.ID]*Block),
|
|
}, nil
|
|
}
|