func NewExchange(admin *Wallet, contractAddress Address, backend bind.ContractBackend) (*Exchange, error) {
	instance, err := interfaces.NewExchange(contractAddress, backend)
	if err != nil {
		return nil, err
	}

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

	return &Exchange{
		Address:     contractAddress,
		Contract:    instance,
		CallOptions: callOptions,
		TxOptions:   txOptions,
		Admin:       admin,
	}, nil
}
// Returns a new exchange interface for a given wallet, contract address and connected backend.
// The exchange contract need to be already deployed at the given address. The given wallet will
// be used by default when sending transactions with this object.
Returns a new exchange interface for a given wallet, contract address and connected backend.
The exchange contract need to be already deployed at the given address. The given wallet will
be used by default when sending transactions with this object.
// Returns a new exchange interface for a given wallet contract address and connected backend . // The exchange contract need to be already deployed at the given address . The given wallet will // be used by default when sending transactions with this object .
func NewExchange(admin *Wallet, contractAddress Address, backend bind.ContractBackend) (*Exchange, error) {
	instance, err := interfaces.NewExchange(contractAddress, backend)
	if err != nil {
		return nil, err
	}
	callOptions := &bind.CallOpts{Pending: true}
	txOptions := bind.NewKeyedTransactor(admin.PrivateKey)
	return &Exchange{
		Address:     contractAddress,
		Contract:    instance,
		CallOptions: callOptions,
		TxOptions:   txOptions,
		Admin:       admin,
	}, nil
}
func NewExchange ( admin * Wallet , contractAddress Address , backend bind . ContractBackend ) ( * Exchange , error ) { instance , err := interfaces . NewExchange ( contractAddress , backend ) if err != nil { return nil , err } callOptions := & bind . CallOpts { Pending : true } txOptions := bind . NewKeyedTransactor ( admin . PrivateKey ) return & Exchange { Address : contractAddress , Contract : instance , CallOptions : callOptions , TxOptions : txOptions , Admin : admin , } , nil }
Returns a new exchange interface for a given wallet, contract address and connected backend.
Returns a new exchange interface for a given wallet contract address and connected backend .