Files
cli/pkg/vm/createEvmSidecar.go
zeekay fb10b910c4 docs: replace subnet terminology with L2/chain
Update user-facing strings, CLI help text, error messages, README,
and documentation to use "chain" or "L2" instead of "subnet".
Preserves Go variable names, import paths, struct fields, and
GCP networking subnet references.
2026-03-02 10:53:28 -07:00

43 lines
939 B
Go

// Copyright (C) 2022-2025, Lux Industries Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package vm
import (
"github.com/luxfi/cli/pkg/application"
"github.com/luxfi/sdk/models"
)
// CreateEvmSidecar creates a sidecar for EVM-based blockchains
func CreateEvmSidecar(
sc *models.Sidecar,
app *application.Lux,
blockchainName string,
vmVersion string,
tokenSymbol string,
deployInterop bool,
sovereign bool,
useACP99 bool,
) (*models.Sidecar, error) {
// If sc is nil, create a new sidecar
if sc == nil {
sc = &models.Sidecar{
Version: "1.0.0",
}
}
// Always set Name and Chain from blockchainName
sc.Name = blockchainName
sc.Chain = blockchainName
// Update sidecar with EVM-specific information
sc.VM = models.EVM
sc.VMVersion = vmVersion
sc.TokenSymbol = tokenSymbol
sc.TokenName = "TEST" // Default token name
sc.Sovereign = sovereign
sc.UseACP99 = useACP99
return sc, nil
}