func NewDefaultSimulator() (*Deployer, error) {
	weiBalance := &big.Int{}
	ether := big.NewInt(1e18)
	etherBalance := big.NewInt(1000)
	wallet := config.Wallets[0]

	genesisAlloc := make(core.GenesisAlloc)
	weiBalance.Mul(etherBalance, ether)

	for _, a := range config.Accounts {
		(genesisAlloc)[a] = core.GenesisAccount{Balance: weiBalance}
	}

	simulator := backends.NewSimulatedBackend(genesisAlloc)

	return &Deployer{
		Wallet:  wallet,
		Backend: simulator,
	}, nil
}
// NewDefaultSimulator returns a simulated deployer useful for unit testing certain functions
// This simulator functions different from a standard deployer. It does not call a blockchain
// and uses a fake backend.
NewDefaultSimulator returns a simulated deployer useful for unit testing certain functions
This simulator functions different from a standard deployer. It does not call a blockchain
and uses a fake backend.
// NewDefaultSimulator returns a simulated deployer useful for unit testing certain functions // This simulator functions different from a standard deployer . It does not call a blockchain // and uses a fake backend .
func NewDefaultSimulator() (*Deployer, error) {
	weiBalance := &big.Int{}
	ether := big.NewInt(1e18)
	etherBalance := big.NewInt(1000)
	wallet := config.Wallets[0]
	genesisAlloc := make(core.GenesisAlloc)
	weiBalance.Mul(etherBalance, ether)
	for _, a := range config.Accounts {
		(genesisAlloc)[a] = core.GenesisAccount{Balance: weiBalance}
	}
	simulator := backends.NewSimulatedBackend(genesisAlloc)
	return &Deployer{
		Wallet:  wallet,
		Backend: simulator,
	}, nil
}
func NewDefaultSimulator ( ) ( * Deployer , error ) { weiBalance := & big . Int { } ether := big . NewInt ( 1e18 ) etherBalance := big . NewInt ( 1000 ) wallet := config . Wallets [ 0 ] genesisAlloc := make ( core . GenesisAlloc ) weiBalance . Mul ( etherBalance , ether ) for _ , a := range config . Accounts { ( genesisAlloc ) [ a ] = core . GenesisAccount { Balance : weiBalance } } simulator := backends . NewSimulatedBackend ( genesisAlloc ) return & Deployer { Wallet : wallet , Backend : simulator , } , nil }
NewDefaultSimulator returns a simulated deployer useful for unit testing certain functions
This simulator functions different from a standard deployer.
NewDefaultSimulator returns a simulated deployer useful for unit testing certain functions This simulator functions different from a standard deployer .