mirror of
https://github.com/luxfi/chains.git
synced 2026-09-24 00:26:00 +00:00
Wave 2D codec-rip extension for chains repo: - bridgevm/codec.go: codec.Manager + linearcodec.NewDefault → pcodecs - zkvm/codec.go: same pattern - thresholdvm/codec.go: same pattern - Bump luxfi/warp v1.18.6 → v1.19.3 (closes warp→ids→codec/wrappers transitive) - Bump luxfi/ids v1.2.14 → v1.2.15 (drops codec/wrappers from Prefix/Append) luxfi/codec remains as // indirect via proto/zap_codec → codec/zapcodec (the actual ZAP wire impl — physical relocation to luxfi/zap/codec queued separately). Tests pass for all three VMs.
30 lines
524 B
Go
30 lines
524 B
Go
// Copyright (C) 2019-2025, Lux Industries Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package bridgevm
|
|
|
|
import (
|
|
"errors"
|
|
|
|
"github.com/luxfi/node/vms/pcodecs"
|
|
)
|
|
|
|
const codecVersion = 0
|
|
|
|
var Codec pcodecs.Manager
|
|
|
|
func init() {
|
|
Codec = pcodecs.NewMaxIntManager()
|
|
lc := pcodecs.NewLinearCodec()
|
|
|
|
err := errors.Join(
|
|
lc.RegisterType(&BridgeRequest{}),
|
|
lc.RegisterType(&Block{}),
|
|
lc.RegisterType(&Genesis{}),
|
|
Codec.RegisterCodec(codecVersion, lc),
|
|
)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
}
|