func NewConfiguration() *Config {
	constants := getConstants()
	wallets := getWallets()
	accounts := getAccounts()
	tokens := getTokenAddresses()
	exchange := getExchangeAddress()
	opParams := getOperatorParams()

	admin := wallets[0]

	dep, err := NewDeployer(admin)
	if err != nil {
		fmt.Printf("Could not deploy simulator")
	}

	ZRXContract, err := dep.NewToken(tokens["ZRX"])
	if err != nil {
		fmt.Printf("Could not retrieve the ZRX token contract")
	}

	WETHContract, err := dep.NewToken(tokens["WETH"])
	if err != nil {
		fmt.Printf("Could not retrieve the WETH token contract")
	}

	EOSContract, err := dep.NewToken(tokens["EOS"])
	if err != nil {
		fmt.Printf("Could not retrieve the EOS token contract")
	}

	ex, err := dep.NewExchange(exchange)
	if err != nil {
		fmt.Printf("Could not deploy the exchange contract")
	}

	ZRX := Token{Symbol: "ZRX", Address: ZRXContract.Address}
	WETH := Token{Symbol: "WETH", Address: WETHContract.Address}
	EOS := Token{Symbol: "EOS", Address: EOSContract.Address}
	ZRX_WETH := NewPair(ZRX, WETH)
	EOS_WETH := NewPair(EOS, WETH)

	pairs := TokenPairs{}
	pairs["ZRXWETH"] = ZRX_WETH
	pairs["EOSWETH"] = EOS_WETH

	quotes := Tokens{}
	quotes["ZRX"] = ZRX
	quotes["WETH"] = WETH
	quotes["EOS"] = EOS

	return &Config{
		Admin:          admin,
		Constants:      constants,
		Exchange:       ex.Address,
		Wallets:        wallets,
		Accounts:       accounts,
		Tokens:         tokens,
		QuoteTokens:    quotes,
		TokenPairs:     pairs,
		Deployer:       dep,
		OperatorParams: opParams,
	}
}
// NewLocalhostConfiguration() returns the configuration used for interacting with a localhost
// blockchain. ZRX, EOS, WETH token objects are created from the given addresses.
// The DEX, ZRX, EOS, WETH contracts (ZRX, EOS, WETH can be any ERC20 contracts) have to be
// already deployed. Otherwise, use the CreateLocalHostConfiguration contract.
NewLocalhostConfiguration() returns the configuration used for interacting with a localhost
blockchain. ZRX, EOS, WETH token objects are created from the given addresses.
// NewLocalhostConfiguration () returns the configuration used for interacting with a localhost // blockchain . ZRX EOS WETH token objects are created from the given addresses . // The DEX ZRX EOS WETH contracts ( ZRX EOS WETH can be any ERC20 contracts ) have to be // already deployed . Otherwise use the CreateLocalHostConfiguration contract .
func NewConfiguration() *Config {
	constants := getConstants()
	wallets := getWallets()
	accounts := getAccounts()
	tokens := getTokenAddresses()
	exchange := getExchangeAddress()
	opParams := getOperatorParams()
	admin := wallets[0]
	dep, err := NewDeployer(admin)
	if err != nil {
		fmt.Printf("Could not deploy simulator")
	}
	ZRXContract, err := dep.NewToken(tokens["ZRX"])
	if err != nil {
		fmt.Printf("Could not retrieve the ZRX token contract")
	}
	WETHContract, err := dep.NewToken(tokens["WETH"])
	if err != nil {
		fmt.Printf("Could not retrieve the WETH token contract")
	}
	EOSContract, err := dep.NewToken(tokens["EOS"])
	if err != nil {
		fmt.Printf("Could not retrieve the EOS token contract")
	}
	ex, err := dep.NewExchange(exchange)
	if err != nil {
		fmt.Printf("Could not deploy the exchange contract")
	}
	ZRX := Token{Symbol: "ZRX", Address: ZRXContract.Address}
	WETH := Token{Symbol: "WETH", Address: WETHContract.Address}
	EOS := Token{Symbol: "EOS", Address: EOSContract.Address}
	ZRX_WETH := NewPair(ZRX, WETH)
	EOS_WETH := NewPair(EOS, WETH)
	pairs := TokenPairs{}
	pairs["ZRXWETH"] = ZRX_WETH
	pairs["EOSWETH"] = EOS_WETH
	quotes := Tokens{}
	quotes["ZRX"] = ZRX
	quotes["WETH"] = WETH
	quotes["EOS"] = EOS
	return &Config{
		Admin:          admin,
		Constants:      constants,
		Exchange:       ex.Address,
		Wallets:        wallets,
		Accounts:       accounts,
		Tokens:         tokens,
		QuoteTokens:    quotes,
		TokenPairs:     pairs,
		Deployer:       dep,
		OperatorParams: opParams,
	}
}
func NewConfiguration ( ) * Config { constants := getConstants ( ) wallets := getWallets ( ) accounts := getAccounts ( ) tokens := getTokenAddresses ( ) exchange := getExchangeAddress ( ) opParams := getOperatorParams ( ) admin := wallets [ 0 ] dep , err := NewDeployer ( admin ) if err != nil { fmt . Printf ( " " ) } ZRXContract , err := dep . NewToken ( tokens [ " " ] ) if err != nil { fmt . Printf ( " " ) } WETHContract , err := dep . NewToken ( tokens [ " " ] ) if err != nil { fmt . Printf ( " " ) } EOSContract , err := dep . NewToken ( tokens [ " " ] ) if err != nil { fmt . Printf ( " " ) } ex , err := dep . NewExchange ( exchange ) if err != nil { fmt . Printf ( " " ) } ZRX := Token { Symbol : " " , Address : ZRXContract . Address } WETH := Token { Symbol : " " , Address : WETHContract . Address } EOS := Token { Symbol : " " , Address : EOSContract . Address } ZRX_WETH := NewPair ( ZRX , WETH ) EOS_WETH := NewPair ( EOS , WETH ) pairs := TokenPairs { } pairs [ " " ] = ZRX_WETH pairs [ " " ] = EOS_WETH quotes := Tokens { } quotes [ " " ] = ZRX quotes [ " " ] = WETH quotes [ " " ] = EOS return & Config { Admin : admin , Constants : constants , Exchange : ex . Address , Wallets : wallets , Accounts : accounts , Tokens : tokens , QuoteTokens : quotes , TokenPairs : pairs , Deployer : dep , OperatorParams : opParams , } }
NewLocalhostConfiguration() returns the configuration used for interacting with a localhost
blockchain.
NewLocalhostConfiguration () returns the configuration used for interacting with a localhost blockchain .