mirror of
https://github.com/luxfi/node.git
synced 2026-10-30 15:24:05 +00:00
35 lines
699 B
Go
35 lines
699 B
Go
// Copyright (C) 2019-2025, Lux Industries Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package builder
|
|
|
|
import (
|
|
"github.com/luxfi/ids"
|
|
"github.com/luxfi/runtime"
|
|
)
|
|
|
|
const Alias = "X"
|
|
|
|
type Context struct {
|
|
NetworkID uint32
|
|
BlockchainID ids.ID
|
|
UTXOAssetID ids.ID
|
|
BaseTxFee uint64
|
|
CreateAssetTxFee uint64
|
|
}
|
|
|
|
func NewConsensusRuntime(
|
|
networkID uint32,
|
|
blockchainID ids.ID,
|
|
utxoAssetID ids.ID,
|
|
) (*runtime.Runtime, error) {
|
|
lookup := ids.NewAliaser()
|
|
rt := &runtime.Runtime{
|
|
NetworkID: networkID,
|
|
ChainID: blockchainID,
|
|
XChainID: blockchainID,
|
|
UTXOAssetID: utxoAssetID,
|
|
}
|
|
return rt, lookup.Alias(blockchainID, Alias)
|
|
}
|