veganetwork

package
v0.73.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DepositConfig

type DepositConfig struct {
	AssetId string
	Parties map[string]*big.Float
}

type DepositResult

type DepositResult struct {
	AssetId        string
	SuccessParties []string
	FailedParties  map[string]error
	Err            error
}

func DepositAssetToParties

func DepositAssetToParties(
	network *VegaNetwork,
	networktools *networktools.NetworkTools,
	config DepositConfig,
	logger *zap.Logger,
) DepositResult

func DepositAssetsToParties

func DepositAssetsToParties(
	network *VegaNetwork,
	networktools *networktools.NetworkTools,
	config []DepositConfig,
	logger *zap.Logger,
) []DepositResult

func DepositERC20TokenToParties

func DepositERC20TokenToParties(
	network *VegaNetwork,
	tokenHexAddress string,
	config DepositConfig,
	logger *zap.Logger,
) DepositResult

func DepositFakeAssetToParties

func DepositFakeAssetToParties(
	networktools *networktools.NetworkTools,
	asset *vega.BuiltinAsset,
	config DepositConfig,
	logger *zap.Logger,
) DepositResult

type VegaNetwork

type VegaNetwork struct {
	Network        string
	SmartContracts *veganetworksmartcontracts.VegaNetworkSmartContracts

	ValidatorsById map[string]*vega.Node

	// wallets
	NodeSecrets       map[string]*secrets.VegaNodePrivate
	NetworkMainWallet *wallet.EthWallet
	AssetMainWallet   *wallet.EthWallet
	BotsApiToken      string

	MarketsCreator *secrets.VegaWalletPrivate
	VegaTokenWhale *wallet.VegaWallet

	// network params/config
	NetworkParams  *types.NetworkParams
	EthereumConfig *vega.EthereumConfig
	EthNetwork     types.ETHNetwork

	// clients
	DataNodeClient        vegaapi.DataNodeClient
	EthClientManager      *ethutils.EthereumClientManager
	SmartContractsManager *smartcontracts.SmartContractsManager
	WalletManager         *wallet.WalletManager
	EthClient             *ethclient.Client
	NodeSecretStore       secrets.NodeSecretStore
	ServiceSecretStore    secrets.ServiceSecretStore
	// contains filtered or unexported fields
}

func NewVegaNetwork

func NewVegaNetwork(
	network string,
	dataNodeClient vegaapi.DataNodeClient,
	nodeSecretStore secrets.NodeSecretStore,
	serviceSecretStore secrets.ServiceSecretStore,
	ethClientManager *ethutils.EthereumClientManager,
	smartContractsManager *smartcontracts.SmartContractsManager,
	walletManager *wallet.WalletManager,
	logger *zap.Logger,
) (*VegaNetwork, error)

func (*VegaNetwork) Disconnect

func (n *VegaNetwork) Disconnect()

func (*VegaNetwork) RefreshNetworkParams added in v0.73.9

func (n *VegaNetwork) RefreshNetworkParams() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL