func NewSimulatorConfiguration() *Config {
	minted := big.NewInt(1e18)
	constants := getConstants()
	wallets := getWallets()
	accounts := getAccounts()

	admin := wallets[0]

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

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

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

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

	ZRX := Token{Symbol: "ZRX", Address: ZRXTokenContract.Address}
	WETH := Token{Symbol: "WETH", Address: WETHTokenContract.Address}
	EOS := Token{Symbol: "EOS", Address: EOSTokenContract.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

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

	return &Config{
		Admin:       admin,
		Constants:   constants,
		Exchange:    ex.Address,
		Wallets:     wallets,
		Accounts:    accounts,
		Tokens:      tokens,
		QuoteTokens: quotes,
		TokenPairs:  pairs,
		Deployer:    deployer,
	}
}
// NewSimulatorConfiguration() returns the configuration used for testing. Contracts
// are deployed on a go-ethereum simulated backend.
// ZRX, EOS, WETH tokens (which are actually only standard ERC20 tokens arbitrarily named
// for clarity purposes) are deployed and then added to the pair, quotes and token variables.
NewSimulatorConfiguration() returns the configuration used for testing. Contracts
are deployed on a go-ethereum simulated backend.
ZRX, EOS, WETH tokens (which are actually only standard ERC20 tokens arbitrarily named
for clarity purposes) are deployed and then added to the pair, quotes and token variables.
// NewSimulatorConfiguration () returns the configuration used for testing . Contracts // are deployed on a go - ethereum simulated backend . // ZRX EOS WETH tokens ( which are actually only standard ERC20 tokens arbitrarily named // for clarity purposes ) are deployed and then added to the pair quotes and token variables .
func NewSimulatorConfiguration() *Config {
	minted := big.NewInt(1e18)
	constants := getConstants()
	wallets := getWallets()
	accounts := getAccounts()
	admin := wallets[0]
	deployer, err := NewSimulator(admin, accounts)
	if err != nil {
		fmt.Printf("Could not deploy simulator")
	}
	ZRXTokenContract, _, err := deployer.DeployToken(admin.Address, minted)
	if err != nil {
		fmt.Printf("Could not deploy the ZRX token contract")
	}
	WETHTokenContract, _, err := deployer.DeployToken(admin.Address, minted)
	if err != nil {
		fmt.Printf("Could not deploy the WETH token contract")
	}
	EOSTokenContract, _, err := deployer.DeployToken(admin.Address, minted)
	if err != nil {
		fmt.Printf("Could not deploy the EOS token contract")
	}
	ZRX := Token{Symbol: "ZRX", Address: ZRXTokenContract.Address}
	WETH := Token{Symbol: "WETH", Address: WETHTokenContract.Address}
	EOS := Token{Symbol: "EOS", Address: EOSTokenContract.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
	ex, _, err := deployer.DeployExchange(admin.Address)
	if err != nil {
		fmt.Printf("Could not deploy exchange: %v", err)
	}
	return &Config{
		Admin:       admin,
		Constants:   constants,
		Exchange:    ex.Address,
		Wallets:     wallets,
		Accounts:    accounts,
		Tokens:      tokens,
		QuoteTokens: quotes,
		TokenPairs:  pairs,
		Deployer:    deployer,
	}
}
func NewSimulatorConfiguration ( ) * Config { minted := big . NewInt ( 1e18 ) constants := getConstants ( ) wallets := getWallets ( ) accounts := getAccounts ( ) admin := wallets [ 0 ] deployer , err := NewSimulator ( admin , accounts ) if err != nil { fmt . Printf ( " " ) } ZRXTokenContract , _ , err := deployer . DeployToken ( admin . Address , minted ) if err != nil { fmt . Printf ( " " ) } WETHTokenContract , _ , err := deployer . DeployToken ( admin . Address , minted ) if err != nil { fmt . Printf ( " " ) } EOSTokenContract , _ , err := deployer . DeployToken ( admin . Address , minted ) if err != nil { fmt . Printf ( " " ) } ZRX := Token { Symbol : " " , Address : ZRXTokenContract . Address } WETH := Token { Symbol : " " , Address : WETHTokenContract . Address } EOS := Token { Symbol : " " , Address : EOSTokenContract . 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 ex , _ , err := deployer . DeployExchange ( admin . Address ) if err != nil { fmt . Printf ( " " , err ) } return & Config { Admin : admin , Constants : constants , Exchange : ex . Address , Wallets : wallets , Accounts : accounts , Tokens : tokens , QuoteTokens : quotes , TokenPairs : pairs , Deployer : deployer , } }
NewSimulatorConfiguration() returns the configuration used for testing.
NewSimulatorConfiguration () returns the configuration used for testing .