setup

package
v0.1.0-alpha-10 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitAssetContract

func InitAssetContract(asset string, evmClient *evm.Client) (*wtoken.Wtoken, error)

func InitWrappedAssetContract

func InitWrappedAssetContract(nativeAsset string, nativeAssets config.Assets, sourceChain, targetChain int64, evmClient *evm.Client) (*wtoken.Wtoken, error)

func NativeToWrappedAsset

func NativeToWrappedAsset(assetMappings config.Assets, sourceChain, targetChain int64, nativeAsset string) (string, error)

func WrappedToNativeAsset

func WrappedToNativeAsset(assetMappings config.Assets, sourceChainId int64, asset string) (*config.NativeAsset, error)

Types

type Config

type Config struct {
	Hedera         Hedera
	EVM            map[int64]config.Evm
	Tokens         e2eParser.Tokens
	ValidatorUrl   string
	Bridge         parser.Bridge
	AssetMappings  config.Assets
	FeePercentages map[string]int64
}

Config used to load and parse from application.yml

type EVMUtils

type EVMUtils struct {
	EVMClient             *evm.Client
	RouterContract        *router.Router
	KeyTransactor         *bind.TransactOpts
	Signer                *evm_signer.Signer
	Receiver              common.Address
	RouterAddress         common.Address
	WTokenContractAddress string
}

type Hedera

type Hedera struct {
	NetworkType       string
	BridgeAccount     string
	Members           []string
	TopicID           string
	Sender            Sender
	DbValidationProps []config.Database
	MirrorNode        config.MirrorNode
}

Hedera props from the application.yml

type Receiver added in v1.4.0

type Receiver struct {
	Account string
}

type Sender

type Sender struct {
	Account    string
	PrivateKey string
}

Sender props from the application.yml

type Setup

type Setup struct {
	BridgeAccount  hederaSDK.AccountID
	TopicID        hederaSDK.TopicID
	TokenID        hederaSDK.TokenID
	NativeEvmToken string
	FeePercentages map[string]int64
	Members        []hederaSDK.AccountID
	Clients        *clients
	DbValidator    *db_validation.Service
	AssetMappings  config.Assets
}

Setup used by the e2e tests. Preloaded with all necessary dependencies

func Load

func Load() *Setup

Load loads the e2e application.yml from the ./e2e/setup folder and parses it to suitable working struct for the e2e tests

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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