func CreateConfiguration() *Config {
	minted := big.NewInt(1e18)
	constants := getConstants()
	wallets := getWallets()
	accounts := getAccounts()
	opParams := getOperatorParams()
	admin := wallets[0]

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

	ex, _, err := deployer.DeployExchange(admin.Address)
	if err != nil {
		fmt.Printf("Could not deploy the exchange contract")
	}

	ZRXContract, _, err := deployer.DeployToken(admin.Address, minted)
	if err != nil {
		fmt.Printf("Could not deploy the ZRX token contract")
	}

	WETHContract, _, err := deployer.DeployToken(admin.Address, minted)
	if err != nil {
		fmt.Printf("Could not deploy the WETH token contract")
	}

	EOSContract, _, err := deployer.DeployToken(admin.Address, minted)
	if err != nil {
		fmt.Printf("Could not deploy the EOS token 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

	tokens := make(map[string]Address)
	tokens["ZRX"] = ZRX.Address
	tokens["WETH"] = WETH.Address
	tokens["EOS"] = EOS.Address

	return &Config{
		Admin:          admin,
		Constants:      constants,
		Exchange:       ex.Address,
		Wallets:        wallets,
		Accounts:       accounts,
		Tokens:         tokens,
		QuoteTokens:    quotes,
		TokenPairs:     pairs,
		Deployer:       deployer,
		OperatorParams: opParams,
	}

}
// CreateLocalhostConfiguration() deploys mock tokens and the decentralized exchange contract
// and returns a configuration object that includes accounts, contract addresses, etc.
// If contracts are already deployed, then use the NewLocalHostConfiguration instead.
CreateLocalhostConfiguration() deploys mock tokens and the decentralized exchange contract
and returns a configuration object that includes accounts, contract addresses, etc.
If contracts are already deployed, then use the NewLocalHostConfiguration instead.
// CreateLocalhostConfiguration () deploys mock tokens and the decentralized exchange contract // and returns a configuration object that includes accounts contract addresses etc . // If contracts are already deployed then use the NewLocalHostConfiguration instead .
func CreateConfiguration() *Config {
	minted := big.NewInt(1e18)
	constants := getConstants()
	wallets := getWallets()
	accounts := getAccounts()
	opParams := getOperatorParams()
	admin := wallets[0]
	deployer, err := NewDeployer(admin)
	if err != nil {
		fmt.Printf("Could not deploy simulator")
	}
	ex, _, err := deployer.DeployExchange(admin.Address)
	if err != nil {
		fmt.Printf("Could not deploy the exchange contract")
	}
	ZRXContract, _, err := deployer.DeployToken(admin.Address, minted)
	if err != nil {
		fmt.Printf("Could not deploy the ZRX token contract")
	}
	WETHContract, _, err := deployer.DeployToken(admin.Address, minted)
	if err != nil {
		fmt.Printf("Could not deploy the WETH token contract")
	}
	EOSContract, _, err := deployer.DeployToken(admin.Address, minted)
	if err != nil {
		fmt.Printf("Could not deploy the EOS token 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
	tokens := make(map[string]Address)
	tokens["ZRX"] = ZRX.Address
	tokens["WETH"] = WETH.Address
	tokens["EOS"] = EOS.Address
	return &Config{
		Admin:          admin,
		Constants:      constants,
		Exchange:       ex.Address,
		Wallets:        wallets,
		Accounts:       accounts,
		Tokens:         tokens,
		QuoteTokens:    quotes,
		TokenPairs:     pairs,
		Deployer:       deployer,
		OperatorParams: opParams,
	}
}
func CreateConfiguration ( ) * Config { minted := big . NewInt ( 1e18 ) constants := getConstants ( ) wallets := getWallets ( ) accounts := getAccounts ( ) opParams := getOperatorParams ( ) admin := wallets [ 0 ] deployer , err := NewDeployer ( admin ) if err != nil { fmt . Printf ( " " ) } ex , _ , err := deployer . DeployExchange ( admin . Address ) if err != nil { fmt . Printf ( " " ) } ZRXContract , _ , err := deployer . DeployToken ( admin . Address , minted ) if err != nil { fmt . Printf ( " " ) } WETHContract , _ , err := deployer . DeployToken ( admin . Address , minted ) if err != nil { fmt . Printf ( " " ) } EOSContract , _ , err := deployer . DeployToken ( admin . Address , minted ) 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 tokens := make ( map [ string ] Address ) tokens [ " " ] = ZRX . Address tokens [ " " ] = WETH . Address tokens [ " " ] = EOS . Address return & Config { Admin : admin , Constants : constants , Exchange : ex . Address , Wallets : wallets , Accounts : accounts , Tokens : tokens , QuoteTokens : quotes , TokenPairs : pairs , Deployer : deployer , OperatorParams : opParams , } }
CreateLocalhostConfiguration() deploys mock tokens and the decentralized exchange contract
and returns a configuration object that includes accounts, contract addresses, etc.
CreateLocalhostConfiguration () deploys mock tokens and the decentralized exchange contract and returns a configuration object that includes accounts contract addresses etc .