Documentation
¶
Overview ¶
Copyright (C) 2025, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.
Copyright (C) 2025, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.
Copyright (C) 2025, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.
Copyright (C) 2025, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.
Copyright (C) 2025, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.
Copyright (C) 2025, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.
Index ¶
- Variables
- func CallToMethod(rpcURL string, contractAddress common.Address, methodSpec string, ...) ([]interface{}, error)
- func ContractAddressIsInGenesisData(genesisData []byte, contractAddress common.Address) (bool, error)
- func DebugTraceCall(rpcURL string, from common.Address, privateKey string, ...) (map[string]interface{}, error)
- func DeployContract(rpcURL string, privateKey string, binBytes []byte, methodSpec string, ...) (common.Address, error)
- func DeployERC20(rpcURL string, privateKey string, symbol string, funded common.Address, ...) (common.Address, error)
- func GetBlockchainAirdropKeyInfo(app *application.Lux, network models.Network, blockchainName string, ...) (string, string, string, error)
- func GetBlockchainDesc(chainSpec ChainSpec) (string, error)
- func GetBlockchainEndpoints(app *application.Lux, network models.Network, chainSpec ChainSpec, ...) (string, string, error)
- func GetBlockchainGenesis(app *application.Lux, network models.Network, chainSpec ChainSpec) ([]byte, error)
- func GetBlockchainID(app *application.Lux, network models.Network, chainSpec ChainSpec) (ids.ID, error)
- func GetCChainWarpInfo(app *application.Lux, network models.Network) (string, string, error)
- func GetContractOwner(rpcURL string, contractAddress common.Address) (common.Address, error)
- func GetDefaultBlockchainAirdropKeyInfo(app *application.Lux, blockchainName string) (string, string, string, error)
- func GetEVMSubnetGenesisNativeMinterAdmin(app *application.Lux, network models.Network, chainSpec ChainSpec) (bool, bool, string, string, string, error)
- func GetEVMSubnetGenesisNativeMinterManager(app *application.Lux, network models.Network, chainSpec ChainSpec) (bool, bool, string, string, string, error)
- func GetEVMSubnetGenesisSupply(app *application.Lux, network models.Network, chainSpec ChainSpec) (*big.Int, error)
- func GetEVMSubnetPrefundedKey(app *application.Lux, network models.Network, chainSpec ChainSpec) (string, string, error)
- func GetSmartContractCallResult[T any](methodName string, out []interface{}) (T, error)
- func GetSubnetID(app *application.Lux, network models.Network, chainSpec ChainSpec) (ids.ID, error)
- func GetWarpInfo(app *application.Lux, network models.Network, chainSpec ChainSpec, ...) (string, string, error)
- func ParseSpec(esp string, indexedFields []int, constructor bool, event bool, paid bool, ...) (string, string, error)
- func PromptChain(app *application.Lux, network models.Network, prompt string, ...) (bool, error)
- func SearchForManagedKey(app *application.Lux, network models.Network, address common.Address, ...) (bool, string, string, string, error)
- func TransferOwnership(rpcURL string, contractAddress common.Address, ownerPrivateKey string, ...) error
- func TxToMethod(rpcURL string, generateRawTxOnly bool, from common.Address, privateKey string, ...) (*types.Transaction, *types.Receipt, error)
- func TxToMethodWithWarpMessage(rpcURL string, generateRawTxOnly bool, from common.Address, privateKey string, ...) (*types.Transaction, *types.Receipt, error)
- func UnpackLog(eventSpec string, indexedFields []int, log types.Log, event interface{}) error
- type ChainSpec
- func (cs *ChainSpec) AddToCmd(cmd *cobra.Command, goalFmt string)
- func (cs *ChainSpec) CheckMutuallyExclusiveFields() error
- func (cs *ChainSpec) Defined() bool
- func (cs *ChainSpec) SetEnabled(blockchainNameFlagEnabled bool, cChainFlagEnabled bool, pChainFlagEnabled bool, ...)
- func (cs *ChainSpec) SetFlagNames(blockchainNameFlagName string, cChainFlagName string, pChainFlagName string, ...)
- type PrivateKeyFlags
Constants ¶
This section is empty.
Variables ¶
var ErrFailedReceiptStatus = fmt.Errorf("failed receipt status")
Functions ¶
func CallToMethod ¶
func DebugTraceCall ¶
func DeployContract ¶
func DeployERC20 ¶
func GetBlockchainAirdropKeyInfo ¶
func GetBlockchainAirdropKeyInfo( app *application.Lux, network models.Network, blockchainName string, genesisData []byte, ) (string, string, string, error)
from a given genesis, look for known private keys inside it, giving preference to the ones expected to be default it searches for: 1) default CLI allocation key for blockchains 2) ewoq 3) all other stored keys managed by CLI returns address + private key when found
func GetBlockchainDesc ¶
func GetBlockchainEndpoints ¶
func GetBlockchainGenesis ¶
func GetBlockchainGenesis( app *application.Lux, network models.Network, chainSpec ChainSpec, ) ([]byte, error)
get the deployed blockchain genesis
func GetBlockchainID ¶
func GetCChainWarpInfo ¶
func GetContractOwner ¶
GetContractOwner gets owner for https://docs.openzeppelin.com/contracts/2.x/api/ownership#Ownable-owner contracts
func GetDefaultBlockchainAirdropKeyInfo ¶
func GetDefaultBlockchainAirdropKeyInfo( app *application.Lux, blockchainName string, ) (string, string, string, error)
returns information for the blockchain default allocation key if found, returns key name, address, private key
func GetEVMSubnetPrefundedKey ¶
func GetEVMSubnetPrefundedKey( app *application.Lux, network models.Network, chainSpec ChainSpec, ) (string, string, error)
get the deployed blockchain genesis, and then look for known private keys inside it returns address + private key when found
func GetSubnetID ¶
func GetWarpInfo ¶
func PromptChain ¶
func SearchForManagedKey ¶
func TransferOwnership ¶
func TxToMethod ¶
func TxToMethod( rpcURL string, generateRawTxOnly bool, from common.Address, privateKey string, contractAddress common.Address, payment *big.Int, description string, errorSignatureToError map[string]error, methodSpec string, params ...interface{}, ) (*types.Transaction, *types.Receipt, error)
get method name and types from [methodsSpec], then call it at the smart contract [contractAddress] with the given [params]. also send [payment] tokens to it
func TxToMethodWithWarpMessage ¶
func TxToMethodWithWarpMessage( rpcURL string, generateRawTxOnly bool, from common.Address, privateKey string, contractAddress common.Address, warpMessage *luxWarp.Message, payment *big.Int, description string, errorSignatureToError map[string]error, methodSpec string, params ...interface{}, ) (*types.Transaction, *types.Receipt, error)
get method name and types from [methodsSpec], then call it at the smart contract [contractAddress] with the given [params]. send [warpMessage] on the same call, whose signature is going to be verified previously to pass it to the method also send [payment] tokens to it
Types ¶
type ChainSpec ¶
type ChainSpec struct {
BlockchainName string
CChain bool
PChain bool
XChain bool
BlockchainID string
OnlySOV bool
// contains filtered or unexported fields
}
func (*ChainSpec) CheckMutuallyExclusiveFields ¶
func (*ChainSpec) SetEnabled ¶
type PrivateKeyFlags ¶
type PrivateKeyFlags struct {
PrivateKey string
KeyName string
GenesisKey bool
// contains filtered or unexported fields
}
func (*PrivateKeyFlags) AddToCmd ¶
func (pkf *PrivateKeyFlags) AddToCmd( cmd *cobra.Command, goal string, )
func (*PrivateKeyFlags) GetPrivateKey ¶
func (pkf *PrivateKeyFlags) GetPrivateKey( app *application.Lux, genesisPrivateKey string, ) (string, error)
func (*PrivateKeyFlags) SetFlagNames ¶
func (pkf *PrivateKeyFlags) SetFlagNames( privateKeyFlagName string, keyFlagName string, genesisKeyFlagName string, )