chainline-contracts / chainline.contracts / HubContract / demands_findMatchableDemand

demands_findMatchableDemand

private fun DemandList.demands_findMatchableDemand(repRequired: BigInteger, carrySpaceAvailable: BigInteger, expiresAfter: BigInteger, nowTime: Int): Demand (source)

Finds a Demand in a DemandList that fits the given attributes.

Parameters

repRequired - the desired reputation of the traveller

carrySpaceAvailable - the carry space available (scale of 1-5)

nowTime - the current unix timestamp in seconds

Return
the Demand object or an empty array if nothing found