mirror of
https://github.com/luxfi/migrate.git
synced 2026-10-30 15:25:11 +00:00
Full implementations for all VM types: - SubnetEVM: PebbleDB exporter/importer - C-Chain: RPC exporter, RPC importer - Coreth: LevelDB exporter - P-Chain: Platform API exporter/importer - X-Chain: AVM API exporter/importer - Q-Chain: RPC exporter/importer - ZooL2: PebbleDB exporter/importer All implementations include factory registration and test suites.
31 lines
771 B
Go
31 lines
771 B
Go
// Package zool2 provides Zoo L2 chain export/import functionality.
|
|
package zool2
|
|
|
|
import "github.com/luxfi/migrate"
|
|
|
|
func init() {
|
|
// Register Zoo L2 exporter factory
|
|
migrate.RegisterExporterFactory(migrate.VMTypeZooL2, func(config migrate.ExporterConfig) (migrate.Exporter, error) {
|
|
exp, err := NewExporter(config)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if err := exp.Init(config); err != nil {
|
|
return nil, err
|
|
}
|
|
return exp, nil
|
|
})
|
|
|
|
// Register Zoo L2 importer factory
|
|
migrate.RegisterImporterFactory(migrate.VMTypeZooL2, func(config migrate.ImporterConfig) (migrate.Importer, error) {
|
|
imp, err := NewImporter(config)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
if err := imp.Init(config); err != nil {
|
|
return nil, err
|
|
}
|
|
return imp, nil
|
|
})
|
|
}
|