mirror of
https://github.com/luxfi/cli.git
synced 2026-10-30 17:01:20 +00:00
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.
43 lines
939 B
Go
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
|
|
}
|