Documentation ¶
Index ¶
- type ContractWhiteAddress
- type MeshDB
- func (m *MeshDB) Close()
- func (m *MeshDB) FindAllMiniHeadersSortedByNumber() ([]*MiniHeader, error)
- func (m *MeshDB) FindLatestMiniHeader() (*MiniHeader, error)
- func (m *MeshDB) FindOrdersByMakerAddress(makerAddress common.Address) ([]*Order, error)
- func (m *MeshDB) FindOrdersByMakerAddressAndMaxSalt(makerAddress common.Address, salt *big.Int) ([]*Order, error)
- func (m *MeshDB) FindOrdersByMakerAddressTokenAddressAndTokenID(makerAddress, tokenAddress common.Address, tokenID *big.Int) ([]*Order, error)
- func (m *MeshDB) FindOrdersLastUpdatedBefore(lastUpdated time.Time) ([]*Order, error)
- type MiniHeader
- type MiniHeadersCollection
- type Order
- type OrdersCollection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContractWhiteAddress ¶
type ContractWhiteAddress struct { }
type MeshDB ¶
type MeshDB struct { MiniHeaders *MiniHeadersCollection Orders *OrdersCollection // contains filtered or unexported fields }
MeshDB instantiates the DB connection and creates all the collections used by the application
func (*MeshDB) FindAllMiniHeadersSortedByNumber ¶
func (m *MeshDB) FindAllMiniHeadersSortedByNumber() ([]*MiniHeader, error)
FindAllMiniHeadersSortedByNumber returns all MiniHeaders sorted by gateway number
func (*MeshDB) FindLatestMiniHeader ¶
func (m *MeshDB) FindLatestMiniHeader() (*MiniHeader, error)
FindLatestMiniHeader returns the latest MiniHeader (i.e. the one with the largest gateway number), or nil if there are none in the database.
func (*MeshDB) FindOrdersByMakerAddress ¶
FindOrdersByMakerAddress finds all orders belonging to a particular maker address
func (*MeshDB) FindOrdersByMakerAddressAndMaxSalt ¶
func (m *MeshDB) FindOrdersByMakerAddressAndMaxSalt(makerAddress common.Address, salt *big.Int) ([]*Order, error)
FindOrdersByMakerAddressAndMaxSalt finds all orders belonging to a particular maker address that also have a salt value less then or equal to X
func (*MeshDB) FindOrdersByMakerAddressTokenAddressAndTokenID ¶
func (m *MeshDB) FindOrdersByMakerAddressTokenAddressAndTokenID(makerAddress, tokenAddress common.Address, tokenID *big.Int) ([]*Order, error)
FindOrdersByMakerAddressTokenAddressAndTokenID finds all orders belonging to a particular maker address where makerAssetData encodes for a particular token contract and optionally a token ID
type MiniHeader ¶
MiniHeader is the database representation of a succinct Ethereum gateway headers
type MiniHeadersCollection ¶
type MiniHeadersCollection struct { *db.Collection // contains filtered or unexported fields }
MiniHeadersCollection represents a DB collection of mini Ethereum gateway headers
type Order ¶
type Order struct { Hash common.Hash SignedOrder *zeroex.SignedOrder // When was this order last validated LastUpdated time.Time // How much of this order can still be filled FillableTakerAssetAmount *big.Int // Was this order flagged for removal? Due to the possibility of gateway-reorgs, instead // of immediately removing an order when FillableTakerAssetAmount becomes 0, we instead // flag it for removal. After this order isn't updated for X time and has IsRemoved = true, // the order can be permanently deleted. IsRemoved bool }
Order is the database representation a 0x order along with some relevant metadata