bootstrap

package
v1.3.0-alpha-1 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2023 License: Apache-2.0 Imports: 76 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitEVMClients

func InitEVMClients(clientsCfg config.Clients, networks map[uint64]*parser.Network) map[uint64]client.EVM

func InitEvmFungibleTokenClients

func InitEvmFungibleTokenClients(networks map[uint64]*parser.Network, evmClients map[uint64]client.EVM) map[uint64]map[string]client.EvmFungibleToken

func InitEvmNftClients

func InitEvmNftClients(networks map[uint64]*parser.Network, evmClients map[uint64]client.EVM) map[uint64]map[string]client.EvmNft

func InitRouterClients

func InitRouterClients(bridgeEVMsCfgs map[uint64]config.BridgeEvm, evmClients map[uint64]client.EVM) map[uint64]client.DiamondRouter

func InitializeAPIRouter

func InitializeAPIRouter(services *Services, bridgeConfig *parser.Bridge) *apirouter.APIRouter

func InitializeServerPairs

func InitializeServerPairs(server *server.Server, services *Services, repositories *Repositories, clients *Clients, configuration *config.Config, parsedBridge *parser.Bridge, bridgeCfgTopicId hedera.TopicID)

Types

type Clients

type Clients struct {
	HederaNode              client.HederaNode
	MirrorNode              client.MirrorNode
	EvmClients              map[uint64]client.EVM
	CoinGecko               client.Pricing
	CoinMarketCap           client.Pricing
	RouterClients           map[uint64]client.DiamondRouter
	EvmFungibleTokenClients map[uint64]map[string]client.EvmFungibleToken
	EvmNFTClients           map[uint64]map[string]client.EvmNft
}

Clients struct used to initialise and store all available external clients for a validator node

func PrepareClients

func PrepareClients(clientsCfg config.Clients, bridgeEvmsCfgs map[uint64]config.BridgeEvm, networks map[uint64]*parser.Network) *Clients

PrepareClients instantiates all the necessary clients for a validator node

type Repositories

type Repositories struct {
	TransferStatus repository.Status
	MessageStatus  repository.Status
	Transfer       repository.Transfer
	Message        repository.Message
	Fee            repository.Fee
	Schedule       repository.Schedule
}

Repositories struct holding the referenced repositories

func PrepareRepositories

func PrepareRepositories(db database.Database) *Repositories

PrepareRepositories initialises connection to the Database and instantiates the repositories

type Services

type Services struct {
	Signers          map[uint64]service.Signer
	ContractServices map[uint64]service.Contracts

	Messages     service.Messages
	BurnEvents   service.BurnEvent
	LockEvents   service.LockEvent
	Fees         service.Fee
	Distributor  service.Distributor
	Scheduled    service.Scheduled
	ReadOnly     service.ReadOnly
	Prometheus   service.Prometheus
	Pricing      service.Pricing
	Assets       service.Assets
	Utils        service.Utils
	BridgeConfig service.BridgeConfig
	// contains filtered or unexported fields
}

func PrepareServices

func PrepareServices(c *config.Config, parsedBridge *parser.Bridge, clients *Clients, repositories Repositories, parsedBridgeConfigTopicId hedera.TopicID) *Services

PrepareServices instantiates all the necessary services with their required context and parameters

Jump to

Keyboard shortcuts

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