Documentation
¶
Overview ¶
Copyright (C) 2022, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.
Copyright (C) 2022, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.
Copyright (C) 2024, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.
Copyright (C) 2022, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.
Copyright (C) 2022, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.
Copyright (C) 2022, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.
Index ¶
- Constants
- type BaseMigration
- type BridgeRoute
- type Config
- type ElasticSubnet
- type ElasticSubnetConfig
- type Exportable
- type GovernanceProposal
- type L2Config
- type L3Config
- type LuxCompatiblity
- type MigrationTx
- type Network
- type NetworkData
- type PermissionlessValidators
- type PreconfirmConfig
- type Sidecar
- type TokenInfo
- type VMCompatibility
- type VMType
Constants ¶
const ( EVM = "EVM" BlobVM = "Blob VM" TimestampVM = "Timestamp VM" CustomVM = "Custom" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseMigration ¶
type BaseMigration struct {
FromBase string `json:"fromBase"`
ToBase string `json:"toBase"`
ProposalID string `json:"proposalId"`
ExecutedAt int64 `json:"executedAt"`
HotSwap bool `json:"hotSwap"`
CheckpointBlock uint64 `json:"checkpointBlock"`
}
BaseMigration represents a base chain migration
type BridgeRoute ¶
type BridgeRoute struct {
From string `json:"from"`
To string `json:"to"`
Via string `json:"via"` // bridge provider
EstimatedTime int `json:"estimatedTime"` // seconds
EstimatedCost string `json:"estimatedCost"` // in native token
}
BridgeRoute represents a cross-chain route
type ElasticSubnet ¶
type ElasticSubnetConfig ¶
type ElasticSubnetConfig struct {
SubnetID ids.ID
AssetID ids.ID
InitialSupply uint64
MaxSupply uint64
MinConsumptionRate uint64
MaxConsumptionRate uint64
MinValidatorStake uint64
MaxValidatorStake uint64
MinStakeDuration time.Duration
MaxStakeDuration time.Duration
MinDelegationFee uint32
MinDelegatorStake uint64
MaxValidatorWeightFactor byte
UptimeRequirement uint32
}
type Exportable ¶
type GovernanceProposal ¶
type GovernanceProposal struct {
ID string `json:"id"`
Type string `json:"type"` // base-migration, upgrade, parameter
Title string `json:"title"`
Description string `json:"description"`
L2Name string `json:"l2Name"`
// For base migrations
CurrentBase string `json:"currentBase,omitempty"`
TargetBase string `json:"targetBase,omitempty"`
HotSwap bool `json:"hotSwap,omitempty"`
// Voting
CreatedAt int64 `json:"createdAt"`
VotingEnds int64 `json:"votingEnds"`
Executed bool `json:"executed"`
ExecutedAt int64 `json:"executedAt"`
}
GovernanceProposal for base migrations and upgrades
type L2Config ¶
type L2Config struct {
Name string `json:"name"`
BaseChain string `json:"baseChain"` // ethereum, lux, lux-l1, op-mainnet
RollupType string `json:"rollupType"` // optimistic, zk, hybrid
DataAvailability string `json:"dataAvailability"` // base, celestia, eigenda
IBCEnabled bool `json:"ibcEnabled"`
PreconfirmEnabled bool `json:"preconfirmEnabled"`
BasedRollup bool `json:"basedRollup"` // true for L1-sequenced
// Contracts
InboxContract string `json:"inboxContract"`
RollupContract string `json:"rollupContract"`
BridgeContract string `json:"bridgeContract"`
// Chain configuration
ChainID uint64 `json:"chainId"`
L1BlockTime int `json:"l1BlockTime"` // milliseconds
// Token info
TokenInfo TokenInfo `json:"tokenInfo"`
CongestionFeeShare int `json:"congestionFeeShare"` // percentage to rollup
// Bridge configuration
EnabledBridges []string `json:"enabledBridges"` // axelar, layerzero, wormhole, etc
IBCChannels []string `json:"ibcChannels"` // IBC channel IDs
// Deployment info
DeployedAt int64 `json:"deployedAt"`
LastMigration int64 `json:"lastMigration"`
}
L2Config represents a based rollup configuration
type L3Config ¶
type L3Config struct {
Name string `json:"name"`
L2Base string `json:"l2Base"` // which L2 is the base
// Inherits most properties from L2Config
L2Config
}
L3Config for nested rollups
type LuxCompatiblity ¶
type MigrationTx ¶
type MigrationTx struct {
SubnetID ids.ID `json:"subnetId"`
BlockchainID ids.ID `json:"blockchainId"`
ValidatorManagement string `json:"validatorManagement"`
RentalPlan string `json:"rentalPlan"`
Timestamp int64 `json:"timestamp"`
}
MigrationTx represents a subnet to L1 migration transaction
type PreconfirmConfig ¶
type PreconfirmConfig struct {
Enabled bool `json:"enabled"`
Provider string `json:"provider"` // eigenlayer, builders, bonded
ConfirmationTime int `json:"confirmationTime"` // target ms
CommitteeSize int `json:"committeeSize"`
BondAmount string `json:"bondAmount"` // in LUX
}
PreconfirmConfig represents pre-confirmation settings
type Sidecar ¶
type Sidecar struct {
Name string
VM VMType
VMVersion string
RPCVersion int
Subnet string
SubnetID ids.ID
BlockchainID ids.ID
TokenName string
ChainID string
Version string
Networks map[string]NetworkData
ElasticSubnet map[string]ElasticSubnet
ImportedFromLPM bool
ImportedVMID string
// L1/L2 Architecture (2025)
Sovereign bool `json:"sovereign"` // true for L1, false for L2/subnet
BaseChain string `json:"baseChain"` // For L2s: ethereum, lux-l1, lux, op-mainnet
BasedRollup bool `json:"basedRollup"` // true for L1-sequenced rollups
SequencerType string `json:"sequencerType"` // based, centralized, distributed
// Based Rollup Configuration
InboxContract string `json:"inboxContract"` // Contract on base chain
L1BlockTime int `json:"l1BlockTime"` // Base chain block time in ms
PreconfirmEnabled bool `json:"preconfirmEnabled"` // Fast confirmations
// Token & Economics
TokenInfo TokenInfo `json:"tokenInfo"`
RentalPlan string `json:"rentalPlan"` // For L1s: monthly, annual, perpetual
// Validator Management
ValidatorManagement string `json:"validatorManagement"` // proof-of-authority, proof-of-stake
// Migration info
MigratedAt int64 `json:"migratedAt"` // When subnet became L1
// Chain layer (1=L1, 2=L2, 3=L3)
ChainLayer int `json:"chainLayer"` // Default 2 for backward compat
}