broker

package
v0.0.0-...-a287f25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const BrokerABI = "" /* 10034-byte string literal not displayed */

BrokerABI is the input ABI used to generate the binding from.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

type Broker struct {
	BrokerCaller     // Read-only binding to the contract
	BrokerTransactor // Write-only binding to the contract
	BrokerFilterer   // Log filterer for contract events
}

Broker is an auto generated Go binding around an Ethereum contract.

func NewBroker

func NewBroker(address common.Address, backend bind.ContractBackend) (*Broker, error)

NewBroker creates a new instance of Broker, bound to a specific deployed contract.

type BrokerCallFunction

type BrokerCallFunction struct {
	UserData1         [32]byte
	UserData2         [32]byte
	FunctionSignature string
	CallData          []byte
	Signature         []byte
	Raw               types.Log // Blockchain specific contextual infos
}

BrokerCallFunction represents a CallFunction event raised by the Broker contract.

type BrokerCallFunctionIterator

type BrokerCallFunctionIterator struct {
	Event *BrokerCallFunction // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

BrokerCallFunctionIterator is returned from FilterCallFunction and is used to iterate over the raw logs and unpacked data for CallFunction events raised by the Broker contract.

func (*BrokerCallFunctionIterator) Close

func (it *BrokerCallFunctionIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*BrokerCallFunctionIterator) Error

func (it *BrokerCallFunctionIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*BrokerCallFunctionIterator) Next

func (it *BrokerCallFunctionIterator) Next() bool

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type BrokerCaller

type BrokerCaller struct {
	// contains filtered or unexported fields
}

BrokerCaller is an auto generated read-only Go binding around an Ethereum contract.

func NewBrokerCaller

func NewBrokerCaller(address common.Address, caller bind.ContractCaller) (*BrokerCaller, error)

NewBrokerCaller creates a new read-only instance of Broker, bound to a specific deployed contract.

func (*BrokerCaller) BalanceOf

func (_Broker *BrokerCaller) BalanceOf(opts *bind.CallOpts, trader common.Address) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0x70a08231.

Solidity: function balanceOf(address trader) view returns(uint256)

func (*BrokerCaller) GetOrderFilledAmount

func (_Broker *BrokerCaller) GetOrderFilledAmount(opts *bind.CallOpts, order Order) (*big.Int, error)

GetOrderFilledAmount is a free data retrieval call binding the contract method 0x4e199146.

Solidity: function getOrderFilledAmount((address,address,address,address,address,int256,int256,int256,int256,uint256,uint64,uint32,uint32,uint32,uint32) order) view returns(int256 filledAmount)

func (*BrokerCaller) IsOrderCanceled

func (_Broker *BrokerCaller) IsOrderCanceled(opts *bind.CallOpts, order Order) (bool, error)

IsOrderCanceled is a free data retrieval call binding the contract method 0x89d1e304.

Solidity: function isOrderCanceled((address,address,address,address,address,int256,int256,int256,int256,uint256,uint64,uint32,uint32,uint32,uint32) order) view returns(bool)

type BrokerCallerRaw

type BrokerCallerRaw struct {
	Contract *BrokerCaller // Generic read-only contract binding to access the raw methods on
}

BrokerCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.

func (*BrokerCallerRaw) Call

func (_Broker *BrokerCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

type BrokerCallerSession

type BrokerCallerSession struct {
	Contract *BrokerCaller // Generic contract caller binding to set the session for
	CallOpts bind.CallOpts // Call options to use throughout this session
}

BrokerCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.

func (*BrokerCallerSession) BalanceOf

func (_Broker *BrokerCallerSession) BalanceOf(trader common.Address) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0x70a08231.

Solidity: function balanceOf(address trader) view returns(uint256)

func (*BrokerCallerSession) GetOrderFilledAmount

func (_Broker *BrokerCallerSession) GetOrderFilledAmount(order Order) (*big.Int, error)

GetOrderFilledAmount is a free data retrieval call binding the contract method 0x4e199146.

Solidity: function getOrderFilledAmount((address,address,address,address,address,int256,int256,int256,int256,uint256,uint64,uint32,uint32,uint32,uint32) order) view returns(int256 filledAmount)

func (*BrokerCallerSession) IsOrderCanceled

func (_Broker *BrokerCallerSession) IsOrderCanceled(order Order) (bool, error)

IsOrderCanceled is a free data retrieval call binding the contract method 0x89d1e304.

Solidity: function isOrderCanceled((address,address,address,address,address,int256,int256,int256,int256,uint256,uint64,uint32,uint32,uint32,uint32) order) view returns(bool)

type BrokerCancelOrder

type BrokerCancelOrder struct {
	OrderHash [32]byte
	Raw       types.Log // Blockchain specific contextual infos
}

BrokerCancelOrder represents a CancelOrder event raised by the Broker contract.

type BrokerCancelOrderIterator

type BrokerCancelOrderIterator struct {
	Event *BrokerCancelOrder // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

BrokerCancelOrderIterator is returned from FilterCancelOrder and is used to iterate over the raw logs and unpacked data for CancelOrder events raised by the Broker contract.

func (*BrokerCancelOrderIterator) Close

func (it *BrokerCancelOrderIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*BrokerCancelOrderIterator) Error

func (it *BrokerCancelOrderIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*BrokerCancelOrderIterator) Next

func (it *BrokerCancelOrderIterator) Next() bool

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type BrokerDeposit

type BrokerDeposit struct {
	Trader common.Address
	Amount *big.Int
	Raw    types.Log // Blockchain specific contextual infos
}

BrokerDeposit represents a Deposit event raised by the Broker contract.

type BrokerDepositIterator

type BrokerDepositIterator struct {
	Event *BrokerDeposit // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

BrokerDepositIterator is returned from FilterDeposit and is used to iterate over the raw logs and unpacked data for Deposit events raised by the Broker contract.

func (*BrokerDepositIterator) Close

func (it *BrokerDepositIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*BrokerDepositIterator) Error

func (it *BrokerDepositIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*BrokerDepositIterator) Next

func (it *BrokerDepositIterator) Next() bool

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type BrokerFillOrder

type BrokerFillOrder struct {
	OrderHash  [32]byte
	FillAmount *big.Int
	Raw        types.Log // Blockchain specific contextual infos
}

BrokerFillOrder represents a FillOrder event raised by the Broker contract.

type BrokerFillOrderIterator

type BrokerFillOrderIterator struct {
	Event *BrokerFillOrder // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

BrokerFillOrderIterator is returned from FilterFillOrder and is used to iterate over the raw logs and unpacked data for FillOrder events raised by the Broker contract.

func (*BrokerFillOrderIterator) Close

func (it *BrokerFillOrderIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*BrokerFillOrderIterator) Error

func (it *BrokerFillOrderIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*BrokerFillOrderIterator) Next

func (it *BrokerFillOrderIterator) Next() bool

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type BrokerFilterer

type BrokerFilterer struct {
	// contains filtered or unexported fields
}

BrokerFilterer is an auto generated log filtering Go binding around an Ethereum contract events.

func NewBrokerFilterer

func NewBrokerFilterer(address common.Address, filterer bind.ContractFilterer) (*BrokerFilterer, error)

NewBrokerFilterer creates a new log filterer instance of Broker, bound to a specific deployed contract.

func (*BrokerFilterer) FilterCallFunction

func (_Broker *BrokerFilterer) FilterCallFunction(opts *bind.FilterOpts) (*BrokerCallFunctionIterator, error)

FilterCallFunction is a free log retrieval operation binding the contract event 0xf7a099b6e4317688ffa8d752134614f9ec1394f25cbfc1646032ddead07a1997.

Solidity: event CallFunction(bytes32 userData1, bytes32 userData2, string functionSignature, bytes callData, bytes signature)

func (*BrokerFilterer) FilterCancelOrder

func (_Broker *BrokerFilterer) FilterCancelOrder(opts *bind.FilterOpts) (*BrokerCancelOrderIterator, error)

FilterCancelOrder is a free log retrieval operation binding the contract event 0x42c76c81a7cba1b9c861353909a184e20747ab960332628dabcbb5852fc5cbb5.

Solidity: event CancelOrder(bytes32 orderHash)

func (*BrokerFilterer) FilterDeposit

func (_Broker *BrokerFilterer) FilterDeposit(opts *bind.FilterOpts, trader []common.Address) (*BrokerDepositIterator, error)

FilterDeposit is a free log retrieval operation binding the contract event 0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c.

Solidity: event Deposit(address indexed trader, uint256 amount)

func (*BrokerFilterer) FilterFillOrder

func (_Broker *BrokerFilterer) FilterFillOrder(opts *bind.FilterOpts) (*BrokerFillOrderIterator, error)

FilterFillOrder is a free log retrieval operation binding the contract event 0x66bc40b7d864f86356146c435fb0178293d08d80e04a8fba27d0e372ffe2d82b.

Solidity: event FillOrder(bytes32 orderHash, int256 fillAmount)

func (*BrokerFilterer) FilterTradeFailed

func (_Broker *BrokerFilterer) FilterTradeFailed(opts *bind.FilterOpts) (*BrokerTradeFailedIterator, error)

FilterTradeFailed is a free log retrieval operation binding the contract event 0x1955905acc03ff235236ed3bc847a2b24e6a1a945754ffad043f7b8e01adaeb7.

Solidity: event TradeFailed(bytes32 orderHash, (address,address,address,address,address,int256,int256,int256,int256,uint256,uint64,uint32,uint32,uint32,uint32) order, int256 amount, string reason)

func (*BrokerFilterer) FilterTradeSuccess

func (_Broker *BrokerFilterer) FilterTradeSuccess(opts *bind.FilterOpts) (*BrokerTradeSuccessIterator, error)

FilterTradeSuccess is a free log retrieval operation binding the contract event 0xa31c4dcf97bfab49d7f55b0dbc9a7a49d25cdfa4cead657a12315b48bf11f89a.

Solidity: event TradeSuccess(bytes32 orderHash, (address,address,address,address,address,int256,int256,int256,int256,uint256,uint64,uint32,uint32,uint32,uint32) order, int256 amount, uint256 gasReward)

func (*BrokerFilterer) FilterTransfer

func (_Broker *BrokerFilterer) FilterTransfer(opts *bind.FilterOpts, sender []common.Address, recipient []common.Address) (*BrokerTransferIterator, error)

FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.

Solidity: event Transfer(address indexed sender, address indexed recipient, uint256 amount)

func (*BrokerFilterer) FilterWithdraw

func (_Broker *BrokerFilterer) FilterWithdraw(opts *bind.FilterOpts, trader []common.Address) (*BrokerWithdrawIterator, error)

FilterWithdraw is a free log retrieval operation binding the contract event 0x884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364.

Solidity: event Withdraw(address indexed trader, uint256 amount)

func (*BrokerFilterer) ParseCallFunction

func (_Broker *BrokerFilterer) ParseCallFunction(log types.Log) (*BrokerCallFunction, error)

ParseCallFunction is a log parse operation binding the contract event 0xf7a099b6e4317688ffa8d752134614f9ec1394f25cbfc1646032ddead07a1997.

Solidity: event CallFunction(bytes32 userData1, bytes32 userData2, string functionSignature, bytes callData, bytes signature)

func (*BrokerFilterer) ParseCancelOrder

func (_Broker *BrokerFilterer) ParseCancelOrder(log types.Log) (*BrokerCancelOrder, error)

ParseCancelOrder is a log parse operation binding the contract event 0x42c76c81a7cba1b9c861353909a184e20747ab960332628dabcbb5852fc5cbb5.

Solidity: event CancelOrder(bytes32 orderHash)

func (*BrokerFilterer) ParseDeposit

func (_Broker *BrokerFilterer) ParseDeposit(log types.Log) (*BrokerDeposit, error)

ParseDeposit is a log parse operation binding the contract event 0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c.

Solidity: event Deposit(address indexed trader, uint256 amount)

func (*BrokerFilterer) ParseFillOrder

func (_Broker *BrokerFilterer) ParseFillOrder(log types.Log) (*BrokerFillOrder, error)

ParseFillOrder is a log parse operation binding the contract event 0x66bc40b7d864f86356146c435fb0178293d08d80e04a8fba27d0e372ffe2d82b.

Solidity: event FillOrder(bytes32 orderHash, int256 fillAmount)

func (*BrokerFilterer) ParseTradeFailed

func (_Broker *BrokerFilterer) ParseTradeFailed(log types.Log) (*BrokerTradeFailed, error)

ParseTradeFailed is a log parse operation binding the contract event 0x1955905acc03ff235236ed3bc847a2b24e6a1a945754ffad043f7b8e01adaeb7.

Solidity: event TradeFailed(bytes32 orderHash, (address,address,address,address,address,int256,int256,int256,int256,uint256,uint64,uint32,uint32,uint32,uint32) order, int256 amount, string reason)

func (*BrokerFilterer) ParseTradeSuccess

func (_Broker *BrokerFilterer) ParseTradeSuccess(log types.Log) (*BrokerTradeSuccess, error)

ParseTradeSuccess is a log parse operation binding the contract event 0xa31c4dcf97bfab49d7f55b0dbc9a7a49d25cdfa4cead657a12315b48bf11f89a.

Solidity: event TradeSuccess(bytes32 orderHash, (address,address,address,address,address,int256,int256,int256,int256,uint256,uint64,uint32,uint32,uint32,uint32) order, int256 amount, uint256 gasReward)

func (*BrokerFilterer) ParseTransfer

func (_Broker *BrokerFilterer) ParseTransfer(log types.Log) (*BrokerTransfer, error)

ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.

Solidity: event Transfer(address indexed sender, address indexed recipient, uint256 amount)

func (*BrokerFilterer) ParseWithdraw

func (_Broker *BrokerFilterer) ParseWithdraw(log types.Log) (*BrokerWithdraw, error)

ParseWithdraw is a log parse operation binding the contract event 0x884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364.

Solidity: event Withdraw(address indexed trader, uint256 amount)

func (*BrokerFilterer) WatchCallFunction

func (_Broker *BrokerFilterer) WatchCallFunction(opts *bind.WatchOpts, sink chan<- *BrokerCallFunction) (event.Subscription, error)

WatchCallFunction is a free log subscription operation binding the contract event 0xf7a099b6e4317688ffa8d752134614f9ec1394f25cbfc1646032ddead07a1997.

Solidity: event CallFunction(bytes32 userData1, bytes32 userData2, string functionSignature, bytes callData, bytes signature)

func (*BrokerFilterer) WatchCancelOrder

func (_Broker *BrokerFilterer) WatchCancelOrder(opts *bind.WatchOpts, sink chan<- *BrokerCancelOrder) (event.Subscription, error)

WatchCancelOrder is a free log subscription operation binding the contract event 0x42c76c81a7cba1b9c861353909a184e20747ab960332628dabcbb5852fc5cbb5.

Solidity: event CancelOrder(bytes32 orderHash)

func (*BrokerFilterer) WatchDeposit

func (_Broker *BrokerFilterer) WatchDeposit(opts *bind.WatchOpts, sink chan<- *BrokerDeposit, trader []common.Address) (event.Subscription, error)

WatchDeposit is a free log subscription operation binding the contract event 0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c.

Solidity: event Deposit(address indexed trader, uint256 amount)

func (*BrokerFilterer) WatchFillOrder

func (_Broker *BrokerFilterer) WatchFillOrder(opts *bind.WatchOpts, sink chan<- *BrokerFillOrder) (event.Subscription, error)

WatchFillOrder is a free log subscription operation binding the contract event 0x66bc40b7d864f86356146c435fb0178293d08d80e04a8fba27d0e372ffe2d82b.

Solidity: event FillOrder(bytes32 orderHash, int256 fillAmount)

func (*BrokerFilterer) WatchTradeFailed

func (_Broker *BrokerFilterer) WatchTradeFailed(opts *bind.WatchOpts, sink chan<- *BrokerTradeFailed) (event.Subscription, error)

WatchTradeFailed is a free log subscription operation binding the contract event 0x1955905acc03ff235236ed3bc847a2b24e6a1a945754ffad043f7b8e01adaeb7.

Solidity: event TradeFailed(bytes32 orderHash, (address,address,address,address,address,int256,int256,int256,int256,uint256,uint64,uint32,uint32,uint32,uint32) order, int256 amount, string reason)

func (*BrokerFilterer) WatchTradeSuccess

func (_Broker *BrokerFilterer) WatchTradeSuccess(opts *bind.WatchOpts, sink chan<- *BrokerTradeSuccess) (event.Subscription, error)

WatchTradeSuccess is a free log subscription operation binding the contract event 0xa31c4dcf97bfab49d7f55b0dbc9a7a49d25cdfa4cead657a12315b48bf11f89a.

Solidity: event TradeSuccess(bytes32 orderHash, (address,address,address,address,address,int256,int256,int256,int256,uint256,uint64,uint32,uint32,uint32,uint32) order, int256 amount, uint256 gasReward)

func (*BrokerFilterer) WatchTransfer

func (_Broker *BrokerFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *BrokerTransfer, sender []common.Address, recipient []common.Address) (event.Subscription, error)

WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef.

Solidity: event Transfer(address indexed sender, address indexed recipient, uint256 amount)

func (*BrokerFilterer) WatchWithdraw

func (_Broker *BrokerFilterer) WatchWithdraw(opts *bind.WatchOpts, sink chan<- *BrokerWithdraw, trader []common.Address) (event.Subscription, error)

WatchWithdraw is a free log subscription operation binding the contract event 0x884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364.

Solidity: event Withdraw(address indexed trader, uint256 amount)

type BrokerRaw

type BrokerRaw struct {
	Contract *Broker // Generic contract binding to access the raw methods on
}

BrokerRaw is an auto generated low-level Go binding around an Ethereum contract.

func (*BrokerRaw) Call

func (_Broker *BrokerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

func (*BrokerRaw) Transact

func (_Broker *BrokerRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*BrokerRaw) Transfer

func (_Broker *BrokerRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type BrokerSession

type BrokerSession struct {
	Contract     *Broker           // Generic contract binding to set the session for
	CallOpts     bind.CallOpts     // Call options to use throughout this session
	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}

BrokerSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.

func (*BrokerSession) BalanceOf

func (_Broker *BrokerSession) BalanceOf(trader common.Address) (*big.Int, error)

BalanceOf is a free data retrieval call binding the contract method 0x70a08231.

Solidity: function balanceOf(address trader) view returns(uint256)

func (*BrokerSession) BatchTrade

func (_Broker *BrokerSession) BatchTrade(compressedOrders [][]byte, amounts []*big.Int, gasRewards []*big.Int) (*types.Transaction, error)

BatchTrade is a paid mutator transaction binding the contract method 0xabee6e5c.

Solidity: function batchTrade(bytes[] compressedOrders, int256[] amounts, uint256[] gasRewards) returns()

func (*BrokerSession) CancelOrder

func (_Broker *BrokerSession) CancelOrder(order Order) (*types.Transaction, error)

CancelOrder is a paid mutator transaction binding the contract method 0xce4d643b.

Solidity: function cancelOrder((address,address,address,address,address,int256,int256,int256,int256,uint256,uint64,uint32,uint32,uint32,uint32) order) returns()

func (*BrokerSession) Deposit

func (_Broker *BrokerSession) Deposit() (*types.Transaction, error)

Deposit is a paid mutator transaction binding the contract method 0xd0e30db0.

Solidity: function deposit() payable returns()

func (*BrokerSession) GetOrderFilledAmount

func (_Broker *BrokerSession) GetOrderFilledAmount(order Order) (*big.Int, error)

GetOrderFilledAmount is a free data retrieval call binding the contract method 0x4e199146.

Solidity: function getOrderFilledAmount((address,address,address,address,address,int256,int256,int256,int256,uint256,uint64,uint32,uint32,uint32,uint32) order) view returns(int256 filledAmount)

func (*BrokerSession) IsOrderCanceled

func (_Broker *BrokerSession) IsOrderCanceled(order Order) (bool, error)

IsOrderCanceled is a free data retrieval call binding the contract method 0x89d1e304.

Solidity: function isOrderCanceled((address,address,address,address,address,int256,int256,int256,int256,uint256,uint64,uint32,uint32,uint32,uint32) order) view returns(bool)

func (*BrokerSession) Receive

func (_Broker *BrokerSession) Receive() (*types.Transaction, error)

Receive is a paid mutator transaction binding the contract receive function.

Solidity: receive() payable returns()

func (*BrokerSession) Withdraw

func (_Broker *BrokerSession) Withdraw(amount *big.Int) (*types.Transaction, error)

Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d.

Solidity: function withdraw(uint256 amount) returns()

type BrokerTradeFailed

type BrokerTradeFailed struct {
	OrderHash [32]byte
	Order     Order
	Amount    *big.Int
	Reason    string
	Raw       types.Log // Blockchain specific contextual infos
}

BrokerTradeFailed represents a TradeFailed event raised by the Broker contract.

type BrokerTradeFailedIterator

type BrokerTradeFailedIterator struct {
	Event *BrokerTradeFailed // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

BrokerTradeFailedIterator is returned from FilterTradeFailed and is used to iterate over the raw logs and unpacked data for TradeFailed events raised by the Broker contract.

func (*BrokerTradeFailedIterator) Close

func (it *BrokerTradeFailedIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*BrokerTradeFailedIterator) Error

func (it *BrokerTradeFailedIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*BrokerTradeFailedIterator) Next

func (it *BrokerTradeFailedIterator) Next() bool

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type BrokerTradeSuccess

type BrokerTradeSuccess struct {
	OrderHash [32]byte
	Order     Order
	Amount    *big.Int
	GasReward *big.Int
	Raw       types.Log // Blockchain specific contextual infos
}

BrokerTradeSuccess represents a TradeSuccess event raised by the Broker contract.

type BrokerTradeSuccessIterator

type BrokerTradeSuccessIterator struct {
	Event *BrokerTradeSuccess // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

BrokerTradeSuccessIterator is returned from FilterTradeSuccess and is used to iterate over the raw logs and unpacked data for TradeSuccess events raised by the Broker contract.

func (*BrokerTradeSuccessIterator) Close

func (it *BrokerTradeSuccessIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*BrokerTradeSuccessIterator) Error

func (it *BrokerTradeSuccessIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*BrokerTradeSuccessIterator) Next

func (it *BrokerTradeSuccessIterator) Next() bool

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type BrokerTransactor

type BrokerTransactor struct {
	// contains filtered or unexported fields
}

BrokerTransactor is an auto generated write-only Go binding around an Ethereum contract.

func NewBrokerTransactor

func NewBrokerTransactor(address common.Address, transactor bind.ContractTransactor) (*BrokerTransactor, error)

NewBrokerTransactor creates a new write-only instance of Broker, bound to a specific deployed contract.

func (*BrokerTransactor) BatchTrade

func (_Broker *BrokerTransactor) BatchTrade(opts *bind.TransactOpts, compressedOrders [][]byte, amounts []*big.Int, gasRewards []*big.Int) (*types.Transaction, error)

BatchTrade is a paid mutator transaction binding the contract method 0xabee6e5c.

Solidity: function batchTrade(bytes[] compressedOrders, int256[] amounts, uint256[] gasRewards) returns()

func (*BrokerTransactor) CancelOrder

func (_Broker *BrokerTransactor) CancelOrder(opts *bind.TransactOpts, order Order) (*types.Transaction, error)

CancelOrder is a paid mutator transaction binding the contract method 0xce4d643b.

Solidity: function cancelOrder((address,address,address,address,address,int256,int256,int256,int256,uint256,uint64,uint32,uint32,uint32,uint32) order) returns()

func (*BrokerTransactor) Deposit

func (_Broker *BrokerTransactor) Deposit(opts *bind.TransactOpts) (*types.Transaction, error)

Deposit is a paid mutator transaction binding the contract method 0xd0e30db0.

Solidity: function deposit() payable returns()

func (*BrokerTransactor) Receive

func (_Broker *BrokerTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error)

Receive is a paid mutator transaction binding the contract receive function.

Solidity: receive() payable returns()

func (*BrokerTransactor) Withdraw

func (_Broker *BrokerTransactor) Withdraw(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error)

Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d.

Solidity: function withdraw(uint256 amount) returns()

type BrokerTransactorRaw

type BrokerTransactorRaw struct {
	Contract *BrokerTransactor // Generic write-only contract binding to access the raw methods on
}

BrokerTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.

func (*BrokerTransactorRaw) Transact

func (_Broker *BrokerTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*BrokerTransactorRaw) Transfer

func (_Broker *BrokerTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type BrokerTransactorSession

type BrokerTransactorSession struct {
	Contract     *BrokerTransactor // Generic contract transactor binding to set the session for
	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}

BrokerTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.

func (*BrokerTransactorSession) BatchTrade

func (_Broker *BrokerTransactorSession) BatchTrade(compressedOrders [][]byte, amounts []*big.Int, gasRewards []*big.Int) (*types.Transaction, error)

BatchTrade is a paid mutator transaction binding the contract method 0xabee6e5c.

Solidity: function batchTrade(bytes[] compressedOrders, int256[] amounts, uint256[] gasRewards) returns()

func (*BrokerTransactorSession) CancelOrder

func (_Broker *BrokerTransactorSession) CancelOrder(order Order) (*types.Transaction, error)

CancelOrder is a paid mutator transaction binding the contract method 0xce4d643b.

Solidity: function cancelOrder((address,address,address,address,address,int256,int256,int256,int256,uint256,uint64,uint32,uint32,uint32,uint32) order) returns()

func (*BrokerTransactorSession) Deposit

func (_Broker *BrokerTransactorSession) Deposit() (*types.Transaction, error)

Deposit is a paid mutator transaction binding the contract method 0xd0e30db0.

Solidity: function deposit() payable returns()

func (*BrokerTransactorSession) Receive

func (_Broker *BrokerTransactorSession) Receive() (*types.Transaction, error)

Receive is a paid mutator transaction binding the contract receive function.

Solidity: receive() payable returns()

func (*BrokerTransactorSession) Withdraw

func (_Broker *BrokerTransactorSession) Withdraw(amount *big.Int) (*types.Transaction, error)

Withdraw is a paid mutator transaction binding the contract method 0x2e1a7d4d.

Solidity: function withdraw(uint256 amount) returns()

type BrokerTransfer

type BrokerTransfer struct {
	Sender    common.Address
	Recipient common.Address
	Amount    *big.Int
	Raw       types.Log // Blockchain specific contextual infos
}

BrokerTransfer represents a Transfer event raised by the Broker contract.

type BrokerTransferIterator

type BrokerTransferIterator struct {
	Event *BrokerTransfer // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

BrokerTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the Broker contract.

func (*BrokerTransferIterator) Close

func (it *BrokerTransferIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*BrokerTransferIterator) Error

func (it *BrokerTransferIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*BrokerTransferIterator) Next

func (it *BrokerTransferIterator) Next() bool

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type BrokerWithdraw

type BrokerWithdraw struct {
	Trader common.Address
	Amount *big.Int
	Raw    types.Log // Blockchain specific contextual infos
}

BrokerWithdraw represents a Withdraw event raised by the Broker contract.

type BrokerWithdrawIterator

type BrokerWithdrawIterator struct {
	Event *BrokerWithdraw // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

BrokerWithdrawIterator is returned from FilterWithdraw and is used to iterate over the raw logs and unpacked data for Withdraw events raised by the Broker contract.

func (*BrokerWithdrawIterator) Close

func (it *BrokerWithdrawIterator) Close() error

Close terminates the iteration process, releasing any pending underlying resources.

func (*BrokerWithdrawIterator) Error

func (it *BrokerWithdrawIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*BrokerWithdrawIterator) Next

func (it *BrokerWithdrawIterator) Next() bool

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type Order

type Order struct {
	Trader         common.Address
	Broker         common.Address
	Relayer        common.Address
	Referrer       common.Address
	LiquidityPool  common.Address
	MinTradeAmount *big.Int
	Amount         *big.Int
	LimitPrice     *big.Int
	TriggerPrice   *big.Int
	ChainID        *big.Int
	ExpiredAt      uint64
	PerpetualIndex uint32
	BrokerFeeLimit uint32
	Flags          uint32
	Salt           uint32
}

Order is an auto generated low-level Go binding around an user-defined struct.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL