Files
chains/bridgevm/codec.go
T
zeekay 0d5bc75ef9 feat: move all VM implementations into chains/
VMs now live in ONE place: chains/<name>/ owns the full implementation.
Previously split across node/vms/<name>/ (impl) + chains/<name>/main.go
(plugin wrapper). Now consolidated.

New layout:
  chains/<name>vm/*.go              — package <name>vm (VM code)
  chains/<name>vm/cmd/plugin/main.go — package main (plugin binary)
  chains/<name>vm/go.mod             — module github.com/luxfi/chains/<name>vm

Moved 11 VMs: aivm, bridgevm, dexvm, graphvm, identityvm, keyvm,
oraclevm, quantumvm, relayvm, thresholdvm, zkvm.

External callers now import github.com/luxfi/chains/<name> directly.
2026-04-13 05:27:00 -07:00

33 lines
593 B
Go

// Copyright (C) 2019-2025, Lux Industries Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package bridgevm
import (
"errors"
"math"
"github.com/luxfi/codec"
"github.com/luxfi/codec/linearcodec"
)
const codecVersion = 0
var Codec codec.Manager
func init() {
Codec = codec.NewManager(math.MaxInt)
lc := linearcodec.NewDefault()
err := errors.Join(
// Register BVM-specific types
lc.RegisterType(&BridgeRequest{}),
lc.RegisterType(&Block{}),
lc.RegisterType(&Genesis{}),
Codec.RegisterCodec(codecVersion, lc),
)
if err != nil {
panic(err)
}
}