func (d Deployer) NewToken(address Address) (*ERC20Token, error) {
	instance, err := interfaces.NewToken(address, d.Backend)
	if err != nil {
		return nil, err
	}

	callOptions := &bind.CallOpts{Pending: true}
	txOptions := bind.NewKeyedTransactor(d.Wallet.PrivateKey)

	return &ERC20Token{
		Address:       address,
		Contract:      instance,
		CallOptions:   callOptions,
		TxOptions:     txOptions,
		DefaultSender: d.Wallet,
	}, nil
}
// NewTokens returns a mock ERC20 instance from a given address. This does not deploy any new code on the chain
NewTokens returns a mock ERC20 instance from a given address. This does not deploy any new code on the chain
// NewTokens returns a mock ERC20 instance from a given address . This does not deploy any new code on the chain
func (d Deployer) NewToken(address Address) (*ERC20Token, error) {
	instance, err := interfaces.NewToken(address, d.Backend)
	if err != nil {
		return nil, err
	}
	callOptions := &bind.CallOpts{Pending: true}
	txOptions := bind.NewKeyedTransactor(d.Wallet.PrivateKey)
	return &ERC20Token{
		Address:       address,
		Contract:      instance,
		CallOptions:   callOptions,
		TxOptions:     txOptions,
		DefaultSender: d.Wallet,
	}, nil
}
func ( d Deployer ) NewToken ( address Address ) ( * ERC20Token , error ) { instance , err := interfaces . NewToken ( address , d . Backend ) if err != nil { return nil , err } callOptions := & bind . CallOpts { Pending : true } txOptions := bind . NewKeyedTransactor ( d . Wallet . PrivateKey ) return & ERC20Token { Address : address , Contract : instance , CallOptions : callOptions , TxOptions : txOptions , DefaultSender : d . Wallet , } , nil }
NewTokens returns a mock ERC20 instance from a given address.
NewTokens returns a mock ERC20 instance from a given address .